From 905f35f28992e45fff1e5e8d2571914d530f6226 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 8 Jan 2015 06:02:24 +0000 Subject: [PATCH] In Customizer classes: * `public final function` methods should be `final public function` - confusing Hack and aligns with PSR2 * Some methods were missing access modifiers See #30799. Built from https://develop.svn.wordpress.org/trunk@31083 git-svn-id: http://core.svn.wordpress.org/trunk@31064 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-oembed.php | 2 +- wp-includes/class-wp-customize-control.php | 14 +++++++------- wp-includes/class-wp-customize-panel.php | 8 ++++---- wp-includes/class-wp-customize-section.php | 8 ++++---- wp-includes/class-wp-customize-setting.php | 6 +++--- wp-includes/version.php | 2 +- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/wp-includes/class-oembed.php b/wp-includes/class-oembed.php index 6042fd4332..a3b7e554cb 100644 --- a/wp-includes/class-oembed.php +++ b/wp-includes/class-oembed.php @@ -272,7 +272,7 @@ class WP_oEmbed { * @param array $args Optional arguments. Usually passed from a shortcode. * @return false|string False on failure, otherwise the UNSANITIZED (and potentially unsafe) HTML that should be used to embed. */ - function get_html( $url, $args = '' ) { + public function get_html( $url, $args = '' ) { $provider = $this->get_provider( $url, $args ); if ( !$provider || false === $data = $this->fetch( $provider, $url, $args ) ) diff --git a/wp-includes/class-wp-customize-control.php b/wp-includes/class-wp-customize-control.php index 950b0d5a34..b923da37c0 100644 --- a/wp-includes/class-wp-customize-control.php +++ b/wp-includes/class-wp-customize-control.php @@ -183,7 +183,7 @@ class WP_Customize_Control { * * @return bool Whether the control is active to the current preview. */ - public final function active() { + final public function active() { $control = $this; $active = call_user_func( $this->active_callback, $this ); @@ -224,7 +224,7 @@ class WP_Customize_Control { * @param string $setting_key * @return mixed The requested setting's value, if the setting exists. */ - public final function value( $setting_key = 'default' ) { + final public function value( $setting_key = 'default' ) { if ( isset( $this->settings[ $setting_key ] ) ) { return $this->settings[ $setting_key ]->value(); } @@ -270,7 +270,7 @@ class WP_Customize_Control { * * @return bool False if theme doesn't support the control or user doesn't have the required permissions, otherwise true. */ - public final function check_capabilities() { + final public function check_capabilities() { foreach ( $this->settings as $setting ) { if ( ! $setting->check_capabilities() ) return false; @@ -290,7 +290,7 @@ class WP_Customize_Control { * * @return string Contents of the control. */ - public final function get_content() { + final public function get_content() { ob_start(); $this->maybe_render(); $template = trim( ob_get_contents() ); @@ -304,7 +304,7 @@ class WP_Customize_Control { * @since 3.4.0 * @uses WP_Customize_Control::render() */ - public final function maybe_render() { + final public function maybe_render() { if ( ! $this->check_capabilities() ) return; @@ -975,7 +975,7 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control { $this->uploaded_headers = $custom_image_header->get_uploaded_header_images(); } - function print_header_image_template() { + public function print_header_image_template() { ?>