From 8c06cda6300eaed579b2b718837220a77d546a44 Mon Sep 17 00:00:00 2001
From: Paul Biron <paul@sparrowhawkcomputing.com>
Date: Fri, 11 Oct 2019 17:57:50 -0600
Subject: [PATCH] Add a 'terms_list_table_query_args' filter just before
WP_Terms_List_Table populates the terms in the list table.
---
src/wp-admin/includes/class-wp-terms-list-table.php | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/wp-admin/includes/class-wp-terms-list-table.php b/src/wp-admin/includes/class-wp-terms-list-table.php
index 33ef9fa8d6..41dbb66f28 100644
a
|
b
|
class WP_Terms_List_Table extends WP_List_Table { |
239 | 239 | $args['offset'] = $args['number']; |
240 | 240 | } |
241 | 241 | |
| 242 | /** |
| 243 | * Filters the query arguments used to retrieve terms for the current terms list table. |
| 244 | * |
| 245 | * @since 5.4 |
| 246 | * |
| 247 | * @param array $args Arguments passed to get_terms to retrieve items for the current |
| 248 | * terms list table. |
| 249 | */ |
| 250 | $args = apply_filters( 'terms_list_table_query_args', $args ); |
| 251 | |
242 | 252 | $terms = get_terms( $args ); |
243 | 253 | |
244 | 254 | if ( empty( $terms ) || ! is_array( $terms ) ) { |