diff --git src/wp-includes/class-wp-comment-query.php src/wp-includes/class-wp-comment-query.php
index ac122a6..11f6861 100644
|
|
class WP_Comment_Query { |
135 | 135 | * |
136 | 136 | * Sets up the comment query, based on the query vars passed. |
137 | 137 | * |
| 138 | * The main comment query is cached, using a key that is generated using the WP_Comment_Query query vars. |
| 139 | * In order to minimize cache misses, arguments that are not defined in the `$query_var_defaults` array are |
| 140 | * ignored when generating the cache key. If you are passing custom query arguments to WP_Comment_Query, and |
| 141 | * you need the query cache to be sensitive to these arguments, add them to the defaults array using the |
| 142 | * {@see 'comment_query_defaults'} filter. |
| 143 | * |
138 | 144 | * @since 4.2.0 |
139 | 145 | * @since 4.4.0 `$parent__in` and `$parent__not_in` were added. |
140 | 146 | * @since 4.4.0 Order by `comment__in` was added. `$update_comment_meta_cache`, `$no_found_rows`, |
… |
… |
class WP_Comment_Query { |
245 | 251 | * } |
246 | 252 | */ |
247 | 253 | public function __construct( $query = '' ) { |
248 | | $this->query_var_defaults = array( |
| 254 | $defaults = array( |
249 | 255 | 'author_email' => '', |
250 | 256 | 'author_url' => '', |
251 | 257 | 'author__in' => '', |
… |
… |
class WP_Comment_Query { |
289 | 295 | 'update_comment_post_cache' => false, |
290 | 296 | ); |
291 | 297 | |
| 298 | /** |
| 299 | * Filters the default comment query arguments. |
| 300 | * |
| 301 | * @since 4.5.0 |
| 302 | * |
| 303 | * @param array $defaults Array of default WP_Comment_Query arguments. |
| 304 | */ |
| 305 | $this->query_var_defaults = apply_filters( 'comment_query_defaults', $defaults ); |
| 306 | |
292 | 307 | if ( ! empty( $query ) ) { |
293 | 308 | $this->query( $query ); |
294 | 309 | } |
diff --git src/wp-includes/post.php src/wp-includes/post.php
index cc8e843..e33eecb 100644
|
|
function get_page_uri( $page ) { |
4319 | 4319 | /** |
4320 | 4320 | * Retrieve a list of pages. |
4321 | 4321 | * |
| 4322 | * SQL queries in get_pages() are cached, using a key that is generated using the `$args` array. In order to |
| 4323 | * minimize cache misses, arguments that are not defined in the `$defaults` array are ignored when generating the |
| 4324 | * cache key. If you are passing custom parameters as part of the `$args` array, and you need the query cache to be |
| 4325 | * sensitive to these parameters, add them to the `$defaults` array using the {@see 'get_pages_defaults'} filter. |
| 4326 | * |
| 4327 | * |
4322 | 4328 | * @global wpdb $wpdb WordPress database abstraction object. |
4323 | 4329 | * |
4324 | 4330 | * @since 1.5.0 |
… |
… |
function get_pages( $args = array() ) { |
4371 | 4377 | 'post_type' => 'page', 'post_status' => 'publish', |
4372 | 4378 | ); |
4373 | 4379 | |
| 4380 | /** |
| 4381 | * Filters the default page query arguments. |
| 4382 | * |
| 4383 | * @since 4.5.0 |
| 4384 | * |
| 4385 | * @param array $defaults Array of default get_pages() arguments. |
| 4386 | */ |
| 4387 | $defaults = apply_filters( 'get_pages_defaults', $defaults ); |
| 4388 | |
4374 | 4389 | $r = wp_parse_args( $args, $defaults ); |
4375 | 4390 | |
4376 | 4391 | $number = (int) $r['number']; |
diff --git src/wp-includes/taxonomy.php src/wp-includes/taxonomy.php
index 5f5127a..8e5cfbf 100644
|
|
function get_term_to_edit( $id, $taxonomy ) { |
1052 | 1052 | * The {@see 'list_terms_exclusions'} filter passes the compiled exclusions along with |
1053 | 1053 | * the $args. |
1054 | 1054 | * |
| 1055 | * SQL queries in get_terms() are cached, using a key that is generated using the `$args` array. In order to |
| 1056 | * minimize cache misses, arguments that are not defined in the `$defaults` array are ignored when generating the |
| 1057 | * cache key. If you are passing custom parameters as part of the `$args` array, and you need the query cache to be |
| 1058 | * sensitive to these parameters, add them to the `$defaults` array using the {@see 'get_terms_defaults'} filter. |
| 1059 | * |
1055 | 1060 | * The {@see 'get_terms_orderby'} filter passes the `ORDER BY` clause for the query |
1056 | 1061 | * along with the $args array. |
1057 | 1062 | * |