iframe_header [ WordPress Function ]
iframe_header ( $title = '', $limit_styles = false )
| Parameters: |
|
| Defined at: |
|
Generic Iframe header for use with Thickbox
Source
<?php
function iframe_header( $title = '', $limit_styles = false ) {
show_admin_bar( false );
global $hook_suffix, $current_user, $admin_body_class, $wp_locale;
$admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
$current_screen = get_current_screen();
_wp_admin_html_begin();
?>
<title><?php bloginfo('name') ?> › <?php echo $title ?> — <?php _e('WordPress'); ?></title>
<?php
wp_enqueue_style( 'colors' );
?>
<script type="text/javascript">
//<![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', '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
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 .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
?>
</head>
<body<?php if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?> class="wp-admin no-js iframe <?php echo apply_filters( 'admin_body_class', '' ) . ' ' . $admin_body_class; ?>">
<script type="text/javascript">
//<![CDATA[
(function(){
var c = document.body.className;
c = c.replace(/no-js/, 'js');
document.body.className = c;
})();
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- iframe_header | A HitchHackers guide through WordPress
Feb 12, 2011 ... function iframe_header( $title = '', $limit_styles = false ) { show_admin_bar( false ) ; global $hook_suffix, $current_screen, $current_user, ...
hitchhackerguide.com - iframe_header
Dramatic AquaScapes. aquarium and semi-aquatic background designs beyond the traditional. welcome to.
www.dramaticaquascapes.com - javascript - Insert a Script into a iFrame's Header, without clearing ...
var headID = document.getElementsByTagName("head")[0]; var newScript = document.createElement('script'); newScript.type = 'text/javascript'; ...
stackoverflow.com - Iframe And Browser History - Do only what matters
Apr 19, 2012 ... var iframeHeaderCell = document.getElementById('wheretoputheiframe'); var dynamicURL = 'http://...' //your url var iframeHeader = document.
khaidoan.wikidot.com