duplicate_post_meta_keys_filter

duplicate_post_meta_keys_filter

Hook Type: filter

See hook in core

Displaying hooks found in version: duplicate-post.4.5

apply_filters('duplicate_post_meta_keys_filter') is found 2 times:

  • /admin-functions.php line 380
    	 * @param array $meta_keys The list of meta fields name, with the ones in the excludelist already removed.
    	 *
    	 * @return array
    	 */
    	$meta_keys = apply_filters( 'duplicate_post_meta_keys_filter', $meta_keys );
    
    	foreach ( $meta_keys as $meta_key ) {
    		$meta_values = get_post_custom_values( $meta_key, $post->ID );
    		foreach ( $meta_values as $meta_value ) {
    			$meta_value = maybe_unserialize( $meta_value );
    			add_post_meta( $new_id, $meta_key, duplicate_post_wp_slash( $meta_value ) );
    
  • /src/post-duplicator.php line 291
    			 * @param array $meta_keys The list of meta fields name, with the ones in the excludelist already removed.
    			 *
    			 * @return array
    			 */
    			$meta_keys = \apply_filters( 'duplicate_post_meta_keys_filter', $meta_keys );
    		}
    
    		foreach ( $meta_keys as $meta_key ) {
    			$meta_values = \get_post_custom_values( $meta_key, $post->ID );
    
    			// Clear existing meta data so that add_post_meta() works properly with non-unique keys.