wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



_wp_random_content_sample_clause › WordPress Function

Depuis7.2.0
Dépréciéen/a
› _wp_random_content_sample_clause ( $post_ids )
Accès:
  • private
Paramètres:
  • (int[]) $post_ids Post IDs.
    Requis: Oui
Retourne:
  • (string) SQL clause.
Défini(e) dans:
Codex:

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



Source

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

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