PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 13.5
Jetpack – WP Security, Backup, Speed, & Growth v13.5
16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 14.1.1 14.2.2 14.3.1 All 501 releases
jetpack / 3rd-party / atomic.php

atomic.php in Jetpack – WP Security, Backup, Speed, & Growth 13.5, at 3rd-party/atomic.php

34 lines 1023 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 ( str_ends_with( $haystack, $needle ) ) {
25 return $development_version; // Returns the default response if the active Jetpack version is from the beta plugin.
26 }
27
28 $development_version = false; // Returns false for regular installs on Atomic.
29 }
30 return $development_version; // Return default if not on Atomic.
31 }
32
33 add_filter( 'jetpack_development_version', __NAMESPACE__ . '\atomic_weekly_override' );
34