| 1 |
<?php |
| 2 |
/** |
| 3 |
* Desktop Mode — Native Plugins Window module bootstrap. |
| 4 |
* |
| 5 |
* Replaces the chromeless `plugins.php` + `plugin-install.php` iframes |
| 6 |
* with a single native window containing two tabs: an Installed list |
| 7 |
* (manage activations + updates + delete) and a Browse gallery |
| 8 |
* (explore wp.org, view rich detail in a `<wpd-flyout>`, install by |
| 9 |
* slug, upload .zip, drag-drop a .zip onto the window). |
| 10 |
* |
| 11 |
* Public PHP surface (all filterable): |
| 12 |
* |
| 13 |
* - desktop_mode_plugins_window_user_can_register |
| 14 |
* - desktop_mode_plugins_window_user_can_use |
| 15 |
* - desktop_mode_plugins_window_args |
| 16 |
* - desktop_mode_plugins_window_template_html |
| 17 |
* - desktop_mode_plugins_window_browse_args |
| 18 |
* - desktop_mode_plugins_window_browse_response |
| 19 |
* - desktop_mode_plugins_window_info_response |
| 20 |
* - desktop_mode_plugins_window_review_parser |
| 21 |
* - desktop_mode_plugins_window_card_extras |
| 22 |
* |
| 23 |
* The dock-side swap (Plugins tile → native window when opt-in is on) |
| 24 |
* is implemented JS-side in `src/desktop.ts` via |
| 25 |
* `registerNativeUrlRemap` — this module owns only the window itself, |
| 26 |
* not the entry point. |
| 27 |
* |
| 28 |
* Plugin Check posture: NEVER `require_once ABSPATH . 'wp-admin/…'`. |
| 29 |
* Anything that needs admin-only classes (`Plugin_Upgrader`, |
| 30 |
* `WP_Filesystem`, `plugins_api`) lives on `admin-ajax.php` |
| 31 |
* (`includes/plugins-window/ajax.php`) where those files are already |
| 32 |
* loaded. Pure data enrichment lives on REST field decorators |
| 33 |
* (`includes/plugins-window/rest-fields.php`). |
| 34 |
* |
| 35 |
* @package WPDesktopMode |
| 36 |
* @since 0.9.0 |
| 37 |
*/ |
| 38 |
|
| 39 |
defined( 'ABSPATH' ) || exit; |
| 40 |
|
| 41 |
require_once __DIR__ . '/permissions.php'; |
| 42 |
require_once __DIR__ . '/window.php'; |
| 43 |
require_once __DIR__ . '/rest-fields.php'; |
| 44 |
require_once __DIR__ . '/ajax.php'; |
| 45 |
|