Skip to main content

vc_mapper_init_before

Fires before the WPBakery mapper begins initialization. This hook runs at the very start of Vc_Mapper::init(), before parameter definitions are loaded and before any element mapping takes place. Use it to prepare resources or register activities that should be queued before the mapping process.

Parameters​

This action has no parameters.

Usage​

add_action( 'vc_mapper_init_before', 'wpb_before_mapper_init' );

function wpb_before_mapper_init() {
// Prepare custom configurations before element mapping begins
// This runs before lean-map.php is loaded
define( 'MY_PLUGIN_ELEMENTS_LOADED', true );
}

Source​

File: include/classes/core/class-vc-mapper.php