Skip to main content

vc_add_shortcode_param()

SINCE 4.4

<?php vc_add_shortcode_param($name, $form_field_callback, $script_url = null)?>

Helper function to register a new shortcode attribute.

Params

Param nameTypeRequiredDescription
$nameStringYesAttribute name.
$form_field_callbackCallableYesThe callback will be called when the settings form is shown and the attribute is added to the shortcode.
$script_urlStringNoJavaScript file URL, which will be attached at the end of the settings form.

Example

To see an example of how to create a new param type shortcode param, please visit our developers “How To’s” section.