diff --git a/includes/class-displayfeaturedimagegenesis-taxonomies.php b/includes/class-displayfeaturedimagegenesis-taxonomies.php index 920bae9..411ba6b 100644 --- a/includes/class-displayfeaturedimagegenesis-taxonomies.php +++ b/includes/class-displayfeaturedimagegenesis-taxonomies.php @@ -199,29 +199,6 @@ class Display_Featured_Image_Genesis_Taxonomies extends Display_Featured_Image_G return false; } - /** - * check if file type is image. updated to use WP function. - * @return bool - * @since 1.2.2 - * @since 2.5.0 - */ - protected function is_valid_img_ext( $file ) { - $valid = wp_check_filetype( $file ); - - return (bool) in_array( $valid['ext'], $this->allowed_file_types(), true ); - } - - /** - * Define the array of allowed image/file types. - * @return array - * @since 2.5.0 - */ - protected function allowed_file_types() { - $allowed = apply_filters( 'displayfeaturedimage_valid_img_types', array( 'jpg', 'jpeg', 'png', 'gif' ) ); - - return is_array( $allowed ) ? $allowed : explode( ',', $allowed ); - } - /** * Help tab for media screen * diff --git a/includes/settings/class-displayfeaturedimagegenesis-helper.php b/includes/settings/class-displayfeaturedimagegenesis-helper.php index 83a65e4..f66cc6d 100644 --- a/includes/settings/class-displayfeaturedimagegenesis-helper.php +++ b/includes/settings/class-displayfeaturedimagegenesis-helper.php @@ -336,6 +336,29 @@ class Display_Featured_Image_Genesis_Helper extends DisplayFeaturedImageGenesisG return $value; } + /** + * check if file type is image. updated to use WP function. + * @return bool + * @since 1.2.2 + * @since 2.5.0 + */ + protected function is_valid_img_ext( $file ) { + $valid = wp_check_filetype( $file ); + + return (bool) in_array( $valid['ext'], $this->allowed_file_types(), true ); + } + + /** + * Define the array of allowed image/file types. + * @return array + * @since 2.5.0 + */ + protected function allowed_file_types() { + $allowed = apply_filters( 'displayfeaturedimage_valid_img_types', array( 'jpg', 'jpeg', 'png', 'gif' ) ); + + return is_array( $allowed ) ? $allowed : explode( ',', $allowed ); + } + /** * Determines if the user has permission to save the information from the submenu * page. diff --git a/includes/settings/class-displayfeaturedimagegenesis-settings-validate.php b/includes/settings/class-displayfeaturedimagegenesis-settings-validate.php index 58960e4..6607c01 100644 --- a/includes/settings/class-displayfeaturedimagegenesis-settings-validate.php +++ b/includes/settings/class-displayfeaturedimagegenesis-settings-validate.php @@ -177,29 +177,6 @@ class Display_Featured_Image_Genesis_Settings_Validate extends Display_Featured_ return $message; } - /** - * check if file type is image. updated to use WP function. - * @return bool - * @since 1.2.2 - * @since 2.5.0 - */ - protected function is_valid_img_ext( $file ) { - $valid = wp_check_filetype( $file ); - - return (bool) in_array( $valid['ext'], $this->allowed_file_types(), true ); - } - - /** - * Define the array of allowed image/file types. - * @return array - * @since 2.5.0 - */ - protected function allowed_file_types() { - $allowed = apply_filters( 'displayfeaturedimage_valid_img_types', array( 'jpg', 'jpeg', 'png', 'gif' ) ); - - return is_array( $allowed ) ? $allowed : explode( ',', $allowed ); - } - /** * Returns a 1 or 0, for all truthy / falsy values. *