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
6947
6948           /**
6949            * Filters the pingback remote source.
6950            *
6951            * @since 2.5.0
6952            *
6953            * @param string $remote_source Response source for the page linked from.
6954            * @param string $pagelinkedto  URL of the page linked to.
6955            */
6956           $remote_source = apply_filters( 'pre_remote_source', $remote_source, $pagelinkedto );
6957
6958           // Work around bug in strip_tags():
6959           $remote_source = str_replace( '<!DOC', '<DOC', $remote_source );
6960           $remote_source = preg_replace( '/[\r\n\t ]+/', ' ', $remote_source ); // normalize spaces
6961           $remote_source = preg_replace( '/<\/*(h1|h2|h3|h4|h5|h6|p|th|td|li|dt|dd|pre|caption|input|textarea|button|body)[^>]*>/', "\n\n", $remote_source );
6962
6963           preg_match( '|<title>([^<]*?)</title>|is', $remote_source, $matchtitle );
6964           $title = isset( $matchtitle[1] ) ? $matchtitle[1] : '';
6965           if ( empty( $title ) ) {