debug-bar
2 months ago
3rd-party.php
1 week ago
activitypub.php
1 week ago
amp.php
6 months ago
atomic.php
6 months ago
bbpress.php
6 months ago
beaverbuilder.php
6 months ago
bitly.php
6 months ago
buddypress.php
6 months ago
class-domain-mapping.php
6 months ago
class-jetpack-bbpress-rest-api.php
2 years ago
class.jetpack-amp-support.php
3 months ago
creative-mail.php
6 months ago
debug-bar.php
6 months ago
jetpack-backup.php
6 months ago
jetpack-boost.php
6 months ago
qtranslate-x.php
6 months ago
vaultpress.php
6 months ago
web-stories.php
6 months ago
woocommerce-services.php
6 months ago
woocommerce.php
6 months ago
wpcom-reader.php
6 months ago
wpml.php
6 months ago
atomic.php
38 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Helper functions for the Atomic platform. |
| 4 | * |
| 5 | * @package automattic/jetpack |
| 6 | */ |
| 7 | |
| 8 | namespace Automattic\Jetpack\Third_Party; |
| 9 | |
| 10 | use Automattic\Jetpack\Constants; |
| 11 | use Automattic\Jetpack\Status\Host; |
| 12 | |
| 13 | if ( ! defined( 'ABSPATH' ) ) { |
| 14 | exit( 0 ); |
| 15 | } |
| 16 | |
| 17 | /** |
| 18 | * Handles suppressing development version notices on Atomic-hosted sites. |
| 19 | * |
| 20 | * @param bool $development_version Filterable value if this is a development version of Jetpack. |
| 21 | * |
| 22 | * @return bool |
| 23 | */ |
| 24 | function atomic_weekly_override( $development_version ) { |
| 25 | if ( ( new Host() )->is_atomic_platform() ) { |
| 26 | $haystack = Constants::get_constant( 'JETPACK__PLUGIN_DIR' ); |
| 27 | $needle = '/jetpack-dev/'; |
| 28 | if ( str_ends_with( $haystack, $needle ) ) { |
| 29 | return $development_version; // Returns the default response if the active Jetpack version is from the beta plugin. |
| 30 | } |
| 31 | |
| 32 | $development_version = false; // Returns false for regular installs on Atomic. |
| 33 | } |
| 34 | return $development_version; // Return default if not on Atomic. |
| 35 | } |
| 36 | |
| 37 | add_filter( 'jetpack_development_version', __NAMESPACE__ . '\atomic_weekly_override' ); |
| 38 |