$12 GRAYBYTE WORDPRESS FILE MANAGER $49

SERVER : premium134.web-hosting.com #1 SMP Thu Mar 13 14:29:12 UTC 2025
SERVER IP : 162.0.232.104 | ADMIN IP 216.73.216.50
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/home/raydofqv/raydget.vip/wp-content/plugins/js_composer/include/autoload/

HOME
Current File : /home/raydofqv/raydget.vip/wp-content/plugins/js_composer/include/autoload//vc-settings-presets.php
<?php
if ( ! defined( 'ABSPATH' ) ) {
	die( '-1' );
}

add_action( 'wp_ajax_vc_action_save_settings_preset', 'vc_action_save_settings_preset' );
add_action( 'wp_ajax_vc_action_set_as_default_settings_preset', 'vc_action_set_as_default_settings_preset' );
add_action( 'wp_ajax_vc_action_delete_settings_preset', 'vc_action_delete_settings_preset' );
add_action( 'wp_ajax_vc_action_restore_default_settings_preset', 'vc_action_restore_default_settings_preset' );
add_action( 'wp_ajax_vc_action_get_settings_preset', 'vc_action_get_settings_preset' );
add_action( 'wp_ajax_vc_action_render_settings_preset_popup', 'vc_action_render_settings_preset_popup' );
add_action( 'wp_ajax_vc_action_render_settings_preset_title_prompt', 'vc_action_render_settings_preset_title_prompt' );
add_action( 'wp_ajax_vc_action_render_settings_templates_prompt', 'vc_action_render_settings_templates_prompt' );
add_action( 'vc_restore_default_settings_preset', 'vc_action_set_as_default_settings_preset', 10, 2 );
add_action( 'vc_register_settings_preset', 'vc_register_settings_preset', 10, 4 );
add_filter( 'vc_add_new_elements_to_box', 'vc_add_new_elements_to_box' );
add_filter( 'vc_add_new_category_filter', 'vc_add_new_category_filter' );

function vc_include_settings_preset_class() {
	require_once vc_path_dir( 'AUTOLOAD_DIR', 'class-vc-settings-presets.php' );
}

/**
 * @return Vc_Vendor_Preset
 */
function vc_vendor_preset() {
	require_once vc_path_dir( 'AUTOLOAD_DIR', 'class-vc-vendor-presets.php' );

	return Vc_Vendor_Preset::getInstance();
}

/**
 * Save settings preset for specific shortcode
 *
 * Include freshly rendered html in response
 *
 * Required _POST params:
 * - shortcode_name string
 * - title string
 * - data string params in json
 * - is_default
 *
 * @since 4.7
 */
function vc_action_save_settings_preset() {
	vc_include_settings_preset_class();
	vc_user_access()->part( 'presets' )->checkStateAny( true, null )->validateDie(); // user must have permission to save presets

	$id = Vc_Settings_Preset::saveSettingsPreset( vc_post_param( 'shortcode_name' ), vc_post_param( 'title' ), vc_post_param( 'data' ), vc_post_param( 'is_default' ) );

	$response = array(
		'success' => (bool) $id,
		'html' => Vc_Settings_Preset::getRenderedSettingsPresetPopup( vc_post_param( 'shortcode_name' ) ),
		'id' => $id,
	);

	wp_send_json( $response );
}

/**
 * Set existing preset as default
 *
 * Include freshly rendered html in response
 *
 * Required _POST params:
 * - id int
 * - shortcode_name string
 *
 * @since 4.7
 */
function vc_action_set_as_default_settings_preset() {
	vc_include_settings_preset_class();
	vc_user_access()->part( 'presets' )->checkStateAny( true, null )->validateDie(); // user must have permission to set as default presets

	$id = vc_post_param( 'id' );
	$shortcode_name = vc_post_param( 'shortcode_name' );

	$status = Vc_Settings_Preset::setAsDefaultSettingsPreset( $id, $shortcode_name );

	$response = array(
		'success' => $status,
		'html' => Vc_Settings_Preset::getRenderedSettingsPresetPopup( $shortcode_name ),
	);

	wp_send_json( $response );
}

