From dfb4672593855c6bb832e2de5fcca8298373e313 Mon Sep 17 00:00:00 2001 From: Robin Cornett Date: Thu, 14 Dec 2017 10:59:58 -0500 Subject: [PATCH] Move deprecated function notice --- includes/class-displayfeaturedimagegenesis-common.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/class-displayfeaturedimagegenesis-common.php b/includes/class-displayfeaturedimagegenesis-common.php index 37602a0..f6256a9 100644 --- a/includes/class-displayfeaturedimagegenesis-common.php +++ b/includes/class-displayfeaturedimagegenesis-common.php @@ -267,14 +267,14 @@ class Display_Featured_Image_Genesis_Common { */ public static function get_image_id( $attachment_url = '' ) { - _deprecated_function( __FUNCTION__, '2.7.0' ); - $attachment_id = false; // 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; } + _deprecated_function( __FUNCTION__, '2.7.0' ); + // if we're running 4.0 or later, we can do this all using a new core function. if ( function_exists( 'attachment_url_to_postid' ) ) { $url_stripped = preg_replace( '/-\d+x\d+(?=\.(jpg|jpeg|png|gif)$)/i', '', $attachment_url );