HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux vmi1674223.contaboserver.net 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC 2024 x86_64
User: root (0)
PHP: 7.4.3-4ubuntu2.22
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/onlineshop/wp-content/plugins/meta-box/js/select-advanced.js
<?php if ( ! defined( 'ABSPATH' ) ) {
	return;
}

// Register AJAX actions
add_action( 'wp_ajax_zn_ajax_callback', 'zn_ajax_callback' );
add_action( 'wp_ajax_znhgkl_refresh_pb_data', 'znhgkl_theme_cache' );






/**
 * Clear theme and zion builder cache
 * @return void
 */
function znhgkl_theme_cache() {
	if ( is_user_logged_in() && current_user_can( 'manage_options' ) ) {
		// If installed, clear builder cache as well
		if ( function_exists( 'ZNB' ) ) {
			ZNB()->scripts_manager->deleteAllCache();
			ZNB()->scripts_manager->compileElementsCss( true );
		}

		if ( function_exists( 'ZNHGFW' ) ) {
			ZNHGFW()->getComponent('scripts-manager')->deleteDynamicCss();
		}
		die();
	}
}

//<editor-fold desc="::: AJAX CALLBACKS">
function zn_ajax_callback() {
	check_ajax_referer( 'zn_framework', 'zn_ajax_nonce' );

	$save_action = sanitize_text_field( $_POST[ 'zn_action' ] );

	if ( 'zn_save_options' == $save_action ) {

		// DO ACTION FOR SAVED OPTIONS
		do_action( 'zn_save_theme_options' );

		$data = json_decode( stripslashes( $_POST[ 'data' ] ), true );

		/* REMOVE THE HIDDEN FORM DATA */
		unset( $data[ 'action' ] );
		unset( $data[ 'zn_action' ] );
		unset( $data[ 'zn_ajax_nonce' ] );

		$options_field = $data[ 'zn_option_field' ];

		// Combine all options
		// Get all saved options
		$saved_options                   = zget_option( '', '', true );
		$saved_options[ $options_field ] = $data;

		$result = znklfw_save_theme_options( $saved_options );

		if ( 0 == $result || $result ) {
			echo 'Settings successfully save';
			die();
		} else {
			echo 'There was a problem while saving the options';
			die();
		}
	}

	die( 'Are you cheating ?' );
}


//</editor-fold desc="::: AJAX CALLBACKS">