wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema
wp_random_content_posts_where › WordPress Function
Desde7.2.0
Obsoleton/a
› wp_random_content_posts_where ( $where, $query )
| Parâmetros: (2) |
|
| Ver: | |
| Retorna: |
|
| Definido em: |
|
| Codex: |
Limits the random content query to the random post IDs.
Added to the Ver página de detalhe para 'posts_where'} filter by {@see WP::handle_random »" href="https://pt.wpseek.com/function/%26%23039%3Bposts_where%26%23039%3B%7D+filter+by+%7B%40see+%5CWP%3A%3Ahandle_random/">'posts_where'} filter by {@see WP::handle_random while the random content query runs.Fonte
function wp_random_content_posts_where( $where, WP_Query $query ): string {
$sample_ids = $query->get( 'random_sample_ids' );
if ( wp_is_random_content_query( $query ) && is_array( $sample_ids ) && $sample_ids ) {
$where .= ' AND ' . _wp_random_content_sample_clause( $sample_ids );
}
return (string) $where;
}