Filter hook 'getarchives_join'

in WP Core File wp-includes/general-template.php at line 2061

View Source

getarchives_join

Filter Hook
Description
Filters the SQL JOIN clause for retrieving archives.

Hook Information

File Location wp-includes/general-template.php View on GitHub
Hook Type Filter
Line Number 2061

Hook Parameters

Type Name Description
string $sql_join Portion of SQL query containing JOIN clause.
array $parsed_args An array of default arguments.

Usage Examples

Basic Usage
<?php
// Hook into getarchives_join
add_filter('getarchives_join', 'my_custom_filter', 10, 2);

function my_custom_filter($sql_join, $parsed_args) {
    // Your custom filtering logic here
    return $sql_join;
}

Source Code Context

wp-includes/general-template.php:2061 - How this hook is used in WordPress core
<?php
2056  	 * @since 2.2.0
2057  	 *
2058  	 * @param string $sql_join    Portion of SQL query containing JOIN clause.
2059  	 * @param array  $parsed_args An array of default arguments.
2060  	 */
2061  	$join = apply_filters( 'getarchives_join', '', $parsed_args );
2062  
2063  	$output = '';
2064  
2065  	$last_changed = wp_cache_get_last_changed( 'posts' );
2066  

PHP Documentation

<?php
/**
	 * Filters the SQL JOIN clause for retrieving archives.
	 *
	 * @since 2.2.0
	 *
	 * @param string $sql_join    Portion of SQL query containing JOIN clause.
	 * @param array  $parsed_args An array of default arguments.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/general-template.php
Related Hooks

Related hooks will be displayed here in future updates.