install_dashboard

The WordPress Core install dashboard function.

Description

install_dashboard(); 

Usage

  1. if ( !function_exists( 'install_dashboard' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/plugin-install.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = install_dashboard(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/plugin-install.php  
  1. function install_dashboard() { 
  2. ?> 
  3. <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> 
  4.  
  5. <?php display_plugins_table(); ?> 
  6.  
  7. <div class="plugins-popular-tags-wrapper"> 
  8. <h2><?php _e( 'Popular tags' ) ?></h2> 
  9. <p><?php _e( 'You may also browse based on the most popular tags in the Plugin Directory:' ) ?></p> 
  10. <?php 
  11.  
  12. $api_tags = install_popular_tags(); 
  13.  
  14. echo '<p class="popular-tags">'; 
  15. if ( is_wp_error($api_tags) ) { 
  16. echo $api_tags->get_error_message(); 
  17. } else { 
  18. //Set up the tags in a way which can be interpreted by wp_generate_tag_cloud() 
  19. $tags = array(); 
  20. foreach ( (array) $api_tags as $tag ) { 
  21. $url = self_admin_url( 'plugin-install.php?tab=search&type=tag&s=' . urlencode( $tag['name'] ) ); 
  22. $data = array( 
  23. 'link' => esc_url( $url ),  
  24. 'name' => $tag['name'],  
  25. 'slug' => $tag['slug'],  
  26. 'id' => sanitize_title_with_dashes( $tag['name'] ),  
  27. 'count' => $tag['count'] 
  28. ); 
  29. $tags[ $tag['name'] ] = (object) $data; 
  30. echo wp_generate_tag_cloud($tags, array( 'single_text' => __('%s plugin'), 'multiple_text' => __('%s plugins') ) ); 
  31. echo '</p><br class="clear" /></div>';