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:
Robin Cornett
2017-12-28 11:02:55 -05:00
parent 61ca74af7c
commit cd46bc5f4e
@@ -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;
}
}