posts_where filter-hookWP 1.5.0

Filters the WHERE clause of the query.

Usage

add_filter( 'posts_where', 'wp_kama_posts_where_filter' );

/**
 * Function for `posts_where` filter-hook.
 * 
 * @param string $where The WHERE clause of the query.
 *
 * @return string
 */
function wp_kama_posts_where_filter( $where ){

	// filter...
	return $where;
}
$where(string)
The WHERE clause of the query.

Changelog

Since 1.5.0 Introduced.

Where the hook is called

WP_Query::get_posts()
posts_where
wp-includes/class-wp-query.php 2668
$where = apply_filters_ref_array( 'posts_where', array( $where, &$this ) );

Where the hook is used in WordPress

Usage not found.