<?php
/*
 * Developed By Devozon
 *
 * Check Out at https://devozon.com/
 * Email: support@devozon.com
 * Message: https://www.facebook.com/devozon
 *
 * Please feel free to contact me at any time if you need a custom script or any development work.
 *
 * Devozon Team:
 * Coded by Sanad Nabil
 * Theme by Ahmed Reda
 * Tested By Smith Carter
 *
 * Devozon All rights reserved
 * Copyright (c) 2023.
 * Last Update 4 \ 11 \ 2023
 */

if ( !defined( 'ABSPATH' ) ) {
	exit;
}

function FENSE_BPVT_header_code()
{
	$adCode = get_option( FENSE_BPVT_PLUGIN::DB_KEY . 'ad_code' );
	echo $adCode;
}


function fense_bpvt_save_settings()
{
	if ( !current_user_can( 'manage_options' ) ) {
		wp_send_json_error(
			[ 'message' => __( 'Insufficient permissions.', 'fense-block-vpn-proxy' ) ],
			403
		);
	}
	
	FENSE_BPVT_PLUGIN::clean();
	
	exit;
}

add_action( 'wp_ajax_nopriv_fense_bpvt_save_settings', 'fense_bpvt_save_settings' );
add_action( 'wp_ajax_fense_bpvt_save_settings', 'fense_bpvt_save_settings' );
