WordPress.org

Make WordPress Core

Changeset 37974


Ignore:
Timestamp:
07/05/2016 03:36:43 PM (4 years ago)
Author:
swissspidy
Message:

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.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/index.php

    r37680 r37974  
    1818if ( current_user_can( 'edit_theme_options' ) )
    1919    wp_enqueue_script( 'customize-loader' );
    20 if ( current_user_can( 'install_plugins' ) )
     20if ( current_user_can( 'install_plugins' ) ) {
    2121    wp_enqueue_script( 'plugin-install' );
     22    wp_enqueue_script( 'updates' );
     23}
    2224if ( current_user_can( 'upload_files' ) )
    2325    wp_enqueue_script( 'media-upload' );
  • trunk/src/wp-admin/js/updates.js

    r37973 r37974  
    21122112            $.support.postMessage = !! window.postMessage;
    21132113
    2114             if ( false === $.support.postMessage || null === target ) {
     2114            if ( false === $.support.postMessage || null === target || -1 !== window.parent.location.pathname.indexOf( 'index.php' ) ) {
    21152115                return;
    21162116            }
Note: See TracChangeset for help on using the changeset viewer.