Copy Anything to Clipboard

Changelog

5.4.0

  • New: Shortcode analytics + per-shortcode opt-out – Shortcode-based copy events are now tracked as source = ‘shortcode’ with post and page context, and you can disable tracking for specific shortcodes via an analytics attribute (for example, [copy analytics=”off”]Code[/copy] still copies but does not record analytics for that instance).
  • Improvement: Version consistency & cache-busting – Unified plugin version across the header, CTC_VER constant, core class, composer, and readme. Release tooling (npm run version:check / version:set) now fails on mismatches and keeps all version fields in sync, preventing stale assets and updater drift.
  • Fix: Coupon widget copy button label – The Elementor coupon widget now passes the correct config keys to the shared copy button helper, and the helper accepts both legacy (copy_button_text) and new (button_text) keys so the custom button text from widget settings always renders as expected.
  • Fix: Preserve zero-valued style settings – Global Injector rule meta now treats saved ‘0’ values (e.g. blur, border width, padding) as valid instead of falling back to defaults, so zero-style configurations are applied consistently after saving.
  • Security: Safer external links – All plugin-generated links that open in a new tab (target=”_blank”) now include rel=”noopener noreferrer” to guard against reverse-tabnabbing and improve cross-window isolation.
  • Security: Pro analytics limited to admins – Pro analytics REST endpoints now require the manage_options capability, preventing non-admin users from accessing analytics data even if they obtain a valid REST nonce.
  • Security: Analytics abuse protections – The public analytics event endpoint (POST /ctc/v1/analytics/events) now enforces per-IP rate limiting and strict payload validation, returning 429 on abusive bursts and 400 for invalid event data to protect the ctc_analytics table.
  • Improvement: Analytics timezone normalization – Analytics events and query windows now consistently use UTC for created_at and date ranges, preventing shifted 24h/7d/30d boundaries on non-UTC sites.
  • Improvement: Analytics retention & cleanup – Older analytics events beyond roughly 13 months are now pruned in small batches by a daily scheduled cleanup job (retention days and batch size are filterable), keeping the ctc_analytics table fast while still supporting long-range comparisons.
  • Fix: Emojis in code blocks now copied correctly – WordPress renders emojis as <img class=”emoji”> elements; the copy logic now converts these to their alt text so emojis are included in the copied content. Thanks @jayceezay

5.3.1

  • Fix: [copy] shortcode with formatted content – When the shortcode encloses formatted text (e.g. bold), the front end now displays the formatting and copies plain text to the clipboard. Display uses allowed HTML (filterable); copy uses plain text unless copy-as=”html”. Thanks @jayceezay
  • New (developer): Filter ctc/shortcode/display_allowed_html to customize allowed HTML for shortcode display content (e.g. add custom markup support).

5.3.0

  • New: Analytics (Pro) – See what gets copied. Copy tracking for Global Injector rules: track copy events per rule (rule ID, timestamp, success; no content stored). Analytics dashboard at Settings → Analytics: summary cards (total copies, active rules, top rule, % change), date range filter (24h, 7d, 30d, custom), activity chart, top rules table. Export CSV (Pro).
  • New: Activity column in Main Rule List – Copy count and 24h % change per rule. Free: count + blurred trend + Pro CTA; Pro: real trend. Link from Activity to Analytics filtered by rule.
  • New: REST API for analytics – POST /ctc/v1/analytics/events (public, for frontend tracking); GET endpoints and export for authenticated Pro users.
  • Improvement: Global Injector – Analytics option/link in rule editor and dashboard to open Analytics page (filtered by rule when applicable).

