vc-pinterest.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) {
  3. die( '-1' );
  4. }
  5. /**
  6. * Class WPBakeryShortCode_Vc_Pinterest
  7. */
  8. class WPBakeryShortCode_Vc_Pinterest extends WPBakeryShortCode {
  9. /**
  10. * @param $atts
  11. * @param null $content
  12. * @return string
  13. * @throws \Exception
  14. */
  15. protected function contentInline( $atts, $content = null ) {
  16. /**
  17. * Shortcode attributes
  18. * @var $atts
  19. * @var $type
  20. * @var $annotation // TODO: check why annotation doesn't set before
  21. * @var $css
  22. * @var $css_animation
  23. * Shortcode class
  24. * @var WPBakeryShortCode_Vc_Pinterest $this
  25. */
  26. $type = $annotation = $css = $css_animation = '';
  27. $atts = vc_map_get_attributes( $this->getShortcode(), $atts );
  28. extract( $atts );
  29. $css = isset( $atts['css'] ) ? $atts['css'] : '';
  30. $el_class = isset( $atts['el_class'] ) ? $atts['el_class'] : '';
  31. $class_to_filter = 'wpb_googleplus vc_social-placeholder wpb_content_element vc_socialtype-' . $type;
  32. $class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class ) . $this->getCSSAnimation( $css_animation );
  33. $css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
  34. return '<div class="' . esc_attr( $css_class ) . '"></div>';
  35. }
  36. }