/** * Disables REST API Logging * * ## OPTIONS * * ## EXAMPLES * * wp rest-api-log disable * */ function disable() { WP_REST_API_Log_Settings_General::change_enabled_setting('general', 'logging-enabled', false, 'WP_REST_API_Log_Settings_General::sanitize_settings'); $option = get_option(WP_REST_API_Log_Settings_General::$settings_key); if (!empty($option) && isset($option['logging-enabled']) && '0' === $option['logging-enabled']) { WP_CLI::Success("REST API Log disabled"); } else { WP_CLI::Error("REST API Log was not disabled"); } }