Changeset 2895153
- Timestamp:
- 04/06/2023 04:18:51 PM (3 years ago)
- Location:
- advanced-import
- Files:
-
- 39 added
- 4 edited
-
tags/1.4.0 (added)
-
tags/1.4.0/LICENSE.txt (added)
-
tags/1.4.0/admin (added)
-
tags/1.4.0/admin/class-advanced-import-admin.php (added)
-
tags/1.4.0/admin/class-advanced-import-tracking.php (added)
-
tags/1.4.0/admin/class-elementor-import.php (added)
-
tags/1.4.0/admin/class-reset.php (added)
-
tags/1.4.0/admin/index.php (added)
-
tags/1.4.0/advanced-import.php (added)
-
tags/1.4.0/assets (added)
-
tags/1.4.0/assets/css (added)
-
tags/1.4.0/assets/css/advanced-import-admin.min.css (added)
-
tags/1.4.0/assets/js (added)
-
tags/1.4.0/assets/js/advanced-import-admin.min.js (added)
-
tags/1.4.0/assets/library (added)
-
tags/1.4.0/assets/library/isotope (added)
-
tags/1.4.0/assets/library/isotope/isotope.pkgd.min.js (added)
-
tags/1.4.0/assets/library/sweetalert2 (added)
-
tags/1.4.0/assets/library/sweetalert2/sweetalert2.all.js (added)
-
tags/1.4.0/assets/library/sweetalert2/sweetalert2.all.min.js (added)
-
tags/1.4.0/example.php (added)
-
tags/1.4.0/includes (added)
-
tags/1.4.0/includes/class-advanced-import-activator.php (added)
-
tags/1.4.0/includes/class-advanced-import-cron.php (added)
-
tags/1.4.0/includes/class-advanced-import-deactivator.php (added)
-
tags/1.4.0/includes/class-advanced-import-i18n.php (added)
-
tags/1.4.0/includes/class-advanced-import-loader.php (added)
-
tags/1.4.0/includes/class-advanced-import.php (added)
-
tags/1.4.0/includes/class-theme-template-library-base.php (added)
-
tags/1.4.0/includes/functions-advanced-import.php (added)
-
tags/1.4.0/includes/index.php (added)
-
tags/1.4.0/includes/theme-template-library (added)
-
tags/1.4.0/includes/theme-template-library/acmethemes.php (added)
-
tags/1.4.0/includes/theme-template-library/cosmoswp.php (added)
-
tags/1.4.0/index.php (added)
-
tags/1.4.0/languages (added)
-
tags/1.4.0/languages/advanced-import.pot (added)
-
tags/1.4.0/readme.txt (added)
-
tags/1.4.0/uninstall.php (added)
-
trunk/admin/class-advanced-import-admin.php (modified) (6 diffs)
-
trunk/advanced-import.php (modified) (2 diffs)
-
trunk/includes/functions-advanced-import.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
advanced-import/trunk/admin/class-advanced-import-admin.php
r2822658 r2895153 1199 1199 1200 1200 /*Move to Trash default page and post*/ 1201 $sample_page = get_page_by_title( 'Sample Page', OBJECT, 'page' );1202 $hello_world_post = get_page_by_title( 'Hello world!', OBJECT, 'post' );1201 $sample_page = advanced_import_get_post_by_title( 'Sample Page', 'page' ); 1202 $hello_world_post = advanced_import_get_post_by_title( 'Hello world!', 'post' ); 1203 1203 if ( is_object( $sample_page ) ) { 1204 1204 wp_trash_post( $sample_page->ID ); … … 1225 1225 $this_content = $content[ $content_slug ]; 1226 1226 1227 if ( isset( $_POST['proceed'] ) ) {1227 if ( isset( $_POST['proceed'] ) || apply_filters( 'advanced_import_force_proceed', false ) ) { 1228 1228 1229 1229 /*install the content*/ … … 1243 1243 * import_menu_and_options 1244 1244 * */ 1245 if ( $result = call_user_func( $this_content['install_callback'] ) ) { 1245 if ( call_user_func( $this_content['install_callback'] ) ) { 1246 $result = call_user_func( $this_content['install_callback'] ); 1246 1247 1247 1248 $this->log( esc_html__( 'Finish writing ', 'advanced-import' ) . count( $this->delay_posts, COUNT_RECURSIVE ) . esc_html__( ' delayed posts to transient ', 'advanced-import' ) ); … … 1323 1324 1324 1325 /*Import 10 posts at a time*/ 1325 $limit = 10 + ( isset( $_REQUEST['retry_count'] ) ? absint( $_REQUEST['retry_count']) : 0 );1326 $limit = 10 + ( isset( $_REQUEST['retry_count'] ) ? absint( $_REQUEST['retry_count'] ) : 0 ); 1326 1327 1327 1328 $limit = apply_filters( 'advanced_import_limit_at_time', $limit ); … … 2281 2282 } 2282 2283 2283 /*check if string is json*/ 2284 /** 2285 * Check if string is json. 2286 * 2287 * @since 1.0.0 2288 * @access public 2289 * 2290 * @param string $string ceck if valid JSON. 2291 * @return boolean 2292 */ 2284 2293 function isJson( $string ) { 2285 $test_json = @json_decode( $string, true ); 2294 $test_json = $string; 2295 if ( is_string($string) ) { 2296 $test_json = json_decode( $string, true ); 2297 } 2286 2298 if ( is_array( $test_json ) ) { 2287 2299 return true; … … 2423 2435 $message .= '</div>'; 2424 2436 2425 apply_filters( 'advanced_import_complete_message', $message );2437 $message = apply_filters( 'advanced_import_complete_message', $message ); 2426 2438 2427 2439 do_action( 'advanced_import_before_complete_screen' ); -
advanced-import/trunk/advanced-import.php
r2822658 r2895153 15 15 * Plugin URI: https://addonspress.com/item/advanced-import 16 16 * Description: Easily import demo data starter site packages or Migrate your site data 17 * Version: 1. 3.917 * Version: 1.4.0 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. 3.9' );27 define( 'ADVANCED_IMPORT_VERSION', '1.4.0' ); 28 28 define( 'ADVANCED_IMPORT_PLUGIN_NAME', 'advanced-import' ); 29 29 define( 'ADVANCED_IMPORT_PATH', plugin_dir_path( __FILE__ ) ); -
advanced-import/trunk/includes/functions-advanced-import.php
r2732013 r2895153 70 70 return $bytes; 71 71 } 72 73 function advanced_import_get_post_by_title( $title, $post_type = 'page' ) { 74 $args = array( 75 'post_type' => $post_type, 76 'post_status' => 'publish', 77 'posts_per_page' => 1, 78 'title' => $title, 79 ); 80 $query = new WP_Query( $args ); 81 if ( $query->have_posts() ) { 82 $query->the_post(); 83 $post = get_post(); 84 wp_reset_postdata(); 85 return $post; 86 } 87 return false; 88 } -
advanced-import/trunk/readme.txt
r2822658 r2895153 5 5 Tags: import, advanced import, demo import, theme import, widget import, customizer import 6 6 Requires at least: 5.0 7 Tested up to: 6. 17 Tested up to: 6.2 8 8 Requires PHP: 5.6.20 9 Stable tag: 1. 3.99 Stable tag: 1.4.0 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 225 225 == Changelog == 226 226 227 = 1.4.0 - 2023-04-06 = 228 * Added: New hook `advanced_import_force_proceed` 229 * Updated : Tested up WordPress 6.2 230 * Fixed : [isJson](https://wordpress.org/support/topic/function-isjson-string-causes-fatal-error/) 231 227 232 = 1.3.9 - 2022-11-23 = 228 233 * Added : Missing check_admin_referer in one place
Note: See TracChangeset
for help on using the changeset viewer.