Your IP : 216.73.217.176


Current Path : /home/bechata/mp/wp-content/uploads/2022/ejn73c/
Upload File :
Current File : /home/bechata/mp/wp-content/uploads/2022/ejn73c/settings.tar

class-evf-settings-validation.php000066600000010044151753364400013141 0ustar00<?php
/**
 * EverestForms Validation Settings
 *
 * @package EverestForms\Admin
 * @version 1.0.0
 */

defined( 'ABSPATH' ) || exit;

if ( class_exists( 'EVF_Settings_Validation', false ) ) {
	return new EVF_Settings_Validation();
}

/**
 * EVF_Settings_Validation.
 */
class EVF_Settings_Validation extends EVF_Settings_Page {

	/**
	 * Constructor.
	 */
	public function __construct() {
		$this->id    = 'validation';
		$this->label = __( 'Validations', 'everest-forms' );

		parent::__construct();
	}

	/**
	 * Get settings array.
	 *
	 * @return array
	 */
	public function get_settings() {
		$settings = apply_filters(
			'everest_forms_validation_settings',
			array(
				array(
					'title' => esc_html__( 'Validation Messages', 'everest-forms' ),
					'type'  => 'title',
					'desc'  => 'Validation Messages for Form Fields.',
					'id'    => 'validation_options',
				),
				array(
					'title'    => esc_html__( 'Required', 'everest-forms' ),
					'desc'     => esc_html__( 'Enter the message for the required form field', 'everest-forms' ),
					'id'       => 'everest_forms_required_validation',
					'type'     => 'text',
					'desc_tip' => true,
					'css'      => 'min-width: 350px;',
					'default'  => esc_html__( 'This field is required.', 'everest-forms' ),
				),
				array(
					'title'    => esc_html__( 'Website URL', 'everest-forms' ),
					'desc'     => esc_html__( 'Enter the message for the valid website url', 'everest-forms' ),
					'id'       => 'everest_forms_url_validation',
					'type'     => 'text',
					'desc_tip' => true,
					'css'      => 'min-width: 350px;',
					'default'  => esc_html__( 'Please enter a valid URL.', 'everest-forms' ),
				),
				array(
					'title'    => esc_html__( 'Email', 'everest-forms' ),
					'desc'     => esc_html__( 'Enter the message for the valid email', 'everest-forms' ),
					'id'       => 'everest_forms_email_validation',
					'type'     => 'text',
					'desc_tip' => true,
					'css'      => 'min-width: 350px;',
					'default'  => esc_html__( 'Please enter a valid email address.', 'everest-forms' ),
				),
				array(
					'title'    => esc_html__( 'Email Suggestion', 'everest-forms' ),
					'desc'     => esc_html__( 'Enter the message for the valid email suggestion', 'everest-forms' ),
					'id'       => 'everest_forms_email_suggestion',
					'type'     => 'text',
					'desc_tip' => true,
					'css'      => 'min-width: 350px;',
					'default'  => esc_html__( 'Did you mean {suggestion}?', 'everest-forms' ),
				),
				array(
					'title'    => esc_html__( 'Confirm Value', 'everest-forms' ),
					'desc'     => esc_html__( 'Enter the message for confirm field value.', 'everest-forms' ),
					'id'       => 'everest_forms_confirm_validation',
					'type'     => 'text',
					'desc_tip' => true,
					'css'      => 'min-width: 350px;',
					'default'  => esc_html__( 'Field values do not match.', 'everest-forms' ),
				),
				array(
					'title'    => esc_html__( 'Checkbox Selection Limit', 'everest-forms' ),
					'desc'     => esc_html__( 'Enter the message for the checkbox selection limit.', 'everest-forms' ),
					'id'       => 'everest_forms_check_limit_validation',
					'type'     => 'text',
					'desc_tip' => true,
					'css'      => 'min-width: 350px;',
					'default'  => esc_html__( 'You have exceeded number of allowed selections: {#}.', 'everest-forms' ),
				),
				array(
					'title'    => esc_html__( 'Number', 'everest-forms' ),
					'desc'     => esc_html__( 'Enter the message for the valid number', 'everest-forms' ),
					'id'       => 'everest_forms_number_validation',
					'type'     => 'text',
					'desc_tip' => true,
					'css'      => 'min-width: 350px;',
					'default'  => esc_html__( 'Please enter a valid number.', 'everest-forms' ),
				),
				array(
					'type' => 'sectionend',
					'id'   => 'validation_options',
				),
			)
		);

		return apply_filters( 'everest_forms_get_settings_' . $this->id, $settings );
	}

