getarchives_join

Filters the SQL JOIN clause for retrieving archives.

Description

apply_filters( 'getarchives_join', (string) $var, (array) $r ); 

Parameters (2)

0. $var (string) => ''
Portion of SQL query containing JOIN clause.
1. $r (array)
An array of default arguments.

Usage

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

Defined (1)

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

/wp-includes/general-template.php  
  1. $join = apply_filters( 'getarchives_join', '', $r );