wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



_wp_random_content_sample_clause › WordPress Function

Od7.2.0
Przestarzałyn/a
› _wp_random_content_sample_clause ( $post_ids )
Dostęp:
  • private
Parametry:
  • (int[]) $post_ids Post IDs.
    Wymagane: Tak
Powrót:
  • (string) SQL clause.
Zdefiniowane na:
Codex:

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



Źródło

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

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