class-simple-job-board-settings-appearance.php 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573
  1. <?php
  2. if (!defined('ABSPATH')) {
  3. exit;
  4. } // Exit if accessed directly
  5. /**
  6. * Simple_Job_Board_Settings_Appearance Class
  7. *
  8. * This is used to define job board appearance settings.
  9. *
  10. * This file contains the frontend appearance settings for job listing content,
  11. * listing view, job listing and job detail page typography. User can change the
  12. * job listing layout and content.
  13. *
  14. * @link https://wordpress.org/plugins/simple-job-board
  15. * @since 2.2.3
  16. * @since 2.4.0 Revised Inputs and Outputs Sanitization & Escaping
  17. * @since 2.4.3 Added option for SJB Fonts
  18. *
  19. * @package Simple_Job_Board
  20. * @subpackage Simple_Job_Board/admin/settings
  21. * @author PressTigers <support@presstigers.com>
  22. */
  23. class Simple_Job_Board_Settings_Appearance {
  24. /**
  25. * Initialize the class and set its properties.
  26. *
  27. * @since 2.2.3
  28. */
  29. public function __construct() {
  30. // Filter -> Add Settings Appearance Tab
  31. add_filter('sjb_settings_tab_menus', array($this, 'sjb_add_settings_tab'), 30);
  32. // Action -> Add Settings Appearance Section
  33. add_action('sjb_settings_tab_section', array($this, 'sjb_add_settings_section'), 30);
  34. // Action -> Save Settings Appearance Section
  35. add_action('sjb_save_setting_sections', array($this, 'sjb_save_settings_section'));
  36. }
  37. /**
  38. * Add Settings Appearance Tab.
  39. *
  40. * @since 2.2.3
  41. *
  42. * @param array $tabs Settings Tab
  43. * @return array $tabs Merge array of Settings Tab with Appearance Tab.
  44. */
  45. public function sjb_add_settings_tab($tabs) {
  46. $tabs['appearance'] = esc_html__('Appearance', 'simple-job-board');
  47. return $tabs;
  48. }
  49. /**
  50. * Add Settings Appearance Section.
  51. *
  52. * @since 2.2.3
  53. */
  54. public function sjb_add_settings_section() {
  55. // Enqueue Alpha Color Picker Script
  56. wp_enqueue_script('wp-color-picker-alpha');
  57. ?>
  58. <!-- Appearance -->
  59. <div id="settings-appearance" class="sjb-admin-settings" style="display: none;" >
  60. <form method="post" id="appearance_options_form">
  61. <?php
  62. // Get Appearance Options
  63. $container_class = get_option('job_board_container_class') ? get_option('job_board_container_class') : 'container sjb-container';
  64. // Get Container Id
  65. if (get_option('job_board_container_id')) {
  66. $container_ids = explode(" ", get_option('job_board_container_id'));
  67. $container_id = $container_ids[0];
  68. } else {
  69. $container_id = 'container';
  70. }
  71. // Select Job Listing View
  72. $logo_detail = $without_logo_detail = $without_logo = $without_detail = $sjbpage_layout = $list_view = $grid_view = $jobpost_logo = $jobpost_without_logo = $sjb_layout = $theme_layout = '';
  73. if ($list_view = get_option('job_board_listing_view')) {
  74. if ('list-view' === $list_view)
  75. $list_view = 'checked';
  76. if ('grid-view' === $list_view)
  77. $grid_view = 'checked';
  78. } else {
  79. // Default List View
  80. $list_view = 'checked';
  81. }
  82. // Select job pages layout
  83. if ( $sjb_layout = get_option('job_board_pages_layout')) {
  84. if ('sjb-layout' === $sjb_layout)
  85. $sjbpage_layout = 'checked';
  86. if ('theme-layout' === $sjb_layout)
  87. $theme_layout = 'checked';
  88. } else {
  89. $sjbpage_layout = 'checked';
  90. }
  91. // Select job post content with or without company logo & job detail
  92. if ($jobpost_content = get_option('job_board_jobpost_content')) {
  93. if ('with-logo' === $jobpost_content)
  94. $jobpost_logo = 'checked';
  95. if ('without-logo' === $jobpost_content)
  96. $jobpost_without_logo = 'checked';
  97. } else {
  98. $jobpost_logo = 'checked';
  99. }
  100. // Select job listing with or without company logo & job detail
  101. if ($list_contents = get_option('job_board_listing')) {
  102. if ('logo-detail' === $list_contents)
  103. $logo_detail = 'checked';
  104. if ('without-logo-detail' === $list_contents)
  105. $without_logo_detail = 'checked';
  106. if ('without-logo' === $list_contents)
  107. $without_logo = 'checked';
  108. if ('without-detail' === $list_contents)
  109. $without_detail = 'checked';
  110. } else {
  111. $logo_detail = 'checked';
  112. }
  113. // Get Settings Job Board Typography
  114. if (get_option('job_board_typography')) {
  115. $job_board_typography = get_option('job_board_typography');
  116. }
  117. // Get Settings Job Board Typography
  118. if (get_option('sjb_fonts')) {
  119. $sjb_fonts = get_option('sjb_fonts');
  120. } else {
  121. $sjb_fonts = 'enable-fonts';
  122. }
  123. /**
  124. * Action -> Add new section before job pages layout.
  125. *
  126. * @since 2.2.2
  127. */
  128. do_action('sjb_theme_layout_before');
  129. ?>
  130. <h4 class="first"><?php esc_html_e('Job Pages Layout', 'simple-job-board'); ?></h4>
  131. <div class="sjb-section">
  132. <div class="sjb-content">
  133. <?php
  134. /**
  135. * Action -> Add new fields at start of of Content Wrapper.
  136. *
  137. * @since 2.2.2
  138. */
  139. do_action('sjb_content_wrapper_styling_start');
  140. ?>
  141. <div class="sjb-form-group">
  142. <input type="radio" name="job_pages_layout" value="sjb-layout" id="sjb-layout" <?php echo esc_attr( $sjbpage_layout ); ?> />
  143. <label><?php esc_html_e('SJB Layout', 'simple-job-board'); ?></label>
  144. </div>
  145. <div class="sjb-form-group">
  146. <input type="radio" name="job_pages_layout" value="theme-layout" id="theme-layout" <?php echo esc_attr( $theme_layout ); ?> />
  147. <label><?php esc_html_e('Theme Layout', 'simple-job-board'); ?></label>
  148. </div>
  149. <?php
  150. /**
  151. * Action -> Add new fields at the end of Content Wrapper.
  152. *
  153. * @since 2.2.2
  154. */
  155. do_action('sjb_theme_layout_end');
  156. ?>
  157. </div>
  158. </div>
  159. <?php
  160. /**
  161. * Action -> Add new section after content wrapper styling.
  162. *
  163. * @since 2.2.2
  164. */
  165. do_action('sjb_theme_layout_after');
  166. /**
  167. * Action -> Add new section before content wrapper styling.
  168. *
  169. * @since 2.2.2
  170. */
  171. do_action('sjb_content_wrapper_styling_before');
  172. ?>
  173. <h4 class="first"><?php esc_html_e('Content Wrapper Styling', 'simple-job-board'); ?></h4>
  174. <div class="sjb-section">
  175. <div class="sjb-content">
  176. <?php
  177. /**
  178. * Action -> Add new fields at start of of Content Wrapper.
  179. *
  180. * @since 2.2.2
  181. */
  182. do_action('sjb_content_wrapper_styling_start');
  183. ?>
  184. <div class="sjb-form-group">
  185. <input type="checkbox" name="sjb_fonts" value="enable-fonts" id="sjb-fonts" <?php checked('enable-fonts', esc_attr($sjb_fonts)); ?> />
  186. <input type="hidden" name="no_fonts" value="sjb-fonts" />
  187. <label><?php _e('Enable SJB Fonts', 'simple-job-board'); ?></label>
  188. </div>
  189. <div class="sjb-form-group">
  190. <label><?php esc_html_e('Job Board Container Id:', 'simple-job-board'); ?></label>
  191. <input type="text" name="container_id" value="<?php echo esc_attr($container_id); ?>" size="30" />
  192. </div>
  193. <div class="sjb-form-group">
  194. <label><?php esc_html_e('Job Board Container Class:', 'simple-job-board'); ?></label>
  195. <input type="text" name="container_class" value="<?php echo esc_attr($container_class); ?>" size="30" >
  196. </div>
  197. <p><?php _e('Add classes seprated by space or comma e.g. container sjb-container or container,sjb-container', 'simple-job-board'); ?></p>
  198. <?php
  199. /**
  200. * Action -> Add new fields at the end of Content Wrapper.
  201. *
  202. * @since 2.2.2
  203. */
  204. do_action('sjb_content_wrapper_styling_end');
  205. ?>
  206. </div>
  207. </div>
  208. <?php
  209. /**
  210. * Action -> Add new section after content wrapper styling.
  211. *
  212. * @since 2.2.2
  213. */
  214. do_action('sjb_content_wrapper_styling_after');
  215. ?>
  216. <h4><?php echo apply_filters('sjb_job_listing_views_title', esc_html__('Job Listing Views', 'simple-job-board')); ?></h4>
  217. <div class="sjb-section">
  218. <div class="sjb-content">
  219. <?php
  220. /**
  221. * Action -> Add new fields at start of job listing view.
  222. *
  223. * @since 2.2.0
  224. */
  225. do_action('sjb_listing_view_start');
  226. ?>
  227. <div class="sjb-form-group">
  228. <input type="radio" name="job_listing_views_settings" value="list-view" id="list-view" <?php echo esc_attr($list_view); ?> />
  229. <label><?php esc_html_e('Display Job Listing in List view', 'simple-job-board'); ?></label>
  230. </div>
  231. <div class="sjb-form-group">
  232. <input type="radio" name="job_listing_views_settings" value="grid-view" id="grid-view" <?php echo esc_attr($grid_view); ?> />
  233. <label><?php esc_html_e('Display Job Listing in Grid view', 'simple-job-board'); ?></label>
  234. </div>
  235. <?php
  236. /**
  237. * Action -> Add new fields at end of job listing view.
  238. *
  239. * @since 2.2.0
  240. */
  241. do_action('sjb_listing_view_end');
  242. ?>
  243. </div>
  244. </div>
  245. <?php
  246. /**
  247. * Action -> Add new section after appearance listing view .
  248. *
  249. * @since 2.2.0
  250. */
  251. do_action('sjb_appearance_listing_view_after');
  252. ?>
  253. <h4><?php echo apply_filters('sjb_job_listing_content_title', esc_html__('Job Listing Contents', 'simple-job-board')); ?></h4>
  254. <div class="sjb-section">
  255. <div class="sjb-content">
  256. <?php
  257. /**
  258. * Action -> Add new fields at start of job content.
  259. *
  260. * @since 2.2.0
  261. */
  262. do_action('sjb_listing_content_start');
  263. ?>
  264. <div class="sjb-form-group">
  265. <input type="radio" name="job_listing_content_settings" value="logo-detail" id="logo-detail" <?php echo esc_attr($logo_detail); ?> />
  266. <label><?php _e('Display Job Listing with Company Logo and Detail', 'simple-job-board'); ?></label>
  267. </div>
  268. <div class="sjb-form-group">
  269. <input type="radio" name="job_listing_content_settings" value="without-logo-detail" id="without-logo-detail" <?php echo esc_attr($without_logo_detail); ?> />
  270. <label><?php _e('Display Job Listing without Company Logo and Detail', 'simple-job-board'); ?></label>
  271. </div>
  272. <div class="sjb-form-group">
  273. <input type="radio" name="job_listing_content_settings" value="without-logo" id="without-logo" <?php echo esc_attr($without_logo); ?> />
  274. <label><?php _e('Display Job Listing without Company Logo', 'simple-job-board'); ?></label>
  275. </div>
  276. <div class="sjb-form-group">
  277. <input type="radio" name="job_listing_content_settings" value="without-detail" id="without-detail" <?php echo esc_attr($without_detail); ?> />
  278. <label><?php _e('Display Job Listing without Company Detail', 'simple-job-board'); ?></label>
  279. </div>
  280. <?php
  281. /**
  282. * Action -> Add new fields at the end of job content.
  283. *
  284. * @since 2.2.0
  285. */
  286. do_action('sjb_listing_content_end');
  287. ?>
  288. </div>
  289. </div>
  290. <?php
  291. /**
  292. * Action -> Add new section after appearance listing content.
  293. *
  294. * @since 2.2.0
  295. */
  296. do_action('sjb_appearance_listing_content_after');
  297. ?>
  298. <h4><?php echo apply_filters('sjb_job_post_content_title', esc_html__('Job Post Content', 'simple-job-board')); ?></h4>
  299. <div class="sjb-section">
  300. <div class="sjb-content">
  301. <?php
  302. /**
  303. * Action -> Add new fields at start of job content.
  304. *
  305. * @since 2.3.2
  306. */
  307. do_action('sjb_job_post_content_start');
  308. ?>
  309. <div class="sjb-form-group">
  310. <input type="radio" name="job_post_content_settings" value="with-logo" id="logo-detail" <?php echo esc_attr($jobpost_logo); ?> />
  311. <label><?php _e('Display Job Post with Company Logo', 'simple-job-board'); ?></label>
  312. </div>
  313. <div class="sjb-form-group">
  314. <input type="radio" name="job_post_content_settings" value="without-logo" id="without-logo-detail" <?php echo esc_attr($jobpost_without_logo); ?> />
  315. <label><?php _e('Display Job Post without Company Logo', 'simple-job-board'); ?></label>
  316. </div>
  317. <?php
  318. /**
  319. * Action -> Add new fields at the end of job content.
  320. *
  321. * @since 2.3.2
  322. */
  323. do_action('sjb_job_post_content_end');
  324. ?>
  325. </div>
  326. </div>
  327. <?php
  328. /**
  329. * Action -> Add new section after appearance listing content.
  330. *
  331. * @since 2.3.2
  332. */
  333. do_action('sjb_appearance_listing_content_after');
  334. ?>
  335. <h4><?php echo apply_filters('sjb_job_color_options_title', esc_html__('Color Options', 'simple-job-board')); ?></h4>
  336. <div class="sjb-section">
  337. <?php
  338. /**
  339. * Action -> Add new fields at start of job listing typography section.
  340. *
  341. * @since 2.2.0
  342. * @since 2.4.0 Rename Action
  343. */
  344. do_action('sjb_job_color_options_start');
  345. ?>
  346. <ul class="sjb-typography">
  347. <li class="sjb-typography-label">
  348. <label><?php _e('Job Filters Background Color', 'simple-job-board'); ?></label>
  349. </li>
  350. <li class="sjb-typography-input">
  351. <input type="text" value="<?php echo isset($job_board_typography['filters_background_color']) ? esc_attr($job_board_typography['filters_background_color']) : '#f2f2f2'; ?>" name="job_board_typography[filters_background_color]" class="sjb-color-picker" data-alpha="true" data-default-color="#f2f2f2" />
  352. </li>
  353. </ul>
  354. <ul class="sjb-typography">
  355. <li class="sjb-typography-label">
  356. <label><?php _e('Job Title Color', 'simple-job-board'); ?></label>
  357. </li>
  358. <li class="sjb-typography-input">
  359. <input type="text" value="<?php echo isset($job_board_typography['job_listing_title_color']) ? esc_attr($job_board_typography['job_listing_title_color']) : '#3b3a3c'; ?>" name="job_board_typography[job_listing_title_color]" class="sjb-color-picker" data-alpha="true" data-default-color="#3b3a3c" />
  360. </li>
  361. </ul>
  362. <ul class="sjb-typography">
  363. <li class="sjb-typography-label">
  364. <label><?php _e('Headings Color', 'simple-job-board'); ?></label>
  365. </li>
  366. <li class="sjb-typography-input">
  367. <input type="text" value="<?php echo isset($job_board_typography['headings_color']) ? esc_attr($job_board_typography['headings_color']) : '#3297fa'; ?>" name="job_board_typography[headings_color]" class="sjb-color-picker" data-alpha="true" data-default-color="#3297fa"/>
  368. </li>
  369. </ul>
  370. <ul class="sjb-typography">
  371. <li class="sjb-typography-label">
  372. <label><?php _e('Font Awesome Icon Color', 'simple-job-board'); ?></label>
  373. </li>
  374. <li class="sjb-typography-input">
  375. <input type="text" value="<?php echo isset($job_board_typography['fontawesome_icon_color']) ? esc_attr($job_board_typography['fontawesome_icon_color']) : '#3b3a3c'; ?>" name="job_board_typography[fontawesome_icon_color]" class="sjb-color-picker" data-alpha="true" data-default-color="#3b3a3c" />
  376. </li>
  377. </ul>
  378. <ul class="sjb-typography">
  379. <li class="sjb-typography-label">
  380. <label><?php _e('Font Awesome Text Color', 'simple-job-board'); ?></label>
  381. </li>
  382. <li class="sjb-typography-input">
  383. <input type="text" value="<?php echo isset($job_board_typography['fontawesome_text_color']) ? esc_attr($job_board_typography['fontawesome_text_color']) : '#3297fa'; ?>" name="job_board_typography[fontawesome_text_color]" class="sjb-color-picker" data-alpha="true" data-default-color="#3297fa" />
  384. </li>
  385. </ul>
  386. <ul class="sjb-typography">
  387. <li class="sjb-typography-label">
  388. <label><?php _e('Buttons Background Color', 'simple-job-board'); ?></label>
  389. </li>
  390. <li class="sjb-typography-input">
  391. <input type="text" value="<?php echo isset($job_board_typography['job_submit_button_background_color']) ? esc_attr($job_board_typography['job_submit_button_background_color']) : '#3297fa'; ?>" name="job_board_typography[job_submit_button_background_color]" class="sjb-color-picker" data-alpha="true" data-default-color="#3297fa" />
  392. </li>
  393. </ul>
  394. <ul class="sjb-typography">
  395. <li class="sjb-typography-label">
  396. <label><?php _e('Buttons Text Color', 'simple-job-board'); ?></label>
  397. </li>
  398. <li class="sjb-typography-input">
  399. <input type="text" value="<?php echo isset($job_board_typography['job_submit_button_text_color']) ? esc_attr($job_board_typography['job_submit_button_text_color']) : '#fff'; ?>" name="job_board_typography[job_submit_button_text_color]" class="sjb-color-picker" data-alpha="true" data-default-color="#fff" />
  400. </li>
  401. </ul>
  402. <ul class="sjb-typography">
  403. <li class="sjb-typography-label">
  404. <label><?php _e('Pagination Background Color', 'simple-job-board'); ?></label>
  405. </li>
  406. <li class="sjb-typography-input">
  407. <input type="text" value="<?php echo isset($job_board_typography['pagination_background_color']) ? esc_attr($job_board_typography['pagination_background_color']) : '#164e91'; ?>" name="job_board_typography[pagination_background_color]" class="sjb-color-picker" data-alpha="true" data-default-color="#3297fa" />
  408. </li>
  409. </ul>
  410. <ul class="sjb-typography">
  411. <li class="sjb-typography-label">
  412. <label><?php _e('Pagination Text Color', 'simple-job-board'); ?></label>
  413. </li>
  414. <li class="sjb-typography-input">
  415. <input type="text" value="<?php echo isset($job_board_typography['pagination_text_color']) ? esc_attr($job_board_typography['pagination_text_color']) : '#fff'; ?>" name="job_board_typography[pagination_text_color]" class="sjb-color-picker" data-alpha="true" data-default-color="#fff" />
  416. </li>
  417. </ul>
  418. <?php
  419. /**
  420. * Action -> Add new fields at the end of job listing page typography section.
  421. *
  422. * @since 2.2.0
  423. * @since 2.4.0 Rename Action
  424. */
  425. do_action('sjb_job_color_options_end');
  426. ?>
  427. </div>
  428. <?php
  429. /**
  430. * Action -> Add new section after appearance listing typography content.
  431. *
  432. * @since 2.3.2
  433. */
  434. do_action('sjb_appearance_color_options_after');
  435. ?>
  436. <input type="hidden" value="1" name="admin_notices" />
  437. <input type="submit" name="job_general_options" id="job_general_options" class="button button-primary" value="<?php echo esc_html__('Save Changes', 'simple-job-board'); ?>" />
  438. </form>
  439. </div>
  440. <?php
  441. }
  442. /**
  443. * Save Settings Appearance Section.
  444. *
  445. * This function save the settings for job listing views, content and typography.
  446. *
  447. * @since 2.2.3
  448. */
  449. public function sjb_save_settings_section() {
  450. // Apearance Settings Paramerters
  451. // $job_listing_views_settings = filter_input(INPUT_POST, 'job_listing_views_settings');
  452. // $job_listing_content_settings = filter_input(INPUT_POST, 'job_listing_content_settings');
  453. // $job_post_content_settings = filter_input(INPUT_POST, 'job_post_content_settings');
  454. // $container_class = filter_input(INPUT_POST, 'container_class');
  455. // $container_id = filter_input(INPUT_POST, 'container_id');
  456. // $job_board_typography = filter_input(INPUT_POST, 'job_board_typography', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY);
  457. // $sjb_fonts = filter_input(INPUT_POST, 'sjb_fonts');
  458. // $no_fonts = filter_input(INPUT_POST, 'no_fonts');
  459. // nnnnnnnnnnnnnnnnnnn
  460. $job_layout_settings = isset($_POST['job_pages_layout'] ) ? sanitize_text_field( $_POST['job_pages_layout'] ) : '';
  461. $job_listing_views_settings = isset($_POST['job_listing_views_settings'] ) ? sanitize_text_field( $_POST['job_listing_views_settings'] ) : '';
  462. $job_listing_content_settings = isset($_POST['job_listing_content_settings'] ) ? sanitize_text_field( $_POST['job_listing_content_settings'] ) : '';
  463. $job_post_content_settings = isset($_POST['job_post_content_settings'] ) ? sanitize_text_field($_POST['job_post_content_settings'] ) : '';
  464. $container_class = isset($_POST['container_class'] ) ? sanitize_text_field( $_POST['container_class'] ) : '';
  465. $container_id = isset($_POST['container_id'] ) ? sanitize_text_field( $_POST['container_id'] ) : '';
  466. $job_board_typography =isset($_POST['job_board_typography'] ) ? array_map('sanitize_text_field',$_POST['job_board_typography'] ) :'';
  467. $sjb_fonts = isset( $_POST['sjb_fonts'] ) ? sanitize_text_field( $_POST['sjb_fonts'] ) : '';
  468. $no_fonts = isset( $_POST['no_fonts'] ) ? sanitize_text_field( $_POST['no_fonts'] ) : '';
  469. $fonts = 0;
  470. // Save Job Pages Layout
  471. if (!empty($job_layout_settings)) {
  472. update_option('job_board_pages_layout', $job_layout_settings);
  473. }
  474. // Save Job Listing View
  475. if (!empty($job_listing_views_settings)) {
  476. update_option('job_board_listing_view', $job_listing_views_settings);
  477. }
  478. // Save Job Listing Content
  479. if (!empty($job_listing_content_settings)) {
  480. update_option('job_board_listing', $job_listing_content_settings);
  481. }
  482. // Save Job Post Content
  483. if (!empty($job_post_content_settings)) {
  484. update_option('job_board_jobpost_content', $job_post_content_settings);
  485. }
  486. // Save Container Class
  487. if (!empty($container_class)) {
  488. update_option('job_board_container_class', $container_class);
  489. }
  490. // Save Container Id
  491. if (!empty($container_id)) {
  492. update_option('job_board_container_id', $container_id);
  493. }
  494. // Save Job Board Typography
  495. if (!empty($job_board_typography)) {
  496. update_option('job_board_typography', $job_board_typography);
  497. }
  498. // Save Fonts Settings
  499. if (!empty($no_fonts)) {
  500. if (!empty($sjb_fonts)) {
  501. update_option('sjb_fonts', $sjb_fonts);
  502. $fonts = 1;
  503. }
  504. if (0 === $fonts) {
  505. update_option('sjb_fonts', 'disable-fonts');
  506. }
  507. }
  508. }
  509. }