LIB = $this; $this->LIB->VARS['DS'] = DIRECTORY_SEPARATOR; $this->LIB->VARS['VERSION'] = '1.3.0'; $this->LIB->VARS['name']['code'] = 'age_verification__simple'; $this->LIB->VARS['name']['_code'] = '_'.$this->LIB->VARS['name']['code']; $this->LIB->VARS['name']['_code_'] = $this->LIB->VARS['name']['_code'].'_'; $this->LIB->VARS['name']['code-'] = $this->LIB->VARS['name']['code'].'-'; // path $this->LIB->VARS['path'] = []; $this->LIB->VARS['path']['plugin_dir'] = WP_PLUGIN_DIR.$this->LIB->VARS['DS'].$this->LIB->VARS['name']['code'].$this->LIB->VARS['DS']; // WP $this->LIB->VARS['WP']['_wpnonce-pre'] = $this->LIB->VARS["name"]["code"].'-nonce'; $this->LIB->VARS['WP']['_wpnonce-key_name'] = '_wpnonce'; $this->LIB->VARS['WP']['_wpnonce'] = wp_create_nonce($this->LIB->VARS['WP']['_wpnonce-pre']); // request $this->LIB->request = new stdClass; $this->LIB->request->post = []; $this->LIB->request->cookie = []; // cookie $this->LIB->VARS['cookie'] = []; $this->LIB->VARS['cookie']['popup_name'] = '_'.$this->LIB->VARS['name']['code'].'-popup'; // is ajax // is xhr $this->LIB->VARS['is_xhr'] = $this->LIB->VARS['is_ajax'] = (isset($_SERVER['REQUEST_URI']) && stripos(sanitize_text_field(wp_unslash($_SERVER['REQUEST_URI'])),'/admin-ajax.php')!==false); // return return $this->LIB->VARS; } public function load_VARS__other() { // links $this->LIB->VARS['links'] = []; $this->LIB->VARS['links']['admin_ajax_url'] = admin_url('admin-ajax.php'); // other $this->LIB->VARS['id_rnd'] = substr(sha1(wp_rand()),32,64).''.time().''.substr(sha1(wp_rand()),32,64); return $this->LIB->VARS; } public function load_SETTINGS() { $this->LIB->SETTINGS = $this->settings_defaults(); $this->LIB->SETTINGS['popup_description'] = $this->settings_defaults_description(); return $this->LIB->SETTINGS; } function settings_defaults() { $res = array(); $res = array( 'module_status' => '1', 'popup_settings' => array( 'popup_text_color' => '#7b7b7b', 'popup_outer_background' => 'rgba(9, 19, 27, 0.8)', 'popup_background' => 'rgba(9, 19, 27, 1)', 'popup_background_image' => '', 'popup_background_image_blur_value' => '10px', 'popup_width' => '400px', 'popup_z_index' => 999999999, 'page_block_scroll' => true, 'page_blur' => true, 'page_blur_performance' => false, 'page_blur_value' => '10px', // 'position' => 'middle', // top // middle 'cookies_time' => 43200, // 12h 'cookies_time' => 3000, // dev 'deny_redirect_url' => '', ), 'popup_description' => array(), 'custom_css' => '', ); return $res; } function settings_defaults_description() { $res = array(); $res = array( 'description' => '
Please, leave this page.