mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-07-11 18:46:03 +09:00
Set up site to use new WordPress image sizes
WordPress is adding new image sizes in version 5.3, so our custom image size is redundant. Keeping it in for back compat, plus older images will still need to be retrieved using the old image size name, or else the original size will be used in lieu of a correctly sized option.
This commit is contained in:
@@ -131,8 +131,8 @@ class Display_Featured_Image_Genesis_Post_Meta {
|
||||
$image_sizes = apply_filters(
|
||||
'displayfeaturedimagegenesis_image_size_choices',
|
||||
array(
|
||||
'displayfeaturedimage_backstretch' => __( 'Use a banner image if it exists', 'display-featured-image-genesis' ),
|
||||
'large' => __( 'Use a large (not banner) image', 'display-featured-image-genesis' ),
|
||||
'banner' => __( 'Use a banner image if it exists', 'display-featured-image-genesis' ),
|
||||
'large' => __( 'Use a large (not banner) image', 'display-featured-image-genesis' ),
|
||||
)
|
||||
);
|
||||
|
||||
@@ -174,12 +174,14 @@ class Display_Featured_Image_Genesis_Post_Meta {
|
||||
*/
|
||||
protected function do_select( $args, $post_id ) {
|
||||
$value = get_post_meta( $post_id, $args['setting'], true );
|
||||
$output = sprintf( '<p>%1$s<select id="%2$s" name="%2$s">',
|
||||
$output = sprintf(
|
||||
'<p>%1$s<select id="%2$s" name="%2$s">',
|
||||
esc_attr( $args['label'] ),
|
||||
esc_attr( $args['setting'] )
|
||||
);
|
||||
foreach ( (array) $args['options'] as $option => $field_label ) {
|
||||
$output .= sprintf( '<option value="%s" %s>%s</option>',
|
||||
$output .= sprintf(
|
||||
'<option value="%s" %s>%s</option>',
|
||||
esc_attr( $option ),
|
||||
selected( $option, $value, false ),
|
||||
esc_attr( $field_label )
|
||||
|
||||
Reference in New Issue
Block a user