[wp-trac] [WordPress Trac] #20897: extra_theme_headers hook no longer available
WordPress Trac
wp-trac at lists.automattic.com
Sun Jun 10 21:10:00 UTC 2012
#20897: extra_theme_headers hook no longer available
-----------------------------------------------+------------------
Reporter: greenshady | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.4
Component: Themes | Version: 3.4
Severity: normal | Resolution:
Keywords: has-patch commit needs-unit-tests |
-----------------------------------------------+------------------
Comment (by georgestephanis):
Also, instead of
`
$extra_headers = array_combine( $extra_headers, $extra_headers );
foreach ( $extra_headers as $key )
$extra_headers[ $key ] = $theme->get( $key );
$theme_data = array_merge( $extra_headers, $theme_data );
`
Would it be more efficient to use array_count_values over array_combine
(I've never seen a performance comparison) like ...
`
$extra_headers = array_count_values( $extra_headers );
foreach ( $extra_headers as $key => $value )
$extra_headers[ $key ] = $theme->get( $key );
$theme_data = array_merge( $extra_headers, $theme_data );
`
Or should we avoid having unset ones merged in to the $theme_data by ...
`
$fetched_extra_headers = array();
foreach ( $extra_headers as $header_name )
if( $header_value = $theme->get( $header_name ) )
$fetched_extra_headers[ $header_name ] = $header_value;
$theme_data = array_merge( $fetched_extra_headers, $theme_data );
`
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20897#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list