vc-googleplus.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) {
  3. die( '-1' );
  4. }
  5. /**
  6. * Class WPBakeryShortCode_Vc_GooglePlus
  7. */
  8. class WPBakeryShortCode_Vc_GooglePlus 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
  21. * @var $widget_width
  22. * @var $css
  23. * @var $css_animation
  24. * Shortcode class
  25. * @var WPBakeryShortCode_Vc_GooglePlus $this
  26. */
  27. $type = $annotation = $widget_width = $css = $css_animation = '';
  28. $atts = vc_map_get_attributes( $this->getShortcode(), $atts );
  29. extract( $atts );
  30. if ( strlen( $type ) === 0 ) {
  31. $type = 'standard';
  32. }
  33. if ( strlen( $annotation ) === 0 ) {
  34. $annotation = 'bubble';
  35. }
  36. $css = isset( $atts['css'] ) ? $atts['css'] : '';
  37. $el_class = isset( $atts['el_class'] ) ? $atts['el_class'] : '';
  38. $class_to_filter = 'wpb_googleplus vc_social-placeholder wpb_content_element vc_socialtype-' . $type;
  39. $class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class ) . $this->getCSSAnimation( $css_animation );
  40. $css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
  41. return '<div class="' . esc_attr( $css_class ) . '"></div>';
  42. }
  43. }