WordPress.org

Make WordPress Core

Changeset 21050


Ignore:
Timestamp:
06/11/2012 05:30:57 PM (6 years ago)
Author:
westi
Message:

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.

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-theme.php

    r20945 r21050  
    564564        $value = $this->get( $header );
    565565
    566         if ( empty( $value ) || ! $this->load_textdomain() )
     566        if ( $translate && ( empty( $value ) || ! $this->load_textdomain() ) )
    567567            $translate = false;
    568568
  • trunk/wp-includes/deprecated.php

    r20715 r21050  
    31123112        'Tags' => $theme->get('Tags'),
    31133113        'Title' => $theme->get('Name'),
    3114         'AuthorName' => $theme->display('Author', false, false),
     3114        'AuthorName' => $theme->get('Author'),
    31153115    );
     3116
     3117    foreach ( apply_filters( 'extra_theme_headers', array() ) as $extra_header ) {
     3118        if ( ! isset( $theme_data[ $extra_header ] ) )
     3119            $theme_data[ $extra_header ] = $theme->get( $extra_header );
     3120    }
    31163121
    31173122    return $theme_data;
Note: See TracChangeset for help on using the changeset viewer.