Make WordPress Core

Changeset 27525


Ignore:
Timestamp:
03/13/2014 07:40:15 PM (11 years ago)
Author:
ocean90
Message:

Widget Customizer: Move style/script registration to script loader. Update Gruntfile.js.

fixes #27356.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Gruntfile.js

    r27446 r27525  
    116116        cssmin: {
    117117            options: {
    118                 'wp-admin': ['wp-admin', 'color-picker', 'customize-controls', 'ie', 'install', 'login', 'deprecated-*']
     118                'wp-admin': ['wp-admin', 'color-picker', 'customize-controls', 'customize-widgets', 'ie', 'install', 'login', 'deprecated-*']
    119119            },
    120120            core: {
  • trunk/src/wp-includes/class-wp-customize-widgets.php

    r27524 r27525  
    458458     */
    459459    static function customize_controls_enqueue_deps() {
    460         wp_enqueue_script( 'jquery-ui-sortable' );
    461         wp_enqueue_script( 'jquery-ui-droppable' );
    462         wp_enqueue_style(
    463             'widget-customizer',
    464             admin_url( 'css/customize-widgets.css' )
    465         );
    466         wp_enqueue_script(
    467             'widget-customizer',
    468             admin_url( 'js/customize-widgets.js' ),
    469             array( 'jquery', 'wp-backbone', 'wp-util', 'customize-controls' )
    470         );
     460        wp_enqueue_style( 'customize-widgets' );
     461        wp_enqueue_script( 'customize-widgets' );
    471462
    472463        // Export available widgets with control_tpl removed from model
     
    534525
    535526        $wp_scripts->add_data(
    536             'widget-customizer',
     527            'customize-widgets',
    537528            'data',
    538529            sprintf( 'var WidgetCustomizer_exports = %s;', json_encode( $exports ) )
  • trunk/src/wp-includes/script-loader.php

    r27515 r27525  
    378378        'allowedFiles' => __( 'Allowed Files' ),
    379379    ) );
     380
     381    $scripts->add( 'customize-widgets', "/wp-admin/js/customize-widgets$suffix.js", array( 'jquery', 'jquery-ui-sortable', 'jquery-ui-droppable', 'wp-backbone', 'customize-controls' ), false, 1 );
    380382
    381383    $scripts->add( 'accordion', "/wp-admin/js/accordion$suffix.js", array( 'jquery' ), false, 1 );
     
    592594    $styles->add( 'wp-color-picker',    "/wp-admin/css/color-picker$suffix.css" );
    593595    $styles->add( 'customize-controls', "/wp-admin/css/customize-controls$suffix.css", array( 'wp-admin', 'colors', 'ie', 'imgareaselect' ) );
     596    $styles->add( 'customize-widgets',  "/wp-admin/css/customize-widgets$suffix.css", array( 'wp-admin', 'colors' ) );
    594597    $styles->add( 'ie',                 "/wp-admin/css/ie$suffix.css" );
    595598
     
    624627    $rtl_styles = array(
    625628        // wp-admin
    626         'wp-admin', 'install', 'wp-color-picker', 'customize-controls', 'ie',
     629        'wp-admin', 'install', 'wp-color-picker', 'customize-controls', 'customize-widgets', 'ie',
    627630        // wp-includes
    628631        'buttons', 'admin-bar', 'wp-auth-check', 'editor-buttons', 'media-views', 'wp-pointer',
Note: See TracChangeset for help on using the changeset viewer.