HEX
Server: LiteSpeed
System: Linux s787.bom1.mysecurecloudhost.com 4.18.0-477.13.1.lve.el8.x86_64 #1 SMP Thu Jun 1 16:40:47 EDT 2023 x86_64
User: mobilech (5348)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //proc/self/cwd/wp-content/plugins/tutor/includes/kirki/backend/Helper.php
<?php

/**
 * Preview script for html markup generator
 *
 * @package tutor-kirki-elements
 */

namespace TutorLMSKirki;

use Kirki\Ajax\ExportImport;
use TUTOR\Course;

if (! defined('ABSPATH')) {
	exit; // Exit if accessed directly.
}

/**
 * Class Helper
 * This class is used to define all helper functions.
 */
class Helper
{


	/**
	 * Function to activate kirki elements plugin
	 */
	public static function t_d_e_activate() {}

	/**
	 * This function will verify nonce
	 * ACT like API calls auth middleware
	 *
	 * @param string $action ajax action name.
	 *
	 * @return void
	 */
	public static function verify_nonce($action = -1)
	{
		$nonce = sanitize_text_field(isset($_SERVER['HTTP_X_WP_NONCE']) ? wp_unslash($_SERVER['HTTP_X_WP_NONCE']) : null);
		if (! wp_verify_nonce($nonce, $action)) {
			wp_send_json_error('Not authorized');
			exit;
		}
	}
}