Regions for WP Job Manager - Version 1.18.0

Version Description

Download this release

Release Info

Developer Astoundify
Plugin Icon wp plugin Regions for WP Job Manager
Version 1.18.0
Comparing to
See all releases

Code changes from version 1.17.7 to 1.18.0

assets/js/main.js CHANGED
@@ -133,10 +133,13 @@
133
  });
134
  },
135
 
136
- addSubmission: function() {
137
- $( '#job_region, #resume_region' ).chosen({
138
- search_contains: true
139
- });
 
 
 
140
  },
141
 
142
  addRegions: function() {
133
  });
134
  },
135
 
136
+ addSubmission: function() {
137
+ var filter_id = $( '#job_region, #resume_region' );
138
+ if(filter_id.length){
139
+ filter_id.chosen({
140
+ search_contains: true
141
+ });
142
+ }
143
  },
144
 
145
  addRegions: function() {
assets/js/main.min.js CHANGED
@@ -1 +1 @@
1
- !function(i){"use strict";({cache:{$document:i(document),$window:i(window)},init:function(){this.bindEvents()},bindEvents:function(){var e=this;this.cache.$document.on("ready",function(){e.$forms=i(".search_jobs"),"undefined"==typeof job_manager_select2_args?this.select2_args={}:this.select2_args=job_manager_select2_args,this.select2_args.allowClear=!0,this.select2_args.minimumResultsForSearch=10,e.addSubmission(),e.addRegions(),e.updateResults(),e.resetResults()})},addSubmission:function(){i.isFunction(i.fn.chosen)?i("#job_region, #resume_region").chosen({search_contains:!0}):i.isFunction(i.fn.select2)&&i("#job_region, #resume_region").select2(this.select2_args)},addRegions:function(){this.$forms.each(function(e,s){var n=!1,t=i(s).find("select.search_region");t.parent().hasClass("select")&&(n=!0,t=t.parent()),t.length&&((s=i(s).find(".search_location")).html(""),s.removeClass("search_location").addClass("search_region"),t.detach().appendTo(s),s={search_contains:!0},i.isFunction(i.fn.chosen)?(n?t.children("select"):t).chosen(s):(n?t.children("select"):t).select2(this.select2_args))})},updateResults:function(){this.$forms.each(function(e,s){i(this).find(".search_region").on("change",function(){i(this).closest("div.job_listings").trigger("update_results",[1,!1])})})},resetResults:function(){var e=this;i(".job_listings").on("reset",function(){e.$forms.each(function(e,s){i(s).find("select.search_region").val(0).trigger("change").trigger("chosen:updated")})})}}).init(),{cache:{$document:i(document),$window:i(window)},init:function(){this.bindEvents()},bindEvents:function(){var e=this;this.cache.$document.on("ready",function(){e.$forms=i(".search_resumes"),e.addSubmission(),e.addRegions(),e.updateResults(),e.resetResults()})},addSubmission:function(){i("#job_region, #resume_region").chosen({search_contains:!0})},addRegions:function(){this.$forms.each(function(e,s){var n=!1,t=i(s).find("select.search_region");t.parent().hasClass("select")&&(n=!0,t=t.parent()),t.length&&((s=i(s).find(".search_location")).html(""),s.removeClass("search_location").addClass("search_region"),t.detach().appendTo(s),s={search_contains:!0},(n?t.children("select"):t).chosen(s))})},updateResults:function(){this.$forms.each(function(e,s){i(this).find(".search_region").on("change",function(){i(this).closest("div.resumes").trigger("update_results",[1,!1])})})},resetResults:function(){var e=this;i(".resumes").on("reset",function(){e.$forms.each(function(e,s){i(s).find("select.search_region").val(0).trigger("change").trigger("chosen:updated")})})}}.init()}(jQuery);
1
+ !function(e){"use strict";({cache:{$document:e(document),$window:e(window)},init:function(){this.bindEvents()},bindEvents:function(){var s=this;this.cache.$document.on("ready",function(){s.$forms=e(".search_jobs"),"undefined"==typeof job_manager_select2_args?this.select2_args={}:this.select2_args=job_manager_select2_args,this.select2_args.allowClear=!0,this.select2_args.minimumResultsForSearch=10,s.addSubmission(),s.addRegions(),s.updateResults(),s.resetResults()})},addSubmission:function(){e.isFunction(e.fn.chosen)?e("#job_region, #resume_region").chosen({search_contains:!0}):e.isFunction(e.fn.select2)&&e("#job_region, #resume_region").select2(this.select2_args)},addRegions:function(){this.$forms.each(function(s,n){var t=!1,i=e(n).find("select.search_region");if(i.parent().hasClass("select")&&(t=!0,i=i.parent()),i.length){var c=e(n).find(".search_location");c.html(""),c.removeClass("search_location").addClass("search_region"),i.detach().appendTo(c);var o={search_contains:!0};e.isFunction(e.fn.chosen)?t?i.children("select").chosen(o):i.chosen(o):t?i.children("select").select2(this.select2_args):i.select2(this.select2_args)}})},updateResults:function(){this.$forms.each(function(s,n){e(this).find(".search_region").on("change",function(){e(this).closest("div.job_listings").trigger("update_results",[1,!1])})})},resetResults:function(){var s=this;e(".job_listings").on("reset",function(){s.$forms.each(function(s,n){e(n).find("select.search_region").val(0).trigger("change").trigger("chosen:updated")})})}}).init(),{cache:{$document:e(document),$window:e(window)},init:function(){this.bindEvents()},bindEvents:function(){var s=this;this.cache.$document.on("ready",function(){s.$forms=e(".search_resumes"),s.addSubmission(),s.addRegions(),s.updateResults(),s.resetResults()})},addSubmission:function(){var s=e("#job_region, #resume_region");s.length&&s.chosen({search_contains:!0})},addRegions:function(){this.$forms.each(function(s,n){var t=!1,i=e(n).find("select.search_region");if(i.parent().hasClass("select")&&(t=!0,i=i.parent()),i.length){var c=e(n).find(".search_location");c.html(""),c.removeClass("search_location").addClass("search_region"),i.detach().appendTo(c);var o={search_contains:!0};t?i.children("select").chosen(o):i.chosen(o)}})},updateResults:function(){this.$forms.each(function(s,n){e(this).find(".search_region").on("change",function(){e(this).closest("div.resumes").trigger("update_results",[1,!1])})})},resetResults:function(){var s=this;e(".resumes").on("reset",function(){s.$forms.each(function(s,n){e(n).find("select.search_region").val(0).trigger("change").trigger("chosen:updated")})})}}.init()}(jQuery);
includes/class-template.php CHANGED
@@ -43,20 +43,20 @@ class Astoundify_Job_Manager_Regions_Template extends Astoundify_Job_Manager_Reg
43
  */
44
  public function wp_enqueue_scripts() {
45
  $deps = array( 'jquery' );
 
 
 
 
 
 
 
 
 
 
 
46
 
47
- $wpjm = WPJM();
48
-
49
- if ( method_exists( $wpjm, 'register_select2_assets' ) ) {
50
- $wpjm::register_select2_assets();
51
-
52
- wp_enqueue_script( 'select2' );
53
- wp_enqueue_style( 'select2' );
54
- } else {
55
- wp_enqueue_script( 'chosen' );
56
- wp_enqueue_style( 'chosen' );
57
  }
58
-
59
- wp_enqueue_script( 'job-regions', wp_job_manager_regions()->plugin_url . 'assets/js/main.min.js', array( 'jquery' ), 20190128, true );
60
  }
61
 
62
  public function submit_resume_form_fields_get_resume_data( $fields, $job ) {
43
  */
44
  public function wp_enqueue_scripts() {
45
  $deps = array( 'jquery' );
46
+ if(function_exists('WPJM')){
47
+ $wpjm = WPJM();
48
+ if ( method_exists( $wpjm, 'register_select2_assets' ) ) {
49
+ $wpjm::register_select2_assets();
50
+
51
+ wp_enqueue_script( 'select2' );
52
+ wp_enqueue_style( 'select2' );
53
+ } else {
54
+ wp_enqueue_script( 'chosen' );
55
+ wp_enqueue_style( 'chosen' );
56
+ }
57
 
58
+ wp_enqueue_script( 'job-regions', wp_job_manager_regions()->plugin_url . 'assets/js/main.min.js', array( 'jquery' ), 20190128, true );
 
 
 
 
 
 
 
 
 
59
  }
 
 
60
  }
61
 
62
  public function submit_resume_form_fields_get_resume_data( $fields, $job ) {
readme.txt CHANGED
@@ -5,8 +5,8 @@ Donate link: https://www.paypal.me/astoundify
5
  Contributors: Astoundify
6
  Tags: job, job listing, job region
7
  Requires at least: 4.7.0
8
- Tested up to: 5.5.1
9
- Stable Tag: 1.17.7
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
12
 
@@ -31,11 +31,17 @@ Astoundify has released two themes that are fully integrated with the WP Job Man
31
 
32
  == Changelog ==
33
 
34
- = 1.17.7: Nov 25, 2020 =
 
 
 
 
 
 
35
 
36
  * Fix: Minify JS file.
37
  * New: Regions settings implementation for resumes.
38
- * Update: Compatibility check with latest WordPress v5.5.3.
39
  * Update: Compatibility check with Latest WP Job Manager v1.34.3.
40
  * Update: Compatibility check with the latest PHP v7.4.10.
41
 
5
  Contributors: Astoundify
6
  Tags: job, job listing, job region
7
  Requires at least: 4.7.0
8
+ Tested up to: 5.8.0
9
+ Stable Tag: 1.18.0
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
12
 
31
 
32
  == Changelog ==
33
 
34
+ = 1.18.0: Aug 16, 2021 =
35
+
36
+ * Update: Compatibility check with latest WordPress v5.8.0.
37
+ * Update: Compatibility check with Latest WP Job Manager v1.35.2.
38
+ * Fix: Console error issue.
39
+
40
+ = 1.17.7: Oct 27, 2020 =
41
 
42
  * Fix: Minify JS file.
43
  * New: Regions settings implementation for resumes.
44
+ * Update: Compatibility check with latest WordPress v5.5.1.
45
  * Update: Compatibility check with Latest WP Job Manager v1.34.3.
46
  * Update: Compatibility check with the latest PHP v7.4.10.
47
 
wp-job-manager-locations.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Create predefined regions/locations that job submissions can associate themselves with.
6
  * Author: Astoundify
7
  * Author URI: http://astoundify.com
8
- * Version: 1.17.7
9
  * Text Domain: wp-job-manager-locations
10
  * Domain Path: /languages
11
  */
5
  * Description: Create predefined regions/locations that job submissions can associate themselves with.
6
  * Author: Astoundify
7
  * Author URI: http://astoundify.com
8
+ * Version: 1.18.0
9
  * Text Domain: wp-job-manager-locations
10
  * Domain Path: /languages
11
  */