WPDev.one
Core Function
View Source on Trac ↗

_wp_copy_post_meta()

_wp_copy_post_meta( mixed $source_post_id, mixed $target_post_id, mixed $meta_key )

Copy post meta for the given key from one post to another.

Parameters 3 required

Name / Type Description
$source_post_id
int

Post ID to copy meta value(s) from.

Required
$target_post_id
int

Post ID to copy meta value(s) to.

Required
$meta_key
string

Meta key to copy.

Required

Return Value

(void)
No return value description available.

Function Information

Since Version
6.4.0
Source File
wp-includes/revision.php
Advertisement