Files
.circleci
.github
assets
bin
data
inc
admin-pages
api
builders
checkout
compat
contracts
country
class-country-br.php
class-country-ca.php
class-country-cn.php
class-country-de.php
class-country-default.php
class-country-es.php
class-country-fr.php
class-country-gb.php
class-country-in.php
class-country-jp.php
class-country-mx.php
class-country-my.php
class-country-ne.php
class-country-nl.php
class-country-ru.php
class-country-sg.php
class-country-tr.php
class-country-us.php
class-country-za.php
class-country.php
database
debug
deprecated
development
domain-mapping
duplication
exception
functions
gateways
helpers
installers
integrations
internal
invoices
limitations
limits
list-tables
loaders
managers
mercator
models
next
objects
site-templates
sso
tax
traits
ui
updater
class-admin-notices.php
class-admin-themes-compatibility.php
class-ajax.php
class-api.php
class-async-calls.php
class-autoloader.php
class-cron.php
class-current.php
class-dashboard-statistics.php
class-dashboard-widgets.php
class-documentation.php
class-domain-mapping.php
class-faker.php
class-geolocation.php
class-helper.php
class-hooks.php
class-license.php
class-light-ajax.php
class-logger.php
class-maintenance-mode.php
class-newsletter.php
class-requirements.php
class-scripts.php
class-session-cookie.php
class-settings.php
class-sunrise.php
class-user-switching.php
class-views.php
class-whitelabel.php
class-wp-ultimo.php
lang
patches
tests
utils
views
.gitignore
.phpcs.xml.dist
LICENSE
autoload.php
composer.json
composer.lock
constants.php
loco.xml
phpstan.neon.dist
phpunit.xml.dist
readme.txt
rector.php
sunrise.php
uninstall.php
wp-multisite-waas.php
wp-multisite-waas/inc/country/class-country-ca.php
2025-02-08 13:57:32 -07:00

107 lines
2.2 KiB
PHP

<?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 = [
'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');
}
/**
* 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 [
'AB' => __('Alberta', 'wp-ultimo'),
'BC' => __('British Columbia', 'wp-ultimo'),
'MB' => __('Manitoba', 'wp-ultimo'),
'NB' => __('New Brunswick', 'wp-ultimo'),
'NL' => __('Newfoundland and Labrador', 'wp-ultimo'),
'NT' => __('Northwest Territories', 'wp-ultimo'),
'NS' => __('Nova Scotia', 'wp-ultimo'),
'NU' => __('Nunavut', 'wp-ultimo'),
'ON' => __('Ontario', 'wp-ultimo'),
'PE' => __('Prince Edward Island', 'wp-ultimo'),
'QC' => __('Quebec', 'wp-ultimo'),
'SK' => __('Saskatchewan', 'wp-ultimo'),
'YT' => __('Yukon', 'wp-ultimo'),
];
}
}