/**
 * Unmark current default preset as default
 *
 * Include freshly rendered html in response
 *
 * Required _POST params:
 * - shortcode_name string
 *
 * @since 4.7
 */
function vc_action_restore_default_settings_preset() {
	vc_include_settings_preset_class();
	vc_user_access()->part( 'presets' )->checkStateAny( true, null )->validateDie(); // user must have permission to restore presets

	$shortcode_name = vc_post_param( 'shortcode_name' );

	$status = Vc_Settings_Preset::setAsDefaultSettingsPreset( null, $shortcode_name );

	$response = array(
		'success' => $status,
		'html' => Vc_Settings_Preset::getRenderedSettingsPresetPopup( $shortcode_name ),
	);

	wp_send_json( $response );
}

/**
 * Delete specific settings preset
 *
 * Include freshly rendered html in response
 *
 * Required _POST params:
 * - shortcode_name string
 * - id int
 *
 * @since 4.7
 */
function vc_action_delete_settings_preset() {
	vc_include_settings_preset_class();
	vc_user_access()->part( 'presets' )->checkStateAny( true, null )->validateDie(); // user must have permission to delete presets

	$default = get_post_meta( vc_post_param( 'id' ), '_vc_default', true );

	$status = Vc_Settings_Preset::deleteSettingsPreset( vc_post_param( 'id' ) );

	$response = array(
		'success' => $status,
		'default' => $default,
		'html' => Vc_Settings_Preset::getRenderedSettingsPresetPopup( vc_post_param( 'shortcode_name' ) ),
	);

	wp_send_json( $response );
}

/**
 * Get data for specific settings preset
 *
 * Required _POST params:
 * - id int
 *
 * @since 4.7
 */
function vc_action_get_settings_preset() {
	vc_include_settings_preset_class();

	$data = Vc_Settings_Preset::getSettingsPreset( vc_post_param( 'id' ), true );

	if ( false !== $data ) {
		$response = array(
			'success' => true,
			'data' => $data,
		);
	} else {
		$response = array(
			'success' => false,
		);
	}

	wp_send_json( $response );
}

/**
 * Respond with rendered popup menu
 *
 * Required _POST params:
 * - shortcode_name string
 *
 * @since 4.7
 */
function vc_action_render_settings_preset_popup() {
	vc_include_settings_preset_class();
	$html = Vc_Settings_Preset::getRenderedSettingsPresetPopup( vc_post_param( 'shortcode_name' ) );

	$response = array(
		'success' => true,
		'html' => $html,
	);

	wp_send_json( $response );
}

/**
 * Return rendered title prompt
 *
 * @since 4.7
 *
 */
function vc_action_render_settings_preset_title_prompt() {
	vc_user_access()->checkAdminNonce()->validateDie()->wpAny( 'edit_posts', 'edit_pages' )->validateDie()->part( 'presets' )->can()->validateDie();

	ob_start();
	vc_include_template( apply_filters( 'vc_render_settings_preset_title_prompt', 'editors/partials/prompt-presets.tpl.php' ) );
	$html = ob_get_clean();

	$response = array(
		'success' => true,
		'html' => $html,
	);

	wp_send_json( $response );
}

/**
 * Return rendered template prompt
 */
function vc_action_render_settings_templates_prompt() {
	vc_user_access()->checkAdminNonce()->validateDie()->wpAny( 'edit_posts', 'edit_pages' )->validateDie()->part( 'templates' )->can()->validateDie();

	ob_start();
	vc_include_template( apply_filters( 'vc_render_settings_preset_title_prompt', 'editors/partials/prompt-templates.tpl.php' ) );
	$html = ob_get_clean();

	$response = array(
		'success' => true,
		'html' => $html,
	);

	wp_send_json( $response );
}

/**
 * Register (add) new vendor preset
 *
 * @since 4.8
 *
 * @param string $title
 * @param string $shortcode
 * @param array $params
 * @param bool $default
 */
