Example #1
0
 /**
  * Add the Favorite Button
  * @todo add favorite button html
  */
 private function addFavoriteButton($display_in)
 {
     $output = '';
     if (isset($display_in['before_content']) && $display_in['before_content'] == 'true') {
         $output .= get_favorites_button();
     }
     $output .= $this->content;
     if (isset($display_in['after_content']) && $display_in['after_content'] == 'true') {
         $output .= get_favorites_button();
     }
     return $output;
 }
Example #2
0
 /**
  * Render the Button
  * @param $options, array of shortcode options
  */
 public function renderView($options)
 {
     $this->setOptions($options);
     return get_favorites_button($this->options['post_id'], $this->options['site_id']);
 }
Example #3
0
/**
* Echos the favorite button
* @param $post_id int, defaults to current post
* @param $site_id int, defaults to current blog/site
* @return html
*/
function the_favorites_button($post_id = null, $site_id = null)
{
    echo get_favorites_button($post_id, $site_id);
}