- Timestamp:
- 07/10/2020 04:02:00 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-ms-users-list-table.php
r47557 r48424 25 25 26 26 /** 27 * @global string $mode List table view mode. 27 28 * @global string $usersearch 28 29 * @global string $role 29 * @global string $mode30 30 */ 31 31 public function prepare_items() { 32 global $usersearch, $role, $mode; 32 global $mode, $usersearch, $role; 33 34 if ( ! empty( $_REQUEST['mode'] ) ) { 35 $mode = 'excerpt' === $_REQUEST['mode'] ? 'excerpt' : 'list'; 36 set_user_setting( 'network_users_list_mode', $mode ); 37 } else { 38 $mode = get_user_setting( 'network_users_list_mode', 'list' ); 39 } 33 40 34 41 $usersearch = isset( $_REQUEST['s'] ) ? wp_unslash( trim( $_REQUEST['s'] ) ) : ''; … … 82 89 if ( isset( $_REQUEST['order'] ) ) { 83 90 $args['order'] = $_REQUEST['order']; 84 }85 86 if ( ! empty( $_REQUEST['mode'] ) ) {87 $mode = 'excerpt' === $_REQUEST['mode'] ? 'excerpt' : 'list';88 set_user_setting( 'network_users_list_mode', $mode );89 } else {90 $mode = get_user_setting( 'network_users_list_mode', 'list' );91 91 } 92 92 … … 423 423 $actions = apply_filters( 'ms_user_list_site_actions', $actions, $val->userblog_id ); 424 424 425 $i = 0;426 425 $action_count = count( $actions ); 426 427 $i = 0; 428 427 429 foreach ( $actions as $action => $link ) { 428 430 ++$i; 429 $sep = ( $i == $action_count ) ? '' : ' | '; 431 432 $sep = ( $i < $action_count ) ? ' | ' : ''; 433 430 434 echo "<span class='$action'>$link$sep</span>"; 431 435 } 436 432 437 echo '</small></span><br/>'; 433 438 }
Note: See TracChangeset
for help on using the changeset viewer.