search-btn.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * Template for displaying searh button
  4. *
  5. * Override this template by copying it to yourtheme/simple_job_board/search/search-btn.php
  6. *
  7. * @author PressTigers
  8. * @package Simple_Job_Board
  9. * @subpackage Simple_Job_Board/templates/search
  10. * @version 1.0.0
  11. * @since 2.2.3
  12. * @since 2.3.0 Added "sjb_search_btn_template" filter.
  13. * @since 2.4.0 Revised whole HTML structure
  14. */
  15. ob_start();
  16. if( apply_filters(
  17. 'sjb_is_search_btn',
  18. sjb_is_filter_dropdowns() ||
  19. sjb_is_keyword_search()
  20. )
  21. )
  22. {
  23. // Search Button
  24. $search_button = '<div class="sjb-search-button ' . apply_filters('sjb_filters_button_class', 'col-md-2') . '">'
  25. . '<input class="btn-search btn btn-primary" value="&#xf002;" type="submit">'
  26. . '</div>';
  27. echo apply_filters( 'sjb_job_filters_search_button', $search_button );
  28. }
  29. $html_search_btn = ob_get_clean();
  30. /**
  31. * Modify the Search Button Template.
  32. *
  33. * @since 2.3.0
  34. *
  35. * @param html $html_search_btn Search Button HTML.
  36. */
  37. echo apply_filters( 'sjb_search_btn_template', $html_search_btn );