function vc_register_settings_preset( $title, $shortcode, $params, $default = false ) {
	vc_vendor_preset()->add( $title, $shortcode, $params, $default );
}

/**
 * @param $shortcodes
 * @return array
 * @throws \Exception
 */
function vc_add_new_elements_to_box( $shortcodes ) {
	require_once vc_path_dir( 'AUTOLOAD_DIR', 'class-vc-settings-presets.php' );

	return Vc_Settings_Preset::addVcPresetsToShortcodes( $shortcodes );
}

/**
 * @param $cat
 * @return array
 */
function vc_add_new_category_filter( $cat ) {
	require_once vc_path_dir( 'AUTOLOAD_DIR', 'class-vc-settings-presets.php' );

	return Vc_Settings_Preset::addPresetCategory( $cat );
}


Current_dir [ WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
8 Jun 2026 8.15 AM
raydofqv / raydofqv
0755
params
--
8 Jun 2026 8.15 AM
raydofqv / raydofqv
0755
vc-pages
--
8 Jun 2026 8.15 AM
raydofqv / raydofqv
0755
vendors
--
8 Jun 2026 8.15 AM
raydofqv / raydofqv
0755
.htaccess
0.231 KB
8 Jun 2026 8.15 AM
raydofqv / raydofqv
0555
bc-multisite-options.php
0.739 KB
1 Jun 2022 8.58 AM
raydofqv / raydofqv
0644
class-vc-settings-presets.php
9.224 KB
1 Jun 2022 8.58 AM
raydofqv / raydofqv
0644
class-vc-vendor-presets.php
2.482 KB
1 Jun 2022 8.58 AM
raydofqv / raydofqv
0644
components.json
1.922 KB
1 Jun 2022 8.58 AM
raydofqv / raydofqv
0644
hook-vc-grid.php
5.943 KB
1 Jun 2022 8.58 AM
raydofqv / raydofqv
0644
hook-vc-iconpicker-param.php
4.265 KB
1 Jun 2022 8.58 AM
raydofqv / raydofqv
0644
hook-vc-message.php
0.332 KB
1 Jun 2022 8.58 AM
raydofqv / raydofqv
0644
hook-vc-pie.php
0.311 KB
1 Jun 2022 8.58 AM
raydofqv / raydofqv
0644
hook-vc-progress-bar.php
0.35 KB
1 Jun 2022 8.58 AM
raydofqv / raydofqv
0644
hook-vc-wp-text.php
0.331 KB
1 Jun 2022 8.58 AM
raydofqv / raydofqv
0644
params-to-init.php
1.778 KB
1 Jun 2022 8.58 AM
raydofqv / raydofqv
0644
post-type-default-template.php
5.935 KB
1 Jun 2022 8.58 AM
raydofqv / raydofqv
0644
ui-vc-pointers.php
3.02 KB
1 Jun 2022 8.58 AM
raydofqv / raydofqv
0644
vc-grid-item-editor.php
9.546 KB
1 Jun 2022 8.58 AM
raydofqv / raydofqv
0644
vc-image-filters.php
9.08 KB
1 Jun 2022 8.58 AM
raydofqv / raydofqv
0644
vc-pointers-backend-editor.php
3.053 KB
1 Jun 2022 8.58 AM
raydofqv / raydofqv
0644
vc-pointers-frontend-editor.php
2.555 KB
1 Jun 2022 8.58 AM
raydofqv / raydofqv
0644
vc-settings-presets.php
7.08 KB
1 Jun 2022 8.58 AM
raydofqv / raydofqv
0644
vc-shortcode-autoloader.php
6.831 KB
1 Jun 2022 8.58 AM
raydofqv / raydofqv
0644
vc-single-image.php
1.974 KB
1 Jun 2022 8.58 AM
raydofqv / raydofqv
0644
vc-undoredo.php
0.296 KB
1 Jun 2022 8.58 AM
raydofqv / raydofqv
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF Static GIF