…` skeleton at * `in_admin_header @ 5` on the shell screen (`includes/shell-screen.php`). * The shell floats on top of the admin document via `position: fixed`; * the body class added by `body-classes.php` triggers the CSS that * hides classic chrome. * * Extracted from `render.php` during the architecture-0.8.1 PHP * slicing (phase 6). * * @package OpenStation */ defined( 'ABSPATH' ) || exit; /** * Injects the desktop shell markup into the admin page. * * Runs on `in_admin_header` at priority 5 so the shell renders right * after the classic admin bar but before the page content. The shell * floats above the classic layout via `position: fixed` in CSS; the * classic sidebar, body, and footer are hidden with `body.os-active` * selectors. */ function openstation_render_shell() { if ( ! openstation_is_shell_request() ) { return; } /** * Fires right before the desktop shell markup is rendered. */ do_action( 'openstation_shell_before' ); // Stamp the user's admin color scheme onto the shell root so the // variables.css per-scheme selectors kick in before first paint — // doing this from JS on init() would show the default palette for a // frame before swapping. $scheme = sanitize_html_class( get_user_option( 'admin_color' ), 'fresh' ); // Same reasoning for the active desktop theme: the compiled // theme stylesheet keys off this attribute, so stamping it // server-side means the first paint is already themed. Setting // it from `applyDesktopTheme()` on boot would flash the default // palette for a frame. Empty string when the user is on the // system default (and nothing else about themes runs at all). $desktop_theme = function_exists( 'openstation_active_desktop_theme_slug' ) ? openstation_active_desktop_theme_slug() : ''; // A shell asked to boot into overview (a switch from another site's // switcher) arrives with its desk hidden until overview is up, so the // desk slides in as one piece instead of the bare desk flashing first. // See `src/multisite/instance-transition.ts`. $arriving = openstation_shell_lands_in_overview() ? ' os-shell--arriving' : ''; ?>