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
This commit is contained in:
nacin 2012-05-23 21:21:29 +00:00
parent b36c335b7a
commit 0f259eaae1
1 changed files with 36 additions and 4 deletions

View File

@ -144,15 +144,47 @@ final class WP_Customize_Manager {
} }
/** /**
* Generic getter. * Get the theme being customized.
* *
* @since 3.4.0 * @since 3.4.0
* *
* @return WP_Theme * @return WP_Theme
*/ */
public function __call( $callee, $args ) { public function theme() {
if ( in_array( $callee, array( 'theme', 'settings', 'controls', 'sections' ) ) ) return $this->theme;
return $this->$callee; }
/**
* 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;
} }
/** /**