term_name
Filters display of the term name in the terms list table.
The default output may include padding due to the term's current level in the term hierarchy.
Usage
add_filter( 'term_name', 'wp_kama_term_name_filter', 10, 2 ); /** * Function for `term_name` filter-hook. * * @param string $pad_tag_name The term name, padded if not top-level. * @param WP_Term $tag Term object. * * @return string */ function wp_kama_term_name_filter( $pad_tag_name, $tag ){ // filter... return $pad_tag_name; }
- $pad_tag_name(string)
- The term name, padded if not top-level.
- $tag(WP_Term)
- Term object.
Changelog
Since 2.5.0 | Introduced. |
Where the hook is called
wp-admin/includes/class-wp-terms-list-table.php 401
$name = apply_filters( 'term_name', $pad . ' ' . $tag->name, $tag );
Where the hook is used in WordPress
wp-includes/default-filters.php 155
add_filter( $filter, 'wptexturize' );
wp-includes/default-filters.php 156
add_filter( $filter, 'convert_chars' );
wp-includes/default-filters.php 157
add_filter( $filter, 'esc_html' );
wp-includes/default-filters.php 31
add_filter( $filter, 'sanitize_text_field' );
wp-includes/default-filters.php 32
add_filter( $filter, 'wp_kses_data' );
wp-includes/default-filters.php 34
add_filter( $filter, '_wp_specialchars', 30 );