Function Reference: geodir_ask_for_share_location
Summary
Ask user confirmation to share location.
Package
GeoDirectory_Location_Manager
Parameters
- $mode
- (bool) (required) Ask the user? Default: false.
- Default: None
Return Values
- (bool)
- Filtered value.
Change Log
Since: 1.0.0
Source File
geodir_ask_for_share_location() is located in geodir_location_manager/geodir_location_hooks_actions.php [Line: 3084]
Source Code
function geodir_ask_for_share_location($mode)
{
if((isset($_SESSION['gd_location_shared']) && $_SESSION['gd_location_shared']=='1') ||(isset($_SESSION['gd_multi_location']) && $_SESSION['gd_multi_location']) )
{
$_SESSION['gd_location_shared']=1;
return false;
}
else if(!geodir_is_geodir_page())
return false;
else{
if(!defined('DONOTCACHEPAGE')) {
define('DONOTCACHEPAGE', TRUE);// do not cache if we are asking for location
}
return true ;
}
}