duplicate_post_new_post
duplicate_post_new_post
Appears in: duplicate-post.4.0.1, duplicate-post.4.0.2, duplicate-post.4.1.1, duplicate-post.4.1.2, duplicate-post.4.4, duplicate-post.4.5
Hook Type: filter
Displaying hooks found in version: duplicate-post.4.5apply_filters('duplicate_post_new_post') is found 2 times:
- /admin-functions.php line 710706707708709710711712713714715
* @param WP_Post
$post
Original post object.
*
* @
return
array
*/
$new_post
= apply_filters(
'duplicate_post_new_post'
,
$new_post
,
$post
);
$new_post_id
= wp_insert_post( wp_slash(
$new_post
), true );
// If you have written a plugin which uses non-WP database tables to save
// information about a post you can hook this action to dupe that data.
if
(
$new_post_id
!== 0 && ! is_wp_error(
$new_post_id
) ) {
- /src/post-duplicator.php line 110106107108109110111112113114115116
* @param WP_Post
$post
Original post object.
*
* @
return
array
*/
$new_post
= \apply_filters(
'duplicate_post_new_post'
,
$new_post
,
$post
);
}
$new_post_id
= \wp_insert_post( \wp_slash(
$new_post
), true );
if
(
$options
[
'copy_date'
] ) {
\remove_filter(
'wp_insert_post_data'
, [
$this
,
'set_modified'
], 1 );