PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / 1.1.8
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin v1.1.8
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 0.8.6 All 33 releases
desktop-mode / README.md

README.md in OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin 1.1.8, at README.md

283 lines 22.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 # WP OpenStation
2
3 A WordPress plugin that reimagines `/wp-admin` as a desktop operating system. Admin screens open as draggable, resizable, minimizable **windows** on a **desktop**, with a left-edge **dock** built from the admin menu. Purely opt-in per user — the classic admin stays untouched for everyone else, and deactivating the plugin restores vanilla Core exactly.
4
5 Zero Core patches. Every feature is wired through public WordPress hooks.
6
7 [](https://wordpress.org/plugins/desktop-mode/![Active Installs](https://img.shields.io/wordpress/plugin/installs/desktop-mode?logo=wordpress&logoColor=%23fff&label=Active%20Installs&labelColor=%2323282D&color=%2323282D)](https://wordpress.org/plugins/desktop-mode/](https://wordpress.org/plugins/desktop-mode/) [](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/WordPress/openstation/refs/heads/trunk/.wordpress-org/blueprints/blueprint.json![Playground Demo Link](https://img.shields.io/wordpress/plugin/v/desktop-mode?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjQ2IDI2IDUxIDUyIiBmaWxsPSJ3aGl0ZSI%2BPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik01My43MTE3IDQ1LjQ4MzlDNTIuNjY1IDQ2LjkyNzcgNT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jY5NTYgNTYuMzA0NEM2NC40MjExIDUzLjAyOTggNjIuMTc4MiA0OS4zNzQ1IDYwLjk3NzYgNDUuOTI1NEM2MS42NyA0NS45MDU2IDYyLjQ0MTcgNDUuOTcwOSA2My4yOTQ1IDQ2LjE0MTVDNjYuMTk4MSA0Ni43MjIyIDY5LjU3MzEgNDguNDgwMiA3Mi41NDY1IDUxLjQ1MzZDNzUuNTE5OCA1NC40MjcgNzcuMjc3OSA1Ny44MDE5IDc3Ljg1ODYgNjAuNzA1NlpNNjIuMTUyMiAzNC4xMzA3QzYwLjQ5MjcgMzUuNzkwMiA1OS42MDcyIDM4LjQ4OTUgNjAuMDUzMyA0Mi4wNjA4QzY0Ljc0ODMgNDEuNjA0NCA3MC42MDA1IDQzLjk2NDIgNzUuMzE4MiA0OC42ODE5QzgwLjAzNTkgNTMuMzk5NiA4Mi4zOTU3IDU5LjI1MTcgODEuOTM5MiA2My45NDY4Qzg1LjUxMDYgNjQuMzkyOCA4OC4yMDk4IDYzLjUwNzMgODkuODY5MyA2MS44NDc4QzkxLjcxNTggNjAuMDAxMyA5Mi42MDQgNTYuODY3NyA5MS43NjYxIDUyLjY3NzdDOTAuOTM0NSA0OC41MjAxIDg4LjQ0NzQgNDMuNzk1NSA4NC4zMjU5IDM5LjY3NDFDODAuMjA0NSAzNS41NTI2IDc1LjQ3OTkgMzMuMDY1NSA3MS4zMjIzIDMyLjIzMzlDNjcuMTMyMyAzMS4zOTU5IDYzLjk5ODcgMzIuMjg0MiA2Mi4xNTIyIDM0LjEzMDdaIi8%2BPC9zdmc%2B&logoColor=%23fff&label=Playground%20Demo&labelColor=%233858e9&color=%233858e9)](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/WordPress/openstation/refs/heads/trunk/.wordpress-org/blueprints/blueprint.json](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/WordPress/openstation/refs/heads/trunk/.wordpress-org/blueprints/blueprint.json) [](https://wp.com/open?deep_link=add-site%3Fblueprint_url%3Dhttps%253A%252F%252Fraw.githubusercontent.com%252FWordPress%252Fopenstation%252Frefs%252Fheads%252Ftrunk%252F.wordpress-org%252Fblueprints%252Fblueprint.json![Studio Demo Link](https://img.shields.io/wordpress/plugin/v/desktop-mode?logo=wordpress&logoColor=%23fff&label=Open%20in%20WordPress%20Studio&labelColor=%2323282D&color=%2323282D)](https://wp.com/open?deep_link=add-site%3Fblueprint_url%3Dhttps%253A%252F%252Fraw.githubusercontent.com%252FWordPress%252Fopenstation%252Frefs%252Fheads%252Ftrunk%252F.wordpress-org%252Fblueprints%252Fblueprint.json](https://wp.com/open?deep_link=add-site%3Fblueprint_url%3Dhttps%253A%252F%252Fraw.githubusercontent.com%252FWordPress%252Fopenstation%252Frefs%252Fheads%252Ftrunk%252F.wordpress-org%252Fblueprints%252Fblueprint.json)
8
9 ## Demo
10
11 <video src="https://github.com/user-attachments/assets/590aacc2-e9d7-4213-889e-b91e060e1bd8" controls width="720"></video>
12
13 ---
14
15 ## Contents
16
17 - [](#demoDemo](#demo](#demo)
18 - [](#current-stateCurrent State](#current-state](#current-state)
19 - [](#still-aheadStill ahead](#still-ahead](#still-ahead)
20 - [](#repository-layoutRepository layout](#repository-layout](#repository-layout)
21 - [](#bundled-extensionsBundled extensions](#bundled-extensions](#bundled-extensions)
22 - [](#how-to-run-itHow to run it](#how-to-run-it](#how-to-run-it)
23 - [](#quick-installQuick install](#quick-install](#quick-install)
24 - [](#development-setupDevelopment setup](#development-setup](#development-setup)
25 - [](#requirementsRequirements](#requirements](#requirements)
26 - [](#for-plugin-authorsFor plugin authors](#for-plugin-authors](#for-plugin-authors)
27 - [](#licenseLicense](#license](#license)
28
29 ---
30
31 ## Current State
32
33 - **Station Home**
34 Native, role-aware replacement for the ordinary WordPress Dashboard inside OpenStation: recent personal work, four live site instruments, an actionable attention queue, and quick paths to create, upload, view the site, open WP Explorer, or deliberately return to the Classic Dashboard.
35
36 - **Per-user opt-in**
37 Admin-bar toggle sets the `desktop_mode_mode` user meta. A dedicated `/openstation/` portal URL auto-enables OpenStation for first-time visitors (gated by `openstation_portal_auto_enable`) and the `admin_init` redirect sends opted-in users from `/wp-admin/` to the portal (`openstation_admin_redirect_to_portal`).
38
39 - **Desktop shell**
40 Fixed-viewport desktop that overlays `/wp-admin`: wallpaper area, unified dock (placement picked in OpenStation Preferences — left / right / bottom, default bottom), right-column widget layer, and full windowing system. `openstation_mode_init`, `openstation_shell_before` / `_after`, and the `openstation_shell_config` filter are the main extension points.
41
42 - **Window system — iframe + native**
43 Iframe windows load admin pages with `?openstation_chromeless=1` (chromeless mode). Native windows render directly in the parent DOM via `openstation_register_window()` / `wp.os.registerWindow()` — multi-tab native windows are supported through `openstation_register_window_tab()`. Both types share drag, resize, minimize, maximize, close, fullscreen, and detach-to-new-tab.
44
45 - **Dock**
46 One unified rail hosting every admin menu — core and plugin alike — plus shell-level system tiles. Placement (left / right / bottom) is a user preference in OpenStation Preferences. Core menus are ordered before plugin menus; per-item hiding via `openstation_dock_placement` (`'hidden'`). Per-item multi-window support via `openstation_dock_item_multi`. Letter-badge icon fallback for plugins without icon art.
47
48 - **Virtual desktops (“Spaces”)**
49 Multiple desktops per user, each with its own window set. Overview grid (zoom-out view) surfaces the Spaces switcher, thumbnails, and create/close controls.
50
51 - **Arrange & snap**
52 Admin-bar Arrange menu: Cascade, Tile, Overview, Snap to grid. Plugins contribute custom entries via `openstation_arrange_menu_items` and react to clicks via `os.arrange.custom-action`. Tile grid dimensions and snap cell size are both filterable.
53
54 - **Wallpaper registry**
55 Server- and client-side registration (`openstation_register_wallpaper()` / `wp.os.registerWallpaper()`). CSS presets + canvas (WebGL/2D) wallpapers with collision-aware surface data (`wp.os.getWallpaperSurfaces()`) for snow/rain/physics effects. In-panel `renderEditor` callback for custom controls, shared vendor-module loader (`pixijs` pre-registered).
56
57 - **Widgets**
58 Right-column floating cards, optionally draggable / resizable outside the column. `openstation_register_widget()` / `wp.os.registerWidget()`. Built-in clock. User placement persists per-user in `localStorage`.
59
60 - **Desktop icons**
61 Wallpaper-layer shortcuts via `openstation_register_icon()` — targets a registered native window or an admin URL.
62
63 - **AI Assistant + slash commands**
64 Cmd+K palette backed by an OpenAI agentic loop whose `search_posts` / `search_pages` / `search_comments` tools run WordPress's native keyword search. Admin-configured API key + model picker. The only automatic AI analysis is comment spam scoring (on comment save), which feeds the comments-window spam score; posts, pages, and terms are not analyzed. `wp.os.registerCommand()` adds slash commands with autocomplete (`suggest()`), confirm dialogs (`ctx.confirm()`), and full lifecycle hooks (`before-run` / `after-run` / `error`). Built-in `/open [window]` is extensible via `os.open-command.items`.
65
66 - **Palette registry**
67 Cmd+K cycles through all registered palettes (`wp.os.registerPalette()`) — the AI assistant is palette 0 by default; additional plugin overlays share the shortcut.
68
69 - **Cross-frame drag bridge**
70 Media-library attachments drag across iframe boundaries via coordinated postMessage. Site-wide toggle through the Extended Options REST endpoint.
71
72 - **Toast notifications**
73 Shell-level toasts rendered via the `<os-toast>` component. Plugins register their own tone/icon via the `openstation_toast_types` filter. Iframe pages raise a toast through the `os-notification` bridge message — it survives the iframe's own lifecycle.
74
75 - **OpenStation Preferences**
76 The settings window, an App Framework app (`apps/os-settings/`): wallpaper picker (with HD-only media filter), accent color swatches + custom gradient editor, desktop layout and dock controls, themes, window effects, navigation placement, feature switches and the component reference. Persisted via `/desktop-mode/v1/os-settings`.
77
78 - **Session persistence**
79 Full window stack (including desktops, focus, state) is debounce-saved to `/desktop-mode/v1/session` and restored without layout flicker. Viewport-shrink clamping keeps off-screen windows reachable.
80
81 - **Mobile — the phone layer**
82 Below 768px the same window manager renders a phone: a home screen of the navigation's tiles with search, one full-screen app at a time under a slim top bar, a swipeable app switcher, a five-slot tab bar, edge-swipe Back. `wp.os.mode` reports `desktop | tablet | mobile`; a head stamp makes the first paint right; a phone restores one window and hands the desktop its session back untouched. Lazy bundle, wallpaper suspended, widgets skipped. See [](./docs/mobile.md`docs/mobile.md`](./docs/mobile.md](./docs/mobile.md).
83
84 - **postMessage bridge**
85 Typed messages for title changes, navigation (same-origin validated), focus, color-scheme sync, screen-meta panels (Screen Options / Help), external-link capture, iframe-ready handshake, and observability (`iframe-error`, `iframe-network`).
86
87 - **UI component library**
88 ~25 `<os-*>` web components (`os-button`, `os-menu`, `os-panel`, `os-range-field`, `os-swatch`, `os-toast`, `os-tabs`, …) available to plugin authors — rendered server-side via `openstation_component()` or imported in TS.
89
90 - **i18n**
91 Full gettext coverage across PHP and TypeScript; Spanish translation shipped. Strings go through `wp.i18n` (`__`, `_x`, `_n`, `sprintf`) directly — no shell-specific re-export.
92
93 - **Component registration API**
94 Stable `openstation_register_*` functions for windows, widgets, wallpapers, icons, and window tabs. All return `true` / `WP_Error` with documented error codes.
95
96 - **Public hook API**
97 Comprehensive PHP and JS hook surface — dock items, placement, multi-window, native-window lifecycle, widget lifecycle, wallpaper lifecycle + surfaces, window lifecycle, iframe observability, arrange actions, virtual-desktop transitions, palette registration, command lifecycle, batch close, AI prompt + model + post-type filters, accents, toast types, default wallpaper. See [](./docs/hooks-reference.md`docs/hooks-reference.md`](./docs/hooks-reference.md](./docs/hooks-reference.md) and [](./docs/javascript-reference.md`docs/javascript-reference.md`](./docs/javascript-reference.md](./docs/javascript-reference.md).
98
99 ---
100
101 ## Still ahead
102
103 - **Mobile, the next pass** — the phone layer ships (`docs/mobile.md`: home-screen grid, full-screen apps, app switcher, edge-swipe back, bottom tab bar, `wp.os.mode`); still ahead are pull-to-refresh and a pass on real devices.
104 - **Tablet hybrid** — split view, slide-over, horizontal dock, on the `wp.os.mode` primitive that already reports `'tablet'`.
105 - **Cross-window drag & drop (the North Star)** — extend the current drag bridge to Media → Gutenberg block insertion, with pluggable mime-type negotiation.
106 - **Polish** — color-scheme-aware variables across all shell surfaces, View Transitions API animations, full a11y audit (ARIA, focus traps, keyboard nav).
107 - **…and a whole lot more hooks, filters, and actions** — every new surface lands with its own extension points, so this list keeps growing.
108
109 See [](./docs/architecture.md`docs/architecture.md`](./docs/architecture.md](./docs/architecture.md) for how the pieces fit together and [](./docs/hooks-reference.md`docs/hooks-reference.md`](./docs/hooks-reference.md](./docs/hooks-reference.md) for the hook surface (current and planned).
110
111 ---
112
113 ## Repository layout
114
115 ```
116 .
117 ├── desktop-mode.php # bootstrap: header, constants, require_once of includes/
118 ├── includes/ # PHP subsystems
119 │ ├── helpers.php admin-bar.php ajax.php
120 │ ├── assets.php render.php portal.php
121 │ ├── session.php default-window.php components.php
122 │ ├── os-settings.php extended-options.php
123 │ ├── accents.php wallpapers.php toast-types.php
124 │ ├── media-query.php
125 │ └── ai-copilot/ # AI assistant (OpenAI client, analysis, search, jobs)
126 ├── apps/ # App Framework apps: <name>.os.php (window, state, actions,
127 │ # data) + optional <name>.os.ts (client view) + <name>.css;
128 │ # Code Blue lives here — see docs/app-framework.md
129 ├── assets/ # hand-authored CSS + JS build output
130 │ ├── css/ desktop.css, windows.css, dock.css, chromeless.css, variables.css
131 │ │ variables.css carries the OpenStation palette — every design
132 │ │ token the shell and the <os-*> kit read, declared once
133 │ ├── fonts/ Geist + Geist Mono (variable, SIL OFL 1.1)
134 │ ├── wallpapers/ the four brand desks: galaxy (default), space,
135 │ │ holomesh, pulsemesh
136 │ ├── desktop-themes/legacy/
137 │ │ the built-in "Desktop Mode (Legacy)" theme — a frozen snapshot of
138 │ │ every token at its pre-brand value; never regenerated.
139 │ │ Zip it with npm run package:legacy-theme
140 │ └── js/ Vite bundles (gitignored; regenerate with npm run build) — only
141 │ admin-bar.js and media-library-enhanced.js are hand-written and tracked
142 ├── src/ # TypeScript source — compiled by Vite
143 │ ├── desktop.ts / dock.ts / hooks.ts / commands.ts / palette-registry.ts
144 │ ├── ai-assistant/ + drag-bridge.ts / toast.ts / desktop-icons.ts
145 │ ├── native-windows.ts / built-in-commands.ts / public-api.ts / types.ts
146 │ ├── window/ # Window class — DOM, pointer, tabs, iframe bridge
147 │ ├── window-manager/ # stack, desktops, arrange, snap, overview
148 │ ├── wallpapers/ # registry, layer, surfaces, server sync, vendor loader
149 │ ├── widgets/ # registry, layer, frame, picker, storage
150 │ ├── settings/ # OpenStation Preferences panel sections
151 │ ├── ui/ # <os-*> web components
152 │ ├── modules/ # vendor-script lazy-loader
153 │ └── plugins/ # built-in demos (animated-logo-wallpaper)
154 ├── docs/ # developer-facing docs (source of truth for plugin authors)
155 ├── extensions/ # bundled sibling plugins (see "Bundled extensions" below)
156 ├── tests/ # PHPUnit + Vitest
157 ├── languages/ # .po / .mo (es shipped)
158 ├── bin/ # package-zip helpers
159 ├── package.json # devDeps (vite, typescript, vitest)
160 ├── vite.config.js # Vite lib-mode: src/desktop.ts → assets/js/desktop[.min].js (IIFE)
161 ├── vitest.config.ts
162 └── tsconfig.json
163 ```
164
165 ---
166
167 ## Bundled extensions
168
169 The `extensions/` directory hosts sibling plugins that build on OpenStation's public APIs. Each one is a standalone WordPress plugin (`Requires Plugins: desktop-mode`) installed from its own zip — run `./bin/package-extensions.sh` to build one `<slug>.zip` per extension under `dist/`; see [](./docs/RELEASE.md#packaging-extensions`docs/RELEASE.md`](./docs/RELEASE.md#packaging-extensions](./docs/RELEASE.md#packaging-extensions) for the full packaging steps. (`extensions/base/` is a shared base library for extension authors, not an installable plugin.)
170
171 - **Code Editor** (`desktop-mode-code-editor`) — a Monaco-backed Code editor native window for browsing and editing files inside `wp-content`. Editing requires the `edit_plugins` capability and is disabled entirely when `DISALLOW_FILE_EDIT` is set.
172 - **Cron Manager** (`desktop-mode-cron-manager`) — a Cron Jobs native window for browsing, editing, deleting, and running WP-Cron events. Gated by `manage_options`.
173 - **Popup Siege** (`desktop-mode-popup-siege`) — a 90-second Breakout-style archive rescue game with OpenStation leaderboards, play-time tracking, and score-to-beat challenges. The deterministic game runtime is lazy-loaded on first play.
174 - **SOL Inbound Monologue** (`desktop-mode-feed-buddy`) — an AIM-era RSS/Atom reader with a movable buddy-list widget, a native conversation-style reader window, per-user subscriptions and unread state, safe server-side feed discovery, and optional synthesized chimes.
175 - **phpMyAdmin** (`desktop-mode-phpmyadmin`) — embeds a bundled phpMyAdmin install as a native window. **Local environments only**: the window registers solely when `wp_get_environment_type()` is `'local'`, because the bundled phpMyAdmin runs with `auth_type=config` and reuses the WordPress DB credentials — any visitor who finds the URL gets full DB access. The `manage_options` check only hides the shortcut from lower-privilege users; it does **not** gate the underlying URL.
176
177 ---
178
179 ## How to run it
180
181 ### Quick install
182
183 Just want to try it? Grab the pre-built zip and upload it to any WordPress — [](https://developer.wordpress.com/studio/Studio by WordPress.com](https://developer.wordpress.com/studio/](https://developer.wordpress.com/studio/), [](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/`wp-env`](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/), or a hosted site. No Node, no build step.
184
185 1. Download [](https://github.com/WordPress/openstation/releases/latest/download/openstation.zip`openstation.zip`](https://github.com/WordPress/openstation/releases/latest/download/openstation.zip](https://github.com/WordPress/openstation/releases/latest/download/openstation.zip) from the latest release (or pick a specific version from the [](https://github.com/WordPress/openstation/releasesreleases page](https://github.com/WordPress/openstation/releases](https://github.com/WordPress/openstation/releases)).
186 2. In WP Admin: **Plugins → Add New → Upload Plugin**, choose the zip, and activate.
187 3. Click the **desktop** icon in the admin bar's top-right corner. The admin reloads inside the desktop shell. Click the same icon again to return to classic admin.
188
189 ### Development setup
190
191 For hacking on the plugin: clone the repo, run the build in watch mode, and load it into a local WordPress via symlink so every save is one browser refresh away.
192
193 #### 1. Install dependencies
194
195 ```bash
196 npm install
197 ```
198
199 #### 2. Build the TypeScript bundle
200
201 The plugin uses **[](https://vitejs.dev/Vite](https://vitejs.dev/](https://vitejs.dev/)** in library mode. esbuild handles transpile and minify, so builds finish in ~70 ms per bundle.
202
203 **Full build** — runs the PixiJS vendor-copy step plus every `build:*` target defined in `package.json` (one Vite bundle each; the `scripts` block in `package.json` and the entry map in `vite.config.js` are the authoritative target list):
204
205 ```bash
206 npm run build
207 ```
208
209 Writes one `assets/js/<target>.js` / `.min.js` pair per target, including:
210
211 - `assets/js/desktop.js` / `.min.js` — main shell bundle (loaded based on `SCRIPT_DEBUG`).
212 - `assets/js/iframe-bridge.js` / `.min.js` — opt-in bridge that gives any same-origin iframe access to `wp.os.iframe.*`.
213 - `assets/js/posts-window.js` / `.min.js` — Native Posts window (the `<os-table>` replacement for the `edit.php` iframe; opt-in per user via OpenStation Preferences → Features).
214
215 **Development watch** — auto-recompiles the unminified bundle on save:
216
217 ```bash
218 npm run dev
219 ```
220
221 Leave it running in a separate terminal; refresh the browser after each save. Set `define( 'SCRIPT_DEBUG', true )` in `wp-config.php` so WordPress picks up the unminified bundle during development.
222
223 #### 3. Load into a local WordPress
224
225 You need a running WordPress to load the plugin into. Pick whichever is easier.
226
227 ##### Studio, wp-env, or a hosted WP
228
229 Run `npm run package` to build a zip from `HEAD` (with correct 0644 / 0755 permissions), then follow the [](#quick-installQuick install](#quick-install](#quick-install) steps 2–3 to upload and activate it. Re-package and re-upload after each change.
230
231 > If you changed source, run `npm run build` before `npm run package` — the Vite output is gitignored, and `bin/package.sh` splices the built files into the zip from your working tree.
232
233 > `npm run package:legacy-theme` builds `dist/desktop-mode-legacy-theme.zip` — the built-in [](./docs/desktop-themes.md#the-legacy-theme--start-hereLegacy desktop theme](./docs/desktop-themes.md#the-legacy-theme--start-here](./docs/desktop-themes.md#the-legacy-theme--start-here) as an installable theme ZIP. The plugin registers Legacy from code either way; the zip is for handing it to someone else or forking it into a theme of your own.
234
235 ##### Clone `wordpress-develop` and symlink
236
237 Gives you the full dev loop: `npm run dev` rebuilds on save, a browser refresh picks it up.
238
239 ```bash
240 # clone Core's Docker-based dev host alongside this repo
241 git clone https://github.com/WordPress/wordpress-develop.git
242 cd wordpress-develop
243 npm install
244
245 # symlink this plugin into the WP plugins directory
246 ln -s "$(pwd)/../alcazaba-plugin" src/wp-content/plugins/desktop-mode
247
248 # boot + install WordPress
249 npm run env:start # nginx + PHP + MySQL in Docker
250 npm run env:install # installs WordPress
251 ```
252
253 Site: **http://localhost:8889**
254 Admin: **http://localhost:8889/wp-admin/**
255 Credentials: `admin` / `password`
256
257 Stop the environment with `npm run env:stop` (from the `wordpress-develop` directory). Activate the plugin per [](#quick-installQuick install](#quick-install](#quick-install) steps 2–3.
258
259 ---
260
261 ## Requirements
262
263 - WordPress **6.0+**
264 - PHP **7.4+**
265
266 ## For plugin authors
267
268 **This plugin is built to be extended.** Every significant behavior is hookable — drop an icon on the desktop, add a dock item, gate OpenStation by role, react to window events, or register a native window, all from your own plugin with zero patches here.
269
270 **See [](./docs/README.md`docs/`](./docs/README.md](./docs/README.md) — the developer documentation index.**
271
272 Quick links:
273
274 - [](./docs/getting-started.mdGetting Started](./docs/getting-started.md](./docs/getting-started.md) — the five-minute tour for plugin authors.
275 - [](./docs/architecture.mdArchitecture](./docs/architecture.md](./docs/architecture.md) — how the pieces fit together.
276 - [](./docs/hooks-reference.mdHooks Reference](./docs/hooks-reference.md](./docs/hooks-reference.md) — every action and filter we fire, with signatures and examples.
277 - [](./docs/javascript-reference.mdJavaScript Reference](./docs/javascript-reference.md](./docs/javascript-reference.md) — CustomEvents, `window.wp.os` API, and the iframe `postMessage` bridge.
278 - [](./docs/examples/Examples](./docs/examples/](./docs/examples/) — copy-paste recipes.
279
280 ## License
281
282 GPLv2 or later. See [](LICENSELICENSE](LICENSE](LICENSE).
283