private function update_option($key, $value) { if ($this->is_multi_site) { $this->wp_facade->update_site_option($key, $value); } else { $this->wp_facade->update_option($key, $value); } }
public function wizard_submit_ajax() { if (isset($_POST['nonce'])) { if ($this->wp_facade->wp_verify_nonce($_POST['nonce'], static::WIZARD_NONCE_KEY)) { list($options, $errors) = $this->admin->check_option($_POST); if ($errors) { $response["errors"] = $errors; } else { $this->wp_facade->update_option(LaunchKey_WP_Admin::OPTION_KEY, $options); } $response['nonce'] = $this->wp_facade->wp_create_nonce(static::WIZARD_NONCE_KEY); } else { $response["errors"] = $this->wp_facade->__("An error occurred submitting the page. Please refresh the page and submit again."); } $this->wp_facade->wp_send_json($response); } }
/** * @return mixed */ private function update_option($key) { return $this->is_multi_site ? $this->wp_facade->update_site_option($key) : $this->wp_facade->update_option($key); }