| 1 |
<?php // @codingStandardsIgnoreLine |
| 2 |
/** |
| 3 |
* Copy Anything to Clipboard Plugin. |
| 4 |
* |
| 5 |
* @package Copy Anything to Clipboard |
| 6 |
* @copyright Copyright (C) 2026, Clipboard Agency - dev@clipboard.agency |
| 7 |
* @link https://clipboard.agency |
| 8 |
* @since 5.0.0 |
| 9 |
* |
| 10 |
* @wordpress-plugin |
| 11 |
* Plugin Name: Copy Anything to Clipboard |
| 12 |
* Plugin URI: https://clipboard.agency/ |
| 13 |
* Description: Add copy-to-clipboard buttons to any element with the powerful <strong>Global Injector</strong> — no coding required. Features visual style presets (Button, Icon, Cover), display conditions, and live preview. Perfect for <strong>Code Snippets</strong>, <strong>Coupons</strong>, <strong>WooCommerce SKUs</strong>, and more. |
| 14 |
* Version: 5.0.0 |
| 15 |
* Author: Clipboard Agency |
| 16 |
* Author URI: https://clipboard.agency/ |
| 17 |
* License: GPL v3 |
| 18 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.txt |
| 19 |
* Text Domain: ctc |
| 20 |
* Domain Path: /languages |
| 21 |
* |
| 22 |
*/ |
| 23 |
|
| 24 |
if ( ! defined( 'ABSPATH' ) ) { |
| 25 |
exit; |
| 26 |
} |
| 27 |
|
| 28 |
/** |
| 29 |
* Freemius conflict resolution. |
| 30 |
* |
| 31 |
* If another instance of this plugin (free or pro) has already initialized Freemius, |
| 32 |
* just register this file with Freemius and exit. This prevents class redeclaration |
| 33 |
* errors when both free and pro versions are active. |
| 34 |
*/ |
| 35 |
if ( function_exists( 'ctc_fs' ) ) { |
| 36 |
$fs = ctc_fs(); |
| 37 |
if ( $fs ) { |
| 38 |
// Register this file with Freemius. |
| 39 |
// Use true for premium, false for free. Freemius handles this via @fs_premium_only. |
| 40 |
$fs->set_basename( false, __FILE__ ); |
| 41 |
} |
| 42 |
return; |
| 43 |
} |
| 44 |
|
| 45 |
// Define plugin constants. |
| 46 |
define( 'CTC_VER', '5.0.0' ); |
| 47 |
define( 'CTC_FILE', __FILE__ ); |
| 48 |
define( 'CTC_BASE', plugin_basename( CTC_FILE ) ); |
| 49 |
define( 'CTC_DIR', plugin_dir_path( CTC_FILE ) ); |
| 50 |
define( 'CTC_URI', plugins_url( '/', CTC_FILE ) ); |
| 51 |
define( 'CTC_GUTENBERG_DIR', CTC_DIR . 'includes/gutenberg/' ); |
| 52 |
define( 'CTC_GUTENBERG_URI', CTC_URI . 'includes/gutenberg/' ); |
| 53 |
define( 'CTC_ELEMENTOR_DIR', CTC_DIR . 'includes/elementor/' ); |
| 54 |
define( 'CTC_ELEMENTOR_URI', CTC_URI . 'includes/elementor/' ); |
| 55 |
|
| 56 |
// Initialize Freemius. |
| 57 |
require_once CTC_DIR . 'includes/freemius.php'; |
| 58 |
|
| 59 |
// Include the main plugin class. |
| 60 |
require_once CTC_DIR . 'includes/class-core.php'; |
| 61 |
|
| 62 |
// Start the plugin. |
| 63 |
ctc(); |
| 64 |
|