Uses
Uses | Description |
---|---|
wp-includes/capabilities.php: current_user_can() | Returns whether the current user has the specified capability. |
wp-includes/l10n.php: __() | Retrieve the translation of $text. |
(WP_Term) (Required) Term object.
(string)
File: wp-admin/includes/class-wp-terms-list-table.php
public function column_cb( $tag ) { if ( current_user_can( 'delete_term', $tag->term_id ) ) { return sprintf( '<label class="screen-reader-text" for="cb-select-%1$s">%2$s</label>' . '<input type="checkbox" name="delete_tags[]" value="%1$s" id="cb-select-%1$s" />', $tag->term_id, /* translators: %s: Taxonomy term name. */ sprintf( __( 'Select %s' ), $tag->name ) ); } return ' '; }
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_terms_list_table/column_cb