Merged in feature/MAW-855-import-code-into-aws (pull request #2)
code import from pantheon * code import from pantheon
This commit is contained in:
@@ -93,4 +93,30 @@ class Host {
|
||||
$domains[] = 'calypso.localhost';
|
||||
return $domains;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return Calypso environment value; used for developing Jetpack and pairing
|
||||
* it with different Calypso environments, such as localhost.
|
||||
*
|
||||
* @since 1.18.0
|
||||
*
|
||||
* @return string Calypso environment
|
||||
*/
|
||||
public function get_calypso_env() {
|
||||
// phpcs:disable WordPress.Security.NonceVerification.Recommended -- Nonce is not required; only used for changing environments.
|
||||
if ( isset( $_GET['calypso_env'] ) ) {
|
||||
return sanitize_key( $_GET['calypso_env'] );
|
||||
}
|
||||
// phpcs:enable WordPress.Security.NonceVerification.Recommended
|
||||
|
||||
if ( getenv( 'CALYPSO_ENV' ) ) {
|
||||
return sanitize_key( getenv( 'CALYPSO_ENV' ) );
|
||||
}
|
||||
|
||||
if ( defined( 'CALYPSO_ENV' ) && CALYPSO_ENV ) {
|
||||
return sanitize_key( CALYPSO_ENV );
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
namespace Automattic\Jetpack;
|
||||
|
||||
use Automattic\Jetpack\Constants as Constants;
|
||||
use Automattic\Jetpack\Current_Plan as Jetpack_Plan;
|
||||
use Automattic\Jetpack\IP\Utils as IP_Utils;
|
||||
|
||||
/**
|
||||
@@ -441,7 +442,7 @@ class Modules {
|
||||
}
|
||||
}
|
||||
|
||||
if ( class_exists( 'Jetpack_Plan' ) && ! \Jetpack_Plan::supports( $module ) ) {
|
||||
if ( ! Jetpack_Plan::supports( $module ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -409,4 +409,5 @@ class Status {
|
||||
|
||||
return rtrim( $url, ':' );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user