Oriole One 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.
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.
aria-label support, focus-visible outlines, screen-reader text, reduced-motion aware, high-contrast mode support.navigator.clipboard.writeText() on secure contexts and falls back to execCommand('copy') for legacy environments.currentColor and semi-transparent backgrounds; works with light and dark themes without hardcoding colours.Find the settings under Settings Oriole One Instant Copy:
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).