mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-06-05 15:08:20 +09:00
Deprecate function to convert image URL to ID
We've been storing images by ID since 2.2.0 so I'd like to get rid of this.
This commit is contained in:
@@ -267,6 +267,8 @@ 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.
|
||||
|
||||
@@ -221,13 +221,12 @@ function display_featured_image_genesis_add_archive_thumbnails() {
|
||||
* @since 2.3.0
|
||||
*/
|
||||
function displayfeaturedimagegenesis_check_image_id( $image_id = '' ) {
|
||||
$image_id = is_numeric( $image_id ) ? $image_id : Display_Featured_Image_Genesis_Common::get_image_id( $image_id );
|
||||
return $image_id;
|
||||
return is_numeric( $image_id ) || ! $image_id ? $image_id : Display_Featured_Image_Genesis_Common::get_image_id( $image_id );
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to get the plugin settings.
|
||||
* @return mixed|void
|
||||
* @return mixed
|
||||
*
|
||||
* @since 2.4.2
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user