On this page
is_term_publicly_viewable( int|WP_Term $term ): bool
Determines whether a term is publicly viewable.
Description
A term is considered publicly viewable if its taxonomy is viewable.
Parameters
$termint|WP_Term Required-
Term ID or term object.
Return
bool Whether the term is publicly viewable.
Source
File: wp-includes/taxonomy.php. View all references
function is_term_publicly_viewable( $term ) {
$term = get_term( $term );
if ( ! $term ) {
return false;
}
return is_taxonomy_viewable( $term->taxonomy );
}
Related
Uses
| Uses | Description |
|---|---|
| is_taxonomy_viewable() wp-includes/taxonomy.php | Determines whether a taxonomy is considered “viewable”. |
| get_term() wp-includes/taxonomy.php | Gets all term data from database by term ID. |
Used By
| Used By | Description |
|---|---|
| WP_Terms_List_Table::handle_row_actions() wp-admin/includes/class-wp-terms-list-table.php | Generates and displays row action links. |
| wp_admin_bar_edit_menu() wp-includes/admin-bar.php | Provides an edit link for posts and terms. |
Changelog
| Version | Description |
|---|---|
| 6.1.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/is_term_publicly_viewable