diff --git a/includes/class-displayfeaturedimagegenesis-helper.php b/includes/class-displayfeaturedimagegenesis-helper.php index e4421cf..917e8b1 100644 --- a/includes/class-displayfeaturedimagegenesis-helper.php +++ b/includes/class-displayfeaturedimagegenesis-helper.php @@ -117,9 +117,7 @@ class Display_Featured_Image_Genesis_Helper { * @param $args */ public function do_checkbox_array( $args ) { - $built_in = array( 'post', 'page' ); - $post_types = $this->get_content_types(); - $post_types = array_merge( $built_in, $post_types ); + $post_types = $this->get_content_types_built_in(); foreach ( $post_types as $post_type ) { $object = get_post_type_object( $post_type ); $type_args = array( @@ -192,7 +190,9 @@ class Display_Featured_Image_Genesis_Helper { } /** - * Get all public content types. + * Get all public content types, not including built in. + * + * @since 2.5.0 * @return array */ protected function get_content_types() { @@ -206,6 +206,18 @@ class Display_Featured_Image_Genesis_Helper { return get_post_types( $args, $output ); } + /** + * Get all public content types, including built in. + * + * @since 2.5.0 + * @return array + */ + protected function get_content_types_built_in() { + $built_in = array( 'post', 'page' ); + $post_types = $this->get_content_types(); + return array_merge( $built_in, $post_types ); + } + /** * Determines if the user has permission to save the information from the submenu * page. diff --git a/includes/class-displayfeaturedimagegenesis-settings.php b/includes/class-displayfeaturedimagegenesis-settings.php index 7057cf9..42fff50 100644 --- a/includes/class-displayfeaturedimagegenesis-settings.php +++ b/includes/class-displayfeaturedimagegenesis-settings.php @@ -436,8 +436,7 @@ 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 ); + $post_types = $this->get_content_types_built_in(); foreach ( $post_types as $post_type ) { $new_value['skip'][ $post_type ] = $this->one_zero( $new_value['skip'][ $post_type ] ); }