Skip to content

Commit 76e809f

Browse files
author
Luke Carbis
committed
Remove migration
1 parent 6e91839 commit 76e809f

File tree

8 files changed

+165
-756
lines changed

8 files changed

+165
-756
lines changed

classes/class-admin.php

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ class Admin {
2424
*/
2525
public $live_update;
2626

27-
/**
28-
* @var Migrate
29-
*/
30-
public $migrate;
31-
3227
/**
3328
* Menu page screen id
3429
*
@@ -183,7 +178,6 @@ public function __construct( $plugin ) {
183178
public function init() {
184179
$this->network = new Network( $this->plugin );
185180
$this->live_update = new Live_Update( $this->plugin );
186-
$this->migrate = new Migrate( $this->plugin );
187181
}
188182

189183
/**
@@ -394,32 +388,6 @@ public function admin_enqueue_scripts( $hook ) {
394388
);
395389
}
396390

397-
if ( $this->migrate->show_migrate_notice() ) {
398-
$limit = absint( $this->migrate->limit );
399-
$record_count = absint( $this->migrate->record_count );
400-
$chunks = ceil( $record_count / $limit );
401-
$estimated_time = ( $chunks > 1 ) ? round( ( $chunks * 5 ) / 60 ) : 0;
402-
$migrate_time_message = ( $estimated_time > 1 ) ? sprintf( esc_html__( 'This will take about %d minutes.', 'stream' ), absint( $estimated_time ) ) : esc_html__( 'This could take a few minutes.', 'stream' );
403-
404-
wp_enqueue_script( 'wp-stream-migrate', $this->plugin->locations['url'] . 'ui/js/migrate.js', array( 'jquery' ), $this->plugin->get_version() );
405-
wp_localize_script(
406-
'wp-stream-migrate',
407-
'wp_stream_migrate',
408-
array(
409-
'i18n' => array(
410-
'migrate_process_title' => esc_html__( 'Migrating Stream Records', 'stream' ),
411-
'ignore_migrate_title' => esc_html__( 'No Records Were Migrated', 'stream' ),
412-
'migrate_process_message' => esc_html__( 'Please do not exit this page until the process has completed.', 'stream' ) . ' ' . esc_html( $migrate_time_message ),
413-
'confirm_start_migrate' => ( $estimated_time > 1 ) ? sprintf( esc_html__( 'Please note: This process will take about %d minutes to complete.', 'stream' ), absint( $estimated_time ) ) : esc_html__( 'Please note: This process could take a few minutes to complete.', 'stream' ),
414-
'confirm_migrate_reminder' => esc_html__( 'Please note: Your existing records will not appear in Stream until you have migrated them to your local database.', 'stream' ),
415-
'confirm_ignore_migrate' => sprintf( esc_html__( 'Are you sure you want to lose all %s existing Stream records without migrating?', 'stream' ), number_format( $record_count ), ( $estimated_time > 1 && is_multisite() ) ? sprintf( esc_html__( 'about %d', 'stream' ), absint( $estimated_time ) ) : esc_html__( 'a few', 'stream' ) ),
416-
),
417-
'chunks' => absint( $chunks ),
418-
'nonce' => wp_create_nonce( 'wp_stream_migrate-' . absint( get_current_blog_id() ) . absint( get_current_user_id() ) ),
419-
)
420-
);
421-
}
422-
423391
/**
424392
* The maximum number of items that can be updated in bulk without receiving a warning.
425393
*

0 commit comments

Comments
 (0)