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

February 12, 2011 


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