mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-07-11 18:46:03 +09:00
Fix settings page
Adds post, page to skip, adds margin to checkbox label
This commit is contained in:
@@ -89,16 +89,14 @@ class Display_Featured_Image_Genesis_Helper {
|
||||
* @since 2.3.0
|
||||
*/
|
||||
public function do_checkbox( $args ) {
|
||||
echo '<p>';
|
||||
$setting = $this->get_checkbox_setting( $args );
|
||||
printf( '<input type="hidden" name="%s[%s]" value="0" />', esc_attr( $this->page ), esc_attr( $args['setting'] ) );
|
||||
printf( '<label for="%4$s[%1$s]"><input type="checkbox" name="%4$s[%1$s]" id="%4$s[%1$s]" value="1" %2$s class="code" />%3$s</label>',
|
||||
printf( '<label for="%4$s[%1$s]" style="margin-right:12px;"><input type="checkbox" name="%4$s[%1$s]" id="%4$s[%1$s]" value="1" %2$s class="code" />%3$s</label>',
|
||||
esc_attr( $args['setting'] ),
|
||||
checked( 1, esc_attr( $setting ), false ),
|
||||
esc_attr( $args['label'] ),
|
||||
esc_attr( $this->page )
|
||||
);
|
||||
echo '</p>';
|
||||
$this->do_description( $args['setting'] );
|
||||
}
|
||||
|
||||
|
||||
@@ -413,6 +413,11 @@ class Display_Featured_Image_Genesis_Settings extends Display_Featured_Image_Gen
|
||||
$new_value['post_type'][ $post_type ] = $this->validate_image( $new_value['post_type'][ $post_type ], $old_value, $label, $size_to_check );
|
||||
$new_value['fallback'][ $post_type ] = $this->one_zero( $new_value['fallback'][ $post_type ] );
|
||||
}
|
||||
$built_ins = array( 'post', 'page' );
|
||||
$post_types = array_merge( $built_ins, $this->post_types );
|
||||
foreach ( $post_types as $post_type ) {
|
||||
$new_value['skip'][ $post_type ] = $this->one_zero( $new_value['skip'][ $post_type ] );
|
||||
}
|
||||
|
||||
return $new_value;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user