PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / 1.1.10
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin v1.1.10
1.1.10 1.1.9 1.1.8 1.1.7 1.1.6 1.1.5 1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.1 1.0.0 0.9.8 0.9.7 0.9.6 0.9.4 0.9.5 0.9.3 0.9.2 0.9.1 0.9.0 0.8.9 0.8.8 0.8.7 All 34 releases
← All changes | apps/users/users.os.php +15 -0 1.1.71.1.10 View file →
@@ -33,8 +33,10 @@
33 33 require_once __DIR__ . '/parts/permissions.php';
34 34 require_once __DIR__ . '/parts/login-tracker.php';
35 35 require_once __DIR__ . '/parts/color-schemes.php';
36 36 require_once __DIR__ . '/parts/fields.php';
37 +require_once __DIR__ . '/parts/roles-summary.php';
38 +require_once __DIR__ . '/parts/activity-summary.php';
37 39 require_once __DIR__ . '/parts/facts.php';
38 40 require_once __DIR__ . '/parts/rest.php';
39 41 require_once __DIR__ . '/parts/profile-script.php';
40 42
@@ -56,8 +58,16 @@
56 58 $search = trim( (string) $state->get( 'search' ) );
57 59 if ( '' !== $search ) {
58 60 $query['search'] = $search;
59 61 }
62 + $role = trim( (string) $state->get( 'role' ) );
63 + if ( 'none' === $role ) {
64 + // As users.php does: the accounts with no role on this site, or nobody.
65 + $ids = wp_get_users_with_no_role();
66 + $query['include'] = $ids ? array_map( 'intval', $ids ) : array( 0 );
67 + } elseif ( '' !== $role ) {
68 + $query['roles'] = $role;
69 + }
60 70 return $query;
61 71 }
62 72
63 73 /**
@@ -113,8 +123,13 @@
113 123 array(
114 124 'page' => 1,
115 125 'perPage' => 20,
116 126 'search' => '',
127 + // The role filter: a slug, or `none` for accounts with no
128 + // role on this site, as `users.php?role=none` spells it. A
129 + // server-side scope, so a group picked on the Roles tab is
130 + // a fresh collection rather than a slice of the loaded pages.
131 + 'role' => '',
117 132 // The presence filter (All / Online / Active 30d / Never
118 133 // logged in) — a client-side slice of the page.
119 134 'status' => '',
120 135 'orderby' => 'name',