1. Home
  2. Docs
  3. Inner API
  4. vc_map_update()


After vc_map() function call all mapping data is stored in memory, if you need to modify one of the existing parameters you can use vc_map_update()function to do that. This is useful if you want to make a simple change to the existing content elements. For example: Change content element name.

<?php vc_map_update( $shortcode, $settings ); ?>


Param name
$shortcode String Shortcode base. For [my_shortcode] shortcode base is my_shortcode. For default “Message box” element, base is “vc_message”
$settings Array Array with list of settings that should be updated for desired content element. List of settings that can be changed


How to change default name and category values for “Message box” content element.

$settings = array (
  'name' => __( 'new name', 'my-text-domain' ),
  'category' => __( 'New category name', 'my-text-domain' )
vc_map_update( 'vc_message', $settings ); // Note: 'vc_message' was used as a base for "Message box" element