Remove temporary magic call method in favor of theme(), settings(), controls(), and sections() methods for WP_Customize_Manager. fixes #20736.
git-svn-id: https://develop.svn.wordpress.org/trunk@20860 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
50517b8e53
commit
11594ad693
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue