wp_import_insert_post

The WordPress Importer wp import insert post hook.

Description

do_action( 'wp_import_insert_post', (unknown) $post_id, (unknown) $original_post_id, (unknown) $postdata, (unknown) $post ); 

Parameters (4)

0. $post_id (unknown)
The post id.
1. $original_post_id (unknown)
The original post id.
2. $postdata (unknown)
The postdata.
3. $post (unknown)
The post.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'wp_import_insert_post', $post_id, $original_post_id, $postdata, $post ); 
The following example is for adding a hook callback.
  1. // define the wp_import_insert_post callback 
  2. function action_wp_import_insert_post( $post_id, $original_post_id, $postdata, $post ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'wp_import_insert_post', 'action_wp_import_insert_post', 10, 4 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'wp_import_insert_post', 'action_wp_import_insert_post', 10, 4 ); 

Defined (1)

The action is defined in the following location(s).

/wordpress-importer.php  
  1. do_action( 'wp_import_insert_post', $post_id, $original_post_ID, $postdata, $post );