mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-11-02 21:00:40 +00:00
Taxonomy: Introduce the is_term_publicly_viewable() function.
This is the taxonomy term counterpart to the `is_post_publicly_viewable()` function. Although the logic for terms is more straight forward this serves the same purpose as introducing the corresponding function for posts -- to centralise and reduce the logic needed to validate a term and determine if it's publicly viewable. Props peterwilsoncc, costdev, johnbillion Fixes #56215 git-svn-id: https://develop.svn.wordpress.org/trunk@53893 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -460,7 +460,6 @@ class WP_Terms_List_Table extends WP_List_Table {
|
||||
// Restores the more descriptive, specific name for use within this method.
|
||||
$tag = $item;
|
||||
$taxonomy = $this->screen->taxonomy;
|
||||
$tax = get_taxonomy( $taxonomy );
|
||||
$uri = wp_doing_ajax() ? wp_get_referer() : $_SERVER['REQUEST_URI'];
|
||||
|
||||
$edit_link = add_query_arg(
|
||||
@@ -497,7 +496,7 @@ class WP_Terms_List_Table extends WP_List_Table {
|
||||
);
|
||||
}
|
||||
|
||||
if ( is_taxonomy_viewable( $tax ) ) {
|
||||
if ( is_term_publicly_viewable( $tag ) ) {
|
||||
$actions['view'] = sprintf(
|
||||
'<a href="%s" aria-label="%s">%s</a>',
|
||||
get_term_link( $tag ),
|
||||
|
||||
Reference in New Issue
Block a user