Make WordPress Core

Changeset 36776


Ignore:
Timestamp:
02/29/2016 07:02:24 AM (9 years ago)
Author:
westonruter
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-manager.php

    r36772 r36776  
    14021402    public function render_control_templates() {
    14031403        foreach ( $this->registered_control_types as $control_type ) {
    1404             $control = new $control_type( $this, 'temp', array() );
     1404            $control = new $control_type( $this, 'temp', array(
     1405                'settings' => array(),
     1406            ) );
    14051407            $control->print_template();
    14061408        }
Note: See TracChangeset for help on using the changeset viewer.