Advertisements

install_dashboard

Definition:
function install_dashboard() {}

Source code

function install_dashboard() {

	?>

	<p><?php _e('Plugins extend and expand the functionality of WordPress. You may automatically install plugins from the <a href="http://wordpress.org/extend/plugins/">WordPress Plugin Directory</a> or upload a plugin in .zip format via this page.') ?></p>



	<h4><?php _e('Search') ?></h4>

	<p class="install-help"><?php _e('Search for plugins by keyword, author, or tag.') ?></p>

	<?php install_search_form(); ?>



	<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 interprated 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' => __('%d plugin'), 'multiple_text' => __('%d plugins') ) );

	}

	echo '</p><br class="clear" />';

}

2027

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: