wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



_wp_random_content_sample_clause › WordPress Function

Seit7.2.0
Veraltetn/v
› _wp_random_content_sample_clause ( $post_ids )
Zugriff:
  • private
Parameter:
  • (int[]) $post_ids Post IDs.
    Erforderlich: Ja
Gibt zurück:
  • (string) SQL clause.
Definiert in:
Codex:

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



Quellcode

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

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