From 72a5580245af7f81f2ffb534af105b81c177b465 Mon Sep 17 00:00:00 2001 From: Robin Cornett Date: Wed, 23 Oct 2019 18:46:05 -0400 Subject: [PATCH] Register new image size For sites running WP earlier than 5.3, the plugin's registered image size is changing to 2048x0248, which is the name of a new image size being registered in 5.3. Once 5.3 is active, this plugin will no longer register its own image size; we will just use the Core one. --- includes/class-displayfeaturedimagegenesis.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/includes/class-displayfeaturedimagegenesis.php b/includes/class-displayfeaturedimagegenesis.php index 95af857..12250c6 100644 --- a/includes/class-displayfeaturedimagegenesis.php +++ b/includes/class-displayfeaturedimagegenesis.php @@ -189,9 +189,12 @@ class Display_Featured_Image_Genesis { /** - * add plugin support for new image size and excerpts on pages, if move excerpts option is enabled - * + * Register a custom image size for banners, and add excerpt support for pages if needed. * @since 1.3.0 + * + * If the Core image size has not been registered (pre-5.3), register it. The plugin is + * transitioning to using the new 2048x2048 image size. + * @since 3.2.0 */ public function add_plugin_supports() { @@ -199,12 +202,12 @@ class Display_Featured_Image_Genesis { $args = apply_filters( 'displayfeaturedimagegenesis_custom_image_size', array( - 'width' => 2000, - 'height' => 2000, + 'width' => 2048, + 'height' => 2048, 'crop' => false, ) ); - add_image_size( 'displayfeaturedimage_backstretch', (int) $args['width'], (int) $args['height'], (bool) $args['crop'] ); + add_image_size( '2048x2048', (int) $args['width'], (int) $args['height'], (bool) $args['crop'] ); } $move_excerpts = displayfeaturedimagegenesis_get_setting( 'move_excerpts' );