PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.2
Jetpack – WP Security, Backup, Speed, & Growth v16.2
16.2 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 All 502 releases
← All changes | jetpack.php +70 -47 12.4.216.2 View file →
@@ -3,39 +3,45 @@
3 3 * Plugin Name: Jetpack
4 4 * Plugin URI: https://jetpack.com
5 5 * Description: Security, performance, and marketing tools made by WordPress experts. Jetpack keeps your site protected so you can focus on more important things.
6 6 * Author: Automattic
7 - * Version: 12.4.2
7 + * Version: 16.2
8 8 * Author URI: https://jetpack.com
9 9 * License: GPL2+
10 10 * Text Domain: jetpack
11 - * Requires at least: 6.1
12 - * Requires PHP: 5.6
11 + * Requires at least: 7.0
12 + * Requires PHP: 7.4
13 13 *
14 14 * @package automattic/jetpack
15 15 */
16 16
17 -use Automattic\Jetpack\Image_CDN\Image_CDN_Core;
18 -
19 17 /*
20 -This program is free software; you can redistribute it and/or
21 -modify it under the terms of the GNU General Public License
22 -as published by the Free Software Foundation; either version 2
23 -of the License, or (at your option) any later version.
18 + * This program is free software; you can redistribute it and/or
19 + * modify it under the terms of the GNU General Public License
20 + * as published by the Free Software Foundation; either version 2
21 + * of the License, or (at your option) any later version.
22 + *
23 + * This program is distributed in the hope that it will be useful,
24 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 + * GNU General Public License for more details.
27 + *
28 + * You should have received a copy of the GNU General Public License
29 + * along with this program; if not, see <https://www.gnu.org/licenses/>.
30 + */
24 31
25 -This program is distributed in the hope that it will be useful,
26 -but WITHOUT ANY WARRANTY; without even the implied warranty of
27 -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 -GNU General Public License for more details.
32 +use Automattic\Jetpack\Image_CDN\Image_CDN_Core;
29 33
30 -You should have received a copy of the GNU General Public License
31 -along with this program; if not, write to the Free Software
32 -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
33 -*/
34 +if ( ! defined( 'ABSPATH' ) ) {
35 + exit( 0 );
36 +}
34 37
35 -define( 'JETPACK__MINIMUM_WP_VERSION', '6.1' );
36 -define( 'JETPACK__MINIMUM_PHP_VERSION', '5.6' );
37 -define( 'JETPACK__VERSION', '12.4.2' );
38 +if ( ! defined( 'JETPACK__VERSION' ) ) {
39 + // This breaks the project version checks when a one-liner.
40 + define( 'JETPACK__VERSION', '16.2' );
41 +}
42 +defined( 'JETPACK__MINIMUM_WP_VERSION' ) || define( 'JETPACK__MINIMUM_WP_VERSION', '7.0' );
43 +defined( 'JETPACK__MINIMUM_PHP_VERSION' ) || define( 'JETPACK__MINIMUM_PHP_VERSION', '7.4' );
38 44
39 45 /**
40 46 * Constant used to fetch the connection owner token
41 47 *
@@ -41,15 +47,14 @@
41 47 *
42 48 * @deprecated 9.0.0
43 49 * @var boolean
44 50 */
45 -define( 'JETPACK_MASTER_USER', true );
51 +defined( 'JETPACK_MASTER_USER' ) || define( 'JETPACK_MASTER_USER', true );
46 52
47 -define( 'JETPACK__API_VERSION', 1 );
48 -define( 'JETPACK__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
49 -define( 'JETPACK__PLUGIN_FILE', __FILE__ );
53 +defined( 'JETPACK__API_VERSION' ) || define( 'JETPACK__API_VERSION', 1 );
54 +defined( 'JETPACK__PLUGIN_DIR' ) || define( 'JETPACK__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
55 +defined( 'JETPACK__PLUGIN_FILE' ) || define( 'JETPACK__PLUGIN_FILE', __FILE__ );
50 56
51 -defined( 'JETPACK__RELEASE_POST_BLOG_SLUG' ) || define( 'JETPACK__RELEASE_POST_BLOG_SLUG', 'jetpackreleaseblog.wordpress.com' );
52 57 defined( 'JETPACK_CLIENT__AUTH_LOCATION' ) || define( 'JETPACK_CLIENT__AUTH_LOCATION', 'header' );
53 58
54 59 /**
55 60 * WP.com API no longer supports `http://` protocol.
@@ -114,9 +119,10 @@
114 119 * Outputs for an admin notice about running Jetpack on outdated WordPress.
115 120 *
116 121 * @since 7.2.0
117 122 */
118 - function jetpack_admin_unsupported_wp_notice() { ?>
123 + function jetpack_admin_unsupported_wp_notice() {
124 + ?>
119 125 <div class="notice notice-error is-dismissible">
120 126 <p><?php esc_html_e( 'Jetpack requires a more recent version of WordPress and has been paused. Please update WordPress to continue enjoying Jetpack.', 'jetpack' ); ?></p>
121 127 </div>
122 128 <?php
@@ -154,8 +160,22 @@
154 160 )
155 161 );
156 162 }
157 163
164 + // Add a red bubble notification to My Jetpack if the installation is bad.
165 + add_filter(
166 + 'my_jetpack_red_bubble_notification_slugs',
167 + function ( $slugs ) {
168 + $slugs['jetpack-plugin-bad-installation'] = array(
169 + 'data' => array(
170 + 'plugin' => 'Jetpack',
171 + ),
172 + );
173 +
174 + return $slugs;
175 + }
176 + );
177 +
158 178 /**
159 179 * Outputs an admin notice for folks running Jetpack without having run composer install.
160 180 *
161 181 * @since 7.4.0
@@ -160,30 +180,33 @@
160 180 *
161 181 * @since 7.4.0
162 182 */
163 183 function jetpack_admin_missing_files() {
164 - ?>
165 - <div class="notice notice-error is-dismissible">
166 - <p>
167 - <?php
168 - printf(
169 - wp_kses(
170 - /* translators: Placeholder is a link to a support document. */
171 - __( 'Your installation of Jetpack is incomplete. If you installed Jetpack from GitHub, please refer to <a href="%1$s" target="_blank" rel="noopener noreferrer">this document</a> to set up your development environment. Jetpack must have Composer dependencies installed and built via the build command.', 'jetpack' ),
172 - array(
173 - 'a' => array(
174 - 'href' => array(),
175 - 'target' => array(),
176 - 'rel' => array(),
177 - ),
178 - )
184 + if ( get_current_screen()->id !== 'plugins' ) {
185 + return;
186 + }
187 + $message = sprintf(
188 + wp_kses(
189 + /* translators: Placeholder is a link to a support document. */
190 + __( 'Your installation of Jetpack is incomplete. If you installed Jetpack from GitHub, please refer to <a href="%1$s" target="_blank" rel="noopener noreferrer">this document</a> to set up your development environment. Jetpack must have Composer dependencies installed and built via the build command: <code>jetpack build plugins/jetpack --deps</code>', 'jetpack' ),
191 + array(
192 + 'a' => array(
193 + 'href' => array(),
194 + 'rel' => array(),
195 + 'target' => array(),
179 196 ),
180 - 'https://github.com/Automattic/jetpack/blob/trunk/docs/development-environment.md#building-your-project'
181 - );
182 - ?>
183 - </p>
184 - </div>
185 - <?php
197 + 'code' => array(),
198 + )
199 + ),
200 + 'https://github.com/Automattic/jetpack/blob/trunk/docs/development-environment.md#building-your-project'
201 + );
202 + wp_admin_notice(
203 + $message,
204 + array(
205 + 'type' => 'error',
206 + 'dismissible' => true,
207 + )
208 + );
186 209 }
187 210
188 211 add_action( 'admin_notices', 'jetpack_admin_missing_files' );
189 212 return;