meta_query_find_compatible_table_alias filter-hookWP 4.1.0

Filters the table alias identified as compatible with the current clause.

Usage

add_filter( 'meta_query_find_compatible_table_alias', 'wp_kama_meta_query_find_compatible_table_alias_filter', 10, 4 );

/**
 * Function for `meta_query_find_compatible_table_alias` filter-hook.
 * 
 * @param string|false  $alias        Table alias, or false if none was found.
 * @param array         $clause       First-order query clause.
 * @param array         $parent_query Parent of $clause.
 * @param WP_Meta_Query $query        WP_Meta_Query object.
 *
 * @return string|false
 */
function wp_kama_meta_query_find_compatible_table_alias_filter( $alias, $clause, $parent_query, $query ){

	// filter...
	return $alias;
}
$alias(string|false)
Table alias, or false if none was found.
$clause(array)
First-order query clause.
$parent_query(array)
Parent of $clause.
$query(WP_Meta_Query)
WP_Meta_Query object.

Changelog

Since 4.1.0 Introduced.

Where the hook is called

WP_Meta_Query::find_compatible_table_alias()
meta_query_find_compatible_table_alias
wp-includes/class-wp-meta-query.php 866
return apply_filters( 'meta_query_find_compatible_table_alias', $alias, $clause, $parent_query, $this );

Where the hook is used in WordPress

Usage not found.