install_dashboard

The timeline below displays how wordpress function install_dashboard has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Displays the Featured tab of Add Plugins screen.
 *
 * @since 2.7.0
 */
function install_dashboard()
{
    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(
            /* translators: %s: Number of plugins. */
            'single_text' => __('%s plugin'),
            /* translators: %s: Number of plugins. */
            'multiple_text' => __('%s plugins'),
        ));
    }
    echo '</p><br class="clear" /></div>';
}

WordPress Version: 5.4

/**
 * @since 2.7.0
 */
function install_dashboard()
{
    ?>
	<p>
		<?php 
    printf(
        /* translators: %s: https://wordpress.org/plugins/ */
        __('Plugins extend and expand the functionality of WordPress. You may automatically install plugins from the <a href="%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(
            /* translators: %s: Number of plugins. */
            'single_text' => __('%s plugin'),
            /* translators: %s: Number of plugins. */
            'multiple_text' => __('%s plugins'),
        ));
    }
    echo '</p><br class="clear" /></div>';
}

WordPress Version: 5.3

/**
 * @since 2.7.0
 */
function install_dashboard()
{
    ?>
	<p>
		<?php 
    printf(
        /* translators: %s: https://wordpress.org/plugins/ */
        __('Plugins extend and expand the functionality of WordPress. You may automatically install plugins from the <a href="%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(
            /* translators: %s: Number of plugins. */
            'single_text' => __('%s plugin'),
            /* translators: %s: Number of plugins. */
            'multiple_text' => __('%s plugins'),
        ));
    }
    echo '</p><br class="clear" /></div>';
}

WordPress Version: 4.7

/**
 * @since 2.7.0
 */
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>';
}

WordPress Version: 4.6

/**
 * @since 2.7.0
 */
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>';
}

WordPress Version: 4.4

/**
 * @since 2.7.0
 */
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 via <a href="%2$s">this page</a>.'), 'https://wordpress.org/plugins/', self_admin_url('plugin-install.php?tab=upload'));
    ?></p>

	<?php 
    display_plugins_table();
    ?>

	<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" />';
}

WordPress Version: 4.3

/**
 * @since 2.7.0
 */
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 via <a href="%2$s">this page</a>.'), 'https://wordpress.org/plugins/', self_admin_url('plugin-install.php?tab=upload'));
    ?></p>

	<?php 
    display_plugins_table();
    ?>

	<h3><?php 
    _e('Popular tags');
    ?></h3>
	<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" />';
}

WordPress Version: 4.0

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 via <a href="%2$s">this page</a>.'), 'https://wordpress.org/plugins/', self_admin_url('plugin-install.php?tab=upload'));
    ?></p>

	<?php 
    display_plugins_table();
    ?>

	<h3><?php 
    _e('Popular tags');
    ?></h3>
	<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) {
            $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']);
        }
        echo wp_generate_tag_cloud($tags, array('single_text' => __('%s plugin'), 'multiple_text' => __('%s plugins')));
    }
    echo '</p><br class="clear" />';
}

WordPress Version: 3.9

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 via <a href="%2$s">this page</a>.'), 'https://wordpress.org/plugins/', self_admin_url('plugin-install.php?tab=upload'));
    ?></p>

	<h4><?php 
    _e('Search');
    ?></h4>
	<?php 
    install_search_form(false);
    ?>

	<h4><?php 
    _e('Popular tags');
    ?></h4>
	<p class="install-help"><?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) {
            $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']);
        }
        echo wp_generate_tag_cloud($tags, array('single_text' => __('%s plugin'), 'multiple_text' => __('%s plugins')));
    }
    echo '</p><br class="clear" />';
}

WordPress Version: 3.7

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 via <a href="%2$s">this page</a>.'), 'http://wordpress.org/plugins/', self_admin_url('plugin-install.php?tab=upload'));
    ?></p>

	<h4><?php 
    _e('Search');
    ?></h4>
	<?php 
    install_search_form(false);
    ?>

	<h4><?php 
    _e('Popular tags');
    ?></h4>
	<p class="install-help"><?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) {
            $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']);
        }
        echo wp_generate_tag_cloud($tags, array('single_text' => __('%s plugin'), 'multiple_text' => __('%s plugins')));
    }
    echo '</p><br class="clear" />';
}