Skip to content

Commit

Permalink
[WS-266] Add location checks for Canada & Indonesia
Browse files Browse the repository at this point in the history
  • Loading branch information
grantism committed Dec 5, 2019
1 parent c2ff689 commit 9705011
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
18 changes: 16 additions & 2 deletions wmGeolocation.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* World Manager geolocation plugin for Joomla.
* This is required to use the wmCareers & wmLanguageSwitch plugins.
* @package wmGeolocation
* @version 1.0
* @version 1.1
* @author Grant McNally <[email protected]>
* @link https://github.com/grantism/wmGeolocation
*/
Expand Down Expand Up @@ -110,4 +110,18 @@ public function isAustralia() {
public function isUnitedStates() {
return $this->getCountryIsoCode() == 'US';
}
}

/**
* @return bool
*/
public function isCanada() {
return $this->getCountryIsoCode() == 'CA';
}

/**
* @return bool
*/
public function isIndonesia() {
return $this->getCountryIsoCode() == 'ID';
}
}
3 changes: 3 additions & 0 deletions wmGeolocation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
<extension version="3.9" type="plugin" group="system" method="upgrade">
<name>World Manager - Geolocation</name>
<description>World Manager geolocation plugin for Joomla.</description>
<version>1.1</version>
<creationDate>December 2019</creationDate>
<author>World Manager</author>

<files>
<filename plugin="wmGeolocation">wmGeolocation.php</filename>
Expand Down

0 comments on commit 9705011

Please sign in to comment.