Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up every sentence about migrate to sync, and grammar #2

Open
wants to merge 1 commit into
base: delicious-brains
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
174 changes: 87 additions & 87 deletions asset/dist/js/script-113.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion asset/dist/js/script-113.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

class WPMDBPro_Multisite_Tools_CLI extends WPMDBPro_Multisite_Tools {
class WPSDB_Multisite_Tools_CLI extends WPSDB_Multisite_Tools {

function __construct( $plugin_file_path ) {
parent::__construct( $plugin_file_path );

// Add support for extra CLI args with a lower priority so that it can check media options.
add_filter( 'wpmdb_cli_filter_get_extra_args', array( $this, 'filter_extra_args' ), 10, 1 );
add_filter( 'wpmdb_cli_filter_get_profile_data_from_args', array( $this, 'add_extra_cli_args' ), 20, 3 );
add_filter( 'wpmdb_cli_default_find_and_replace', array( $this, 'filter_cli_default_find_and_replace' ), 20, 2 );
add_filter( 'wpsdb_cli_filter_get_extra_args', array( $this, 'filter_extra_args' ), 10, 1 );
add_filter( 'wpsdb_cli_filter_get_profile_data_from_args', array( $this, 'add_extra_cli_args' ), 20, 3 );
add_filter( 'wpsdb_cli_default_find_and_replace', array( $this, 'filter_cli_default_find_and_replace' ), 20, 2 );
}

/**
Expand Down Expand Up @@ -39,22 +39,22 @@ public function add_extra_cli_args( $profile, $args, $assoc_args ) {
return $profile;
}

global $wpmdbpro_cli;
global $wpsdb_cli;

// --subsite=<blog-id|subsite-url>
$mst_select_subsite = false;
$mst_selected_subsite = 0;
if ( isset( $assoc_args['subsite'] ) ) {
if ( ! is_multisite() ) {
return $wpmdbpro_cli->cli_error( __( 'The installation must be a Multisite network to make use of the subsite option', 'wp-migrate-db-pro-multisite-tools' ) );
return $wpsdb_cli->cli_error( __( 'The installation must be a Multisite network to make use of the subsite option', 'wp-sync-db-pro-multisite-tools' ) );
}
if ( empty( $assoc_args['subsite'] ) ) {
return $wpmdbpro_cli->cli_error( __( 'A valid Blog ID or Subsite URL must be supplied to make use of the subsite option', 'wp-migrate-db-pro-multisite-tools' ) );
return $wpsdb_cli->cli_error( __( 'A valid Blog ID or Subsite URL must be supplied to make use of the subsite option', 'wp-sync-db-pro-multisite-tools' ) );
}
$mst_selected_subsite = $this->get_subsite_id( $assoc_args['subsite'] );

if ( false === $mst_selected_subsite ) {
return $wpmdbpro_cli->cli_error( __( 'A valid Blog ID or Subsite URL must be supplied to make use of the subsite option', 'wp-migrate-db-pro-multisite-tools' ) );
return $wpsdb_cli->cli_error( __( 'A valid Blog ID or Subsite URL must be supplied to make use of the subsite option', 'wp-sync-db-pro-multisite-tools' ) );
}

$mst_select_subsite = true;
Expand All @@ -65,21 +65,21 @@ public function add_extra_cli_args( $profile, $args, $assoc_args ) {
$new_prefix = $wpdb->base_prefix;
if ( isset( $assoc_args['prefix'] ) ) {
if ( false === $mst_select_subsite ) {
return $wpmdbpro_cli->cli_error( __( 'A new table name prefix may only be specified for subsite exports.', 'wp-migrate-db-pro-multisite-tools' ) );
return $wpsdb_cli->cli_error( __( 'A new table name prefix may only be specified for subsite exports.', 'wp-sync-db-pro-multisite-tools' ) );
}
if ( empty( $assoc_args['prefix'] ) ) {
return $wpmdbpro_cli->cli_error( __( 'A valid prefix must be supplied to make use of the prefix option', 'wp-migrate-db-pro-multisite-tools' ) );
return $wpsdb_cli->cli_error( __( 'A valid prefix must be supplied to make use of the prefix option', 'wp-sync-db-pro-multisite-tools' ) );
}
$new_prefix = trim( $assoc_args['prefix'] );

if ( sanitize_key( $new_prefix ) !== $new_prefix ) {
return $wpmdbpro_cli->cli_error( $this->get_string( 'new_prefix_contents' ) );
return $wpsdb_cli->cli_error( $this->get_string( 'new_prefix_contents' ) );
}
} elseif ( 1 < $mst_selected_subsite && 'pull' === $profile['action'] ) {
$new_prefix .= $mst_selected_subsite . '_';
}

// Disable Media Files Select Subsites if using Subsite Migration.
// Disable Media Files Select Subsites if using Subsite Syncing.
if ( $mst_select_subsite && ! empty( $profile['mf_select_subsites'] ) && ! empty( $profile['mf_selected_subsites'] ) ) {
unset( $profile['mf_select_subsites'], $profile['mf_selected_subsites'] );
}
Expand Down
Loading