From b87b8f2bb392af3288a3dd14b5da8cdd36c7e3dc Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 17 Jan 2015 06:34:23 +0000 Subject: [PATCH] Introduce has_header_image() to check whether a header image is set. props GunGeekATX, voldemortensen. fixes #16268. Built from https://develop.svn.wordpress.org/trunk@31224 git-svn-id: http://core.svn.wordpress.org/trunk@31205 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/theme.php | 11 +++++++++++ wp-includes/version.php | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 7a233b2e88..3f5b5e7455 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -1034,6 +1034,17 @@ function display_header_text() { return 'blank' != $text_color; } +/** + * Check whether a header image is set or not. + * + * @since 4.2.0 + * + * @return bool + */ +function has_header_image() { + return (bool) get_header_image(); +} + /** * Retrieve header image for custom header. * diff --git a/wp-includes/version.php b/wp-includes/version.php index ec940ba6ca..6cb88ce0ae 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-alpha-31223'; +$wp_version = '4.2-alpha-31224'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.