Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. if ( ! function_exists( 'my_vc_carousel_mapper' ) ) {
  2. function my_vc_carousel_mapper() {
  3. vc_map( array(
  4. "name" => __( "My Carousel", "text-domain" ),
  5. "base" => "my_carousel_parent",
  6. "as_parent" => array( 'only' => 'my_carousel_child' ), // Use only|except attributes to limit child shortcodes (separate multiple values with comma)
  7. "content_element" => true,
  8. "is_container" => true,
  9. "show_settings_on_create" => true,
  10. "category" => __( "My Content Elements", "text-domain" ),
  11. "js_view" => 'VcColumnView',
  12. "params" => array(
  13. array(
  14. "type" => "textfield",
  15. "heading" => __( "Extra class name", "text-domain" ),
  16. "param_name" => 'my_class',
  17. "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" )
  18. ),
  19. ),
  20. )
  21. );
  22. }
  23.  
  24. add_action( 'vc_after_init_base', 'my_vc_carousel_mapper' );
  25.  
  26. //extend WPBakeryShortCodesContainer class
  27. if ( class_exists( 'WPBakeryShortCodesContainer' ) ) {
  28. class WPBakeryShortCode_my_carousel_parent extends WPBakeryShortCodesContainer {
  29. }
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement