duplicate_post_new_post

duplicate_post_new_post

Hook Type: filter

See hook in core

Displaying hooks found in version: duplicate-post.4.5

apply_filters('duplicate_post_new_post') is found 2 times:

  • /admin-functions.php line 710
    	 * @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 110
    			 * @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 );