Switch language

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




wp_admin_bar_search_menu [ WordPress Function ]

wp_admin_bar_search_menu ( $wp_admin_bar )
Defined at:



Add search form.

Source


<?php
function wp_admin_bar_search_menu$wp_admin_bar ) {
    if ( 
is_admin() )
        return;

    
$form  '<form action="' esc_urlhome_url'/' ) ) . '" method="get" id="adminbarsearch">';
    
$form .= '<input class="adminbar-input" name="s" id="adminbar-search" tabindex="10" type="text" value="" maxlength="150" />';
    
$form .= '<input type="submit" class="adminbar-button" value="' __('Search') . '"/>';
    
$form .= '</form>';

    
$wp_admin_bar->add_menu( array(
        
'parent' => 'top-secondary',
        
'id'     => 'search',
        
'title'  => $form,
        
'meta'   => array(
            
'class'    => 'admin-bar-search',
            
'tabindex' => -1,
        )
    ) );
}
?>

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