HEX
Server: Apache
System: Linux webm003.cluster111.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: assotraipi (849654)
PHP: 5.4.45
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/assotraipi/www/wp-content/plugins/download-monitor/src/Admin/Settings/SettingsHelper.php
<?php

class DLM_Settings_Helper {

	/** @var array */
	private $defaults;

	/**
	 * DLM_Settings_Helper constructor.
	 */
	public function __construct() {
		$this->setup_defaults();
	}

	/**
	 * Setup the defaults used in the get_option() method
	 */
	private function setup_defaults() {
		$this->defaults = apply_filters(
			'dlm_settings_defaults',
			array(
				'shop_enabled'           => 0,
				'no_access_page'         => 0,
				'page_cart'              => 0,
				'page_checkout'          => 0,
				'currency'               => 'USD',
				'currency_pos'           => 'left',
				'decimal_separator'      => '.',
				'thousand_separator'     => ',',
				'default_gateway'        => 'paypal',
				'disable_cart'           => '0',
				'gateway_paypal_enabled' => '1',
				'use_default_modal'      => '1',
			)
		);
	}


	/**
	 * Get option
	 *
	 * @param $key
	 *
	 * @return mixed|null
	 */
	public function get_option( $key ) {
		// get option from DB
		return apply_filters( 'dlm_get_option', get_option( 'dlm_' . $key, ( isset( $this->defaults[ $key ] ) ? $this->defaults[ $key ] : null ) ), $key );
	}
}