- removed UM prefix before UM custom roles;

This commit is contained in:
nikitozzzzzzz
2017-07-30 22:54:39 +03:00
parent 1cccd2caff
commit 8b9320b09f
6 changed files with 12 additions and 17 deletions
@@ -229,7 +229,7 @@ class UM_Roles_List_Table extends WP_List_Table {
return sprintf('%1$s %2$s', '<strong><a class="row-title" href="admin.php?page=um_roles&tab=edit&id=' . $item['key'] . '">'. ( ! empty( $item['_um_is_custom'] ) ? 'UM ' : '' ) . $item['name'] . '</a></strong>', $this->row_actions( $actions ) );
return sprintf('%1$s %2$s', '<strong><a class="row-title" href="admin.php?page=um_roles&tab=edit&id=' . $item['key'] . '">' . $item['name'] . '</a></strong>', $this->row_actions( $actions ) );
}
function column_roleid( $item ) {
@@ -325,16 +325,16 @@ foreach ( $wp_roles->roles as $roleID => $role_data ) {
switch( strtolower( $order ) ) {
case 'asc':
uasort( $roles, function( $a, $b ) {
$a['name'] = ! empty( $a['_um_is_custom'] ) ? 'UM ' . $a['name'] : $a['name'];
$b['name'] = ! empty( $b['_um_is_custom'] ) ? 'UM ' . $b['name'] : $b['name'];
//$a['name'] = ! empty( $a['_um_is_custom'] ) ? 'UM ' . $a['name'] : $a['name'];
//$b['name'] = ! empty( $b['_um_is_custom'] ) ? 'UM ' . $b['name'] : $b['name'];
return strnatcmp( $a['name'], $b['name'] );
} );
break;
case 'desc':
uasort( $roles, function( $a, $b ) {
$a['name'] = ! empty( $a['_um_is_custom'] ) ? 'UM ' . $a['name'] : $a['name'];
$b['name'] = ! empty( $b['_um_is_custom'] ) ? 'UM ' . $b['name'] : $b['name'];
//$a['name'] = ! empty( $a['_um_is_custom'] ) ? 'UM ' . $a['name'] : $a['name'];
//$b['name'] = ! empty( $b['_um_is_custom'] ) ? 'UM ' . $b['name'] : $b['name'];
return strnatcmp( $a['name'], $b['name'] ) * -1;
} );