Make WordPress Core


Ignore:
Timestamp:
03/24/2012 01:02:29 AM (14 years ago)
Author:
koopersmith
Message:

Theme Customizer: Add WP_Customizer_Setting->control_params, and wp.customize.Control.params to allow settings to pass arbitrary parameters to controls. Add the 'context' parameter to wp.customize.UploadControl. see #19910.

File:
1 edited

Legend:

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

    r20274 r20276  
    535535        // With custom value
    536536        $this->add_setting( 'header_image', array(
    537             'label'   => 'Header Image',
    538             'section' => 'header',
    539             'control' => 'upload',
    540             'default' => get_theme_support( 'custom-header', 'default-image' ),
     537            'label'          => 'Header Image',
     538            'section'        => 'header',
     539            'control'        => 'upload',
     540            'default'        => get_theme_support( 'custom-header', 'default-image' ),
     541            'control_params' => array(
     542                'context'        => 'custom-header',
     543            ),
    541544        ) );
    542545
     
    559562
    560563        $this->add_setting( 'background_image', array(
    561             'label'   => 'Background Image',
    562             'section' => 'background',
    563             'control' => 'upload',
    564             'default' => get_theme_support( 'custom-background', 'default-image' ),
     564            'label'          => 'Background Image',
     565            'section'        => 'background',
     566            'control'        => 'upload',
     567            'default'        => get_theme_support( 'custom-background', 'default-image' ),
     568            'control_params' => array(
     569                'context'        => 'custom-background',
     570            ),
    565571        ) );
    566572
Note: See TracChangeset for help on using the changeset viewer.