5.2.0

  • New: Copy As (Clipboard Type) – Choose what gets copied per rule: Text only, HTML, Text + HTML (default), Image (Pro), JSON (Pro), SVG (Pro). Global Injector Rule Editor includes “Copy as” section; shortcode and Gutenberg blocks support copy-as attribute. Uses CTC CopyEngine with Clipboard API; fallbacks for image (HTTPS/CORS) and legacy browsers.
  • New: Image format for Copy As Image (Pro) – Choose PNG, JPEG, or WebP when copying as image. Pro adds Image format selector in Copy As section; free plugin provides ctc.globalInjector.copyAs.after hook for extensibility.
  • Improvement: Copy As extensibility – Free plugin now uses ctc.globalInjector.copyAs.after hook; Pro plugin renders Image format UI (PNG/JPEG/WebP) when Copy As is Image Blob. Follows Rank Math free/Pro pattern.
  • Improvement: Pro extension points – Added ctc/global_injector/rule_enum_fields, ctc/global_injector/rest_rule_data filters; ctc.globalInjector.fieldsToCompare for unsaved-changes detection. Pro adds image_format via extend_meta_mapping, extend_admin_rule_data, extend_frontend_rule_data.
  • New: ImageFormatSection (Pro) – Pro component for Image format selection with ButtonGroup and docs link.
  • Fix: Image format persistence – Image format selection now persists after save and page refresh (load_rules and REST get_rule_data include image_format when Pro is active).

