Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: pre_ping

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
626
627      foreach($post_links_temp[0] as $link_test) :
628           if ( !in_array($link_test, $pung) && (url_to_postid($link_test) != $post_ID) // If we haven't pung it already and it isn't a link to itself
629                     && !is_local_attachment($link_test) ) : // Also, let's never ping local attachments.
630                $test = parse_url($link_test);
631                if (isset($test['query']))
632                     $post_links[] = $link_test;
633                elseif(($test['path'] != '/') && ($test['path'] != ''))
634                     $post_links[] = $link_test;
635                do_action('pre_ping',  array(&$post_links, &$pung));
636           endif;
637      endforeach;
638
639      foreach ($post_links as $pagelinkedto){
640           debug_fwrite($log, "Processing -- $pagelinkedto\n");
641           $pingback_server_url = discover_pingback_server_uri($pagelinkedto, 2048);
642
643           if ($pingback_server_url) {
644                @ set_time_limit( 60 );