Make WordPress Core

Changeset 21016


Ignore:
Timestamp:
06/07/2012 01:29:57 AM (13 years ago)
Author:
ryan
Message:

Namespace the customize request arg to prevent collision with plugins and themes. Props nacin. fixes #20862

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/js/customize-controls.dev.js

    r21014 r21016  
    587587            query: function() {
    588588                return {
    589                     customize: 'on',
    590                     theme:      api.settings.theme.stylesheet,
    591                     customized: JSON.stringify( api.get() )
     589                    wp_customize: 'on',
     590                    theme:        api.settings.theme.stylesheet,
     591                    customized:   JSON.stringify( api.get() )
    592592                };
    593593            },
  • trunk/wp-includes/js/customize-loader.dev.js

    r21014 r21016  
    5555            var hash = window.location.toString().split('#')[1];
    5656
    57             if ( hash && 0 === hash.indexOf( 'customize=on' ) )
     57            if ( hash && 0 === hash.indexOf( 'wp_customize=on' ) )
    5858                Loader.open( Loader.settings.url + '?' + hash );
    5959
     
    105105                history.pushState( { customize: src }, '', src );
    106106            else if ( ! $.support.history && $.support.hashchange && hash )
    107                 window.location.hash = 'customize=on&' + hash;
     107                window.location.hash = 'wp_customize=on&' + hash;
    108108
    109109            this.trigger( 'open' );
  • trunk/wp-includes/theme.php

    r21014 r21016  
    15791579 * Includes and instantiates the WP_Customize_Manager class.
    15801580 *
    1581  * Fires when ?customize=on.
     1581 * Fires when ?wp_customize=on or on wp-admin/customize.php.
    15821582 *
    15831583 * @since 3.4.0
    15841584 */
    15851585function _wp_customize_include() {
    1586     // Load on themes.php or ?customize=on
    1587     if ( ! ( ( isset( $_REQUEST['customize'] ) && 'on' == $_REQUEST['customize'] ) || 'customize.php' == basename( $_SERVER['PHP_SELF'] ) ) )
     1586    if ( ! ( ( isset( $_REQUEST['wp_customize'] ) && 'on' == $_REQUEST['wp_customize'] )
     1587        || ( is_admin() && 'customize.php' == basename( $_SERVER['PHP_SELF'] ) )
     1588    ) )
    15881589        return;
    15891590
Note: See TracChangeset for help on using the changeset viewer.