diff --git a/wp-includes/class-wp-theme.php b/wp-includes/class-wp-theme.php index e63429a009..b07e0b5fbd 100644 --- a/wp-includes/class-wp-theme.php +++ b/wp-includes/class-wp-theme.php @@ -563,7 +563,7 @@ final class WP_Theme implements ArrayAccess { public function display( $header, $markup = true, $translate = true ) { $value = $this->get( $header ); - if ( empty( $value ) || ! $this->load_textdomain() ) + if ( $translate && ( empty( $value ) || ! $this->load_textdomain() ) ) $translate = false; if ( $translate ) diff --git a/wp-includes/deprecated.php b/wp-includes/deprecated.php index 24034f9946..43523ca698 100644 --- a/wp-includes/deprecated.php +++ b/wp-includes/deprecated.php @@ -3111,9 +3111,14 @@ function get_theme_data( $theme_file ) { 'Status' => $theme->get('Status'), 'Tags' => $theme->get('Tags'), 'Title' => $theme->get('Name'), - 'AuthorName' => $theme->display('Author', false, false), + 'AuthorName' => $theme->get('Author'), ); + foreach ( apply_filters( 'extra_theme_headers', array() ) as $extra_header ) { + if ( ! isset( $theme_data[ $extra_header ] ) ) + $theme_data[ $extra_header ] = $theme->get( $extra_header ); + } + return $theme_data; }