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:
Robin Cornett
2017-10-31 17:22:57 -04:00
parent 454320202c
commit 0a6fb4973f
2 changed files with 4 additions and 3 deletions
@@ -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.
+2 -3
View File
@@ -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
*/