Fire wp_auth_check_load() from admin_enqueue_scripts instead of admin_init so that it can access the current screen object.

Black list the update and upgrade screens.

Allow plugins to white/black list screens via the wp_auth_check_load filter.

Props nacin

see #23295


git-svn-id: http://core.svn.wordpress.org/trunk@24738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Ryan Boren
2013-07-18 19:06:35 +00:00
parent e66153a110
commit cbf77c6523
3 changed files with 35 additions and 35 deletions

View File

@@ -85,17 +85,16 @@
}
$( document ).on( 'heartbeat-tick.wp-auth-check', function( e, data ) {
if ( data['wp-auth-check'] ) {
if ( 'wp-auth-check' in data ) {
schedule();
if ( data['wp-auth-check'] == 'show' && wrap.hasClass('hidden') )
if ( ! data['wp-auth-check'] && wrap.hasClass('hidden') )
show();
else if ( data['wp-auth-check'] != 'show' && ! wrap.hasClass('hidden') )
else if ( data['wp-auth-check'] && ! wrap.hasClass('hidden') )
hide();
}
}).on( 'heartbeat-send.wp-auth-check', function( e, data ) {
if ( ( new Date() ).getTime() > next )
data['wp-auth-check'] = 1;
data['wp-auth-check'] = true;
}).ready( function() {
schedule();
wrap = $('#wp-auth-check-wrap');