Clipboard Snippet Copier

外掛說明

Clipboard Snippet Copier allows you to provide demo codes, shortcodes, or any reusable snippets to your users.
Instead of exposing the raw code on the page, snippets are stored securely in the WordPress admin and fetched via AJAX only when copied.

This makes it easier for you to share ready-to-use shortcodes or WPBakery/Elementor demo layouts without rendering them, while your users can simply click Copy and paste into their editor.

Features:

  • 📋 Copy any snippet/shortcode directly to clipboard.
  • 🔒 Snippets are not displayed on the frontend – fetched via AJAX only.
  • ⚡ Lightweight and secure (uses WordPress AJAX + nonces).
  • 🖱️ Supports multiple buttons on the same page.
  • 🎨 Easy integration with any theme or page builder.

Example Use Case

  • Provide WPBakery demo shortcodes for your users.
  • Share Gutenberg block templates as code snippets.
  • Give customers shortcode presets without exposing messy code.

Usage

  • Add a new snippet in Code Snippets Add New.
  • Provide title for your reference
  • Paste the code in code editor
  • Place the button in your content with ID: [clipsnco_code_copy_btn id=”123″ label=”Copy Demo”]
  • When users click the button, the snippet will be copied to their clipboard (without rendering).

螢幕擷圖

  • Add new snippet screen in the admin area.
  • Example copy button on the frontend.

安裝方式

  1. Upload the plugin files to the /wp-content/plugins/clipboard-snippet-copier directory, or install it directly from the WordPress.org repository.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress.
  3. Add snippets in Snippets Add New.
  4. Place a copy button anywhere with the shortcode: [clipsnco_code_copy_btn id=”123″ label=”Copy Code”]
    Where 123 is the ID of your snippet.

常見問題集

Can I use multiple buttons on the same page?

Yes, you can place as many as you want. Each button will copy its assigned snippet.

Will users see the snippet on the page?

No. Snippets are stored in the database and fetched via AJAX only when copied.

Does it work with page builders like WPBakery or Elementor?

Yes. You can add the copy button shortcode anywhere (page content, widget, or builder block).

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈Clipboard Snippet Copier〉的開發相關工作。

參與者

將〈Clipboard Snippet Copier〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.2

  • Fixed: Resource version not set in call to wp_enqueue_style()

1.1

  • Bug Fixes

1.0

  • Initial release of Clipboard Snippet Copier.