vc-gitem-animated-block.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) {
  3. die( '-1' );
  4. }
  5. require_once vc_path_dir( 'SHORTCODES_DIR', 'vc-gitem.php' );
  6. /**
  7. * Class WPBakeryShortCode_Vc_Gitem_Animated_Block
  8. */
  9. class WPBakeryShortCode_Vc_Gitem_Animated_Block extends WPBakeryShortCode_Vc_Gitem {
  10. protected static $animations = array();
  11. /**
  12. * @return string
  13. */
  14. public function itemGrid() {
  15. $output = '';
  16. $output .= '<div class="vc_gitem-animated-block-content-controls">' . '<ul class="vc_gitem-tabs vc_clearfix" data-vc-gitem-animated-block="tabs">' . '</ul>' . '</div>';
  17. $output .= '' . '<div class="vc_gitem-zone-tab vc_clearfix" data-vc-gitem-animated-block="add-a"></div>' . '<div class="vc_gitem-zone-tab vc_clearfix" data-vc-gitem-animated-block="add-b"></div>';
  18. return $output;
  19. }
  20. /**
  21. * @param $width
  22. * @param $i
  23. * @return string
  24. */
  25. public function containerHtmlBlockParams( $width, $i ) {
  26. return 'class="vc_gitem-animated-block-content"';
  27. }
  28. /**
  29. * @return array
  30. */
  31. public static function animations() {
  32. return array(
  33. esc_html__( 'Single block (no animation)', 'js_composer' ) => '',
  34. esc_html__( 'Double block (no animation)', 'js_composer' ) => 'none',
  35. esc_html__( 'Fade in', 'js_composer' ) => 'fadeIn',
  36. esc_html__( 'Scale in', 'js_composer' ) => 'scaleIn',
  37. esc_html__( 'Scale in with rotation', 'js_composer' ) => 'scaleRotateIn',
  38. esc_html__( 'Blur out', 'js_composer' ) => 'blurOut',
  39. esc_html__( 'Blur scale out', 'js_composer' ) => 'blurScaleOut',
  40. esc_html__( 'Slide in from left', 'js_composer' ) => 'slideInRight',
  41. esc_html__( 'Slide in from right', 'js_composer' ) => 'slideInLeft',
  42. esc_html__( 'Slide bottom', 'js_composer' ) => 'slideBottom',
  43. esc_html__( 'Slide top', 'js_composer' ) => 'slideTop',
  44. esc_html__( 'Vertical flip in with fade', 'js_composer' ) => 'flipFadeIn',
  45. esc_html__( 'Horizontal flip in with fade', 'js_composer' ) => 'flipHorizontalFadeIn',
  46. esc_html__( 'Go top', 'js_composer' ) => 'goTop20',
  47. esc_html__( 'Go bottom', 'js_composer' ) => 'goBottom20',
  48. );
  49. }
  50. }