diff --git src/wp-includes/taxonomy.php src/wp-includes/taxonomy.php
index 70c465a..64bdb43 100644
|
|
|
class WP_Tax_Query {
|
| 1346 | 1346 | function get_term($term, $taxonomy, $output = OBJECT, $filter = 'raw') { |
| 1347 | 1347 | global $wpdb; |
| 1348 | 1348 | |
| | 1349 | /** |
| | 1350 | * Filter the term before it is retrieved by get_term(). |
| | 1351 | * |
| | 1352 | * If the filter returns a non-null value, the function will be short-circuited |
| | 1353 | * and will return this value instead. |
| | 1354 | * |
| | 1355 | * @since 4.3.0 |
| | 1356 | * |
| | 1357 | * @param null|mixed $pre_term Potential override of the normal return value for get_term(). |
| | 1358 | * @param array $args These arguments are defined on get_term(). |
| | 1359 | */ |
| | 1360 | $pre_term = apply_filters( 'pre_get_term', null, compact( 'term', 'taxonomy', 'output', 'filter' ) ); |
| | 1361 | if ( null !== $pre_term ) { |
| | 1362 | return $pre_term; |
| | 1363 | } |
| | 1364 | |
| 1349 | 1365 | if ( empty( $term ) ) { |
| 1350 | 1366 | return new WP_Error( 'invalid_term', __( 'Empty Term' ) ); |
| 1351 | 1367 | } |