plugin-icon

lihi Short URL

Автор: lihidev·
Adds lihi Short URL controls to create, copy, and edit short URLs for posts, pages, media, and public post types in the WordPress admin.
Версия
1.0.5
Последние изменения
Jun 26, 2026

lihi Short URL integrates the lihi short-link service into the WordPress admin. Editors can create short URLs from post and media list screens, choose a redirect domain, add tags, and add UTM parameters for non-media items, then copy the result without leaving WordPress. Existing short URLs become Copy controls, and administrators can open the matching lihi dashboard page to edit the link. This plugin is open source and maintained at weedgood/lihi-wp-plugin.

The plugin runs only inside wp-admin; it adds no front-end output and enqueues no scripts on public pages.

Features

  • Adds a lihi Short URL column with a Create button to all public post-type list screens (posts, pages, custom post types).
  • Adds the same Create / Copy controls to the Media Library list view and to the attachment detail panel in the media grid view.
  • One-click copy: generates the short URL on demand via AJAX and writes it to the clipboard, with a manual-copy prompt if browser clipboard access is blocked.
  • Creation modal: choose a redirect domain, add recommended or custom tags, and add UTM parameters for non-media items before creating a new short URL.
  • UTM source and medium are loaded from the lihi account options, while campaign, term, and content remain free-text fields; media items hide UTM controls and submit blank UTM values.
  • Reuses an existing short URL whenever one already exists for the item, so repeated clicks are idempotent.
  • Copy buttons still confirm the upstream short URL exists before copying; if it was removed, the button returns to Create and opens the creation modal again.
  • Marks items with lihi_already = 1 post meta after a successful short-URL lookup/create; the frontend renders those buttons as «Copy».
  • Administrators can open existing short URLs, personal domain management, and UTM option management in the lihi dashboard through a browser-proof passthrough flow.
  • Settings page under Settings lihi Short URL for entering and verifying the lihi account email and password, showing connected-account details, and opening the lihi dashboard.
  • Email verification is round-tripped through the lihi WordPress API before being saved, so an address the service rejects never becomes the active configuration.
  • Per-account auth token is automatically cleared whenever the configured email changes.
  • Localised; ships with Traditional Chinese (zh_TW).

External services

This plugin connects to the lihi short URL service to identify the WordPress site, authenticate the site administrator, and create or look up short URLs. Without an internet connection the plugin cannot function.

Service: lihi WordPress API auth endpoints (https://app.lihi.com/api/wordpress/v1/auth)

  • When data is sent: when the administrator saves account settings on the settings page (Settings lihi Short URL), and on the first short-URL request after the cached auth token expires.
  • What is sent: the administrator’s email address, the entered lihi password, the site’s hostname, and a site-scoped UUID stored in the lihi_uuid option. Account-creation consent is checked locally before the plugin calls the API. Login requests also send whether WordPress identifies the current request as mobile (is_mobile). The plugin stores the email, site UUID, and cached token, but does not store the password.

Service: lihi WordPress API short URL endpoints (https://app.lihi.com/api/wordpress/v1)

  • When data is sent: when the administrator opens the settings page after configuring an email (to display account info), when the Create modal loads redirect-domain and UTM options, when the administrator opens the lihi dashboard through passthrough, and when a user clicks a «Create», «Copy», or «Edit» button to generate, look up, copy, or edit a short URL. Media Create modals hide UTM controls and submit blank UTM values.
  • What is sent: the bearer token returned by the lihi WordPress API auth endpoint, the post or attachment URL (permalink or attachment file URL, with UTM parameters appended when entered), the post type namespace (including the site’s hostname), the post ID, the selected redirect domain, selected tags as a comma-separated string, selected UTM parameters appended to the destination URL, and passthrough nonce data (challenge, nonce, verifier, and optional target such as a short URL or lihi dashboard path) when opening the lihi dashboard.

By using the plugin you agree that the data above is transmitted to the lihi service. Please review the lihi service’s legal documents:

  • Terms of Use: https://knowledge.lihi.io/terms/
  • Privacy Policy: https://knowledge.lihi.io/privacy-policy/
Проверено на
WordPress 7.0
Этот плагин можно скачать и использовать при .