plugin-icon

KOZ Copy Actions

作者 Tony_Koz·
Add accessible copy-to-clipboard actions to selected WordPress content without telemetry, cookies or external services.
版本
1.1.12
最近更新:
Aug 11, 2026
KOZ Copy Actions

KOZ Copy Actions lets you turn selected text, values, buttons, links or other frontend elements into copy-to-clipboard targets.

You choose what can be copied by adding simple CSS selectors in the plugin settings. The plugin then handles mouse clicks and keyboard activation, shows optional feedback, and copies the value directly in the visitor’s browser.

No copied content is sent to the developer or to an external service.

Typical uses

  • Copy coupon codes, reference numbers, wallet addresses or contact details.
  • Add a copy action to code snippets, IDs or short text values.
  • Copy the current value of an input, textarea or select field.
  • Copy a value stored in a data attribute.
  • Copy text or a form value from another element on the same page.
  • Limit copy actions to selected paths or sections of the site.
  • Use the same configuration on multilingual WordPress sites.

Quick start

  1. Install and activate KOZ Copy Actions.
  2. Open KOZ Suite -> Copy Actions in the WordPress admin.
  3. Enable Copy actions.
  4. In CSS selectors, add one selector per line for the elements visitors should be able to copy.
  5. Save the settings.
  6. Open a public page and click or keyboard-activate a matching element.

Example selector:

.copy-me

If your page contains:

<span class="copy-me">PROMO-2026</span>

the visitor can copy PROMO-2026 by activating that element.

Choosing what gets copied

The plugin uses the first applicable source below.

1. Explicit value with data-copy-value

Use this when the visible label is different from the value that should be copied.

<button class="copy-me" data-copy-value="PROMO-2026">Copy promo code</button>

Copied value: PROMO-2026

2. Another element with data-copy-target

Use a local ID reference beginning with #.

<input id="account-number" value="UA123456789"> <button class="copy-me" data-copy-target="#account-number">Copy account number</button>

Copied value: the current value of #account-number.

3. Form controls

If a matching element is an input, textarea or select field, the plugin copies its current value.

4. Normal page content

For other matching elements, the plugin copies the element’s visible text content.

Supported selectors

For safety and predictable behaviour, settings accept simple selectors only:

  • A class selector such as .copy-me
  • An ID selector such as #copy-code
  • Supported data-attribute selectors such as [data-copy-value], [data-copy-target], [data-copy-key] and [data-uafree-copy]

Add one selector per line. Duplicate entries are removed automatically.

Limit copy actions to selected pages

The Allowed paths field is optional.

Leave it empty to enable matching copy targets on all public paths.

Add one local path per line to restrict where the frontend handler runs.

Examples:

/contact/ /donate/ /products/*

An ending * matches all paths beginning with that prefix.

For multilingual sites with language-specific URLs, add each required language path, for example:

/en/contact/ /uk/kontakty/

Accessibility and feedback

KOZ Copy Actions can:

  • Add keyboard focus to matching non-interactive elements.
  • Add button semantics and an accessible label where appropriate.
  • Support activation with Enter or Space.
  • Show an optional copy icon.
  • Show localized success or error messages.
  • Position feedback at the bottom centre, bottom left or bottom right.
  • Preserve formatting or collapse repeated whitespace.
  • Prevent navigation when a matching link is used as a copy action.

Multilingual sites and translations

The plugin is internationalized with the koz-copy-actions text domain.

Admin labels and frontend messages such as Copied, Could not copy and Copy to clipboard use WordPress translation functions and can be translated through the standard WordPress.org translation system.

The copy logic itself is language-independent: it works with the rendered content of the current page, so the same selector configuration can be used with multilingual plugins and translated pages.

If your multilingual setup uses different URL paths for each language and you use Allowed paths, add the corresponding path for each language.

KOZ Copy Actions does not translate the content being copied. It copies the value or text that is already rendered on the current page.

Privacy

Clipboard operations happen in the visitor’s browser.

The plugin does not:

  • Store copied values.
  • Store IP addresses or visitor identifiers.
  • Set tracking cookies.
  • Send analytics or telemetry.
  • Make external requests for copy functionality.

Compatibility notes

KOZ Copy Actions can detect another active clipboard plugin and warns administrators before two copy handlers are enabled on the same elements.

Compatibility with historical UA FREE Copy settings and frontend data attributes is retained for existing installations, but new installations do not need to configure or know about the former package.

目前已測試版本
WordPress 7.0.3
此外掛程式已可供下載,並可用於你 系統。