the_category
the_category
Appears in: buddypress.10.1.0, buddypress.10.2.0, buddypress.10.3.0, buddypress.10.4.0, buddypress.10.5.0, buddypress.10.6.0, buddypress.11.0.0, buddypress.11.1.0, buddypress.11.2.0, buddypress.11.3.2, buddypress.11.4.0, buddypress.12.0.0, buddypress.12.1.1, buddypress.12.2.0, buddypress.12.3.0, buddypress.12.4.0, buddypress.12.4.1, buddypress.12.5.0, buddypress.12.5.1, buddypress.14.0.0, buddypress.14.1.0, buddypress.3.1.0, buddypress.3.2.0, buddypress.4.0.0, buddypress.4.1.0, buddypress.4.2.0, buddypress.4.3.0, buddypress.4.4.0, buddypress.5.0.0, buddypress.5.1.0, buddypress.5.1.1, buddypress.5.1.2, buddypress.5.2.0, buddypress.6.0.0, buddypress.6.1.0, buddypress.6.2.0, buddypress.6.3.0, buddypress.6.4.0, buddypress.7.0.0, buddypress.7.1.0, buddypress.7.2.0, buddypress.7.2.1, buddypress.7.3.0, buddypress.8.0.0, buddypress.9.0.0, buddypress.9.1.1, wordpress-4.0, wordpress-4.4, wordpress-4.8, wordpress-4.9, wordpress-4.9.4, wordpress-4.9.5, wordpress-4.9.6, wordpress-4.9.7, wordpress-4.9.8, wordpress-5.0, wordpress-5.0.1, wordpress-5.0.2, wordpress-5.0.3, wordpress-5.1, wordpress-5.1.1, wordpress-5.2, wordpress-5.2.1, wordpress-5.2.2, wordpress-5.2.3, wordpress-5.2.4, wordpress-5.3, wordpress-5.3.1, wordpress-5.3.2, wordpress-5.4, wordpress-5.4.1, wordpress-5.4.2, wordpress-5.5, wordpress-5.5.1, wordpress-5.5.2, wordpress-5.5.3, wordpress-5.6, wordpress-5.6.1, wordpress-5.6.2, wordpress-5.7, wordpress-5.7.1, wordpress-5.7.2, wordpress-5.8, wordpress-5.8.1, wordpress-5.8.2, wordpress-5.8.3, wordpress-5.9, wordpress-5.9.1, wordpress-5.9.2, wordpress-5.9.3, wordpress-6.0, wordpress-6.0.1, wordpress-6.0.2, wordpress-6.0.3, wordpress-6.1, wordpress-6.1.1, wordpress-6.2, wordpress-6.2.1, wordpress-6.2.2, wordpress-6.3, wordpress-6.3.1, wordpress-6.3.2, wordpress-6.4, wordpress-6.4.1, wordpress-6.4.2, wordpress-6.4.3, wordpress-6.5, wordpress-6.5.2, wordpress-6.5.3, wordpress-6.5.4, wordpress-6.5.5, wordpress-6.6, wordpress-6.6.1, wordpress-6.6.2
Hook Type: filter
Displaying hooks found in version: wordpress-6.6.2apply_filters('the_category') is found 8 times:
- /wp-admin/edit-tags.php line 630
printf(
/* translators: %s: Default category. */
__( ‘Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the default category %s. The default category cannot be deleted.’ ),
/** This filter is documented in wp-includes/category-template.php */
‘‘ . apply_filters( ‘the_category’, get_cat_name( get_option( ‘default_category’ ) ), ”, ” ) . ‘‘
);
?> - /wp-admin/includes/class-walker-category-checklist.php line 108
$output .= "\n" . '<li' . $class . '>' . '<div class="' . $inner_class . '" data-term-id=' . $category->term_id . ' tabindex="0" role="checkbox" aria-checked="' . $aria_checked . '">' . /** This filter is documented in wp-includes/category-template.php */ esc_html( apply_filters( 'the_category', $category->name, '', '' ) ) . '</div>'; } else { $is_selected = in_array( $category->term_id, $args['selected_cats'], true ); $is_disabled = ! empty( $args['disabled'] ); $output .= "\n<li id='{$taxonomy}-{$category->term_id}'$class>" . '<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="' . $name . '[]" id="in-' . $taxonomy . '-' . $category->term_id . '"' .
- /wp-admin/includes/class-walker-category-checklist.php line 118
'<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="' . $name . '[]" id="in-' . $taxonomy . '-' . $category->term_id . '"' . checked( $is_selected, true, false ) . disabled( $is_disabled, true, false ) . ' /> ' . /** This filter is documented in wp-includes/category-template.php */ esc_html( apply_filters( 'the_category', $category->name, '', '' ) ) . '</label>'; } } /** * Ends the element output, if needed. *
- /wp-admin/includes/template.php line 250
foreach ( $categories as $category ) { $cat_id = $category->term_id; /** This filter is documented in wp-includes/category-template.php */ $name = esc_html( apply_filters( 'the_category', $category->name, '', '' ) ); $checked = in_array( $cat_id, $checked_categories, true ) ? ' checked="checked"' : ''; echo '<li id="link-category-', $cat_id, '"><label for="in-link-category-', $cat_id, '" class="selectit"><input value="', $cat_id, '" type="checkbox" name="link_category[]" id="in-link-category-', $cat_id, '"', $checked, '/> ', $name, '</label></li>'; } } /**
global $wp_rewrite; if ( ! is_object_in_taxonomy( get_post_type( $post_id ), 'category' ) ) { /** This filter is documented in wp-includes/category-template.php */ return apply_filters( 'the_category', '', $separator, $parents ); } /** * Filters the categories before building the category list. * * @since 4.4.0
$categories = apply_filters( 'the_category_list', get_the_category( $post_id ), $post_id ); if ( empty( $categories ) ) { /** This filter is documented in wp-includes/category-template.php */ return apply_filters( 'the_category', __( 'Uncategorized' ), $separator, $parents ); } $rel = ( is_object( $wp_rewrite ) && $wp_rewrite->using_permalinks() ) ? 'rel="category tag"' : 'rel="category"'; $thelist = ''; if ( '' === $separator ) {
* @param string $separator Separator used between the categories. * @param string $parents How to display the category parents. Accepts 'multiple', * 'single', or empty. */ return apply_filters( 'the_category', $thelist, $separator, $parents ); } /** * Checks if the current post is within any of the given categories. * * The given categories are checked against the post's categories' term_ids, names and slugs.