Jetpack by WordPress.com - Version 11.1-beta2

Version Description

Download this release

Release Info

Developer samiff
Plugin Icon 128x128 Jetpack by WordPress.com
Version 11.1-beta2
Comparing to
See all releases

Code changes from version 11.1-beta to 11.1-beta2

CHANGELOG.md CHANGED
@@ -6,6 +6,9 @@
6
 
7
  This is an alpha version! The changes listed here are not final.
8
 
 
 
 
9
  ## 11.1-beta - 2022-06-28
10
  ### Enhancements
11
  - Dashboard: add "Getting started with Jetpack Backup" video to Assistant and "At a glance" dashboard. [#24774]
6
 
7
  This is an alpha version! The changes listed here are not final.
8
 
9
+ ### Other changes <!-- Non-user-facing changes go here. This section will not be copied to readme.txt. -->
10
+ - Updated package dependencies.
11
+
12
  ## 11.1-beta - 2022-06-28
13
  ### Enhancements
14
  - Dashboard: add "Getting started with Jetpack Backup" video to Assistant and "At a glance" dashboard. [#24774]
composer.json CHANGED
@@ -25,23 +25,23 @@
25
  "automattic/jetpack-constants": "^1.6",
26
  "automattic/jetpack-device-detection": "^1.4",
27
  "automattic/jetpack-error": "^1.3",
28
- "automattic/jetpack-google-fonts-provider": "^0.3.2",
29
- "automattic/jetpack-identity-crisis": "^0.8.15",
30
  "automattic/jetpack-jitm": "^2.2",
31
  "automattic/jetpack-lazy-images": "^2.1",
32
  "automattic/jetpack-licensing": "^1.7",
33
  "automattic/jetpack-logo": "^1.5",
34
  "automattic/jetpack-my-jetpack": "^1.7",
35
  "automattic/jetpack-partner": "^1.7",
36
- "automattic/jetpack-plugins-installer": "^0.1.3",
37
- "automattic/jetpack-publicize": "^0.7.0",
38
  "automattic/jetpack-redirect": "^1.7",
39
  "automattic/jetpack-roles": "^1.4",
40
- "automattic/jetpack-search": "^0.15.3",
41
  "automattic/jetpack-status": "^1.14",
42
  "automattic/jetpack-sync": "^1.36",
43
- "automattic/jetpack-waf": "^0.6.3",
44
- "automattic/jetpack-wordads": "^0.2.7",
45
  "nojimage/twitter-text-php": "3.1.2"
46
  },
47
  "require-dev": {
25
  "automattic/jetpack-constants": "^1.6",
26
  "automattic/jetpack-device-detection": "^1.4",
27
  "automattic/jetpack-error": "^1.3",
28
+ "automattic/jetpack-google-fonts-provider": "^0.3",
29
+ "automattic/jetpack-identity-crisis": "^0.8",
30
  "automattic/jetpack-jitm": "^2.2",
31
  "automattic/jetpack-lazy-images": "^2.1",
32
  "automattic/jetpack-licensing": "^1.7",
33
  "automattic/jetpack-logo": "^1.5",
34
  "automattic/jetpack-my-jetpack": "^1.7",
35
  "automattic/jetpack-partner": "^1.7",
36
+ "automattic/jetpack-plugins-installer": "^0.1",
37
+ "automattic/jetpack-publicize": "^0.7",
38
  "automattic/jetpack-redirect": "^1.7",
39
  "automattic/jetpack-roles": "^1.4",
40
+ "automattic/jetpack-search": "^0.15",
41
  "automattic/jetpack-status": "^1.14",
42
  "automattic/jetpack-sync": "^1.36",
43
+ "automattic/jetpack-waf": "^0.6",
44
+ "automattic/jetpack-wordads": "^0.2",
45
  "nojimage/twitter-text-php": "3.1.2"
46
  },
47
  "require-dev": {
jetpack.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: https://jetpack.com
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
  * Author: Automattic
7
- * Version: 11.1-beta
8
  * Author URI: https://jetpack.com
9
  * License: GPL2+
10
  * Text Domain: jetpack
@@ -32,7 +32,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
32
 
33
  define( 'JETPACK__MINIMUM_WP_VERSION', '5.9' );
34
  define( 'JETPACK__MINIMUM_PHP_VERSION', '5.6' );
35
- define( 'JETPACK__VERSION', '11.1-beta' );
36
 
37
  /**
38
  * Constant used to fetch the connection owner token
4
  * Plugin URI: https://jetpack.com
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
  * Author: Automattic
7
+ * Version: 11.1-beta2
8
  * Author URI: https://jetpack.com
9
  * License: GPL2+
10
  * Text Domain: jetpack
32
 
33
  define( 'JETPACK__MINIMUM_WP_VERSION', '5.9' );
34
  define( 'JETPACK__MINIMUM_PHP_VERSION', '5.6' );
35
+ define( 'JETPACK__VERSION', '11.1-beta2' );
36
 
37
  /**
38
  * Constant used to fetch the connection owner token
jetpack_vendor/automattic/jetpack-lazy-images/CHANGELOG.md CHANGED
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
 
 
 
 
 
8
  ## [2.1.18] - 2022-06-21
9
  ### Changed
10
  - Disable core lazy loading implementation for images that get lazy loaded by Jetpack
@@ -237,6 +241,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
237
 
238
  - Lazy Images: Move into a package
239
 
 
240
  [2.1.18]: https://github.com/Automattic/jetpack-lazy-images/compare/v2.1.17...v2.1.18
241
  [2.1.17]: https://github.com/Automattic/jetpack-lazy-images/compare/v2.1.16...v2.1.17
242
  [2.1.16]: https://github.com/Automattic/jetpack-lazy-images/compare/v2.1.15...v2.1.16
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
 
8
+ ## [2.1.19] - 2022-06-28
9
+ ### Fixed
10
+ - Fix an issue where processing image attributes more than once resulted in images not being displayed.
11
+
12
  ## [2.1.18] - 2022-06-21
13
  ### Changed
14
  - Disable core lazy loading implementation for images that get lazy loaded by Jetpack
241
 
242
  - Lazy Images: Move into a package
243
 
244
+ [2.1.19]: https://github.com/Automattic/jetpack-lazy-images/compare/v2.1.18...v2.1.19
245
  [2.1.18]: https://github.com/Automattic/jetpack-lazy-images/compare/v2.1.17...v2.1.18
246
  [2.1.17]: https://github.com/Automattic/jetpack-lazy-images/compare/v2.1.16...v2.1.17
247
  [2.1.16]: https://github.com/Automattic/jetpack-lazy-images/compare/v2.1.15...v2.1.16
jetpack_vendor/automattic/jetpack-lazy-images/src/lazy-images.php CHANGED
@@ -285,7 +285,7 @@ class Jetpack_Lazy_Images {
285
  unset( $old_attributes['loading'] );
286
 
287
  // If we've already processed the image don't process it again.
288
- if ( isset( $old_attributes['data-lazy-src'] ) ) {
289
  return sprintf( '<img %1$s>', self::build_attributes_string( $old_attributes ) );
290
  }
291
 
@@ -307,6 +307,10 @@ class Jetpack_Lazy_Images {
307
  * @return array The updated image attributes array with lazy load attributes.
308
  */
309
  public static function process_image_attributes( $attributes ) {
 
 
 
 
310
  if ( empty( $attributes['src'] ) ) {
311
  return $attributes;
312
  }
@@ -543,4 +547,38 @@ class Jetpack_Lazy_Images {
543
 
544
  return $value;
545
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
546
  }
285
  unset( $old_attributes['loading'] );
286
 
287
  // If we've already processed the image don't process it again.
288
+ if ( self::has_image_been_processed( $old_attributes ) ) {
289
  return sprintf( '<img %1$s>', self::build_attributes_string( $old_attributes ) );
290
  }
291
 
307
  * @return array The updated image attributes array with lazy load attributes.
308
  */
309
  public static function process_image_attributes( $attributes ) {
310
+ if ( self::has_image_been_processed( $attributes ) ) {
311
+ return $attributes;
312
+ }
313
+
314
  if ( empty( $attributes['src'] ) ) {
315
  return $attributes;
316
  }
547
 
548
  return $value;
549
  }
550
+
551
+ /**
552
+ * Helper method for determining if image has been processed before or not.
553
+ *
554
+ * @since 2.1.19
555
+ *
556
+ * @param array $attributes The image attributes.
557
+ *
558
+ * @return boolean True if image has been processed before, false otherwise.
559
+ */
560
+ public static function has_image_been_processed( $attributes ) {
561
+ $non_empty_attributes = array(
562
+ 'data-lazy-src',
563
+ 'data-lazy-srcset',
564
+ 'data-lazy-sizes',
565
+ );
566
+
567
+ foreach ( $non_empty_attributes as $attribute ) {
568
+ if ( ! empty( $attributes[ $attribute ] ) ) {
569
+ return true;
570
+ }
571
+ }
572
+
573
+ if ( isset( $attributes['class'] ) && false !== strpos( $attributes['class'], 'jetpack-lazy-image' ) ) {
574
+ return true;
575
+ }
576
+
577
+ // If placeholder image is set, then we've already processed the image.
578
+ if ( isset( $attributes['srcset'] ) && self::get_placeholder_image() === $attributes['srcset'] ) {
579
+ return true;
580
+ }
581
+
582
+ return false;
583
+ }
584
  }
jetpack_vendor/i18n-map.php CHANGED
@@ -24,10 +24,6 @@ return array(
24
  'path' => 'jetpack_vendor/automattic/jetpack-identity-crisis',
25
  'ver' => '0.8.15',
26
  ),
27
- 'jetpack-sync' => array(
28
- 'path' => 'jetpack_vendor/automattic/jetpack-sync',
29
- 'ver' => '1.36.0',
30
- ),
31
  'jetpack-plugins-installer' => array(
32
  'path' => 'jetpack_vendor/automattic/jetpack-plugins-installer',
33
  'ver' => '0.1.3',
@@ -36,10 +32,6 @@ return array(
36
  'path' => 'jetpack_vendor/automattic/jetpack-licensing',
37
  'ver' => '1.7.4',
38
  ),
39
- 'jetpack-my-jetpack' => array(
40
- 'path' => 'jetpack_vendor/automattic/jetpack-my-jetpack',
41
- 'ver' => '1.7.1',
42
- ),
43
  'jetpack-connection-ui' => array(
44
  'path' => 'jetpack_vendor/automattic/jetpack-connection-ui',
45
  'ver' => '2.4.8',
@@ -48,6 +40,14 @@ return array(
48
  'path' => 'jetpack_vendor/automattic/jetpack-config',
49
  'ver' => '1.9.1',
50
  ),
 
 
 
 
 
 
 
 
51
  'jetpack-backup-pkg' => array(
52
  'path' => 'jetpack_vendor/automattic/jetpack-backup',
53
  'ver' => '1.4.1',
@@ -66,7 +66,7 @@ return array(
66
  ),
67
  'jetpack-lazy-images' => array(
68
  'path' => 'jetpack_vendor/automattic/jetpack-lazy-images',
69
- 'ver' => '2.1.18',
70
  ),
71
  'jetpack-publicize-pkg' => array(
72
  'path' => 'jetpack_vendor/automattic/jetpack-publicize',
24
  'path' => 'jetpack_vendor/automattic/jetpack-identity-crisis',
25
  'ver' => '0.8.15',
26
  ),
 
 
 
 
27
  'jetpack-plugins-installer' => array(
28
  'path' => 'jetpack_vendor/automattic/jetpack-plugins-installer',
29
  'ver' => '0.1.3',
32
  'path' => 'jetpack_vendor/automattic/jetpack-licensing',
33
  'ver' => '1.7.4',
34
  ),
 
 
 
 
35
  'jetpack-connection-ui' => array(
36
  'path' => 'jetpack_vendor/automattic/jetpack-connection-ui',
37
  'ver' => '2.4.8',
40
  'path' => 'jetpack_vendor/automattic/jetpack-config',
41
  'ver' => '1.9.1',
42
  ),
43
+ 'jetpack-sync' => array(
44
+ 'path' => 'jetpack_vendor/automattic/jetpack-sync',
45
+ 'ver' => '1.36.0',
46
+ ),
47
+ 'jetpack-my-jetpack' => array(
48
+ 'path' => 'jetpack_vendor/automattic/jetpack-my-jetpack',
49
+ 'ver' => '1.7.1',
50
+ ),
51
  'jetpack-backup-pkg' => array(
52
  'path' => 'jetpack_vendor/automattic/jetpack-backup',
53
  'ver' => '1.4.1',
66
  ),
67
  'jetpack-lazy-images' => array(
68
  'path' => 'jetpack_vendor/automattic/jetpack-lazy-images',
69
+ 'ver' => '2.1.19',
70
  ),
71
  'jetpack-publicize-pkg' => array(
72
  'path' => 'jetpack_vendor/automattic/jetpack-publicize',
vendor/composer/installed.json CHANGED
@@ -959,17 +959,17 @@
959
  },
960
  {
961
  "name": "automattic/jetpack-lazy-images",
962
- "version": "v2.1.18",
963
- "version_normalized": "2.1.18.0",
964
  "source": {
965
  "type": "git",
966
  "url": "https://github.com/Automattic/jetpack-lazy-images.git",
967
- "reference": "55ac4d1dbbf5214e30171b0cc19ac0d9765a23e3"
968
  },
969
  "dist": {
970
  "type": "zip",
971
- "url": "https://api.github.com/repos/Automattic/jetpack-lazy-images/zipball/55ac4d1dbbf5214e30171b0cc19ac0d9765a23e3",
972
- "reference": "55ac4d1dbbf5214e30171b0cc19ac0d9765a23e3",
973
  "shasum": ""
974
  },
975
  "require": {
@@ -981,7 +981,7 @@
981
  "automattic/wordbless": "dev-master",
982
  "yoast/phpunit-polyfills": "1.0.3"
983
  },
984
- "time": "2022-06-21T07:32:29+00:00",
985
  "type": "jetpack-library",
986
  "extra": {
987
  "autotagger": true,
@@ -1006,7 +1006,7 @@
1006
  ],
1007
  "description": "Speed up your site and create a smoother viewing experience by loading images as visitors scroll down the screen, instead of all at once.",
1008
  "support": {
1009
- "source": "https://github.com/Automattic/jetpack-lazy-images/tree/v2.1.18"
1010
  },
1011
  "install-path": "../../jetpack_vendor/automattic/jetpack-lazy-images"
1012
  },
959
  },
960
  {
961
  "name": "automattic/jetpack-lazy-images",
962
+ "version": "v2.1.19",
963
+ "version_normalized": "2.1.19.0",
964
  "source": {
965
  "type": "git",
966
  "url": "https://github.com/Automattic/jetpack-lazy-images.git",
967
+ "reference": "88e6cf1e686f78cc56e42726c419c7d729ce54a5"
968
  },
969
  "dist": {
970
  "type": "zip",
971
+ "url": "https://api.github.com/repos/Automattic/jetpack-lazy-images/zipball/88e6cf1e686f78cc56e42726c419c7d729ce54a5",
972
+ "reference": "88e6cf1e686f78cc56e42726c419c7d729ce54a5",
973
  "shasum": ""
974
  },
975
  "require": {
981
  "automattic/wordbless": "dev-master",
982
  "yoast/phpunit-polyfills": "1.0.3"
983
  },
984
+ "time": "2022-06-28T23:05:35+00:00",
985
  "type": "jetpack-library",
986
  "extra": {
987
  "autotagger": true,
1006
  ],
1007
  "description": "Speed up your site and create a smoother viewing experience by loading images as visitors scroll down the screen, instead of all at once.",
1008
  "support": {
1009
+ "source": "https://github.com/Automattic/jetpack-lazy-images/tree/v2.1.19"
1010
  },
1011
  "install-path": "../../jetpack_vendor/automattic/jetpack-lazy-images"
1012
  },
vendor/composer/installed.php CHANGED
@@ -182,12 +182,12 @@
182
  'dev_requirement' => false,
183
  ),
184
  'automattic/jetpack-lazy-images' => array(
185
- 'pretty_version' => 'v2.1.18',
186
- 'version' => '2.1.18.0',
187
  'type' => 'jetpack-library',
188
  'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-lazy-images',
189
  'aliases' => array(),
190
- 'reference' => '55ac4d1dbbf5214e30171b0cc19ac0d9765a23e3',
191
  'dev_requirement' => false,
192
  ),
193
  'automattic/jetpack-licensing' => array(
182
  'dev_requirement' => false,
183
  ),
184
  'automattic/jetpack-lazy-images' => array(
185
+ 'pretty_version' => 'v2.1.19',
186
+ 'version' => '2.1.19.0',
187
  'type' => 'jetpack-library',
188
  'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-lazy-images',
189
  'aliases' => array(),
190
+ 'reference' => '88e6cf1e686f78cc56e42726c419c7d729ce54a5',
191
  'dev_requirement' => false,
192
  ),
193
  'automattic/jetpack-licensing' => array(
vendor/composer/jetpack_autoload_classmap.php CHANGED
@@ -255,7 +255,7 @@ return array(
255
  'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-publicize/src/class-connections-post-field.php'
256
  ),
257
  'Automattic\\Jetpack\\Jetpack_Lazy_Images' => array(
258
- 'version' => '2.1.18.0',
259
  'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-lazy-images/src/lazy-images.php'
260
  ),
261
  'Automattic\\Jetpack\\JITMS\\Rest_Api_Endpoints' => array(
255
  'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-publicize/src/class-connections-post-field.php'
256
  ),
257
  'Automattic\\Jetpack\\Jetpack_Lazy_Images' => array(
258
+ 'version' => '2.1.19.0',
259
  'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-lazy-images/src/lazy-images.php'
260
  ),
261
  'Automattic\\Jetpack\\JITMS\\Rest_Api_Endpoints' => array(