mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-06-05 15:08:20 +09:00
Remove unneeded large image singular function
Since the post meta is now saved by strings, not integers, this function is now redundant.
This commit is contained in:
@@ -376,24 +376,10 @@ class Display_Featured_Image_Genesis_Common {
|
||||
* whether get_post_type array should use large image instead of backstretch.
|
||||
* @uses is_in_array()
|
||||
*/
|
||||
if ( self::is_in_array( 'use_large_image' ) || self::use_large_image_singular() ) {
|
||||
if ( self::is_in_array( 'use_large_image' ) ) {
|
||||
return 'large';
|
||||
}
|
||||
|
||||
return apply_filters( 'displayfeaturedimagegenesis_image_size', $image_size );
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if a singular post/page should use a large image instead of backstretch.
|
||||
* @return bool
|
||||
*/
|
||||
protected static function use_large_image_singular() {
|
||||
if ( ! is_singular() ) {
|
||||
return false;
|
||||
}
|
||||
$setting = displayfeaturedimagegenesis_get_setting();
|
||||
$post_type = get_post_type();
|
||||
$post_meta = (int) get_post_meta( get_the_ID(), '_displayfeaturedimagegenesis_disable', true );
|
||||
return ( isset( $setting['large'][ $post_type ] ) && $setting['large'][ $post_type ] ) || 3 === $post_meta;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user