mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-07-11 18:46:03 +09:00
Remove all calls to check_image_id helper function (deprecated)
This commit is contained in:
@@ -233,7 +233,6 @@ class Display_Featured_Image_Genesis_Helper extends DisplayFeaturedImageGenesisG
|
||||
return '';
|
||||
}
|
||||
|
||||
$id = displayfeaturedimagegenesis_check_image_id( $id );
|
||||
/* translators: the placeholder refers to which featured image */
|
||||
$alt_text = sprintf( __( '%s featured image', 'display-featured-image-genesis' ), esc_attr( $alt ) );
|
||||
$preview = wp_get_attachment_image_src( (int) $id, 'medium' );
|
||||
@@ -250,7 +249,6 @@ class Display_Featured_Image_Genesis_Helper extends DisplayFeaturedImageGenesisG
|
||||
* @since 2.3.0
|
||||
*/
|
||||
public function render_buttons( $id, $name ) {
|
||||
$id = displayfeaturedimagegenesis_check_image_id( $id );
|
||||
$id = $id ? (int) $id : '';
|
||||
printf( '<input type="hidden" class="upload_image_id" name="%1$s" value="%2$s" />', esc_attr( $name ), esc_attr( $id ) );
|
||||
printf( '<input id="%s" type="button" class="upload_default_image button-secondary" value="%s" />',
|
||||
|
||||
@@ -114,7 +114,7 @@ class Display_Featured_Image_Genesis_Settings_Terms {
|
||||
$option = get_option( esc_attr( $option_key ), false );
|
||||
$term = get_term( (int) $term_id );
|
||||
if ( ! is_wp_error( $term ) && ! is_null( $term ) ) {
|
||||
$image_id = (int) displayfeaturedimagegenesis_check_image_id( $option['term_image'] );
|
||||
$image_id = (int) $option['term_image'];
|
||||
update_term_meta( $term_id, 'displayfeaturedimagegenesis', $image_id );
|
||||
}
|
||||
if ( false !== $option ) {
|
||||
|
||||
@@ -132,11 +132,9 @@ class Display_Featured_Image_Genesis_Settings_Validate extends Display_Featured_
|
||||
return '';
|
||||
}
|
||||
|
||||
$new_value = displayfeaturedimagegenesis_check_image_id( $new_value );
|
||||
$old_value = displayfeaturedimagegenesis_check_image_id( $old_value );
|
||||
$source = wp_get_attachment_image_src( $new_value, 'full' );
|
||||
$valid = (bool) $this->is_valid_img_ext( $source[0] );
|
||||
$width = $source[1];
|
||||
$source = wp_get_attachment_image_src( $new_value, 'full' );
|
||||
$valid = (bool) $this->is_valid_img_ext( $source[0] );
|
||||
$width = $source[1];
|
||||
|
||||
if ( $valid && $width > $size_to_check ) {
|
||||
return (int) $new_value;
|
||||
|
||||
Reference in New Issue
Block a user