From a297e1532ec4378a47eb6dedab24c224199c535a Mon Sep 17 00:00:00 2001
From: Scott Taylor
Date: Tue, 7 Jul 2015 19:18:03 +0000
Subject: [PATCH] In `install_dashboard()` (`plugin-install`, FWIW), make sure
`slug` is populated and degrease the unfortunate whitespace that was present.
Props tyxla.
Fixes #32889.
git-svn-id: https://develop.svn.wordpress.org/trunk@33114 602fd350-edb4-49c9-b593-d223f7449a82
---
src/wp-admin/includes/plugin-install.php | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/wp-admin/includes/plugin-install.php b/src/wp-admin/includes/plugin-install.php
index a6dbabb0cc..ab776e8dd2 100644
--- a/src/wp-admin/includes/plugin-install.php
+++ b/src/wp-admin/includes/plugin-install.php
@@ -151,12 +151,17 @@ function install_dashboard() {
} else {
//Set up the tags in a way which can be interpreted by wp_generate_tag_cloud()
$tags = array();
- foreach ( (array)$api_tags as $tag )
- $tags[ $tag['name'] ] = (object) array(
- 'link' => esc_url( self_admin_url('plugin-install.php?tab=search&type=tag&s=' . urlencode($tag['name'])) ),
- 'name' => $tag['name'],
- 'id' => sanitize_title_with_dashes($tag['name']),
- 'count' => $tag['count'] );
+ foreach ( (array) $api_tags as $tag ) {
+ $url = self_admin_url( 'plugin-install.php?tab=search&type=tag&s=' . urlencode( $tag['name'] ) );
+ $data = array(
+ 'link' => esc_url( $url ),
+ 'name' => $tag['name'],
+ 'slug' => $tag['slug'],
+ 'id' => sanitize_title_with_dashes( $tag['name'] ),
+ 'count' => $tag['count']
+ );
+ $tags[ $tag['name'] ] = (object) $data;
+ }
echo wp_generate_tag_cloud($tags, array( 'single_text' => __('%s plugin'), 'multiple_text' => __('%s plugins') ) );
}
echo '
';