var $site_id;
var $is_site_users;
- function WP_Users_List_Table() {
+ function __construct() {
$screen = get_current_screen();
$this->is_site_users = 'site-users-network' == $screen->id;
if ( $this->is_site_users )
$this->site_id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
- parent::WP_List_Table( array(
+ parent::__construct( array(
'singular' => 'user',
'plural' => 'users'
) );
'fields' => 'all_with_meta'
);
- $args['search'] = '*' . $args['search'] . '*';
+ if ( '' !== $args['search'] )
+ $args['search'] = '*' . $args['search'] . '*';
if ( $this->is_site_users )
$args['blog_id'] = $this->site_id;
$name = translate_user_role( $name );
/* translators: User role name with count */
$name = sprintf( __('%1$s <span class="count">(%2$s)</span>'), $name, $avail_roles[$this_role] );
- $role_links[$this_role] = "<a href='" . add_query_arg( 'role', $this_role, $url ) . "'$class>$name</a>";
+ $role_links[$this_role] = "<a href='" . esc_url( add_query_arg( 'role', $this_role, $url ) ) . "'$class>$name</a>";
}
return $role_links;