/** * 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; }
/** * 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']); }
/** * 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); }