PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 15.0
Jetpack – WP Security, Backup, Speed, & Growth v15.0
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 14.4.2 All 500 releases
jetpack / 3rd-party / atomic.php
atomic.php
38 lines 1.0 KB
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 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