WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
2519 |
|
2520 | // very stupid, but gives time to the 'from' server to publish ! |
2521 | sleep(1); |
2522 |
|
2523 | // Let's check the remote site |
2524 | $linea = wp_remote_fopen( $pagelinkedfrom ); |
2525 | if ( !$linea ) |
2526 | return new IXR_Error(16, __('The source URL does not exist.')); |
2527 |
|
2528 | $linea = apply_filters('pre_remote_source', $linea, $pagelinkedto); |
2529 |
|
2530 | // Work around bug in strip_tags(): |
2531 | $linea = str_replace('<!DOC', '<DOC', $linea); |
2532 | $linea = preg_replace( '/[\s\r\n\t]+/', ' ', $linea ); // normalize spaces |
2533 | $linea = preg_replace( "/ <(h1|h2|h3|h4|h5|h6|p|th|td|li|dt|dd|pre|caption|input|textarea|button|body)[^>]*>/", "\n\n", $linea ); |
2534 |
|
2535 | preg_match('|<title>([^<]*?)</title>|is', $linea, $matchtitle); |
2536 | $title = $matchtitle[1]; |
2537 | if ( empty( $title ) ) |