[wp-trac] [WordPress Trac] #20897: extra_theme_file headers no longer available

WordPress Trac wp-trac at lists.automattic.com
Sun Jun 10 16:46:44 UTC 2012


#20897: extra_theme_file headers no longer available
--------------------------+-----------------------------
 Reporter:  greenshady    |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Themes        |    Version:  3.4
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 In the past, to get theme data, one would call `get_theme_data()`, which
 would then call `get_file_data()`, to get file header data about a theme.
 This function would allow you to filter the file headers by context (e.g.,
 plugin, theme) to add in custom file headers.  Now, the
 `extra_file_headers` hook is no longer available with the switch to
 `WP_Theme`.

 This hook needs to be available for backwards compatibility with themes
 and plugins that use it.

 Here's some example code from the Theme Check plugin used by the theme
 review team for testing:

 {{{
 add_filter( 'extra_theme_headers', 'tc_add_headers' );

 function tc_add_headers( $extra_headers ) {
         $extra_headers = array( 'License', 'License URI', 'Template
 Version' );
         return $extra_headers;
 }
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20897>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list