mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 21:00:21 +00:00
Customize: Fix PHP notice when calling WP_Customize_Control::json() inside content_template() method.
A `temp` control is instantiated when `WP_Customize_Manager:: render_control_templates()` is called. This control needs to explicitly specify an empty settings array to avoid trying to use a `temp` setting which won't exist. See #35926. See #29572. git-svn-id: https://develop.svn.wordpress.org/trunk@36776 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1401,7 +1401,9 @@ final class WP_Customize_Manager {
|
||||
*/
|
||||
public function render_control_templates() {
|
||||
foreach ( $this->registered_control_types as $control_type ) {
|
||||
$control = new $control_type( $this, 'temp', array() );
|
||||
$control = new $control_type( $this, 'temp', array(
|
||||
'settings' => array(),
|
||||
) );
|
||||
$control->print_template();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user