Usage
google_review_url($place_id)
Parameters
$place_id
(Optional) (String) The Place ID generated from Google
Default: None
Parameter Notes
Generate a Place ID here by searching for your business.
If a Place ID is not passed to this function, it will try to pull it from Nebula Options. If neither are available it will return false.
Examples
Get a review URL from the Place ID in Nebula Options
google_review_url();
Or explicitly with the Nebula Options name (just for reference)
google_review_url(nebula()->get_option('google_place_id'));
Additional Notes
The Google Place ID can be entered in Nebula Options where this function will look if a specific Place ID is not included when this function is called.
Note: This URL will appear in the Administrative metabox in the WordPress admin Dashboard where it can be easily copy and pasted by anyone. This link will only appear if the Place ID has been entered into the Nebula Option.
Source File
Located in /libs/Options/Options.php on line 118.
No Hooks
This function does not have any filters or actions available. Request one?public function google_review_url($place_id=''){ if ( empty($place_id) ){ $nebula_options = get_option('nebula_options'); $place_id = ( is_array($nebula_options) )? $nebula_options['google_place_id'] : false; //Note: This may still be empty } //Return a Google Review link if we have a Place ID if ( !empty($place_id) ){ return 'https://search.google.com/local/writereview?placeid=' . $place_id; //come up with a default } return false; //Otherwise we do not have a URL }
Override
This function can not be short-circuited with an override filter. Request one?