WP_Theme::display()
Gets a theme header, formatted and translated for display.
Method of the class: WP_Theme{}
No Hooks.
Return
String|Array|false
. Processed header. An array for Tags if $markup is false, string otherwise. False on failure.
Usage
$WP_Theme = new WP_Theme(); $WP_Theme->display( $header, $markup, $translate );
- $header(string) (required)
- Theme header. Name, Description, Author, Version, ThemeURI, AuthorURI, Status, Tags.
- $markup(true|false)
- Whether to mark up the header.
Default: true - $translate(true|false)
- Whether to translate the header.
Default: true
Changelog
Since 3.4.0 | Introduced. |
WP_Theme::display() WP Theme::display code WP 6.7.1
public function display( $header, $markup = true, $translate = true ) { $value = $this->get( $header ); if ( false === $value ) { return false; } if ( $translate && ( empty( $value ) || ! $this->load_textdomain() ) ) { $translate = false; } if ( $translate ) { $value = $this->translate_header( $header, $value ); } if ( $markup ) { $value = $this->markup_header( $header, $value, $translate ); } return $value; }