Filter hook 'extra_theme_headers'

in WP Core File wp-includes/deprecated.php at line 3095

View Source

extra_theme_headers

Filter Hook
Description
Retrieve theme data from parsed theme file.

Hook Information

File Location wp-includes/deprecated.php View on GitHub
Hook Type Filter
Line Number 3095

Hook Parameters

Type Name Description
string $theme_file Theme file path.

Usage Examples

Basic Usage
<?php
// Hook into extra_theme_headers
add_filter('extra_theme_headers', 'my_custom_filter', 10, 1);

function my_custom_filter($theme_file) {
    // Your custom filtering logic here
    return $theme_file;
}

Source Code Context

wp-includes/deprecated.php:3095 - How this hook is used in WordPress core
<?php
3090  		'Tags' => $theme->get('Tags'),
3091  		'Title' => $theme->get('Name'),
3092  		'AuthorName' => $theme->get('Author'),
3093  	);
3094  
3095  	foreach ( apply_filters( 'extra_theme_headers', array() ) as $extra_header ) {
3096  		if ( ! isset( $theme_data[ $extra_header ] ) )
3097  			$theme_data[ $extra_header ] = $theme->get( $extra_header );
3098  	}
3099  
3100  	return $theme_data;

PHP Documentation

<?php
/**
 * Retrieve theme data from parsed theme file.
 *
 * @since 1.5.0
 * @deprecated 3.4.0 Use wp_get_theme()
 * @see wp_get_theme()
 *
 * @param string $theme_file Theme file path.
 * @return array Theme data.
 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/deprecated.php
Related Hooks

Related hooks will be displayed here in future updates.