private function find_current_listing() { $this->ad_id = absint($this->request->get_ad_id()); if ($this->ad_id === 0) { return null; } $this->ad = AWPCP_Ad::find_by_id($this->ad_id); $this->properties = awpcp_get_ad_share_info($this->ad_id); }
/** * @since 3.2.2 */ function awpcp_do_placeholder_facebook_button_url($ad, $placeholder) { $info = awpcp_get_ad_share_info($ad->ad_id); return sprintf('http://www.facebook.com/sharer/sharer.php?u=%s', urlencode($info['url'])); }