Title: iframe_header
Published: April 25, 2014
Last modified: August 20, 2026

---

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

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/iframe_header/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/functions/iframe_header/?output_format=md#source)
 * [Hooks](https://developer.wordpress.org/reference/functions/iframe_header/?output_format=md#hooks)
 * [Related](https://developer.wordpress.org/reference/functions/iframe_header/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/iframe_header/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/iframe_header/?output_format=md#wp--skip-link--target)

Generic Iframe header for use with Thickbox.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/iframe_header/?output_format=md#parameters)󠁿

 `$title`stringoptional

Title of the Iframe page.

Default:`''`

`$deprecated`booloptional

Not used.

Default:`false`

## 󠀁[Source](https://developer.wordpress.org/reference/functions/iframe_header/?output_format=md#source)󠁿

    ```php
    function iframe_header( $title = '', $deprecated = false ) {
    	global $hook_suffix, $admin_body_class, $body_id, $wp_locale;

    	show_admin_bar( false );

    	$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; ?> &#8212; <?php _e( 'WordPress' ); ?></title>
    	<?php
    	wp_enqueue_style( 'colors' );
    	?>
    <script>
    addLoadEvent = function(func){if(typeof jQuery!=='undefined')jQuery(function(){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 esc_js( admin_url( 'admin-ajax.php', 'relative' ) ); ?>',
    	pagenow = '<?php echo esc_js( $current_screen->id ); ?>',
    	typenow = '<?php echo esc_js( $current_screen->post_type ); ?>',
    	adminpage = '<?php echo esc_js( $admin_body_class ); ?>',
    	thousandsSeparator = '<?php echo esc_js( $wp_locale->number_format['thousands_sep'] ); ?>',
    	decimalPoint = '<?php echo esc_js( $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}" );  // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores

    	/** 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}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores

    	/** 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}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores

    	/** 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() ) ) );
    	$admin_body_class .= ' admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'modern' );

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

    	?>
    </head>
    	<?php
    	$admin_body_id = isset( $body_id ) ? 'id="' . $body_id . '" ' : '';

    	/** This filter is documented in wp-admin/admin-header.php */
    	$admin_body_classes = apply_filters( 'admin_body_class', '' );
    	$admin_body_classes = ltrim( $admin_body_classes . ' ' . $admin_body_class );
    	?>
    <body <?php echo $admin_body_id; ?>class="wp-admin wp-core-ui no-js iframe <?php echo esc_attr( $admin_body_classes ); ?>">
    <script>
    (function(){
    var c = document.body.className;
    c = c.replace(/no-js/, 'js');
    document.body.className = c;
    })();
    </script>
    	<?php
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/template.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-admin/includes/template.php#L2128)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-admin/includes/template.php#L2128-L2202)

## 󠀁[Hooks](https://developer.wordpress.org/reference/functions/iframe_header/?output_format=md#hooks)󠁿

 [apply_filters( ‘admin_body_class’, string $classes )](https://developer.wordpress.org/reference/hooks/admin_body_class/)

Filters the CSS classes for the body tag in the admin.

 [do_action( ‘admin_enqueue_scripts’, string $hook_suffix )](https://developer.wordpress.org/reference/hooks/admin_enqueue_scripts/)

Fires when enqueuing scripts for all admin pages.

 [do_action( ‘admin_head’ )](https://developer.wordpress.org/reference/hooks/admin_head/)

Fires in head section for all admin pages.

 [do_action( “admin_head-{$hook_suffix}” )](https://developer.wordpress.org/reference/hooks/admin_head-hook_suffix/)

Fires in head section for a specific admin page.

 [do_action( ‘admin_print_scripts’ )](https://developer.wordpress.org/reference/hooks/admin_print_scripts/)

Fires when scripts are printed for all admin pages.

 [do_action( “admin_print_scripts-{$hook_suffix}” )](https://developer.wordpress.org/reference/hooks/admin_print_scripts-hook_suffix/)

Fires when scripts are printed for a specific admin page based on $hook_suffix.

 [do_action( ‘admin_print_styles’ )](https://developer.wordpress.org/reference/hooks/admin_print_styles/)

Fires when styles are printed for all admin pages.

 [do_action( “admin_print_styles-{$hook_suffix}” )](https://developer.wordpress.org/reference/hooks/admin_print_styles-hook_suffix/)

Fires when styles are printed for a specific admin page based on $hook_suffix.

## 󠀁[Related](https://developer.wordpress.org/reference/functions/iframe_header/?output_format=md#related)󠁿

| Uses | Description | 
| [get_user_locale()](https://developer.wordpress.org/reference/functions/get_user_locale/)`wp-includes/l10n.php` |

Retrieves the locale of a user.

  | 
| [get_current_screen()](https://developer.wordpress.org/reference/functions/get_current_screen/)`wp-admin/includes/screen.php` |

Get the current screen object

  | 
| [_wp_admin_html_begin()](https://developer.wordpress.org/reference/functions/_wp_admin_html_begin/)`wp-admin/includes/template.php` |

Prints out the beginning of the admin HTML header.

  | 
| [esc_js()](https://developer.wordpress.org/reference/functions/esc_js/)`wp-includes/formatting.php` |

Escapes single quotes, `"`, , `&amp;`, and fixes line endings.

  | 
| [sanitize_html_class()](https://developer.wordpress.org/reference/functions/sanitize_html_class/)`wp-includes/formatting.php` |

Sanitizes an HTML classname to ensure it only contains valid characters.

  | 
| [bloginfo()](https://developer.wordpress.org/reference/functions/bloginfo/)`wp-includes/general-template.php` |

Displays information about the current site.

  | 
| [is_rtl()](https://developer.wordpress.org/reference/functions/is_rtl/)`wp-includes/l10n.php` |

Determines whether the current locale is right-to-left (RTL).

  | 
| [show_admin_bar()](https://developer.wordpress.org/reference/functions/show_admin_bar/)`wp-includes/admin-bar.php` |

Sets the display status of the admin bar.

  | 
| [get_user_option()](https://developer.wordpress.org/reference/functions/get_user_option/)`wp-includes/user.php` |

Retrieves user option that can be either per Site or per Network.

  | 
| [_e()](https://developer.wordpress.org/reference/functions/_e/)`wp-includes/l10n.php` |

Displays translated text.

  | 
| [esc_attr()](https://developer.wordpress.org/reference/functions/esc_attr/)`wp-includes/formatting.php` |

Escaping for HTML attributes.

  | 
| [admin_url()](https://developer.wordpress.org/reference/functions/admin_url/)`wp-includes/link-template.php` |

Retrieves the URL to the admin area for the current site.

  | 
| [wp_enqueue_style()](https://developer.wordpress.org/reference/functions/wp_enqueue_style/)`wp-includes/functions.wp-styles.php` |

Enqueues a CSS stylesheet.

  | 
| [do_action()](https://developer.wordpress.org/reference/functions/do_action/)`wp-includes/plugin.php` |

Calls the callback functions that have been added to an action hook.

  | 
| [apply_filters()](https://developer.wordpress.org/reference/functions/apply_filters/)`wp-includes/plugin.php` |

Calls the callback functions that have been added to a filter hook.

  | 
| [get_option()](https://developer.wordpress.org/reference/functions/get_option/)`wp-includes/option.php` |

Retrieves an option value based on an option name.

  |

[Show 11 more](https://developer.wordpress.org/reference/functions/iframe_header/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/iframe_header/?output_format=md#)

| Used by | Description | 
| [install_theme_information()](https://developer.wordpress.org/reference/functions/install_theme_information/)`wp-admin/includes/theme-install.php` |

Displays theme information in dialog box form.

  | 
| [install_plugin_information()](https://developer.wordpress.org/reference/functions/install_plugin_information/)`wp-admin/includes/plugin-install.php` |

Displays plugin information in dialog box form.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/iframe_header/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.7.0](https://developer.wordpress.org/reference/since/2.7.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fiframe_header%2F)
before being able to contribute a note or feedback.