| @@ -1,43 +1,63 @@ | ||
| 1 | -<?php | |
| 1 | +<?php // @codingStandardsIgnoreLine | |
| 2 | 2 | /** |
| 3 | - * Plugin Name: Copy Anything to Clipboard | |
| 4 | - * Plugin URI: https://clipboard.agency/ | |
| 5 | - * Description: Effortlessly Copy Text or HTML to Your Clipboard 📋 with Copy Anything to Clipboard. Whether it's Blockquotes, Wishes, Messages, Shayari, Offer Codes, Special Symbols, Code Snippets, Hidden Content, or anything else you desire, our plugin has you covered! 🥳 Explore the possibilities with <a href="https://clipboard.agency/">Copy Anything to Clipboard</a>. | |
| 6 | - * Version: 3.2.0 | |
| 7 | - * Author: Mahesh M. Waghmare | |
| 8 | - * Author URI: https://clipboard.agency/ | |
| 9 | - * Text Domain: copy-the-code | |
| 3 | + * Copy Anything to Clipboard Plugin. | |
| 10 | 4 | * |
| 11 | - * | |
| 12 | - * @package Copy the Code | |
| 13 | - */ | |
| 5 | + * @package Copy Anything to Clipboard | |
| 6 | + * @copyright Copyright (C) 2026, Clipboard Agency - [email protected] | |
| 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.5.4 | |
| 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 | + */ | |
| 14 | 23 | |
| 15 | 24 | if ( ! defined( 'ABSPATH' ) ) { |
| 16 | 25 | exit; |
| 17 | 26 | } |
| 18 | 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 | + */ | |
| 19 | 35 | if ( function_exists( 'ctc_fs' ) ) { |
| 20 | - ctc_fs()->set_basename( false, __FILE__ ); | |
| 21 | -} else { | |
| 22 | - // Set constants. | |
| 23 | - define( 'COPY_THE_CODE_TITLE', esc_html__( 'Copy Anything to Clipboard', 'copy-the-code' ) ); | |
| 24 | - define( 'COPY_THE_CODE_VER', '3.2.0' ); | |
| 25 | - define( 'COPY_THE_CODE_FILE', __FILE__ ); | |
| 26 | - define( 'COPY_THE_CODE_BASE', plugin_basename( COPY_THE_CODE_FILE ) ); | |
| 27 | - define( 'COPY_THE_CODE_DIR', plugin_dir_path( COPY_THE_CODE_FILE ) ); | |
| 28 | - define( 'COPY_THE_CODE_URI', plugins_url( '/', COPY_THE_CODE_FILE ) ); | |
| 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 | +} | |
| 29 | 44 | |
| 30 | - // DO NOT REMOVE THIS IF, IT IS ESSENTIAL FOR THE `function_exists` CALL ABOVE TO PROPERLY WORK. | |
| 31 | - if ( ! function_exists( 'ctc_fs' ) ) { | |
| 32 | - require_once COPY_THE_CODE_DIR . 'classes/init.php'; | |
| 33 | - } | |
| 45 | +// Define plugin constants. | |
| 46 | +define( 'CTC_VER', '5.5.4' ); | |
| 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/' ); | |
| 34 | 55 | |
| 35 | - register_activation_hook( COPY_THE_CODE_FILE, 'copy_the_code_set_fresh_user' ); | |
| 56 | +// Initialize Freemius. | |
| 57 | +require_once CTC_DIR . 'includes/freemius.php'; | |
| 36 | 58 | |
| 37 | - // Set as fresh user? | |
| 38 | - function copy_the_code_set_fresh_user() { | |
| 39 | - update_option( 'copy_the_code_fresh_user', 'yes' ); | |
| 40 | - } | |
| 59 | +// Include the main plugin class. | |
| 60 | +require_once CTC_DIR . 'includes/class-core.php'; | |
| 41 | 61 | |
| 42 | - require_once COPY_THE_CODE_DIR . 'classes/class-copy-the-code.php'; | |
| 43 | -} | |
| 62 | +// Start the plugin. | |
| 63 | +ctc(); | |