| 1 |
<?php |
| 2 |
/** |
| 3 |
* Desktop Mode — Native Posts Window module bootstrap. |
| 4 |
* |
| 5 |
* Replaces the chromeless `edit.php` iframe with a native desktop window |
| 6 |
* driven by `<wpd-table>` and core's `/wp/v2/posts` REST endpoint, behind |
| 7 |
* a per-user opt-in (`OsSettingsState.nativePostsEnabled`, surfaced as |
| 8 |
* the "Use the native Posts window" toggle in OS Settings → Features). |
| 9 |
* |
| 10 |
* Public PHP surface (all filterable): |
| 11 |
* |
| 12 |
* - desktop_mode_posts_window_user_can_register |
| 13 |
* - desktop_mode_posts_window_user_can_use |
| 14 |
* - desktop_mode_posts_window_args |
| 15 |
* - desktop_mode_posts_window_template_html |
| 16 |
* - desktop_mode_posts_window_query_args |
| 17 |
* |
| 18 |
* The URL-remap swap (Posts tile → native window when opt-in is on) is |
| 19 |
* implemented JS-side in `src/desktop.ts` via `registerNativeUrlRemap` |
| 20 |
* — this module owns only the window itself, not the entry point. |
| 21 |
* |
| 22 |
* @package WPDesktopMode |
| 23 |
* @since 0.8.0 |
| 24 |
*/ |
| 25 |
|
| 26 |
defined( 'ABSPATH' ) || exit; |
| 27 |
|
| 28 |
require_once __DIR__ . '/permissions.php'; |
| 29 |
require_once __DIR__ . '/window.php'; |
| 30 |
|