File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Plugin Name: The SEO Framework - Compatibility with Advanced Woo Search
4
+ * Plugin URI: https://theseoframework.com/
5
+ * Description: This plugin disables TSF's SEO support for Advanced Woo Search pages.
6
+ * Version: 1.0.0
7
+ * Author: Sybre Waaijer
8
+ * Author URI: https://theseoframework.com/
9
+ * License: GPLv3
10
+ * Requires at least: 5.9
11
+ * Requires PHP: 7.4.0
12
+ * Requires Plugins: autodescription
13
+ *
14
+ * @package My_The_SEO_Framework\Compatbility
15
+ */
16
+
17
+ add_filter (
18
+ 'the_seo_framework_query_supports_seo ' ,
19
+ function ( $ supported ) {
20
+ // If the query already doesn't support SEO, bail.
21
+ if ( ! $ supported ) return $ supported ;
22
+
23
+ // phpcs:ignore, WordPress.Security.NonceVerification -- We're not processing data.
24
+ if ( tsf ()->query ()->is_search () && ! empty ( $ _GET ['type_aws ' ] ) )
25
+ $ supported = false ;
26
+
27
+ return $ supported ;
28
+ },
29
+ );
You can’t perform that action at this time.
0 commit comments