mbr/post/insert
Usage
This action hook enables you to run code after a page/post has been inserted.
Parameters
Parameters | Description |
---|---|
$post_id | Variable containing the post ID of the page/post being inserted. |
$post | Contains the entire $post object. |
Examples
- Example 1
function my_mbr_insert_post($post_id, $post) {
// $post_id is the post ID of the page/post being inserted
// $post is the content of the entire "$post" object
// add your code to perform any desired action, such as sending an email notification
// or changing field values in the inserted post
}
add_action('mbr/post/insert', 'my_mbr_insert_post',1,2);