	/**
	 * Save settings.
	 */
	public function save() {
		$settings = $this->get_settings();

		EVF_Admin_Settings::save_fields( $settings );
	}
}

return new EVF_Settings_Validation();
class-evf-settings-page.php000066600000005446151753364400011735 0ustar00<?php
/**
 * EverestForms Settings Page/Tab
 *
 * @package EverestForms\Admin
 * @version 1.0.0
 */

defined( 'ABSPATH' ) || exit;

if ( ! class_exists( 'EVF_Settings_Page', false ) ) :

	/**
	 * EVF_Settings_Page.
	 */
	abstract class EVF_Settings_Page {

		/**
		 * Setting page id.
		 *
		 * @var string
		 */
		protected $id = '';

		/**
		 * Setting page label.
		 *
		 * @var string
		 */
		protected $label = '';

		/**
		 * Constructor.
		 */
		public function __construct() {
			add_filter( 'everest_forms_settings_tabs_array', array( $this, 'add_settings_page' ), 20 );
			add_action( 'everest_forms_sections_' . $this->id, array( $this, 'output_sections' ) );
			add_action( 'everest_forms_settings_' . $this->id, array( $this, 'output' ) );
			add_action( 'everest_forms_settings_save_' . $this->id, array( $this, 'save' ) );
		}

		/**
		 * Get settings page ID.
		 *
		 * @since  1.2.0
		 * @return string
		 */
		public function get_id() {
			return $this->id;
		}

		/**
		 * Get settings page label.
		 *
		 * @since  1.2.0
		 * @return string
		 */
		public function get_label() {
			return $this->label;
		}

		/**
		 * Add this page to settings.
		 *
		 * @param  array $pages Setting pages.
		 * @return mixed
		 */
		public function add_settings_page( $pages ) {
			$pages[ $this->id ] = $this->label;

			return $pages;
		}

		/**
		 * Get settings array.
		 *
		 * @return array
		 */
		public function get_settings() {
			return apply_filters( 'everest_forms_get_settings_' . $this->id, array() );
		}

		/**
		 * Get sections.
		 *
		 * @return array
		 */
		public function get_sections() {
			return apply_filters( 'everest_forms_get_sections_' . $this->id, array() );
		}

		/**
		 * Output sections.
		 */
		public function output_sections() {
			global $current_section;

			$sections = $this->get_sections();

			if ( empty( $sections ) || 1 === count( $sections ) ) {
				return;
			}

			echo '<ul class="subsubsub">';

			$array_keys = array_keys( $sections );

			foreach ( $sections as $id => $label ) {
				echo '<li><a href="' . esc_url( admin_url( 'admin.php?page=evf-settings&tab=' . $this->id . '&section=' . sanitize_title( $id ) ) ) . '" class="' . ( $current_section === $id ? 'current' : '' ) . '">' . esc_html( $label ) . '</a> ' . ( end( $array_keys ) === $id ? '' : '|' ) . ' </li>';
			}
			echo '</ul><br class="clear" />';
		}

		/**
		 * Output the settings.
		 */
		public function output() {
			$settings = $this->get_settings();

			EVF_Admin_Settings::output_fields( $settings );
		}

		/**
		 * Save settings.
		 */
		public function save() {
			global $current_section;

			$settings = $this->get_settings();
			EVF_Admin_Settings::save_fields( $settings );

			if ( $current_section ) {
				do_action( 'everest_forms_update_options_' . $this->id . '_' . $current_section );
			}
		}
	}

endif;
class-evf-settings-recaptcha.php000066600000014771151753364400012754 0ustar00<?php
/**
 * EverestForms reCAPTCHA Settings
 *
 * @package EverestForms\Admin
 * @version 1.0.0
 */

defined( 'ABSPATH' ) || exit;

if ( class_exists( 'EVF_Settings_reCAPTCHA', false ) ) {
	return new EVF_Settings_reCAPTCHA();
}

/**
 * EVF_Settings_reCAPTCHA.
 */
class EVF_Settings_reCAPTCHA extends EVF_Settings_Page {

	/**
	 * Constructor.
	 */
	public function __construct() {
		$this->id    = 'recaptcha';
		$this->label = esc_html__( 'reCAPTCHA', 'everest-forms' );

		parent::__construct();
	}

