Skip to content

Commit

Permalink
Merge pull request #1827 from WordPress/publish/3.8.0
Browse files Browse the repository at this point in the history
Prepare 3.8.0 release
  • Loading branch information
westonruter authored Jan 27, 2025
2 parents e2effe6 + 9183df9 commit 46fc9cb
Show file tree
Hide file tree
Showing 27 changed files with 118 additions and 64 deletions.
6 changes: 3 additions & 3 deletions plugins/embed-optimizer/class-embed-optimizer-tag-visitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ private function reduce_layout_shifts( OD_Tag_Visitor_Context $context ): void {
* not end up being the load balanced domain used for the embed. Lastly, these domains are only for the URLs
* for GET requests, as POST requests are not likely to be part of the critical rendering path.
*
* @since n.e.x.t
* @since 0.4.1
*
* @param OD_HTML_Tag_Processor $processor Processor, with the cursor currently at an embed block.
* @return array<non-empty-string> Array of URLs to preconnect to.
Expand Down Expand Up @@ -270,7 +270,7 @@ private function get_preconnect_urls( OD_HTML_Tag_Processor $processor ): array
/**
* Adds preconnect links for embed resources.
*
* @since n.e.x.t
* @since 0.4.1
*
* @param OD_Tag_Visitor_Context $context Tag visitor context, with the cursor currently at an embed block.
*/
Expand Down Expand Up @@ -299,7 +299,7 @@ private function add_preconnect_links( OD_Tag_Visitor_Context $context ): void {
/**
* Optimizes an embed based on whether it is displayed in any initial viewport.
*
* @since n.e.x.t
* @since 0.4.1
*
* @param OD_Tag_Visitor_Context $context Tag visitor context, with the cursor currently at an embed block.
*/
Expand Down
4 changes: 2 additions & 2 deletions plugins/embed-optimizer/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: Optimizes the performance of embeds through lazy-loading, preconnecting, and reserving space to reduce layout shifts.
* Requires at least: 6.6
* Requires PHP: 7.2
* Version: 0.4.0
* Version: 0.4.1
* Author: WordPress Performance Team
* Author URI: https://make.wordpress.org/performance/
* License: GPLv2 or later
Expand Down Expand Up @@ -71,7 +71,7 @@ static function ( string $global_var_name, string $version, Closure $load ): voi
}
)(
'embed_optimizer_pending_plugin',
'0.4.0',
'0.4.1',
static function ( string $version ): void {
if ( defined( 'EMBED_OPTIMIZER_VERSION' ) ) {
return;
Expand Down
8 changes: 7 additions & 1 deletion plugins/embed-optimizer/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Contributors: wordpressdotorg
Tested up to: 6.7
Stable tag: 0.4.0
Stable tag: 0.4.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: performance, embeds
Expand Down Expand Up @@ -67,6 +67,12 @@ The [plugin source code](https://github.com/WordPress/performance/tree/trunk/plu

== Changelog ==

= 0.4.1 =

**Bug Fixes**

* Remove requirement for both mobile and desktop URL metrics to be collected for `preconnect` links to be added. ([1764](https://github.com/WordPress/performance/pull/1764))

= 0.4.0 =

**Enhancements**
Expand Down
4 changes: 2 additions & 2 deletions plugins/image-prioritizer/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Requires at least: 6.6
* Requires PHP: 7.2
* Requires Plugins: optimization-detective
* Version: 0.3.0
* Version: 0.3.1
* Author: WordPress Performance Team
* Author URI: https://make.wordpress.org/performance/
* License: GPLv2 or later
Expand Down Expand Up @@ -72,7 +72,7 @@ static function ( string $global_var_name, string $version, Closure $load ): voi
}
)(
'image_prioritizer_pending_plugin',
'0.3.0',
'0.3.1',
static function ( string $version ): void {
if ( defined( 'IMAGE_PRIORITIZER_VERSION' ) ) {
return;
Expand Down
8 changes: 7 additions & 1 deletion plugins/image-prioritizer/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Contributors: wordpressdotorg
Tested up to: 6.7
Stable tag: 0.3.0
Stable tag: 0.3.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: performance, optimization, image, lcp, lazy-load
Expand Down Expand Up @@ -70,6 +70,12 @@ The [plugin source code](https://github.com/WordPress/performance/tree/trunk/plu

== Changelog ==

= 0.3.1 =

**Bug Fixes**

* Remove erroneous check for resource initiator type when considering whether to submit LCP background image. ([1760](https://github.com/WordPress/performance/pull/1760))

= 0.3.0 =

**Enhancements**
Expand Down
4 changes: 2 additions & 2 deletions plugins/optimization-detective/class-od-element.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class OD_Element implements ArrayAccess, JsonSerializable {
/**
* Transitional XPath.
*
* @since n.e.x.t
* @since 1.0.0
* @todo Remove logic related to transitional_xpath in a subsequent release once URL Metrics have been collected with the new format.
* @var non-empty-string|null
*/
Expand Down Expand Up @@ -131,7 +131,7 @@ public function is_lcp_candidate(): bool {
* Gets XPath for element.
*
* @since 0.7.0
* @since n.e.x.t Returns the transitional XPath format. To access the underlying raw XPath, access the 'xpath' key of the jsonSerialize response.
* @since 1.0.0 Returns the transitional XPath format. To access the underlying raw XPath, access the 'xpath' key of the jsonSerialize response.
* @todo Remove logic related to transitional_xpath in a subsequent release once URL Metrics have been collected with the new format.
*
* @return non-empty-string XPath.
Expand Down
10 changes: 5 additions & 5 deletions plugins/optimization-detective/class-od-html-tag-processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ final class OD_HTML_Tag_Processor extends WP_HTML_Tag_Processor {
* Note that currently only the third item will currently be populated (index 2), as this corresponds to tags which
* are children of the `BODY` tag. This is used in {@see self::get_xpath()}.
*
* @since n.e.x.t
* @since 1.0.0
* @var array<array<string, string>>
*/
private $open_stack_attributes = array();
Expand Down Expand Up @@ -204,7 +204,7 @@ final class OD_HTML_Tag_Processor extends WP_HTML_Tag_Processor {
* This is used to store the old XPath format in a transitional period until which new URL Metrics are expected to
* have been collected to purge out references to the old format.
*
* @since n.e.x.t
* @since 1.0.0
* @var string|null
*/
private $current_xpath = null;
Expand Down Expand Up @@ -582,7 +582,7 @@ private function get_indexed_breadcrumbs(): Generator {
* Themes utilize the 'wp-site-blocks' class name in the root `DIV`. Only one attribute is currently returned,
* although potentially more could be returned if additional disambiguation is needed in the future.
*
* @since n.e.x.t
* @since 1.0.0
*
* @return array<string, string> Disambiguating attributes.
*/
Expand Down Expand Up @@ -682,7 +682,7 @@ public function get_xpath(): string {
* can simply be an alias for that one. See related logic in {@see OD_Element::get_xpath()}. This function is only
* used internally by Optimization Detective in {@see od_optimize_template_output_buffer()}.
*
* @since n.e.x.t
* @since 1.0.0
* @todo Move the logic in this method to the get_xpath() method and let this be an alias for that method once the transitional period is over.
* @access private
*
Expand Down Expand Up @@ -715,7 +715,7 @@ public function get_stored_xpath(): string {
/**
* Returns whether the processor is currently at or inside the admin bar.
*
* @since n.e.x.t
* @since 1.0.0
*
* @return bool Whether at or inside the admin bar.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ final class OD_Tag_Visitor_Context {
/**
* Visited tag state.
*
* @since n.e.x.t
* @since 1.0.0
* @var OD_Visited_Tag_State
*/
private $visited_tag_state;
Expand All @@ -78,7 +78,7 @@ public function __construct( OD_HTML_Tag_Processor $processor, OD_URL_Metric_Gro
*
* Calling this method from a tag visitor has the same effect as a tag visitor returning `true`.
*
* @since n.e.x.t
* @since 1.0.0
*/
public function track_tag(): void {
$this->visited_tag_state->track_tag();
Expand Down
12 changes: 6 additions & 6 deletions plugins/optimization-detective/class-od-visited-tag-state.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Optimization Detective: OD_Visited_Tag_State class
*
* @package optimization-detective
* @since n.e.x.t
* @since 1.0.0
*/

// @codeCoverageIgnoreStart
Expand All @@ -15,15 +15,15 @@
/**
* State for a tag visitation when visited by tag visitors while walking over a document.
*
* @since n.e.x.t
* @since 1.0.0
* @access private
*/
final class OD_Visited_Tag_State {

/**
* Whether the tag should be tracked among the elements in URL Metrics.
*
* @since n.e.x.t
* @since 1.0.0
* @var bool
*/
private $should_track_tag;
Expand All @@ -38,7 +38,7 @@ public function __construct() {
/**
* Marks the tag for being tracked in URL Metrics.
*
* @since n.e.x.t
* @since 1.0.0
*/
public function track_tag(): void {
$this->should_track_tag = true;
Expand All @@ -47,7 +47,7 @@ public function track_tag(): void {
/**
* Whether the tag should be tracked among the elements in URL Metrics.
*
* @since n.e.x.t
* @since 1.0.0
* @return bool Whether tracked.
*/
public function is_tag_tracked(): bool {
Expand All @@ -59,7 +59,7 @@ public function is_tag_tracked(): bool {
*
* This should be called after tag visitors have been invoked on a tag.
*
* @since n.e.x.t
* @since 1.0.0
*/
public function reset(): void {
$this->should_track_tag = false;
Expand Down
2 changes: 1 addition & 1 deletion plugins/optimization-detective/detection.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function od_get_detection_script( string $slug, OD_URL_Metric_Group_Collection $
* Note that the attribution build is slightly larger than the standard build, so this is why it is not used by default.
* The additional attribution data is made available to client-side extension script modules registered via the `od_extension_module_urls` filter.
*
* @since n.e.x.t
* @since 1.0.0
*
* @param bool $use_attribution_build Whether to use the attribution build.
*/
Expand Down
4 changes: 2 additions & 2 deletions plugins/optimization-detective/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: Provides an API for leveraging real user metrics to detect optimizations to apply on the frontend to improve page performance.
* Requires at least: 6.6
* Requires PHP: 7.2
* Version: 0.9.0
* Version: 1.0.0-beta1
* Author: WordPress Performance Team
* Author URI: https://make.wordpress.org/performance/
* License: GPLv2 or later
Expand Down Expand Up @@ -71,7 +71,7 @@ static function ( string $global_var_name, string $version, Closure $load ): voi
}
)(
'optimization_detective_pending_plugin',
'0.9.0',
'1.0.0-beta1',
static function ( string $version ): void {
if ( defined( 'OPTIMIZATION_DETECTIVE_VERSION' ) ) {
return;
Expand Down
2 changes: 1 addition & 1 deletion plugins/optimization-detective/optimization.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function_exists( 'perflab_server_timing_use_output_buffer' )
*
* This is only used when WP_DEBUG is enabled.
*
* @since n.e.x.t
* @since 1.0.0
* @access private
*
* @param string[] $reasons Reason messages.
Expand Down
24 changes: 23 additions & 1 deletion plugins/optimization-detective/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Contributors: wordpressdotorg
Tested up to: 6.7
Stable tag: 0.9.0
Stable tag: 1.0.0-beta1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: performance, optimization, rum
Expand Down Expand Up @@ -55,6 +55,28 @@ The [plugin source code](https://github.com/WordPress/performance/tree/trunk/plu

== Changelog ==

= 1.0.0-beta1 =

**Enhancements**

* Add site health check to detect blocked REST API and short-circuit optimization when unavailable. ([1762](https://github.com/WordPress/performance/pull/1762))
* Allow extensions to opt in to using the web-vitals attribution build via the `od_use_web_vitals_attribution_build` filter. ([1759](https://github.com/WordPress/performance/pull/1759))
* Disambiguate XPaths for children of `BODY` with `id`, `class`, or `role` attributes. ([1797](https://github.com/WordPress/performance/pull/1797))
* Eliminate varying URL Metrics by logged-in state and discontinue disabling optimization by default for admins. ([1788](https://github.com/WordPress/performance/pull/1788))
* Improve test coverage for Optimization Detective. ([1817](https://github.com/WordPress/performance/pull/1817))
* Introduce `OD_Tag_Visitor_Context::track_tag()` method as alternative for returning `true` in tag visitor callback. ([1821](https://github.com/WordPress/performance/pull/1821))
* Omit element node index in XPaths up to children of BODY. ([1790](https://github.com/WordPress/performance/pull/1790))
* Skip visiting tags in the Admin Bar when optimizing a page. ([1816](https://github.com/WordPress/performance/pull/1816))

**Bug Fixes**

* Ensure optimization is performed in the wp-env local environment and log debug messages to console when disabled. ([1822](https://github.com/WordPress/performance/pull/1822))
* Skip visiting any tags inside of `NOSCRIPT` elements. ([1783](https://github.com/WordPress/performance/pull/1783))

**Documentation**

* Move Optimization Detective docs into [`README.md`](https://github.com/WordPress/performance/tree/trunk/plugins/optimization-detective/docs). ([1763](https://github.com/WordPress/performance/pull/1763))

= 0.9.0 =

**Enhancements**
Expand Down
18 changes: 9 additions & 9 deletions plugins/optimization-detective/site-health.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Site Health checks.
*
* @package optimization-detective
* @since n.e.x.t
* @since 1.0.0
*/

// @codeCoverageIgnoreStart
Expand All @@ -15,7 +15,7 @@
/**
* Adds the Optimization Detective REST API check to site health tests.
*
* @since n.e.x.t
* @since 1.0.0
* @access private
*
* @param array{direct: array<string, array{label: string, test: string}>}|mixed $tests Site Health Tests.
Expand All @@ -39,7 +39,7 @@ function od_add_rest_api_availability_test( $tests ): array {
/**
* Tests availability of the Optimization Detective REST API endpoint.
*
* @since n.e.x.t
* @since 1.0.0
* @access private
*
* @return array{label: string, status: string, badge: array{label: string, color: string}, description: string, actions: string, test: string} Result.
Expand Down Expand Up @@ -68,7 +68,7 @@ function od_test_rest_api_availability(): array {
* the admin. The reason for storing the negative unavailable state as opposed to the positive available state is that
* when an option does not exist then `get_option()` returns `false` which is the same falsy value as the stored `'0'`.
*
* @since n.e.x.t
* @since 1.0.0
* @access private
*
* @return bool Whether unavailable.
Expand All @@ -80,7 +80,7 @@ function od_is_rest_api_unavailable(): bool {
/**
* Tests availability of the Optimization Detective REST API endpoint.
*
* @since n.e.x.t
* @since 1.0.0
* @access private
*
* @param array<string, mixed>|WP_Error $response REST API response.
Expand Down Expand Up @@ -165,7 +165,7 @@ function od_compose_site_health_result( $response ): array {
/**
* Gets the response to an Optimization Detective REST API store request to confirm it is available to unauthenticated requests.
*
* @since n.e.x.t
* @since 1.0.0
* @access private
*
* @param bool $use_cached Whether to use a previous response cached in a transient.
Expand Down Expand Up @@ -195,7 +195,7 @@ function od_get_rest_api_health_check_response( bool $use_cached ) {
/**
* Renders an admin notice if the REST API health check fails.
*
* @since n.e.x.t
* @since 1.0.0
* @access private
*
* @param bool $in_plugin_row Whether the notice is to be printed in the plugin row.
Expand Down Expand Up @@ -251,7 +251,7 @@ function od_maybe_render_rest_api_health_check_admin_notice( bool $in_plugin_row
/**
* Displays an admin notice on the plugin row if the REST API health check fails.
*
* @since n.e.x.t
* @since 1.0.0
* @access private
*
* @param string $plugin_file Plugin file.
Expand All @@ -273,7 +273,7 @@ function od_render_rest_api_health_check_admin_notice_in_plugin_row( string $plu
* shown at the `admin_notices` action once, the notice will only be displayed inline with the plugin row thereafter
* via {@see od_render_rest_api_health_check_admin_notice_in_plugin_row()}.
*
* @since n.e.x.t
* @since 1.0.0
* @access private
*/
function od_maybe_run_rest_api_health_check(): void {
Expand Down
Loading

0 comments on commit 46fc9cb

Please sign in to comment.