WordPress.org

Make WordPress Core

Changeset 25443


Ignore:
Timestamp:
09/14/2013 08:20:46 PM (7 years ago)
Author:
nacin
Message:

Don't allow critical scripts to be deregistered on wp-login.php, just as we do in the rest of the admin.

props atimmer.
fixes #25017.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.wp-scripts.php

    r23659 r25443  
    112112    }
    113113
    114     // Do not allow accidental or negligent deregistering of critical scripts in the admin. Show minimal remorse if the correct hook is used.
    115     if ( is_admin() && 'admin_enqueue_scripts' !== current_filter() ) {
     114    // Do not allow accidental or negligent deregistering of critical scripts in the admin.
     115    // Show minimal remorse if the correct hook is used.
     116    $current_filter = current_filter();
     117    if ( ( is_admin() && 'admin_enqueue_scripts' !== $current_filter ) ||
     118        ( 'wp-login.php' === $GLOBALS['pagenow'] && 'login_enqueue_scripts' !== $current_filter )
     119    ) {
    116120        $no = array(
    117121            'jquery', 'jquery-core', 'jquery-migrate', 'jquery-ui-core', 'jquery-ui-accordion',
Note: See TracChangeset for help on using the changeset viewer.