PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / 1.1.11
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin v1.1.11
1.1.11 1.1.10 1.1.9 1.1.8 1.1.7 1.1.6 1.1.5 1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.1 1.0.0 0.9.8 0.9.7 0.9.6 0.9.4 0.9.5 0.9.3 0.9.2 0.9.1 0.9.0 0.8.9 0.8.8 All 35 releases
← All changes | apps/os-settings/os-settings.os.php +3 -27 1.1.7 → 1.1.11 View file →
@@ -94,14 +94,8 @@
94 94 && $os->can( openstation_desktop_theme_upload_capability() ),
95 95 'extendedOptions' => $admin && function_exists( 'openstation_get_extended_options' )
96 96 ? openstation_get_extended_options()
97 97 : null,
98 - 'commentsAi' => $admin && function_exists( 'openstation_comments_ai_is_enabled' )
99 - ? array(
100 - 'enabled' => openstation_comments_ai_is_enabled(),
101 - 'providerConfigured' => openstation_comments_ai_provider_configured(),
102 - )
103 - : null,
104 98 'aiAssistant' => function_exists( 'openstation_ai_assistant_config' )
105 99 ? openstation_ai_assistant_config( $os->auth->user_id() )
106 100 : null,
107 101 );
@@ -107,28 +101,8 @@
107 101 );
108 102 }
109 103
110 104 /**
111 - * The comments-AI toggle: a site option, the same write the
112 - * `POST desktop-mode/v1/comments/ai-settings` route makes.
113 - *
114 - * @param State $state Unused.
115 - * @param Os $os Host handle.
116 - * @param array<string,mixed> $args `enabled` (bool).
117 - * @return void
118 - */
119 -function comments_ai_action( State $state, Os $os, array $args ) {
120 - require_admin( $os );
121 - if ( ! defined( 'OPENSTATION_COMMENTS_AI_OPTION' ) ) {
122 - return;
123 - }
124 - $enabled = ! empty( $args['enabled'] );
125 - update_option( OPENSTATION_COMMENTS_AI_OPTION, $enabled, false );
126 - /** This action is documented in apps/comments/parts/ai-moderation.php */
127 - do_action( 'openstation_comments_ai_toggled', $enabled );
128 -}
129 -
130 -/**
131 105 * Extended Options: merged over the stored set, then a menu refresh —
132 106 * every option gates a server-side registration (`games` decides
133 107 * whether the games module loads at all), and the shell only learns
134 108 * what the server registers from a fresh payload.
@@ -180,8 +154,11 @@
180 154 // No launcher of its own: the System tile's flyout row opens it
181 155 // and answers for it on the rail (`NavItem.answersFor`), exactly
182 156 // as before. `wp.os.openOsSettings()` is the portable opener.
183 157 ->placement( 'none' )
158 + // The settings are the user's own, so the network admin's shell
159 + // offers the window too; its site options there are the main site's.
160 + ->admin( 'any' )
184 161 ->capabilities( 'read' )
185 162 // `data()` is a handful of capability checks and options, so it
186 163 // ships with the window and the pages paint the moment the window
187 164 // opens — as the legacy panel did — instead of behind a spinner for
@@ -199,9 +176,8 @@
199 176 }
200 177 }
201 178 )
202 179 ->action( 'extended', __NAMESPACE__ . '\extended_action' )
203 - ->action( 'comments-ai', __NAMESPACE__ . '\comments_ai_action' )
204 180 ->action(
205 181 'reset-intros',
206 182 static function ( State $state, Os $os ) {
207 183 if ( function_exists( 'openstation_clear_seen_intros' ) ) {