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/parts/facts.php +18 -12 1.1.9 → 1.1.12 View file →
@@ -32,25 +32,31 @@
32 32 if ( isset( $cache[ $viewer_id ] ) ) {
33 33 return $cache[ $viewer_id ];
34 34 }
35 35 $cache[ $viewer_id ] = array(
36 - 'currentUserId' => $viewer_id,
36 + 'currentUserId' => $viewer_id,
37 37 // Capability flags — the UI hides actions the viewer can't
38 38 // perform; every action and route re-checks, so a tampered flag
39 39 // changes nothing.
40 - 'canEdit' => current_user_can( 'edit_users' ),
41 - 'canPromote' => current_user_can( 'promote_users' ),
42 - 'canCreate' => current_user_can( 'create_users' ),
43 - 'canDelete' => is_multisite() ? current_user_can( 'remove_users' ) : current_user_can( 'delete_users' ),
44 - 'isMultisite' => is_multisite(),
40 + 'canEdit' => current_user_can( 'edit_users' ),
41 + 'canPromote' => current_user_can( 'promote_users' ),
42 + 'canCreate' => current_user_can( 'create_users' ),
43 + 'canDelete' => is_multisite() ? current_user_can( 'remove_users' ) : current_user_can( 'delete_users' ),
44 + // The sidebar's door to the activity footprint. The footprint
45 + // renders inside WP Explorer and its REST route is gated by that
46 + // module's own helper, so the flag mirrors the same gate: a site
47 + // that narrows WP Explorer hides the door with it. The guard
48 + // covers a host where the module never loaded.
49 + 'canViewFootprint' => function_exists( 'openstation_my_wordpress_user_can_use' ) && openstation_my_wordpress_user_can_use(),
50 + 'isMultisite' => is_multisite(),
45 51 // Roles the viewer may assign — the dropdowns list only these,
46 52 // so a narrowed `editable_roles` never yields "pick a role, hit
47 53 // save, get rejected". `allRoles` is the label catalogue.
48 - 'assignableRoles' => openstation_users_window_role_label_map( $viewer_id ),
49 - 'allRoles' => openstation_users_window_all_roles_map(),
50 - 'locales' => openstation_users_window_locales_map(),
51 - 'defaultRole' => (string) get_option( 'default_role', 'subscriber' ),
52 - 'contactMethods' => (array) wp_get_user_contact_methods(),
53 - 'colorSchemes' => openstation_user_edit_window_color_schemes(),
54 + 'assignableRoles' => openstation_users_window_role_label_map( $viewer_id ),
55 + 'allRoles' => openstation_users_window_all_roles_map(),
56 + 'locales' => openstation_users_window_locales_map(),
57 + 'defaultRole' => (string) get_option( 'default_role', 'subscriber' ),
58 + 'contactMethods' => (array) wp_get_user_contact_methods(),
59 + 'colorSchemes' => openstation_user_edit_window_color_schemes(),
54 60 );
55 61 return $cache[ $viewer_id ];
56 62 }