PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / 1.1.12
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin v1.1.12
1.1.12 1.1.11 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 All 36 releases
← All changes | apps/users/users.os.php +34 -0 1.1.8 → 1.1.12 View file →
@@ -118,8 +118,38 @@
118 118 }
119 119 )
120 120 // Resolved when the window registers, for the viewer registering it.
121 121 ->config( 'openstation_users_profile_facts' )
122 + // The Users menu, while this window is the one answering for it:
123 + // the dock's submenu becomes these tabs, same labels, same order,
124 + // and picking one opens the window on it. The window's own strip
125 + // renders from the same list (`menuTabs` in the config extra), so
126 + // the two cannot drift.
127 + ->menu(
128 + 'users.php',
129 + static function () {
130 + $tabs = array(
131 + 'all' => array(
132 + 'label' => __( 'People', 'desktop-mode' ),
133 + 'page' => 'users.php',
134 + ),
135 + 'roles' => __( 'Roles', 'desktop-mode' ),
136 + 'activity' => __( 'Activity', 'desktop-mode' ),
137 + );
138 + if ( current_user_can( 'create_users' ) ) {
139 + $tabs['add-new'] = array(
140 + 'label' => __( 'Add new', 'desktop-mode' ),
141 + 'page' => 'user-new.php',
142 + );
143 + }
144 + $tabs['edit'] = array(
145 + 'label' => __( 'Profile', 'desktop-mode' ),
146 + 'page' => 'profile.php',
147 + );
148 + return $tabs;
149 + },
150 + 'openstation_users_window_user_can_use'
151 + )
122 152 ->state(
123 153 array(
124 154 'page' => 1,
125 155 'perPage' => 20,
@@ -298,8 +328,12 @@
298 328 foreach ( $list['items'] as $i => $row ) {
299 329 $id = isset( $row['id'] ) ? (int) $row['id'] : 0;
300 330 if ( isset( $stats[ $id ] ) ) {
301 331 $list['items'][ $i ]['openstation_user_stats'] = $stats[ $id ];
332 + }
333 + // Core's row carries the name as stored (`&`); the view paints text.
334 + if ( isset( $row['name'] ) ) {
335 + $list['items'][ $i ]['name'] = openstation_plain_text_title( $row['name'] );
302 336 }
303 337 }
304 338 return array( 'list' => $list );
305 339 }