Plugin này chưa được cập nhật với 3 phiên bản mới nhất của WordPress. Nó có thể không được hỗ trợ và bảo trì, và có thể xung đột với các phiên bản WordPress mới nhất.

International Phone Number Display

Mô tả

The plugin will automatically display telephone numbers in the correct format for international users from any country in the world. It does this by looking up their IP address (using ipinfo.io) and determining the country, then passing this information along with the phone number to the Telecoms Cloud API which formats the number correctly and adds the appropriate International Direct Dialing Number (IDD).

As of version 2.0.0, the plugin also caches each new request (eg. number X in country Y being dialled from location Z) in order to return results from the cache in the case of subsequent identical requests. This results in less unnecessary requests being made to the Telecoms Cloud API, saving costs and increasing speed.

Example: You may have a London phone number – 02079460981 – which would be displayed like so for visitors from the following countries:

  • UK: 020 7946 0981 (no prefix added – just spaces added to make number readable)
  • US: 011 44 20 7946 0981
  • Spain: 00 44 20 7946 0981

Usage: wherever you want a telephone number to be formatted automatically within your website, use the shortcode like so:

[intPnd servicenumber=”02079460981″ location=”GB”]

Note: you must pass the 2-digit country code in which the telephone number is located. For a list, see http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2

Cài đặt

This section describes how to install the plugin and get it working.

  1. Upload intl-phone-number.php to the /wp-content/plugins/ directory (or install via WordPress Plugins menu)
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Sign up for a free Telecoms Cloud API account at https://my.telecomscloud.com/sign-up.html?api and input your API credentials in the plugin’s Settings page
  4. Ensure you have cURL installed for PHP, which is required for the plugin to work. The Settings page will tell you if you need to install this, and how to do it.
  5. Trigger the plugin to format numbers like this: [intPnd servicenumber=”02079460981″ location=”GB”]

Hỏi đáp

What external services does this plugin use to achieve this marvellous feat?

The plugin turns your user’s IP address into a 2-digit country code using ipinfo.io and then it passes those details along with the number to the Telecoms Cloud API. Both are free to use for usage below certain limits.

Do I need to register?

You don’t for ipinfo.io but you’ll need to go to www.telecomscloud.com and get some (free) access keys and input them on the plugin options page.

What if I hit the limits or one of the APIs times out?

The plugin will just output your number unchanged.

Đánh giá

There are no reviews for this plugin.

Người đóng góp & Lập trình viên

“International Phone Number Display” là mã nguồn mở. Những người sau đã đóng góp vào plugin này.

Những người đóng góp

Nhật ký thay đổi

2.0.2

  • Minor bugfixes and improvements.

2.0.1

  • Update API signup URL.

2.0.0

  • Major rewrite including OAuth2.0 Authentication to the Telecoms Cloud API.
  • Plugin seamlessly handles fetching, storing and expiration of your OAuth token for accessing the API.
  • Plugin now validates your API Credentials before storing them.
  • Plugin now caches requests and returns cached results when identical requests are made.

1.0.3

  • Trim SID and Token input on admin options page.

1.0.2

  • Minor readme fixes.

1.0.1

  • Minor readme fixes.

1.0

  • Initial stable release.