debug-bar
4 years ago
3rd-party.php
3 years ago
amp.php
3 years ago
atomic.php
3 years ago
bbpress.php
3 years ago
beaverbuilder.php
5 years ago
bitly.php
3 years ago
buddypress.php
5 years ago
class-domain-mapping.php
4 years ago
class-jetpack-bbpress-rest-api.php
3 years ago
class-salesforce-lead-form.php
3 years ago
class.jetpack-amp-support.php
3 years ago
creative-mail.php
3 years ago
crowdsignal.php
5 years ago
debug-bar.php
5 years ago
jetpack-backup.php
3 years ago
jetpack-boost.php
3 years ago
qtranslate-x.php
5 years ago
vaultpress.php
5 years ago
web-stories.php
5 years ago
woocommerce-services.php
3 years ago
woocommerce.php
5 years ago
wpml.php
5 years ago
atomic.php
37 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 | /** |
| 14 | * Handles suppressing development version notices on Atomic-hosted sites. |
| 15 | * |
| 16 | * @param bool $development_version Filterable value if this is a development version of Jetpack. |
| 17 | * |
| 18 | * @return bool |
| 19 | */ |
| 20 | function atomic_weekly_override( $development_version ) { |
| 21 | if ( ( new Host() )->is_atomic_platform() ) { |
| 22 | $haystack = Constants::get_constant( 'JETPACK__PLUGIN_DIR' ); |
| 23 | $needle = '/jetpack-dev/'; |
| 24 | if ( |
| 25 | ( function_exists( 'str_ends_with' ) && str_ends_with( $haystack, $needle ) ) || // phpcs:ignore PHPCompatibility.FunctionUse.NewFunctions.str_ends_withFound |
| 26 | 0 === substr_compare( $haystack, $needle, -13 ) |
| 27 | ) { |
| 28 | return $development_version; // Returns the default response if the active Jetpack version is from the beta plugin. |
| 29 | } |
| 30 | |
| 31 | $development_version = false; // Returns false for regular installs on Atomic. |
| 32 | } |
| 33 | return $development_version; // Return default if not on Atomic. |
| 34 | } |
| 35 | |
| 36 | add_filter( 'jetpack_development_version', __NAMESPACE__ . '\atomic_weekly_override' ); |
| 37 |