get_random_header_image()
Gets random header image URL from registered images in theme.
No Hooks.
Returns
String. Path to header image.
Usage
get_random_header_image();
Changelog
| Since 3.2.0 | Introduced. |
get_random_header_image() get random header image code WP 7.1
function get_random_header_image() {
$random_image = _get_random_header_data();
if ( empty( $random_image->url ) ) {
return '';
}
return $random_image->url;
}