On this page
Custom_Image_Header::get_uploaded_header_images(): array
Gets the previously uploaded header images.
Return
array Uploaded header images.
Source
File: wp-admin/includes/class-custom-image-header.php. View all references
public function get_uploaded_header_images() {
$header_images = get_uploaded_header_images();
$timestamp_key = '_wp_attachment_custom_header_last_used_' . get_stylesheet();
$alt_text_key = '_wp_attachment_image_alt';
foreach ( $header_images as &$header_image ) {
$header_meta = get_post_meta( $header_image['attachment_id'] );
$header_image['timestamp'] = isset( $header_meta[ $timestamp_key ] ) ? $header_meta[ $timestamp_key ] : '';
$header_image['alt_text'] = isset( $header_meta[ $alt_text_key ] ) ? $header_meta[ $alt_text_key ] : '';
}
return $header_images;
}
Related
Uses
| Uses | Description |
|---|---|
| get_uploaded_header_images() wp-includes/theme.php | Gets the header images uploaded for the active theme. |
| get_stylesheet() wp-includes/theme.php | Retrieves name of the current stylesheet. |
| get_post_meta() wp-includes/post.php | Retrieves a post meta field for the given post ID. |
Used By
| Used By | Description |
|---|---|
| Custom_Image_Header::get_previous_crop() wp-admin/includes/class-custom-image-header.php | Get the ID of a previous crop from the same base image. |
| WP_Customize_Header_Image_Control::prepare_control() wp-includes/customize/class-wp-customize-header-image-control.php |
Changelog
| Version | Description |
|---|---|
| 3.9.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/custom_image_header/get_uploaded_header_images