WordPress.org

Make WordPress Core

Opened 2 months ago

Closed 5 weeks ago

#46269 closed defect (bug) (fixed)

Update `wp_update_php_annotation()` and `wp_get_update_php_annotation()` for parameters

Reported by: afragen Owned by: desrosj
Milestone: 5.2 Priority: normal
Severity: normal Version: 5.1
Component: Plugins Keywords: servehappy has-patch
Focuses: Cc:

Description

Update the instances of wp_update_php_annotation() and wp_get_update_php_annotation() with the appropriate passed parameters.

In some instances it will be no parameters and in other instances it will be, wp_update_php_annotation( '<br><span class="description">', '</span>' ) and wp_get_update_php_annotation( '<br><span class="description">', '</span>' )

Part 2 for #46044

Attachments (4)

46269.diff (985 bytes) - added by afragen 6 weeks ago.
This patch created on a patched version of trunk
46269.2.diff (1.9 KB) - added by afragen 5 weeks ago.
No more CSS, other fixes needed
46269.3.diff (1.4 KB) - added by afragen 5 weeks ago.
Thanks @desrosj. Closes then opens p tag
46269.4.diff (1.2 KB) - added by desrosj 5 weeks ago.

Download all attachments as: .zip

Change History (16)

#1 @pento
2 months ago

  • Milestone changed from Awaiting Review to 5.2

This ticket was mentioned in Slack in #core-php by spacedmonkey. View the logs.


6 weeks ago

This ticket was mentioned in Slack in #core-php by afragen. View the logs.


6 weeks ago

#4 @afragen
6 weeks ago

So here's my issue for #46269. It really relies on 43987, 44350, 46044, and 46275 to be committed to reliably write the patch.

If those patches are in place there are 2 locations where I need to pass parameters to as follows wp_update_php_annotation( '<br><span class="description">', '</span>' ) I'll try to write the patch on a _patched_ core but it's less than ideal.

Those locations seem to be wp-admin/includes/update.php:468 and wp-admin/update-core.php:307

I can have the patch in place within 12 hours, give or take of those other commits. or I can try to write a patch that may not cleanly apply.

@afragen
6 weeks ago

This patch created on a patched version of trunk

#5 @afragen
6 weeks ago

  • Keywords has-patch dev-feedback needs-testing added; needs-patch removed

#6 @desrosj
5 weeks ago

  • Keywords dev-feedback needs-testing removed
  • Milestone 5.2 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Let's close this out. The changes being proposed in 46269.diff have not been committed yet and are adjustments to the code in #44350 and #43987. Let's make these adjustments there before committing instead of patching this after the fact.

@afragen
5 weeks ago

No more CSS, other fixes needed

#7 @afragen
5 weeks ago

The patch above should obviate #46275 and the CSS changes.

Last edited 5 weeks ago by afragen (previous) (diff)

#8 @afragen
5 weeks ago

  • Resolution duplicate deleted
  • Status changed from closed to reopened

#9 @desrosj
5 weeks ago

  • Keywords needs-refresh added

The <span> tag in the More Details area is causing a weird line-height and different padding at the bottom. That one can be changed to use the default <p class="description"> without causing any markup issues.

For the plugin cards, let's add another <br /> to provide a bit of spacing.

@afragen
5 weeks ago

Thanks @desrosj. Closes then opens p tag

#10 @afragen
5 weeks ago

  • Version 5.1 deleted

Last patch update provides a better solution that a double <br><br>. All @desrosj's idea. 👏🏻

#11 @desrosj
5 weeks ago

  • Keywords needs-refresh removed
  • Milestone set to 5.2
  • Version set to 5.1

The text color assigned to p.descriptions does not meet the minimum contrast required for accessibility standards. Removing that gets rid of the italics, but ensures proper contrast.

@desrosj
5 weeks ago

#12 @desrosj
5 weeks ago

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

In 44936:

General: Prevent nested paragraph tags when displaying PHP update annotations.

This change utilizes the new parameters accepted by wp_update_php_annotation() introduced in [44935] to prevent nested <p> tags when displaying the PHP update annotation.

Props afragen, desrosj.
Fixes #46269.

Note: See TracTickets for help on using tickets.