Added dependency plugins
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
<div class="option-section backup-options" style="display: block;">
|
||||
<label for="create-backup" class="backup-checkbox checkbox-label">
|
||||
<input type="checkbox" id="create-backup" value="1" autocomplete="off" name="create_backup"<?php $this->maybe_checked( $loaded_profile['create_backup'] ); ?> />
|
||||
<span class="action-text pull"><?php _e( 'Backup the local database before replacing it', 'wp-migrate-db' ); ?></span>
|
||||
<span class="action-text push"><?php _e( 'Backup the remote database before replacing it', 'wp-migrate-db' ); ?></span>
|
||||
<span class="action-text find_replace"><?php _e( 'Backup the database before running the find & replace', 'wp-migrate-db' ); ?></span>
|
||||
<br/>
|
||||
<span class="option-description backup-description"><?php _e( 'An SQL file will be saved to', 'wp-migrate-db' ); ?> <span class="uploads-dir"><?php echo $this->get_short_uploads_dir(); ?></span></span>
|
||||
</label>
|
||||
|
||||
<div class="indent-wrap expandable-content">
|
||||
<ul>
|
||||
<li>
|
||||
<label for="backup-only-with-prefix">
|
||||
<input type="radio" id="backup-only-with-prefix" value="backup_only_with_prefix" name="backup_option"<?php echo( $loaded_profile['backup_option'] == 'backup_only_with_prefix' ? ' checked="checked"' : '' ); ?> >
|
||||
<?php _e( 'Backup all tables with prefix', 'wp-migrate-db' ); ?> "<span class="backup-table-prefix"><?php echo $wpdb->base_prefix; ?></span>"
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label for="backup-selected">
|
||||
<input type="radio" id="backup-selected" value="backup_selected" name="backup_option"<?php echo( $loaded_profile['backup_option'] == 'backup_selected' ? ' checked="checked"' : '' ); ?> >
|
||||
<?php _e( 'Backup only tables selected for migration', 'wp-migrate-db' ); ?>
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label for="backup-manual-select">
|
||||
<input type="radio" id="backup-manual-select" value="backup_manual_select" name="backup_option"<?php echo( $loaded_profile['backup_option'] == 'backup_manual_select' ? ' checked="checked"' : '' ); ?> >
|
||||
<?php _e( 'Backup only selected tables below', 'wp-migrate-db' ); ?>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="backup-tables-wrap select-wrap">
|
||||
<select multiple="multiple" name="select_backup[]" id="select-backup" class="multiselect">
|
||||
<?php foreach ( $this->get_table_sizes( 'backup' ) as $table => $size ) :
|
||||
$size = (int) $size * 1024;
|
||||
if ( ! empty( $loaded_profile['select_backup'] ) && in_array( $table, $loaded_profile['select_backup'] ) ) {
|
||||
printf( '<option value="%1$s" selected="selected">%1$s (%2$s)</option>', $table, size_format( $size ) );
|
||||
} else {
|
||||
printf( '<option value="%1$s">%1$s (%2$s)</option>', $table, size_format( $size ) );
|
||||
}
|
||||
endforeach; ?>
|
||||
</select>
|
||||
<br/>
|
||||
<a href="#" class="multiselect-select-all js-action-link"><?php _e( 'Select All', 'wp-migrate-db' ); ?></a>
|
||||
<span class="select-deselect-divider">/</span>
|
||||
<a href="#" class="multiselect-deselect-all js-action-link"><?php _e( 'Deselect All', 'wp-migrate-db' ); ?></a>
|
||||
<span class="select-deselect-divider">/</span>
|
||||
<a href="#" class="multiselect-invert-selection js-action-link"><?php _e( 'Invert Selection', 'wp-migrate-db' ); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<p class="backup-option-disabled inline-message error-notice notification-message" style="display: none;"><?php printf( __( 'The backup option has been disabled as your local uploads directory is currently not writeable. The following directory should have 755 permissions: <span class="upload-directory-location">%s</span></p>', 'wp-migrate-db' ), $this->get_upload_info( 'path' ) ); ?>
|
||||
</div>
|
||||
@@ -0,0 +1,12 @@
|
||||
<div class="updated warning inline-message">
|
||||
<p>
|
||||
<?php
|
||||
printf( __( 'We\'ve detected that <code>WP_HTTP_BLOCK_EXTERNAL</code> is enabled which will prevent WP Migrate DB Pro from functioning properly. You should either disable <code>WP_HTTP_BLOCK_EXTERNAL</code> or add any sites that you\'d like to migrate to or from with WP Migrate DB Pro to <code>WP_ACCESSIBLE_HOSTS</code> (api.deliciousbrains.com must be added to <code>WP_ACCESSIBLE_HOSTS</code> for the API to work). More information on this can be found <a href="%s" target="_blank">here</a>.', 'wp-migrate-db' ), 'https://deliciousbrains.com/wp-migrate-db-pro/doc/wp_http_block_external/' );
|
||||
?>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
/* translators: 1: Remind Me Later, 2: Dismiss */
|
||||
printf( _x( '%1$s | %2$s', 'Block External actions', 'wp-migrate-db' ), $reminder, $dismiss );
|
||||
?>
|
||||
</div>
|
||||
@@ -0,0 +1,17 @@
|
||||
<tr class="wpmdb-setting-title">
|
||||
<td colspan="2"><h3><?php _e( 'Connection Info', 'wp-migrate-db' ); ?></h3></td>
|
||||
</tr>
|
||||
<tr class="option-section connecton-info-wrap">
|
||||
<td colspan="2">
|
||||
<textarea id="connection_info" class="connection-info" readonly><?php echo $connection_info; ?></textarea>
|
||||
|
||||
<div class="reset-button-wrap clearfix">
|
||||
<a class="button copy-api-key js-action-link">
|
||||
<?php _e( 'Copy to Clipboard', 'wp-migrate-db' ); ?>
|
||||
<span class="copy-api-key-confirmation"><?php _e( 'Copied', 'wp-migrate-db' ); ?></span>
|
||||
</a>
|
||||
<a class="button reset-api-key js-action-link"><?php _e( 'Reset Secret Key', 'wp-migrate-db' ); ?></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<div class="option-section" style="display: block;">
|
||||
<label for="exclude-post-types" class="exclude-post-types-checkbox checkbox-label">
|
||||
<input type="checkbox" id="exclude-post-types" value="1" autocomplete="off" name="exclude_post_types"<?php $this->maybe_checked( $loaded_profile['exclude_post_types'] ); ?> />
|
||||
<?php _e( 'Exclude Post Types', 'wp-migrate-db' ); ?>
|
||||
</label>
|
||||
|
||||
<div class="indent-wrap expandable-content post-type-select-wrap" style="display: none;">
|
||||
<div class="select-post-types-wrap select-wrap">
|
||||
<div class="exclude-post-types-warning" style="display: none; opacity: 0;">
|
||||
<p>
|
||||
<span class="migrate-msg"><?php _e( 'WARNING: All of the following post types will be absent in the destination posts table after migration:', 'wp-migrate-db' ); ?></span>
|
||||
<span class="find-replace-msg"><?php _e( 'WARNING: The following post types will not be included in the find & replace:', 'wp-migrate-db' ); ?></span>
|
||||
<br>
|
||||
<span class="excluded-post-types">
|
||||
<?php
|
||||
if ( ! empty( $loaded_profile['select_post_types'] ) ) {
|
||||
echo '<code>' . implode( '</code>, <code>', array_map( 'esc_html', $loaded_profile['select_post_types'] ) ) . '</code>';
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<select multiple="multiple" name="select_post_types[]" id="select-post-types" class="multiselect" autocomplete="off">
|
||||
<?php foreach ( $this->get_post_types() as $post_type ) :
|
||||
if ( ! empty( $loaded_profile['select_post_types'] ) && in_array( $post_type, $loaded_profile['select_post_types'] ) ) {
|
||||
printf( '<option value="%1$s" selected="selected">%1$s</option>', $post_type );
|
||||
} else {
|
||||
printf( '<option value="%1$s">%1$s</option>', $post_type );
|
||||
}
|
||||
endforeach; ?>
|
||||
</select>
|
||||
<br/>
|
||||
<a href="#" class="multiselect-select-all js-action-link"><?php _e( 'Select All', 'wp-migrate-db' ); ?></a>
|
||||
<span class="select-deselect-divider">/</span>
|
||||
<a href="#" class="multiselect-deselect-all js-action-link"><?php _e( 'Deselect All', 'wp-migrate-db' ); ?></a>
|
||||
<span class="select-deselect-divider">/</span>
|
||||
<a href="#" class="multiselect-invert-selection js-action-link"><?php _e( 'Invert Selection', 'wp-migrate-db' ); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div class="notification-message warning-notice inline-message invalid-licence">
|
||||
<?php echo $this->get_licence_status_message(); ?>
|
||||
</div>
|
||||
@@ -0,0 +1,12 @@
|
||||
<div class="support">
|
||||
<h3><?php _e( 'Email Support', 'wp-migrate-db' ); ?></h3>
|
||||
|
||||
<div class="support-content">
|
||||
<?php if ( ! empty( $licence ) ) : ?>
|
||||
<p><?php _e( 'Fetching license details, please wait...', 'wp-migrate-db' ); ?></p>
|
||||
<?php else : ?>
|
||||
<p><?php _e( 'We couldn\'t find your license information. Please switch to the settings tab and enter your license.', 'wp-migrate-db' ); ?></p>
|
||||
<p><?php _e( 'Once completed, you may visit this tab to view your support details.', 'wp-migrate-db' ); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,24 @@
|
||||
<tr class="wpmdb-setting-title">
|
||||
<td colspan="2"><h3><?php _e( 'Your License', 'wp-migrate-db' ); ?></h3></td>
|
||||
</tr>
|
||||
<tr class="licence-form option-section licence-wrap" method="post" action="#settings">
|
||||
<td colspan="2">
|
||||
<?php if ( $this->is_licence_constant() ) : ?>
|
||||
<p>
|
||||
<?php _e( 'The license key is currently defined in wp-config.php.', 'wp-migrate-db' ); ?>
|
||||
</p>
|
||||
<?php else : ?>
|
||||
<?php if ( ! empty( $licence ) ) :
|
||||
echo $this->get_formatted_masked_licence();
|
||||
?>
|
||||
<p class="licence-status"></p>
|
||||
<?php else : ?>
|
||||
<div class="licence-not-entered">
|
||||
<input type="text" class="licence-input" autocomplete="off"/>
|
||||
<button class="button register-licence" type="button"><?php _e( 'Activate License', 'wp-migrate-db' ); ?></button>
|
||||
<p class="licence-status"></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
foreach ( $this->addons as $addon_basename => $addon ) :
|
||||
if ( false == $this->is_addon_outdated( $addon_basename ) || false == is_plugin_active( $addon_basename ) ) {
|
||||
continue;
|
||||
}
|
||||
$update_url = wp_nonce_url( network_admin_url( 'update.php?action=upgrade-plugin&plugin=' . urlencode( $addon_basename ) ), 'upgrade-plugin_' . $addon_basename );
|
||||
$addon_slug = current( explode( '/', $addon_basename ) );
|
||||
if ( isset( $GLOBALS['wpmdb_meta'][ $addon_slug ]['version'] ) ) {
|
||||
$version = ' (' . $GLOBALS['wpmdb_meta'][ $addon_slug ]['version'] . ')';
|
||||
} else {
|
||||
$version = '';
|
||||
}
|
||||
?>
|
||||
<div class="updated warning inline-message">
|
||||
<strong>Update Required</strong> —
|
||||
<?php printf( __( 'The version of the %1$s addon you have installed%2$s is out-of-date and will not work with this version WP Migrate DB Pro. <a href="%3$s">Update Now</a>', 'wp-migrate-db' ), $addon['name'], $version, $update_url ); ?>
|
||||
</div>
|
||||
<?php
|
||||
endforeach;
|
||||
@@ -0,0 +1,18 @@
|
||||
<li class="pull-list">
|
||||
<label for="pull"<?php echo ( $this->is_valid_licence() ) ? '' : ' class="disabled"'; ?>>
|
||||
<input id="pull" type="radio" value="pull" name="action"<?php echo ( $loaded_profile['action'] == 'pull' && $this->is_pro ) ? ' checked="checked"' : ''; ?><?php echo ( $this->is_valid_licence() ) ? '' : ' disabled="disabled"'; ?> />
|
||||
<?php _ex( 'Pull', 'Import data from remote database', 'wp-migrate-db' ); ?><span class="option-description"><?php _e( 'Replace this site\'s db with remote db', 'wp-migrate-db' ); ?></span>
|
||||
</label>
|
||||
<ul>
|
||||
<li></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="push-list">
|
||||
<label for="push"<?php echo ( $this->is_valid_licence() ) ? '' : ' class="disabled"'; ?>>
|
||||
<input id="push" type="radio" value="push" name="action"<?php echo ( $loaded_profile['action'] == 'push' && $this->is_pro ) ? ' checked="checked"' : ''; ?><?php echo ( $this->is_valid_licence() ) ? '' : ' disabled="disabled"'; ?> />
|
||||
<?php _ex( 'Push', 'Export data to remote database', 'wp-migrate-db' ); ?><span class="option-description"><?php _e( 'Replace remote db with this site\'s db', 'wp-migrate-db' ); ?></span>
|
||||
</label>
|
||||
<ul>
|
||||
<li></li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -0,0 +1,54 @@
|
||||
<tr class="wpmdb-setting-title">
|
||||
<td colspan="2"><h3><?php _e( 'Request Settings', 'wp-migrate-db' ); ?></h3></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<?php $this->template( 'checkbox', 'common', array( 'key' => 'verify_ssl' ) ); ?>
|
||||
</td>
|
||||
<td>
|
||||
<h4><?php _e( 'Certificate Verification', 'wp-migrate-db' ); ?> <a href="#" class="general-helper replace-guid-helper js-action-link"></a>
|
||||
<div class="ssl-verify-message helper-message">
|
||||
<?php _e( 'We disable SSL verification by default because a lot of people\'s environments are not setup for it to work. For example, with XAMPP, you have to manually enable OpenSSL by editing the php.ini. Without SSL verification, an HTTPS connection is vulnerable to a man-in-the-middle attack, so we do recommend you configure your environment and enable this.', 'wp-migrate-db' ); ?>
|
||||
</div>
|
||||
<span class="setting-status"></span>
|
||||
</h4>
|
||||
<p><?php _e( 'Verify the authenticity of the remote server’s TLS certificate. ', 'wp-migrate-db' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="slider-outer-wrapper max-request-size">
|
||||
<div class="clearfix slider-label-wrapper">
|
||||
<div class="slider-label"><span><?php _e( 'Maximum Request Size', 'wp-migrate-db' ); ?></span>
|
||||
<a class="general-helper slider-helper js-action-link" href="#"></a>
|
||||
|
||||
<div class="slider-message helper-message">
|
||||
<?php printf( __( 'We\'ve detected that your server supports requests up to %s, but it\'s possible that your server has limitations that we could not detect. To be on the safe side, we set the default to 1 MB, but you can try throttling it up to get better performance. If you\'re getting a 413 error or having trouble with time outs, try throttling this setting down.', 'wp-migrate-db' ), size_format( $this->get_bottleneck( 'max' ) ) ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="amount"></div>
|
||||
</div>
|
||||
<div class="slider"></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="option-section">
|
||||
<td colspan="2">
|
||||
<div class="slider-outer-wrapper delay-between-requests">
|
||||
<div class="clearfix slider-label-wrapper">
|
||||
<div class="slider-label"><span><?php _e( 'Delay Between Requests', 'wp-migrate-db' ); ?></span>
|
||||
<a class="general-helper slider-helper js-action-link" href="#"></a>
|
||||
|
||||
<div class="slider-message helper-message">
|
||||
<?php printf( __( 'Some servers have rate limits which the plugin can hit when performing migrations. If you\'re experiencing migration failures due to server rate limits, you should set this to one or more seconds to alleviate the problem.', 'wp-migrate-db' ) ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="amount"></div>
|
||||
</div>
|
||||
<div class="slider"></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -0,0 +1,9 @@
|
||||
<div class="updated warning inline-message">
|
||||
<strong><?php _e( 'Improve Security', 'wp-migrate-db' ); ?></strong> —
|
||||
<?php printf( __( 'We have implemented a more secure method of secret key generation since your key was generated. We recommend you <a href="%s">visit the Settings tab</a> and reset your secret key.', 'wp-migrate-db' ), '#settings' ); ?>
|
||||
<br/>
|
||||
<?php
|
||||
/* translators: 1: Remind Me Later, 2: Dismiss */
|
||||
printf( _x( '%1$s | %2$s', 'Improve Security actions', 'wp-migrate-db' ), $reminder, $dismiss );
|
||||
?>
|
||||
</div>
|
||||
@@ -0,0 +1,50 @@
|
||||
<div class="option-section">
|
||||
<div class="header-expand-collapse clearfix">
|
||||
<div class="expand-collapse-arrow collapsed">▼</div>
|
||||
<div class="option-heading tables-header"><?php _ex( 'Tables', 'Database tables', 'wp-migrate-db' ); ?></div>
|
||||
</div>
|
||||
|
||||
<div class="indent-wrap expandable-content table-select-wrap" style="display: none;">
|
||||
|
||||
<ul class="option-group table-migrate-options">
|
||||
<li>
|
||||
<label for="migrate-only-with-prefix">
|
||||
<input id="migrate-only-with-prefix" class="multiselect-toggle" type="radio" value="migrate_only_with_prefix" name="table_migrate_option"<?php echo( $loaded_profile['table_migrate_option'] == 'migrate_only_with_prefix' ? ' checked="checked"' : '' ); ?> />
|
||||
<?php _e( 'Migrate all tables with prefix', 'wp-migrate-db' ); ?> "<span class="table-prefix"><?php echo esc_html( $wpdb->base_prefix ); ?></span>"
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label for="migrate-selected">
|
||||
<input id="migrate-selected" class="multiselect-toggle show-multiselect" type="radio" value="migrate_select" name="table_migrate_option"<?php echo( $loaded_profile['table_migrate_option'] == 'migrate_select' ? ' checked="checked"' : '' ); ?> />
|
||||
<?php _e( 'Migrate only selected tables below', 'wp-migrate-db' ); ?>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="select-tables-wrap select-wrap">
|
||||
<select multiple="multiple" name="select_tables[]" id="select-tables" class="multiselect" autocomplete="off">
|
||||
<?php
|
||||
$table_sizes = $this->get_table_sizes();
|
||||
$temp_prefix_length = strlen( $this->temp_prefix );
|
||||
foreach ( $this->get_tables() as $table ) :
|
||||
if( ! isset( $table_sizes[ $table ] ) || $this->temp_prefix === substr( $table, 0, $temp_prefix_length ) ) {
|
||||
continue;
|
||||
}
|
||||
$size = (int) $table_sizes[ $table ] * 1024;
|
||||
if ( ! empty( $loaded_profile['select_tables'] ) && in_array( $table, $loaded_profile['select_tables'] ) ) {
|
||||
printf( '<option value="%1$s" selected="selected">%1$s (%2$s)</option>', esc_html( $table ), size_format( $size ) );
|
||||
} else {
|
||||
printf( '<option value="%1$s">%1$s (%2$s)</option>', esc_html( $table ), size_format( $size ) );
|
||||
}
|
||||
endforeach;
|
||||
?>
|
||||
</select>
|
||||
<br/>
|
||||
<a href="#" class="multiselect-select-all js-action-link"><?php _e( 'Select All', 'wp-migrate-db' ); ?></a>
|
||||
<span class="select-deselect-divider">/</span>
|
||||
<a href="#" class="multiselect-deselect-all js-action-link"><?php _e( 'Deselect All', 'wp-migrate-db' ); ?></a>
|
||||
<span class="select-deselect-divider">/</span>
|
||||
<a href="#" class="multiselect-invert-selection js-action-link"><?php _e( 'Invert Selection', 'wp-migrate-db' ); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,19 @@
|
||||
<tr class="wpmdb-setting-title">
|
||||
<td colspan="2"><h3><?php _e( 'Permissions', 'wp-migrate-db' ); ?></h3></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><?php $this->template( 'checkbox', 'common', array( 'key' => 'allow_pull' ) ); ?></td>
|
||||
<td>
|
||||
<h4><?php _e( 'Pull', 'wp-migrate-db' ); ?> <span class="setting-status"></span></h4>
|
||||
<p><?php _e( 'Process requests to pull data from this install, copying it elsewhere.', 'wp-migrate-db' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="option-section">
|
||||
<td><?php $this->template( 'checkbox', 'common', array( 'key' => 'allow_push' ) ); ?></td>
|
||||
<td>
|
||||
<h4><?php _e( 'Push', 'wp-migrate-db' ); ?> <span class="setting-status"></span></h4>
|
||||
<p><?php _e( 'Process requests to push data to this install, overwriting its data.', 'wp-migrate-db' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -0,0 +1,19 @@
|
||||
<div class="videos">
|
||||
<h3><?php _ex( 'Videos', 'Tutorial videos', 'wp-migrate-db' ); ?></h3>
|
||||
|
||||
<iframe class="video-viewer" style="display: none;" width="640" height="360" src="" frameborder="0" allowfullscreen></iframe>
|
||||
|
||||
<ul>
|
||||
<?php foreach ( $videos as $id => $video ) : ?>
|
||||
<li class="video" data-video-id="<?php echo $id; ?>">
|
||||
<a href="//www.youtube.com/watch?v=<?php echo $id; ?>" target="_blank"><img src="//img.youtube.com/vi/<?php echo $id; ?>/0.jpg" alt=""/></a>
|
||||
|
||||
<h4><?php echo $video['title']; ?></h4>
|
||||
|
||||
<p>
|
||||
<?php echo $video['desc']; ?>
|
||||
</p>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
Reference in New Issue
Block a user