Update/Install: Fix plugin updates from the details modal on the Dashboard.

The plugin details modal has been greatly improved in [37714]. However, Shiny Updates aren't yet implemented on the Dashboard. Therefore, we need to fall back to The Bleak Screen of Sadness. Otherwise nothing happens when trying to install an update from inside the modal.

Fixes #37131. See #37126.
Built from https://develop.svn.wordpress.org/trunk@37974


git-svn-id: http://core.svn.wordpress.org/trunk@37915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Pascal Birchler 2016-07-05 15:37:28 +00:00
parent 600e511533
commit f2c4003dde
4 changed files with 6 additions and 4 deletions

View File

@ -17,8 +17,10 @@ wp_dashboard_setup();
wp_enqueue_script( 'dashboard' );
if ( current_user_can( 'edit_theme_options' ) )
wp_enqueue_script( 'customize-loader' );
if ( current_user_can( 'install_plugins' ) )
if ( current_user_can( 'install_plugins' ) ) {
wp_enqueue_script( 'plugin-install' );
wp_enqueue_script( 'updates' );
}
if ( current_user_can( 'upload_files' ) )
wp_enqueue_script( 'media-upload' );
add_thickbox();

View File

@ -2111,7 +2111,7 @@
$.support.postMessage = !! window.postMessage;
if ( false === $.support.postMessage || null === target ) {
if ( false === $.support.postMessage || null === target || -1 !== window.parent.location.pathname.indexOf( 'index.php' ) ) {
return;
}

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.6-beta1-37973';
$wp_version = '4.6-beta1-37974';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.