Using WordPress ‘iframe_header()’ PHP function

The iframe_header() WordPress PHP function generates a generic iframe header for use with Thickbox.

Usage

Here’s a generic example of using the iframe_header() function:

iframe_header('My Custom Iframe Title');

Parameters

  • $title (string) (optional) – Title of the Iframe page. Default: ''
  • $deprecated (bool) (optional) – Not used. Default: false

More information

See WordPress Developer Resources: iframe_header()

Examples

Basic Iframe Header

Create a basic iframe header with the default title.

iframe_header();

Custom Iframe Header Title

Create an iframe header with a custom title.

iframe_header('My Custom Iframe Title');

Custom Iframe Header Title with Deprecated Parameter

Create an iframe header with a custom title and deprecated parameter set to true.

iframe_header('My Custom Iframe Title', true);

Custom Iframe Header Title with Deprecated Parameter as False

Create an iframe header with a custom title and deprecated parameter set to false.

iframe_header('My Custom Iframe Title', false);

Custom Iframe Header Title with an Empty String

Create an iframe header with an empty title string.

iframe_header('');

Tagged in

Leave a Comment

Your email address will not be published. Required fields are marked *