X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/f5fcdc7994bb67cce809bc4777944ae8b7fad4a4..53f4633144ed68c8b8fb5861f992b5489894a940:/wp-admin/includes/plugin-install.php?ds=sidebyside diff --git a/wp-admin/includes/plugin-install.php b/wp-admin/includes/plugin-install.php index b8cf32f0..ab776e8d 100644 --- a/wp-admin/includes/plugin-install.php +++ b/wp-admin/includes/plugin-install.php @@ -130,6 +130,9 @@ function install_popular_tags( $args = array() ) { return $tags; } +/** + * @since 2.7.0 + */ function install_dashboard() { ?>

WordPress Plugin Directory or upload a plugin in .zip format via this page.' ), 'https://wordpress.org/plugins/', self_admin_url( 'plugin-install.php?tab=upload' ) ); ?>

@@ -148,22 +151,28 @@ 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 '


'; } -add_action( 'install_plugins_featured', 'install_dashboard' ); /** * Display search form for searching plugins. * * @since 2.7.0 + * + * @param bool $type_selector */ function install_search_form( $type_selector = true ) { $type = isset($_REQUEST['type']) ? wp_unslash( $_REQUEST['type'] ) : 'term'; @@ -209,7 +218,6 @@ function install_plugins_upload() {