Change large/fallback CPT settings output

This commit is contained in:
Robin Cornett
2017-11-01 08:41:03 -04:00
parent c7d4f973dd
commit 6df3e4f4fe
4 changed files with 20 additions and 36 deletions
@@ -239,7 +239,6 @@ class Display_Featured_Image_Genesis_Settings extends Display_Featured_Image_Gen
public function set_cpt_image( $args ) {
$this->do_image_buttons( $args );
$this->do_cpt_checkboxes( $args );
if ( empty( $id ) || in_array( $args['id'], array( 'search', 'fourohfour', 'post' ), true ) ) {
return;
@@ -270,38 +269,6 @@ class Display_Featured_Image_Genesis_Settings extends Display_Featured_Image_Gen
$this->render_buttons( $id, $name );
}
/**
* Print the CPT checkboxes.
*
* @param $args
*/
protected function do_cpt_checkboxes( $args ) {
if ( in_array( $args['id'], array( 'search', 'fourohfour' ), true ) ) {
return;
}
$checkbox_args = array(
array(
'id' => "fallback][{$args['id']}",
/* translators: placeholder is the post type label. */
'label' => sprintf( __( 'Always use a fallback image for %s.', 'display-featured-image-genesis' ), esc_attr( $args['title'] ) ),
'setting_name' => 'fallback',
'name' => $args['id'],
),
array(
'id' => "large][{$args['id']}",
/* translators: placeholder is the post type label. */
'label' => sprintf( __( 'Always use a large/not backstretch image for %s.', 'display-featured-image-genesis' ), esc_attr( $args['title'] ) ),
'setting_name' => 'large',
'name' => $args['id'],
),
);
foreach ( $checkbox_args as $checkbox ) {
echo '<p>';
$this->do_checkbox( $checkbox );
echo '</p>';
}
}
/**
* Print the CPT description.
*