summaryrefslogtreecommitdiff
path: root/inc/compatibility/class-astra-yoast-seo.php
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2021-07-21 14:54:07 -0500
committerZach van Rijn <me@zv.io>2021-07-21 14:54:07 -0500
commit9d4123cee1867ee7199b06bdc92d40611f547ecc (patch)
tree6d864e2725242863afed1f8ba12d9c7a9bc63a69 /inc/compatibility/class-astra-yoast-seo.php
downloadblog-ng-9d4123cee1867ee7199b06bdc92d40611f547ecc.tar.gz
blog-ng-9d4123cee1867ee7199b06bdc92d40611f547ecc.tar.bz2
blog-ng-9d4123cee1867ee7199b06bdc92d40611f547ecc.tar.xz
blog-ng-9d4123cee1867ee7199b06bdc92d40611f547ecc.zip
Initial unmodified import from Astra (Version: 3.6.5) @ /wp-content/themes/astra/.
Diffstat (limited to 'inc/compatibility/class-astra-yoast-seo.php')
-rw-r--r--inc/compatibility/class-astra-yoast-seo.php40
1 files changed, 40 insertions, 0 deletions
diff --git a/inc/compatibility/class-astra-yoast-seo.php b/inc/compatibility/class-astra-yoast-seo.php
new file mode 100644
index 0000000..1873f7f
--- /dev/null
+++ b/inc/compatibility/class-astra-yoast-seo.php
@@ -0,0 +1,40 @@
+<?php
+/**
+ * Yoast SEO Compatibility File.
+ *
+ * @package Astra
+ */
+
+/**
+ * Astra Yoast SEO Compatibility
+ *
+ * @since 2.1.2
+ */
+class Astra_Yoast_SEO {
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ add_filter( 'wpseo_sitemap_exclude_post_type', array( $this, 'sitemap_exclude_post_type' ), 10, 2 );
+ }
+
+ /**
+ * Exclude One Content Type From Yoast SEO Sitemap
+ *
+ * @param string $value value.
+ * @param string $post_type Post Type.
+ * @since 2.1.2
+ */
+ public function sitemap_exclude_post_type( $value, $post_type ) {
+ if ( 'astra-advanced-hook' === $post_type ) {
+ return true;
+ }
+ }
+
+}
+
+/**
+ * Kicking this off by object
+ */
+new Astra_Yoast_SEO();