diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php
index f361c3b..7f86a53 100644
a
|
b
|
function sanitize_term_field($field, $value, $term_id, $taxonomy, $context) { |
2005 | 2005 | * @since 2.3.0 |
2006 | 2006 | * |
2007 | 2007 | * @param string $taxonomy Taxonomy name |
2008 | | * @param array|string $args Overwrite defaults. See get_terms() |
| 2008 | * @param array|string $args Overwrite defaults. See {@see 'get_terms'} for details. |
| 2009 | * |
2009 | 2010 | * @return array|int|WP_Error How many terms are in $taxonomy. WP_Error if $taxonomy does not exist. |
2010 | 2011 | */ |
2011 | 2012 | function wp_count_terms( $taxonomy, $args = array() ) { |
2012 | | $defaults = array('hide_empty' => false); |
2013 | | $args = wp_parse_args($args, $defaults); |
| 2013 | $defaults = array( 'hide_empty' => false ); |
| 2014 | $args = wp_parse_args( $args, $defaults ); |
2014 | 2015 | |
2015 | 2016 | // backwards compatibility |
2016 | | if ( isset($args['ignore_empty']) ) { |
| 2017 | if ( isset( $args['ignore_empty'] ) ) { |
2017 | 2018 | $args['hide_empty'] = $args['ignore_empty']; |
2018 | | unset($args['ignore_empty']); |
| 2019 | unset( $args['ignore_empty'] ); |
2019 | 2020 | } |
2020 | 2021 | |
2021 | 2022 | $args['fields'] = 'count'; |
2022 | 2023 | |
2023 | | return get_terms($taxonomy, $args); |
| 2024 | return get_terms( $taxonomy, $args ); |
2024 | 2025 | } |
2025 | 2026 | |
2026 | 2027 | /** |