mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-06-05 15:08:20 +09:00
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.
This commit is contained in:
@@ -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' );
|
||||
|
||||
Reference in New Issue
Block a user