Changeset 3058805
- Timestamp:
- 03/26/2024 07:29:03 AM (2 years ago)
- Location:
- template-kit-import/trunk
- Files:
-
- 6 added
- 7 edited
-
assets/custom (added)
-
assets/custom/elementor-modal.css (added)
-
assets/custom/elementor-modal.js (added)
-
assets/react (added)
-
assets/react/main.css (added)
-
assets/react/main.js (added)
-
inc/api/class-api.php (modified) (1 diff)
-
inc/api/class-template-kit-import.php (modified) (2 diffs)
-
inc/backend/class-elementor-modal.php (modified) (1 diff)
-
inc/backend/class-welcome.php (modified) (1 diff)
-
languages/template-kit-import.pot (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
template-kit-import.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
template-kit-import/trunk/inc/api/class-api.php
r2614541 r3058805 30 30 31 31 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' ); 33 33 } 34 34 -
template-kit-import/trunk/inc/api/class-template-kit-import.php
r2614541 r3058805 34 34 35 35 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 ); 36 47 } 37 48 … … 320 331 $this->register_endpoint( 'getSingleTemplateImportData', array( $this, 'get_single_template_for_import' ) ); 321 332 $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 ); 322 346 } 323 347 } -
template-kit-import/trunk/inc/backend/class-elementor-modal.php
r2467672 r3058805 41 41 Welcome::get_instance()->admin_page_assets(); 42 42 // 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 ); 44 44 } 45 45 46 46 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 ); 49 49 } 50 50 -
template-kit-import/trunk/inc/backend/class-welcome.php
r2467672 r3058805 87 87 */ 88 88 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 ); 91 91 } 92 92 -
template-kit-import/trunk/languages/template-kit-import.pot
r2614541 r3058805 1 # Copyright (C) 202 1template-kit-import1 # Copyright (C) 2024 template-kit-import 2 2 # This file is distributed under the same license as the template-kit-import package. 3 3 msgid "" … … 9 9 "Language-Team: Envato <extensions@envato.com>\n" 10 10 "Last-Translator: Extensions <extensions@envato.com>\n" 11 "POT-Creation-Date: 2024-03-26 07:24+0000\n" 11 12 "Report-Msgid-Bugs-To: https://envato.com//\n" 12 13 "X-Poedit-Basepath: ..\n" -
template-kit-import/trunk/readme.txt
r2685720 r3058805 3 3 Tags: elementor, template, templates 4 4 Requires at least: 5.3 5 Tested up to: 5.95 Tested up to: 6.4 6 6 Requires PHP: 5.6 7 Stable tag: 1.0.1 47 Stable tag: 1.0.15 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 36 36 37 37 == Changelog == 38 39 = 1.0.15 - 2024-03-22 = 40 * Fix: Change minimum capability from "editor" to "install_themes" 38 41 39 42 = 1.0.14 - 2021-10-21 = -
template-kit-import/trunk/template-kit-import.php
r2685720 r3058805 5 5 * Author: Envato 6 6 * Author URI: https://envato.com 7 * Version: 1.0.1 47 * Version: 1.0.15 8 8 * License: GPLv3 or later 9 9 * License URI: https://www.gnu.org/licenses/gpl-3.0.html 10 * Elementor tested up to: 3. 5.510 * Elementor tested up to: 3.20.2 11 11 * Elementor Pro tested up to: 3.6.2 12 12 * … … 31 31 32 32 define( 'ENVATO_TEMPLATE_KIT_IMPORT_SLUG', 'template-kit-import' ); 33 define( 'ENVATO_TEMPLATE_KIT_IMPORT_VER', '1.0.1 4' );33 define( 'ENVATO_TEMPLATE_KIT_IMPORT_VER', '1.0.15' ); 34 34 define( 'ENVATO_TEMPLATE_KIT_IMPORT_FILE', __FILE__ ); 35 35 define( 'ENVATO_TEMPLATE_KIT_IMPORT_DIR', plugin_dir_path( ENVATO_TEMPLATE_KIT_IMPORT_FILE ) );
Note: See TracChangeset
for help on using the changeset viewer.