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 -11 0.9.8 → 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,21 +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
24 + * @package OpenStation
25 25 */
26 26
27 27 defined( 'ABSPATH' ) || exit;
28 28
@@ -30,16 +30,16 @@
30 30 * Append the "View activity footprint" action to a Users-table row.
31 31 *
32 32 * Hooked on `user_row_actions`. Returns the actions unchanged outside
33 33 * a chromeless request, for an invalid user object, or when the
34 - * `desktop_mode_user_footprint_row_action` filter opts the row out.
34 + * `openstation_user_footprint_row_action` filter opts the row out.
35 35 *
36 36 * @param string[] $actions Row action links keyed by slug.
37 37 * @param WP_User $user_object The user the row represents.
38 38 * @return string[] Filtered row actions.
39 39 */
40 -function desktop_mode_user_footprint_row_action( $actions, $user_object ) {
41 - if ( ! desktop_mode_is_chromeless_request() ) {
40 +function openstation_user_footprint_row_action( $actions, $user_object ) {
41 + if ( ! openstation_is_chromeless_request() ) {
42 42 return $actions;
43 43 }
44 44
45 45 if ( ! ( $user_object instanceof WP_User ) || $user_object->ID <= 0 ) {
@@ -59,9 +59,9 @@
59 59 *
60 60 * @param bool $show Whether to show the action. Default true.
61 61 * @param WP_User $user_object The user the row represents.
62 62 */
63 - if ( ! apply_filters( 'desktop_mode_user_footprint_row_action', true, $user_object ) ) {
63 + if ( ! apply_filters( 'openstation_user_footprint_row_action', true, $user_object ) ) {
64 64 return $actions;
65 65 }
66 66
67 67 // Graceful fallback target, followed only when JS is off or on a
@@ -71,10 +71,10 @@
71 71 $fallback_url = get_current_user_id() === $user_id
72 72 ? admin_url( 'profile.php' )
73 73 : add_query_arg( 'user_id', $user_id, admin_url( 'user-edit.php' ) );
74 74
75 - $actions['desktop-mode-footprint'] = sprintf(
76 - '<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>',
77 77 esc_url( $fallback_url ),
78 78 $user_id,
79 79 esc_attr( $user_object->display_name ),
80 80 esc_html__( 'View activity footprint', 'desktop-mode' )
@@ -81,5 +81,5 @@
81 81 );
82 82
83 83 return $actions;
84 84 }
85 -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 );