[wp-trac] [WordPress Trac] #40034: Add License and License URI as valid style.css headers to WP_Theme
WordPress Trac
noreply at wordpress.org
Wed Mar 8 06:43:26 UTC 2017
#40034: Add License and License URI as valid style.css headers to WP_Theme
----------------------------+------------------------------
Reporter: grapplerulrich | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
----------------------------+------------------------------
Comment (by dd32):
It works for me:
{{{
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;
}
var_dump( get_theme( 'Twenty Seventeen' )->get('License URI') );
}}}
That check you're referencing will contain the `License` key if
whitelisted.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40034#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list