From 0f259eaae1322790a5f27e5cb77a6493b166e6a0 Mon Sep 17 00:00:00 2001 From: nacin Date: Wed, 23 May 2012 21:21:29 +0000 Subject: [PATCH] Remove temporary magic call method in favor of theme(), settings(), controls(), and sections() methods for WP_Customize_Manager. fixes #20736. git-svn-id: http://core.svn.wordpress.org/trunk@20860 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-customize-manager.php | 40 +++++++++++++++++++--- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/wp-includes/class-wp-customize-manager.php b/wp-includes/class-wp-customize-manager.php index 68bacc4ba..0c35df0b5 100644 --- a/wp-includes/class-wp-customize-manager.php +++ b/wp-includes/class-wp-customize-manager.php @@ -144,15 +144,47 @@ final class WP_Customize_Manager { } /** - * Generic getter. + * Get the theme being customized. * * @since 3.4.0 * * @return WP_Theme */ - public function __call( $callee, $args ) { - if ( in_array( $callee, array( 'theme', 'settings', 'controls', 'sections' ) ) ) - return $this->$callee; + public function theme() { + return $this->theme; + } + + /** + * Get the registered settings. + * + * @since 3.4.0 + * + * @return array + */ + public function settings() { + return $this->settings; + } + + /** + * Get the registered controls. + * + * @since 3.4.0 + * + * @return array + */ + public function controls() { + return $this->controls; + } + + /** + * Get the registered sections. + * + * @since 3.4.0 + * + * @return array + */ + public function sections() { + return $this->sections; } /**