- Timestamp:
- 01/16/2022 08:38:50 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-ms-users-list-table.php
r52583 r52584 371 371 } 372 372 373 foreach ( $blogs as $ val) {374 if ( ! can_edit_network( $ val->site_id ) ) {373 foreach ( $blogs as $site ) { 374 if ( ! can_edit_network( $site->site_id ) ) { 375 375 continue; 376 376 } 377 377 378 $path = ( '/' === $ val->path ) ? '' : $val->path;379 $site_classes = array( 'site-' . $ val->site_id );378 $path = ( '/' === $site->path ) ? '' : $site->path; 379 $site_classes = array( 'site-' . $site->site_id ); 380 380 /** 381 381 * Filters the span class for a site listing on the mulisite user list table. … … 388 388 * @param WP_User $user WP_User object. 389 389 */ 390 $site_classes = apply_filters( 'ms_user_list_site_class', $site_classes, $ val->userblog_id, $val->site_id, $user );390 $site_classes = apply_filters( 'ms_user_list_site_class', $site_classes, $site->userblog_id, $site->site_id, $user ); 391 391 if ( is_array( $site_classes ) && ! empty( $site_classes ) ) { 392 392 $site_classes = array_map( 'sanitize_html_class', array_unique( $site_classes ) ); … … 395 395 echo '<span>'; 396 396 } 397 echo '<a href="' . esc_url( network_admin_url( 'site-info.php?id=' . $ val->userblog_id ) ) . '">' . str_replace( '.' . get_network()->domain, '', $val->domain . $path ) . '</a>';397 echo '<a href="' . esc_url( network_admin_url( 'site-info.php?id=' . $site->userblog_id ) ) . '">' . str_replace( '.' . get_network()->domain, '', $site->domain . $path ) . '</a>'; 398 398 echo ' <small class="row-actions">'; 399 399 $actions = array(); 400 $actions['edit'] = '<a href="' . esc_url( network_admin_url( 'site-info.php?id=' . $ val->userblog_id ) ) . '">' . __( 'Edit' ) . '</a>';400 $actions['edit'] = '<a href="' . esc_url( network_admin_url( 'site-info.php?id=' . $site->userblog_id ) ) . '">' . __( 'Edit' ) . '</a>'; 401 401 402 402 $class = ''; 403 if ( 1 === (int) $ val->spam ) {403 if ( 1 === (int) $site->spam ) { 404 404 $class .= 'site-spammed '; 405 405 } 406 if ( 1 === (int) $ val->mature ) {406 if ( 1 === (int) $site->mature ) { 407 407 $class .= 'site-mature '; 408 408 } 409 if ( 1 === (int) $ val->deleted ) {409 if ( 1 === (int) $site->deleted ) { 410 410 $class .= 'site-deleted '; 411 411 } 412 if ( 1 === (int) $ val->archived ) {412 if ( 1 === (int) $site->archived ) { 413 413 $class .= 'site-archived '; 414 414 } 415 415 416 $actions['view'] = '<a class="' . $class . '" href="' . esc_url( get_home_url( $ val->userblog_id ) ) . '">' . __( 'View' ) . '</a>';416 $actions['view'] = '<a class="' . $class . '" href="' . esc_url( get_home_url( $site->userblog_id ) ) . '">' . __( 'View' ) . '</a>'; 417 417 418 418 /** … … 425 425 * @param int $userblog_id The site ID. 426 426 */ 427 $actions = apply_filters( 'ms_user_list_site_actions', $actions, $ val->userblog_id );427 $actions = apply_filters( 'ms_user_list_site_actions', $actions, $site->userblog_id ); 428 428 429 429 $action_count = count( $actions );
Note: See TracChangeset
for help on using the changeset viewer.