mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-06-05 15:08:20 +09:00
Move deprecated function notice
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user