rebase on oct-10-2023
This commit is contained in:
@@ -185,7 +185,7 @@ class WP_Terms_List_Table extends WP_List_Table {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return string[] Array of column titles keyed by their column name.
|
||||
*/
|
||||
public function get_columns() {
|
||||
$columns = array(
|
||||
@@ -208,12 +208,20 @@ class WP_Terms_List_Table extends WP_List_Table {
|
||||
* @return array
|
||||
*/
|
||||
protected function get_sortable_columns() {
|
||||
$taxonomy = $this->screen->taxonomy;
|
||||
|
||||
if ( ! isset( $_GET['orderby'] ) && is_taxonomy_hierarchical( $taxonomy ) ) {
|
||||
$name_orderby_text = __( 'Table ordered hierarchically.' );
|
||||
} else {
|
||||
$name_orderby_text = __( 'Table ordered by Name.' );
|
||||
}
|
||||
|
||||
return array(
|
||||
'name' => 'name',
|
||||
'description' => 'description',
|
||||
'slug' => 'slug',
|
||||
'posts' => 'count',
|
||||
'links' => 'count',
|
||||
'name' => array( 'name', false, _x( 'Name', 'term name' ), $name_orderby_text, 'asc' ),
|
||||
'description' => array( 'description', false, __( 'Description' ), __( 'Table ordered by Description.' ) ),
|
||||
'slug' => array( 'slug', false, __( 'Slug' ), __( 'Table ordered by Slug.' ) ),
|
||||
'posts' => array( 'count', false, _x( 'Count', 'Number/count of items' ), __( 'Table ordered by Posts Count.' ) ),
|
||||
'links' => array( 'count', false, __( 'Links' ), __( 'Table ordered by Links.' ) ),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -357,7 +365,7 @@ class WP_Terms_List_Table extends WP_List_Table {
|
||||
|
||||
if ( current_user_can( 'delete_term', $tag->term_id ) ) {
|
||||
return sprintf(
|
||||
'<label class="screen-reader-text" for="cb-select-%1$s">%2$s</label>' .
|
||||
'<label class="label-covers-full-cell" for="cb-select-%1$s"><span class="screen-reader-text">%2$s</span></label>' .
|
||||
'<input type="checkbox" name="delete_tags[]" value="%1$s" id="cb-select-%1$s" />',
|
||||
$tag->term_id,
|
||||
/* translators: Hidden accessibility text. %s: Taxonomy term name. */
|
||||
|
||||
Reference in New Issue
Block a user