Opened 2 years ago
Closed 2 years ago
#61420 closed defect (bug) (fixed)
Plugins: Remove unassigned sprintf from wp_get_plugin_action_button()
| Reported by: | hellofromTonya | Owned by: | hellofromTonya |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.5.5 |
| Component: | Plugins | Version: | 6.5 |
| Severity: | minor | Keywords: | has-patch commit dev-reviewed |
| Cc: | Focuses: |
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.
2 years ago
#1
- Keywords has-patch added
@rajinsharwar commented on PR #6792:
2 years ago
#2
Wondering how this was here, unnoticed...
#3
@
2 years ago
- Keywords commit added
Patch: https://github.com/WordPress/wordpress-develop/pull/6792
2 approvals. CI all green. Committing.
@hellofromTonya commented on PR #6792:
2 years ago
#5
Thank you both. Committed via https://core.trac.wordpress.org/changeset/58402.
#6
@
2 years 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Removes the unused / unassigned
sprintfcode fromwp_get_plugin_action_button().Trac ticket: https://core.trac.wordpress.org/ticket/61420