Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: pre_remote_source

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
5396                'timeout' => 10,
5397                'redirection' => 0,
5398                'limit_response_size' => 153600, // 150 KB
5399           );
5400           $linea = wp_remote_retrieve_body( wp_safe_remote_get( $pagelinkedfrom, $http_api_args ) );
5401
5402           if ( !$linea )
5403                  return $this->pingback_error( 16, __( 'The source URL does not exist.' ) );
5404
5405           $linea = apply_filters('pre_remote_source', $linea, $pagelinkedto);
5406
5407           // Work around bug in strip_tags():
5408           $linea = str_replace('<!DOC', '<DOC', $linea);
5409           $linea = preg_replace( '/[\r\n\t ]+/', ' ', $linea ); // normalize spaces
5410           $linea = preg_replace( "/<\/*(h1|h2|h3|h4|h5|h6|p|th|td|li|dt|dd|pre|caption|input|textarea|button|body)[^>]*>/", "\n\n", $linea );
5411
5412           preg_match('|<title>([^<]*?)</title>|is', $linea, $matchtitle);
5413           $title = $matchtitle[1];
5414           if ( empty( $title ) )