get_uploaded_header_images [ WordPress Function ]
get_uploaded_header_images ( No parameters )
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: get_random_header_image, get_header_image, media_upload_header, is_random_header_image, get_allowed_themes
Get the header images uploaded for the current theme.
Source
<?php
function get_uploaded_header_images() {
$header_images = array();
// @todo caching
$headers = get_posts( array( 'post_type' => 'attachment', 'meta_key' => '_wp_attachment_is_custom_header', 'meta_value' => get_option('stylesheet'), 'orderby' => 'none', 'nopaging' => true ) );
if ( empty( $headers ) )
return array();
foreach ( (array) $headers as $header ) {
$url = esc_url_raw( $header->guid );
$header_data = wp_get_attachment_metadata( $header->ID );
$header_index = basename($url);
$header_images[$header_index] = array();
$header_images[$header_index]['attachment_id'] = $header->ID;
$header_images[$header_index]['url'] = $url;
$header_images[$header_index]['thumbnail_url'] = $url;
$header_images[$header_index]['width'] = $header_data['width'];
$header_images[$header_index]['height'] = $header_data['height'];
}
return $header_images;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- get_uploaded_header_images (WordPress Function) - WPSeek.com
Jul 5, 2011 ... WordPress lookup for get_uploaded_header_images, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers ...
wpseek.com - WordPress › Support » Tags — get_uploaded_header_images
... or Email Address Password (forgot?) Register · WordPress › Support » get_uploaded_header_images. Tag: get_uploaded_header_images Add New » ...
wordpress.org - get_uploaded_header_images | A HitchHackers guide through ...
Jul 5, 2011 ... Source code. function get_uploaded_header_images() { $header_images = array(); // @todo caching $headers = get_posts( array( 'post_type' ...
hitchhackerguide.com - get_uploaded_header_images:WordPress私的マニュアル
2011年7月5日 ... get_uploaded_header_images - アップロードしたヘッダ用イメージを取得する.
elearn.jp