diff options
author | Yury German <blueknight@gentoo.org> | 2022-01-23 18:37:36 -0500 |
---|---|---|
committer | Yury German <blueknight@gentoo.org> | 2022-01-23 18:37:36 -0500 |
commit | f18b23a3a9378fb0a98856d436aa9ebf94e47429 (patch) | |
tree | e418433e22854ebd2d77eaa869d5d0470a973317 /plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-host.php | |
parent | Add classic-editor 1.5 (diff) | |
download | blogs-gentoo-f18b23a3a9378fb0a98856d436aa9ebf94e47429.tar.gz blogs-gentoo-f18b23a3a9378fb0a98856d436aa9ebf94e47429.tar.bz2 blogs-gentoo-f18b23a3a9378fb0a98856d436aa9ebf94e47429.zip |
Updating Classic Editor, Google Authenticatior, Jetpack, Public Post Preview, Table of Contents, Wordpress Importer
Signed-off-by: Yury German <blueknight@gentoo.org>
Diffstat (limited to 'plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-host.php')
-rw-r--r-- | plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-host.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-host.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-host.php new file mode 100644 index 00000000..a0765f6d --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-host.php @@ -0,0 +1,40 @@ +<?php +/** + * A hosting provide class for Jetpack. + * + * @package automattic/jetpack-status + */ + +namespace Automattic\Jetpack\Status; + +use Automattic\Jetpack\Constants; + +/** + * Hosting provider class. + */ +class Host { + /** + * Determine if this site is an WordPress.com on Atomic site or not looking first at the 'at_options' option. + * As a fallback, check for presence of wpcomsh plugin to determine if a current site has undergone AT. + * + * @since $$next_version$$ + * + * @return bool + */ + public function is_woa_site() { + $at_options = get_option( 'at_options', array() ); + return $this->is_atomic_platform() && ( ! empty( $at_options ) || Constants::is_true( 'WPCOMSH__PLUGIN_FILE' ) ); + } + + /** + * Determine if site is hosted on the Atomic hosting platform. + * + * @since $$next_version$$ + * + * @return bool; + */ + public function is_atomic_platform() { + return Constants::is_true( 'ATOMIC_SITE_ID' ) && Constants::is_true( 'ATOMIC_CLIENT_ID' ); + } + +} |