Skip to content

Commit

Permalink
Remove wpcomsh_disable_jetpack_staging_mode_for_wpcom_staging_site
Browse files Browse the repository at this point in the history
  • Loading branch information
fluiddot committed Jul 16, 2024
1 parent 836f147 commit 81551a7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 57 deletions.
24 changes: 0 additions & 24 deletions projects/plugins/wpcomsh/feature-plugins/staging-sites.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
* @package wpcomsh
*/

/**
* Name of option that shows if the site is a staging site.
*/
const WPCOM_IS_STAGING_SITE_OPTION_NAME = 'wpcom_is_staging_site';

/**
* Returns Atomic persistent data value for wpcom_is_staging_site.
*
Expand All @@ -30,22 +25,3 @@ function wpcomsh_is_staging_site_get_atomic_persistent_data( $wpcom_is_staging_s
// need to hook to default_option_* too because if this option doesn't exist, the hook wouldn't run.
add_filter( 'default_option_wpcom_is_staging_site', 'wpcomsh_is_staging_site_get_atomic_persistent_data' );
add_filter( 'option_wpcom_is_staging_site', 'wpcomsh_is_staging_site_get_atomic_persistent_data' );

/**
* Disable Jetpack staging mode for wpcom staging sites.
*
* We set WP_ENVIRONMENT_TYPE constant to 'staging' for WPCOM staging sites, but we don't want
* Jetpack working in staging mode to let us use Jetpack sync and other features for staging sites.
*
* @param bool $is_staging If the current site is a staging site.
*
* @return false|mixed
*/
function wpcomsh_disable_jetpack_staging_mode_for_wpcom_staging_site( $is_staging ) {
if ( get_option( WPCOM_IS_STAGING_SITE_OPTION_NAME ) ) {
return false;
}

return $is_staging;
}
add_filter( 'jetpack_is_staging_site', 'wpcomsh_disable_jetpack_staging_mode_for_wpcom_staging_site' );
33 changes: 0 additions & 33 deletions projects/plugins/wpcomsh/tests/test-staging-sites.php

This file was deleted.

0 comments on commit 81551a7

Please sign in to comment.