[wp-trac] [WordPress Trac] #61420: Plugins: Remove unassigned sprintf from wp_get_plugin_action_button()
WordPress Trac
noreply at wordpress.org
Wed Jun 12 18:13:04 UTC 2024
#61420: Plugins: Remove unassigned sprintf from wp_get_plugin_action_button()
----------------------------+----------------------------
Reporter: hellofromTonya | Owner: hellofromTonya
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 6.6
Component: Plugins | Version: 6.5
Severity: minor | Keywords:
Focuses: |
----------------------------+----------------------------
[57545] introduced `wp_get_plugin_action_button()`. After speaking with
@costdev, it appears an unassigned `sprintf` was accidentally included
([https://core.trac.wordpress.org/browser/tags/6.5/src/wp-admin/includes
/plugin-install.php#L950 the code line starts here]). A copy/paste
whoopsie.
{{{#!php
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61420>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list