Restore the 'extra_theme_headers' filter in the deprecated get_theme_data function so that plugins/themes using this function can still access their extra headers.
Fixes #20897 props nacin, georgestephanis, SergeyBiryukov. git-svn-id: https://develop.svn.wordpress.org/trunk@21050 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
71f71219fc
commit
0ec0c40c0a
@ -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 )
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user