mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
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. Built from https://develop.svn.wordpress.org/trunk@25443 git-svn-id: http://core.svn.wordpress.org/trunk@25364 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9414d6e40e
commit
0fbb5a32ef
@ -111,8 +111,12 @@ function wp_deregister_script( $handle ) {
|
||||
$wp_scripts = new WP_Scripts();
|
||||
}
|
||||
|
||||
// Do not allow accidental or negligent deregistering of critical scripts in the admin. Show minimal remorse if the correct hook is used.
|
||||
if ( is_admin() && 'admin_enqueue_scripts' !== current_filter() ) {
|
||||
// Do not allow accidental or negligent deregistering of critical scripts in the admin.
|
||||
// Show minimal remorse if the correct hook is used.
|
||||
$current_filter = current_filter();
|
||||
if ( ( is_admin() && 'admin_enqueue_scripts' !== $current_filter ) ||
|
||||
( 'wp-login.php' === $GLOBALS['pagenow'] && 'login_enqueue_scripts' !== $current_filter )
|
||||
) {
|
||||
$no = array(
|
||||
'jquery', 'jquery-core', 'jquery-migrate', 'jquery-ui-core', 'jquery-ui-accordion',
|
||||
'jquery-ui-autocomplete', 'jquery-ui-button', 'jquery-ui-datepicker', 'jquery-ui-dialog',
|
||||
|
Loading…
Reference in New Issue
Block a user