WP Job Manager - Version 1.33.2

Version Description

  • Fix: Issue with [jobs] filter form on some themes and plugins.
Download this release

Release Info

Developer jakeom
Plugin Icon 128x128 WP Job Manager
Version 1.33.2
Comparing to
See all releases

Code changes from version 1.33.1 to 1.33.2

assets/js/ajax-filters.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(e){function t(){return window.sessionStorage&&"function"==typeof window.sessionStorage.setItem}function i(t){var i=e("div.job_listings").index(t),n=t.data("post_id");return void 0!==n&&n||(n=window.location.href.replace(location.hash,"")),c+n+"_"+i}function n(e,n){if(!t())return!1;"object"!=typeof n&&(n={});var a=e.find(".job_filters");n.form=a.serialize();var o=i(e);try{return window.sessionStorage.setItem(o,JSON.stringify(n))}catch(e){}return!1}function a(e){if(!t())return!1;var n=i(e);try{var a=window.sessionStorage.getItem(n);if(a)return JSON.parse(a)}catch(e){}return!1}function o(e,i){if(!t()||!e)return!1;var o=a(e);return!!o&&(o.persist_results=i,n(e,o))}function r(e,i){if(!t())return!1;var o=a(e);o||(o={persist_results:!1});var r=e.find(".job_listings");return i.html=r.html(),o.results=i,n(e,o)}function s(e){if(!t())return!1;var n=i(e);try{window.sessionStorage.removeItem(n)}catch(e){return!1}return!0}function l(e){if(!t())return!1;var i=a(e);return i||(i={}),i.results=null,n(e,i)}function d(t,i,n){var a=t.find(".job_listings"),o=t.find(".showing_jobs");if("boolean"!=typeof n&&(n=!1),"string"==typeof i.showing&&i.showing){var r=jQuery("<span>").html(i.showing);o.show().html("").html(i.showing_links).prepend(r)}else o.hide();return i.showing_all?o.addClass("wp-job-manager-showing-all"):o.removeClass("wp-job-manager-showing-all"),i.html&&(n?a.append(i.html):a.html(i.html)),!0===t.data("show_pagination")?(t.find(".job-manager-pagination").remove(),i.pagination&&t.append(i.pagination)):(!i.found_jobs||i.max_num_pages<=i.data.page?e(".load_more_jobs:not(.load_previous)",t).hide():e(".load_more_jobs",t).show(),e(".load_more_jobs",t).removeClass("loading").data("page",i.data.page),e("li.job_listing",a).css("visibility","visible")),!0}var c="job_listing_",g=[];if(e("div.job_listings").on("click","li.job_listing a",function(){o(e(this).closest("div.job_listings"),!0)}).on("click",".job-manager-pagination a",function(){var t=e(this).closest("div.job_listings"),i=e(this).data("page");return t.triggerHandler("update_results",[i,!1]),e("body, html").animate({scrollTop:t.offset().top},600),!1}).on("update_results",function(t,i,n){var a,o,l,c="",u=e(this),_=u.find(".job_filters"),p=u.find(".job_listings"),f=u.data("per_page"),h=u.data("orderby"),b=u.data("order"),m=u.data("featured"),j=u.data("filled"),v=u.data("job_types"),w=u.data("post_status"),y=e("div.job_listings").index(this);if(!(y<0)){if(s(u),g[y]&&g[y].abort(),n&&1!==i||(e("li.job_listing, li.no_job_listings_found",p).css("visibility","hidden"),p.addClass("loading")),u.find(".load_more_jobs").data("page",i),!0===u.data("show_filters")){var k=[];e(':input[name="filter_job_type[]"]:checked, :input[name="filter_job_type[]"][type="hidden"], :input[name="filter_job_type"]',_).each(function(){k.push(e(this).val())}),a=_.find(':input[name^="search_categories"]').map(function(){return e(this).val()}).get(),o="",l="";var S=_.find(':input[name="search_keywords"]'),x=_.find(':input[name="search_location"]');S.val()!==S.attr("placeholder")&&(o=S.val()),x.val()!==x.attr("placeholder")&&(l=x.val()),c={lang:job_manager_ajax_filters.lang,search_keywords:o,search_location:l,search_categories:a,filter_job_type:k,filter_post_status:w,per_page:f,orderby:h,order:b,page:i,featured:m,filled:j,show_pagination:u.data("show_pagination"),$form_data:_.serialize()}}else a=u.data("categories"),o=u.data("keywords"),l=u.data("location"),a&&("string"!=typeof a&&(a=String(a)),a=a.split(",")),c={lang:job_manager_ajax_filters.lang,search_categories:a,search_keywords:o,search_location:l,filter_post_status:w,filter_job_type:v,per_page:f,orderby:h,order:b,page:i,featured:m,filled:j,show_pagination:u.data("show_pagination")};g[y]=e.ajax({type:"POST",url:job_manager_ajax_filters.ajax_url.toString().replace("%%endpoint%%","get_listings"),data:c,success:function(e){if(e)try{e.data=c,d(u,e,n),p.removeClass("loading"),u.triggerHandler("updated_results",e),r(u,e)}catch(e){window.console&&window.console.log(e)}},error:function(e,t,i){window.console&&"abort"!==t&&window.console.log(t+": "+i)},statusCode:{404:function(){window.console&&window.console.log("Error 404: Ajax Endpoint cannot be reached. Go to Settings > Permalinks and save to resolve.")}}})}}),e("#search_keywords, #search_location, .job_types :input, #search_categories, .job-manager-filter").change(function(){var t=e(this).closest("div.job_listings");t.triggerHandler("update_results",[1,!1]),n(t)}).on("keyup",function(t){13===t.which&&e(this).trigger("change")}),e(".job_filters").on("click",".reset",function(){var t=e(this).closest("div.job_listings"),i=e(this).closest("form");return i.find(':input[name="search_keywords"], :input[name="search_location"], .job-manager-filter').not(':input[type="hidden"]').val("").trigger("change.select2"),i.find(':input[name^="search_categories"]').not(':input[type="hidden"]').val("").trigger("change.select2"),e(':input[name="filter_job_type[]"]',i).not(':input[type="hidden"]').attr("checked","checked"),t.triggerHandler("reset"),t.triggerHandler("update_results",[1,!1]),n(t),!1}).on("submit",function(){return!1}),e(document.body).on("click",".load_more_jobs",function(){var t=e(this).closest("div.job_listings"),i=parseInt(e(this).data("page")||1,10);return e(this).addClass("loading"),i+=1,e(this).data("page",i),t.triggerHandler("update_results",[i,!0]),!1}),e.isFunction(e.fn.select2)&&"undefined"!=typeof job_manager_select2_args){var u=job_manager_select2_args;u.allowClear=!0,u.minimumResultsForSearch=10,e('select[name^="search_categories"]:visible').select2(u)}e(window).on("load",function(){e("div.job_listings").each(function(){var t=e(this),i=t.find(".job_filters"),n=!1,r=a(t);r&&(r.results&&(n=d(t,r.results),o(t,!1)),"string"==typeof r.form&&""!==r.form&&(i.find("input[type=checkbox]").prop("checked",!1),i.deserialize(r.form),i.find(':input[name^="search_categories"]').not(':input[type="hidden"]').trigger("change.select2"))),!n&&i.length>0&&t.triggerHandler("update_results",[1,!1])})}),e(window).on("unload",function(){return e("div.job_listings").each(function(){var t=a(e(this));t&&!t.persist_results&&l(e(this))}),!0})});
1
+ jQuery(document).ready(function(e){function t(){return window.sessionStorage&&"function"==typeof window.sessionStorage.setItem}function i(t){var i=e("div.job_listings").index(t),n=t.data("post_id");return void 0!==n&&n||(n=window.location.href.replace(location.hash,"")),c+n+"_"+i}function n(e,n){if(!t())return!1;"object"!=typeof n&&(n={});var a=e.find(".job_filters");n.form=a.serialize();var o=i(e);try{return window.sessionStorage.setItem(o,JSON.stringify(n))}catch(e){}return!1}function a(e){if(!t())return!1;var n=i(e);try{var a=window.sessionStorage.getItem(n);if(a)return JSON.parse(a)}catch(e){}return!1}function o(e,i){if(!t()||!e)return!1;var o=a(e);return!!o&&(o.persist_results=i,n(e,o))}function r(e,i){if(!t())return!1;var o=a(e);o||(o={persist_results:!1});var r=e.find(".job_listings");return i.html=r.html(),o.results=i,n(e,o)}function s(e){if(!t())return!1;var n=i(e);try{window.sessionStorage.removeItem(n)}catch(e){return!1}return!0}function l(e){if(!t())return!1;var i=a(e);return i||(i={}),i.results=null,n(e,i)}function d(t,i,n){var a=t.find(".job_listings"),o=t.find(".showing_jobs");if("boolean"!=typeof n&&(n=!1),"string"==typeof i.showing&&i.showing){var r=jQuery("<span>").html(i.showing);o.show().html("").html(i.showing_links).prepend(r)}else o.hide();return i.showing_all?o.addClass("wp-job-manager-showing-all"):o.removeClass("wp-job-manager-showing-all"),i.html&&(n?a.append(i.html):a.html(i.html)),!0===t.data("show_pagination")?(t.find(".job-manager-pagination").remove(),i.pagination&&t.append(i.pagination)):(!i.found_jobs||i.max_num_pages<=i.data.page?e(".load_more_jobs:not(.load_previous)",t).hide():e(".load_more_jobs",t).show(),e(".load_more_jobs",t).removeClass("loading").data("page",i.data.page),e("li.job_listing",a).css("visibility","visible")),!0}var c="job_listing_",g=[];if(e("div.job_listings").on("click","li.job_listing a",function(){o(e(this).closest("div.job_listings"),!0)}).on("click",".job-manager-pagination a",function(){var t=e(this).closest("div.job_listings"),i=e(this).data("page");return t.triggerHandler("update_results",[i,!1]),e("body, html").animate({scrollTop:t.offset().top},600),!1}).on("update_results",function(t,i,n){var a,o,l,c="",u=e(this),_=u.find(".job_filters"),p=u.find(".job_listings"),f=u.data("per_page"),h=u.data("orderby"),b=u.data("order"),m=u.data("featured"),j=u.data("filled"),v=u.data("job_types"),w=u.data("post_status"),y=e("div.job_listings").index(this);if(!(y<0)){if(s(u),g[y]&&g[y].abort(),n&&1!==i||(e("li.job_listing, li.no_job_listings_found",p).css("visibility","hidden"),p.addClass("loading")),u.find(".load_more_jobs").data("page",i),!0===u.data("show_filters")){var k=[];e(':input[name="filter_job_type[]"]:checked, :input[name="filter_job_type[]"][type="hidden"], :input[name="filter_job_type"]',_).each(function(){k.push(e(this).val())}),a=_.find(':input[name^="search_categories"]').map(function(){return e(this).val()}).get(),o="",l="";var S=_.find(':input[name="search_keywords"]'),x=_.find(':input[name="search_location"]');S.val()!==S.attr("placeholder")&&(o=S.val()),x.val()!==x.attr("placeholder")&&(l=x.val()),c={lang:job_manager_ajax_filters.lang,search_keywords:o,search_location:l,search_categories:a,filter_job_type:k,filter_post_status:w,per_page:f,orderby:h,order:b,page:i,featured:m,filled:j,show_pagination:u.data("show_pagination"),form_data:_.serialize()}}else a=u.data("categories"),o=u.data("keywords"),l=u.data("location"),a&&("string"!=typeof a&&(a=String(a)),a=a.split(",")),c={lang:job_manager_ajax_filters.lang,search_categories:a,search_keywords:o,search_location:l,filter_post_status:w,filter_job_type:v,per_page:f,orderby:h,order:b,page:i,featured:m,filled:j,show_pagination:u.data("show_pagination")};g[y]=e.ajax({type:"POST",url:job_manager_ajax_filters.ajax_url.toString().replace("%%endpoint%%","get_listings"),data:c,success:function(e){if(e)try{e.data=c,d(u,e,n),p.removeClass("loading"),u.triggerHandler("updated_results",e),r(u,e)}catch(e){window.console&&window.console.log(e)}},error:function(e,t,i){window.console&&"abort"!==t&&window.console.log(t+": "+i)},statusCode:{404:function(){window.console&&window.console.log("Error 404: Ajax Endpoint cannot be reached. Go to Settings > Permalinks and save to resolve.")}}})}}),e("#search_keywords, #search_location, .job_types :input, #search_categories, .job-manager-filter").change(function(){var t=e(this).closest("div.job_listings");t.triggerHandler("update_results",[1,!1]),n(t)}).on("keyup",function(t){13===t.which&&e(this).trigger("change")}),e(".job_filters").on("click",".reset",function(){var t=e(this).closest("div.job_listings"),i=e(this).closest("form");return i.find(':input[name="search_keywords"], :input[name="search_location"], .job-manager-filter').not(':input[type="hidden"]').val("").trigger("change.select2"),i.find(':input[name^="search_categories"]').not(':input[type="hidden"]').val("").trigger("change.select2"),e(':input[name="filter_job_type[]"]',i).not(':input[type="hidden"]').attr("checked","checked"),t.triggerHandler("reset"),t.triggerHandler("update_results",[1,!1]),n(t),!1}).on("submit",function(){return!1}),e(document.body).on("click",".load_more_jobs",function(){var t=e(this).closest("div.job_listings"),i=parseInt(e(this).data("page")||1,10);return e(this).addClass("loading"),i+=1,e(this).data("page",i),t.triggerHandler("update_results",[i,!0]),!1}),e.isFunction(e.fn.select2)&&"undefined"!=typeof job_manager_select2_args){var u=job_manager_select2_args;u.allowClear=!0,u.minimumResultsForSearch=10,e('select[name^="search_categories"]:visible').select2(u)}e(window).on("load",function(){e("div.job_listings").each(function(){var t=e(this),i=t.find(".job_filters"),n=!1,r=a(t);r&&(r.results&&(n=d(t,r.results),o(t,!1)),"string"==typeof r.form&&""!==r.form&&(i.find("input[type=checkbox]").prop("checked",!1),i.deserialize(r.form),i.find(':input[name^="search_categories"]').not(':input[type="hidden"]').trigger("change.select2"))),!n&&i.length>0&&t.triggerHandler("update_results",[1,!1])})}),e(window).on("unload",function(){return e("div.job_listings").each(function(){var t=a(e(this));t&&!t.persist_results&&l(e(this))}),!0})});
changelog.txt CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  = 1.33.1 =
2
  * Fix: reCAPTCHA is checked when saving draft job listings.
