Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( ! function_exists( 'jas_helpdesk_search_form' ) ) {
- function jas_helpdesk_search_form() {
- $output = '';
- // Search form
- $kb_search = cs_get_option( 'kb-search-box' );
- if ( is_post_type_archive( 'jhelp-kb' ) && $kb_search ) {
- $output .= '<form role="search" method="get" class="jas-search-form clearfix" action="' . esc_url( home_url( '/' ) ) . '">';
- $output .= '<label>';
- $output .= '<input type="text" class="search-field jas-kb-ajax-search"
- placeholder="' . esc_attr__( 'Search ...', 'helpdesk' ) . '"
- value="' . get_search_query() . '" name="s"
- title="' . esc_attr__( 'Search for:', 'helpdesk' ) . '" />';
- $output .= '<input type="hidden" value="jhelp-kb" name="post_type" id="post_type" />';
- $output .= '</label>';
- $output .= '<input type="submit" class="search-submit f__mont fs__16"
- value="' . esc_attr__( 'Search', 'helpdesk' ) . '" />';
- $output .= '</form>';
- } elseif ( is_singular ( 'jhelp-kb' ) ) {
- $output .= '<form role="search" method="get" class="jas-search-form clearfix" action="' . esc_url( home_url( '/' ) ) . '">';
- $output .= '<label>';
- $output .= '<input type="text" class="search-field jas-kb-ajax-search"
- placeholder="' . esc_attr__( 'Search ...', 'helpdesk' ) . '"
- value="' . get_search_query() . '" name="s"
- title="' . esc_attr__( 'Search for:', 'helpdesk' ) . '" />';
- $output .= '<input type="hidden" value="jhelp-kb" name="post_type" id="post_type" />';
- $output .= '</label>';
- $output .= '<input type="submit" class="search-submit f__mont fs__16"
- value="' . esc_attr__( 'Search', 'helpdesk' ) . '" />';
- $output .= '</form>';
- } elseif ( function_exists( 'is_bbpress' ) && is_bbpress() && cs_get_option( 'forum-search-box' ) ) {
- $output .= do_shortcode( '[bbp-search-form]' );
- }
- return apply_filters( 'jas_helpdesk_search_form', $output );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement