content-wrapper-start.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. /**
  3. * Content Wrappers Start
  4. *
  5. * Override this template by copying it to yourtheme/simple_job_board/global/content-wrapper-start.php
  6. *
  7. * @author PressTigers
  8. * @package Simple_Job_Board
  9. * @subpackage Simple_Job_Board/templates/global
  10. * @version 1.1.0
  11. * @since 2.2.0
  12. */
  13. if (!defined('ABSPATH')) { exit; } // Exit if accessed directly
  14. ob_start();
  15. // Get Current Theme Name
  16. $template = get_option('template');
  17. // Appearance Settings -> User Defined Container Class
  18. if (get_option('job_board_container_class')) {
  19. $container_class = get_option('job_board_container_class');
  20. $container_class = str_replace(',', ' ', $container_class);
  21. } else {
  22. $container_class = 'container sjb-container';
  23. }
  24. // Get Container Id
  25. if (get_option('job_board_container_id')) {
  26. $container_ids = explode( " ", get_option('job_board_container_id'));
  27. $container_id = $container_ids[0];
  28. } else {
  29. $container_id = 'container';
  30. }
  31. switch ($template) {
  32. case 'twentyeleven' :
  33. echo '<div id="primary"><div role="main"><div class="sjb-archive-wrapper">';
  34. break;
  35. case 'twentytwelve' :
  36. echo '<div id="primary"><div id="content" role="main" class="twentytwelve">';
  37. break;
  38. case 'twentythirteen' :
  39. echo '<div id="primary" class="site-content"><div id="content" role="main" class="entry-content twentythirteen">';
  40. break;
  41. case 'twentyfourteen' :
  42. echo '<div id="primary" class="content-area"><div id="content" role="main" class="site-content twentyfourteen"><div class="tfwc"><div class="sjb-archive-wrapper">';
  43. break;
  44. case 'twentyfifteen' :
  45. echo '<div id="primary" role="main" class="content-area twentyfifteen"><div id="main" class="site-main t15wc"><div class="sjb-archive-wrapper">';
  46. break;
  47. case 'twentysixteen' :
  48. echo '<div id="primary" class="content-area twentysixteen"><main id="main" class="site-main" role="main"><div class="sjb-archive-wrapper">';
  49. break;
  50. default :
  51. echo '<div class="' . esc_attr( $container_class ) . '" id="' . esc_attr( $container_id ) . '"><div id="content" class="sjb-content" role="main">';
  52. break;
  53. }
  54. $html_wrapper_start = ob_get_clean();
  55. /**
  56. * Modify the Content Wrapper Start Template.
  57. *
  58. * @since 2.3.0
  59. *
  60. * @param html $html_wrapper_start Content Wrapper Start HTML.
  61. */
  62. echo apply_filters('sjb_content_wrapper_start_template', $html_wrapper_start);