install_dashboard()
Description Description
Source Source
File: wp-admin/includes/plugin-install.php
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | function install_dashboard() { ?> <p><?php printf( __( 'Plugins extend and expand the functionality of WordPress. You may automatically install plugins from the <a href="%1$s">WordPress Plugin Directory</a> or upload a plugin in .zip format by clicking the button at the top of this page.' ), __( 'https://wordpress.org/plugins/' ) ); ?></p> <?php display_plugins_table(); ?> <div class = "plugins-popular-tags-wrapper" > <h2><?php _e( 'Popular tags' ); ?></h2> <p><?php _e( 'You may also browse based on the most popular tags in the Plugin Directory:' ); ?></p> <?php $api_tags = install_popular_tags(); echo '<p class="popular-tags">' ; if ( is_wp_error( $api_tags ) ) { echo $api_tags ->get_error_message(); } 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 ) { $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 '</p><br class="clear" /></div>' ; } |
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
2.7.0 | Introduced. |