PHP Class New_Device_Notification_VIP_Go, vip-mu-plugins-public

Customisations for the VIP Go platform.
Show file Open project: Automattic/vip-mu-plugins-public Class Usage Examples

Public Methods

Method Description
__construct ( ) New_Device_Notification_VIP_Go constructor.
country_code_to_long ( string $code ) : string Convert a two letter country code to a country name.
filter_ndn_location ( object $location ) : object Hooks the ndn_location filter to supply the location of the current remote address.
instance ( ) : New_Device_Notification_VIP_Go Get the singleton instance of this class

Method Details

__construct() public method

New_Device_Notification_VIP_Go constructor.
public __construct ( )

country_code_to_long() public method

Convert a two letter country code to a country name.
public country_code_to_long ( string $code ) : string
$code string A two letter country code
return string The name of a country, or an empty string if nothing matches the supplied code

filter_ndn_location() public method

Hooks the ndn_location filter to supply the location of the current remote address.
public filter_ndn_location ( object $location ) : object
$location object A stdClass object, detailing a location (possibly unknown)
return object A stdClass object, detailing the location of the remote address

instance() public static method

Get the singleton instance of this class
public static instance ( ) : New_Device_Notification_VIP_Go
return New_Device_Notification_VIP_Go