install_search

Definition:
function install_search($page) {}

Display search results and display as tag cloud.

Parameters

  • string $page

Source code

function install_search($page) {

	$type = isset($_REQUEST['type']) ? stripslashes( $_REQUEST['type'] ) : '';

	$term = isset($_REQUEST['s']) ? stripslashes( $_REQUEST['s'] ) : '';



	$args = array();



	switch( $type ){

		case 'tag':

			$args['tag'] = sanitize_title_with_dashes($term);

			break;

		case 'term':

			$args['search'] = $term;

			break;

		case 'author':

			$args['author'] = $term;

			break;

	}



	$args['page'] = $page;



	$api = plugins_api('query_plugins', $args);



	if ( is_wp_error($api) )

		wp_die($api);



	add_action('install_plugins_table_header', 'install_search_form');



	display_plugins_table($api->plugins, $api->info['page'], $api->info['pages']);



	return;

}

2047

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 )

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: