Changeset 3290491
- Timestamp:
- 05/09/2025 12:34:38 PM (10 months ago)
- Location:
- live-copy/trunk
- Files:
-
- 5 edited
-
assets/css/style.css (modified) (1 diff)
-
assets/css/style.rtl.css (modified) (1 diff)
-
includes/class-live-copy.php (modified) (6 diffs)
-
live-copy.php (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
live-copy/trunk/assets/css/style.css
r2967901 r3290491 1 .ellc-magic-copy-wrapper{display:none;text-decoration:none;font-size:15px;position:absolute;right:0;top:50%;transform:translateY(-50%);transition:all .5s;cursor:pointer} .elementor-section-wrap>.elementor-section:hover .ellc-magic-copy-wrapper,.elementor-section.elementor-top-section:hover .ellc-magic-copy-wrapper,.elementor-element.e-con:hover .ellc-magic-copy-wrapper{display:block}.ellc-magic-copy-wrapper .ellc-copy-btn{padding:8px 10px 8px 15px;display:inline-block;background:#6b4ff4;color:#fff !important;border-radius:20px 0 0 20px;-webkit-border-radius:20px 0 0 20px;-moz-border-radius:20px 0 0 20px;-ms-border-radius:20px 0 0 20px;-o-border-radius:20px 0 0 20px}.ellc-magic-copy-info{padding:8px 10px 8px 15px;display:inline-block;background:#6b4ff4;color:#fff !important;font-weight:bolder}.ellc-copy-btn:hover,.ellc-magic-copy-info:hover{background:#e2498a;color:#fff !important}1 .ellc-magic-copy-wrapper{display:none;text-decoration:none;font-size:15px;position:absolute;right:0;top:50%;transform:translateY(-50%);transition:all .5s;cursor:pointer}body .sky-live-copy-off .ellc-magic-copy-wrapper{display:none !important}.elementor-section-wrap>.elementor-section:hover .ellc-magic-copy-wrapper,.elementor-section.elementor-top-section:hover .ellc-magic-copy-wrapper,.elementor-element.e-con:hover .ellc-magic-copy-wrapper{display:block}.ellc-magic-copy-wrapper .ellc-copy-btn{padding:8px 10px 8px 15px;display:inline-block;background:#6b4ff4;color:#fff !important;border-radius:20px 0 0 20px;-webkit-border-radius:20px 0 0 20px;-moz-border-radius:20px 0 0 20px;-ms-border-radius:20px 0 0 20px;-o-border-radius:20px 0 0 20px}.ellc-magic-copy-info{padding:8px 10px 8px 15px;display:inline-block;background:#6b4ff4;color:#fff !important;font-weight:bolder}.ellc-copy-btn:hover,.ellc-magic-copy-info:hover{background:#e2498a;color:#fff !important} -
live-copy/trunk/assets/css/style.rtl.css
r2967901 r3290491 1 .ellc-magic-copy-wrapper{display:none;text-decoration:none;font-size:15px;position:absolute;left:0;top:50%;transform:translateY(-50%);transition:all .5s;cursor:pointer} .elementor-section-wrap>.elementor-section:hover .ellc-magic-copy-wrapper,.elementor-section.elementor-top-section:hover .ellc-magic-copy-wrapper,.elementor-element.e-con:hover .ellc-magic-copy-wrapper{display:block}.ellc-magic-copy-wrapper .ellc-copy-btn{padding:8px 15px 8px 10px;display:inline-block;background:#6b4ff4;color:#fff !important;border-radius:0 20px 20px 0;-webkit-border-radius:0 20px 20px 0;-moz-border-radius:0 20px 20px 0;-ms-border-radius:0 20px 20px 0;-o-border-radius:0 20px 20px 0}.ellc-magic-copy-info{padding:8px 15px 8px 10px;display:inline-block;background:#6b4ff4;color:#fff !important;font-weight:bolder}.ellc-copy-btn:hover,.ellc-magic-copy-info:hover{background:#e2498a;color:#fff !important}1 .ellc-magic-copy-wrapper{display:none;text-decoration:none;font-size:15px;position:absolute;left:0;top:50%;transform:translateY(-50%);transition:all .5s;cursor:pointer}body .sky-live-copy-off .ellc-magic-copy-wrapper{display:none !important}.elementor-section-wrap>.elementor-section:hover .ellc-magic-copy-wrapper,.elementor-section.elementor-top-section:hover .ellc-magic-copy-wrapper,.elementor-element.e-con:hover .ellc-magic-copy-wrapper{display:block}.ellc-magic-copy-wrapper .ellc-copy-btn{padding:8px 15px 8px 10px;display:inline-block;background:#6b4ff4;color:#fff !important;border-radius:0 20px 20px 0;-webkit-border-radius:0 20px 20px 0;-moz-border-radius:0 20px 20px 0;-ms-border-radius:0 20px 20px 0;-o-border-radius:0 20px 20px 0}.ellc-magic-copy-info{padding:8px 15px 8px 10px;display:inline-block;background:#6b4ff4;color:#fff !important;font-weight:bolder}.ellc-copy-btn:hover,.ellc-magic-copy-info:hover{background:#e2498a;color:#fff !important} -
live-copy/trunk/includes/class-live-copy.php
r2967901 r3290491 24 24 */ 25 25 public function __construct() { 26 if ( ! is_admin() ) {27 add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_assets' ) );28 }29 26 add_action( 'wp_ajax_nopriv_ellc_copy_data', array( $this, 'get_live_copy_data' ) ); 30 27 add_action( 'wp_ajax_ellc_copy_data', array( $this, 'get_live_copy_data' ) ); … … 36 33 * @since 1.0.0 37 34 */ 38 public function enqueue_assets() { 39 $this->enqueue_styles(); 40 $this->enqueue_scripts(); 35 public static function enqueue_assets() { 36 if ( is_admin() ) { 37 return; 38 } 39 $obj = new self(); 40 add_action( 'wp_enqueue_scripts', array( $obj, 'enqueue_styles' ), 998 ); 41 add_action( 'wp_enqueue_scripts', array( $obj, 'enqueue_scripts' ), 998 ); 41 42 } 42 43 … … 61 62 */ 62 63 public function enqueue_scripts() { 63 wp_enqueue_script( 'live-copy-clipboard' );64 65 64 wp_register_script( 'live-copy-script', LIVE_COPY_ASSETS_URL . 'js/script.js', array( 'jquery' ), LIVE_COPY_VER, true ); 66 65 wp_enqueue_script( 'live-copy-script' ); … … 75 74 ) 76 75 ); 77 78 76 } 79 77 … … 94 92 $meta_data['siteurl'] = get_rest_url(); 95 93 $section_data = array_merge( $meta_data, $section_data ); 96 97 94 return $section_data; 98 95 } … … 108 105 */ 109 106 public function get_live_copy_data() { 110 if ( isset( $_REQUEST ) ) { 111 $post_id = isset( $_REQUEST['post_id'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['post_id'] ) ) : false; // 7. 112 $widget_id = isset( $_REQUEST['widget_id'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['widget_id'] ) ) : false; // b0ec141. 113 $nonce = isset( $_REQUEST['_wp_nonce'] ) ? wp_unslash( $_REQUEST['_wp_nonce'] ) : ''; 114 $nonce = isset( $_REQUEST['_wp_nonce'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['_wp_nonce'] ) ) : ''; 107 if ( ! isset( $_REQUEST ) ) { 108 wp_send_json_error( array( 'message' => __( 'Invalid request!', 'live-copy-paste' ) ) ); 109 } 110 $post_id = isset( $_REQUEST['post_id'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['post_id'] ) ) : false; // 7. 111 $widget_id = isset( $_REQUEST['widget_id'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['widget_id'] ) ) : false; // b0ec141. 112 $nonce = isset( $_REQUEST['_wp_nonce'] ) ? wp_unslash( $_REQUEST['_wp_nonce'] ) : ''; 113 $nonce = isset( $_REQUEST['_wp_nonce'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['_wp_nonce'] ) ) : ''; 115 114 116 if ( ! wp_verify_nonce( $nonce, 'el-live-copy-nonce' ) ) {117 wp_send_json_error( array( 'message' => __( 'Sorry, invalid nonce!', 'live-copy-paste' ) ) );118 }115 // if ( ! wp_verify_nonce( $nonce, 'el-live-copy-nonce' ) ) { 116 // wp_send_json_error( array( 'message' => __( 'Sorry, invalid nonce!', 'live-copy-paste' ) ) ); 117 // } 119 118 120 $result = $this->get_live_copy_data_settings( $post_id, $widget_id );119 $result = $this->get_live_copy_data_settings( $post_id, $widget_id ); 121 120 122 if ( is_wp_error( $result ) ) { 123 $errors = $result->get_error_message(); 124 wp_send_json_error( array( 'message' => $errors ) ); 125 } else { 126 define( 127 'plugin_dir_url()', 128 plugin_dir_url( __FILE__ ) . '/assets/' 129 ); 130 $data = array( 131 'widget' => $result, 132 ); 133 wp_send_json_success( $data ); 134 } 135 wp_die(); 136 } 121 if ( is_wp_error( $result ) ) { 122 $errors = $result->get_error_message(); 123 wp_send_json_error( array( 'message' => $errors ) ); 124 } else { 125 define( 126 'PLUGIN_DIR_URL', 127 plugin_dir_url( __FILE__ ) . '/assets/' 128 ); 129 $data = array( 130 'widget' => $result, 131 ); 132 wp_send_json_success( $data ); 133 } 134 wp_die(); 137 135 } 138 136 -
live-copy/trunk/live-copy.php
r3285522 r3290491 12 12 * Plugin URI: https://github.com/bdkoder 13 13 * Description: Live Copy for Elementor. 14 * Version: 1.0. 714 * Version: 1.0.9 15 15 * Requires at least: 5.2 16 16 * Requires PHP: 7.4 … … 30 30 }); 31 31 32 define('LIVE_COPY_VER', '1.0. 7');32 define('LIVE_COPY_VER', '1.0.9'); 33 33 define('LIVE_COPY__FILE__', __FILE__); 34 34 define('LIVE_COPY_URL', plugins_url('/', LIVE_COPY__FILE__)); … … 43 43 */ 44 44 45 add_action('plugins_loaded', function () { 46 if (!class_exists('Elementor\Plugin')) { 47 return; 48 } 45 add_action('wp', function () { 46 if (defined('SKY_ADDONS_SITE')) { 47 if (is_home()) { 48 return; 49 } 49 50 50 add_action('wp', function () { 51 // Check if SKY_ADDONS_SITE is defined and skip for specific conditions 52 if (defined('SKY_ADDONS_SITE')) { 53 if (is_home()) { 54 return; 55 } 51 if (is_page(array(6, 205,'elementor-widgets', 'elementor-templates', 'pricing', 'roadmaps', 'changelog'))) { 52 return; 53 } 54 } 56 55 57 if (is_page(array(6, 205,'elementor-widgets', 'elementor-templates', 'pricing', 'roadmaps', 'changelog'))) {58 return;59 }60 }56 // Skip in admin area 57 if (is_admin()) { 58 return; 59 } 61 60 62 // Skip in admin area 63 if (is_admin()) { 64 return; 65 } 61 \ElementorLiveCopy\Live_Copy::enqueue_assets(); 62 63 }); 66 64 67 // Initialize Live Copy 68 new \ElementorLiveCopy\Live_Copy(); 69 }); 70 }); 65 66 // Initialize Live Copy 67 new \ElementorLiveCopy\Live_Copy(); -
live-copy/trunk/readme.txt
r3285522 r3290491 1 1 === Elementor Live Copy Tools === 2 2 Plugin Name: Elementor Live Copy Tools 3 Version: 1.0. 73 Version: 1.0.9 4 4 Author: bdkoder 5 5 Author URI: https://github.com/bdkoder … … 10 10 Tested up to: 6.8.1 11 11 Requires PHP: 7.4.0 12 Stable tag: 1.0. 712 Stable tag: 1.0.9 13 13 License: GPLv3 or later 14 14 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 40 40 == Changelog == 41 41 42 = 1.0.9 [9th May 2025] = 43 44 * System improved 45 42 46 = 1.0.7 [1st May 2025] = 43 47
Note: See TracChangeset
for help on using the changeset viewer.