get_header_image
Filter HookDescription
Filters the header image URL.Hook Information
File Location |
wp-includes/theme.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1238 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$url
|
Header image URL. |
Usage Examples
Basic Usage
<?php
// Hook into get_header_image
add_filter('get_header_image', 'my_custom_filter', 10, 1);
function my_custom_filter($url) {
// Your custom filtering logic here
return $url;
}
Source Code Context
wp-includes/theme.php:1238
- How this hook is used in WordPress core
<?php
1233 *
1234 * @since 6.1.0
1235 *
1236 * @param string $url Header image URL.
1237 */
1238 $url = apply_filters( 'get_header_image', $url );
1239
1240 if ( ! is_string( $url ) ) {
1241 return false;
1242 }
1243
PHP Documentation
<?php
/**
* Filters the header image URL.
*
* @since 6.1.0
*
* @param string $url Header image URL.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/theme.php
Related Hooks
Related hooks will be displayed here in future updates.