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 | includes/shell-screen.php +17 -0 1.1.71.1.10 View file →
@@ -94,8 +94,25 @@
94 94 return openstation_is_shell_screen_request() && ! empty( $_GET[ OPENSTATION_SHELL_OVERVIEW_ARG ] );
95 95 }
96 96
97 97 /**
98 + * The side this shell slides its desk in from, when it was reached by a
99 + * switch from another origin: `next`, `prev`, or ''. A one-shot boot
100 + * arg like the two above (`openstation_hop_from`), because the hint a
101 + * same-origin switch leaves in sessionStorage never crosses origins.
102 + *
103 + * @return string
104 + */
105 +function openstation_shell_arrival_direction() {
106 + if ( ! openstation_is_shell_screen_request() ) {
107 + return '';
108 + }
109 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- read-only routing flag.
110 + $from = isset( $_GET[ OPENSTATION_NETWORK_HOP_FROM_ARG ] ) && is_scalar( $_GET[ OPENSTATION_NETWORK_HOP_FROM_ARG ] ) ? sanitize_key( wp_unslash( $_GET[ OPENSTATION_NETWORK_HOP_FROM_ARG ] ) ) : '';
111 + return in_array( $from, array( 'next', 'prev' ), true ) ? $from : '';
112 +}
113 +
114 +/**
98 115 * Builds the shell screen URL, optionally carrying a target.
99 116 *
100 117 * `$target` is an absolute same-origin admin URL or a request-URI-shaped
101 118 * path (`/wp-admin/edit.php?post_type=page`). Either way only its path