diff options
Diffstat (limited to '')
-rw-r--r-- | wp-admin/includes/plugin-install.php | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/wp-admin/includes/plugin-install.php b/wp-admin/includes/plugin-install.php index a3afbcb..704d81b 100644 --- a/wp-admin/includes/plugin-install.php +++ b/wp-admin/includes/plugin-install.php @@ -917,7 +917,7 @@ function install_plugin_information() { * } * @param bool $compatible_php The result of a PHP compatibility check. * @param bool $compatible_wp The result of a WP compatibility check. - * @return string $button The markup for the dependency row button. + * @return string The markup for the dependency row button. An empty string if the user does not have capabilities. */ function wp_get_plugin_action_button( $name, $data, $compatible_php, $compatible_wp ) { $button = ''; @@ -947,16 +947,6 @@ function wp_get_plugin_action_button( $name, $data, $compatible_php, $compatible $all_plugin_dependencies_installed = $installed_plugin_dependencies_count === $plugin_dependencies_count; $all_plugin_dependencies_active = $active_plugin_dependencies_count === $plugin_dependencies_count; - sprintf( - '<a class="install-now button" data-slug="%s" href="%s" aria-label="%s" data-name="%s">%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' ) - ); - if ( current_user_can( 'install_plugins' ) || current_user_can( 'update_plugins' ) ) { switch ( $status['status'] ) { case 'install': @@ -1053,7 +1043,7 @@ function wp_get_plugin_action_button( $name, $data, $compatible_php, $compatible } break; } - - return $button; } + + return $button; } |