| 1 |
<?php |
| 2 |
/** |
| 3 |
* Desktop Mode — Native Comments Window module bootstrap. |
| 4 |
* |
| 5 |
* Replaces the classic `edit-comments.php` iframe with a native |
| 6 |
* desktop window driven by `<wpd-table>` and core's `/wp/v2/comments` |
| 7 |
* REST endpoint, behind a per-user opt-in |
| 8 |
* (`OsSettingsState.nativeCommentsEnabled`, surfaced as the "Use the |
| 9 |
* native Comments window" toggle in OS Settings → Features). |
| 10 |
* |
| 11 |
* Public PHP surface (all filterable): |
| 12 |
* |
| 13 |
* - desktop_mode_comments_window_user_can_register |
| 14 |
* - desktop_mode_comments_window_user_can_use |
| 15 |
* - desktop_mode_comments_window_args |
| 16 |
* - desktop_mode_comments_window_template_html |
| 17 |
* - desktop_mode_comments_window_query_args |
| 18 |
* - desktop_mode_comments_window_spam_score |
| 19 |
* - desktop_mode_comments_window_reply_editor |
| 20 |
* |
| 21 |
* The URL-remap swap (Comments tile → native window when opt-in is |
| 22 |
* on) is implemented JS-side in `src/desktop.ts` via |
| 23 |
* `registerNativeUrlRemap`. |
| 24 |
* |
| 25 |
* @package WPDesktopMode |
| 26 |
* @since 0.8.3 |
| 27 |
*/ |
| 28 |
|
| 29 |
defined( 'ABSPATH' ) || exit; |
| 30 |
|
| 31 |
require_once __DIR__ . '/permissions.php'; |
| 32 |
require_once __DIR__ . '/spam-score.php'; |
| 33 |
require_once __DIR__ . '/ai-moderation.php'; |
| 34 |
require_once __DIR__ . '/window.php'; |
| 35 |
require_once __DIR__ . '/rest.php'; |
| 36 |
|