	/**
	 * Get settings array.
	 *
	 * @return array
	 */
	public function get_settings() {
		$recaptcha_type = get_option( 'everest_forms_recaptcha_type', 'v2' );
		$invisible      = get_option( 'everest_forms_recaptcha_v2_invisible', 'no' );
		$settings       = apply_filters(
			'everest_forms_recaptcha_settings',
			array(
				array(
					'title' => esc_html__( 'Google reCAPTCHA Integration', 'everest-forms' ),
					'type'  => 'title',
					/* translators: %1$s - Google reCAPTCHA docs url */
					'desc'  => sprintf( __( '<p>Google\'s reCAPTCHA is a free service that protects your website from spam and abuse while letting valid users pass through with ease.</p><p>reCAPTCHA uses an advanced risk analysis engine and adaptive challenges to keep automated software from engaging in abusive activities on your site.</p><p>Sites already using v2 reCAPTCHA will need to create new site keys before switching to the Invisible reCAPTCHA or v3 reCAPTCHA.</p><p><a href="%1$s" target="_blank">Read our documentation</a> for step-by-step instructions.</p>', 'everest-forms' ), 'https://docs.wpeverest.com/docs/everest-forms/tutorials/how-to-integrate-google-recaptcha/' ),
					'id'    => 'integration_options',
				),
				array(
					'title'    => esc_html__( 'reCAPTCHA type', 'everest-forms' ),
					'desc'     => esc_html__( 'Choose the type of reCAPTCHA for this site key.', 'everest-forms' ),
					'id'       => 'everest_forms_recaptcha_type',
					'default'  => 'v2',
					'type'     => 'radio',
					'options'  => array(
						'v2' => esc_html__( 'reCAPTCHA v2', 'everest-forms' ),
						'v3' => esc_html__( 'reCAPTCHA v3', 'everest-forms' ),
					),
					'class'    => 'everest-forms-recaptcha-type',
					'desc_tip' => true,
				),
				array(
					'title'      => esc_html__( 'Site Key', 'everest-forms' ),
					'type'       => 'text',
					/* translators: %1$s - Google reCAPTCHA docs url */
					'desc'       => sprintf( esc_html__( 'Please enter your site key for your reCAPTCHA v2. <a href="%1$s" target="_blank">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/tutorials/how-to-integrate-google-recaptcha/' ) ),
					'id'         => 'everest_forms_recaptcha_v2_site_key',
					'is_visible' => 'v2' === $recaptcha_type && 'no' === $invisible,
					'default'    => '',
					'desc_tip'   => true,
				),
				array(
					'title'      => esc_html__( 'Secret Key', 'everest-forms' ),
					'type'       => 'text',
					/* translators: %1$s - Google reCAPTCHA docs url */
					'desc'       => sprintf( esc_html__( 'Please enter your secret key for your reCAPTCHA v2. <a href="%1$s" target="_blank">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/tutorials/how-to-integrate-google-recaptcha/' ) ),
					'id'         => 'everest_forms_recaptcha_v2_secret_key',
					'is_visible' => 'v2' === $recaptcha_type && 'no' === $invisible,
					'default'    => '',
					'desc_tip'   => true,
				),
				array(
					'title'      => esc_html__( 'Site Key', 'everest-forms' ),
					'type'       => 'text',
					/* translators: %1$s - Google reCAPTCHA docs url */
					'desc'       => sprintf( esc_html__( 'Please enter your site key for your reCAPTCHA v2. <a href="%1$s" target="_blank">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/tutorials/how-to-integrate-google-recaptcha/' ) ),
					'id'         => 'everest_forms_recaptcha_v2_invisible_site_key',
					'is_visible' => 'v2' === $recaptcha_type && 'yes' === $invisible,
					'default'    => '',
					'desc_tip'   => true,
				),
				array(
					'title'      => esc_html__( 'Secret Key', 'everest-forms' ),
					'type'       => 'text',
					/* translators: %1$s - Google reCAPTCHA docs url */
					'desc'       => sprintf( esc_html__( 'Please enter your secret key for your reCAPTCHA v2. <a href="%1$s" target="_blank">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/tutorials/how-to-integrate-google-recaptcha/' ) ),
					'id'         => 'everest_forms_recaptcha_v2_invisible_secret_key',
					'is_visible' => 'yes' === $invisible && 'v2' === $recaptcha_type,
					'default'    => '',
					'desc_tip'   => true,
				),
				array(
					'title'      => esc_html__( 'Invisible reCAPTCHA', 'everest-forms' ),
					'type'       => 'checkbox',
					'desc'       => esc_html__( 'Enable Invisible reCAPTCHA.', 'everest-forms' ),
					'id'         => 'everest_forms_recaptcha_v2_invisible',
					'is_visible' => 'v2' === $recaptcha_type,
					'default'    => 'no',
				),
				array(
					'title'      => esc_html__( 'Site Key', 'everest-forms' ),
					'type'       => 'text',
					/* translators: %1$s - Google reCAPTCHA docs url */
					'desc'       => sprintf( esc_html__( 'Please enter your site key for your reCAPTCHA v3. <a href="%1$s" target="_blank">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/tutorials/how-to-integrate-google-recaptcha/' ) ),
					'id'         => 'everest_forms_recaptcha_v3_site_key',
					'is_visible' => 'v3' === $recaptcha_type,
					'default'    => '',
					'desc_tip'   => true,
				),
				array(
					'title'      => esc_html__( 'Secret Key', 'everest-forms' ),
					'type'       => 'text',
					/* translators: %1$s - Google reCAPTCHA docs url */
					'desc'       => sprintf( esc_html__( 'Please enter your secret key for your reCAPTCHA v3. <a href="%1$s" target="_blank">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/tutorials/how-to-integrate-google-recaptcha/' ) ),
					'id'         => 'everest_forms_recaptcha_v3_secret_key',
					'is_visible' => 'v3' === $recaptcha_type,
					'default'    => '',
					'desc_tip'   => true,
				),
				array(
					'type' => 'sectionend',
					'id'   => 'integration_options',
				),
			)
		);

		return apply_filters( 'everest_forms_get_settings_' . $this->id, $settings );
	}

