diff --git a/includes/Classifai/Helpers.php b/includes/Classifai/Helpers.php index efc292355..de5fa66b7 100644 --- a/includes/Classifai/Helpers.php +++ b/includes/Classifai/Helpers.php @@ -191,10 +191,6 @@ function get_supported_post_types() { } } - if ( empty( $post_types ) ) { - $post_types = [ 'post' ]; - } - /** * Filter post types supported for language processing. * diff --git a/tests/Classifai/HelpersTest.php b/tests/Classifai/HelpersTest.php index 096c30d04..318e0fa10 100644 --- a/tests/Classifai/HelpersTest.php +++ b/tests/Classifai/HelpersTest.php @@ -29,7 +29,7 @@ function test_it_has_plugin_settings() { function test_it_has_default_supported_post_types() { $actual = get_supported_post_types(); - $this->assertEquals( [ 'post' ], $actual ); + $this->assertEquals( [], $actual ); } function test_it_can_lookup_supported_post_types_from_option() { diff --git a/tests/Classifai/Taxonomy/TaxonomyFactoryTest.php b/tests/Classifai/Taxonomy/TaxonomyFactoryTest.php index 44e8c84e2..7ba26d06d 100644 --- a/tests/Classifai/Taxonomy/TaxonomyFactoryTest.php +++ b/tests/Classifai/Taxonomy/TaxonomyFactoryTest.php @@ -52,6 +52,10 @@ function test_it_can_build_all_supported_taxonomies() { } function test_it_connects_watson_taxonomies_to_post_type() { + add_filter( 'classifai_post_types', function() { + return [ 'post' ]; + } ); + $this->factory->build_all(); $actual = get_object_taxonomies( 'post' );