Changeset 3222391
- Timestamp:
- 01/14/2025 04:13:12 PM (15 months ago)
- Location:
- advanced-import
- Files:
-
- 40 added
- 3 edited
-
tags/1.4.5 (added)
-
tags/1.4.5/LICENSE.txt (added)
-
tags/1.4.5/admin (added)
-
tags/1.4.5/admin/class-advanced-import-admin.php (added)
-
tags/1.4.5/admin/class-advanced-import-tracking.php (added)
-
tags/1.4.5/admin/class-elementor-import.php (added)
-
tags/1.4.5/admin/class-reset.php (added)
-
tags/1.4.5/admin/index.php (added)
-
tags/1.4.5/advanced-import.php (added)
-
tags/1.4.5/assets (added)
-
tags/1.4.5/assets/css (added)
-
tags/1.4.5/assets/css/advanced-import-admin.min.css (added)
-
tags/1.4.5/assets/js (added)
-
tags/1.4.5/assets/js/advanced-import-admin.min.js (added)
-
tags/1.4.5/assets/library (added)
-
tags/1.4.5/assets/library/isotope (added)
-
tags/1.4.5/assets/library/isotope/isotope.pkgd.min.js (added)
-
tags/1.4.5/assets/library/sweetalert2 (added)
-
tags/1.4.5/assets/library/sweetalert2/sweetalert2.all.js (added)
-
tags/1.4.5/assets/library/sweetalert2/sweetalert2.all.min.js (added)
-
tags/1.4.5/example.php (added)
-
tags/1.4.5/includes (added)
-
tags/1.4.5/includes/class-advanced-import-activator.php (added)
-
tags/1.4.5/includes/class-advanced-import-cron.php (added)
-
tags/1.4.5/includes/class-advanced-import-deactivator.php (added)
-
tags/1.4.5/includes/class-advanced-import-i18n.php (added)
-
tags/1.4.5/includes/class-advanced-import-loader.php (added)
-
tags/1.4.5/includes/class-advanced-import.php (added)
-
tags/1.4.5/includes/class-theme-template-library-base.php (added)
-
tags/1.4.5/includes/functions-advanced-import.php (added)
-
tags/1.4.5/includes/index.php (added)
-
tags/1.4.5/includes/theme-template-library (added)
-
tags/1.4.5/includes/theme-template-library/acmethemes.php (added)
-
tags/1.4.5/includes/theme-template-library/cosmoswp.php (added)
-
tags/1.4.5/includes/theme-template-library/patternswp.php (added)
-
tags/1.4.5/index.php (added)
-
tags/1.4.5/languages (added)
-
tags/1.4.5/languages/advanced-import.pot (added)
-
tags/1.4.5/readme.txt (added)
-
tags/1.4.5/uninstall.php (added)
-
trunk/admin/class-advanced-import-admin.php (modified) (4 diffs)
-
trunk/advanced-import.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
advanced-import/trunk/admin/class-advanced-import-admin.php
r3140716 r3222391 1085 1085 1086 1086 } 1087 /*Put nav last*/1087 /*Put nav 1last*/ 1088 1088 $nav = isset( $content['nav_menu_item'] ) ? $content['nav_menu_item'] : array(); 1089 1089 if ( $nav ) { 1090 1090 unset( $content['nav_menu_item'] ); 1091 1091 $content['nav_menu_item'] = $nav; 1092 } 1093 1094 /* 1095 Put last*/ 1096 /*For Gutenberg navigation*/ 1097 $nav = isset( $content['wp_navigation'] ) ? $content['wp_navigation'] : array(); 1098 if ( $nav ) { 1099 unset( $content['wp_navigation'] ); 1100 $content['wp_navigation'] = $nav; 1101 } 1102 1103 $template_part = isset( $content['wp_template_part'] ) ? $content['wp_template_part'] : array(); 1104 if ( $template_part ) { 1105 unset( $content['wp_template_part'] ); 1106 $content['wp_template_part'] = $template_part; 1092 1107 } 1093 1108 /*check if there is files*/ … … 2015 2030 } 2016 2031 } 2032 2033 /*Gutenberg ref id changed*/ 2034 if ( preg_match_all( '/\{"ref":(\d+)\}/', $content, $matches ) ) { 2035 foreach ( $matches[0] as $match_id => $string ) { 2036 $new_id = $this->imported_post_id( $matches[1][ $match_id ] ); 2037 if ( $new_id ) { 2038 $content = str_replace( $string, '{"ref":' . $new_id . '}', $content ); 2039 } 2040 } 2041 } 2042 /* Replace for menu item like "page","id":147 */ 2043 if ( preg_match_all( '/"page","id":(\d+)/', $content, $matches ) ) { 2044 foreach ( $matches[0] as $match_id => $string ) { 2045 $old_id = $matches[1][ $match_id ]; 2046 $new_id = $this->imported_post_id( $old_id ); 2047 if ( $new_id ) { 2048 $content = str_replace( $string, '"page","id":' . $new_id, $content ); 2049 } 2050 } 2051 } 2052 2053 $replaced_data = apply_filters( 2054 'advanced_import_replace_content_string', 2055 $content 2056 ); 2017 2057 return $content; 2018 2058 } … … 2339 2379 2340 2380 /*menu data*/ 2341 $menu_ids = $theme_options['menu'];2381 $menu_ids = isset( $theme_options['menu'] ) ? $theme_options['menu'] : array(); 2342 2382 2343 2383 /*we also want to update the widget area manager options.*/ … … 2379 2419 Menu Start*/ 2380 2420 $save = array(); 2381 foreach ( $menu_ids as $menu_id => $term_id ) { 2382 $new_term_id = $this->imported_term_id( $term_id ); 2383 if ( $new_term_id ) { 2384 $save[ $menu_id ] = $new_term_id; 2421 if ( $menu_ids ) { 2422 foreach ( $menu_ids as $menu_id => $term_id ) { 2423 $new_term_id = $this->imported_term_id( $term_id ); 2424 if ( $new_term_id ) { 2425 $save[ $menu_id ] = $new_term_id; 2426 } 2385 2427 } 2386 2428 } -
advanced-import/trunk/advanced-import.php
r3186508 r3222391 14 14 * Plugin Name: Advanced Import 15 15 * Plugin URI: https://addonspress.com/item/advanced-import 16 * Description: Easily import demo data starter site packages or Migrate your site data17 * Version: 1.4. 416 * Description: Easily import demo data for WordPress sites, including posts, pages, media, widgets, customizer settings, and Gutenberg Blocks with ease. 17 * Version: 1.4.5 18 18 * Author: AddonsPress 19 19 * Author URI: https://addonspress.com/ … … 25 25 26 26 /*Define Constants for this plugin*/ 27 define( 'ADVANCED_IMPORT_VERSION', '1.4. 4' );27 define( 'ADVANCED_IMPORT_VERSION', '1.4.5' ); 28 28 define( 'ADVANCED_IMPORT_PLUGIN_NAME', 'advanced-import' ); 29 29 define( 'ADVANCED_IMPORT_PATH', plugin_dir_path( __FILE__ ) ); -
advanced-import/trunk/readme.txt
r3186508 r3222391 1 === Advanced Import : One Click Import for WordPress or Theme Demo Data===2 3 Contributors: addonspress, codersantosh, acmeit 4 Donate link: https://addonspress.com/ 5 Tags: advanced import, demo import, theme import, widget import, customizer import6 Requires at least: 5.0 7 Tested up to: 6.7 8 Requires PHP: 5.6.20 9 Stable tag: 1.4. 410 License: GPLv2 or later 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html 12 13 Advanced Import is a very flexible plugin which convenient user to import site data( posts, page, media and even widget and customizer option ).1 === Advanced Import: One-Click Demo Import for WordPress === 2 3 Contributors: addonspress, codersantosh, acmeit 4 Donate link: https://addonspress.com/ 5 Tags: demo import, theme import, widget import, customizer import, gutenberg import 6 Requires at least: 5.0 7 Tested up to: 6.7 8 Requires PHP: 5.6.20 9 Stable tag: 1.4.5 10 License: GPLv2 or later 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html 12 13 Advanced Import simplifies importing demo data for WordPress sites, enabling users to import posts, pages, media, widgets, customizer settings, and Gutenberg Blocks with ease. 14 14 15 15 == Description == … … 17 17 Import Data or Demo Content which is exported by [Advanced Export](https://wordpress.org/plugins/advanced-export/) 18 18 19 Advanced Import is one of the best and powerful data importer plugin. It has several features which make more manageable and convenient to WordPress user to import their WordPress site data from another website. 20 21 It is designed specially for theme developer who wants to provide demo data to their customer but it can be used for migration purpose too. 22 23 While you use Demo Import features of themes, Advanced Import may fetches screenshots, images and templates(demo) JSON files from a respective theme site. This helps you to import your site with a single click. You must accept the terms and privacy of the themes you are using to use Demo Import ( Starter Sites Template Library ) Features. 24 25 View [Advanced Import](https://www.addonspress.com/wordpress-plugins/advanced-import/) Details and Documentation 26 27 Some listed features of Advanced Import are given below : 28 29 * Import demo starter sites very easily 30 * Import widget 31 * Import option 32 * Import media, 33 * Import pages, 34 * Import post 35 * Import custom post type 36 * Import actual media files 19 Advanced Import is the ultimate solution for WordPress theme and plugin developers who want to provide a seamless demo import experience for their users. With a simple one-click interface, it allows users to import demo content, widgets, customizer settings, and even Gutenberg block data effortlessly. 20 21 ### Key Features 22 - **One-Click Demo Import:** Easily import all demo content with a single click. 23 - **Customizer Settings Import:** Retain your theme's look and feel by importing customizer settings. 24 - **Widget Data Import:** Quickly set up widgets to match your demo layout. 25 - **Gutenberg Blocks Import:** Import block-based content for modern themes. 26 - **Media Files Import:** Seamlessly upload and integrate demo media. 27 - **Developer-Friendly Hooks:** Extend or customize the import process with available actions and filters. 28 29 ### Why Use Advanced Import? 30 Whether you're a theme developer offering demo content or a user setting up a site, Advanced Import makes the process hassle-free. It saves time, reduces manual setup effort, and ensures consistency between demo and live sites. 31 37 32 38 33 == Features for Theme Author == … … 40 35 * Code/Plugin example available 41 36 * Support for the premium version or premium plugin of the free theme 42 * Install separate dependent plugin/s for each demo starter package sof the theme43 * Categorized available demo import starter package sto type and categories37 * Install separate dependent plugin/s for each demo starter package of the theme 38 * Categorized available demo import starter package to type and categories 44 39 * Search filter keywords for demo starter packages 45 40 * Sufficient hooks to customize the plugin design and functionality … … 61 56 There are two ways to install any Advanced Import Plugin:- 62 57 1. Upload zip file from Dashboard->Plugin->Add New "upload plugin". 63 2. Extract Advanced Import and place d it tothe "/wp-content/plugins/" directory.58 2. Extract Advanced Import and place it in the "/wp-content/plugins/" directory. 64 59 - Activate the plugin through the "Plugins" menu in WordPress. 65 60 … … 67 62 == Frequently Asked Questions == 68 63 69 = Is Advanced Import isa free plugin? =64 = Is Advanced Import a free plugin? = 70 65 71 66 Yes, it is a free plugin. … … 78 73 79 74 Login to your WordPress dashboard, go to Appearance -> Demo Import. 80 You can also find Import zip options on WordPress dashboard -> Tools -> Advanced Import.75 You can also find Import zip options on the WordPress dashboard -> Tools -> Advanced Import. 81 76 82 77 = Do I need to check to include media while Export? = … … 89 84 First of all, you need to Export your theme demo data from your live demo site using [Advanced Export](https://wordpress.org/plugins/advanced-export/) plugin. 90 85 Export the zip file, it should contain 3 files content.json, options.json and widgets.json. 91 If you are submitting theme on WordPress dot org, you are not allowed to include Demo files ( XML, JSON, ZIP), You have to create a separate plugin for your theme/company. We would like to highly recommend to create a single plugin for your all themes. For other platforms, you may add code onyour theme.86 If you are submitting a theme on WordPress dot org, you are not allowed to include Demo files ( XML, JSON, ZIP), You have to create a separate plugin for your theme/company. We would like to highly recommend creating a single plugin for your all themes. For other platforms, you may add code to your theme. 92 87 Code Example : 88 93 89 ` 94 90 function prefix_demo_import_lists(){ … … 179 175 = Do I need to assign "Front page", "Posts page" and "Menu Locations" after the importer is done or do they automatically assign? = 180 176 181 You don't need to assign them manually, they will be automatically assigned. The me author also doesn't have to write additional code for it.182 183 = I am a theme author and I would like to customize it for my theme, Can you list hooks available on Advanced Import plugin? =184 185 Here are someimportant list of filter hooks:177 You don't need to assign them manually, they will be automatically assigned. The theme author also doesn't have to write additional code for it. 178 179 = I am a theme author and I would like to customize it for my theme, Can you list hooks available on theme Advanced Import plugin? = 180 181 Here is an important list of filter hooks: 186 182 187 183 - advanced_import_is_template_available … … 199 195 - advanced_import_update_value_['option-name'] 200 196 - advanced_import_menu_hook_suffix 201 202 Here are some important list of action hooks: 197 - advanced_import_replace_content_string 198 199 Here is an important list of action hooks: 203 200 204 201 - advanced_import_before_demo_import_screen … … 211 208 - advanced_import_after_complete_screen 212 209 213 = I would like to develop a companion/starter sites/toolset plugin for my theme/company, Do you have any starter plugin ? =214 215 We don't have any starter plugin but we have developed a plugin for [Acme Themes](https://www.acmethemes.com/). The plugin name is [Acme Demo Setup](https://wordpress.org/plugins/acme-demo-setup/), you can download and view the code of the plugin and develop one for yourself.216 217 = Are there any themes using these plugin ? =218 219 Yes, many themes are using this plugin, for anexample, you can look on [CosmosWP Theme](https://cosmoswp.com/)210 = I would like to develop a companion/starter sites/toolset plugin for my theme/company, Do you have any starter plugins? = 211 212 We don't have any starter plugin but we have developed a plugins for [Acme Themes](https://www.acmethemes.com/). The plugin name is [Acme Demo Setup](https://wordpress.org/plugins/acme-demo-setup/), you can download and view the code of the plugin and develop one for yourself. 213 214 = Are there any themes using these plugins? = 215 216 Yes, many themes are using this plugin, for example, you can look on [CosmosWP Theme](https://cosmoswp.com/) 220 217 221 218 == Screenshots == … … 230 227 == Changelog == 231 228 229 = 1.4.5 - 2025-01-14 = 230 * Added: Introduced support for Blocks Navigation feature. 231 * Added: Implemented a new filter hook `advanced_import_replace_content_string`. 232 * Updated: Enhanced plugin tagline title for clearer comprehension. 233 232 234 = 1.4.4 - 2024-11-12 = 233 235 * Added: Tested with the latest WordPress … … 238 240 239 241 = 1.4.2 - 2024-08-16 = 240 * Added: Developers can now enable plugin installation from a URL by including source in the demo list array. This is ideal for plugins hosted outside of WordPress.org. Important: If a recommended plugin is already available on WordPress.org, there's no need to use the "source" option.242 * Added: Developers can now enable plugin installation from a URL by including theme source in the demo list array. This is ideal for plugins hosted outside of WordPress.org. Important: If a recommended plugin is already available on WordPress.org, there's no need to use the "source" option. 241 243 242 244 `
Note: See TracChangeset
for help on using the changeset viewer.