add check for image_id in get_image_id

So if someone is using the function elsewhere, it won't break with a new
term/cpt/default featured image.
This commit is contained in:
Robin Cornett
2015-04-10 21:28:23 -04:00
parent 41c51f337e
commit 99138620ce
@@ -220,6 +220,11 @@ class Display_Featured_Image_Genesis_Common {
global $wpdb;
$attachment_id = false;
// as of 2.2.0, if a (new) image id is passed to the function, return it as is.
if ( is_int( $attachment_url ) ) {
return $attachment_url;
}
// If there is no url, return.
if ( '' == $attachment_url ) {
return;