mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-07-19 14:33:32 +09:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user