diff --git a/src/wp-admin/includes/class-wp-ms-sites-list-table.php b/src/wp-admin/includes/class-wp-ms-sites-list-table.php
index 6c7bcc3b44..c567d05d29 100644
a
|
b
|
class WP_MS_Sites_List_Table extends WP_List_Table { |
64 | 64 | * @since 3.1.0 |
65 | 65 | * |
66 | 66 | * @global string $s |
67 | | * @global string $mode |
68 | 67 | * @global wpdb $wpdb |
69 | 68 | */ |
70 | 69 | public function prepare_items() { |
71 | | global $s, $mode, $wpdb; |
72 | | |
73 | | if ( ! empty( $_REQUEST['mode'] ) ) { |
74 | | $mode = $_REQUEST['mode'] === 'excerpt' ? 'excerpt' : 'list'; |
75 | | set_user_setting( 'sites_list_mode', $mode ); |
76 | | } else { |
77 | | $mode = get_user_setting( 'sites_list_mode', 'list' ); |
78 | | } |
| 70 | global $s, $wpdb; |
79 | 71 | |
80 | 72 | $per_page = $this->get_items_per_page( 'sites_network_per_page' ); |
81 | 73 | |
… |
… |
class WP_MS_Sites_List_Table extends WP_List_Table { |
207 | 199 | } |
208 | 200 | |
209 | 201 | /** |
210 | | * @global string $mode |
211 | | * |
212 | | * @param string $which |
213 | | */ |
214 | | protected function pagination( $which ) { |
215 | | global $mode; |
216 | | |
217 | | parent::pagination( $which ); |
218 | | |
219 | | if ( 'top' === $which ) |
220 | | $this->view_switcher( $mode ); |
221 | | } |
222 | | |
223 | | /** |
224 | 202 | * @return array |
225 | 203 | */ |
226 | 204 | public function get_columns() { |
… |
… |
class WP_MS_Sites_List_Table extends WP_List_Table { |
295 | 273 | * @since 4.3.0 |
296 | 274 | * @access public |
297 | 275 | * |
298 | | * @global string $mode |
299 | | * |
300 | 276 | * @param array $blog Current site. |
301 | 277 | */ |
302 | 278 | public function column_blogname( $blog ) { |
303 | | global $mode; |
304 | | |
305 | 279 | $blogname = untrailingslashit( $blog['domain'] . $blog['path'] ); |
306 | 280 | $blog_states = array(); |
307 | 281 | reset( $this->status_list ); |
… |
… |
class WP_MS_Sites_List_Table extends WP_List_Table { |
326 | 300 | ?> |
327 | 301 | <a href="<?php echo esc_url( network_admin_url( 'site-info.php?id=' . $blog['blog_id'] ) ); ?>" class="edit"><?php echo $blogname . $blog_state; ?></a> |
328 | 302 | <?php |
329 | | if ( 'list' !== $mode ) { |
330 | 303 | switch_to_blog( $blog['blog_id'] ); |
331 | 304 | echo '<p>'; |
332 | 305 | printf( |
… |
… |
class WP_MS_Sites_List_Table extends WP_List_Table { |
337 | 310 | ); |
338 | 311 | echo '</p>'; |
339 | 312 | restore_current_blog(); |
340 | | } |
341 | 313 | } |
342 | 314 | |
343 | 315 | /** |
… |
… |
class WP_MS_Sites_List_Table extends WP_List_Table { |
349 | 321 | * @param array $blog Current site. |
350 | 322 | */ |
351 | 323 | public function column_lastupdated( $blog ) { |
352 | | global $mode; |
353 | | |
354 | | if ( 'list' === $mode ) { |
355 | | $date = __( 'Y/m/d' ); |
356 | | } else { |
357 | 324 | $date = __( 'Y/m/d g:i:s a' ); |
358 | | } |
359 | 325 | |
360 | 326 | echo ( $blog['last_updated'] === '0000-00-00 00:00:00' ) ? __( 'Never' ) : mysql2date( $date, $blog['last_updated'] ); |
361 | 327 | } |
… |
… |
class WP_MS_Sites_List_Table extends WP_List_Table { |
369 | 335 | * @param array $blog Current site. |
370 | 336 | */ |
371 | 337 | public function column_registered( $blog ) { |
372 | | global $mode; |
373 | | |
374 | | if ( 'list' === $mode ) { |
375 | | $date = __( 'Y/m/d' ); |
376 | | } else { |
377 | 338 | $date = __( 'Y/m/d g:i:s a' ); |
378 | | } |
379 | 339 | |
380 | 340 | if ( $blog['registered'] === '0000-00-00 00:00:00' ) { |
381 | 341 | echo '—'; |
… |
… |
class WP_MS_Sites_List_Table extends WP_List_Table { |
452 | 412 | do_action( 'manage_sites_custom_column', $column_name, $blog['blog_id'] ); |
453 | 413 | } |
454 | 414 | |
455 | | /** |
456 | | * |
457 | | * @global string $mode |
458 | | */ |
459 | 415 | public function display_rows() { |
460 | 416 | foreach ( $this->items as $blog ) { |
461 | 417 | $blog = $blog->to_array(); |