Update tabs/sections

This commit is contained in:
Robin Cornett
2017-11-01 12:52:55 -04:00
parent 1bf2504b14
commit 2285e656b4
2 changed files with 14 additions and 5 deletions
@@ -373,7 +373,7 @@ 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' ) || ( isset( $setting['large'][ $post_type ] ) && $setting['large'][ $post_type ] ) ) {
if ( self::is_in_array( 'use_large_image' ) || ( is_singular() && isset( $setting['large'][ $post_type ] ) && $setting['large'][ $post_type ] ) ) {
return 'large';
}
@@ -17,18 +17,27 @@ class Display_Featured_Image_Genesis_Settings_Define extends Display_Featured_Im
'main' => array(
'id' => 'main',
'title' => __( 'Optional Sitewide Settings', 'display-featured-image-genesis' ),
'tab' => 'main',
),
'style' => array(
'id' => 'style',
'title' => __( 'Display Settings', 'display-featured-image-genesis' ),
'tab' => 'style',
),
'cpt_sitewide' => array(
'id' => 'cpt_sitewide',
'title' => __( 'Sitewide Settings', 'display-featured-image-genesis' ),
'tab' => 'cpt',
),
'cpt' => array(
'id' => 'cpt',
'title' => __( 'Featured Images for Custom Content Types', 'display-featured-image-genesis' ),
'tab' => 'cpt',
),
'advanced' => array(
'id' => 'advanced',
'title' => __( 'Advanced Plugin Settings', 'display-featured-image-genesis' ),
'tab' => 'advanced',
),
);
}
@@ -191,14 +200,14 @@ class Display_Featured_Image_Genesis_Settings_Define extends Display_Featured_Im
'id' => 'skip',
'title' => __( 'Skip Content Types', 'display-featured-image-genesis' ),
'callback' => 'do_checkbox_array',
'section' => 'cpt',
'section' => 'cpt_sitewide',
'options' => $this->get_post_types(),
),
array(
'id' => 'fallback',
'title' => __( 'Prefer Fallback Images', 'display-featured-image-genesis' ),
'callback' => 'do_checkbox_array',
'section' => 'cpt',
'section' => 'cpt_sitewide',
'options' => $this->get_post_types(),
'description' => __( 'Select content types which should always use a fallback image, even if a featured image has been set.', 'display-featured-image-genesis' ),
),
@@ -206,9 +215,9 @@ class Display_Featured_Image_Genesis_Settings_Define extends Display_Featured_Im
'id' => 'large',
'title' => __( 'Force Large Images', 'display-featured-image-genesis' ),
'callback' => 'do_checkbox_array',
'section' => 'cpt',
'section' => 'cpt_sitewide',
'options' => $this->get_post_types(),
'description' => __( 'Select content types which should always prefer to use the large image size instead of the backstretch, even if a backstretch size image is available.', 'display-featured-image-genesis' ),
'description' => __( 'Select content types which should always prefer to use the large image size instead of the backstretch, even if a backstretch size image is available (singular posts/pages, not archives).', 'display-featured-image-genesis' ),
),
);