Include Javascript Global variables in iframe_header(); Add extra style/script actions which are missing from iframe_header() to bring it inline with admin-header.php. Fixes #15781
git-svn-id: https://develop.svn.wordpress.org/trunk@16881 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
619a8a8cff
commit
81e923a291
@ -1536,7 +1536,9 @@ function _admin_search_query() {
|
||||
*/
|
||||
function iframe_header( $title = '', $limit_styles = false ) {
|
||||
show_admin_bar( false );
|
||||
global $hook_suffix;
|
||||
global $hook_suffix, $current_screen, $admin_body_class, $wp_locale;
|
||||
$admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
|
||||
|
||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
|
||||
<head>
|
||||
@ -1552,14 +1554,28 @@ wp_enqueue_style( 'colors' );
|
||||
//<![CDATA[
|
||||
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
|
||||
function tb_close(){var win=window.dialogArguments||opener||parent||top;win.tb_remove();}
|
||||
var userSettings = {
|
||||
'url': '<?php echo SITECOOKIEPATH; ?>',
|
||||
'uid': '<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>',
|
||||
'time':'<?php echo time() ?>'
|
||||
},
|
||||
ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>',
|
||||
pagenow = '<?php echo $current_screen->id; ?>',
|
||||
typenow = '<?php if ( isset($current_screen->post_type) ) echo $current_screen->post_type; ?>',
|
||||
adminpage = '<?php echo $admin_body_class; ?>',
|
||||
thousandsSeparator = '<?php echo addslashes( $wp_locale->number_format['thousands_sep'] ); ?>',
|
||||
decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>',
|
||||
isRtl = <?php echo (int) is_rtl(); ?>;
|
||||
//]]>
|
||||
</script>
|
||||
<?php
|
||||
do_action('admin_enqueue_scripts', $hook_suffix);
|
||||
do_action("admin_print_styles-$hook_suffix");
|
||||
do_action('admin_print_styles');
|
||||
do_action("admin_print_scripts-$hook_suffix");
|
||||
do_action('admin_print_scripts');
|
||||
do_action("admin_head-$hook_suffix");
|
||||
do_action('admin_head');
|
||||
|
||||
$admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
|
||||
?>
|
||||
</head>
|
||||
<body<?php if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?> class="no-js <?php echo $admin_body_class; ?>">
|
||||
|
Loading…
Reference in New Issue
Block a user