PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.2.6
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.2.6
4.9.2 4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 3.4.2 3.5.0 3.5.1 All 200 releases
← All changes | includes/REST/Settings.php +1 -5 4.5.54.2.6 View file →
@@ -293,13 +293,9 @@
293 293 return betterdocs()->settings->get_all( true );
294 294 }
295 295
296 296 public function save_settings( WP_REST_Request $request ) {
297 - $result = betterdocs()->settings->save_settings( $request->get_params() );
298 - if ( is_wp_error( $result ) ) {
299 - return $this->error( $result->get_error_code(), $result->get_error_message(), 400 );
300 - }
301 - if ( $result ) {
297 + if ( betterdocs()->settings->save_settings( $request->get_params() ) ) {
302 298 return $this->success( __( 'Settings Saved!', 'betterdocs' ) );
303 299 }
304 300
305 301 return $this->error( 'nothing_changed', __( 'There are no changes to be saved.', 'betterdocs' ), 200 );