Plugin Directory

Changeset 3290491


Ignore:
Timestamp:
05/09/2025 12:34:38 PM (10 months ago)
Author:
bdkoder
Message:

New Version

Location:
live-copy/trunk
Files:
5 edited

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  
    2424     */
    2525    public function __construct() {
    26         if ( ! is_admin() ) {
    27             add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_assets' ) );
    28         }
    2926        add_action( 'wp_ajax_nopriv_ellc_copy_data', array( $this, 'get_live_copy_data' ) );
    3027        add_action( 'wp_ajax_ellc_copy_data', array( $this, 'get_live_copy_data' ) );
     
    3633     * @since 1.0.0
    3734     */
    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 );
    4142    }
    4243
     
    6162     */
    6263    public function enqueue_scripts() {
    63         wp_enqueue_script( 'live-copy-clipboard' );
    64 
    6564        wp_register_script( 'live-copy-script', LIVE_COPY_ASSETS_URL . 'js/script.js', array( 'jquery' ), LIVE_COPY_VER, true );
    6665        wp_enqueue_script( 'live-copy-script' );
     
    7574            )
    7675        );
    77 
    7876    }
    7977
     
    9492                $meta_data['siteurl']     = get_rest_url();
    9593                $section_data             = array_merge( $meta_data, $section_data );
    96 
    9794                return $section_data;
    9895            }
     
    108105     */
    109106    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'] ) ) : '';
    115114
    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    // }
    119118
    120             $result = $this->get_live_copy_data_settings( $post_id, $widget_id );
     119    $result = $this->get_live_copy_data_settings( $post_id, $widget_id );
    121120
    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();
    137135    }
    138136
  • live-copy/trunk/live-copy.php

    r3285522 r3290491  
    1212 * Plugin URI:        https://github.com/bdkoder
    1313 * Description:       Live Copy for Elementor.
    14  * Version:           1.0.7
     14 * Version:           1.0.9
    1515 * Requires at least: 5.2
    1616 * Requires PHP:      7.4
     
    3030});
    3131
    32 define('LIVE_COPY_VER', '1.0.7');
     32define('LIVE_COPY_VER', '1.0.9');
    3333define('LIVE_COPY__FILE__', __FILE__);
    3434define('LIVE_COPY_URL', plugins_url('/', LIVE_COPY__FILE__));
     
    4343 */
    4444
    45 add_action('plugins_loaded', function () {
    46     if (!class_exists('Elementor\Plugin')) {
    47         return;
    48     }
     45add_action('wp', function () {
     46  if (defined('SKY_ADDONS_SITE')) {
     47      if (is_home()) {
     48          return;
     49      }
    4950
    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  }
    5655
    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  }
    6160
    62         // Skip in admin area
    63         if (is_admin()) {
    64             return;
    65         }
     61  \ElementorLiveCopy\Live_Copy::enqueue_assets();
     62 
     63});
    6664
    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  
    11=== Elementor Live Copy Tools ===
    22Plugin Name: Elementor Live Copy Tools
    3 Version: 1.0.7
     3Version: 1.0.9
    44Author: bdkoder
    55Author URI: https://github.com/bdkoder
     
    1010Tested up to: 6.8.1
    1111Requires PHP: 7.4.0
    12 Stable tag: 1.0.7
     12Stable tag: 1.0.9
    1313License: GPLv3 or later
    1414License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    4040== Changelog ==
    4141
     42= 1.0.9 [9th May 2025] =
     43
     44* System improved
     45
    4246= 1.0.7 [1st May 2025] =
    4347
Note: See TracChangeset for help on using the changeset viewer.