Opened 6 months ago
Closed 6 months ago
#61420 closed defect (bug) (fixed)
Plugins: Remove unassigned sprintf from wp_get_plugin_action_button()
Reported by: | hellofromTonya | Owned by: | hellofromTonya |
---|---|---|---|
Milestone: | 6.5.5 | Priority: | normal |
Severity: | minor | Version: | 6.5 |
Component: | Plugins | Keywords: | has-patch commit dev-reviewed |
Focuses: | Cc: |
Description
[57545] introduced wp_get_plugin_action_button()
. After speaking with @costdev, it appears an unassigned sprintf
was accidentally included (the code line starts here). A copy/paste whoopsie.
sprintf(
'<a class="install-now button" data-slug="%s" href="%s" aria-label="%s" data-name="%s" role="button">%s</a>',
esc_attr( $data->slug ),
esc_url( $status['url'] ),
/* translators: %s: Plugin name and version. */
esc_attr( sprintf( _x( 'Install %s now', 'plugin' ), $name ) ),
esc_attr( $name ),
_x( 'Install Now', 'plugin' )
);
As this code does not assign to a variable, it is not used and thus dead code. This ticket will remove it.
Change History (10)
This ticket was mentioned in PR #6792 on WordPress/wordpress-develop by @hellofromTonya.
6 months ago
#1
- Keywords has-patch added
@rajinsharwar commented on PR #6792:
6 months ago
#2
Wondering how this was here, unnoticed...
#3
@
6 months ago
- Keywords commit added
Patch: https://github.com/WordPress/wordpress-develop/pull/6792
2 approvals. CI all green. Committing.
@hellofromTonya commented on PR #6792:
6 months ago
#5
Thank you both. Committed via https://core.trac.wordpress.org/changeset/58402.
#6
@
6 months ago
@jorbin @costdev this is another good candidate to backport to 6.5 branch if a 6.5.5 is planned. Also noting, it might be a good one to backport anyway as it doesn't affect production code, but rather removes dead code to avoid confusion.
Removes the unused / unassigned
sprintf
code fromwp_get_plugin_action_button()
.Trac ticket: https://core.trac.wordpress.org/ticket/61420