PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / 1.1.11
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin v1.1.11
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 0.8.8 All 35 releases
← All changes | includes/my-wordpress/users-list-footprint.php +11 -16 0.9.3 → 1.1.11 View file →
@@ -1,7 +1,7 @@
1 1 <?php
2 2 /**
3 - * Desktop Mode — "View activity footprint" row action in the classic
3 + * OpenStation — "View activity footprint" row action in the classic
4 4 * Users list table.
5 5 *
6 6 * Adds a hover row action to `wp-admin/users.php` that, inside the
7 7 * desktop shell's chromeless iframe, opens the user's GitHub-style
@@ -8,22 +8,21 @@
8 8 * activity footprint in the "My WordPress" native window. The link's
9 9 * `href` is a real profile-edit URL so a no-JS load or a modifier /
10 10 * middle click degrades to a sensible page; inside the shell the
11 11 * chromeless bridge (`includes/render/chromeless-bridge.php`)
12 - * intercepts the `data-desktop-mode-footprint` attribute and
12 + * intercepts the `data-os-footprint` attribute and
13 13 * postMessages the parent to open the footprint WITHOUT navigating the
14 14 * Users list away.
15 15 *
16 16 * Only rendered on chromeless requests — the one context where the
17 17 * desktop shell is present to receive the message. In a detached
18 - * classic tab (`?desktop_mode_classic=1`) or with desktop mode off the
18 + * classic tab (`?desktop_mode_classic=1`) or with OpenStation off the
19 19 * action is omitted rather than shown as a link that would mislabel the
20 20 * profile editor as the footprint. When the native Users window opt-in
21 21 * is on, `users.php` is remapped to that window and never renders this
22 22 * classic list, so there is no conflict.
23 23 *
24 - * @package WPDesktopMode
25 - * @since 0.9.1
24 + * @package OpenStation
26 25 */
27 26
28 27 defined( 'ABSPATH' ) || exit;
29 28
@@ -31,18 +30,16 @@
31 30 * Append the "View activity footprint" action to a Users-table row.
32 31 *
33 32 * Hooked on `user_row_actions`. Returns the actions unchanged outside
34 33 * a chromeless request, for an invalid user object, or when the
35 - * `desktop_mode_user_footprint_row_action` filter opts the row out.
34 + * `openstation_user_footprint_row_action` filter opts the row out.
36 35 *
37 - * @since 0.9.1
38 - *
39 36 * @param string[] $actions Row action links keyed by slug.
40 37 * @param WP_User $user_object The user the row represents.
41 38 * @return string[] Filtered row actions.
42 39 */
43 -function desktop_mode_user_footprint_row_action( $actions, $user_object ) {
44 - if ( ! desktop_mode_is_chromeless_request() ) {
40 +function openstation_user_footprint_row_action( $actions, $user_object ) {
41 + if ( ! openstation_is_chromeless_request() ) {
45 42 return $actions;
46 43 }
47 44
48 45 if ( ! ( $user_object instanceof WP_User ) || $user_object->ID <= 0 ) {
@@ -59,14 +56,12 @@
59 56 * or to hide it on the current user's own row. Default true for any
60 57 * chromeless request that reaches this filter (where the row is
61 58 * already gated by the `list_users` capability the table requires).
62 59 *
63 - * @since 0.9.1
64 - *
65 60 * @param bool $show Whether to show the action. Default true.
66 61 * @param WP_User $user_object The user the row represents.
67 62 */
68 - if ( ! apply_filters( 'desktop_mode_user_footprint_row_action', true, $user_object ) ) {
63 + if ( ! apply_filters( 'openstation_user_footprint_row_action', true, $user_object ) ) {
69 64 return $actions;
70 65 }
71 66
72 67 // Graceful fallback target, followed only when JS is off or on a
@@ -76,10 +71,10 @@
76 71 $fallback_url = get_current_user_id() === $user_id
77 72 ? admin_url( 'profile.php' )
78 73 : add_query_arg( 'user_id', $user_id, admin_url( 'user-edit.php' ) );
79 74
80 - $actions['desktop-mode-footprint'] = sprintf(
81 - '<a href="%1$s" data-desktop-mode-footprint="%2$d" data-desktop-mode-footprint-name="%3$s">%4$s</a>',
75 + $actions['os-footprint'] = sprintf(
76 + '<a href="%1$s" data-os-footprint="%2$d" data-os-footprint-name="%3$s">%4$s</a>',
82 77 esc_url( $fallback_url ),
83 78 $user_id,
84 79 esc_attr( $user_object->display_name ),
85 80 esc_html__( 'View activity footprint', 'desktop-mode' )
@@ -86,5 +81,5 @@
86 81 );
87 82
88 83 return $actions;
89 84 }
90 -add_filter( 'user_row_actions', 'desktop_mode_user_footprint_row_action', 10, 2 );
85 +add_filter( 'user_row_actions', 'openstation_user_footprint_row_action', 10, 2 );