5.1.0

  • New: Main Rule List – Custom rules UI at Settings → Global Injector (page=ctc-rules): table with Status toggle, Rule Name/Target, Visual Style, Location; row actions Edit, Duplicate, Delete; search and status filter; empty state.
  • New: Dashboard (Home) – Copy to Clipboard dashboard at page=ctc (Settings → Copy to Clipboard).
  • New: Shared admin components – AdminHeader, ConfirmModal, Footer, Icons, ProBadge used by Dashboard, Main Rule List, and Rule Editor.
  • Improvement: Rule Editor – Header uses shared AdminHeader with back link to Global Rules list.
  • Improvement: Legacy CPT redirects – “Add New” and list edit links for copy-to-clipboard redirect to Global Injector.
  • Developer: get_admin_rules() API for admin list data; Main Rule List and Dashboard use React + Tailwind under .ctc-admin-root.
  • Improvement: Global Injector CSS from PHP – Global Injector styles (Button, Icon, Cover) are now output as minified inline CSS from PHP via the new Inline_CSS class. Only the styles and positions used by active rules are included; the ctc/global_injector/inline_css filter still applies to the final CSS.
  • Fix: Cover style fatal error – Added missing get_global_injector_css() method to the Cover style class so inline CSS builds correctly when Cover style is used (fixes “Call to undefined method Cover::get_global_injector_css()”).
  • New: Admin bar quick-edit for Global Injector – When viewing a page where Global Injector rules apply, admins see a “CTC” item (with clipboard icon) in the admin bar. Sub-items list “Edit: [Rule name]” for each rule on the page and open the Global Injector settings with that rule selected.
  • Improvement: Global Injector URL support – The settings page now supports a ?rule=ID query parameter to open the editor with a specific rule selected (e.g. from the admin bar or bookmarks). Added get_selected_rule_id() helper.
  • New: Shortcode redirect attribute – The [copy] shortcode now supports a redirect attribute for copy-then-redirect flows (e.g. [copy redirect=”https://store.com”]CODE10[/copy]). After copying, the user is sent to the given URL. The existing link attribute remains supported for backward compatibility and has the same effect as redirect.
  • Fix: Shortcode display text with inner content – When both text and inner content are present (e.g. [copy text=”Hello World”]Copy this[/copy]), the visible label now uses the inner content (“Copy this”) and text is used only for the copy payload. Previously the label showed the text value.
  • Fix: Native preset CSS when using tag=”a” – Using tag=”a” for link-style copy buttons now correctly loads the native preset CSS so theme link styling is applied.
  • Fix: Shortcode link attribute redirect – The “Copy & Redirect” / “Combining Multiple Attributes” flow now works: when link=”https://example.com” is set, the shortcode outputs data-ctc-link and the frontend opens the URL in a new tab after a successful copy (e.g. after “Copied! Redirecting…”).
  • Improvement: Shortcode performance – Inline CSS for the shortcode is now output only for presets actually used on the page (inline, native, button, icon, cover), and the CSS is minified to reduce payload size.
  • Improvement: Global Injector rules sidebar – When opening the settings page with a specific rule (e.g. ?rule=318), the selected rule is now scrolled to the top of the rules list within the sidebar only, without scrolling the whole page or moving the admin header out of view.
  • Fix: Giant copy icons in tables – Added explicit width and height attributes (24×24) to all Global Injector SVG icons (Button, Icon, and Cover styles) so theme CSS cannot scale them unexpectedly inside table cells. Thanks @akashathu

5.0.1

Bug fixes and support issues (post-5.0.0) — Thanks to the users who reported these on the support forum.

  • Fix: 404 on ctc.js – Moved script to assets/frontend/js/lib/ctc.js (renamed from vendor/ to avoid .gitignore conflict). Global Injector and shortcode enqueue the copy engine; fallbacks remain when script is unavailable. Thanks @contemplate
  • Fix: Giant copy icons in tables – Copy icons inside table cells no longer scale with table font-size. Added CSS constraints for shortcode and block copy icons when inside table elements.
  • Fix: Square brackets in shortcode content – Legacy shortcodes using content=”… &#91;…&#93; …” now copy the correct [ and ] characters. The content attribute is decoded from HTML entities before use.
  • Fix: Shortcode script loading – Shortcode frontend script no longer depends on the removed vendor script; it loads independently with Clipboard API fallbacks.

5.0.0

🚀 Major Release – Global Injector & Complete Refactor

  • New: Global Injector – Advanced copy button injection system with:
    • Display conditions to control where copy buttons appear
    • Multiple style presets (Button, Icon, Cover)
    • Live preview in the editor
    • Performance-optimized asset loading
  • New: Refined Shortcode System – Enhanced [copy] and [copy_inline] shortcodes with improved attributes and flexibility.
  • New: Style Presets – Pre-built button, icon, and cover styles for quick setup.
  • Improvement: WordPress 6.7+ Compatibility – Fixed _load_textdomain_just_in_time notices with proper plugin initialization timing.
  • Improvement: Complete Asset Restructure – Reorganized frontend and admin assets for better performance.
  • Improvement: Gutenberg Block Enhancements – Fixed block registration and optimized editor asset loading.
  • Improvement: Freemius SDK Integration – Improved SDK initialization with proper hook timing.
  • Improvement: Code Quality – Major codebase refactoring with improved naming conventions and standards.
  • Fix: Block Editor Assets – Resolved “invalid category” warnings for Gutenberg blocks.
  • Fix: Frontend Script Loading – Fixed 404 errors for clipboard scripts after asset restructure.
  • Fix: Square Brackets in Shortcode – Fixed HTML entities (&#91; &#93;) not being decoded properly in content attribute. Thanks @akashathu
  • Fix: CSS var() Double Dashes – Fixed WordPress converting — to en-dash inside CSS var() functions like var(–wp–preset–color–bg). Thanks @mikecargal
  • Fix: Legacy Shortcode content Attribute – Restored proper handling where content attribute contains the text to copy and text attribute is the display text.
  • New: Native Anchor Support – Added tag=”a” parameter to use theme’s anchor styling instead of custom CTC styling.
  • New: Icon Toggle – Added show-icon=”no” parameter to hide the copy icon when not needed.
  • Developer: New Architecture – Modular class-based architecture for better extensibility.

4.1.2

  • Fixed: iOS 26 compatibility issue by migrating from deprecated document.execCommand(‘copy’) to modern Clipboard API (navigator.clipboard.writeText()).
  • Improvement: Added fallback support for older browsers that don’t support the Clipboard API.
  • Improvement: Enhanced clipboard functionality across all copy methods (CSS selector, shortcode, Elementor widgets, and Gutenberg blocks).

4.1.1

  • Fix: Dependency build failed.

4.1.0

  • Improvement: Updated Freemius SDK library with version 2.13.0.
  • Improvement: Updated plugin metadata for compatibility with WordPress 6.8.
  • Improvement: Enhanced readme content, tags, and FAQ for better search visibility.

4.0.5

  • Improvement: Updated Freemius SDK library with version 2.11.0.
  • Improvement: Compatibility to WordPress 6.7.2.

4.0.4

  • Fixed: Disallow to add script for the contributor level user in the shortcode.
  • Improvement: Updated Freemius SDK library with version 2.9.0.
  • Improvement: Compatibility to WordPress 6.7.1.

4.0.3

  • Hot fix: The dependency not works for post types.

4.0.2

  • Fix: The js dependency not works for the shortcode.

4.0.0

  • New: Added the Gutenberg block “Term Title”.
  • New: Added the Gutenberg block “Social Share”.
  • New: Added the Gutenberg block “Copy Button”.
  • New: Added the Gutenberg block “Copy Icon”.
  • Improvement: Updated Freemius SDK library with version 2.7.4.
  • Improvement: Compatibility to WordPress 6.6.1.

3.8.3

  • Improvement: Updated the recurring cron job registration logic.

3.8.2

  • Fixed: Elementor copy button not works due to missing dependency.

3.8.1

  • Fixed: The copy animation not works for the shortcode.
  • Improvement: Compatibility to WordPress 6.5.3.

3.8.0

  • New: Added display conditions for the copy to clipboard to load the assets only on selected pages.
  • Improvement: Fixed the copy icon Gutenberg block title issue.
  • Improvement: Loading the Gutenberg block assets only on the block used pages.
  • Improvement: Added default copied button text.
  • Improvement: Compatibility to WordPress 6.5.2.

3.7.0

  • New: Added the copy icon Gutenberg block.

3.6.0

  • New: Added the target selector support for the copy content in the Elementor widget.
  • Improvement: Added to support to copy the markup content from the Copy Icon Elementor widget.

3.5.2

  • Improvement: Added the dynamic content support for email, phone, and address Elementor widgets.
  • Improvement: Compatibility to WordPress 6.4.3.

3.5.1

  • Improvement: Added the background image support for all the Elementor widgets.
  • Improvement: Updated Freemius SDK library with version 2.6.2.

3.5.0

  • New: Added the “Contact Information” Elementor widget.
  • Improvement: Compatibility to WordPress 6.4.2.

3.4.3

  • Fix: The shortcode copy the display text instead of the content.

3.4.2

  • Improvement: Added the shortcode support for the Elementor widget.
  • Improvement: Added the missing table widget in the Elementor category.

3.4.1

  • Fix: The button customization is not working in the dashboard screen.

3.4.0

  • New: Added table Elementor widget to display content in horizontal, or vertical table and allow to copy the content.

3.3.0

  • New: Added button styling support for Elementor widget Copy Icon.
  • New: Added button styling support for Elementor widget Copy Button.
  • New: Added button styling support for Elementor widget Email Sample.
  • New: Added button styling support for Elementor widget Email Address.
  • New: Added button styling support for Elementor widget Phone Number.
  • New: Added button styling support for Elementor widget Blockquote.
  • New: Added button styling support for Elementor widget Code Snippet.
  • New: Added button styling support for Elementor widget Message.
  • New: Added button styling support for Elementor widget Deal.
  • New: Added button styling support for Elementor widget Coupon.
  • New: Added button styling support for Elementor widget AI Prompt Generator.
  • Improvement: Updated Freemius SDK version 2.6.0.

3.2.1

  • Improvement: Improved the Elementor “Coupon Code” widget controls and structure.
  • Improvement: Improved the Elementor “Deal” widget controls and structure.
  • Improvement: Improved the Elementor “Email Address” widget controls and structure.
  • Improvement: Improved the Elementor “Email Sample” widget controls and structure.
  • Improvement: Improved the Elementor “Message” widget controls and structure.
  • Improvement: Improved the Elementor “Phone Number” widget controls and structure.
  • Improvement: Improved the Elementor “Shayari” widget controls and structure.
  • Improvement: Improved the Elementor “SMS” widget controls and structure.
  • Improvement: Improved the Elementor “Wish” widget controls and structure.

3.2.0

  • New: Added the Elementor widget category “Copy Anything to Clipboard”.
  • Improvement: Compatibility to WordPress 6.4.1.
  • Improvement: Improved the Elementor “AI Prompt Generator” widget controls and structure.
  • Improvement: Improved the Elementor “Blockquote” widget controls and structure.
  • Improvement: Improved the Elementor “Code Snippet” widget controls and structure.
  • Improvement: Improved the Elementor “Copy to Clipboard Button” widget controls and structure.
  • Improvement: Improved the Elementor “Copy to Clipboard Icon” widget controls and structure.

3.1.0

  • New: Added new shortcode [copy_inline] which allow you to copy content from the inline element.
  • New: Added Elementor widget Copy Icon.
  • New: Added Elementor widget Copy Button.
  • New: Added Elementor widget Email Sample.
  • New: Added Elementor widget Email Address.
  • New: Added Elementor widget Phone Number.
  • New: Added Elementor widget Blockquote.
  • New: Added Elementor widget Code Snippet.
  • New: Added Elementor widget Message.
  • New: Added Elementor widget Deal.
  • New: Added Elementor widget Coupon.
  • New: Added Elementor widget AI Prompt Generator.

3.0.0

  • New: Improve the dashboard UI with the new design.
  • Improvement: Added the support to edit the existing copy to clipboard post.
  • Improvement: Compatibility to WordPress 6.3.2.
  • Improvement: Updated Freemius SDK version 2.5.12.

2.6.5

  • Improvement: Compatibility to WordPress 6.3.1.
  • Improvement: Address a reflected Cross-Site Scripting vulnerability from icon-color shortcode parameter.

2.6.4

  • Improvement: Updated Freemius SDK version 2.5.10 to address a Reflected Cross-Site Scripting vulnerability via fs_request_get.

2.6.3

  • Improvement: Added the shortcode attribute color to set the custom color for the text. E.g. [copy content=”Custom Text..” color=”#2dcd78″]Copy me![/copy]
  • Improvement: Added the shortcode attribute icon-color to set the custom color for the icon. E.g. [copy content=”Custom Text..” style=”icon” icon-color=”#9437f6″][/copy]
  • Improvement: Added the shortcode attribute style to show the icon. E.g. [copy content=”Custom Text..” style=”icon”][/copy]

2.6.2

  • Improvement: Compatibility to WordPress 6.1.1.
  • Improvement: Updated Freemius SDK wit version 2.5.3.
  • Improvement: Added the support to copy emojis from the content into the clipboard.

2.6.1

  • Improvement: Avoided the button copy to clipboard for Google Docs and Email format.
  • Improvement: Avoided the “Copy” text from the clipboard.

2.6.0

  • New: Added the Copy Format setting to copy the content for Google Docs or Email.
  • Improvement: Added filter copy_the_code_shortcode_atts for shortcode to redirect the user to another page after copying the content to the clipboard.
  • Improvement: Added the support to Trim Lines with filter copy_the_code_localize_vars.
  • Improvement: Added translation support for pt_BR language.

2.5.0

  • New: Added a link to easily upgrade to the premium version which was recently not easily visible.

  • Improvement: Improve the default button style.

  • Improvement: Improve the welcome message by adding the plugin name. Thanks @Andre

2.4.2

  • Fix: The message “You are just one step away..” is not disappearing after clicking on button. Thanks @MingHong

2.4.1

  • Improvement: Added the sub-menus page links into the post type screen.
  • Improvement: Removed the sub-menus Dashboard, Contact Us, Upgrade, and Support Forum.

2.4.0

  • New: Integrated the Freemius library for automatic updates, upgrade and for quick support.
  • Improvement: Add new dashboard admin page for Copy Anything to Clipboard.
  • Improvement: Deprecated the Shortcode admin page which is no longer used.

2.3.5

  • Improvement: UI improvements in the shortcode information admin page.
  • Improvement: Added the title tag support for the shortcode. So, Whenever the user hovers on shortcode text then it’ll see the title.
  • Improvement: Avoid the remove spaces support by setting false values to the parameter remove_spaces. Use filter from code snippet https://gist.github.com/7c086cdf0837f5864596945086c603c8

2.3.4

  • Improvement: Keep the welcome message only for first time user activate.

2.3.3

  • Improvement: Added a welcome message to the user for smooth plugin onboarding.

2.3.2

  • Improvement: Improve the code with PHPCS fixes.

2.3.1

  • Improvement: Keep the tab spaces while copy to clipboard. Thanks @marius84
  • Improvement: Users can now share non-personal usage data to help us test and develop better products.

2.3.0

  • New: Added support to redirect user after copy to clipboard. Thanks @zecke Read more https://wp.me/P4Ams0-aAq

2.2.2

  • Improvement: Getting multiple white spaces in Gutenberg editor.
  • Fix: The add new link was wrong which navigate to invalid page.

2.2.1

  • Improvement: Move the parent menus as submenu in settings menu.

2.2.0

  • New – Added shortcode [copy] to copy the content. E.g. [copy]12345[/copy]. Read more at https://clipboard.agency/doc/

2.1.1

  • Improvement – Compatibility to WordPress 5.7.

2.1.0

  • New: Added filter copy_the_code_localize_vars to allow to copy the content as HTMl instead of text.

2.0.0

  • Tweak: Create a new post copy to clipboard post depends on the old user settings.
  • Deprecated: Removed the filter copy_the_code_enabled which is no more useful.
  • Deprecated: Removed the option Copy the content which is no more useful. Will add the support though filter if required.
  • New: Added custom post type support to add multiple copy to clipboard buttons with different selectors and styles.
  • New: Improve the UI with live preview.
  • New: Added the new SVG Icon button style to show the SVG icon instead of button.
  • New: Added inside and outside position support for the new style SVG Icon.
  • New: Added the new Cover style to copy the small element in which we could not add the copy button. Such as Emoji and Symbols.

1.8.0

  • New: Set the Copy Content As default option with text.
  • Improvements: Converted the <br> tags into the new line if the option “Copy Content As” selected as Text.
  • Improvements: Converted the <div> tags into the new line if the option “Copy Content As” selected as Text.
  • Improvements: Converted the <p> tags into the new line if the option “Copy Content As” selected as Text.
  • Improvements: Converted the <li> tags into the new line if the option “Copy Content As” selected as Text.
  • Improvements: Remove the white spaces and trim the content if the option “Copy Content As” selected as Text.
  • Fix: Copy the content as text works different on Chrome, Firefox and Internet Explorer browsers.

1.7.5

  • Fix: The <br> tag converted into the next line. Select the Text from option Copy Content As. Reported by Konrad.
  • Fix: Single level selector copies the selector in the clipboard. Reported by Seb.

1.7.4

  • Fix: Nested selectors was not working due to mismatch the copy button position.

1.7.3

  • Fix: The <br> tags was not copied as new line. Reported by @psanger.

1.7.2

  • Improvement: Removed unwanted code.

1.7.1

  • Improvement: Updated Freemius SDK library with version 2.3.2.
  • Improvement: Added the latest new section.
  • Fix: The submit button is not visible form the settings page. Reported by Nicolas Tizio

1.7.0

  • New: Added General & Style tabs.

1.6.1

  • Improvement: Added WordPress 5.4 compatibility.

1.6.0

  • New: Added filter copy_the_code_default_page_settings to change the default page settings.
  • New: Added filter copy_the_code_page_settings to change the page settings.

1.5.0

  • New: Added option ‘Button Text’ to set the default button text. Default ‘Copy’.
  • New: Added option ‘Button Copy Text’ to set the button text after click on copy. Default ‘Copied!’.
  • New: Added option ‘Button Title’ to set the default button title which appear on hover on button. Default ‘Copy to Clipboard’.
  • New: Added option ‘Button Position’ to set the button position. Inside or outside the selector. Default ‘inside’.
  • Improvement: Added support for Internet Explorer devices. Reported by @rambo3000

1.4.1

  • Fix: Added support for IOS devices. Reported by @radiocure1

1.4.0

  • New: Added option ‘Copy Content As’ to copy the content as either HTML or Text.

1.3.1

  • Improvement: Updated the strings and compatibility for WordPress 5.0.

1.3.0

  • New: Added support, contact links.

1.2.0

  • New: Added settings page for customizing the plugin. Added option selector to set the JS selector. Default its <pre> html tag.

1.1.0

  • Fix: Removed Copy button markup from the copied content from the clipboard.

1.0.0

  • Initial release.

Plugin Website
Visit website

Version:
5.4.0
Last Updated
March 5, 2026
Active Installs
10000
Requires
WordPress 4.4
Tested Up To
WordPress 6.9.1
Requires PHP
5.6

Share Post

Join our newsletter.

Get insights into what’s happening at ChangelogWP right in your inbox. We don’t believe in spam.