display_plugins_categories_list()

Display plugin content based on plugin category (using tags).


Source

File: wp-admin/includes/plugin-install.php

function display_plugins_categories_list() {
	$categories = array(
		'form'         => __( 'Forms' ),
		'widget'       => __( 'Widgets' ),
		'admin'        => __( 'Admin Utilities' ),
		'page-builder' => __( 'Page Builders' ),
		'e-commerce'   => __( 'eCommerce' ),
		'media'        => __( 'Media' ),
		'seo'          => __( 'SEO' ),
		'ads'          => __( 'Advertising' ),
		'social'       => __( 'Social Networking' ),
		'membership'   => __( 'Membership' ),
		'newsletter'   => __( 'Newsletters' ),
		'forum'        => __( 'Forums' ),
	);
	?>
	<div class="plugin-categories-filter-container">
		<p><?php _e( 'These are some of the most common types of plugins. Not all categories are represented here.' ); ?></p>
		<ul class="plugin-categories-filter">
		<?php
		foreach ( $categories as $tag => $label ) {
			$tag   = esc_attr( $tag );
			$label = esc_html( $label );
			$href  = esc_attr( self_admin_url(
				'plugin-install.php?tab=search&type=tag&s=' . urlencode( $tag )
			) );
			echo "\t\t\t<li><a href=\"$href\" data-plugin-tag=\"$tag\">$label</a></li>\n";
		}
		?>
		</ul>
	</div>
	<?php
	display_plugins_table();
}


Changelog

Changelog
Version Description
1.0.0 Introduced.