	/**
	 * Save settings.
	 */
	public function save() {
		$settings = $this->get_settings();

		EVF_Admin_Settings::save_fields( $settings );
	}
}

return new EVF_Settings_reCAPTCHA();
class-evf-settings-integrations.php000066600000005112151753364400013515 0ustar00<?php
/**
 * EverestForms Integration Settings
 *
 * @package EverestForms\Admin
 * @version 1.3.0
 */

defined( 'ABSPATH' ) || exit;

if ( class_exists( 'EVF_Settings_Integrations', false ) ) {
	return new EVF_Settings_Integrations();
}

/**
 * EVF_Settings_Integrations.
 */
class EVF_Settings_Integrations extends EVF_Settings_Page {

	/**
	 * Constructor.
	 */
	public function __construct() {
		$this->id    = 'integration';
		$this->label = esc_html__( 'Integration', 'everest-forms' );

		if ( isset( evf()->integrations ) && evf()->integrations->get_integrations() ) {
			parent::__construct();
		}
	}

	/**
	 * Output the settings.
	 */
	public function output() {
		global $current_section, $hide_save_button;

		// Hide the save button.
		$GLOBALS['hide_save_button'] = true;

		$integrations = evf()->integrations->get_integrations();

		if ( '' === $current_section ) {
			$this->output_integrations( $integrations );
		} else {
			if ( isset( $integrations[ $current_section ] ) ) {
				$integrations[ $current_section ]->output_integration();
			}
		}
	}

	/**
	 * Handles output of the integrations page in admin.
	 *
	 * @param array $integrations Array of integrations.
	 */
	protected function output_integrations( $integrations ) {
		?>
		<h2><?php esc_html_e( 'Integrations', 'everest-forms' ); ?></h2>
		<div class="everest-forms-integrations-connection">
			<?php foreach ( $integrations as $integration ) : ?>
				<div class="everest-forms-integrations">
					<div class="integration-header-info">
						<div class="integration-status">
							<span class="toggle-switch-outer <?php echo esc_attr( $integration->account_status ); ?>"></span>
						</div>
						<div class="integration-detail">
							<figure class="logo">
								<img src="<?php echo esc_url( $integration->icon ); ?>" alt="<?php echo esc_attr( $integration->method_title ); ?>" />
							</figure>
							<div class="integration-info">
								<a href="<?php echo esc_url( admin_url( 'admin.php?page=evf-settings&tab=integration&section=' . $integration->id ) ); ?>">
									<h3><?php echo esc_html( $integration->method_title ); ?></h3>
								</a>
								<p><?php echo esc_html( $integration->method_description ); ?></p>
							</div>
						</div>
					</div>
					<div class="integartion-action">
						<a class="integration-setup" href="<?php echo esc_url( admin_url( 'admin.php?page=evf-settings&tab=integration&section=' . $integration->id ) ); ?>">
							<span class="evf-icon evf-icon-setting-cog"></span>
						</a>
					</div>
				</div>
			<?php endforeach; ?>
		</div>
		<?php
	}
}

return new EVF_Settings_Integrations();
class-evf-settings-email.php000066600000004435151753364400012105 0ustar00<?php
/**
 * EverestForms Email Settings
 *
 * @package EverestForms\Admin
 * @version 1.0.0
 */

