pre_trackback_post

Fires before the trackback is added to a post.

Description

do_action( 'pre_trackback_post', (int) $tb_id, (string) $tb_url, (string) $charset, (string) $title, (string) $excerpt, (string) $blog_name ); 

Parameters (6)

0. $tb_id (int)
Post ID related to the trackback.
1. $tb_url (string)
Trackback URL.
2. $charset (string)
Character Set.
3. $title (string)
Trackback Title.
4. $excerpt (string)
Trackback Excerpt.
5. $blog_name (string)
The blog name.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'pre_trackback_post', $tb_id, $tb_url, $charset, $title, $excerpt, $blog_name ); 
The following example is for adding a hook callback.
  1. // define the pre_trackback_post callback 
  2. function action_pre_trackback_post( $tb_id, $tb_url, $charset, $title, $excerpt, $blog_name ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'pre_trackback_post', 'action_pre_trackback_post', 10, 6 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'pre_trackback_post', 'action_pre_trackback_post', 10, 6 ); 

Defined (1)

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

/wp-trackback.php  
  1. do_action( 'pre_trackback_post', $tb_id, $tb_url, $charset, $title, $excerpt, $blog_name );