Sharing_Service_Total

The Jetpack by WordPress.com Sharing Service Total class.

Defined (1)

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

/modules/sharedaddy/sharing-service.php  
  1. class Sharing_Service_Total { 
  2. public $id = ''; 
  3. public $name = ''; 
  4. public $service = ''; 
  5. public $total = 0; 
  6.  
  7. public function __construct( $id, $total ) { 
  8. $services = new Sharing_Service(); 
  9. $this->id = esc_html( $id ); 
  10. $this->service = $services->get_service( $id ); 
  11. $this->total = (int) $total; 
  12.  
  13. $this->name = $this->service->get_name(); 
  14.  
  15. static function cmp( $a, $b ) { 
  16. if ( $a->total == $b->total ) 
  17. return $a->name < $b->name; 
  18. return $a->total < $b->total;