Skip to content

Commit 625a713

Browse files
authored
Merge pull request #1276 from WordPress/publish/image-prioritizer
Finalize Image Prioritizer 0.1.0 and Optimization Detective 0.3.0 for standalone plugin releases
2 parents bf5e1ad + 7f68623 commit 625a713

11 files changed

+31
-24
lines changed

plugins/image-prioritizer/class-image-prioritizer-background-image-styled-tag-visitor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Image Prioritizer: IP_Background_Image_Styled_Tag_Visitor class
44
*
55
* @package image-prioritizer
6-
* @since n.e.x.t
6+
* @since 0.1.0
77
*/
88

99
// Exit if accessed directly.
@@ -14,7 +14,7 @@
1414
/**
1515
* Visitor for the tag walker that optimizes elements with background-image styles.
1616
*
17-
* @since n.e.x.t
17+
* @since 0.1.0
1818
* @access private
1919
*/
2020
final class Image_Prioritizer_Background_Image_Styled_Tag_Visitor extends Image_Prioritizer_Tag_Visitor {

plugins/image-prioritizer/class-image-prioritizer-img-tag-visitor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Image Prioritizer: IP_Img_Tag_Visitor class
44
*
55
* @package image-prioritizer
6-
* @since n.e.x.t
6+
* @since 0.1.0
77
*/
88

99
// Exit if accessed directly.
@@ -14,7 +14,7 @@
1414
/**
1515
* Visitor for the tag walker that optimizes IMG tags.
1616
*
17-
* @since n.e.x.t
17+
* @since 0.1.0
1818
* @access private
1919
*/
2020
final class Image_Prioritizer_Img_Tag_Visitor extends Image_Prioritizer_Tag_Visitor {

plugins/image-prioritizer/class-image-prioritizer-tag-visitor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Image Prioritizer: IP_Image_Tag_Visitor class
44
*
55
* @package image-prioritizer
6-
* @since n.e.x.t
6+
* @since 0.1.0
77
*/
88

99
// Exit if accessed directly.
@@ -14,7 +14,7 @@
1414
/**
1515
* Visitor for the tag walker that optimizes image tags.
1616
*
17-
* @since n.e.x.t
17+
* @since 0.1.0
1818
* @access private
1919
*/
2020
abstract class Image_Prioritizer_Tag_Visitor {

plugins/image-prioritizer/helper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Helper functions for Image Prioritizer.
44
*
55
* @package image-prioritizer
6-
* @since n.e.x.t
6+
* @since 0.1.0
77
*/
88

99
if ( ! defined( 'ABSPATH' ) ) {
@@ -15,7 +15,7 @@
1515
*
1616
* See {@see 'wp_head'}.
1717
*
18-
* @since n.e.x.t
18+
* @since 0.1.0
1919
*/
2020
function image_prioritizer_render_generator_meta_tag(): void {
2121
// Use the plugin slug as it is immutable.
@@ -25,7 +25,7 @@ function image_prioritizer_render_generator_meta_tag(): void {
2525
/**
2626
* Registers tag visitors for images.
2727
*
28-
* @since n.e.x.t
28+
* @since 0.1.0
2929
*
3030
* @param OD_Tag_Visitor_Registry $registry Tag visitor registry.
3131
* @param OD_URL_Metrics_Group_Collection $url_metrics_group_collection URL Metrics Group Collection.

plugins/image-prioritizer/hooks.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Hook callbacks used for Image Prioritizer.
44
*
55
* @package image-prioritizer
6-
* @since n.e.x.t
6+
* @since 0.1.0
77
*/
88

99
if ( ! defined( 'ABSPATH' ) ) {

plugins/image-prioritizer/readme.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Requires PHP: 7.2
77
Stable tag: 0.1.0
88
License: GPLv2 or later
99
License URI: https://www.gnu.org/licenses/gpl-2.0.html
10-
Tags: performance, images
10+
Tags: performance, optimization, image, lcp, lazy-load
1111

1212
Optimizes LCP image loading with `fetchpriority=high` and applies image lazy-loading by leveraging client-side detection with real user metrics.
1313

@@ -24,7 +24,9 @@ In addition to prioritizing the loading of the LCP image, this plugin also optim
2424

2525
If an image does not appear in the initial viewport for any of these viewport groups, then `loading=lazy` is added to the `img` element.
2626

27-
Note that by default, URL Metrics are not gathered for administrator users, since they are not normal site visitors, and it is likely that additional elements will be present on the page which are not also shown to non-administrators.
27+
👉 **Note:** This plugin optimizes pages for actual visitors, and it depends on visitors to optimize pages (since URL metrics need to be collected). As such, you won't see optimizations applied immediately after activating the plugin. And since administrator users are not normal visitors typically, optimizations are not applied for admins by default.
28+
29+
There are currently **no settings** and no user interface for this plugin since it is designed to work without any configuration.
2830

2931
This plugin requires the [Optimization Detective](https://wordpress.org/plugins/optimization-detective/) plugin as a dependency. Please refer to that plugin for additional background on how this plugin works as well as additional developer options.
3032

plugins/optimization-detective/class-od-html-tag-walker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ public function append_body_html( string $html ): bool {
414414
* This is a wrapper around the underlying WP_HTML_Tag_Processor method of the same name since only a limited number of
415415
* methods can be exposed to prevent moving the pointer in such a way as the breadcrumb calculation is invalidated.
416416
*
417-
* @since n.e.x.t
417+
* @since 0.3.0
418418
* @see WP_HTML_Tag_Processor::get_tag()
419419
*
420420
* @return string|null Name of currently matched tag in input HTML, or `null` if none found.

plugins/optimization-detective/class-od-preload-link-collection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Optimization Detective: OD_Preload_Link_Collection class
44
*
55
* @package optimization-detective
6-
* @since n.e.x.t
6+
* @since 0.3.0
77
*/
88

99
// Exit if accessed directly.
@@ -29,7 +29,7 @@
2929
* as: 'audio'|'document'|'embed'|'fetch'|'font'|'image'|'object'|'script'|'style'|'track'|'video'|'worker'
3030
* }
3131
*
32-
* @since n.e.x.t
32+
* @since 0.3.0
3333
* @access private
3434
*/
3535
final class OD_Preload_Link_Collection implements Countable {

plugins/optimization-detective/class-od-tag-visitor-registry.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Optimization Detective: OD_Tag_Visitor_Registry class
44
*
55
* @package optimization-detective
6-
* @since n.e.x.t
6+
* @since 0.3.0
77
*/
88

99
// Exit if accessed directly.
@@ -18,7 +18,7 @@
1818
*
1919
* @implements IteratorAggregate<string, TagVisitorCallback>
2020
*
21-
* @since n.e.x.t
21+
* @since 0.3.0
2222
* @access private
2323
*/
2424
final class OD_Tag_Visitor_Registry implements Countable, IteratorAggregate {

plugins/optimization-detective/optimization.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ function od_optimize_template_output_buffer( string $buffer ): string {
167167
/**
168168
* Fires to register tag visitors before walking over the document to perform optimizations.
169169
*
170-
* @since n.e.x.t
170+
* @since 0.3.0
171171
*
172172
* @param OD_Tag_Visitor_Registry $tag_visitor_registry Tag visitor registry.
173173
* @param OD_URL_Metrics_Group_Collection $group_collection URL Metrics Group collection.

0 commit comments

Comments
 (0)