Simplify early return on ID check

This commit is contained in:
Robin Cornett
2015-12-30 16:04:17 -05:00
parent 8560bf4689
commit 8a18a5df51
@@ -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'] );