Make WordPress Core

Opened 7 months ago

Closed 7 months ago

Last modified 7 months ago

#61546 closed defect (bug) (fixed)

Plugin Dependencies: Remove unwanted `<p></p>` tags

Reported by: mukesh27's profile mukesh27 Owned by: costdev's profile costdev
Milestone: 6.7 Priority: normal
Severity: normal Version: 6.5
Component: Plugins Keywords: has-patch commit
Focuses: administration Cc:

Description

In [57545], WordPress introduced plugin dependencies, and in [57769], some improvements were made. However, because of these changes, add_dependencies_to_dependent_plugin_row() is returning some unwanted empty <p></p> tags.

Check the attached screenshot for more information.

Attachments (1)

Before.png (421.0 KB) - added by mukesh27 7 months ago.

Download all attachments as: .zip

Change History (8)

@mukesh27
7 months ago

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


7 months ago
#1

  • Keywords has-patch added; needs-patch removed

@mukesh27 commented on PR #6951:


7 months ago
#2

Before Patch:
https://github.com/WordPress/wordpress-develop/assets/10103365/e377fd1c-0395-46b7-bcff-bdc5ca0727df

After Patch:
https://github.com/WordPress/wordpress-develop/assets/10103365/72f37ea2-7bc3-4cec-8dd7-cc1698a59900

#3 @mukesh27
7 months ago

  • Milestone changed from Awaiting Review to 6.7

#4 @costdev
7 months ago

  • Owner changed from mukesh27 to costdev
  • Status changed from assigned to reviewing

#5 @costdev
7 months ago

  • Keywords commit added

Introduced in [57769] when wp_get_admin_notice() returns paragraph tags, making the previous tags unnecessary.

Tested PR 6951 and it looks good to go.

Marking for commit.

Last edited 7 months ago by costdev (previous) (diff)

#6 @costdev
7 months ago

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

In 58616:

Plugins: Remove extra paragraph from plugin row dependency notice.

In WP_Plugins_List_Table::add_dependencies_to_dependent_plugin_row(), a sprintf() call previously wrapped the %2$s placeholder in paragraph tags.

[57769] changed the placeholder's value to use wp_get_admin_notice(), which returns a paragraph-wrapped notice by default. As a result, the previous paragraph tags produced an extra, empty paragraph.

This removes the paragraph tags around the %2$s placeholder.

Follow-up to [57545], [57714], [57769].

Props mukesh27.
Fixes #61546.

@costdev commented on PR #6951:


7 months ago
#7

Committed in r58616.

Note: See TracTickets for help on using tickets.