| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Desktop Mode — Classic-tab link interceptor. | |
| 3 | + * OpenStation — Classic-tab link interceptor. | |
| 4 | 4 | * |
| 5 | 5 | * Runs only inside detached "classic override" tabs (the ones |
| 6 | 6 | * opened by the Detach window-chrome action with |
| 7 | 7 | * `?desktop_mode_classic=1`). Re-stamps the flag onto every |
| @@ -7,15 +7,14 @@ | ||
| 7 | 7 | * `?desktop_mode_classic=1`). Re-stamps the flag onto every |
| 8 | 8 | * same-origin `/wp-admin/` `<a href>` and `<form action>` so |
| 9 | 9 | * navigations within the tab stay classic — server-side |
| 10 | 10 | * redirects are handled by |
| 11 | - * `desktop_mode_classic_preserve_redirect()` in routing.php. | |
| 11 | + * `openstation_classic_preserve_redirect()` in routing.php. | |
| 12 | 12 | * |
| 13 | 13 | * Extracted from `render.php` during the architecture-0.8.1 PHP |
| 14 | 14 | * slicing (phase 6). |
| 15 | 15 | * |
| 16 | - * @package Desktop_Mode | |
| 17 | - * @since 0.8.1 | |
| 16 | + * @package OpenStation | |
| 18 | 17 | */ |
| 19 | 18 | |
| 20 | 19 | defined( 'ABSPATH' ) || exit; |
| 21 | 20 | |
| @@ -28,23 +27,21 @@ | ||
| 28 | 27 | * desktop shell — because the user meta is still `'1'` and the |
| 29 | 28 | * `admin_init` portal redirect kicks in. The JS here re-stamps the flag |
| 30 | 29 | * on every same-origin `/wp-admin/` `<a href>` and `<form action>` so |
| 31 | 30 | * navigations within the tab stay classic. Server-side redirects are |
| 32 | - * covered by {@see desktop_mode_classic_preserve_redirect}. | |
| 31 | + * covered by {@see openstation_classic_preserve_redirect}. | |
| 33 | 32 | * |
| 34 | 33 | * Narrowly scoped: only runs when the current request itself carries |
| 35 | 34 | * the classic flag. Skips modifier-clicks (cmd/ctrl/shift/alt), targets |
| 36 | 35 | * other than `_self`, downloads, anchors, and non-http schemes so we |
| 37 | 36 | * don't break "open in new tab" or mailto links. |
| 38 | - * | |
| 39 | - * @since 0.4.0 | |
| 40 | 37 | */ |
| 41 | -function desktop_mode_classic_link_interceptor() { | |
| 42 | - if ( ! desktop_mode_is_classic_request() ) { | |
| 38 | +function openstation_classic_link_interceptor() { | |
| 39 | + if ( ! openstation_is_classic_request() ) { | |
| 43 | 40 | return; |
| 44 | 41 | } |
| 45 | 42 | |
| 46 | - $flag_literal = wp_json_encode( DESKTOP_MODE_CLASSIC_FLAG ); | |
| 43 | + $flag_literal = wp_json_encode( OPENSTATION_CLASSIC_FLAG ); | |
| 47 | 44 | |
| 48 | 45 | $js = " |
| 49 | 46 | ( function () { |
| 50 | 47 | var FLAG = {$flag_literal}; |
| @@ -113,5 +110,5 @@ | ||
| 113 | 110 | "; |
| 114 | 111 | |
| 115 | 112 | wp_print_inline_script_tag( $js ); |
| 116 | 113 | } |
| 117 | -add_action( 'admin_footer', 'desktop_mode_classic_link_interceptor' ); | |
| 114 | +add_action( 'admin_footer', 'openstation_classic_link_interceptor' ); | |