| @@ -292,10 +292,41 @@ | ||
| 292 | 292 | // The global "Automatic Updates" column gate — computed |
| 293 | 293 | // on the admin page load (it needs an admin include), |
| 294 | 294 | // which is why it rides the config rather than `data()`. |
| 295 | 295 | 'autoUpdatesEnabled' => openstation_plugins_window_auto_updates_enabled(), |
| 296 | + // The deactivation feedback dialog's lazy bundle and | |
| 297 | + // route; `null` when the feature is filtered off. | |
| 298 | + 'deactivationFeedback' => openstation_deactivation_feedback_app_config(), | |
| 299 | + // Core's Plugin File Editor stays Core's screen: a tab | |
| 300 | + // opens it as its own window, offered only where Core | |
| 301 | + // lists it under Plugins (`''` everywhere else). | |
| 302 | + 'editorUrl' => openstation_plugins_window_editor_url(), | |
| 296 | 303 | ); |
| 297 | 304 | } |
| 305 | + ) | |
| 306 | + // The Plugins menu, while this window answers for it. The file | |
| 307 | + // editor is deliberately not a row: it is a tab the window opens | |
| 308 | + // on a file you picked, not a page you can ask for cold. | |
| 309 | + ->menu( | |
| 310 | + 'plugins.php', | |
| 311 | + static function () { | |
| 312 | + $caps = openstation_plugins_window_caps(); | |
| 313 | + $tabs = array( | |
| 314 | + 'installed' => array( | |
| 315 | + 'label' => __( 'Installed', 'desktop-mode' ), | |
| 316 | + 'page' => 'plugins.php', | |
| 317 | + ), | |
| 318 | + ); | |
| 319 | + if ( ! empty( $caps['install'] ) ) { | |
| 320 | + $tabs['browse'] = array( | |
| 321 | + 'label' => __( 'Add Plugin', 'desktop-mode' ), | |
| 322 | + 'page' => 'plugin-install.php', | |
| 323 | + ); | |
| 324 | + $tabs['featured'] = __( 'OpenStation plugins', 'desktop-mode' ); | |
| 325 | + } | |
| 326 | + return $tabs; | |
| 327 | + }, | |
| 328 | + 'openstation_plugins_window_user_can_use' | |
| 298 | 329 | ) |
| 299 | 330 | ->state( |
| 300 | 331 | array( |
| 301 | 332 | 'tab' => 'installed', |