Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( ! function_exists( 'my_vc_carousel_mapper' ) ) {
- function my_vc_carousel_mapper() {
- vc_map( array(
- "name" => __( "My Carousel", "text-domain" ),
- "base" => "my_carousel_parent",
- "as_parent" => array( 'only' => 'my_carousel_child' ), // Use only|except attributes to limit child shortcodes (separate multiple values with comma)
- "content_element" => true,
- "is_container" => true,
- "show_settings_on_create" => true,
- "category" => __( "My Content Elements", "text-domain" ),
- "js_view" => 'VcColumnView',
- "params" => array(
- array(
- "type" => "textfield",
- "heading" => __( "Extra class name", "text-domain" ),
- "param_name" => 'my_class',
- "description" => __( "If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "inspiry" )
- ),
- ),
- )
- );
- }
- add_action( 'vc_after_init_base', 'my_vc_carousel_mapper' );
- //extend WPBakeryShortCodesContainer class
- if ( class_exists( 'WPBakeryShortCodesContainer' ) ) {
- class WPBakeryShortCode_my_carousel_parent extends WPBakeryShortCodesContainer {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement