mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-07-16 21:13:18 +09:00
Move image_id filter back to set_image_id function
This way, it cannot completely override other filters, even if it's accidentally coded that way, but will still override post/term images.
This commit is contained in:
@@ -54,13 +54,7 @@ class Display_Featured_Image_Genesis_Common {
|
||||
$image_size = 'large';
|
||||
}
|
||||
|
||||
/**
|
||||
* filter to use a different image id
|
||||
* @var $image_id
|
||||
*
|
||||
* @since 2.2.0
|
||||
*/
|
||||
$image_id = apply_filters( 'display_featured_image_genesis_image_id', self::set_image_id() );
|
||||
$image_id = self::set_image_id();
|
||||
|
||||
$item->backstretch = wp_get_attachment_image_src( $image_id, $image_size );
|
||||
|
||||
@@ -218,6 +212,14 @@ class Display_Featured_Image_Genesis_Common {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* filter to use a different image id
|
||||
* @var $image_id
|
||||
*
|
||||
* @since 2.2.0
|
||||
*/
|
||||
$image_id = apply_filters( 'display_featured_image_genesis_image_id', $image_id );
|
||||
|
||||
// make sure the image id is an integer
|
||||
$image_id = is_numeric( $image_id ) ? (int) $image_id : '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user