WordPress.org

Make WordPress Core

Changeset 20274


Ignore:
Timestamp:
03/23/2012 10:43:00 PM (8 years ago)
Author:
koopersmith
Message:

Theme Customizer: Change 'Random Image' control to be a proper 'Header Image' control. First step to integrating header images. see #19910.

Location:
trunk/wp-includes
Files:
2 edited

Legend:

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

    r20266 r20274  
    535535        // With custom value
    536536        $this->add_setting( 'header_image', array(
    537             'label'   => 'Random Image',
     537            'label'   => 'Header Image',
    538538            'section' => 'header',
    539             'control' => 'checkbox',
    540              // @todo
    541              // not the default, it's the value.
    542              // value is saved in get_theme_support( 'custom-header', 'random-default' )
    543             'default' => 'random-default-image'
     539            'control' => 'upload',
     540            'default' => get_theme_support( 'custom-header', 'default-image' ),
    544541        ) );
    545542
  • trunk/wp-includes/js/customize-controls.dev.js

    r20263 r20274  
    279279            control.uploader.param( 'post_data[context]', 'custom-background' );
    280280        });
     281
     282        api( 'header_image', function( control ) {
     283            control.uploader.param( 'post_data[context]', 'custom-header' );
     284        });
    281285    });
    282286
Note: See TracChangeset for help on using the changeset viewer.