WordPress.org

Make WordPress Core

Changeset 32125


Ignore:
Timestamp:
04/14/2015 03:30:16 PM (4 years ago)
Author:
wonderboymusic
Message:

Move the built media JS files up a directory to their previous location and naming convention. This fidgets with part of [31373] and will maintain BC for those who were loading those files directly (not using the enqueue system).

Props iseulde, ocean90.
Fixes #31912.

Location:
trunk
Files:
4 edited
5 moved

Legend:

Unmodified
Added
Removed
  • trunk/Gruntfile.js

    r32066 r32125  
    55        BUILD_DIR = 'build/',
    66        mediaConfig = {},
    7         mediaBuilds = ['audio-video', 'grid', 'models', 'views'];
     7        mediaBuilds = ['audiovideo', 'grid', 'models', 'views'];
    88
    99    // Load tasks.
     
    1313
    1414    mediaBuilds.forEach( function ( build ) {
    15         var path = SOURCE_DIR + 'wp-includes/js/media/';
     15        var path = SOURCE_DIR + 'wp-includes/js/media';
    1616        mediaConfig[ build ] = { files : {} };
    17         mediaConfig[ build ].files[ path + build + '.js' ] = [ path + build + '.manifest.js' ];
     17        mediaConfig[ build ].files[ path + '-' + build + '.js' ] = [ path + '/' + build + '.manifest.js' ];
    1818    } );
    1919
     
    6363                        src: [
    6464                            '**',
     65                            '!wp-includes/js/media/**',
    6566                            '!**/.{svn,git}/**', // Ignore version control directories.
    6667                            // Ignore unminified versions of external libs we don't ship:
     
    273274                    browserify: true
    274275                },
    275                 expand: true,
    276                 cwd: SOURCE_DIR,
    277                 src: [
    278                     'wp-includes/js/media/**/*.js',
    279                     '!wp-includes/js/media/*.js',
    280                     'wp-includes/js/media/*.manifest.js'
     276                src: [
     277                    SOURCE_DIR + 'wp-includes/js/media/**/*.js'
    281278                ]
    282279            },
     
    287284                    'wp-admin/js/*.js',
    288285                    'wp-includes/js/*.js',
     286                    // Built scripts.
     287                    '!wp-includes/js/media-*',
    289288                    // WordPress scripts inside directories
    290289                    'wp-includes/js/jquery/jquery.table-hotkeys.js',
     
    629628        'cssmin:rtl',
    630629        'cssmin:colors',
    631         'browserify',
    632630        'uglify:core',
    633         'uglify:media',
    634631        'uglify:jqueryui',
    635632        'concat:tinymce',
  • trunk/src/wp-admin/includes/update-core.php

    r31405 r32125  
    695695'wp-includes/js/jquery/ui/jquery.ui.tooltip.min.js',
    696696'wp-includes/js/jquery/ui/jquery.ui.widget.min.js',
    697 'wp-includes/js/tinymce/skins/wordpress/images/dashicon-no-alt.png',
    698 // 4.2
    699 'wp-includes/js/media-audiovideo.js',
    700 'wp-includes/js/media-audiovideo.min.js',
    701 'wp-includes/js/media-grid.js',
    702 'wp-includes/js/media-grid.min.js',
    703 'wp-includes/js/media-models.js',
    704 'wp-includes/js/media-models.min.js',
    705 'wp-includes/js/media-views.js',
    706 'wp-includes/js/media-views.min.js',
     697'wp-includes/js/tinymce/skins/wordpress/images/dashicon-no-alt.png'
    707698);
    708699
  • trunk/src/wp-includes/css/media-views.css

    r32121 r32125  
    740740    margin-right: 2%;
    741741    max-width: 42%;
     742    max-width: -webkit-calc(48% - 12px);
    742743    max-width: calc(48% - 12px);
    743744}
  • trunk/src/wp-includes/script-loader.php

    r31994 r32125  
    411411
    412412    $scripts->add( 'shortcode', "/wp-includes/js/shortcode$suffix.js", array( 'underscore' ), false, 1 );
    413     $scripts->add( 'media-models', "/wp-includes/js/media/models$suffix.js", array( 'wp-backbone' ), false, 1 );
     413    $scripts->add( 'media-models', "/wp-includes/js/media-models$suffix.js", array( 'wp-backbone' ), false, 1 );
    414414    did_action( 'init' ) && $scripts->localize( 'media-models', '_wpMediaModelsL10n', array(
    415415        'settings' => array(
     
    421421    // To enqueue media-views or media-editor, call wp_enqueue_media().
    422422    // Both rely on numerous settings, styles, and templates to operate correctly.
    423     $scripts->add( 'media-views',  "/wp-includes/js/media/views$suffix.js",  array( 'utils', 'media-models', 'wp-plupload', 'jquery-ui-sortable', 'wp-mediaelement' ), false, 1 );
     423    $scripts->add( 'media-views',  "/wp-includes/js/media-views$suffix.js",  array( 'utils', 'media-models', 'wp-plupload', 'jquery-ui-sortable', 'wp-mediaelement' ), false, 1 );
    424424    $scripts->add( 'media-editor', "/wp-includes/js/media-editor$suffix.js", array( 'shortcode', 'media-views' ), false, 1 );
    425     $scripts->add( 'media-audiovideo', "/wp-includes/js/media/audio-video$suffix.js", array( 'media-editor' ), false, 1 );
     425    $scripts->add( 'media-audiovideo', "/wp-includes/js/media-audiovideo$suffix.js", array( 'media-editor' ), false, 1 );
    426426    $scripts->add( 'mce-view', "/wp-includes/js/mce-view$suffix.js", array( 'shortcode', 'media-models', 'media-audiovideo', 'wp-playlist' ), false, 1 );
    427427
     
    557557        $scripts->add( 'list-revisions', "/wp-includes/js/wp-list-revisions$suffix.js" );
    558558
    559         $scripts->add( 'media-grid', "/wp-includes/js/media/grid$suffix.js", array( 'media-editor' ), false, 1 );
     559        $scripts->add( 'media-grid', "/wp-includes/js/media-grid$suffix.js", array( 'media-editor' ), false, 1 );
    560560        $scripts->add( 'media', "/wp-admin/js/media$suffix.js", array( 'jquery' ), false, 1 );
    561561        did_action( 'init' ) && $scripts->localize( 'media', 'attachMediaBoxL10n', array(
Note: See TracChangeset for help on using the changeset viewer.