Skip to content

Commit a3e1f1b

Browse files
authored
Merge pull request #438 from WordPress/publish/1.3.0
Prepare the 1.3.0 release
2 parents 4d5ae0e + 5cecd7d commit a3e1f1b

File tree

10 files changed

+46
-22
lines changed

10 files changed

+46
-22
lines changed

default-enabled-modules.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22
/* THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY. */
33
return array(
4+
'images/dominant-color',
45
'images/webp-uploads',
56
'site-health/audit-full-page-cache',
67
'site-health/webp-support',

load.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Description: Performance plugin from the WordPress Performance Group, which is a collection of standalone performance modules.
66
* Requires at least: 5.8
77
* Requires PHP: 5.6
8-
* Version: 1.2.0
8+
* Version: 1.3.0
99
* Author: WordPress Performance Group
1010
* Author URI: https://make.wordpress.org/core/tag/performance/
1111
* License: GPLv2 or later
@@ -15,7 +15,7 @@
1515
* @package performance-lab
1616
*/
1717

18-
define( 'PERFLAB_VERSION', '1.2.0' );
18+
define( 'PERFLAB_VERSION', '1.3.0' );
1919
define( 'PERFLAB_MAIN_FILE', __FILE__ );
2020
define( 'PERFLAB_MODULES_SETTING', 'perflab_modules_settings' );
2121
define( 'PERFLAB_MODULES_SCREEN', 'perflab-modules' );
@@ -140,7 +140,7 @@ function( $module_settings ) {
140140
/**
141141
* Gets the active and valid performance modules.
142142
*
143-
* @since n.e.x.t
143+
* @since 1.3.0
144144
*
145145
* @param string $module Slug of the module.
146146
* @return bool True if the module is active and valid, otherwise false.
@@ -195,7 +195,7 @@ function perflab_render_generator() {
195195
/**
196196
* Checks whether the given module can be loaded in the current environment.
197197
*
198-
* @since n.e.x.t
198+
* @since 1.3.0
199199
*
200200
* @param string $module Slug of the module.
201201
* @return bool Whether the module can be loaded or not.
@@ -224,7 +224,7 @@ function perflab_can_load_module( $module ) {
224224
* Loads the active and valid performance modules.
225225
*
226226
* @since 1.0.0
227-
* @since n.e.x.t Renamed to perflab_load_active_and_valid_modules().
227+
* @since 1.3.0 Renamed to perflab_load_active_and_valid_modules().
228228
*/
229229
function perflab_load_active_and_valid_modules() {
230230
$active_and_valid_modules = array_filter( perflab_get_active_modules(), 'perflab_is_valid_module' );

module-i18n.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22
/* THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY. */
33
$generated_i18n_strings = array(
4-
_x( 'WebP Uploads', 'module name', 'performance-lab' ),
5-
_x( 'Creates WebP versions for new JPEG image uploads if supported by the server.', 'module description', 'performance-lab' ),
64
_x( 'Dominant Color', 'module name', 'performance-lab' ),
75
_x( 'Adds support to store dominant color for an image and create a placeholder background with that color.', 'module description', 'performance-lab' ),
6+
_x( 'WebP Uploads', 'module name', 'performance-lab' ),
7+
_x( 'Creates WebP versions for new JPEG image uploads if supported by the server.', 'module description', 'performance-lab' ),
88
_x( 'Audit Full Page Cache', 'module name', 'performance-lab' ),
99
_x( 'Adds a check for full page cache in Site Health status.', 'module description', 'performance-lab' ),
1010
_x( 'WebP Support', 'module name', 'performance-lab' ),

modules/images/dominant-color/load.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ function wp_get_attachment_file_path( $attachment_id, $size = 'medium' ) {
339339
/**
340340
* Gets the dominant color for an image attachment.
341341
*
342-
* @since n.e.x.t
342+
* @since 1.3.0
343343
*
344344
* @param int $attachment_id Attachment ID for image.
345345
* @return string|null Hex value of dominant color or null if not set.
@@ -363,7 +363,7 @@ function dominant_color_get_dominant_color( $attachment_id ) {
363363
/**
364364
* Returns whether an image attachment has transparency.
365365
*
366-
* @since n.e.x.t
366+
* @since 1.3.0
367367
*
368368
* @param int $attachment_id Attachment ID for image.
369369
* @return bool|null Whether the image has transparency, or null if not set.
@@ -385,7 +385,7 @@ function dominant_color_has_transparency( $attachment_id ) {
385385
/**
386386
* Gets hex color from RGB.
387387
*
388-
* @since n.e.x.t
388+
* @since 1.3.0
389389
*
390390
* @param int $red Red 0-255.
391391
* @param int $green Green 0-255.

modules/images/webp-uploads/can-load.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Can load function to determine if WebP Uploads module is already merged in WordPress core.
44
*
5-
* @since n.e.x.t
5+
* @since 1.3.0
66
* @package performance-lab
77
*/
88

modules/images/webp-uploads/helper.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ function webp_uploads_get_attachment_sources( $attachment_id, $size = 'thumbnail
244244
/**
245245
* Verifies if the request is for a frontend context within the <body> tag.
246246
*
247-
* @since n.e.x.t
247+
* @since 1.3.0
248248
*
249249
* @return bool True if in the <body> within a frontend request, false otherwise.
250250
*/
@@ -267,7 +267,7 @@ function webp_uploads_in_frontend_body() {
267267
/**
268268
* Check whether the additional image is larger than the original image.
269269
*
270-
* @since n.e.x.t
270+
* @since 1.3.0
271271
*
272272
* @param array $original An array with the metadata of the attachment.
273273
* @param array $additional An array containing the filename and file size for additional mime.
@@ -283,7 +283,7 @@ function webp_uploads_should_discard_additional_image_file( array $original, arr
283283
* By default the performance lab plugin will use the mime type with the smaller filesize
284284
* rather than defaulting to `webp`.
285285
*
286-
* @since n.e.x.t
286+
* @since 1.3.0
287287
*
288288
* @param bool $preferred_filesize Prioritize file size over mime type. Default true.
289289
*/

modules/images/webp-uploads/load.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ function webp_uploads_update_image_references( $content ) {
497497
* for the specified image sizes, the *.webp references are stored inside of each size.
498498
*
499499
* @since 1.0.0
500-
* @since n.e.x.t Remove `webp_uploads_prefer_smaller_image_file` filter
500+
* @since 1.3.0 Remove `webp_uploads_prefer_smaller_image_file` filter
501501
*
502502
* @param string $original_image An <img> tag where the urls would be updated.
503503
* @param string $context The context where this is function is being used.
@@ -641,7 +641,7 @@ function webp_uploads_update_featured_image( $html, $post_id, $attachment_id ) {
641641
/**
642642
* Adds a fallback mechanism to replace webp images with jpeg alternatives on older browsers.
643643
*
644-
* @since n.e.x.t
644+
* @since 1.3.0
645645
*/
646646
function webp_uploads_wepb_fallback() {
647647
// Get mime type transofrms for the site.
@@ -691,7 +691,7 @@ function webp_uploads_wepb_fallback() {
691691
* Developers can control the generation of additional mime images for all sizes using the
692692
* webp_uploads_image_sizes_with_additional_mime_type_support filter.
693693
*
694-
* @since n.e.x.t
694+
* @since 1.3.0
695695
*
696696
* @return array An array of image sizes that can have additional mime types.
697697
*/
@@ -712,7 +712,7 @@ function webp_uploads_get_image_sizes_additional_mime_type_support() {
712712
/**
713713
* Filters whether additional mime types are allowed for image sizes.
714714
*
715-
* @since n.e.x.t
715+
* @since 1.3.0
716716
*
717717
* @param array $allowed_sizes A map of image size names and whether they are allowed to have additional mime types.
718718
*/

readme.txt

+27-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Contributors: wordpressdotorg
44
Requires at least: 5.8
55
Tested up to: 6.0
66
Requires PHP: 5.6
7-
Stable tag: 1.2.0
7+
Stable tag: 1.3.0
88
License: GPLv2 or later
99
License URI: https://www.gnu.org/licenses/gpl-2.0.html
1010
Tags: performance, images, javascript, site health, measurement, object caching
@@ -17,8 +17,8 @@ The Performance Lab plugin is a collection of modules focused on enhancing perfo
1717

1818
Currently the plugin includes the following performance modules:
1919

20-
* **WebP Uploads:** Creates WebP versions for new JPEG image uploads if supported by the server.
2120
* **Dominant Color:** Adds support to store dominant color for an image and create a placeholder background with that color.
21+
* **WebP Uploads:** Creates WebP versions for new JPEG image uploads if supported by the server.
2222
* **Audit Full Page Cache:** Adds a check for full page cache in Site Health status.
2323
* **WebP Support:** Adds a WebP support check in Site Health status.
2424
* **Audit Autoloaded Options:** Adds a check for autoloaded options in Site Health status.
@@ -68,6 +68,31 @@ Contributions welcome! There are several ways to contribute:
6868

6969
== Changelog ==
7070

71+
= 1.3.0 =
72+
73+
**Enhancements**
74+
75+
* Images: Add replacing of images only in frontend context. ([424](https://github.com/WordPress/performance/pull/424))
76+
* Images: Allow control for which image sizes to generate additional MIME type versions. ([415](https://github.com/WordPress/performance/pull/415))
77+
* Images: Discard WebP image if it is larger than corresponding JPEG image. ([418](https://github.com/WordPress/performance/pull/418))
78+
* Images: Optimize computing dominant color and transparency for images by combining the two functions. ([381](https://github.com/WordPress/performance/pull/381))
79+
* Images: Provide fallback JPEG images in frontend when WebP is not supported by the browser. ([360](https://github.com/WordPress/performance/pull/360))
80+
* Images: Rely on `wp_get_image_editor()` methods argument to check whether it supports dominant color methods. ([404](https://github.com/WordPress/performance/pull/404))
81+
* Images: Remove experimental label from Dominant Color module and turn on by default for new installs. ([425](https://github.com/WordPress/performance/pull/425))
82+
* Site Health: Remove `perflab_aea_get_resource_file_size()` in favor of `wp_filesize()`. ([380](https://github.com/WordPress/performance/pull/380))
83+
* Site Health: Update documentation link for autoloaded options. ([408](https://github.com/WordPress/performance/pull/408))
84+
* Infrastructure: Implement mechanism to not load module if core version is available. ([390](https://github.com/WordPress/performance/pull/390))
85+
86+
**Bug Fixes**
87+
88+
* Images: Ensure incorrect usage of `webp_uploads_upload_image_mime_transforms` filter is treated correctly. ([393](https://github.com/WordPress/performance/pull/393))
89+
* Images: Fix PHP notice and bug in logic for when `webp_uploads_prefer_smaller_image_file` filter is set to `true`. ([397](https://github.com/WordPress/performance/pull/397))
90+
* Images: Fix an infinite loop in the WebP fallback mechanism. ([433](https://github.com/WordPress/performance/pull/433))
91+
* Images: Fix dominant color upload process to not override potential third-party editors. ([401](https://github.com/WordPress/performance/pull/401))
92+
* Images: Remove additional image backup sources & sizes files when attachment deleted. ([411](https://github.com/WordPress/performance/pull/411))
93+
* Infrastructure: Avoid including .husky directory in plugin ZIP. ([421](https://github.com/WordPress/performance/pull/421))
94+
* Infrastructure: Do not show admin pointer in multisite Network Admin. ([394](https://github.com/WordPress/performance/pull/394))
95+
7196
= 1.2.0 =
7297

7398
**Features**

tests/testdata/demo-modules/images/demo-module-3/can-load.php

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
/**
33
* Can load function to determine if module already marge in WordPress core.
44
*
5-
* @since n.e.x.t
65
* @package performance-lab
76
*/
87

tests/testdata/demo-modules/javascript/demo-module-1/can-load.php

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
/**
33
* Can load function to determine if module already marge in WordPress core.
44
*
5-
* @since n.e.x.t
65
* @package performance-lab
76
*/
87

0 commit comments

Comments
 (0)