Make WordPress Core

Changeset 33114


Ignore:
Timestamp:
07/07/2015 07:18:03 PM (10 years ago)
Author:
wonderboymusic
Message:

In install_dashboard() (plugin-install, FWIW), make sure slug is populated and degrease the unfortunate whitespace that was present.

Props tyxla.
Fixes #32889.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/plugin-install.php

    r32672 r33114  
    152152        //Set up the tags in a way which can be interpreted by wp_generate_tag_cloud()
    153153        $tags = array();
    154         foreach ( (array)$api_tags as $tag )
    155             $tags[ $tag['name'] ] = (object) array(
    156                                     'link' => esc_url( self_admin_url('plugin-install.php?tab=search&type=tag&s=' . urlencode($tag['name'])) ),
    157                                     'name' => $tag['name'],
    158                                     'id' => sanitize_title_with_dashes($tag['name']),
    159                                     'count' => $tag['count'] );
     154        foreach ( (array) $api_tags as $tag ) {
     155            $url = self_admin_url( 'plugin-install.php?tab=search&type=tag&s=' . urlencode( $tag['name'] ) );
     156            $data = array(
     157                'link' => esc_url( $url ),
     158                'name' => $tag['name'],
     159                'slug' => $tag['slug'],
     160                'id' => sanitize_title_with_dashes( $tag['name'] ),
     161                'count' => $tag['count']
     162            );
     163            $tags[ $tag['name'] ] = (object) $data;
     164        }
    160165        echo wp_generate_tag_cloud($tags, array( 'single_text' => __('%s plugin'), 'multiple_text' => __('%s plugins') ) );
    161166    }
Note: See TracChangeset for help on using the changeset viewer.