Esempio n. 1
0
 /**
  * Add the column data
  */
 public function addColumnData($column, $post_id)
 {
     if ($column !== 'favorites') {
         return;
     }
     echo get_favorites_count($post_id);
 }
 /**
  * Render the count
  * @param $options, array of shortcode options
  */
 public function renderView($options)
 {
     $this->setOptions($options);
     return get_favorites_count($this->options['post_id'], $this->options['site_id']);
 }
Esempio n. 3
0
/**
* Echo the Favorite Count
* @param $post_id int, defaults to current post
* @param $site_id int, defaults to current blog/site
* @return html
*/
function the_favorites_count($post_id = null, $site_id = null)
{
    echo get_favorites_count($post_id, $site_id);
}