Make WordPress Core

Opened 16 months ago

Closed 16 months ago

Last modified 16 months ago

#59067 closed defect (bug) (fixed)

Comment text regarding wp_min_priority_img_pixels filter in wp_get_loading_optimization_attributes function

Reported by: tmatsuur's profile tmatsuur Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.3.1 Priority: normal
Severity: normal Version: 6.3
Component: Media Keywords: has-patch fixed-major dev-reviewed commit
Focuses: docs Cc:

Description

The wp_min_priority_img_pixels filter portion of the wp_get_loading_optimization_attributes function is described as follows

/** This filter is documented in wp-admin/includes/media.php */
$wp_min_priority_img_pixels = apply_filters( 'wp_min_priority_img_pixels', 50000 );

I looked in wp-admin/includes/media.php and there is no mention of this filter.

Instead, I found a description of this filter in the wp_maybe_add_fetchpriority_high_attr function in wp-includes/media.php.

Is it possible that the wp_maybe_add_fetch_priority_high_attr function has been changed from wp-admin/includes/media.php to wp-includes/media.php?

If so, that would explain why there was "wp-admin/includes/media.php" in the comment text.

I think the following comment text is correct

/** This filter is documented in wp-includes/media.php */

Change History (15)

#1 @SergeyBiryukov
16 months ago

  • Focuses docs added
  • Milestone changed from Awaiting Review to 6.3.1

Thanks for the ticket!

Indeed, the wp_min_priority_img_pixels filter is located in wp-includes/media.php since its introduction in [56037] / #58235 so the proposed change would be correct.

This ticket was mentioned in PR #4995 on WordPress/wordpress-develop by @rajinsharwar.


16 months ago
#2

  • Keywords has-patch added

Fixing the comment text of wp-includes/media.php

Trac ticket: https://core.trac.wordpress.org/ticket/59067

#3 @rajinsharwar
16 months ago

Added the fixed comment

This ticket was mentioned in PR #4997 on WordPress/wordpress-develop by @khokansardar.


16 months ago
#4

Corrected comment text path for ticket #59067

Trac ticket: #59067

#5 @SergeyBiryukov
16 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 56386:

Docs: Correct duplicate hook reference for wp_min_priority_img_pixels.

The original filter location is wp_maybe_add_fetchpriority_high_attr() in wp-includes/media.php.

This commit updates the instance in wp_get_loading_optimization_attributes() to point to the correct file.

Follow-up to [56037], [56143], [56347].

Props tmatsuur, rajinsharwar, khokansardar.
Fixes #59067.

@SergeyBiryukov commented on PR #4995:


16 months ago
#6

Thanks for the PR! Merged in r56386.

@SergeyBiryukov commented on PR #4997:


16 months ago
#7

Thanks for the PR! Merged in r56386.

#8 @SergeyBiryukov
16 months ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for 6.3.1 consideration.

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


16 months ago

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


16 months ago

#11 @audrasjb
16 months ago

  • Keywords dev-reviewed commit added

As per today's bug scrub, marking as dev-reviewed.

#12 follow-up: @audrasjb
16 months ago

@SergeyBiryukov I wanted to backport this to branch 6.3 but I had a conflict. Do you reproduce the issue on your side?

#13 @SergeyBiryukov
16 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 56429:

Docs: Correct duplicate hook reference for wp_min_priority_img_pixels.

The original filter location is wp_maybe_add_fetchpriority_high_attr() in wp-includes/media.php.

This commit updates the instance in wp_get_loading_optimization_attributes() to point to the correct file.

Follow-up to [56037], [56143], [56347].

Props tmatsuur, rajinsharwar, khokansardar.
Reviewed by azaozz, audrasjb.
Merges [56386] to the 6.3 branch.
Fixes #59067.

#14 in reply to: ↑ 12 @SergeyBiryukov
16 months ago

Replying to audrasjb:

I wanted to backport this to branch 6.3 but I had a conflict. Do you reproduce the issue on your side?

Yeah, it's because of the changes in [56386] for trunk. I have resolved the conflicts and backported in [56429] :)

Version 0, edited 16 months ago by SergeyBiryukov (next)

#15 @audrasjb
16 months ago

Thanks! ✌️

Note: See TracTickets for help on using tickets.