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
3489
3490           // very stupid, but gives time to the 'from' server to publish !
3491           sleep(1);
3492
3493           // Let's check the remote site
3494           $linea = wp_remote_fopen( $pagelinkedfrom );
3495           if ( !$linea )
3496                  return new IXR_Error(16, __('The source URL does not exist.'));
3497
3498           $linea = apply_filters('pre_remote_source', $linea, $pagelinkedto);
3499
3500           // Work around bug in strip_tags():
3501           $linea = str_replace('<!DOC', '<DOC', $linea);
3502           $linea = preg_replace( '/[\s\r\n\t]+/', ' ', $linea ); // normalize spaces
3503           $linea = preg_replace( "/ <(h1|h2|h3|h4|h5|h6|p|th|td|li|dt|dd|pre|caption|input|textarea|button|body)[^>]*>/", "\n\n", $linea );
3504
3505           preg_match('|<title>([^<]*?)</title>|is', $linea, $matchtitle);
3506           $title = $matchtitle[1];
3507           if ( empty( $title ) )