mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-06 21:54:28 +00:00
Media: Restore 3.4 editor behavior and remove TinyMCE views.
* Reactivates the `wpgallery` and `wpeditimage` TinyMCE plugins. Deactivates the `wpviews` TinyMCE plugin. * Moves still-relevant logic from `mce-views.js` to `media-upload.js` and `shortcode.js`. * No longer include `wp-includes/js/mce-views.js`. This code will not be used in 3.5, and should be considered unstable. * Currently, this is the real 3.4 experience; as such, editing triggers the old modals. Changing this is the next major step. When reassessing views, we should look over all of these tickets and anticipate these bugs accordingly. fixes #21813, #22123, #22155, #22161, #22257, #22266, #22318, #22407, see #21390. git-svn-id: https://develop.svn.wordpress.org/trunk@22567 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -298,7 +298,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
'type' => 'characters' == _x( 'words', 'word count: words or characters?' ) ? 'c' : 'w',
|
||||
) );
|
||||
|
||||
$scripts->add( 'media-upload', "/wp-admin/js/media-upload$suffix.js", array( 'thickbox', 'mce-view', 'media-views' ), false, 1 );
|
||||
$scripts->add( 'media-upload', "/wp-admin/js/media-upload$suffix.js", array( 'thickbox', 'shortcode', 'media-views' ), false, 1 );
|
||||
|
||||
$scripts->add( 'hoverIntent', "/wp-includes/js/hoverIntent$suffix.js", array('jquery'), 'r6', 1 );
|
||||
|
||||
@@ -326,10 +326,6 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->add( 'media-views', "/wp-includes/js/media-views$suffix.js", array( 'media-models', 'wp-plupload' ), false, 1 );
|
||||
$scripts->add( 'shortcode', "/wp-includes/js/shortcode$suffix.js", array( 'underscore' ), false, 1 );
|
||||
$scripts->add( 'mce-view', "/wp-includes/js/mce-view$suffix.js", array( 'shortcode', 'media-models' ), false, 1 );
|
||||
did_action( 'init' ) && $scripts->localize( 'mce-view', '_wpMceViewL10n', array(
|
||||
'contentWidth' => isset( $GLOBALS['content_width'] ) ? $GLOBALS['content_width'] : 800,
|
||||
'editGallery' => __( 'Edit Gallery' ),
|
||||
) );
|
||||
|
||||
if ( is_admin() ) {
|
||||
$scripts->add( 'ajaxcat', "/wp-admin/js/cat$suffix.js", array( 'wp-lists' ) );
|
||||
|
||||
Reference in New Issue
Block a user