# wpsso/22.7.0/lib/integ/util/duplicate-post.php

WPSSO Core – Complete Schema Markup and Meta Tags, version 22.7.0. 43 lines.

- Page: https://pluginprobe.com/plugins/wpsso/22.7.0/code/lib/integ/util/duplicate-post.php
- Raw: https://pluginprobe.com/plugins/wpsso/22.7.0/raw/lib/integ/util/duplicate-post.php
- Modified: 2026-08-31T18:38:08+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wpsso/22.7.0/code/lib/integ/util/duplicate-post.php#L10-L20`.

```php
<?php
/*
 * License: GPLv3
 * License URI: https://www.gnu.org/licenses/gpl.txt
 * Copyright 2024-2026 Jean-Sebastien Morisset (https://wpsso.com/)
 */

if ( ! defined( 'ABSPATH' ) ) {

	die( 'These aren\'t the droids you\'re looking for.' );
}

if ( ! class_exists( 'WpssoIntegUtilDuplicatePost' ) ) {

	class WpssoIntegUtilDuplicatePost {

		private $p;	// Wpsso class object.

		public function __construct( &$plugin ) {

			$this->p =& $plugin;

			if ( $this->p->debug->enabled ) {

				$this->p->debug->mark();
			}
			
			/*
			 * Prevent Yoast Duplicate Post from creating duplicate entries in the metadata table.
			 */
			add_filter( 'duplicate_post_excludelist_filter', array( $this, 'duplicate_post_excludelist_filter' ), 10, 1 );
		}

		/*
		 * Prevent Yoast Duplicate Post from creating duplicate entries in the metadata table.
		 */
		public function duplicate_post_excludelist_filter( $exclude_keys ) {

			return WpssoAbstractWpMeta::add_duplicate_exclude_meta_keys( $exclude_keys );
		}
	}
}

```
