Title: OrioleOne Instant Copy
Author: OrioleOne
Published: <strong>2026-06-03</strong>
Last modified: 2026-09-26

---

Szukaj wtyczek

![](https://ps.w.org/oriole-one-instant-copy/assets/icon-256x256.gif?rev=3604209)

# OrioleOne Instant Copy

 Autor: [OrioleOne](https://profiles.wordpress.org/orioleone/)

[Pobierz](https://downloads.wordpress.org/plugin/oriole-one-instant-copy.1.0.2.zip)

 * [Szczegóły](https://pl.wordpress.org/plugins/oriole-one-instant-copy/#description)
 * [Recenzje](https://pl.wordpress.org/plugins/oriole-one-instant-copy/#reviews)
 *  [Instalacja](https://pl.wordpress.org/plugins/oriole-one-instant-copy/#installation)
 * [Rozwój](https://pl.wordpress.org/plugins/oriole-one-instant-copy/#developers)

 [Wsparcie](https://wordpress.org/support/plugin/oriole-one-instant-copy/)

## Opis

**OrioleOne Instant Copy** enhances the standard WordPress Gutenberg Code block (`
core/code`) by injecting a small, accessible „Copy” button into the top-right corner
of every code block on your site — automatically, on every existing and future post.

No shortcodes. No block-editor changes. No database modifications. Pure progressive
enhancement.

#### How it works

The plugin uses vanilla JavaScript to detect every `pre.wp-block-code` element after
the page loads and appends a lightweight Copy button. When clicked, the button copies
the code text to the system clipboard using the modern `navigator.clipboard` API,
with a `document.execCommand` fallback for older browsers.

The stored post content is never touched. If you deactivate or uninstall the plugin,
your posts are exactly as they were before.

#### Key Features

 * **Automatic** — works on all existing and future posts without any editor involvement.
 * **Lightweight** — small, self-hosted CSS and JavaScript assets. Zero dependencies.
 * **Accessible** — keyboard navigable, `aria-label` support, `focus-visible` outlines,
   screen-reader text, reduced-motion aware, high-contrast mode support.
 * **Smart enqueueing** — assets are loaded only on pages that actually contain 
   a Gutenberg code block, not on every page of your site.
 * **Clipboard API with fallback** — uses `navigator.clipboard.writeText()` on secure
   contexts and falls back to `execCommand('copy')` for legacy environments.
 * **Duplicate-proof** — skips any code block that already has a copy button to 
   avoid conflicts with other plugins.
 * **Theme-safe** — uses `currentColor` and semi-transparent backgrounds; works 
   with light and dark themes without hardcoding colours.
 * **No jQuery** — vanilla JavaScript only.
 * **No tracking, no telemetry, no external requests** — 100% self-hosted.
 * **Multisite compatible**.

#### Settings

Find the settings under **Settings  OrioleOne Instant Copy**:

 * **Enable / Disable** the button globally.
 * **Button text** — customise the label shown on the button (default: „Copy”).
 * **Success text** — customise the label shown after copying (default: „Copied!”).
 * **Position** — Top Right (additional positions planned for v2).

#### Developer Notes

All settings use the WordPress Settings API with `sanitize_callback` and proper 
nonce handling via `settings_fields()`. No custom REST endpoints, no Gutenberg/React
dependencies, no build tools required.

The plugin defines the following PHP constant and classes:

 * `ORIOLE_OIC_VERSION` — current plugin version string.
 * `Oriole_OIC_Plugin` — main bootstrap class (singleton).
 * `Oriole_OIC_Settings` — settings page and storage class.

Option stored in `wp_options`: `oriole_oic_settings` (autoloaded, single serialised
array).

## Instalacja

#### Automatic (recommended)

 1. In your WordPress admin, go to **Plugins  Add New**.
 2. Search for **OrioleOne Instant Copy**.
 3. Click **Install Now**, then **Activate**.

#### Manual

 1. Download the plugin zip file.
 2. Go to **Plugins  Add New  Upload Plugin**.
 3. Upload the zip, then click **Install Now** and **Activate**.

#### From source

 1. Upload the `oriole-one-instant-copy` folder to `/wp-content/plugins/`.
 2. Activate the plugin through the **Plugins** screen in WordPress.

No additional configuration is required. The Copy button will appear immediately
on all pages containing Gutenberg code blocks.

## Najczęściej zadawane pytania

### Does this work with the Classic Editor?

The plugin targets `pre.wp-block-code`, which is the HTML class added exclusively
by the Gutenberg (Block Editor) Code block. Classic Editor `<pre>` tags will not
be affected.

### Will it work with my theme?

Yes. The plugin uses `position: absolute` to overlay the button, so it does not 
affect your theme layout. Colours are set using `currentColor` and semi-transparent
layers, making the button readable on virtually any background.

### Does it conflict with syntax highlighting plugins (e.g. Prism.js, Highlight.js)?

No. The plugin appends a button element to the `<pre>` container but does not modify
the `<code>` content or any of its attributes. Syntax highlighting plugins operate
on the code text and are unaffected.

### What happens if another plugin already adds a Copy button?

If a copy button with the class `oriole-oic-copy-btn` already exists inside a code
block, this plugin will skip it. This prevents duplicate buttons when used alongside
other copy plugins.

### Does it slow down my site?

The impact is negligible. The CSS and JS assets are small and self-hosted. Assets
are only enqueued on pages that contain at least one Gutenberg code block, so other
pages are completely unaffected.

### Does it work on HTTPS only?

The `navigator.clipboard` API requires a secure context (HTTPS or localhost). On
non-secure HTTP pages, the plugin automatically falls back to `document.execCommand('
copy')`, which works in most modern browsers regardless of protocol.

### Is it multisite compatible?

Yes. Settings are stored per site. On uninstall, options are removed from every 
site in the network.

### Can I translate it?

Yes. The plugin is fully internationalised using standard WordPress i18n functions.
A `.pot` file is included in the `languages/` directory. Translations can be submitted
via [translate.wordpress.org](https://translate.wordpress.org/).

### Where are the settings?

**WordPress Admin  Settings  OrioleOne Instant Copy**.

### What data does the plugin store?

Only one row in `wp_options` with the key `oriole_oic_settings`. It stores your 
button text, success text, position preference, and the enabled/disabled toggle.
The option is removed cleanly when you delete the plugin.

### Does the plugin phone home or load external resources?

No. There are no external HTTP requests, no CDN-loaded assets, no analytics, no 
telemetry, and no licence checks of any kind.

## Recenzje

Wtyczka nie ma jeszcze żadnej recenzji.

## Kontrybutorzy i deweloperzy

„OrioleOne Instant Copy” jest oprogramowaniem open source. Poniższe osoby miały 
wkład w rozwój wtyczki.

Zaangażowani

 *   [ OrioleOne ](https://profiles.wordpress.org/orioleone/)
 *   [ Rashid Sharafat ](https://profiles.wordpress.org/rashidsharafat/)

[Przetłumacz wtyczkę “OrioleOne Instant Copy” na swój język.](https://translate.wordpress.org/projects/wp-plugins/oriole-one-instant-copy)

### Interesuje cię rozwój wtyczki?

[Przeglądaj kod](https://plugins.trac.wordpress.org/browser/oriole-one-instant-copy/),
sprawdź [repozytorium SVN](https://plugins.svn.wordpress.org/oriole-one-instant-copy/)
lub czytaj [dziennik rozwoju](https://plugins.trac.wordpress.org/log/oriole-one-instant-copy/)
przez [RSS](https://plugins.trac.wordpress.org/log/oriole-one-instant-copy/?limit=100&mode=stop_on_copy&format=rss).

## Rejestr zmian

#### 1.0.2

 * Brand: Standardized display name and brand references to single-word „OrioleOne”.
 * Security: Enforced strict inline late escaping on settings page input markup.
 * Security: Added explicit capability checks to register_setting definition.
 * Security: Added wp_unslash() before sanitizing superglobal input data.
 * Standards: Resolved WPCS code style issues and modernized JavaScript to ES6+.
 * Standards: Fixed all CSS stylelint issues, selector specificity order, and line
   lengths.
 * WordPress Core: Verified compatibility and updated Tested up to: 7.1.

#### 1.0.1

 * Added accessible copy-success and copy-failure announcements.
 * Improved clipboard fallback cleanup, focus restoration, and failure handling.
 * Prevented injected controls and common syntax-highlighter line numbers from entering
   copied text.
 * Improved touch targets, focus contrast, forced-colour support, and long-label
   handling.
 * Added translatable factory defaults and a translation template.
 * Improved conditional asset loading for Gutenberg Code blocks rendered outside
   queried post content.

#### 1.0.0

 * Initial release.
 * Auto-injects accessible Copy button on all `pre.wp-block-code` elements.
 * Settings page with enable toggle, custom button text, and custom success text.
 * `navigator.clipboard` with `execCommand` fallback.
 * Keyboard accessible with `focus-visible` outline and `aria-label`.
 * Reduced-motion and forced-colour (high-contrast) CSS support.
 * Smart asset enqueueing: loads only on pages with code blocks.
 * Duplicate-button guard for coexistence with other copy plugins.
 * Multisite-aware uninstall cleanup.

## Meta

 *  Wersja **1.0.2**
 *  Ostatnia aktualizacja **3 tygodnie temu**
 *  Włączone instalacje **Mniej niż 10**
 *  Wersja WordPressa ** 6.0 lub nowszej **
 *  Testowano do **7.1.3**
 *  Wersja PHP ** 7.4 lub nowszej **
 *  Język
 * [English (US)](https://wordpress.org/plugins/oriole-one-instant-copy/)
 * Tagi
 * [clipboard](https://pl.wordpress.org/plugins/tags/clipboard/)[code](https://pl.wordpress.org/plugins/tags/code/)
   [code block](https://pl.wordpress.org/plugins/tags/code-block/)[copy](https://pl.wordpress.org/plugins/tags/copy/)
   [gutenberg](https://pl.wordpress.org/plugins/tags/gutenberg/)
 *  [Widok zaawansowany](https://pl.wordpress.org/plugins/oriole-one-instant-copy/advanced/)

## Oceny

Nie przesłano jeszcze żadnych recenzji.

[Twoja opinia](https://wordpress.org/support/plugin/oriole-one-instant-copy/reviews/#new-post)

[Zobacz wszystkierecenzje.](https://wordpress.org/support/plugin/oriole-one-instant-copy/reviews/)

## Zaangażowani

 *   [ OrioleOne ](https://profiles.wordpress.org/orioleone/)
 *   [ Rashid Sharafat ](https://profiles.wordpress.org/rashidsharafat/)

## Wsparcie

Masz coś do dodania? Potrzebujesz pomocy?

 [Zobacz forum wsparcia](https://wordpress.org/support/plugin/oriole-one-instant-copy/)