getSettings(); $settings = apply_filters('f12_cf7_doubleoptin_ui_' . $this->slug . '_before_on_save', $settings); $settings = $this->onSave($settings); $settings = apply_filters('f12_cf7_doubleoptin_ui_' . $this->slug . '_after_on_save', $settings); update_option('f12-doi-settings', $settings); Messages::getInstance()->add(__('Settings updated', 'double-opt-in'), 'success'); } } /** * Option to hide the submit button * * @param bool $hide * * @return void */ protected function hideSubmitButton($hide) { $this->hide_submit_button = $hide; } /** * Returns true if the button should be hidden. * * @return bool */ protected function isSubmitButtonHidden() { return $this->hide_submit_button; } /** * Update the settings and return them * * @param $settings * * @return array */ protected abstract function onSave($settings); /** * @return void * @private WordPress HOOK */ public function renderContent($slug, $page) { if ($this->slug != $page) { return; } $this->maybeSave(); $settings = CF7DoubleOptIn::getInstance()->getSettings(); echo Messages::getInstance()->getAll(); ?>
theContent($slug, $page, $settings); do_action('f12_cf7_doubleoptin_ui_' . $page . '_after_content', $settings); if (!$this->isSubmitButtonHidden()): wp_nonce_field('doi_settings_action', 'doi_settings_nonce'); ?>