Custom_Image_Header::get_uploaded_header_images()

最后更新于:2021-11-25 19:45:02

Custom_Image_Header::get_uploaded_header_images()

Gets the previously uploaded header images.

响应

(array) Uploaded header images.

源文件

文件: gc-admin/includes/class-custom-image-header.php

	public function get_uploaded_header_images() {
		$header_images = get_uploaded_header_images();
		$timestamp_key = '_gc_attachment_custom_header_last_used_' . get_stylesheet();
		$alt_text_key  = '_gc_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;
	}