Guest User

Untitled

a guest
Mar 4th, 2013
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. function get_product_search_form( $echo = true ) {
  2. do_action( 'get_product_search_form' );
  3.  
  4. $search_form_template = locate_template( 'product-searchform.php' );
  5. if ( '' != $search_form_template ) {
  6. require $search_form_template;
  7. return;
  8. }
  9.  
  10. $form = '<form role="search" method="get" id="searchform" action="' . esc_url( home_url( '/' ) ) . '">
  11. <div>
  12. <label class="screen-reader-text" for="s">' . __( '', 'woocommerce' ) . '</label>
  13. <input type="text" value="' . get_search_query() . '" name="s" id="s" placeholder="' . __( '', 'woocommerce' ) . '" />
  14. <input type="submit" id="searchsubmit" value="'. esc_attr__( 'Search' ) .'" />
  15. <input type="hidden" name="post_type" value="product" />
  16. </div>
  17. </form>';
  18.  
  19. if ( $echo )
  20. echo apply_filters( 'get_product_search_form', $form );
  21. else
  22. return apply_filters( 'get_product_search_form', $form );
  23. }
Advertisement
Add Comment
Please, Sign In to add comment