Advertisements

install_search_form

Definition:
function install_search_form(){

Display search form for searching plugins.

Source code

function install_search_form(){

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

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



	?><form id="search-plugins" method="get" action="">

		<input type="hidden" name="tab" value="search" />

		<select name="type" id="typeselector">

			<option value="term"<?php selected('term', $type) ?>><?php _e('Term'); ?></option>

			<option value="author"<?php selected('author', $type) ?>><?php _e('Author'); ?></option>

			<option value="tag"<?php selected('tag', $type) ?>><?php _ex('Tag', 'Plugin Installer'); ?></option>

		</select>

		<input type="text" name="s" value="<?php echo esc_attr($term) ?>" />

		<label class="screen-reader-text" for="plugin-search-input"><?php _e('Search Plugins'); ?></label>

		<?php submit_button( __( 'Search Plugins' ), 'button', 'plugin-search-input', false ); ?>

	</form><?php

}

2049

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: