mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-07-17 21:43:20 +09:00
Simplify early return on ID check
This commit is contained in:
@@ -237,16 +237,11 @@ class Display_Featured_Image_Genesis_Common {
|
||||
|
||||
$attachment_id = false;
|
||||
|
||||
// as of 2.2.0, if a (new) image id is passed to the function, return it as is.
|
||||
if ( is_numeric( $attachment_url ) ) {
|
||||
// as of 2.2.0, if a (new) image id is passed to the function, or if it's empty, return it as is.
|
||||
if ( is_numeric( $attachment_url ) || '' === $attachment_url ) {
|
||||
return $attachment_url;
|
||||
}
|
||||
|
||||
// If there is no url, return.
|
||||
if ( '' === $attachment_url ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the upload directory paths
|
||||
$upload_dir_paths = wp_upload_dir();
|
||||
$base_url = wp_make_link_relative( $upload_dir_paths['baseurl'] );
|
||||
|
||||
Reference in New Issue
Block a user