iframe_header() - WordPress 函数参考中文文档

返回介绍

iframe_header()

发布于 2017-09-11 字数5316 浏览 872 评论 0

iframe_header( string $title = '',  bool $deprecated = false )

Generic Iframe header for use with Thickbox


描述


参数

$title
(string)
(Optional)
Title of the Iframe page.

Default value: ”

$deprecated
(bool)
(Optional)
Not used.

Default value: false


源代码

File: wp-admin/includes/template.php

function iframe_header( $title = '', $deprecated = false ) {
	show_admin_bar( false );
	global $hook_suffix, $admin_body_class, $wp_locale;
	$admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);

	$current_screen = get_current_screen();

	@header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
	_wp_admin_html_begin();
?>
<title><?php bloginfo('name') ?> &rsaquo; <?php echo $title ?> — <?php _e('WordPress'); ?></title>
<?php
wp_enqueue_style( 'colors' );
?>
<script type="text/javascript">
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 ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>',
	pagenow = '<?php echo $current_screen->id; ?>',
	typenow = '<?php 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
/** This action is documented in wp-admin/admin-header.php */
do_action( 'admin_enqueue_scripts', $hook_suffix );

/** This action is documented in wp-admin/admin-header.php */
do_action( "admin_print_styles-$hook_suffix" );

/** This action is documented in wp-admin/admin-header.php */
do_action( 'admin_print_styles' );

/** This action is documented in wp-admin/admin-header.php */
do_action( "admin_print_scripts-$hook_suffix" );

/** This action is documented in wp-admin/admin-header.php */
do_action( 'admin_print_scripts' );

/** This action is documented in wp-admin/admin-header.php */
do_action( "admin_head-$hook_suffix" );

/** This action is documented in wp-admin/admin-header.php */
do_action( 'admin_head' );

$admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_locale() ) ) );

if ( is_rtl() )
	$admin_body_class .= ' rtl';

?>
</head>
<?php
/** This filter is documented in wp-admin/admin-header.php */
$admin_body_classes = apply_filters( 'admin_body_class', '' );
?>
<body<?php
/**
 * @global string $body_id
 */
if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?> class="wp-admin wp-core-ui no-js iframe <?php echo $admin_body_classes . ' ' . $admin_body_class; ?>">
<script type="text/javascript">
(function(){
var c = document.body.className;
c = c.replace(/no-js/, 'js');
document.body.className = c;
})();
</script>
<?php
}

更新日志

Version 描述
2.7.0 Introduced.

相关函数

Uses

    • wp-includes/l10n.php:
      get_user_locale()
    • wp-admin/includes/screen.php:
      get_current_screen()
    • wp-admin/includes/template.php:
      _wp_admin_html_begin()
    • wp-admin/admin-header.php:
      admin_enqueue_scripts
    • wp-admin/admin-header.php:
      admin_print_styles-{$hook_suffix}
    • wp-admin/admin-header.php:
      admin_print_styles
    • wp-admin/admin-header.php:
      admin_print_scripts-{$hook_suffix}
    • wp-admin/admin-header.php:
      admin_print_scripts
    • wp-admin/admin-header.php:
      admin_head-{$hook_suffix}
    • wp-admin/admin-header.php:
      admin_head
    • wp-admin/admin-header.php:
      admin_body_class
    • wp-includes/l10n.php:
      _e()
    • wp-includes/formatting.php:
      sanitize_html_class()
    • wp-includes/general-template.php:
      bloginfo()
    • wp-includes/l10n.php:
      is_rtl()
    • wp-includes/link-template.php:
      admin_url()
    • wp-includes/functions.wp-styles.php:
      wp_enqueue_style()
    • wp-includes/admin-bar.php:
      show_admin_bar()
    • wp-includes/plugin.php:
      do_action()
    • wp-includes/plugin.php:
      apply_filters()
    • wp-includes/option.php:
      get_option()

Show 16 more uses
Hide more uses


Used By

  • wp-admin/includes/theme-install.php:
    install_theme_information()
  • wp-admin/includes/plugin-install.php:
    install_plugin_information()

User Contributed Notes

上一篇:iframe_footer()

下一篇:iis7_add_rewrite_rule()

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!