PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 18.1
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v18.1
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
wordpress-seo / src / integrations / duplicate-post-integration.php

duplicate-post-integration.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 18.1, at src/integrations/duplicate-post-integration.php

37 lines 860 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Yoast\WP\SEO\Integrations;
4
5 use Yoast\WP\SEO\Conditionals\No_Conditionals;
6
7 /**
8 * Class to manage the integration with Yoast Duplicate Post.
9 */
10 class Duplicate_Post_Integration implements Integration_Interface {
11
12 use No_Conditionals;
13
14 /**
15 * Initializes the integration.
16 *
17 * This is the place to register hooks and filters.
18 *
19 * @return void
20 */
21 public function register_hooks() {
22 \add_filter( 'duplicate_post_excludelist_filter', [ $this, 'exclude_zapier_meta' ] );
23 }
24
25 /**
26 * Filters out the Zapier meta when you copy a post with Yoast Duplicate Post.
27 *
28 * @param array $meta_excludelist The current excludelist of meta fields.
29 *
30 * @return array The updated excludelist.
31 */
32 public function exclude_zapier_meta( $meta_excludelist ) {
33 $meta_excludelist[] = 'zapier_trigger_sent';
34 return $meta_excludelist;
35 }
36 }
37