WP_Theme::display( string $header, bool $markup = true, bool $translate = true )
Gets a theme header, formatted and translated for display.
Parameters
- $header
-
(Required) Theme header. Name, Description, Author, Version, ThemeURI, AuthorURI, Status, Tags.
- $markup
-
(Optional) Whether to mark up the header. Defaults to true.
Default value: true
- $translate
-
(Optional) Whether to translate the header. Defaults to true.
Default value: true
Return
(string|false) Processed header, false on failure.
Source
File: wp-includes/class-wp-theme.php
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;
}
Changelog
Version | Description |
---|---|
WP-3.4.0 | Introduced. |