Example #1
0
 /**
  * Render the HTML list
  * @param $options, array of shortcode options
  */
 public function renderView($options)
 {
     $this->setOptions($options);
     $this->parsePostTypes();
     if ($this->options['user_id'] == '') {
         $this->options['user_id'] = null;
     }
     if ($this->options['site_id'] == '') {
         $this->options['site_id'] = get_current_blog_id();
     }
     return get_user_favorites_count($this->options['user_id'], $this->options['site_id'], $this->filters, true);
 }
Example #2
0
/**
* Get an array of User Favorites
* @param $user_id int, defaults to current user
* @param $site_id int, defaults to current blog/site
* @param $filters array of post types/taxonomies
* @return html
*/
function the_user_favorites_count($user_id = null, $site_id = null, $filters = null)
{
    echo get_user_favorites_count($user_id, $site_id, $filters);
}