Skip to content

Commit

Permalink
Merge pull request #438 from WordPress/publish/1.3.0
Browse files Browse the repository at this point in the history
Prepare the 1.3.0 release
  • Loading branch information
felixarntz authored Jul 18, 2022
2 parents 4d5ae0e + 5cecd7d commit a3e1f1b
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 22 deletions.
1 change: 1 addition & 0 deletions default-enabled-modules.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
/* THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY. */
return array(
'images/dominant-color',
'images/webp-uploads',
'site-health/audit-full-page-cache',
'site-health/webp-support',
Expand Down
10 changes: 5 additions & 5 deletions load.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: Performance plugin from the WordPress Performance Group, which is a collection of standalone performance modules.
* Requires at least: 5.8
* Requires PHP: 5.6
* Version: 1.2.0
* Version: 1.3.0
* Author: WordPress Performance Group
* Author URI: https://make.wordpress.org/core/tag/performance/
* License: GPLv2 or later
Expand All @@ -15,7 +15,7 @@
* @package performance-lab
*/

define( 'PERFLAB_VERSION', '1.2.0' );
define( 'PERFLAB_VERSION', '1.3.0' );
define( 'PERFLAB_MAIN_FILE', __FILE__ );
define( 'PERFLAB_MODULES_SETTING', 'perflab_modules_settings' );
define( 'PERFLAB_MODULES_SCREEN', 'perflab-modules' );
Expand Down Expand Up @@ -140,7 +140,7 @@ function( $module_settings ) {
/**
* Gets the active and valid performance modules.
*
* @since n.e.x.t
* @since 1.3.0
*
* @param string $module Slug of the module.
* @return bool True if the module is active and valid, otherwise false.
Expand Down Expand Up @@ -195,7 +195,7 @@ function perflab_render_generator() {
/**
* Checks whether the given module can be loaded in the current environment.
*
* @since n.e.x.t
* @since 1.3.0
*
* @param string $module Slug of the module.
* @return bool Whether the module can be loaded or not.
Expand Down Expand Up @@ -224,7 +224,7 @@ function perflab_can_load_module( $module ) {
* Loads the active and valid performance modules.
*
* @since 1.0.0
* @since n.e.x.t Renamed to perflab_load_active_and_valid_modules().
* @since 1.3.0 Renamed to perflab_load_active_and_valid_modules().
*/
function perflab_load_active_and_valid_modules() {
$active_and_valid_modules = array_filter( perflab_get_active_modules(), 'perflab_is_valid_module' );
Expand Down
4 changes: 2 additions & 2 deletions module-i18n.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
/* THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY. */
$generated_i18n_strings = array(
_x( 'WebP Uploads', 'module name', 'performance-lab' ),
_x( 'Creates WebP versions for new JPEG image uploads if supported by the server.', 'module description', 'performance-lab' ),
_x( 'Dominant Color', 'module name', 'performance-lab' ),
_x( 'Adds support to store dominant color for an image and create a placeholder background with that color.', 'module description', 'performance-lab' ),
_x( 'WebP Uploads', 'module name', 'performance-lab' ),
_x( 'Creates WebP versions for new JPEG image uploads if supported by the server.', 'module description', 'performance-lab' ),
_x( 'Audit Full Page Cache', 'module name', 'performance-lab' ),
_x( 'Adds a check for full page cache in Site Health status.', 'module description', 'performance-lab' ),
_x( 'WebP Support', 'module name', 'performance-lab' ),
Expand Down
6 changes: 3 additions & 3 deletions modules/images/dominant-color/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ function wp_get_attachment_file_path( $attachment_id, $size = 'medium' ) {
/**
* Gets the dominant color for an image attachment.
*
* @since n.e.x.t
* @since 1.3.0
*
* @param int $attachment_id Attachment ID for image.
* @return string|null Hex value of dominant color or null if not set.
Expand All @@ -363,7 +363,7 @@ function dominant_color_get_dominant_color( $attachment_id ) {
/**
* Returns whether an image attachment has transparency.
*
* @since n.e.x.t
* @since 1.3.0
*
* @param int $attachment_id Attachment ID for image.
* @return bool|null Whether the image has transparency, or null if not set.
Expand All @@ -385,7 +385,7 @@ function dominant_color_has_transparency( $attachment_id ) {
/**
* Gets hex color from RGB.
*
* @since n.e.x.t
* @since 1.3.0
*
* @param int $red Red 0-255.
* @param int $green Green 0-255.
Expand Down
2 changes: 1 addition & 1 deletion modules/images/webp-uploads/can-load.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Can load function to determine if WebP Uploads module is already merged in WordPress core.
*
* @since n.e.x.t
* @since 1.3.0
* @package performance-lab
*/

Expand Down
6 changes: 3 additions & 3 deletions modules/images/webp-uploads/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ function webp_uploads_get_attachment_sources( $attachment_id, $size = 'thumbnail
/**
* Verifies if the request is for a frontend context within the <body> tag.
*
* @since n.e.x.t
* @since 1.3.0
*
* @return bool True if in the <body> within a frontend request, false otherwise.
*/
Expand All @@ -267,7 +267,7 @@ function webp_uploads_in_frontend_body() {
/**
* Check whether the additional image is larger than the original image.
*
* @since n.e.x.t
* @since 1.3.0
*
* @param array $original An array with the metadata of the attachment.
* @param array $additional An array containing the filename and file size for additional mime.
Expand All @@ -283,7 +283,7 @@ function webp_uploads_should_discard_additional_image_file( array $original, arr
* By default the performance lab plugin will use the mime type with the smaller filesize
* rather than defaulting to `webp`.
*
* @since n.e.x.t
* @since 1.3.0
*
* @param bool $preferred_filesize Prioritize file size over mime type. Default true.
*/
Expand Down
8 changes: 4 additions & 4 deletions modules/images/webp-uploads/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ function webp_uploads_update_image_references( $content ) {
* for the specified image sizes, the *.webp references are stored inside of each size.
*
* @since 1.0.0
* @since n.e.x.t Remove `webp_uploads_prefer_smaller_image_file` filter
* @since 1.3.0 Remove `webp_uploads_prefer_smaller_image_file` filter
*
* @param string $original_image An <img> tag where the urls would be updated.
* @param string $context The context where this is function is being used.
Expand Down Expand Up @@ -641,7 +641,7 @@ function webp_uploads_update_featured_image( $html, $post_id, $attachment_id ) {
/**
* Adds a fallback mechanism to replace webp images with jpeg alternatives on older browsers.
*
* @since n.e.x.t
* @since 1.3.0
*/
function webp_uploads_wepb_fallback() {
// Get mime type transofrms for the site.
Expand Down Expand Up @@ -691,7 +691,7 @@ function webp_uploads_wepb_fallback() {
* Developers can control the generation of additional mime images for all sizes using the
* webp_uploads_image_sizes_with_additional_mime_type_support filter.
*
* @since n.e.x.t
* @since 1.3.0
*
* @return array An array of image sizes that can have additional mime types.
*/
Expand All @@ -712,7 +712,7 @@ function webp_uploads_get_image_sizes_additional_mime_type_support() {
/**
* Filters whether additional mime types are allowed for image sizes.
*
* @since n.e.x.t
* @since 1.3.0
*
* @param array $allowed_sizes A map of image size names and whether they are allowed to have additional mime types.
*/
Expand Down
29 changes: 27 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Contributors: wordpressdotorg
Requires at least: 5.8
Tested up to: 6.0
Requires PHP: 5.6
Stable tag: 1.2.0
Stable tag: 1.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: performance, images, javascript, site health, measurement, object caching
Expand All @@ -17,8 +17,8 @@ The Performance Lab plugin is a collection of modules focused on enhancing perfo

Currently the plugin includes the following performance modules:

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

== Changelog ==

= 1.3.0 =

**Enhancements**

* Images: Add replacing of images only in frontend context. ([424](https://github.com/WordPress/performance/pull/424))
* Images: Allow control for which image sizes to generate additional MIME type versions. ([415](https://github.com/WordPress/performance/pull/415))
* Images: Discard WebP image if it is larger than corresponding JPEG image. ([418](https://github.com/WordPress/performance/pull/418))
* Images: Optimize computing dominant color and transparency for images by combining the two functions. ([381](https://github.com/WordPress/performance/pull/381))
* Images: Provide fallback JPEG images in frontend when WebP is not supported by the browser. ([360](https://github.com/WordPress/performance/pull/360))
* 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))
* Images: Remove experimental label from Dominant Color module and turn on by default for new installs. ([425](https://github.com/WordPress/performance/pull/425))
* Site Health: Remove `perflab_aea_get_resource_file_size()` in favor of `wp_filesize()`. ([380](https://github.com/WordPress/performance/pull/380))
* Site Health: Update documentation link for autoloaded options. ([408](https://github.com/WordPress/performance/pull/408))
* Infrastructure: Implement mechanism to not load module if core version is available. ([390](https://github.com/WordPress/performance/pull/390))

**Bug Fixes**

* Images: Ensure incorrect usage of `webp_uploads_upload_image_mime_transforms` filter is treated correctly. ([393](https://github.com/WordPress/performance/pull/393))
* 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))
* Images: Fix an infinite loop in the WebP fallback mechanism. ([433](https://github.com/WordPress/performance/pull/433))
* Images: Fix dominant color upload process to not override potential third-party editors. ([401](https://github.com/WordPress/performance/pull/401))
* Images: Remove additional image backup sources & sizes files when attachment deleted. ([411](https://github.com/WordPress/performance/pull/411))
* Infrastructure: Avoid including .husky directory in plugin ZIP. ([421](https://github.com/WordPress/performance/pull/421))
* Infrastructure: Do not show admin pointer in multisite Network Admin. ([394](https://github.com/WordPress/performance/pull/394))

= 1.2.0 =

**Features**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/**
* Can load function to determine if module already marge in WordPress core.
*
* @since n.e.x.t
* @package performance-lab
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/**
* Can load function to determine if module already marge in WordPress core.
*
* @since n.e.x.t
* @package performance-lab
*/

Expand Down

0 comments on commit a3e1f1b

Please sign in to comment.