Shorten with iShort

外掛說明

Shorten with iShort lets you shorten any URL right inside the WordPress post editor — no copy-pasting between tabs.

Features:

  • Classic Editor (TinyMCE) — icon button in the editor toolbar. Select a URL, click the button, and it’s instantly replaced with a short link.
  • Gutenberg / Block Editor — inline toolbar button. Select a URL in any text block and shorten it in one click.
  • Meta box — “Shorten post URL” button in the post sidebar. Shortens the current post’s URL and saves the result for later copying.
  • Works on all post types — posts, pages, custom post types.
  • Disabled for drafts — the meta box button is disabled until the post is published.
  • Settings page — one field (API token) and a “Test Connection” button. Includes a direct link to get your token.

External service:

This plugin connects to iShort.su (https://ishort.su) to shorten URLs. An API token from iShort.su is required. Requests are only sent when you explicitly click a shortening button — no background tracking or data collection.

  • iShort Privacy Policy: https://ishort.su/policy
  • iShort Terms of Service: https://ishort.su/offer

螢幕擷圖

安裝方式

  1. Upload the shorten-with-ishort folder to /wp-content/plugins/.
  2. Activate the plugin through the Plugins screen in WordPress.
  3. Go to Settings iShort and enter your API token.
  4. Get your token at https://ishort.su/user/api-clients

常見問題集

Where do I get an API token?

Register at https://ishort.su and go to https://ishort.su/user/api-clients to create an API token.

Does the plugin work without an account?

No. An iShort.su account and API token are required.

Which editors are supported?

Both Classic Editor (TinyMCE) and Gutenberg (Block Editor) are supported.

Can I shorten URLs that are already short links?

Yes, already-shortened URLs can be re-shortened.

What happens if the API token is not configured?

You will see a message with a link to the plugin settings page.

使用者評論

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

參與者及開發者

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

參與者

〈Shorten with iShort〉外掛目前已有 1 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

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

對開發相關資訊感興趣?

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

變更記錄

1.0.2

  • Fix: Classic Editor toolbar button was rendered invisible (blank icon) because the plugin relied on a custom html render option not supported by TinyMCE 4. The button now uses a standard image icon.
  • Fix: Gutenberg toolbar button never appeared — registerFormatType silently refused to register the format because className was null instead of a string.
  • Fix: the Classic Editor and Gutenberg scripts both localized data into the same global variable name (lsishort), which could silently overwrite each other’s data. Gutenberg now uses its own lsishortGutenberg variable.
  • Fix: the Gutenberg button never actually shortened anything — it called the AJAX endpoint via wp.apiFetch, which sends a JSON body, while admin-ajax.php only reads standard form-encoded $_POST data. The request now uses a plain fetch() call with a form-encoded body.
  • When the iShort API rejects the request as unauthenticated (e.g. an expired or revoked token), all three error messages (Classic Editor, Gutenberg, meta box) now include a link to the plugin’s settings page.
  • The TinyMCE plugin script is now cache-busted with the plugin version.

1.0.0

  • Initial release.
  • Classic Editor (TinyMCE) toolbar button.
  • Gutenberg inline toolbar button.
  • Meta box with post URL shortening and copy button.
  • Settings page with API token field and connection test.
  • English and Russian translations.