Make WordPress Core

Changeset 16881


Ignore:
Timestamp:
12/12/2010 05:43:35 AM (14 years ago)
Author:
dd32
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r16706 r16881  
    15371537function iframe_header( $title = '', $limit_styles = false ) {
    15381538    show_admin_bar( false );
    1539     global $hook_suffix;
     1539    global $hook_suffix, $current_screen, $admin_body_class, $wp_locale;
     1540    $admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
     1541   
    15401542?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    15411543<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
     
    15531555addLoadEvent = 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();}}};
    15541556function tb_close(){var win=window.dialogArguments||opener||parent||top;win.tb_remove();}
     1557var userSettings = {
     1558        'url': '<?php echo SITECOOKIEPATH; ?>',
     1559        'uid': '<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>',
     1560        'time':'<?php echo time() ?>'
     1561    },
     1562    ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>',
     1563    pagenow = '<?php echo $current_screen->id; ?>',
     1564    typenow = '<?php if ( isset($current_screen->post_type) ) echo $current_screen->post_type; ?>',
     1565    adminpage = '<?php echo $admin_body_class; ?>',
     1566    thousandsSeparator = '<?php echo addslashes( $wp_locale->number_format['thousands_sep'] ); ?>',
     1567    decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>',
     1568    isRtl = <?php echo (int) is_rtl(); ?>;
    15551569//]]>
    15561570</script>
    15571571<?php
     1572do_action('admin_enqueue_scripts', $hook_suffix);
     1573do_action("admin_print_styles-$hook_suffix");
    15581574do_action('admin_print_styles');
     1575do_action("admin_print_scripts-$hook_suffix");
    15591576do_action('admin_print_scripts');
     1577do_action("admin_head-$hook_suffix");
    15601578do_action('admin_head');
    1561 
    1562 $admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
    15631579?>
    15641580</head>
Note: See TracChangeset for help on using the changeset viewer.