Skip to content

Commit

Permalink
Keep info to remote available from both ends
Browse files Browse the repository at this point in the history
  • Loading branch information
carstingaxion committed Sep 1, 2023
1 parent 519bd2e commit 1832b78
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions inc/wp-sync-db/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use function add_action;
use function add_filter;
use function get_sites;
use function wp_get_environment_type;
use function wp_list_pluck;

const BASENAME = 'wp-sync-db/wp-sync-db.php';
Expand Down Expand Up @@ -59,11 +60,12 @@ function load_plugin() :void {
*/
function filter_options() :void {

$_temp_key = \getenv( 'FT_MAINTAINANCE_WPSDB_KEY' );
$_remote_key = \getenv( 'FT_MAINTAINANCE_WPSDB_REMOTE' );
$_local_key = ( 'local' === wp_get_environment_type() ) ? \getenv( 'FT_MAINTAINANCE_WPSDB_LOCAL' ) : $_remote_key;

$_options = [
'max_request' => 1048576,
'key' => $_temp_key,
'key' => $_local_key,
'allow_pull' => true,
'allow_push' => false,
'profiles' => [
Expand All @@ -77,7 +79,7 @@ function filter_options() :void {
'exclude_post_types' => '0',
'action' => 'pull',
'connection_info' => "https://figuren.theater
$_temp_key", // keep this CRAZY LINEBREAK !
$_remote_key", // keep this CRAZY LINEBREAK !

// replacements
// that will be done on many different tables
Expand Down

0 comments on commit 1832b78

Please sign in to comment.