Sharing_Post_Total

The WordPress Core Sharing Post Total class.

Defined (1)

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

/modules/sharedaddy/sharing-service.php  
  1. class Sharing_Post_Total { 
  2. public $id = 0; 
  3. public $total = 0; 
  4. public $title = ''; 
  5. public $url = ''; 
  6.  
  7. public function __construct( $id, $total ) { 
  8. $this->id = (int) $id; 
  9. $this->total = (int) $total; 
  10. $this->title = get_the_title( $this->id ); 
  11. $this->url = get_permalink( $this->id ); 
  12.  
  13. static function cmp( $a, $b ) { 
  14. if ( $a->total == $b->total ) 
  15. return $a->id < $b->id; 
  16. return $a->total < $b->total;