learndash_sensei_import_meta

apply_filters( 'learndash_sensei_import_meta',  array $dest_post_meta,  WP_Post $source_post,  WP_Post $dest_post )

Filters duplicate post meta.


Description #

Used in duplicate_post function to create duplicate post of any post.


Parameters #

$dest_post_meta

(array) An array of post meta values.

$source_post

(WP_Post) The source post from which copy is created.

$dest_post

(WP_Post) The duplicate post created from source post.


Source #

File: includes/import/class-ld-import-post.php


Examples #

 <?php
/**
 * Example usage for learndash_sensei_import_meta filter.
 */
add_filter(
	'learndash_sensei_import_meta',
	function( $dest_post_meta, $source_post, $dest_post ) {
		// May add any custom logic using $dest_post_meta, $source_post, $dest_post.

		// Always return $dest_post_meta.
		return $dest_post_meta;
	},
	10,
	3
);