Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: pre_trackback_post

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
102       * @since 4.7.0
103       *
104       * @param int    $post_id       Post ID related to the trackback.
105       * @param string $trackback_url Trackback URL.
106       * @param string $charset       Character set.
107       * @param string $title         Trackback title.
108       * @param string $excerpt       Trackback excerpt.
109       * @param string $blog_name     Blog name.
110       */
111      do_action( 'pre_trackback_post', $post_id, $trackback_url, $charset, $title, $excerpt, $blog_name );
112
113      header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ) );
114
115      if ( ! pings_open( $post_id ) ) {
116           trackback_response( 1, __( 'Sorry, trackbacks are closed for this item.' ) );
117      }
118
119      $title   = wp_html_excerpt( $title, 250, '…' );
120      $excerpt = wp_html_excerpt( $excerpt, 252, '…' );