Initial Commit
This commit is contained in:
109
inc/country/class-country-ca.php
Normal file
109
inc/country/class-country-ca.php
Normal file
@ -0,0 +1,109 @@
|
||||
<?php // phpcs:ignore - @generation-checksum CA-13-1079
|
||||
/**
|
||||
* Country Class for Canada (CA).
|
||||
*
|
||||
* State/province count: 13
|
||||
* City count: 1079
|
||||
* City count per state/province:
|
||||
* - QC: 351 cities
|
||||
* - ON: 239 cities
|
||||
* - BC: 139 cities
|
||||
* - AB: 115 cities
|
||||
* - SK: 54 cities
|
||||
* - MB: 43 cities
|
||||
* - NS: 43 cities
|
||||
* - NB: 37 cities
|
||||
* - NL: 32 cities
|
||||
* - PE: 9 cities
|
||||
* - NT: 7 cities
|
||||
* - NU: 6 cities
|
||||
* - YT: 4 cities
|
||||
*
|
||||
* @package WP_Ultimo\Country
|
||||
* @since 2.0.11
|
||||
*/
|
||||
|
||||
namespace WP_Ultimo\Country;
|
||||
|
||||
// Exit if accessed directly
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
/**
|
||||
* Country Class for Canada (CA).
|
||||
*
|
||||
* IMPORTANT:
|
||||
* This file is generated by build scripts, do not
|
||||
* change it directly or your changes will be LOST!
|
||||
*
|
||||
* @since 2.0.11
|
||||
*
|
||||
* @property-read string $code
|
||||
* @property-read string $currency
|
||||
* @property-read int $phone_code
|
||||
*/
|
||||
class Country_CA extends Country {
|
||||
|
||||
use \WP_Ultimo\Traits\Singleton;
|
||||
|
||||
/**
|
||||
* General country attributes.
|
||||
*
|
||||
* This might be useful, might be not.
|
||||
* In case of doubt, keep it.
|
||||
*
|
||||
* @since 2.0.11
|
||||
* @var array
|
||||
*/
|
||||
protected $attributes = array(
|
||||
'country_code' => 'CA',
|
||||
'currency' => 'CAD',
|
||||
'phone_code' => 1,
|
||||
);
|
||||
|
||||
/**
|
||||
* The type of nomenclature used to refer to the country sub-divisions.
|
||||
*
|
||||
* @since 2.0.11
|
||||
* @var string
|
||||
*/
|
||||
protected $state_type = 'province';
|
||||
|
||||
/**
|
||||
* Return the country name.
|
||||
*
|
||||
* @since 2.0.11
|
||||
* @return string
|
||||
*/
|
||||
public function get_name() {
|
||||
|
||||
return __('Canada', 'wp-ultimo-locations');
|
||||
|
||||
} // end get_name;
|
||||
|
||||
/**
|
||||
* Returns the list of states for CA.
|
||||
*
|
||||
* @since 2.0.11
|
||||
* @return array The list of state/provinces for the country.
|
||||
*/
|
||||
protected function states() {
|
||||
|
||||
return array(
|
||||
'AB' => __('Alberta', 'wp-ultimo-locations'),
|
||||
'BC' => __('British Columbia', 'wp-ultimo-locations'),
|
||||
'MB' => __('Manitoba', 'wp-ultimo-locations'),
|
||||
'NB' => __('New Brunswick', 'wp-ultimo-locations'),
|
||||
'NL' => __('Newfoundland and Labrador', 'wp-ultimo-locations'),
|
||||
'NT' => __('Northwest Territories', 'wp-ultimo-locations'),
|
||||
'NS' => __('Nova Scotia', 'wp-ultimo-locations'),
|
||||
'NU' => __('Nunavut', 'wp-ultimo-locations'),
|
||||
'ON' => __('Ontario', 'wp-ultimo-locations'),
|
||||
'PE' => __('Prince Edward Island', 'wp-ultimo-locations'),
|
||||
'QC' => __('Quebec', 'wp-ultimo-locations'),
|
||||
'SK' => __('Saskatchewan', 'wp-ultimo-locations'),
|
||||
'YT' => __('Yukon', 'wp-ultimo-locations'),
|
||||
);
|
||||
|
||||
} // end states;
|
||||
|
||||
} // end class Country_CA;
|
Reference in New Issue
Block a user