wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



_wp_random_content_sample_clause › WordPress Function

Da7.2.0
Deprecaton/a
› _wp_random_content_sample_clause ( $post_ids )
Accedi:
  • private
Parametri:
  • (int[]) $post_ids Post IDs.
    Richiesto: Sì
Ritorna:
  • (string) SQL clause.
Definito a:
Codex:

Retrieves the SQL clause limiting the random content query to random post IDs.



Sorgenti

function _wp_random_content_sample_clause( array $post_ids ): string {
	global $wpdb;

	return "{$wpdb->posts}.ID IN (" . implode( ',', array_map( 'intval', $post_ids ) ) . ')';
}