WP ShrtFly Integration

外掛說明

Turn the links on your site into ShrtFly links and earn when visitors open them. Visitors see a ShrtFly page with ads, then reach the original destination.

How it works

  1. Copy your API token from your ShrtFly account.
  2. Paste it in Settings > ShrtFly Settings and turn the integration on.
  3. Choose which links to convert and save.

Your posts are not modified: links are converted in the visitor’s browser when the page opens.

Features

  • One switch to turn link conversion on or off.
  • Choose the ad type: Mainstream or Adult.
  • Convert only the links to the domains you list (Include), or all links except those domains (Exclude). Wildcards like *.example.com are supported.
  • Optional support for AMP pages made with AMP for WP.
  • Nothing is loaded on your pages until the integration is on and the API token is set.
  • Available in English and Italian.

This is not an official ShrtFly plugin.

External services

When the integration is enabled, the plugin loads the ShrtFly Full Page Script (https://shrtfly.com/js/full-page-script.js) on the public pages of your site. The script receives your API token, the ads type and the domain list you configured, and turns the links of the page into ShrtFly short links: visitors who open them go through ShrtFly.

The service is provided by ShrtFly: terms of use, privacy policy.

螢幕擷圖

安裝方式

  1. Install the plugin from Plugins > Add New, or upload the shrtfly-integration folder to /wp-content/plugins/.
  2. Activate it.
  3. Go to Settings > ShrtFly Settings, enter your API token and enable the integration.

常見問題集

Is this an official ShrtFly plugin?

No.

Where do I find the API token?

Log in to ShrtFly and open the Developer API page.

Which links are converted?

With Exclude (the default), every link except those to the listed domains. With Include, only the links to the listed domains.

My own internal links are converted too. How do I stop it?

With Exclude, every link that is not on the list is converted, and WordPress writes links to your own pages as full addresses. Add your domain to the list (for example example.com, *.example.com), or switch to Include and list only the domains you want to convert.

What happens to my settings when I delete the plugin?

They are removed together with the plugin. Deactivating it keeps them.

使用者評論

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

參與者及開發者

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

參與者

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

對開發相關資訊感興趣?

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

變更記錄

3.0.0

  • Tested up to WordPress 7.1.
  • Fix: the AMPforWP integration never loaded since 1.6.0.
  • Fix: deleting the plugin from the admin stopped halfway, leaving its settings behind.
  • Fix: error messages on the settings page were shown twice.
  • Fix: the ShrtFly script was loaded with an invalid token when the API token was empty.
  • Fix: the ads type and domain mode choices could not be reached with the keyboard.
  • New: Italian translation.
  • The settings page moved to options-general.php?page=shrtfly-integration; its styles are now a cacheable file loaded only there.

2.0.0

  • Requires PHP 8.0. Tested up to WordPress 7.0.
  • Redesigned settings page, without jQuery.
  • Wildcard domains (*.example.com) accepted; ads type and domain mode values validated.

1.6.0

  • The script is loaded through the WordPress script API, always deferred.
  • The demo domain list is read as a text file instead of being included as PHP.
  • Input sanitization and output escaping.

1.5.0

  • New ads type option: Mainstream or Adult.

1.4.0

  • Tested up to WordPress 6.1.

1.3.0

  • New option to load the script in defer mode.

1.2.0

  • Compatibility update.

1.1.0

  • Tested up to WordPress 5.9, minor fixes.

1.0.0

  • First release.