mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 19:46:21 +00:00
Coding Standards: Rename the $val
variable to $site
for clarity in WP_MS_Users_List_Table::column_blogs()
.
Follow-up to [12603], [13918], [16607], [32757], [52583]. See #54728. Built from https://develop.svn.wordpress.org/trunk@52584 git-svn-id: http://core.svn.wordpress.org/trunk@52174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
81a1fc33cb
commit
c6829b3afc
@ -370,13 +370,13 @@ class WP_MS_Users_List_Table extends WP_List_Table {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ( $blogs as $val ) {
|
||||
if ( ! can_edit_network( $val->site_id ) ) {
|
||||
foreach ( $blogs as $site ) {
|
||||
if ( ! can_edit_network( $site->site_id ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$path = ( '/' === $val->path ) ? '' : $val->path;
|
||||
$site_classes = array( 'site-' . $val->site_id );
|
||||
$path = ( '/' === $site->path ) ? '' : $site->path;
|
||||
$site_classes = array( 'site-' . $site->site_id );
|
||||
/**
|
||||
* Filters the span class for a site listing on the mulisite user list table.
|
||||
*
|
||||
@ -387,33 +387,33 @@ class WP_MS_Users_List_Table extends WP_List_Table {
|
||||
* @param int $network_id Network ID.
|
||||
* @param WP_User $user WP_User object.
|
||||
*/
|
||||
$site_classes = apply_filters( 'ms_user_list_site_class', $site_classes, $val->userblog_id, $val->site_id, $user );
|
||||
$site_classes = apply_filters( 'ms_user_list_site_class', $site_classes, $site->userblog_id, $site->site_id, $user );
|
||||
if ( is_array( $site_classes ) && ! empty( $site_classes ) ) {
|
||||
$site_classes = array_map( 'sanitize_html_class', array_unique( $site_classes ) );
|
||||
echo '<span class="' . esc_attr( implode( ' ', $site_classes ) ) . '">';
|
||||
} else {
|
||||
echo '<span>';
|
||||
}
|
||||
echo '<a href="' . esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) . '">' . str_replace( '.' . get_network()->domain, '', $val->domain . $path ) . '</a>';
|
||||
echo '<a href="' . esc_url( network_admin_url( 'site-info.php?id=' . $site->userblog_id ) ) . '">' . str_replace( '.' . get_network()->domain, '', $site->domain . $path ) . '</a>';
|
||||
echo ' <small class="row-actions">';
|
||||
$actions = array();
|
||||
$actions['edit'] = '<a href="' . esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) . '">' . __( 'Edit' ) . '</a>';
|
||||
$actions['edit'] = '<a href="' . esc_url( network_admin_url( 'site-info.php?id=' . $site->userblog_id ) ) . '">' . __( 'Edit' ) . '</a>';
|
||||
|
||||
$class = '';
|
||||
if ( 1 === (int) $val->spam ) {
|
||||
if ( 1 === (int) $site->spam ) {
|
||||
$class .= 'site-spammed ';
|
||||
}
|
||||
if ( 1 === (int) $val->mature ) {
|
||||
if ( 1 === (int) $site->mature ) {
|
||||
$class .= 'site-mature ';
|
||||
}
|
||||
if ( 1 === (int) $val->deleted ) {
|
||||
if ( 1 === (int) $site->deleted ) {
|
||||
$class .= 'site-deleted ';
|
||||
}
|
||||
if ( 1 === (int) $val->archived ) {
|
||||
if ( 1 === (int) $site->archived ) {
|
||||
$class .= 'site-archived ';
|
||||
}
|
||||
|
||||
$actions['view'] = '<a class="' . $class . '" href="' . esc_url( get_home_url( $val->userblog_id ) ) . '">' . __( 'View' ) . '</a>';
|
||||
$actions['view'] = '<a class="' . $class . '" href="' . esc_url( get_home_url( $site->userblog_id ) ) . '">' . __( 'View' ) . '</a>';
|
||||
|
||||
/**
|
||||
* Filters the action links displayed next the sites a user belongs to
|
||||
@ -424,7 +424,7 @@ class WP_MS_Users_List_Table extends WP_List_Table {
|
||||
* @param string[] $actions An array of action links to be displayed. Default 'Edit', 'View'.
|
||||
* @param int $userblog_id The site ID.
|
||||
*/
|
||||
$actions = apply_filters( 'ms_user_list_site_actions', $actions, $val->userblog_id );
|
||||
$actions = apply_filters( 'ms_user_list_site_actions', $actions, $site->userblog_id );
|
||||
|
||||
$action_count = count( $actions );
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.0-alpha-52583';
|
||||
$wp_version = '6.0-alpha-52584';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
x
Reference in New Issue
Block a user