WP Job Manager - Version 1.23.2

Version Description

  • Send entire form data (listify workaround).
  • Set is_home false on ajax endpoint (listify workaround).
Download this release

Release Info

Developer mikejolley
Plugin Icon 128x128 WP Job Manager
Version 1.23.2
Comparing to
See all releases

Code changes from version 1.23.1 to 1.23.2

assets/js/ajax-filters.js CHANGED
@@ -75,7 +75,7 @@ jQuery( document ).ready( function ( $ ) {
75
  featured: featured,
76
  filled: filled,
77
  show_pagination: target.data( 'show_pagination' ),
78
- form_data: form.find(':input').not(':input[name="search_keywords"], :input[name="search_location"], :input[name^="search_categories"], :input[name^="filter_job_type"]').serialize()
79
  };
80
 
81
  } else {
75
  featured: featured,
76
  filled: filled,
77
  show_pagination: target.data( 'show_pagination' ),
78
+ form_data: form.serialize()
79
  };
80
 
81
  } else {
assets/js/ajax-filters.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(a){function b(b,c){if($supports_html5_history){var e=b.find(".job_filters"),f=a(e).serialize(),g=a("div.job_listings").index(b);window.history.replaceState({id:"job_manager_state",page:c,data:f,index:g},"",d+"#s=1")}}var c=[];a(".job_listings").on("update_results",function(b,d,e,f){var g="",h=a(this),i=h.find(".job_filters"),j=h.find(".showing_jobs"),k=h.find(".job_listings"),l=h.data("per_page"),m=h.data("orderby"),n=h.data("order"),o=h.data("featured"),p=h.data("filled"),q=a("div.job_listings").index(this);if(!(0>q)){if(c[q]&&c[q].abort(),e||(a(k).addClass("loading"),a("li.job_listing, li.no_job_listings_found",k).css("visibility","hidden"),d>1&&1!=h.data("show_pagination")?a(k).before('<a class="load_more_jobs load_previous" href="#"><strong>'+job_manager_ajax_filters.i18n_load_prev_listings+"</strong></a>"):h.find(".load_previous").remove(),h.find(".load_more_jobs").data("page",d)),1==h.data("show_filters")){var r=[];a(':input[name="filter_job_type[]"]:checked, :input[name="filter_job_type[]"][type="hidden"], :input[name="filter_job_type"]',i).each(function(){r.push(a(this).val())});var s=i.find(':input[name^="search_categories"]').map(function(){return a(this).val()}).get(),t="",u="",v=i.find(':input[name="search_keywords"]'),w=i.find(':input[name="search_location"]');v.val()!==v.attr("placeholder")&&(t=v.val()),w.val()!==w.attr("placeholder")&&(u=w.val()),g={action:"job_manager_get_listings",search_keywords:t,search_location:u,search_categories:s,filter_job_type:r,per_page:l,orderby:m,order:n,page:d,featured:o,filled:p,show_pagination:h.data("show_pagination"),form_data:i.find(":input").not(':input[name="search_keywords"], :input[name="search_location"], :input[name^="search_categories"], :input[name^="filter_job_type"]').serialize()}}else{var s=h.data("categories"),t=h.data("keywords"),u=h.data("location");s&&(s=s.split(",")),g={search_categories:s,search_keywords:t,search_location:u,per_page:l,orderby:m,order:n,page:d,featured:o,filled:p,show_pagination:h.data("show_pagination")}}c[q]=a.ajax({type:"GET",url:job_manager_ajax_filters.ajax_url+"get_listings",data:g,success:function(b){if(b)try{b.showing?a(j).show().html("<span>"+b.showing+"</span>"+b.showing_links):a(j).hide(),b.showing_all?a(j).addClass("wp-job-manager-showing-all"):a(j).removeClass("wp-job-manager-showing-all"),b.html&&(e&&f?a(k).prepend(b.html):e?a(k).append(b.html):a(k).html(b.html)),1==h.data("show_pagination")?(h.find(".job-manager-pagination").remove(),b.pagination&&h.append(b.pagination)):(!b.found_jobs||b.max_num_pages<=d?a(".load_more_jobs:not(.load_previous)",h).hide():f||a(".load_more_jobs",h).show(),a(".load_more_jobs",h).removeClass("loading"),a("li.job_listing",k).css("visibility","visible")),a(k).removeClass("loading"),h.triggerHandler("updated_results",b)}catch(c){}}})}}),a("#search_keywords, #search_location, .job_types :input, #search_categories").change(function(){var c=a(this).closest("div.job_listings");c.triggerHandler("update_results",[1,!1]),b(c,1)}).on("keyup",function(b){13===b.which&&a(this).trigger("change")}),a(".job_filters").on("click",".reset",function(){var c=a(this).closest("div.job_listings"),d=a(this).closest("form");return d.find(':input[name="search_keywords"]').not(':input[type="hidden"]').val(""),d.find(':input[name="search_location"]').not(':input[type="hidden"]').val(""),d.find(':input[name^="search_categories"]').not(':input[type="hidden"]').val(0).trigger("chosen:updated"),a(':input[name="filter_job_type[]"]',d).not(':input[type="hidden"]').attr("checked","checked"),c.triggerHandler("reset"),c.triggerHandler("update_results",[1,!1]),b(c,1),!1}),a(document.body).on("click",".load_more_jobs",function(){var c=a(this).closest("div.job_listings"),d=parseInt(a(this).data("page")||1),e=!1;return a(this).addClass("loading"),a(this).is(".load_previous")?(d-=1,e=!0,1===d?a(this).remove():a(this).data("page",d)):(d+=1,a(this).data("page",d),b(c,d)),c.triggerHandler("update_results",[d,!0,e]),!1}),a("div.job_listings").on("click",".job-manager-pagination a",function(){var c=a(this).closest("div.job_listings"),d=a(this).data("page");return b(c,d),c.triggerHandler("update_results",[d,!1]),a("body, html").animate({scrollTop:c.offset().top},600),!1}),a.isFunction(a.fn.chosen)&&(1==job_manager_ajax_filters.is_rtl&&a('select[name^="search_categories"]').addClass("chosen-rtl"),a('select[name^="search_categories"]').chosen({search_contains:!0})),$supports_html5_history=window.history&&window.history.pushState?!0:!1;var d=document.location.href.split("#")[0];a(window).on("load",function(){a(".job_filters").each(function(){var b=a(this).closest("div.job_listings"),c=b.find(".job_filters"),d=1,e=a("div.job_listings").index(b);if(window.history.state&&window.location.hash){var f=window.history.state;f.id&&"job_manager_state"===f.id&&e==f.index&&(d=f.page,c.deserialize(f.data),c.find(':input[name^="search_categories"]').not(':input[type="hidden"]').trigger("chosen:updated"))}b.triggerHandler("update_results",[d,!1])})})});
1
+ jQuery(document).ready(function(a){function b(b,c){if($supports_html5_history){var e=b.find(".job_filters"),f=a(e).serialize(),g=a("div.job_listings").index(b);window.history.replaceState({id:"job_manager_state",page:c,data:f,index:g},"",d+"#s=1")}}var c=[];a(".job_listings").on("update_results",function(b,d,e,f){var g="",h=a(this),i=h.find(".job_filters"),j=h.find(".showing_jobs"),k=h.find(".job_listings"),l=h.data("per_page"),m=h.data("orderby"),n=h.data("order"),o=h.data("featured"),p=h.data("filled"),q=a("div.job_listings").index(this);if(!(0>q)){if(c[q]&&c[q].abort(),e||(a(k).addClass("loading"),a("li.job_listing, li.no_job_listings_found",k).css("visibility","hidden"),d>1&&1!=h.data("show_pagination")?a(k).before('<a class="load_more_jobs load_previous" href="#"><strong>'+job_manager_ajax_filters.i18n_load_prev_listings+"</strong></a>"):h.find(".load_previous").remove(),h.find(".load_more_jobs").data("page",d)),1==h.data("show_filters")){var r=[];a(':input[name="filter_job_type[]"]:checked, :input[name="filter_job_type[]"][type="hidden"], :input[name="filter_job_type"]',i).each(function(){r.push(a(this).val())});var s=i.find(':input[name^="search_categories"]').map(function(){return a(this).val()}).get(),t="",u="",v=i.find(':input[name="search_keywords"]'),w=i.find(':input[name="search_location"]');v.val()!==v.attr("placeholder")&&(t=v.val()),w.val()!==w.attr("placeholder")&&(u=w.val()),g={action:"job_manager_get_listings",search_keywords:t,search_location:u,search_categories:s,filter_job_type:r,per_page:l,orderby:m,order:n,page:d,featured:o,filled:p,show_pagination:h.data("show_pagination"),form_data:i.serialize()}}else{var s=h.data("categories"),t=h.data("keywords"),u=h.data("location");s&&(s=s.split(",")),g={search_categories:s,search_keywords:t,search_location:u,per_page:l,orderby:m,order:n,page:d,featured:o,filled:p,show_pagination:h.data("show_pagination")}}c[q]=a.ajax({type:"GET",url:job_manager_ajax_filters.ajax_url+"get_listings",data:g,success:function(b){if(b)try{b.showing?a(j).show().html("<span>"+b.showing+"</span>"+b.showing_links):a(j).hide(),b.showing_all?a(j).addClass("wp-job-manager-showing-all"):a(j).removeClass("wp-job-manager-showing-all"),b.html&&(e&&f?a(k).prepend(b.html):e?a(k).append(b.html):a(k).html(b.html)),1==h.data("show_pagination")?(h.find(".job-manager-pagination").remove(),b.pagination&&h.append(b.pagination)):(!b.found_jobs||b.max_num_pages<=d?a(".load_more_jobs:not(.load_previous)",h).hide():f||a(".load_more_jobs",h).show(),a(".load_more_jobs",h).removeClass("loading"),a("li.job_listing",k).css("visibility","visible")),a(k).removeClass("loading"),h.triggerHandler("updated_results",b)}catch(c){}}})}}),a("#search_keywords, #search_location, .job_types :input, #search_categories").change(function(){var c=a(this).closest("div.job_listings");c.triggerHandler("update_results",[1,!1]),b(c,1)}).on("keyup",function(b){13===b.which&&a(this).trigger("change")}),a(".job_filters").on("click",".reset",function(){var c=a(this).closest("div.job_listings"),d=a(this).closest("form");return d.find(':input[name="search_keywords"]').not(':input[type="hidden"]').val(""),d.find(':input[name="search_location"]').not(':input[type="hidden"]').val(""),d.find(':input[name^="search_categories"]').not(':input[type="hidden"]').val(0).trigger("chosen:updated"),a(':input[name="filter_job_type[]"]',d).not(':input[type="hidden"]').attr("checked","checked"),c.triggerHandler("reset"),c.triggerHandler("update_results",[1,!1]),b(c,1),!1}),a(document.body).on("click",".load_more_jobs",function(){var c=a(this).closest("div.job_listings"),d=parseInt(a(this).data("page")||1),e=!1;return a(this).addClass("loading"),a(this).is(".load_previous")?(d-=1,e=!0,1===d?a(this).remove():a(this).data("page",d)):(d+=1,a(this).data("page",d),b(c,d)),c.triggerHandler("update_results",[d,!0,e]),!1}),a("div.job_listings").on("click",".job-manager-pagination a",function(){var c=a(this).closest("div.job_listings"),d=a(this).data("page");return b(c,d),c.triggerHandler("update_results",[d,!1]),a("body, html").animate({scrollTop:c.offset().top},600),!1}),a.isFunction(a.fn.chosen)&&(1==job_manager_ajax_filters.is_rtl&&a('select[name^="search_categories"]').addClass("chosen-rtl"),a('select[name^="search_categories"]').chosen({search_contains:!0})),$supports_html5_history=window.history&&window.history.pushState?!0:!1;var d=document.location.href.split("#")[0];a(window).on("load",function(){a(".job_filters").each(function(){var b=a(this).closest("div.job_listings"),c=b.find(".job_filters"),d=1,e=a("div.job_listings").index(b);if(window.history.state&&window.location.hash){var f=window.history.state;f.id&&"job_manager_state"===f.id&&e==f.index&&(d=f.page,c.deserialize(f.data),c.find(':input[name^="search_categories"]').not(':input[type="hidden"]').trigger("chosen:updated"))}b.triggerHandler("update_results",[d,!1])})})});
includes/class-wp-job-manager-ajax.php CHANGED
@@ -71,6 +71,10 @@ class WP_Job_Manager_Ajax {
71
  if ( ! defined( 'DOING_AJAX' ) ) {
72
  define( 'DOING_AJAX', true );
73
  }
 
 
 
 
74
  do_action( 'job_manager_ajax_' . sanitize_text_field( $action ) );
75
  die();
76
  }
