Update WordPress to 5.2
This commit is contained in:
parent
489b5a5914
commit
e00f87f2f5
599 changed files with 119573 additions and 55990 deletions
|
|
@ -26,11 +26,10 @@ class WP_MS_Users_List_Table extends WP_List_Table {
|
|||
/**
|
||||
* @global string $usersearch
|
||||
* @global string $role
|
||||
* @global wpdb $wpdb
|
||||
* @global string $mode
|
||||
*/
|
||||
public function prepare_items() {
|
||||
global $usersearch, $role, $wpdb, $mode;
|
||||
global $usersearch, $role, $mode;
|
||||
|
||||
$usersearch = isset( $_REQUEST['s'] ) ? wp_unslash( trim( $_REQUEST['s'] ) ) : '';
|
||||
|
||||
|
|
@ -56,8 +55,7 @@ class WP_MS_Users_List_Table extends WP_List_Table {
|
|||
}
|
||||
|
||||
if ( $role === 'super' ) {
|
||||
$logins = implode( "', '", get_super_admins() );
|
||||
$args['include'] = $wpdb->get_col( "SELECT ID FROM $wpdb->users WHERE user_login IN ('$logins')" );
|
||||
$args['login__in'] = get_super_admins();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -339,8 +337,25 @@ class WP_MS_Users_List_Table extends WP_List_Table {
|
|||
continue;
|
||||
}
|
||||
|
||||
$path = ( $val->path === '/' ) ? '' : $val->path;
|
||||
echo '<span class="site-' . $val->site_id . '" >';
|
||||
$path = ( $val->path === '/' ) ? '' : $val->path;
|
||||
$site_classes = array( 'site-' . $val->site_id );
|
||||
/**
|
||||
* Filters the span class for a site listing on the mulisite user list table.
|
||||
*
|
||||
* @since 5.2.0
|
||||
*
|
||||
* @param array $site_classes Class used within the span tag. Default "site-#" with the site's network ID.
|
||||
* @param int $site_id Site ID.
|
||||
* @param int $network_id Network ID.
|
||||
* @param object $user WP_User object.
|
||||
*/
|
||||
$site_classes = apply_filters( 'ms_user_list_site_class', $site_classes, $val->userblog_id, $val->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 ' <small class="row-actions">';
|
||||
$actions = array();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue