diff --git src/wp-includes/theme.php src/wp-includes/theme.php
index 3f61f20..230cf94 100644
|
|
|
function get_header_image() { |
| 994 | 994 | } |
| 995 | 995 | |
| 996 | 996 | /** |
| | 997 | * Create image markup for a custom header image. |
| | 998 | * |
| | 999 | * @since 4.4.0 |
| | 1000 | * |
| | 1001 | * @param array $attr Optional. Attributes for the image markup. Default empty. |
| | 1002 | * @return string|bool HTML element or false on failure. |
| | 1003 | */ |
| | 1004 | function get_header_image_tag( $attr = array() ) { |
| | 1005 | if ( ! $header = get_custom_header() ) { |
| | 1006 | return false; |
| | 1007 | } |
| | 1008 | |
| | 1009 | /** |
| | 1010 | * Filter the markup of header images. |
| | 1011 | * |
| | 1012 | * @since 4.4.0 |
| | 1013 | * |
| | 1014 | * @param string $html The HTML markup being filtered. |
| | 1015 | * @param object $header The custom header object returned by 'get_custom_header()' |
| | 1016 | * @param array $attr An array of attributes for the image markup. |
| | 1017 | */ |
| | 1018 | return apply_filters( 'get_header_image_tag', wp_get_attachment_image( $header->attachment_id, 'full', false, $attr ), $header, $attr ); |
| | 1019 | } |
| | 1020 | |
| | 1021 | /** |
| | 1022 | * Display the image markup for a custom header image. |
| | 1023 | * |
| | 1024 | * @since 4.4.0 |
| | 1025 | * |
| | 1026 | * @param array $attr Optional. Attributes for the image markup. Default empty. |
| | 1027 | */ |
| | 1028 | function the_header_image_tag( $attr = array() ) { |
| | 1029 | echo get_header_image_tag( $attr ); |
| | 1030 | } |
| | 1031 | |
| | 1032 | /** |
| 997 | 1033 | * Get random header image data from registered images in theme. |
| 998 | 1034 | * |
| 999 | 1035 | * @since 3.4.0 |