* Filters in_safe_mode check. * * @since 3.3.0 * * @param bool $in_safe_mode If the current site is in safe mode. */ $in_safe_mode = apply_filters( 'jetpack_is_in_safe_mode', $in_safe_mode ); Cache::set( 'in_safe_mode', $in_safe_mode ); return $in_safe_mode; } /** * If the site is a development/staging site. * This is a new version of is_staging_site added to separate safe mode from the legacy staging mode. * This method checks for core WP_ENVIRONMENT_TYPE setting * Using the jetpack_is_development_site filter. * * @since 3.3.0 * * @return bool */ public static function is_development_site() { $cached = Cache::get( 'is_development_site' ); if ( null !== $cached ) { return $cached; } $is_dev_site = ! in_array( wp_get_environment_type(), array( 'production', 'local' ), true ); /** * Filters is_development_site check. * * @since 3.3.0 * * @param bool $is_dev_site If the current site is a staging or dev site. */ $is_dev_site = apply_filters( 'jetpack_is_development_site', $is_dev_site ); Cache::set( 'is_development_site', $is_dev_site ); return $is_dev_site; } /** * Whether the site is currently onboarding or not. * A site is considered as being onboarded if it currently has an onboarding token. * * @since-jetpack 5.8 * * @deprecated since 4.0.0 * * @access public * @static * * @return bool True if the site is currently onboarding, false otherwise */ public function is_onboarding() { return \Jetpack_Options::get_option( 'onboarding' ) !== false; } /** * Whether the site is currently private or not. * On WordPress.com and WoA, sites can be marked as private * * @since 1.16.0 * * @return bool True if the site is private. */ public function is_private_site() { $ret = Cache::get( 'is_private_site' ); if ( null === $ret ) { $is_private_site = '-1' === get_option( 'blog_public' ); /** * Filters the is_private_site check. * * @since 1.16.1 * * @param bool $is_private_site True if the site is private. */ $is_private_site = apply_filters( 'jetpack_is_private_site', $is_private_site ); Cache::set( 'is_private_site', $is_private_site ); return $is_private_site; } return $ret; } /** * Whether the site is currently unlaunched or not. * On WordPress.com and WoA, sites can be marked as "coming soon", aka unlaunched * * @since 1.16.0 * * @return bool True if the site is not launched. */ public function is_coming_soon() { $ret = Cache::get( 'is_coming_soon' ); if ( null === $ret ) { $is_coming_soon = (bool) ( function_exists( 'site_is_coming_soon' ) && \site_is_coming_soon() ) || get_option( 'wpcom_public_coming_soon' ); /** * Filters the is_coming_soon check. * * @since 1.16.1 * * @param bool $is_coming_soon True if the site is coming soon (i.e. unlaunched). */ $is_coming_soon = apply_filters( 'jetpack_is_coming_soon', $is_coming_soon ); Cache::set( 'is_coming_soon', $is_coming_soon ); return $is_coming_soon; } return $ret; } /** * Returns the site slug suffix to be used as part of Calypso URLs. * * Strips http:// or https:// from a url, replaces forward slash with ::. * * @since 1.6.0 * * @param string $url Optional. URL to build the site suffix from. Default: Home URL. * * @return string */ public function get_site_suffix( $url = '' ) { // On WordPress.com, site suffixes are a bit different. if ( method_exists( 'WPCOM_Masterbar', 'get_calypso_site_slug' ) ) { return WPCOM_Masterbar::get_calypso_site_slug( get_current_blog_id() ); } // Grab the 'site_url' option for WoA sites to avoid plugins to interfere with the site // identifier (e.g. i18n plugins may change the main url to '/', but we // want to exclude the locale since it's not part of the site suffix). if ( ( new Host() )->is_woa_site() ) { $url = \site_url(); } if ( empty( $url ) ) { // WordPress can be installed in subdirectories (e.g. make.wordpress.org/plugins) // where the 'site_url' option points to the root domain (e.g. make.wordpress.org) // which could collide with another site in the same domain but with WordPress // installed in a different subdirectory (e.g. make.wordpress.org/core). To avoid // such collision, we identify the site with the 'home_url' option. $url = \home_url(); } $url = preg_replace( '#^.*?://#', '', $url ); $url = str_replace( '/', '::', $url ); return rtrim( $url, ':' ); } }
Fatal error: Uncaught Error: Class 'Automattic\Jetpack\Status' not found in /var/www/html/dportilho.com.br/web/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-actions.php:308 Stack trace: #0 /var/www/html/dportilho.com.br/web/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-main.php(24): Automattic\Jetpack\Sync\Actions::sync_allowed() #1 /var/www/html/dportilho.com.br/web/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-config/src/class-config.php(257): Automattic\Jetpack\Sync\Main::configure() #2 /var/www/html/dportilho.com.br/web/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-config/src/class-config.php(217): Automattic\Jetpack\Config->enable_sync() #3 /var/www/html/dportilho.com.br/web/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-config/src/class-config.php(112): Automattic\Jetpack\Config->ensure_feature('sync') #4 /var/www/html/dportilho.com.br/web/wp-includes/class-wp-hook.php(324): Automattic\Jetpack\Config->on_plugins_l in /var/www/html/dportilho.com.br/web/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-actions.php on line 308