Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




install_theme_search_form [ WordPress Function ]

install_theme_search_form ( $type_selector = true )
Defined at:



Display search form for searching themes.

Source


<?php
function install_theme_search_form$type_selector true ) {
    
$type = isset( $_REQUEST['type'] ) ? stripslashes$_REQUEST['type'] ) : 'term';
    
$term = isset( $_REQUEST['s'] ) ? stripslashes$_REQUEST['s'] ) : '';
    if ( ! 
$type_selector )
        echo 
'<p class="install-help">' __'Search for themes by keyword.' ) . '</p>';
    
?>
<form id="search-themes" method="get" action="">
    <input type="hidden" name="tab" value="search" />
    <?php if ( $type_selector ) : ?>
    <select    name="type" id="typeselector">
    <option value="term" <?php selected('term'$type?>><?php _e('Keyword'); ?></option>
    <option value="author" <?php selected('author'$type?>><?php _e('Author'); ?></option>
    <option value="tag" <?php selected('tag'$type?>><?php _ex('Tag''Theme Installer'); ?></option>
    </select>
    <?php endif; ?>
    <input type="search" name="s" size="30" value="<?php echo esc_attr($term?>" />
    <?php submit_button__'Search' ), 'button''search'false ); ?>
</form>
<?php
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics