shortcode-vc-tta-pageable.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) {
  3. die( '-1' );
  4. }
  5. return array(
  6. 'name' => esc_html__( 'Pageable Container', 'js_composer' ),
  7. 'base' => 'vc_tta_pageable',
  8. 'icon' => 'icon-wpb-ui-pageable',
  9. 'is_container' => true,
  10. 'show_settings_on_create' => false,
  11. 'as_parent' => array(
  12. 'only' => 'vc_tta_section',
  13. ),
  14. 'category' => esc_html__( 'Content', 'js_composer' ),
  15. 'description' => esc_html__( 'Pageable content container', 'js_composer' ),
  16. 'params' => array(
  17. array(
  18. 'type' => 'textfield',
  19. 'param_name' => 'title',
  20. 'heading' => esc_html__( 'Widget title', 'js_composer' ),
  21. 'description' => esc_html__( 'Enter text used as widget title (Note: located above content element).', 'js_composer' ),
  22. ),
  23. array(
  24. 'type' => 'hidden',
  25. 'param_name' => 'no_fill_content_area',
  26. 'std' => true,
  27. ),
  28. array(
  29. 'type' => 'dropdown',
  30. 'param_name' => 'autoplay',
  31. 'value' => array(
  32. esc_html__( 'None', 'js_composer' ) => 'none',
  33. '1' => '1',
  34. '2' => '2',
  35. '3' => '3',
  36. '4' => '4',
  37. '5' => '5',
  38. '10' => '10',
  39. '20' => '20',
  40. '30' => '30',
  41. '40' => '40',
  42. '50' => '50',
  43. '60' => '60',
  44. ),
  45. 'std' => 'none',
  46. 'heading' => esc_html__( 'Autoplay', 'js_composer' ),
  47. 'description' => esc_html__( 'Select auto rotate for pageable in seconds (Note: disabled by default).', 'js_composer' ),
  48. ),
  49. array(
  50. 'type' => 'textfield',
  51. 'param_name' => 'active_section',
  52. 'heading' => esc_html__( 'Active section', 'js_composer' ),
  53. 'value' => 1,
  54. 'description' => esc_html__( 'Enter active section number (Note: to have all sections closed on initial load enter non-existing number).', 'js_composer' ),
  55. ),
  56. array(
  57. 'type' => 'dropdown',
  58. 'param_name' => 'pagination_style',
  59. 'value' => array(
  60. esc_html__( 'None', 'js_composer' ) => '',
  61. esc_html__( 'Square Dots', 'js_composer' ) => 'outline-square',
  62. esc_html__( 'Radio Dots', 'js_composer' ) => 'outline-round',
  63. esc_html__( 'Point Dots', 'js_composer' ) => 'flat-round',
  64. esc_html__( 'Fill Square Dots', 'js_composer' ) => 'flat-square',
  65. esc_html__( 'Rounded Fill Square Dots', 'js_composer' ) => 'flat-rounded',
  66. ),
  67. 'heading' => esc_html__( 'Pagination style', 'js_composer' ),
  68. 'description' => esc_html__( 'Select pagination style.', 'js_composer' ),
  69. 'std' => 'outline-round',
  70. ),
  71. array(
  72. 'type' => 'dropdown',
  73. 'param_name' => 'pagination_color',
  74. 'value' => vc_get_shared( 'colors-dashed' ),
  75. 'heading' => esc_html__( 'Pagination color', 'js_composer' ),
  76. 'description' => esc_html__( 'Select pagination color.', 'js_composer' ),
  77. 'param_holder_class' => 'vc_colored-dropdown',
  78. 'std' => 'grey',
  79. 'dependency' => array(
  80. 'element' => 'pagination_style',
  81. 'not_empty' => true,
  82. ),
  83. ),
  84. array(
  85. 'type' => 'dropdown',
  86. 'param_name' => 'tab_position',
  87. 'value' => array(
  88. esc_html__( 'Top', 'js_composer' ) => 'top',
  89. esc_html__( 'Bottom', 'js_composer' ) => 'bottom',
  90. ),
  91. 'std' => 'bottom',
  92. 'heading' => esc_html__( 'Pagination position', 'js_composer' ),
  93. 'description' => esc_html__( 'Select pageable navigation position.', 'js_composer' ),
  94. ),
  95. vc_map_add_css_animation(),
  96. array(
  97. 'type' => 'el_id',
  98. 'heading' => esc_html__( 'Element ID', 'js_composer' ),
  99. 'param_name' => 'el_id',
  100. 'description' => sprintf( esc_html__( 'Enter element ID (Note: make sure it is unique and valid according to %sw3c specification%s).', 'js_composer' ), '<a href="https://www.w3schools.com/tags/att_global_id.asp" target="_blank">', '</a>' ),
  101. ),
  102. array(
  103. 'type' => 'textfield',
  104. 'heading' => esc_html__( 'Extra class name', 'js_composer' ),
  105. 'param_name' => 'el_class',
  106. 'description' => esc_html__( '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.', 'js_composer' ),
  107. ),
  108. array(
  109. 'type' => 'css_editor',
  110. 'heading' => esc_html__( 'CSS box', 'js_composer' ),
  111. 'param_name' => 'css',
  112. 'group' => esc_html__( 'Design Options', 'js_composer' ),
  113. ),
  114. ),
  115. 'js_view' => 'VcBackendTtaPageableView',
  116. 'custom_markup' => '
  117. <div class="vc_tta-container vc_tta-o-non-responsive" data-vc-action="collapse">
  118. <div class="vc_general vc_tta vc_tta-tabs vc_tta-pageable vc_tta-color-backend-tabs-white vc_tta-style-flat vc_tta-shape-rounded vc_tta-spacing-1 vc_tta-tabs-position-top vc_tta-controls-align-left">
  119. <div class="vc_tta-tabs-container">' . '<ul class="vc_tta-tabs-list">' . '<li class="vc_tta-tab" data-vc-tab data-vc-target-model-id="{{ model_id }}" data-element_type="vc_tta_section"><a href="javascript:;" data-vc-tabs data-vc-container=".vc_tta" data-vc-target="[data-model-id=\'{{ model_id }}\']" data-vc-target-model-id="{{ model_id }}"><span class="vc_tta-title-text">{{ section_title }}</span></a></li>' . '</ul>
  120. </div>
  121. <div class="vc_tta-panels vc_clearfix {{container-class}}">
  122. {{ content }}
  123. </div>
  124. </div>
  125. </div>',
  126. 'default_content' => '
  127. [vc_tta_section title="' . sprintf( '%s %d', esc_html__( 'Section', 'js_composer' ), 1 ) . '"][/vc_tta_section]
  128. [vc_tta_section title="' . sprintf( '%s %d', esc_html__( 'Section', 'js_composer' ), 2 ) . '"][/vc_tta_section]
  129. ',
  130. 'admin_enqueue_js' => array(
  131. vc_asset_url( 'lib/vc_tabs/vc-tabs.min.js' ),
  132. ),
  133. );