Version Description
- Fix: Jobs list not appearing in the page load while using Firefox.
Download this release
Release Info
Developer | renathoc |
Plugin | WP Job Manager |
Version | 1.34.5 |
Comparing to | |
See all releases |
Code changes from version 1.34.4 to 1.34.5
- assets/js/ajax-filters.min.js +1 -1
- changelog.txt +3 -0
- includes/class-wp-job-manager-shortcodes.php +9 -9
- languages/wp-job-manager.pot +2 -2
- readme.txt +4 -1
- wp-job-manager.php +2 -2
assets/js/ajax-filters.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(w){var n="job_listing_";function y(e){return!(!window.sessionStorage||"function"!=typeof window.sessionStorage.setItem||w(document.body).hasClass("disable-job-manager-form-state-storage")||e.data("disable-form-state-storage"))}function k(e){var t=w("div.job_listings").index(e),i=e.data("post_id");return void 0!==i&&i||(i=window.location.href.replace(location.hash,"")),n+i+"_"+t}function S(e,t){if(!y(e))return!1;"object"!=typeof t&&(t={});var i=k(e);try{return window.sessionStorage.setItem(i,JSON.stringify(t))}catch(e){}return!1}function x(e){if(!y(e))return!1;var t=k(e);try{var i=window.sessionStorage.getItem(t);if(i)return JSON.parse(i)}catch(e){}return!1}function a(e,t){if(y(e)&&e){var i=x(e);if(i)return i.persist_results=t,S(e,i)}}function e(e){if(y(e)&&e){var t=x(e);if(t){var i=e.find(".job_filters");return t.form=i.serialize(),S(e,t)}}}function C(e,t,i){var n,a=e.find(".job_listings"),o=e.find(".showing_jobs");return"boolean"!=typeof i&&(i=!1),"string"==typeof t.showing&&t.showing?(n=jQuery("<span>").html(t.showing),o.show().html("").html(t.showing_links).prepend(n)):o.hide(),t.showing_all?o.addClass("wp-job-manager-showing-all"):o.removeClass("wp-job-manager-showing-all"),t.html&&(i?a.append(t.html):a.html(t.html)),!0===e.data("show_pagination")?(e.find(".job-manager-pagination").remove(),t.pagination&&e.append(t.pagination)):(!t.found_jobs||t.max_num_pages<=t.data.page?w(".load_more_jobs:not(.load_previous)",e).hide():w(".load_more_jobs",e).show(),w(".load_more_jobs",e).removeClass("loading").data("page",t.data.page),w("li.job_listing",a).css("visibility","visible")),!0}w(document).on("click","a",function(){w("div.job_listings").each(function(){e(w(this))})}),w(document).on("submit","form",function(){w("div.job_listings").each(function(){e(w(this))})});var t,H=[];w("div.job_listings").on("click","li.job_listing a",function(){a(w(this).closest("div.job_listings"),!0)}).on("click",".job-manager-pagination a",function(){var e=w(this).closest("div.job_listings"),t=w(this).data("page");return e.triggerHandler("update_results",[t,!1]),w("body, html").animate({scrollTop:e.offset().top},600),!1}).on("update_results",function(e,t,i){var n,a,o,s,r,l,d="",c=w(this),g=c.find(".job_filters"),u=c.find(".job_listings"),_=c.data("per_page"),f=c.data("orderby"),p=c.data("order"),h=c.data("featured"),m=c.data("filled"),b=c.data("job_types"),j=c.data("post_status"),v=w("div.job_listings").index(this);v<0||(function(e){if(y(e)){var t=k(e);try{window.sessionStorage.removeItem(t)}catch(e){return}}}(c),H[v]&&H[v].abort(),i&&1!==t||(w("li.job_listing, li.no_job_listings_found",u).css("visibility","hidden"),u.addClass("loading")),c.find(".load_more_jobs").data("page",t),d=!0===c.data("show_filters")?(s=[],w(':input[name="filter_job_type[]"]:checked, :input[name="filter_job_type[]"][type="hidden"], :input[name="filter_job_type"]',g).each(function(){s.push(w(this).val())}),n=g.find(':input[name^="search_categories"]').map(function(){return w(this).val()}).get(),o=a="",r=g.find(':input[name="search_keywords"]'),l=g.find(':input[name="search_location"]'),r.val()!==r.attr("placeholder")&&(a=r.val()),l.val()!==l.attr("placeholder")&&(o=l.val()),{lang:job_manager_ajax_filters.lang,search_keywords:a,search_location:o,search_categories:n,filter_job_type:s,filter_post_status:j,per_page:_,orderby:f,order:p,page:t,featured:h,filled:m,show_pagination:c.data("show_pagination"),form_data:g.serialize()}):(n=c.data("categories"),a=c.data("keywords"),o=c.data("location"),n&&("string"!=typeof n&&(n=String(n)),n=n.split(",")),{lang:job_manager_ajax_filters.lang,search_categories:n,search_keywords:a,search_location:o,filter_post_status:j,filter_job_type:b,per_page:_,orderby:f,order:p,page:t,featured:h,filled:m,show_pagination:c.data("show_pagination")}),H[v]=w.ajax({type:"POST",url:job_manager_ajax_filters.ajax_url.toString().replace("%%endpoint%%","get_listings"),data:d,success:function(e){if(e)try{e.data=d,C(c,e,i),u.removeClass("loading"),c.triggerHandler("updated_results",e),function(e,t){if(y(e)){var i=(i=x(e))||{persist_results:!1},n=e.find(".job_listings");t.html=n.html(),i.results=t,S(e,i)}}(c,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.")}}}))}),w("#search_keywords, #search_location, .job_types :input, #search_categories, .job-manager-filter").change(function(){var e=w(this).closest("div.job_listings");e.triggerHandler("update_results",[1,!1]),S(e)}).on("keyup",function(e){13===e.which&&w(this).trigger("change")}),w(".job_filters").on("click",".reset",function(){var e=w(this).closest("div.job_listings"),t=w(this).closest("form");return t.find(':input[name="search_keywords"], :input[name="search_location"], .job-manager-filter').not(':input[type="hidden"]').val("").trigger("change.select2"),t.find(':input[name^="search_categories"]').not(':input[type="hidden"]').val("").trigger("change.select2"),w(':input[name="filter_job_type[]"]',t).not(':input[type="hidden"]').attr("checked","checked"),e.triggerHandler("reset"),e.triggerHandler("update_results",[1,!1]),S(e),!1}).on("submit",function(){return!1}),w(document.body).on("click",".load_more_jobs",function(){var e=w(this).closest("div.job_listings"),t=parseInt(w(this).data("page")||1,10);return w(this).addClass("loading"),t+=1,w(this).data("page",t),e.triggerHandler("update_results",[t,!0]),!1}),w.isFunction(w.fn.select2)&&"undefined"!=typeof job_manager_select2_args&&((t=job_manager_select2_args).allowClear=!0,t.minimumResultsForSearch=10,w('select[name^="search_categories"]:visible').select2(t)),w(window).on("
|
1 |
+
jQuery(document).ready(function(w){var n="job_listing_";function y(e){return!(!window.sessionStorage||"function"!=typeof window.sessionStorage.setItem||w(document.body).hasClass("disable-job-manager-form-state-storage")||e.data("disable-form-state-storage"))}function k(e){var t=w("div.job_listings").index(e),i=e.data("post_id");return void 0!==i&&i||(i=window.location.href.replace(location.hash,"")),n+i+"_"+t}function S(e,t){if(!y(e))return!1;"object"!=typeof t&&(t={});var i=k(e);try{return window.sessionStorage.setItem(i,JSON.stringify(t))}catch(e){}return!1}function x(e){if(!y(e))return!1;var t=k(e);try{var i=window.sessionStorage.getItem(t);if(i)return JSON.parse(i)}catch(e){}return!1}function a(e,t){if(y(e)&&e){var i=x(e);if(i)return i.persist_results=t,S(e,i)}}function e(e){if(y(e)&&e){var t=x(e);if(t){var i=e.find(".job_filters");return t.form=i.serialize(),S(e,t)}}}function C(e,t,i){var n,a=e.find(".job_listings"),o=e.find(".showing_jobs");return"boolean"!=typeof i&&(i=!1),"string"==typeof t.showing&&t.showing?(n=jQuery("<span>").html(t.showing),o.show().html("").html(t.showing_links).prepend(n)):o.hide(),t.showing_all?o.addClass("wp-job-manager-showing-all"):o.removeClass("wp-job-manager-showing-all"),t.html&&(i?a.append(t.html):a.html(t.html)),!0===e.data("show_pagination")?(e.find(".job-manager-pagination").remove(),t.pagination&&e.append(t.pagination)):(!t.found_jobs||t.max_num_pages<=t.data.page?w(".load_more_jobs:not(.load_previous)",e).hide():w(".load_more_jobs",e).show(),w(".load_more_jobs",e).removeClass("loading").data("page",t.data.page),w("li.job_listing",a).css("visibility","visible")),!0}w(document).on("click","a",function(){w("div.job_listings").each(function(){e(w(this))})}),w(document).on("submit","form",function(){w("div.job_listings").each(function(){e(w(this))})});var t,H=[];w("div.job_listings").on("click","li.job_listing a",function(){a(w(this).closest("div.job_listings"),!0)}).on("click",".job-manager-pagination a",function(){var e=w(this).closest("div.job_listings"),t=w(this).data("page");return e.triggerHandler("update_results",[t,!1]),w("body, html").animate({scrollTop:e.offset().top},600),!1}).on("update_results",function(e,t,i){var n,a,o,s,r,l,d="",c=w(this),g=c.find(".job_filters"),u=c.find(".job_listings"),_=c.data("per_page"),f=c.data("orderby"),p=c.data("order"),h=c.data("featured"),m=c.data("filled"),b=c.data("job_types"),j=c.data("post_status"),v=w("div.job_listings").index(this);v<0||(function(e){if(y(e)){var t=k(e);try{window.sessionStorage.removeItem(t)}catch(e){return}}}(c),H[v]&&H[v].abort(),i&&1!==t||(w("li.job_listing, li.no_job_listings_found",u).css("visibility","hidden"),u.addClass("loading")),c.find(".load_more_jobs").data("page",t),d=!0===c.data("show_filters")?(s=[],w(':input[name="filter_job_type[]"]:checked, :input[name="filter_job_type[]"][type="hidden"], :input[name="filter_job_type"]',g).each(function(){s.push(w(this).val())}),n=g.find(':input[name^="search_categories"]').map(function(){return w(this).val()}).get(),o=a="",r=g.find(':input[name="search_keywords"]'),l=g.find(':input[name="search_location"]'),r.val()!==r.attr("placeholder")&&(a=r.val()),l.val()!==l.attr("placeholder")&&(o=l.val()),{lang:job_manager_ajax_filters.lang,search_keywords:a,search_location:o,search_categories:n,filter_job_type:s,filter_post_status:j,per_page:_,orderby:f,order:p,page:t,featured:h,filled:m,show_pagination:c.data("show_pagination"),form_data:g.serialize()}):(n=c.data("categories"),a=c.data("keywords"),o=c.data("location"),n&&("string"!=typeof n&&(n=String(n)),n=n.split(",")),{lang:job_manager_ajax_filters.lang,search_categories:n,search_keywords:a,search_location:o,filter_post_status:j,filter_job_type:b,per_page:_,orderby:f,order:p,page:t,featured:h,filled:m,show_pagination:c.data("show_pagination")}),H[v]=w.ajax({type:"POST",url:job_manager_ajax_filters.ajax_url.toString().replace("%%endpoint%%","get_listings"),data:d,success:function(e){if(e)try{e.data=d,C(c,e,i),u.removeClass("loading"),c.triggerHandler("updated_results",e),function(e,t){if(y(e)){var i=(i=x(e))||{persist_results:!1},n=e.find(".job_listings");t.html=n.html(),i.results=t,S(e,i)}}(c,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.")}}}))}),w("#search_keywords, #search_location, .job_types :input, #search_categories, .job-manager-filter").change(function(){var e=w(this).closest("div.job_listings");e.triggerHandler("update_results",[1,!1]),S(e)}).on("keyup",function(e){13===e.which&&w(this).trigger("change")}),w(".job_filters").on("click",".reset",function(){var e=w(this).closest("div.job_listings"),t=w(this).closest("form");return t.find(':input[name="search_keywords"], :input[name="search_location"], .job-manager-filter').not(':input[type="hidden"]').val("").trigger("change.select2"),t.find(':input[name^="search_categories"]').not(':input[type="hidden"]').val("").trigger("change.select2"),w(':input[name="filter_job_type[]"]',t).not(':input[type="hidden"]').attr("checked","checked"),e.triggerHandler("reset"),e.triggerHandler("update_results",[1,!1]),S(e),!1}).on("submit",function(){return!1}),w(document.body).on("click",".load_more_jobs",function(){var e=w(this).closest("div.job_listings"),t=parseInt(w(this).data("page")||1,10);return w(this).addClass("loading"),t+=1,w(this).data("page",t),e.triggerHandler("update_results",[t,!0]),!1}),w.isFunction(w.fn.select2)&&"undefined"!=typeof job_manager_select2_args&&((t=job_manager_select2_args).allowClear=!0,t.minimumResultsForSearch=10,w('select[name^="search_categories"]:visible').select2(t)),w(window).on("unload",function(){return w("div.job_listings").each(function(){var e=x(w(this));e&&!e.persist_results&&function(e){if(y(e)){var t=x(e);(t=t||{}).results=null,S(e,t)}}(w(this))}),!0}),w("div.job_listings").each(function(){var e=w(this),t=e.find(".job_filters"),i=!1,n=x(e);n&&(n.results&&(i=C(e,n.results),a(e,!1),function(e){if(y(e)){var t=x(e);(t=t||{}).form=null,S(e,t)}}(e)),"string"==typeof n.form&&""!==n.form&&(t.find("input[type=checkbox]").prop("checked",!1),t.deserialize(n.form),t.find(':input[name^="search_categories"]').not(':input[type="hidden"]').trigger("change.select2"))),!i&&0<t.length&&e.triggerHandler("update_results",[1,!1])})});
|
changelog.txt
CHANGED
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
1 |
= 1.34.4 =
|
2 |
* Fix: Harden security of job dashboard actions. Reported by Slavco.
|
3 |
* Updated template: `job-dashboard.php`.
|
1 |
+
= 1.34.5 =
|
2 |
+
* Fix: Jobs list not appearing in the page load while using Firefox.
|
3 |
+
|
4 |
= 1.34.4 =
|
5 |
* Fix: Harden security of job dashboard actions. Reported by Slavco.
|
6 |
* Updated template: `job-dashboard.php`.
|
includes/class-wp-job-manager-shortcodes.php
CHANGED
@@ -73,13 +73,13 @@ class WP_Job_Manager_Shortcodes {
|
|
73 |
}
|
74 |
|
75 |
/**
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
private function is_job_dashboard_page() {
|
84 |
global $post;
|
85 |
|
@@ -546,8 +546,8 @@ class WP_Job_Manager_Shortcodes {
|
|
546 |
$disable_client_state = true;
|
547 |
}
|
548 |
if ( ! empty( $_GET['search_location'] ) ) {
|
549 |
-
$atts['location']
|
550 |
-
$disable_client_state
|
551 |
}
|
552 |
if ( ! empty( $_GET['search_category'] ) ) {
|
553 |
$atts['selected_category'] = sanitize_text_field( wp_unslash( $_GET['search_category'] ) );
|
73 |
}
|
74 |
|
75 |
/**
|
76 |
+
* Helper function used to check if page is WPJM dashboard page.
|
77 |
+
*
|
78 |
+
* Checks if page has 'job_dashboard' shortcode.
|
79 |
+
*
|
80 |
+
* @access private
|
81 |
+
* @return bool True if page is dashboard page, false otherwise.
|
82 |
+
*/
|
83 |
private function is_job_dashboard_page() {
|
84 |
global $post;
|
85 |
|
546 |
$disable_client_state = true;
|
547 |
}
|
548 |
if ( ! empty( $_GET['search_location'] ) ) {
|
549 |
+
$atts['location'] = sanitize_text_field( wp_unslash( $_GET['search_location'] ) );
|
550 |
+
$disable_client_state = true;
|
551 |
}
|
552 |
if ( ! empty( $_GET['search_category'] ) ) {
|
553 |
$atts['selected_category'] = sanitize_text_field( wp_unslash( $_GET['search_category'] ) );
|
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.34.
|
6 |
"Report-Msgid-Bugs-To: https://github.com/Automattic/WP-Job-Manager/issues\n"
|
7 |
-
"POT-Creation-Date: 2020-
|
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.34.5\n"
|
6 |
"Report-Msgid-Bugs-To: https://github.com/Automattic/WP-Job-Manager/issues\n"
|
7 |
+
"POT-Creation-Date: 2020-12-15 13:04:33+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
@@ -4,7 +4,7 @@ Tags: job manager, job listing, job board, job management, job lists, job list,
|
|
4 |
Requires at least: 5.2
|
5 |
Tested up to: 5.6
|
6 |
Requires PHP: 7.0
|
7 |
-
Stable tag: 1.34.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -153,6 +153,9 @@ It then creates a database based on the parameters passed to it.
|
|
153 |
|
154 |
== Changelog ==
|
155 |
|
|
|
|
|
|
|
156 |
= 1.34.4 =
|
157 |
* Fix: Harden security of job dashboard actions. Reported by Slavco.
|
158 |
* Updated template: `job-dashboard.php`.
|
4 |
Requires at least: 5.2
|
5 |
Tested up to: 5.6
|
6 |
Requires PHP: 7.0
|
7 |
+
Stable tag: 1.34.5
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
153 |
|
154 |
== Changelog ==
|
155 |
|
156 |
+
= 1.34.5 =
|
157 |
+
* Fix: Jobs list not appearing in the page load while using Firefox.
|
158 |
+
|
159 |
= 1.34.4 =
|
160 |
* Fix: Harden security of job dashboard actions. Reported by Slavco.
|
161 |
* Updated template: `job-dashboard.php`.
|
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.34.
|
7 |
* Author: Automattic
|
8 |
* Author URI: https://wpjobmanager.com/
|
9 |
* Requires at least: 5.2
|
@@ -21,7 +21,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
21 |
}
|
22 |
|
23 |
// Define constants.
|
24 |
-
define( 'JOB_MANAGER_VERSION', '1.34.
|
25 |
define( 'JOB_MANAGER_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
|
26 |
define( 'JOB_MANAGER_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
|
27 |
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.34.5
|
7 |
* Author: Automattic
|
8 |
* Author URI: https://wpjobmanager.com/
|
9 |
* Requires at least: 5.2
|
21 |
}
|
22 |
|
23 |
// Define constants.
|
24 |
+
define( 'JOB_MANAGER_VERSION', '1.34.5' );
|
25 |
define( 'JOB_MANAGER_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
|
26 |
define( 'JOB_MANAGER_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
|
27 |
define( 'JOB_MANAGER_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|