Plugin Directory

Changeset 3058805


Ignore:
Timestamp:
03/26/2024 07:29:03 AM (2 years ago)
Author:
dtbaker
Message:

Uploading version 1.0.15

Location:
template-kit-import/trunk
Files:
6 added
7 edited

Legend:

Unmodified
Added
Removed
  • template-kit-import/trunk/inc/api/class-api.php

    r2614541 r3058805  
    3030
    3131    public function rest_permission_check( $request ) {
    32         return current_user_can( 'edit_posts' ) && current_user_can( 'upload_files' );
     32        return current_user_can( 'install_themes' );
    3333    }
    3434
  • template-kit-import/trunk/inc/api/class-template-kit-import.php

    r2614541 r3058805  
    3434
    3535        return $this->format_success( $installed_kits );
     36    }
     37
     38    /**
     39     * @return \WP_REST_Response
     40     */
     41    public function fetch_permissions() {
     42        $permissions = [
     43            "can_use_template_kits" => current_user_can('install_themes')
     44        ];
     45
     46        return $this->format_success( $permissions );
    3647    }
    3748
     
    320331        $this->register_endpoint( 'getSingleTemplateImportData', array( $this, 'get_single_template_for_import' ) );
    321332        $this->register_endpoint( 'importElementorTemplateImage', array( $this, 'import_elementor_template_image' ) );
     333
     334        register_rest_route(
     335            ENVATO_TEMPLATE_KIT_IMPORT_API_NAMESPACE,
     336            'fetchPermissions',
     337            array(
     338                array(
     339                    'methods'             => \WP_REST_Server::CREATABLE,
     340                    'callback'            => array( $this, 'fetch_permissions' ),
     341                    'permission_callback' => '__return_true',
     342                    'args'                => array(),
     343                ),
     344            )
     345        );
    322346    }
    323347}
  • template-kit-import/trunk/inc/backend/class-elementor-modal.php

    r2467672 r3058805  
    4141        Welcome::get_instance()->admin_page_assets();
    4242        // Now load our custom elementor_modal.js code and css:
    43         wp_enqueue_script( 'elements-elementor-modal', ENVATO_TEMPLATE_KIT_IMPORT_URI . 'assets/elementor_modal.js', array( 'jquery' ), ENVATO_TEMPLATE_KIT_IMPORT_VER );
     43        wp_enqueue_script( 'elements-elementor-modal', ENVATO_TEMPLATE_KIT_IMPORT_URI . 'assets/custom/elementor_modal.js', array( 'jquery' ), ENVATO_TEMPLATE_KIT_IMPORT_VER );
    4444    }
    4545
    4646    public function enqueue_embedded_iframe_styles() {
    47         wp_enqueue_style( 'template-kit-import-admin', ENVATO_TEMPLATE_KIT_IMPORT_URI . 'assets/main.css', array(), filemtime( ENVATO_TEMPLATE_KIT_IMPORT_DIR . 'assets/main.css' ) );
    48         wp_enqueue_style( 'elements-elementor-modal', ENVATO_TEMPLATE_KIT_IMPORT_URI . 'assets/elementor_modal.css', array(), ENVATO_TEMPLATE_KIT_IMPORT_VER );
     47        wp_enqueue_style( 'template-kit-import-admin', ENVATO_TEMPLATE_KIT_IMPORT_URI . 'assets/react/main.css', array(), filemtime( ENVATO_TEMPLATE_KIT_IMPORT_DIR . 'assets/react/main.css' ) );
     48        wp_enqueue_style( 'elements-elementor-modal', ENVATO_TEMPLATE_KIT_IMPORT_URI . 'assets/custom/elementor_modal.css', array(), ENVATO_TEMPLATE_KIT_IMPORT_VER );
    4949    }
    5050
  • template-kit-import/trunk/inc/backend/class-welcome.php

    r2467672 r3058805  
    8787     */
    8888    public function admin_page_assets() {
    89         wp_enqueue_style( 'template-kit-import-admin', ENVATO_TEMPLATE_KIT_IMPORT_URI . 'assets/main.css', array(), filemtime( ENVATO_TEMPLATE_KIT_IMPORT_DIR . 'assets/main.css' ) );
    90         wp_enqueue_script( 'template-kit-import-admin', ENVATO_TEMPLATE_KIT_IMPORT_URI . 'assets/main.js', array(), filemtime( ENVATO_TEMPLATE_KIT_IMPORT_DIR . 'assets/main.js' ), true );
     89        wp_enqueue_style( 'template-kit-import-admin', ENVATO_TEMPLATE_KIT_IMPORT_URI . 'assets/react/main.css', array(), filemtime( ENVATO_TEMPLATE_KIT_IMPORT_DIR . 'assets/react/main.css' ) );
     90        wp_enqueue_script( 'template-kit-import-admin', ENVATO_TEMPLATE_KIT_IMPORT_URI . 'assets/react/main.js', array(), filemtime( ENVATO_TEMPLATE_KIT_IMPORT_DIR . 'assets/react/main.js' ), true );
    9191    }
    9292
  • template-kit-import/trunk/languages/template-kit-import.pot

    r2614541 r3058805  
    1 # Copyright (C) 2021 template-kit-import
     1# Copyright (C) 2024 template-kit-import
    22# This file is distributed under the same license as the template-kit-import package.
    33msgid ""
     
    99"Language-Team: Envato <extensions@envato.com>\n"
    1010"Last-Translator: Extensions <extensions@envato.com>\n"
     11"POT-Creation-Date: 2024-03-26 07:24+0000\n"
    1112"Report-Msgid-Bugs-To: https://envato.com//\n"
    1213"X-Poedit-Basepath: ..\n"
  • template-kit-import/trunk/readme.txt

    r2685720 r3058805  
    33Tags: elementor, template, templates
    44Requires at least: 5.3
    5 Tested up to: 5.9
     5Tested up to: 6.4
    66Requires PHP: 5.6
    7 Stable tag: 1.0.14
     7Stable tag: 1.0.15
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    3636
    3737== Changelog ==
     38
     39= 1.0.15 - 2024-03-22 =
     40* Fix: Change minimum capability from "editor" to "install_themes"
    3841
    3942= 1.0.14 - 2021-10-21 =
  • template-kit-import/trunk/template-kit-import.php

    r2685720 r3058805  
    55 * Author: Envato
    66 * Author URI: https://envato.com
    7  * Version: 1.0.14
     7 * Version: 1.0.15
    88 * License: GPLv3 or later
    99 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
    10  * Elementor tested up to: 3.5.5
     10 * Elementor tested up to: 3.20.2
    1111 * Elementor Pro tested up to: 3.6.2
    1212 *
     
    3131
    3232define( 'ENVATO_TEMPLATE_KIT_IMPORT_SLUG', 'template-kit-import' );
    33 define( 'ENVATO_TEMPLATE_KIT_IMPORT_VER', '1.0.14' );
     33define( 'ENVATO_TEMPLATE_KIT_IMPORT_VER', '1.0.15' );
    3434define( 'ENVATO_TEMPLATE_KIT_IMPORT_FILE', __FILE__ );
    3535define( 'ENVATO_TEMPLATE_KIT_IMPORT_DIR', plugin_dir_path( ENVATO_TEMPLATE_KIT_IMPORT_FILE ) );
Note: See TracChangeset for help on using the changeset viewer.