Plugin Directory

Changeset 3478935


Ignore:
Timestamp:
03/10/2026 09:43:38 AM (4 weeks ago)
Author:
domainlee
Message:

Release 1.5.6

Location:
crt-manage
Files:
2529 added
10 edited

Legend:

Unmodified
Added
Removed
  • crt-manage/trunk/assets/css/admin/editor.min.css

    r3474722 r3478935  
    1818
    1919/*--------------------------------------------------------------
    20 == WPR Widgets
     20== CRT Widgets
    2121--------------------------------------------------------------*/
    2222.elementor-panel .crt-icon:after {
  • crt-manage/trunk/assets/css/admin/library-frontend.min.css

    r3478729 r3478935  
    674674    padding: 6px 10px;
    675675    color: #fff;
    676     background-color: #6A4BFF;
     676    background: #FF00F7;
     677    background: linear-gradient(0deg,rgba(255, 0, 247, 1) 0%, rgba(195, 1, 255, 1) 100%);
    677678    font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
    678679    font-size: 13px;
    679680    line-height: 1;
    680681    letter-spacing: 0.3px;
    681     border-radius: 3px;
     682    border-radius: 15px;
    682683    cursor: pointer;
    683684    -webkit-transition: all 0.1s ease-in;
  • crt-manage/trunk/assets/js/admin/editor.min.js

    r3474722 r3478935  
    490490    } );
    491491
    492     // WPR Grid Widget: Select Element (Filter Taxonomies)
     492    // CRT Grid Widget: Select Element (Filter Taxonomies)
    493493    function filterGridTaxonomies( data, value ) {
    494494        var options = [];
     
    515515    }
    516516
    517     // WPR Grid Widget: Post Meta Keys (Filter by Query)
     517    // CRT Grid Widget: Post Meta Keys (Filter by Query)
    518518    function filterGridMetaKeys( data, value ) {
    519519        var options = [];
     
    534534    }
    535535
    536     // WPR Grid Widget / List style: Element Location
     536    // CRT Grid Widget / List style: Element Location
    537537    function disableListLocation( value ) {
    538538        // Reset
  • crt-manage/trunk/assets/js/modules/crt-header.js

    r3478729 r3478935  
    164164                            if ( 'desktop' == deviceName ) {
    165165                                if ( $scope.data('settings') ) {
    166                                     stickyEffectsOffset = distanceFromTop + $scope.data('settings').wpr_sticky_effects_offset;
     166                                    stickyEffectsOffset = distanceFromTop + $scope.data('settings').crt_sticky_effects_offset;
    167167                                } else {
    168168                                    stickyEffectsOffset = distanceFromTop + $scope.find('.crt-sticky-section-yes-editor').attr('data-crt-offset-settings');
     
    170170                            } else {
    171171                                if ( $scope.data('settings') ) {
    172                                     stickyEffectsOffset = distanceFromTop + $scope.data('settings')['wpr_sticky_effects_offset_' + deviceName];
     172                                    stickyEffectsOffset = distanceFromTop + $scope.data('settings')['crt_sticky_effects_offset_' + deviceName];
    173173                                } else {
    174174                                    stickyEffectsOffset = distanceFromTop + $scope.find('.crt-sticky-section-yes-editor').attr('data-crt-offset-settings');
  • crt-manage/trunk/crt-manage.php

    r3478729 r3478935  
    33 * Plugin Name: CRT Manage
    44 * Description: CRT Manage is a front page customizer plugin for Wordpress themes by author domainlee
    5  * Version: 1.5.5
     5 * Version: 1.5.6
    66 * Author: Domainlee
    77 * Author URI: https://crthemes.com/
  • crt-manage/trunk/includes/customizer/addons/addons.php

    r3478729 r3478935  
    144144        require CRT_MANAGE_DIR . '/includes/customizer/addons/class/crt-ajax-search.php';
    145145        require CRT_MANAGE_DIR . '/includes/customizer/addons/class/crt-load-more-instagram-posts.php';
     146        require CRT_MANAGE_DIR . '/includes/customizer/addons/class/mega-menu/mega-menu.php';
    146147        require CRT_MANAGE_DIR . '/includes/customizer/addons/class/form/form-submissions.php';
    147148        require CRT_MANAGE_DIR . '/includes/customizer/addons/class/form/crt-submissions-cpt.php';
     
    630631            array( 'CRT_Advanced_Slider', 'crt-advanced-slider' ),
    631632            array( 'CRT_Nav_Menu', 'crt-nav-menu' ),
     633            array( 'CRT_Mega_Menu', 'crt-mega-menu' ),
    632634            array( 'CRT_Archive_Title', 'crt-archive-title' ),
    633635            array( 'CRT_Breadcrumbs', 'crt-breadcrumbs' ),
  • crt-manage/trunk/includes/customizer/addons/admin/crt-templates-actions.php

    r3476572 r3478935  
    11<?php
    2 //namespace WprAddons\Admin\Includes;
    32
    43use CrtAddons\Plugin;
     
    1312
    1413/**
    15  * WPR_Templates_Actions setup
     14 * CRT_Templates_Actions setup
    1615 *
    1716 * @since 1.0
    1817 */
    19 class WPR_Templates_Actions {
     18class CRT_Templates_Actions {
    2019
    2120    /**
     
    180179
    181180        $nonce = $_POST['nonce'];
    182 //        echo 'mieneleee';die;
    183181        if ( !wp_verify_nonce( $nonce, 'crt-addons-library-frontend-js')  || !current_user_can( 'manage_options' ) ) {
    184182          exit; // Get out of here, the nonce is rotten!
    185183        }
    186184
    187         $source = new WPR_Library_Source();
     185        $source = new CRT_Library_Source();
    188186        $slug = isset($_POST['slug']) ? sanitize_text_field(wp_unslash($_POST['slug'])) : '';
    189187        $kit = isset($_POST['kit']) ? sanitize_text_field(wp_unslash($_POST['kit'])) : '';
     
    196194        ]);
    197195        $template = '' !== $kit ? $kit : $slug;
    198 //      if ( $this->vts($slug) ) {
    199             $data = str_replace('wpr', 'crt', json_encode($data));
    200             $data = str_replace('Royal Elementor', 'CRThemes', $data);
    201 //            $data = str_replace('royal-elementor-addons.com', 'crthemes.com', $data);
    202             $data = str_replace('https://royal-elementor-addons.com', 'https://crthemes.com', $data);
    203 //            error_log($data);
    204             echo $data;
    205 //      }
     196        $data = str_replace('wpr', 'crt', json_encode($data));
     197        $data = str_replace('Royal Elementor', 'CRThemes', $data);
     198        $data = str_replace('https://royal-elementor-addons.com', 'https://crthemes.com', $data);
     199        echo $data;
    206200    }
    207201
     
    210204    */
    211205    public function vts( $template ) {
    212         // Avoid Cache
    213         $randomNum = substr(str_shuffle("0123456789abcdefghijklmnopqrstvwxyzABCDEFGHIJKLMNOPQRSTVWXYZ"), 0, 7);
    214 
    215         $remote_file_url = 'https://royal-elementor-addons.com/library/vts.json?='. $randomNum;
    216 
    217         $tmp_file = download_url( $remote_file_url );
    218 
    219         $file_args = [
    220             'name'     => 'vts.json',
    221             'tmp_name' => $tmp_file,
    222             'error'    => 0,
    223             'size'     => filesize( $tmp_file ),
    224         ];
    225 
    226         $defaults = array(
    227             'test_form' => false,
    228             'test_size' => true,
    229             'test_upload' => true,
    230             'mimes'  => [
    231                 'xml'  => 'text/xml',
    232                 'json' => 'text/plain',
    233             ],
    234             'wp_handle_sideload' => 'upload',
    235         );
    236 
    237         $local_file = wp_handle_sideload( $file_args, $defaults );
    238 
    239         if ( isset( $local_file['error'] ) ) {
    240             return false;
    241         }
    242 
    243         $tmps = json_decode(file_get_contents($local_file['file']));
    244 
    245         // Delete Import File
    246         unlink( $local_file['file'] );
    247 
    248         return in_array($template, $tmps) && (!defined('WPR_ADDONS_PRO_VERSION') || !crt_fs()->can_use_premium_code())  ? false : true;
     206        return true;
    249207    }
    250208
     
    380338    ** Enqueue Scripts and Styles
    381339    */
    382     public function templates_library_scripts( $hook ) {
    383 
    384         // Get Plugin Version
    385         $version = Plugin::instance()->get_version();
    386        
    387         $screen = get_current_screen();
    388 
    389        
    390         if ( $screen->id === 'edit-crt_templates' ) {
    391             $custom_css = '
    392                 .crt-templates-cat-select,
    393                 .crt-templates-cat-select option,
    394                 .crt-templates-cat-select option:checked {
    395                     text-transform: capitalize !important;
    396                 }
    397             ';
    398 
    399             wp_add_inline_style( 'wp-admin', $custom_css );
    400         }
    401 
    402         // Deny if NOT Plugin Page
    403         if ( 'toplevel_page_crt-addons' == $hook || strpos($hook, 'crt-theme-builder') || strpos($hook, 'crt-popups') ) {
    404 
    405             // Color Picker
    406             wp_enqueue_style( 'wp-color-picker' );
    407             wp_enqueue_script( 'wp-color-picker-alpha', WPR_ADDONS_URL .'assets/js/admin/lib/wp-color-picker-alpha.min.js', ['jquery', 'wp-color-picker'], $version, true );
    408 
    409             // Media Upload
    410             if ( ! did_action( 'wp_enqueue_media' ) ) {
    411                 wp_enqueue_media();
    412             }
    413 
    414             // enqueue CSS
    415             wp_enqueue_style( 'crt-plugin-options-css', WPR_ADDONS_URL .'assets/css/admin/plugin-options.css', [], $version );
    416 
    417             // enqueue JS
    418             wp_enqueue_script( 'crt-plugin-options-js', WPR_ADDONS_URL .'assets/js/admin/plugin-options.js', ['jquery'], $version );
    419 
    420             // Get Royal Backup reminder popup mode setting
    421             $backup_reminder_mode = 'allow_dismiss';
    422             if ( is_plugin_active( 'royal-backup-reset/royal-backup-reset.php' ) ) {
    423                 $backup_reminder_mode = get_option( 'royalbr_reminder_popup_mode', 'allow_dismiss' );
    424             }
    425 
    426             wp_localize_script(
    427                 'crt-plugin-options-js',
    428                 'WprPluginOptions', // This is used in the js file to group all of your scripts together
    429                 [
    430                     'nonce' => wp_create_nonce( 'crt-plugin-options-js' ),
    431                     'backup_plugin_active' => is_plugin_active( 'royal-backup-reset/royal-backup-reset.php' ),
    432                     'backup_plugin_installed' => file_exists( WP_PLUGIN_DIR . '/royal-backup-reset/royal-backup-reset.php' ),
    433                     'backup_popup_dismissed' => (bool) get_user_meta( get_current_user_id(), 'crt_dismiss_backup_popup', true ),
    434                     'backup_reminder_dismissed' => (bool) get_user_meta( get_current_user_id(), 'royalbr_dismiss_backup_reminder', true ),
    435                     'backup_reminder_mode' => $backup_reminder_mode,
    436                 ]
    437             );
    438 
    439         }
    440 
    441         if ( strpos($hook, 'crt-templates-kit') ) {
    442             wp_enqueue_style( 'crt-templates-kit-css', WPR_ADDONS_URL .'assets/css/admin/templates-kit.css', [], $version );
    443             wp_enqueue_script( 'crt-templates-kit-js', WPR_ADDONS_URL .'assets/js/admin/templates-kit.js', ['jquery', 'updates'], $version );
    444 
    445             wp_localize_script(
    446                 'crt-templates-kit-js',
    447                 'WprTemplatesKitLoc', // This is used in the js file to group all of your scripts together
    448                 [
    449                     'ajaxurl' => admin_url( 'admin-ajax.php' ),
    450                     'resturl' => get_rest_url() . 'wpraddons/v1',
    451                     'nonce' => wp_create_nonce( 'crt-templates-kit-js' ),
    452                     'royal_backup_reset_active' => is_plugin_active( 'royal-backup-reset/royal-backup-reset.php' ),
    453                 ]
    454             );
    455         }
    456 
    457         if ( strpos($hook, 'crt-premade-blocks') ) {
    458             wp_enqueue_style( 'crt-premade-blocks-css', WPR_ADDONS_URL .'assets/css/admin/premade-blocks.css', [], $version );
    459 
    460             wp_enqueue_script( 'crt-macy-js', WPR_ADDONS_URL .'assets/js/lib/macy/macy.js', ['jquery'], $version );
    461             wp_enqueue_script( 'crt-premade-blocks-js', WPR_ADDONS_URL .'assets/js/admin/premade-blocks.js', ['jquery'], $version );
    462         }
    463     }
     340    public function templates_library_scripts( $hook ) { }
    464341
    465342    /**
    466343    ** Register Elementor AJAX Actions
    467344    */
    468     public function register_elementor_ajax_actions( Ajax $ajax ) {
    469 
    470         // Elementor Search Data
    471         $ajax->register_ajax_action( 'crt_elementor_search_data', function( $data ) {
    472             // Freemius OptIn
    473             if ( ! (crt_fs()->is_registered() && crt_fs()->is_tracking_allowed() || crt_fs()->is_pending_activation() )) {
    474                 return;
    475             }
    476 
    477             if ( strlen($data['search_query']) > 25 ) {
    478                 return;
    479             }
    480 
    481             // Send Search Query
    482             wp_remote_post( 'https://reastats.kinsta.cloud/wp-json/elementor-search/data', [
    483                 'body' => [
    484                     'search_query' => $data['search_query']
    485                 ]
    486             ] );
    487         } );
    488 
    489         // Templates Library Pages Search Data
    490         $ajax->register_ajax_action( 'crt_templates_library_search_data', function( $data ) {
    491             // Freemius OptIn
    492             if ( ! (crt_fs()->is_registered() && crt_fs()->is_tracking_allowed() || crt_fs()->is_pending_activation() )) {
    493                 return;
    494             }
    495 
    496             if ( strlen($data['search_query']) > 25 ) {
    497                 return;
    498             }
    499 
    500             // Send Search Query
    501             wp_remote_post( 'https://reastats.kinsta.cloud/wp-json/templates-library-search/data', [
    502                 'body' => [
    503                     'search_query' => $data['search_query']
    504                 ]
    505             ] );
    506         } );
    507 
    508         // Templates Library Blocks Search Data
    509         $ajax->register_ajax_action( 'crt_templates_library_blocks_search_data', function( $data ) {
    510             // Freemius OptIn
    511             if ( ! (crt_fs()->is_registered() && crt_fs()->is_tracking_allowed() || crt_fs()->is_pending_activation() )) {
    512                 return;
    513             }
    514 
    515             if ( strlen($data['search_query']) > 25 ) {
    516                 return;
    517             }
    518 
    519             // Send Search Query
    520             wp_remote_post( 'https://reastats.kinsta.cloud/wp-json/templates-library-blocks-search/data', [
    521                 'body' => [
    522                     'search_query' => $data['search_query']
    523                 ]
    524             ] );
    525         } );
    526 
    527         // Templates Library Sections Search Data
    528         $ajax->register_ajax_action( 'crt_templates_library_sections_search_data', function( $data ) {
    529             // Freemius OptIn
    530             if ( ! (crt_fs()->is_registered() && crt_fs()->is_tracking_allowed() || crt_fs()->is_pending_activation() )) {
    531                 return;
    532             }
    533 
    534             if ( strlen($data['search_query']) > 25 ) {
    535                 return;
    536             }
    537 
    538             // Send Search Query
    539             wp_remote_post( 'https://reastats.kinsta.cloud/wp-json/templates-library-sections-search/data', [
    540                 'body' => [
    541                     'search_query' => $data['search_query']
    542                 ]
    543             ] );
    544         } );
    545 
    546         // Library Template Import Finished
    547         $ajax->register_ajax_action( 'crt_library_template_import_finished', function( $data ) {
    548             Utilities::regenerate_extra_image_sizes();
    549 
    550             // Freemius OptIn
    551             if ( ! (crt_fs()->is_registered() && crt_fs()->is_tracking_allowed() || crt_fs()->is_pending_activation() )) {
    552                 return;
    553             }
    554 
    555             // Templates Library Import Block
    556             if ( isset($data['block'])) {
    557                 wp_remote_post( 'https://reastats.kinsta.cloud/wp-json/templates-library-blocks-import/data', [
    558                     'body' => [
    559                         'imported_block' => $data['block']
    560                     ]
    561                 ] );
    562             }
    563 
    564             // Templates Library Import Section
    565             if ( isset($data['section'])) {
    566                 wp_remote_post( 'https://reastats.kinsta.cloud/wp-json/templates-library-sections-import/data', [
    567                     'body' => [
    568                         'imported_section' => $data['section']
    569                     ]
    570                 ] );
    571             }
    572 
    573             if ( ! isset($data['kit']) ) {
    574                 return;
    575             }
    576 
    577             // Templates Library Import Template
    578             wp_remote_post( 'https://reastats.kinsta.cloud/wp-json/templates-library-import/data', [
    579                 'body' => [
    580                     'imported_template' => $data['kit'] .'-'. $data['template'] . ' *'. WPR_ADDONS_VERSION .'*'
    581                 ]
    582             ] );
    583         } );
    584     }
     345    public function register_elementor_ajax_actions( Ajax $ajax ) { }
    585346}
    586 new WPR_Templates_Actions();
     347
     348new CRT_Templates_Actions();
    587349
    588350/**
    589  * WPR_Templates_Actions setup
     351 * CRT_Templates_Actions setup
    590352 *
    591353 * @since 1.0
    592354 */
    593 class WPR_Library_Source extends \Elementor\TemplateLibrary\Source_Base {
     355class CRT_Library_Source extends \Elementor\TemplateLibrary\Source_Base {
    594356
    595357    public function get_id() {
     
    598360
    599361    public function get_title() {
    600         return 'WPR Layout Manager';
     362        return 'CRT Layout Manager';
    601363    }
    602364
     
    604366
    605367    public function save_item( $template_data ) {
    606         return new \WP_Error( 'invalid_request', 'Cannot save template to a WPR layout manager' );
     368        return new \WP_Error( 'invalid_request', 'Cannot save template to a CRT layout manager' );
    607369    }
    608370
    609371    public function update_item( $new_data ) {
    610         return new \WP_Error( 'invalid_request', 'Cannot update template to a WPR layout manager' );
     372        return new \WP_Error( 'invalid_request', 'Cannot update template to a CRT layout manager' );
    611373    }
    612374
    613375    public function delete_template( $template_id ) {
    614         return new \WP_Error( 'invalid_request', 'Cannot delete template from a WPR layout manager' );
     376        return new \WP_Error( 'invalid_request', 'Cannot delete template from a CRT layout manager' );
    615377    }
    616378
    617379    public function export_template( $template_id ) {
    618         return new \WP_Error( 'invalid_request', 'Cannot export template from a WPR layout manager' );
     380        return new \WP_Error( 'invalid_request', 'Cannot export template from a CRT layout manager' );
    619381    }
    620382
  • crt-manage/trunk/includes/customizer/addons/builder.php

    r3478729 r3478935  
    4545//        add_action( 'cmb2_admin_init', array($this, 'crt_manage_page_metabox') );
    4646        add_filter('upload_mimes', array($this, 'crt_manage_add_file_types_to_uploads'));
     47
     48        $this->register_megamenu_route();
    4749    }
    4850
     
    10261028    }
    10271029
     1030    public function register_megamenu_route() {
     1031        add_action( 'rest_api_init', function() {
     1032            register_rest_route(
     1033                'crtaddons/v1',
     1034                '/crtmegamenu/',
     1035                [
     1036                    'methods' => 'GET',
     1037                    'callback' =>  [$this, 'mega_menu_ajax_loading'],
     1038                    'permission_callback' => '__return_true'
     1039                ]
     1040            );
     1041        } );
     1042    }
     1043
     1044    public function mega_menu_ajax_loading() {
     1045        $elementor = \Elementor\Plugin::instance();
     1046        $mega_id = get_post_meta( $_GET['item_id'], 'crt-mega-menu-item', true);
     1047        $type = get_post_meta($mega_id, '_elementor_template_type', true);
     1048        $has_css = 'internal' === get_option( 'elementor_css_print_method' ) || '' !== $type;
     1049
     1050        $content = $elementor->frontend->get_builder_content_for_display($mega_id, $has_css);
     1051
     1052        wp_send_json( $content );
     1053    }
     1054
    10281055
    10291056}
  • crt-manage/trunk/includes/customizer/addons/class/crt-ajax-search.php

    r3461154 r3478935  
    126126                    'posts_per_page' => sanitize_text_field($_POST['crt_number_of_results']),
    127127                    's' => sanitize_text_field( $_POST['crt_keyword'] ),
    128                     'post_type' => $_POST['crt_query_type'] === 'all' || (!defined('WPR_ADDONS_PRO_VERSION') || !crt_fs()->can_use_premium_code())  ? $all_post_types : array( sanitize_text_field($_POST['crt_query_type']) ),
     128                    'post_type' => $_POST['crt_query_type'] === 'all' || (!defined('WPR_ADDONS_PRO_VERSION') )  ? $all_post_types : array( sanitize_text_field($_POST['crt_query_type']) ),
    129129                    'offset' => sanitize_text_field($_POST['crt_search_results_offset']),
    130130                    'meta_query' => $meta_query ?: '',
     
    138138                    'posts_per_page' => sanitize_text_field($_POST['crt_number_of_results']),
    139139                    's' => sanitize_text_field( $_POST['crt_keyword'] ),
    140                     'post_type' => $_POST['crt_query_type'] === 'all' || (!defined('WPR_ADDONS_PRO_VERSION') || !crt_fs()->can_use_premium_code())  ? $all_post_types : array( sanitize_text_field($_POST['crt_query_type']) ),
     140                    'post_type' => $_POST['crt_query_type'] === 'all' || (!defined('WPR_ADDONS_PRO_VERSION'))  ? $all_post_types : array( sanitize_text_field($_POST['crt_query_type']) ),
    141141                    'offset' => sanitize_text_field($_POST['crt_search_results_offset']),
    142142                    'meta_query' => $meta_query ?: '',
  • crt-manage/trunk/readme.txt

    r3478729 r3478935  
    44Requires at least: 4.0
    55Tested up to: 6.9
    6 Stable tag: 1.5.5
     6Stable tag: 1.5.6
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.