if ( current_user_can( 'delete_term',
$tag->term_id
) ) { $actions['delete'
] =
sprintf( '<a href="%s" class="delete-tag aria-button-if-js" aria-label="%s">%s</a>',
wp_nonce_url( "edit-tags.php?action=delete&taxonomy=
$taxonomy&tag_ID=
$tag->term_id", 'delete-tag_' .
$tag->term_id
),
/* translators: %s: Taxonomy term name. */
esc_attr( sprintf( __( 'Delete “%s”'
),
$tag->name
) ),
__( 'Delete'
) );
} if ( is_term_publicly_viewable( $tag ) ) { $actions['view'
] =
sprintf( '<a href="%s" aria-label="%s">%s</a>',
get_term_link( $tag ),
/* translators: %s: Taxonomy term name. */
esc_attr( sprintf( __( 'View “%s” archive'
),
$tag->name
) ),
__( 'View'
) );
} /**
* Filters the action links displayed for each term in the Tags list table.
*
* @since 2.8.0
* @since 3.0.0 Deprecated in favor of {@see '{$taxonomy}_row_actions'} filter.
* @since 5.4.2 Restored (un-deprecated).
*
* @param string[] $actions An array of action links to be displayed. Default
* 'Edit', 'Quick Edit', 'Delete', and 'View'.
* @param WP_Term $tag Term object.
*/