| @@ -6,8 +6,11 @@ | ||
| 6 | 6 | * openstation capabilities. Stored in `wp_options` (not per-user) so |
| 7 | 7 | * they affect every user on the site. Admin-only to read or write. |
| 8 | 8 | * |
| 9 | 9 | * Current options: |
| 10 | + * - window_prewarm: preload windows on hover. Defaults to true. | |
| 11 | + * - admin_asset_cache: share cached admin assets across windows. | |
| 12 | + * Defaults to true. Both performance options apply on shell reload. | |
| 10 | 13 | * - media_library_enhanced: when true, enqueues a small JS shim on |
| 11 | 14 | * every admin page that makes Media Library .attachment tiles |
| 12 | 15 | * draggable — users can drag images out of the library into any |
| 13 | 16 | * drop target (text fields, TinyMCE/Gutenberg blocks, custom |
| @@ -28,8 +31,15 @@ | ||
| 28 | 31 | * Agents section in My WordPress, and the Agent chat window. |
| 29 | 32 | * **Defaults to `false`** — agents are opt-IN. While off, |
| 30 | 33 | * `includes/agents/bootstrap.php` skips every module file (see |
| 31 | 34 | * `openstation_agents_enabled()`). |
| 35 | + * - network: when true, the OpenStation Network module loads — the | |
| 36 | + * keypair, the identity and list routes, the registry, the Network | |
| 37 | + * window, and the hop token that logs a user in on arrival at | |
| 38 | + * another install. **Defaults to `false`** — the network is | |
| 39 | + * opt-IN. While off, `includes/network/bootstrap.php` skips every | |
| 40 | + * module file (see `openstation_network_enabled()`), and a | |
| 41 | + * multisite keeps the site switcher it has on its own. | |
| 32 | 42 | * |
| 33 | 43 | * @package OpenStation |
| 34 | 44 | */ |
| 35 | 45 | |
| @@ -52,15 +62,18 @@ | ||
| 52 | 62 | |
| 53 | 63 | /** |
| 54 | 64 | * Returns the extended options with defaults filled in. |
| 55 | 65 | * |
| 56 | - * @return array{ media_library_enhanced: bool, games: bool, agents: bool } | |
| 66 | + * @return array{ media_library_enhanced: bool, games: bool, agents: bool, network: bool, window_prewarm: bool, admin_asset_cache: bool } | |
| 57 | 67 | */ |
| 58 | 68 | function openstation_get_extended_options() { |
| 59 | 69 | $defaults = array( |
| 60 | 70 | 'media_library_enhanced' => true, |
| 71 | + 'window_prewarm' => true, | |
| 72 | + 'admin_asset_cache' => true, | |
| 61 | 73 | 'games' => false, |
| 62 | 74 | 'agents' => false, |
| 75 | + 'network' => false, | |
| 63 | 76 | ); |
| 64 | 77 | $raw = get_option( OPENSTATION_EXTENDED_OPTIONS_KEY, array() ); |
| 65 | 78 | if ( ! is_array( $raw ) ) { |
| 66 | 79 | return $defaults; |