HEX
Server: Apache/2.4.65 (Debian)
System: Linux web6 5.10.0-36-amd64 #1 SMP Debian 5.10.244-1 (2025-09-29) x86_64
User: innocamp (1028)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /home/plan4ev/public_html/wp-content/plugins/caldera-forms/classes/settings/option.php
<?php
/**
 * Base class for settings stored as an array in options table
 *
 * @package Caldera_Forms
 * @author    Josh Pollock <Josh@CalderaWP.com>
 * @license   GPL-2.0+
 * @link
 * @copyright 2017 CalderaWP LLC
 */

abstract class Caldera_Forms_Settings_Option implements Caldera_Forms_Settings_Contract{

	/**
	 * Get the saved settings
	 *
	 * @since 1.5.3
	 *
	 * @return array
	 */
	public function get_settings(){
		$settings = get_option( $this->get_option_key(), $this->get_defaults() );
		return $this->prepare( $settings );
	}

	/**
	 * Get the saved settings
	 *
	 * @since 1.5.3
	 *
	 * @param array $settings Settings to save
	 *
	 * @return array
	 */
	public function save_settings( array $settings ){
		$settings = $this->prepare( $settings );
		update_option( $this->get_option_key(), $settings );
		return $settings;
	}

	/**
	 * Get name for option key storing setting
	 *
	 * @since 1.5.3
	 *
	 * @return string
	 */
	public function get_option_key(){
		//must ovveride, should be abstract but PHP 5.2, so this hack
		_doing_it_wrong( __FUNCTION__, '', '1.5.3' );
	}

	/**
	 * Validate and sanitize settings
	 *
	 * @since 1.5.3
	 *
	 * @param array $settings Settings to save
	 *
	 * @return array
	 */
	protected function prepare( array $settings ){
		//must ovveride, should be abstract but PHP 5.2, so this hack
		_doing_it_wrong( __FUNCTION__, '', '1.5.3' );
		return $settings;
	}

	/**
	 * Get default settings
	 *
	 * @since 1.5.3
	 *
	 * @return array
	 */
	protected function get_defaults(){
		//must ovveride, should be abstract but PHP 5.2, so this hack
		_doing_it_wrong( __FUNCTION__, '', '1.5.3' );
		return array();
	}

}