WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/26/2014 12:10:21 PM (8 years ago)
Author:
wonderboymusic
Message:

Don't make mce-view a dependency for media-audiovideo. Make media-audiovideo and wp-playlist dependencies for mce-view and only enqueue mce-view in the admin in wp_enqueue_media(). MCE views don't need to be included when media is loaded on the front end.

Fixes #27509.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r27732 r27733  
    413413    $scripts->add( 'media-views',  "/wp-includes/js/media-views$suffix.js",  array( 'utils', 'media-models', 'wp-plupload', 'jquery-ui-sortable', 'wp-mediaelement' ), false, 1 );
    414414    $scripts->add( 'media-editor', "/wp-includes/js/media-editor$suffix.js", array( 'shortcode', 'media-views' ), false, 1 );
    415     $scripts->add( 'media-audiovideo', "/wp-includes/js/media-audiovideo$suffix.js", array( 'media-editor', 'mce-view', 'wp-playlist' ), false, 1 );
    416     $scripts->add( 'mce-view', "/wp-includes/js/mce-view$suffix.js", array( 'shortcode', 'media-models' ), false, 1 );
     415    $scripts->add( 'media-audiovideo', "/wp-includes/js/media-audiovideo$suffix.js", array( 'media-editor' ), false, 1 );
     416    $scripts->add( 'mce-view', "/wp-includes/js/mce-view$suffix.js", array( 'shortcode', 'media-models', 'media-audiovideo', 'wp-playlist' ), false, 1 );
    417417
    418418    if ( is_admin() ) {
Note: See TracChangeset for help on using the changeset viewer.