Files

47 lines
1.6 KiB
PHP
Raw Permalink Normal View History

2019-05-12 17:40:05 -04:00
<?php
$fields = array(
array(
'id' => 'skip',
'title' => __( 'Skip Content Types', 'display-featured-image-genesis' ),
'type' => 'checkbox_array',
'section' => 'cpt_sitewide',
'options' => $this->get_post_types(),
'skip' => true,
2019-05-12 17:40:05 -04:00
),
array(
'id' => 'fallback',
'title' => __( 'Prefer Fallback Images', 'display-featured-image-genesis' ),
'type' => 'checkbox_array',
2019-05-12 17:40:05 -04:00
'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' ),
'skip' => true,
),
array(
'id' => 'large',
'title' => __( 'Force Large Images', 'display-featured-image-genesis' ),
'type' => 'checkbox_array',
2019-05-12 17:40:05 -04:00
'section' => 'cpt_sitewide',
'options' => $this->get_post_types(),
2019-05-13 09:27:02 -04:00
'description' => __( 'Select content types which should always prefer to use the large image size instead of the banner, even if a banner size image is available (singular posts/pages, not archives).', 'display-featured-image-genesis' ),
2019-05-12 17:40:05 -04:00
'skip' => true,
),
);
$custom_pages = array(
'search' => __( 'Search Results', 'display-featured-image-genesis' ),
'fourohfour' => __( '404 Page', 'display-featured-image-genesis' ),
);
$post_types = array_merge( $custom_pages, $this->get_post_types() );
foreach ( $post_types as $post_type => $label ) {
$fields[] = array(
2019-05-19 07:07:23 -04:00
'id' => $post_type,
'title' => esc_attr( $label ),
'section' => 'cpt',
'type' => 'image',
2019-05-12 17:40:05 -04:00
);
}
return $fields;