3
  * Fix: Fix for fatal error encountered when importing jobs with WP All Import.
1
+ = 1.33.2 =
2
+ * Fix: Issue with `[jobs]` filter form on some themes and plugins.
3
+
4
  = 1.33.1 =
5
  * Fix: reCAPTCHA is checked when saving draft job listings.
6
  * Fix: Fix for fatal error encountered when importing jobs with WP All Import.
includes/class-wp-job-manager-post-types.php CHANGED
@@ -1378,7 +1378,7 @@ class WP_Job_Manager_Post_Types {
1378
  }
1379
 
1380
  if ( 'textarea' === $type || 'wp_editor' === $type ) {
1381
- return wp_kses_post( stripslashes( $meta_value ) );
1382
  }
1383
 
1384
  if ( 'checkbox' === $type ) {
1378
  }
1379
 
1380
  if ( 'textarea' === $type || 'wp_editor' === $type ) {
1381
+ return wp_kses_post( wp_unslash( $meta_value ) );
1382
  }
1383
 
1384
  if ( 'checkbox' === $type ) {
languages/wp-job-manager.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the GPL2+.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WP Job Manager 1.33.1\n"
6
  "Report-Msgid-Bugs-To: https://github.com/Automattic/WP-Job-Manager/issues\n"
7
- "POT-Creation-Date: 2019-06-10 10:21:32+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
2
  # This file is distributed under the GPL2+.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WP Job Manager 1.33.2\n"
6
  "Report-Msgid-Bugs-To: https://github.com/Automattic/WP-Job-Manager/issues\n"
7
+ "POT-Creation-Date: 2019-06-12 17:05:27+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: mikejolley, automattic, adamkheckler, alexsanford1, annezazu, cena
3
  Tags: job manager, job listing, job board, job management, job lists, job list, job, jobs, company, hiring, employment, employer, employees, candidate, freelance, internship, job listings, positions, board, application, hiring, listing, manager, recruiting, recruitment, talent
4
  Requires at least: 4.7.0
5
  Tested up to: 5.2
6
- Stable tag: 1.33.1
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -152,6 +152,9 @@ It then creates a database based on the parameters passed to it.
152
 
153
  == Changelog ==
154
 
 
 
 
155
  = 1.33.1 =
156
  * Fix: reCAPTCHA is checked when saving draft job listings.
157
  * Fix: Fix for fatal error encountered when importing jobs with WP All Import.
3
  Tags: job manager, job listing, job board, job management, job lists, job list, job, jobs, company, hiring, employment, employer, employees, candidate, freelance, internship, job listings, positions, board, application, hiring, listing, manager, recruiting, recruitment, talent
4
  Requires at least: 4.7.0
5
  Tested up to: 5.2
6
+ Stable tag: 1.33.2
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
152
 
153
  == Changelog ==
154
 
155
+ = 1.33.2 =
156
+ * Fix: Issue with `[jobs]` filter form on some themes and plugins.
157
+
158
  = 1.33.1 =
159
  * Fix: reCAPTCHA is checked when saving draft job listings.
160
  * Fix: Fix for fatal error encountered when importing jobs with WP All Import.
wp-job-manager.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WP Job Manager
4
  * Plugin URI: https://wpjobmanager.com/
5
  * Description: Manage job listings from the WordPress admin panel, and allow users to post jobs directly to your site.
6
- * Version: 1.33.1
7
  * Author: Automattic
8
  * Author URI: https://wpjobmanager.com/
9
  * Requires at least: 4.7.0
@@ -20,7 +20,7 @@ if ( ! defined( 'ABSPATH' ) ) {
20
  }
21
 
22
  // Define constants.
23
- define( 'JOB_MANAGER_VERSION', '1.33.1' );
24
  define( 'JOB_MANAGER_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
25
  define( 'JOB_MANAGER_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
26
  define( 'JOB_MANAGER_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
3
  * Plugin Name: WP Job Manager
4
  * Plugin URI: https://wpjobmanager.com/
5
  * Description: Manage job listings from the WordPress admin panel, and allow users to post jobs directly to your site.
6
+ * Version: 1.33.2
7
  * Author: Automattic
8
  * Author URI: https://wpjobmanager.com/
9
  * Requires at least: 4.7.0
20
  }
21
 
22
  // Define constants.
23
+ define( 'JOB_MANAGER_VERSION', '1.33.2' );
24
  define( 'JOB_MANAGER_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
25
  define( 'JOB_MANAGER_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
26
  define( 'JOB_MANAGER_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );