WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 101 | * @since 4.7.0 |
| 102 | * |
| 103 | * @param int $tb_id Post ID related to the trackback. |
| 104 | * @param string $tb_url Trackback URL. |
| 105 | * @param string $charset Character Set. |
| 106 | * @param string $title Trackback Title. |
| 107 | * @param string $excerpt Trackback Excerpt. |
| 108 | * @param string $blog_name Blog Name. |
| 109 | */ |
| 110 | do_action( 'pre_trackback_post', $tb_id, $tb_url, $charset, $title, $excerpt, $blog_name ); |
| 111 | |
| 112 | header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ) ); |
| 113 | |
| 114 | if ( ! pings_open( $tb_id ) ) { |
| 115 | trackback_response( 1, __( 'Sorry, trackbacks are closed for this item.' ) ); |
| 116 | } |
| 117 | |
| 118 | $title = wp_html_excerpt( $title, 250, '…' ); |
| 119 | $excerpt = wp_html_excerpt( $excerpt, 252, '…' ); |