Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: pingback_ping_source_uri

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
5315           $pagelinkedfrom = $args[0];
5316           $pagelinkedto   = $args[1];
5317
5318           $title = '';
5319
5320           $pagelinkedfrom = str_replace('&', '&', $pagelinkedfrom);
5321           $pagelinkedto = str_replace('&', '&', $pagelinkedto);
5322           $pagelinkedto = str_replace('&', '&', $pagelinkedto);
5323
5324           $pagelinkedfrom = apply_filters( 'pingback_ping_source_uri', $pagelinkedfrom, $pagelinkedto );
5325           if ( ! $pagelinkedfrom )
5326                return $this->pingback_error( 0, __( 'A valid URL was not provided.' ) );
5327
5328           // Check if the page linked to is in our site
5329           $pos1 = strpos($pagelinkedto, str_replace(array('http://www.','http://','https://www.','https://'), '', get_option('home')));
5330           if ( !$pos1 )
5331                return $this->pingback_error( 0, __( 'Is there no link to us?' ) );
5332
5333           // let's find which post is linked to