defined( 'ABSPATH' ) || exit;

if ( class_exists( 'EVF_Settings_Email', false ) ) {
	return new EVF_Settings_Email();
}

/**
 * EVF_Settings_Email.
 */
class EVF_Settings_Email extends EVF_Settings_Page {

	/**
	 * Constructor.
	 */
	public function __construct() {
		$this->id    = 'email';
		$this->label = esc_html__( 'Email', 'everest-forms' );

		parent::__construct();
	}

	/**
	 * Get settings array.
	 *
	 * @return array
	 */
	public function get_settings() {
		$settings = apply_filters(
			'everest_forms_email_settings',
			array(
				array(
					'title' => esc_html__( 'Template Settings', 'everest-forms' ),
					'type'  => 'title',
					'desc'  => '',
					'id'    => 'email_template_options',
				),
				array(
					'title'   => esc_html__( 'Template', 'everest-forms' ),
					'type'    => 'radio-image',
					'id'      => 'everest_forms_email_template',
					'desc'    => esc_html__( 'Determine which format of email to send. HTML Template is default.', 'everest-forms' ),
					'default' => 'default',
					'options' => array(
						'default' => array(
							'name'  => esc_html__( 'HTML Template', 'everest-forms' ),
							'image' => plugins_url( 'assets/images/email-template-html.png', EVF_PLUGIN_FILE ),
						),
						'none'    => array(
							'name'  => esc_html__( 'Plain text', 'everest-forms' ),
							'image' => plugins_url( 'assets/images/email-template-plain.png', EVF_PLUGIN_FILE ),
						),
					),
				),
				array(
					'title'    => esc_html__( 'Enable copies', 'everest-forms' ),
					'desc'     => esc_html__( 'Enable the use of Cc and Bcc email addresses', 'everest-forms' ),
					'desc_tip' => esc_html__( 'Email addresses for Cc and Bcc can be applied from the form notification settings.', 'everest-forms' ),
					'id'       => 'everest_forms_enable_email_copies',
					'default'  => 'no',
					'type'     => 'checkbox',
				),
				array(
					'type' => 'sectionend',
					'id'   => 'email_template_options',
				),
			)
		);

		return apply_filters( 'everest_forms_get_settings_' . $this->id, $settings );
	}

	/**
	 * Save settings.
	 */
	public function save() {
		$settings = $this->get_settings();

		EVF_Admin_Settings::save_fields( $settings );
	}
}

return new EVF_Settings_Email();
class-evf-settings-general.php000066600000003326151753364400012431 0ustar00<?php
/**
 * EverestForms General Settings
 *
 * @package EverestForms\Admin
 * @version 1.0.0
 */

defined( 'ABSPATH' ) || exit;

if ( class_exists( 'EVF_Settings_General', false ) ) {
	return new EVF_Settings_General();
}

/**
 * EVF_Settings_General.
 */
class EVF_Settings_General extends EVF_Settings_Page {

	/**
	 * Constructor.
	 */
	public function __construct() {
		$this->id    = 'general';
		$this->label = esc_html__( 'General', 'everest-forms' );

		parent::__construct();
	}

	/**
	 * Get settings array.
	 *
	 * @return array
	 */
	public function get_settings() {
		$settings = apply_filters(
			'everest_forms_general_settings',
			array(
				array(
					'title' => esc_html__( 'General Options', 'everest-forms' ),
					'type'  => 'title',
					'desc'  => '',
					'id'    => 'general_options',
				),
				array(
					'title'   => esc_html__( 'Disable User Details', 'everest-forms' ),
					'desc'    => esc_html__( 'Disable storing the IP address and User Agent on all forms.', 'everest-forms' ),
					'id'      => 'everest_forms_disable_user_details',
					'default' => 'no',
					'type'    => 'checkbox',
				),
				array(
					'title'   => esc_html__( 'Enable Log', 'everest-forms' ),
					'desc'    => esc_html__( 'Enable storing the logs.', 'everest-forms' ),
					'id'      => 'everest_forms_enable_log',
					'default' => 'no',
					'type'    => 'checkbox',
				),
				array(
					'type' => 'sectionend',
					'id'   => 'general_options',
				),
			)
		);

		return apply_filters( 'everest_forms_get_settings_' . $this->id, $settings );
	}

	/**
	 * Save settings.
	 */
	public function save() {
		$settings = $this->get_settings();

		EVF_Admin_Settings::save_fields( $settings );
	}
}

return new EVF_Settings_General();