Filters the DISTINCT clause of the query.
Parameters
Source
$distinct = apply_filters_ref_array( 'posts_distinct', array( $distinct, &$this ) );
Changelog
| Version | Description |
|---|---|
| 2.1.0 | Introduced. |
| CARVIEW |
Filters the DISTINCT clause of the query.
Returning “DISTINCTROW” from the filter has the same effect on the query as “DISTINCT”.
$distinct = apply_filters_ref_array( 'posts_distinct', array( $distinct, &$this ) );
| Used by | Description |
|---|---|
WP_Query::get_posts()wp-includes/class-wp-query.php | Retrieves an array of posts based on query variables. |
| Version | Description |
|---|---|
| 2.1.0 | Introduced. |
You must log in before being able to contribute a note or feedback.
Example Migrated from Codex:
Eliminate duplicates in posts returned, unless the duplicates is allowed