Changeset 1978430
- Timestamp:
- 11/21/2018 08:22:22 PM (7 years ago)
- Location:
- hiweb-migration-simple/trunk/inc
- Files:
-
- 4 edited
-
hiweb_migration_simple.js (modified) (1 diff)
-
hiweb_migration_simple.php (modified) (2 diffs)
-
hooks.php (modified) (1 diff)
-
tools.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
hiweb-migration-simple/trunk/inc/hiweb_migration_simple.js
r1978423 r1978430 8 8 console.info('reload...'); 9 9 $('[data-button-reload]').show('slow'); 10 //location.reload();10 location.reload(); 11 11 } else { 12 12 alert(response.data); -
hiweb-migration-simple/trunk/inc/hiweb_migration_simple.php
r1978423 r1978430 26 26 update_option( HW_MIGRATION_SIMPLE_PREFIX . '_basedir', tools::get_base_dir() ); 27 27 } elseif( self::is_trigger() && !wp_doing_ajax() && !wp_doing_cron() ) { 28 //TODO!29 28 include HW_MIGRATION_SIMPLE_DIR . '/template/frontend.php'; 30 //hiweb_migration_simple()->do_site_migrate();31 29 die; 32 30 } … … 54 52 update_option( HW_MIGRATION_SIMPLE_PREFIX . '_basedir', $baseDir ); 55 53 update_option( HW_MIGRATION_SIMPLE_PREFIX . '_basedir_old', $oldBaseDir ); 56 if( trim( $oldUrl ) == '' ) $oldUrl = get_option( 'siteurl' ); 54 update_option( HW_MIGRATION_SIMPLE_PREFIX . '_baseurl', tools::get_base_url() ); 55 update_option( HW_MIGRATION_SIMPLE_PREFIX . '_baseurl_old', tools::get_wp_old_base_url() ); 56 if( trim( $oldUrl ) == '' ) $oldUrl = tools::get_wp_old_base_url(); 57 57 if( trim( $newUrl ) == '' ) $newUrl = tools::get_base_url(); 58 58 /// -
hiweb-migration-simple/trunk/inc/hooks.php
r1978423 r1978430 65 65 } 66 66 if( trim( $old_domain ) == '' ){ 67 $old_domain = get_option( 'siteurl');67 $old_domain = tools::get_wp_old_base_url(); 68 68 $_POST['old_domain'] = $old_domain; 69 69 } -
hiweb-migration-simple/trunk/inc/tools.php
r1978423 r1978430 115 115 116 116 /** 117 * Get current wp site url 118 * @return string 119 */ 120 static function get_wp_old_base_url(){ 121 return get_option( 'siteurl' ); 122 } 123 124 125 /** 117 126 * @return string 118 127 */
Note: See TracChangeset
for help on using the changeset viewer.