返回介绍

iframe_header()

发布于 2017-09-11 00:56:26 字数 5317 浏览 988 评论 0 收藏 0

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

Generic Iframe header for use with Thickbox


description


参数

$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') ?> › <?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
}

更新日志

Versiondescription
2.7.0Introduced.

相关函数

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文