71
  if ( ! defined( 'DOING_AJAX' ) ) {
72
  define( 'DOING_AJAX', true );
73
  }
74
+
75
+ // Not home - this is an ajax endpoint
76
+ $wp_query->is_home = false;
77
+
78
  do_action( 'job_manager_ajax_' . sanitize_text_field( $action ) );
79
  die();
80
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mike.jol
4
  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
5
  Requires at least: 4.1
6
  Tested up to: 4.2
7
- Stable tag: 1.23.1
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -142,6 +142,10 @@ You can view (and contribute) translations via the [Transifex project here](http
142
 
143
  == Changelog ==
144
 
 
 
 
 
145
  = 1.23.1 =
146
  * Orderby featured should be "menu order, date", not "manu order, title".
147
  * Remove duplicate data from form_data in filters JS.
4
  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
5
  Requires at least: 4.1
6
  Tested up to: 4.2
7
+ Stable tag: 1.23.2
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
142
 
143
  == Changelog ==
144
 
145
+ = 1.23.2 =
146
+ * Send entire form data (listify workaround).
147
+ * Set is_home false on ajax endpoint (listify workaround).
148
+
149
  = 1.23.1 =
150
  * Orderby featured should be "menu order, date", not "manu order, title".
151
  * Remove duplicate data from form_data in filters JS.
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.23.1
7
  Author: Mike Jolley
8
  Author URI: http://mikejolley.com
9
  Requires at least: 4.1
@@ -31,7 +31,7 @@ class WP_Job_Manager {
31
  */
32
  public function __construct() {
33
  // Define constants
34
- define( 'JOB_MANAGER_VERSION', '1.23.1' );
35
  define( 'JOB_MANAGER_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
36
  define( 'JOB_MANAGER_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
37
 
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.23.2
7
  Author: Mike Jolley
8
  Author URI: http://mikejolley.com
9
  Requires at least: 4.1
31
  */
32
  public function __construct() {
33
  // Define constants
34
+ define( 'JOB_MANAGER_VERSION', '1.23.2' );
35
  define( 'JOB_MANAGER_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
36
  define( 'JOB_MANAGER_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
37