WC_GZD_Trusted_Shops_Widget_Reviews

The WooCommerce Germanized WC GZD Trusted Shops Widget Reviews class.

Defined (1)

The class is defined in the following location(s).

/includes/trusted-shops/widgets/class-wc-gzd-trusted-shops-widget-reviews.php  
  1. class WC_GZD_Trusted_Shops_Widget_Reviews extends WC_Widget { 
  2.  
  3. public function __construct() { 
  4. $this->widget_cssclass = 'woocommerce woocommerce_gzd widget_trusted_shops_reviews'; 
  5. $this->widget_description = _x( "Display your Trusted Shops Reviews as graphic.", 'trusted-shops', 'woocommerce-germanized' ); 
  6. $this->widget_id = 'woocommerce_gzd_widget_trusted_shops_reviews'; 
  7. $this->widget_name = _x( 'Trusted Shops Reviews', 'trusted-shops', 'woocommerce-germanized' ); 
  8. $this->settings = array( 
  9. 'title' => array( 
  10. 'type' => 'text',  
  11. 'std' => _x( 'Trusted Shops Reviews', 'trusted-shops', 'woocommerce-germanized' ),  
  12. 'label' => _x( 'Title', 'trusted-shops', 'woocommerce-germanized' ),  
  13. ),  
  14. ); 
  15. parent::__construct(); 
  16.  
  17. /** 
  18. * widget function. 
  19. * @see WP_Widget 
  20. * @access public 
  21. * @param array $args 
  22. * @param array $instance 
  23. * @return void 
  24. */ 
  25. public function widget( $args, $instance ) { 
  26.  
  27. extract( $args ); 
  28.  
  29. $title = apply_filters('widget_title', empty( $instance['title'] ) ? _x( 'Trusted Shops Reviews', 'trusted-shops', 'woocommerce-germanized' ) : $instance['title'], $instance, $this->id_base ); 
  30.  
  31. echo $before_widget; 
  32.  
  33. if ( $title ) 
  34. echo $before_title . $title . $after_title; 
  35.  
  36. echo '<div class="widget_trusted_shops_reviews_graphic_content">'; 
  37.  
  38. echo do_shortcode( '[trusted_shops_reviews]' ); 
  39.  
  40. echo '</div>'; 
  41.  
  42. echo $after_widget;