Update image size references

Where possible, use the newly registered image size. The original image
size will be available to call on for backup, for images uploaded prior
to WordPress 5.3.
This commit is contained in:
Robin Cornett
2019-10-23 18:47:15 -04:00
parent 72a5580245
commit 261c0e1599
6 changed files with 20 additions and 39 deletions
@@ -131,8 +131,8 @@ class Display_Featured_Image_Genesis_Post_Meta {
$image_sizes = apply_filters(
'displayfeaturedimagegenesis_image_size_choices',
array(
'banner' => __( 'Use a banner image if it exists', 'display-featured-image-genesis' ),
'large' => __( 'Use a large (not banner) image', 'display-featured-image-genesis' ),
'2048x2048' => __( 'Use a banner image if it exists', 'display-featured-image-genesis' ),
'large' => __( 'Use a large (not banner) image', 'display-featured-image-genesis' ),
)
);
@@ -173,7 +173,10 @@ class Display_Featured_Image_Genesis_Post_Meta {
* @return string
*/
protected function do_select( $args, $post_id ) {
$value = get_post_meta( $post_id, $args['setting'], true );
$value = get_post_meta( $post_id, $args['setting'], true );
if ( 'displayfeaturedimage_backstretch' === $value ) {
$value = '2048x2048';
}
$output = sprintf(
'<p>%1$s<select id="%2$s" name="%2$s">',
esc_attr( $args['label'] ),