pre_remote_source

Filters the pingback remote source.

Description

apply_filters( 'pre_remote_source', (string) $remote_source, (string) $pagelinkedto ); 

Parameters (2)

0. $remote_source (string)
Response source for the page linked from.
1. $pagelinkedto (string)
URL of the page linked to.

Usage

To run the hook, copy the example below.
  1. $remote_source = apply_filters( 'pre_remote_source', $remote_source, $pagelinkedto ); 
  2.  
  3. if ( !empty( $remote_source ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the pre_remote_source callback 
  2. function filter_pre_remote_source( $remote_source, $pagelinkedto ) { 
  3. // make filter magic happen here... 
  4. return $remote_source
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'pre_remote_source', 'filter_pre_remote_source', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'pre_remote_source', 'filter_pre_remote_source', 10, 2 ); 

Defined (1)

The filter is defined in the following location(s).

/wp-includes/class-wp-xmlrpc-server.php  
  1. $remote_source = apply_filters( 'pre_remote_source', $remote_source, $pagelinkedto );