Changeset 2467674
- Timestamp:
- 02/03/2021 07:01:42 AM (5 years ago)
- Location:
- template-kit-export/trunk
- Files:
-
- 8 edited
-
README.txt (modified) (2 diffs)
-
admin/assets/js/template-kit-export-admin.js (modified) (1 diff)
-
admin/class-template-kit-export-admin.php (modified) (2 diffs)
-
admin/partials/template-kit-export-step-4.php (modified) (1 diff)
-
builders/class-template-kit-export-builders-base.php (modified) (1 diff)
-
builders/class-template-kit-export-builders-elementor.php (modified) (3 diffs)
-
languages/template-kit-export.pot (modified) (3 diffs)
-
template-kit-export.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
template-kit-export/trunk/README.txt
r2451574 r2467674 3 3 Tags: elementor, template, templates 4 4 Requires at least: 5.3 5 Tested up to: 5. 55 Tested up to: 5.6 6 6 Requires PHP: 5.6 7 Stable tag: 1.0.1 87 Stable tag: 1.0.19 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 38 38 39 39 == Changelog == 40 41 = 1.0.19 - 2021-02-02 = 42 * Feature: Support for Elementor Landing Page templates 43 * Feature: Elementor compatibility check 40 44 41 45 = 1.0.18 - 2020-12-24 = -
template-kit-export/trunk/admin/assets/js/template-kit-export-admin.js
r2451574 r2467674 92 92 function () { 93 93 // We set multiple to false so only get one image from the uploader 94 var uploaded_img_meta = file_frame.state().get( 'selection' ).first().toJSON();95 var thumbnail_url = '';96 var thumbnailWidth = parseInt( window.template_kit_export.thumbnail_width );94 var uploaded_img_meta = file_frame.state().get( 'selection' ).first().toJSON(); 95 var thumbnail_url = ''; 96 var thumbnailWidth = parseInt( window.template_kit_export.thumbnail_width ); 97 97 var minimumValidThumbnailWidth = 300 98 98 if ( ! uploaded_img_meta['sizes']['tk_preview'] || uploaded_img_meta['sizes']['tk_preview']['width'] < minimumValidThumbnailWidth) { -
template-kit-export/trunk/admin/class-template-kit-export-admin.php
r2451574 r2467674 93 93 94 94 wp_register_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'assets/js/template-kit-export-admin.min.js', array( 'jquery' ), $this->version, false ); 95 wp_localize_script( $this->plugin_name, 'template_kit_export', [ 96 'thumbnail_width' => TEMPLATE_KIT_EXPORT_THUMBNAIL_WIDTH 97 ]); 95 wp_localize_script( 96 $this->plugin_name, 97 'template_kit_export', 98 array( 99 'thumbnail_width' => TEMPLATE_KIT_EXPORT_THUMBNAIL_WIDTH, 100 ) 101 ); 98 102 wp_enqueue_script( $this->plugin_name ); 99 103 … … 604 608 * Allows us to run some code on initial plugin activation and version upgrade 605 609 */ 606 public function version_upgrade_check( ) {610 public function version_upgrade_check() { 607 611 if ( Template_Kit_Export_Options::get( 'plugin_version' ) !== TEMPLATE_KIT_EXPORT_VERSION ) { 608 612 // Force WordPress to rebuild rewrite rules completely: -
template-kit-export/trunk/admin/partials/template-kit-export-step-4.php
r2298141 r2467674 66 66 <strong>ThemeForest item page HTML:</strong> 67 67 <br/> 68 <textarea name="themeforest_markup" class="markup-textbox" onclick="this.focus();this.select()" readonly="readonly"><?php echo esc_textarea( $exporter->generate_item_page_markup( 'themeforest' ));?></textarea>68 <textarea name="themeforest_markup" class="markup-textbox" onclick="this.focus();this.select()" readonly="readonly"><?php echo esc_textarea( $exporter->generate_item_page_markup( 'themeforest' ) ); ?></textarea> 69 69 </p> 70 70 <p> 71 71 <strong>Envato Elements item page markdown:</strong> 72 72 <br/> 73 <textarea name="elements_markup" class="markup-textbox" onclick="this.focus();this.select()" readonly="readonly"><?php echo esc_textarea( $exporter->generate_item_page_markup( 'elements' ));?></textarea>73 <textarea name="elements_markup" class="markup-textbox" onclick="this.focus();this.select()" readonly="readonly"><?php echo esc_textarea( $exporter->generate_item_page_markup( 'elements' ) ); ?></textarea> 74 74 </p> 75 75 </div> -
template-kit-export/trunk/builders/class-template-kit-export-builders-base.php
r2451574 r2467674 611 611 if ( ! $image['filename'] ) { 612 612 $image_errors[] = 'Sorry we cannot find an image filename.'; 613 } else if ( stripos( $image['filename'], '.svg' ) !== false ) {613 } elseif ( stripos( $image['filename'], '.svg' ) !== false ) { 614 614 $image_errors[] = 'Sorry SVG images are not allowed due to security and other limitations when customers try to import them. Please swap to a PNG instead.'; 615 615 } -
template-kit-export/trunk/builders/class-template-kit-export-builders-elementor.php
r2414939 r2467674 58 58 if ( empty( $template_data['content'] ) ) { 59 59 // Kit styles have empty content, so we allow for exporting them here. 60 // return new WP_Error( 'empty_template', 'The template is empty' );60 // return new WP_Error( 'empty_template', 'The template is empty' ); 61 61 } 62 62 … … 288 288 'single-product' => __( 'Single: Product', 'template-kit-export' ), 289 289 'single-404' => __( 'Single: 404', 'template-kit-export' ), 290 'landing-page' => __( 'Single: Landing Page', 'template-kit-export' ), 290 291 'archive-blog' => __( 'Archive: Blog', 'template-kit-export' ), 291 292 'archive-product' => __( 'Archive: Product', 'template-kit-export' ), … … 534 535 } 535 536 537 // Now we look for Elementor Landing Page templates as well. 538 // These templates are stored under their own Custom Post Type called "e-landing-page" 539 $landing_page_templates = get_posts( 540 array( 541 'post_type' => 'e-landing-page', 542 'numberposts' => - 1, 543 ) 544 ); 545 foreach ( $landing_page_templates as $landing_page_template ) { 546 $template_meta_data = get_post_meta( $landing_page_template->ID, 'envato_tk_post_meta', true ); 547 if ( ! is_array( $template_meta_data ) ) { 548 $template_meta_data = array(); 549 } 550 // We export this as a 'page' template so it shows up correctly when imported into Elementor library at other end 551 $template_meta_data['elementor_library_type'] = 'page'; 552 553 if ( $only_include_final_zip_templates && empty( $template_meta_data['include_in_zip'] ) ) { 554 // We don't want this template in the zip 555 } else { 556 $templates[] = array( 557 'id' => $landing_page_template->ID, 558 'name' => $landing_page_template->post_title, 559 'zip_filename' => 'templates/' . $this->sanitise_filename( $landing_page_template->post_title ) . '.json', 560 'include_in_zip' => ! empty( $template_meta_data['include_in_zip'] ), 561 'metadata' => $template_meta_data, 562 'preview_url' => get_permalink( $landing_page_template->ID ), 563 'order' => $landing_page_template->menu_order, 564 ); 565 } 566 } 567 536 568 if ( defined( 'ELEMENTOR_PRO_VERSION' ) ) { 537 569 // Now we look for Elementor Pro Theme Builder templates as well: -
template-kit-export/trunk/languages/template-kit-export.pot
r2451574 r2467674 17 17 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 18 18 19 #: admin/class-template-kit-export-admin.php:12 119 #: admin/class-template-kit-export-admin.php:125 20 20 msgid "Template Kits" 21 21 msgstr "" 22 22 23 #: admin/class-template-kit-export-admin.php:12 223 #: admin/class-template-kit-export-admin.php:126 24 24 msgid "Template Kit" 25 25 msgstr "" 26 26 27 #: admin/class-template-kit-export-admin.php:13 2, admin/class-template-kit-export-admin.php:13327 #: admin/class-template-kit-export-admin.php:136, admin/class-template-kit-export-admin.php:137 28 28 msgid "Export" 29 29 msgstr "" 30 30 31 #: admin/class-template-kit-export-admin.php:14 1, admin/class-template-kit-export-admin.php:142, includes/class-template-kit-export-cpt.php:41, includes/class-template-kit-export-cpt.php:43, includes/class-template-kit-export-cpt.php:5731 #: admin/class-template-kit-export-admin.php:145, admin/class-template-kit-export-admin.php:146, includes/class-template-kit-export-cpt.php:41, includes/class-template-kit-export-cpt.php:43, includes/class-template-kit-export-cpt.php:57 32 32 msgid "Templates" 33 33 msgstr "" … … 90 90 msgstr "" 91 91 92 #: builders/class-template-kit-export-builders-base.php:538, builders/class-template-kit-export-builders-elementor.php:32 892 #: builders/class-template-kit-export-builders-base.php:538, builders/class-template-kit-export-builders-elementor.php:329 93 93 msgid "Include Template in Export ZIP" 94 94 msgstr "" … … 127 127 128 128 #: builders/class-template-kit-export-builders-elementor.php:290 129 msgid "Single: Landing Page" 130 msgstr "" 131 132 #: builders/class-template-kit-export-builders-elementor.php:291 129 133 msgid "Archive: Blog" 130 134 msgstr "" 131 135 132 #: builders/class-template-kit-export-builders-elementor.php:29 1136 #: builders/class-template-kit-export-builders-elementor.php:292 133 137 msgid "Archive: Product" 134 138 msgstr "" 135 139 136 #: builders/class-template-kit-export-builders-elementor.php:29 2140 #: builders/class-template-kit-export-builders-elementor.php:293 137 141 msgid "Archive: Search" 138 142 msgstr "" 139 143 140 #: builders/class-template-kit-export-builders-elementor.php:29 3144 #: builders/class-template-kit-export-builders-elementor.php:294 141 145 msgid "Archive: Category" 142 146 msgstr "" 143 147 144 #: builders/class-template-kit-export-builders-elementor.php:29 7148 #: builders/class-template-kit-export-builders-elementor.php:298 145 149 msgid "Section / Block" 146 150 msgstr "" 147 151 148 #: builders/class-template-kit-export-builders-elementor.php: 299152 #: builders/class-template-kit-export-builders-elementor.php:300 149 153 msgid "Header" 150 154 msgstr "" 151 155 152 #: builders/class-template-kit-export-builders-elementor.php:30 0156 #: builders/class-template-kit-export-builders-elementor.php:301 153 157 msgid "Footer" 154 158 msgstr "" 155 159 156 #: builders/class-template-kit-export-builders-elementor.php:30 1160 #: builders/class-template-kit-export-builders-elementor.php:302 157 161 msgid "Popup" 158 162 msgstr "" 159 163 160 #: builders/class-template-kit-export-builders-elementor.php:30 2164 #: builders/class-template-kit-export-builders-elementor.php:303 161 165 msgid "Hero" 162 166 msgstr "" 163 167 164 #: builders/class-template-kit-export-builders-elementor.php:30 3168 #: builders/class-template-kit-export-builders-elementor.php:304 165 169 msgid "About" 166 170 msgstr "" 167 171 168 #: builders/class-template-kit-export-builders-elementor.php:30 4172 #: builders/class-template-kit-export-builders-elementor.php:305 169 173 msgid "FAQ" 170 174 msgstr "" 171 175 172 #: builders/class-template-kit-export-builders-elementor.php:30 5176 #: builders/class-template-kit-export-builders-elementor.php:306 173 177 msgid "Contact" 174 178 msgstr "" 175 179 176 #: builders/class-template-kit-export-builders-elementor.php:30 6180 #: builders/class-template-kit-export-builders-elementor.php:307 177 181 msgid "Call to Action" 178 182 msgstr "" 179 183 180 #: builders/class-template-kit-export-builders-elementor.php:30 7184 #: builders/class-template-kit-export-builders-elementor.php:308 181 185 msgid "Team" 182 186 msgstr "" 183 187 184 #: builders/class-template-kit-export-builders-elementor.php:30 8188 #: builders/class-template-kit-export-builders-elementor.php:309 185 189 msgid "Map" 186 190 msgstr "" 187 191 188 #: builders/class-template-kit-export-builders-elementor.php:3 09192 #: builders/class-template-kit-export-builders-elementor.php:310 189 193 msgid "Features" 190 194 msgstr "" 191 195 192 #: builders/class-template-kit-export-builders-elementor.php:31 0196 #: builders/class-template-kit-export-builders-elementor.php:311 193 197 msgid "Pricing" 194 198 msgstr "" 195 199 196 #: builders/class-template-kit-export-builders-elementor.php:31 1200 #: builders/class-template-kit-export-builders-elementor.php:312 197 201 msgid "Testimonial" 198 202 msgstr "" 199 203 200 #: builders/class-template-kit-export-builders-elementor.php:31 2204 #: builders/class-template-kit-export-builders-elementor.php:313 201 205 msgid "Product" 202 206 msgstr "" 203 207 204 #: builders/class-template-kit-export-builders-elementor.php:31 3208 #: builders/class-template-kit-export-builders-elementor.php:314 205 209 msgid "Services" 206 210 msgstr "" 207 211 208 #: builders/class-template-kit-export-builders-elementor.php:31 4212 #: builders/class-template-kit-export-builders-elementor.php:315 209 213 msgid "Stats" 210 214 msgstr "" 211 215 212 #: builders/class-template-kit-export-builders-elementor.php:31 5216 #: builders/class-template-kit-export-builders-elementor.php:316 213 217 msgid "Countdown" 214 218 msgstr "" 215 219 216 #: builders/class-template-kit-export-builders-elementor.php:31 6220 #: builders/class-template-kit-export-builders-elementor.php:317 217 221 msgid "Portfolio" 218 222 msgstr "" 219 223 220 #: builders/class-template-kit-export-builders-elementor.php:31 7224 #: builders/class-template-kit-export-builders-elementor.php:318 221 225 msgid "Gallery" 222 226 msgstr "" 223 227 224 #: builders/class-template-kit-export-builders-elementor.php:31 8228 #: builders/class-template-kit-export-builders-elementor.php:319 225 229 msgid "Logo Grid" 226 230 msgstr "" 227 231 228 #: builders/class-template-kit-export-builders-elementor.php:3 19232 #: builders/class-template-kit-export-builders-elementor.php:320 229 233 msgid "Clients" 230 234 msgstr "" 231 235 232 #: builders/class-template-kit-export-builders-elementor.php:32 0236 #: builders/class-template-kit-export-builders-elementor.php:321 233 237 msgid "Other" 234 238 msgstr "" 235 239 236 #: builders/class-template-kit-export-builders-elementor.php:32 3240 #: builders/class-template-kit-export-builders-elementor.php:324 237 241 msgid "Global Kit Styles" 238 242 msgstr "" 239 243 240 #: builders/class-template-kit-export-builders-elementor.php:33 3244 #: builders/class-template-kit-export-builders-elementor.php:334 241 245 msgid "Elementor Pro Required" 242 246 msgstr "" 243 247 244 #: builders/class-template-kit-export-builders-elementor.php:47 3248 #: builders/class-template-kit-export-builders-elementor.php:474 245 249 msgid "Please install the \"Elementor\" Plugin to continue." 246 250 msgstr "" 247 251 248 #: builders/class-template-kit-export-builders-elementor.php:47 7252 #: builders/class-template-kit-export-builders-elementor.php:478 249 253 msgid "Please ensure the \"Hello Elementor\" theme is installed and active on this site." 250 254 msgstr "" -
template-kit-export/trunk/template-kit-export.php
r2451574 r2467674 3 3 * Plugin Name: Template Kit Export 4 4 * Description: Use this plugin to export Template Kits for Elementor. 5 * Version: 1.0.1 85 * Version: 1.0.19 6 6 * Author: Envato 7 7 * Author URI: https://envato.com … … 9 9 * License URI: https://www.gnu.org/licenses/gpl-3.0.html 10 10 * Text Domain: template-kit-export 11 * Elementor tested up to: 3.2.0 12 * Elementor Pro tested up to: 3.1.0 11 13 */ 12 14 … … 19 21 * Currently plugin version. 20 22 */ 21 define( 'TEMPLATE_KIT_EXPORT_VERSION', '1.0.1 8' );23 define( 'TEMPLATE_KIT_EXPORT_VERSION', '1.0.19' ); 22 24 23 25 /**
Note: See TracChangeset
for help on using the changeset viewer.