return $tags;
}
+/**
+ * @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>
} 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'] );
+ 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" />';
}
-add_action( 'install_plugins_featured', 'install_dashboard' );
/**
* Display search form for searching plugins.
*
* @since 2.7.0
+ *
+ * @param bool $type_selector
*/
function install_search_form( $type_selector = true ) {
$type = isset($_REQUEST['type']) ? wp_unslash( $_REQUEST['type'] ) : 'term';
</div>
<?php
}
-add_action('install_plugins_upload', 'install_plugins_upload' );
/**
* Show a username form for the favorites page
* Display plugin content based on plugin list.
*
* @since 2.7.0
+ *
+ * @global WP_List_Table $wp_list_table
*/
function display_plugins_table() {
global $wp_list_table;
</form>
<?php
}
-add_action( 'install_plugins_search', 'display_plugins_table' );
-add_action( 'install_plugins_popular', 'display_plugins_table' );
-add_action( 'install_plugins_recommended', 'display_plugins_table' );
-add_action( 'install_plugins_new', 'display_plugins_table' );
-add_action( 'install_plugins_beta', 'display_plugins_table' );
-add_action( 'install_plugins_favorites', 'display_plugins_table' );
/**
* Determine the status we can perform on a plugin.
*
* @since 3.0.0
+ *
+ * @param array|object $api
+ * @param bool $loop
+ * @return type
*/
function install_plugin_install_status($api, $loop = false) {
// This function is called recursively, $loop prevents further loops.
* Display plugin information in dialog box form.
*
* @since 2.7.0
+ *
+ * @global string $tab
+ * @global string $wp_version
*/
function install_plugin_information() {
global $tab;
iframe_footer();
exit;
}
-add_action('install_plugins_pre_plugin-information', 'install_plugin_information');