DialPerPage

外掛說明

DialPerPage replaces one configured source phone number with page-specific numbers on exact WordPress URLs.

Replacement runs on the final HTML response, so the plugin can update shared headers and footers, page-builder output, modal windows, visible text, tel: links, WhatsApp links, and phones whose characters are split across nested HTML elements.

Only the configured source number is changed. Other numbers and pages remain untouched.

Features

  • Assign a different replacement number to each page.
  • Accept full URLs or relative paths.
  • Update visible numbers, tel: links, and phone-based messenger URLs.
  • Preserve the original phone mask, including spaces, non-breaking spaces, parentheses, dots, and hyphens.
  • Handle phone digits split across nested span or small elements.
  • Search, validate, add, and remove rules from a responsive settings screen.
  • Support international phone numbers containing 10 to 15 digits.
  • Follow the standard WordPress locale and WordPress.org language-pack system.
  • Make no changes to post content, theme files, or templates.
  • Purge supported page caches after activation, upgrades, and settings changes.
  • Restore managed phone links if a call-tracking script changes them in the browser.
  • Send no data to external services and include no tracking.

Performance

The plugin resolves the current request path with an exact array lookup. Output buffering, HTML processing, and the small browser guard start only when that path has a valid replacement rule. AJAX, REST, JSON, feeds, cron, WP-CLI, XML-RPC, robots, favicon, HEAD, and non-HTML responses are skipped.

Admin CSS and JavaScript load only on the plugin settings screen. Settings and the active rule are cached for the current request.

Privacy

DialPerPage does not collect, transmit, or share personal data. It makes no external requests and stores only its configuration in the WordPress options table.

安裝方式

  1. In WordPress, open Plugins > Add New Plugin > Upload Plugin.
  2. Upload dialperpage.zip, install it, and activate DialPerPage.
  3. Open Settings > DialPerPage.
  4. Enter the source phone currently displayed on the site.
  5. Add a page URL or path and its replacement phone.
  6. Save the settings. DialPerPage clears supported WordPress page caches automatically; clear any hosting or CDN cache that is managed outside WordPress.

常見問題集

Does the plugin modify content in the database?

No. Replacement is applied to the final HTML response. Posts, page-builder data, theme files, and templates are not changed.

Does it run on pages without a rule?

The plugin performs one exact path lookup. When no rule matches, output buffering does not start and the HTML is not scanned or copied.

Will unrelated phone numbers be replaced?

No. Only the configured source phone is matched. For 11-digit Russian phones, 7 and 8 prefixes are treated as equivalent.

Is the original phone format preserved?

Yes, when source and replacement numbers contain the same number of digits. Only digits change; separators and HTML spacing entities remain in place. Compact tel: values remain compact.

Does it support phones split into many HTML tags?

Yes. Inside a matching tel: link, the plugin can replace digits distributed across nested span and small elements while retaining their tags, styles, classes, and microdata.

Can I use a full URL?

Yes. Both https://example.com/service/ and /service/ are accepted. Query parameters are ignored, and matching uses the normalized path.

Why is the old phone still visible?

Saving settings automatically purges Hyper Cache, WP Super Cache, WP Rocket, W3 Total Cache, Cache Enabler, and LiteSpeed Cache when their public purge APIs are available. After updating from an earlier DialPerPage release, clear any remaining hosting or CDN cache once. Then test the page in a private browser window and confirm that the saved path exactly matches the page path.

What if a call-tracking script changes the number after the page loads?

On pages with an active rule, DialPerPage marks managed tel: links and loads a lightweight browser guard in the document head. If a third-party script such as a dynamic call-tracking service changes a marked link later, the guard restores its configured number before interaction. Unmanaged links and pages without rules are not observed.

How are translations handled?

DialPerPage follows the current WordPress locale. Community translations are managed and delivered through the standard WordPress.org language-pack system.

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈DialPerPage〉的開發相關工作。

參與者

將〈DialPerPage〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.1.1

  • Moved plugin translations to the standard WordPress.org language-pack system.
  • Removed the plugin-specific language selector so the interface follows the WordPress locale.

1.1

  • Added automatic cache purging after activation, upgrades, and settings changes.
  • Added an active-page-only browser guard for phone links changed by third-party scripts.
  • Ensured page caches receive the already-replaced HTML response.

1.0

  • Initial public release.