Gets a theme header, formatted and translated for display.
Parameters
$header
stringrequired- Theme header. Name, Description, Author, Version, ThemeURI, AuthorURI, Status, Tags.
$markup
booloptional- Whether to mark up the header. Defaults to true.
Default:
true
$translate
booloptional- Whether to translate the header. Defaults to true.
Default:
true
Source
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 |
---|---|
3.4.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.