Version Description
- Fix ajax filters 'true' for show_filters
- Fix geocoding for certain address strings
- Fix keywords typo
- Remove deprecated $wpdb->escape calls. Replaced with esc_sql
Download this release
Release Info
Developer | mikejolley |
Plugin | WP Job Manager |
Version | 1.11.1 |
Comparing to | |
See all releases |
Code changes from version 1.11.0 to 1.11.1
assets/js/ajax-filters.js
CHANGED
@@ -25,7 +25,7 @@ jQuery( document ).ready( function ( $ ) {
|
|
25 |
$( 'li.job_listing, li.no_job_listings_found', results ).css( 'visibility', 'hidden' );
|
26 |
}
|
27 |
|
28 |
-
if (
|
29 |
|
30 |
var filter_job_type = [];
|
31 |
|
25 |
$( 'li.job_listing, li.no_job_listings_found', results ).css( 'visibility', 'hidden' );
|
26 |
}
|
27 |
|
28 |
+
if ( true == target.data( 'show_filters' ) ) {
|
29 |
|
30 |
var filter_job_type = [];
|
31 |
|
assets/js/ajax-filters.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(a){var b;a(".job_listings").on("update_results",function(c,d,e){b&&b.abort();var f="",g=a(this),h=g.find(".job_filters"),i=g.find(".showing_jobs"),j=g.find(".job_listings"),k=g.data("per_page"),l=g.data("orderby"),m=g.data("order"),n=g.data("featured");if(e?a(".load_more_jobs",g).addClass("loading"):(a(j).addClass("loading"),a("li.job_listing, li.no_job_listings_found",j).css("visibility","hidden")),
|
1 |
+
jQuery(document).ready(function(a){var b;a(".job_listings").on("update_results",function(c,d,e){b&&b.abort();var f="",g=a(this),h=g.find(".job_filters"),i=g.find(".showing_jobs"),j=g.find(".job_listings"),k=g.data("per_page"),l=g.data("orderby"),m=g.data("order"),n=g.data("featured");if(e?a(".load_more_jobs",g).addClass("loading"):(a(j).addClass("loading"),a("li.job_listing, li.no_job_listings_found",j).css("visibility","hidden")),1==g.data("show_filters")){var o=[];a(':input[name="filter_job_type[]"]:checked, :input[name="filter_job_type[]"][type="hidden"]',h).each(function(){o.push(a(this).val())});var p=h.find(":input[name^=search_categories], :input[name^=search_categories]").map(function(){return a(this).val()}).get(),q="",r="",s=h.find(":input[name=search_keywords]"),t=h.find(":input[name=search_location]");s.val()!==s.attr("placeholder")&&(q=s.val()),t.val()!==t.attr("placeholder")&&(r=t.val()),f={action:"job_manager_get_listings",search_keywords:q,search_location:r,search_categories:p,filter_job_type:o,per_page:k,orderby:l,order:m,page:d,featured:n,form_data:h.serialize()}}else{var p=g.data("categories"),q=g.data("keywords"),r=g.data("location");p&&(p=p.split(",")),f={action:"job_manager_get_listings",search_categories:p,search_keywords:q,search_location:r,per_page:k,orderby:l,order:m,page:d,featured:n}}b=a.ajax({type:"POST",url:job_manager_ajax_filters.ajax_url,data:f,success:function(b){if(b)try{b.indexOf("<!--WPJM-->")>=0&&(b=b.split("<!--WPJM-->")[1]),b.indexOf("<!--WPJM_END-->")>=0&&(b=b.split("<!--WPJM_END-->")[0]);var c=a.parseJSON(b);c.showing?a(i).show().html("").append("<span>"+c.showing+"</span>"+c.showing_links):a(i).hide(),c.html&&(e?a(j).append(c.html):a(j).html(c.html)),c.found_jobs&&c.max_num_pages!==d?a(".load_more_jobs",g).show().data("page",d):a(".load_more_jobs",g).hide(),a(j).removeClass("loading"),a(".load_more_jobs",g).removeClass("loading"),a("li.job_listing",j).css("visibility","visible")}catch(f){}}})}),a("#search_keywords, #search_location, .job_types input, #search_categories").change(function(){var b=a(this).closest("div.job_listings");b.trigger("update_results",[1,!1])}).on("keyup",function(b){13===b.which&&a(this).trigger("change")}),a(".job_filters").each(function(){a(this).find("#search_keywords, #search_location, .job_types input, #search_categories").eq(0).change()}),a(".job_filters").on("click",".reset",function(){var b=a(this).closest("div.job_listings"),c=a(this).closest("form");return c.find(":input[name=search_keywords]").val(""),c.find(":input[name=search_location]").val(""),c.find(":input[name^=search_categories]").val(0),a(':input[name="filter_job_type[]"]',c).attr("checked","checked"),b.trigger("reset"),b.trigger("update_results",[1,!1]),!1}),a(".load_more_jobs").click(function(){var b=a(this).closest("div.job_listings"),c=a(this).data("page");return c=c?parseInt(c):1,a(this).data("page",c+1),b.trigger("update_results",[c+1,!0]),!1})});
|
includes/class-wp-job-manager-geocode.php
CHANGED
@@ -114,7 +114,7 @@ class WP_Job_Manager_Geocode {
|
|
114 |
$jm_geocode_over_query_limit = get_transient( 'jm_geocode_over_query_limit' );
|
115 |
|
116 |
// Query limit reached - don't geocode for a while
|
117 |
-
if ( $jm_geocode_over_query_limit ) {
|
118 |
return false;
|
119 |
}
|
120 |
|
@@ -178,7 +178,7 @@ class WP_Job_Manager_Geocode {
|
|
178 |
$address['country_long'] = false;
|
179 |
|
180 |
foreach ( $address_data as $data ) {
|
181 |
-
switch ( $data->types ) {
|
182 |
case 'street_number' :
|
183 |
$address['street'] = sanitize_text_field( $data->long_name );
|
184 |
break;
|
114 |
$jm_geocode_over_query_limit = get_transient( 'jm_geocode_over_query_limit' );
|
115 |
|
116 |
// Query limit reached - don't geocode for a while
|
117 |
+
if ( $jm_geocode_over_query_limit && false === $geocoded_address ) {
|
118 |
return false;
|
119 |
}
|
120 |
|
178 |
$address['country_long'] = false;
|
179 |
|
180 |
foreach ( $address_data as $data ) {
|
181 |
+
switch ( $data->types[0] ) {
|
182 |
case 'street_number' :
|
183 |
$address['street'] = sanitize_text_field( $data->long_name );
|
184 |
break;
|
includes/class-wp-job-manager-shortcodes.php
CHANGED
@@ -285,7 +285,7 @@ class WP_Job_Manager_Shortcodes {
|
|
285 |
$data_attributes_string = '';
|
286 |
$data_attributes = array(
|
287 |
'location' => $location,
|
288 |
-
'
|
289 |
'show_filters' => $show_filters ? 'true' : 'false',
|
290 |
'per_page' => $per_page,
|
291 |
'orderby' => $orderby,
|
285 |
$data_attributes_string = '';
|
286 |
$data_attributes = array(
|
287 |
'location' => $location,
|
288 |
+
'keywords' => $keywords,
|
289 |
'show_filters' => $show_filters ? 'true' : 'false',
|
290 |
'per_page' => $per_page,
|
291 |
'orderby' => $orderby,
|
languages/wp-job-manager.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the WP Job Manager package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WP Job Manager 1.11.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/WP-Job-Manager\n"
|
7 |
-
"POT-Creation-Date: 2014-05-18
|
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 same license as the WP Job Manager package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WP Job Manager 1.11.1\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/WP-Job-Manager\n"
|
7 |
+
"POT-Creation-Date: 2014-05-18 22:12:55+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 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mike.jol
|
|
4 |
Tags: job listing, job board, job, jobs, company, hiring, employment, employees, candidate, freelance, internship
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 3.9
|
7 |
-
Stable tag: 1.11.
|
8 |
|
9 |
Manage job listings from the WordPress admin panel, and allow users to post jobs directly to your site.
|
10 |
|
@@ -91,6 +91,12 @@ For more information, [read the documentation](https://wpjobmanager.com/document
|
|
91 |
|
92 |
== Changelog ==
|
93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
= 1.11.0 =
|
95 |
* Switch geocode to json and improve error checking.
|
96 |
* If query limit is reached, stop making requests for a while.
|
4 |
Tags: job listing, job board, job, jobs, company, hiring, employment, employees, candidate, freelance, internship
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 3.9
|
7 |
+
Stable tag: 1.11.1
|
8 |
|
9 |
Manage job listings from the WordPress admin panel, and allow users to post jobs directly to your site.
|
10 |
|
91 |
|
92 |
== Changelog ==
|
93 |
|
94 |
+
= 1.11.1 =
|
95 |
+
* Fix ajax filters 'true' for show_filters
|
96 |
+
* Fix geocoding for certain address strings
|
97 |
+
* Fix keywords typo
|
98 |
+
* Remove deprecated $wpdb->escape calls. Replaced with esc_sql
|
99 |
+
|
100 |
= 1.11.0 =
|
101 |
* Switch geocode to json and improve error checking.
|
102 |
* If query limit is reached, stop making requests for a while.
|
wp-job-manager-functions.php
CHANGED
@@ -85,10 +85,10 @@ function get_job_listings( $args = array() ) {
|
|
85 |
$postmeta_search_keywords_sql = array();
|
86 |
|
87 |
foreach ( $search_keywords as $keyword ) {
|
88 |
-
$postmeta_search_keywords_sql[] = " meta_value LIKE '%" .
|
89 |
$posts_search_keywords_sql[] = "
|
90 |
-
post_title LIKE '%" .
|
91 |
-
OR post_content LIKE '%" .
|
92 |
";
|
93 |
}
|
94 |
|
85 |
$postmeta_search_keywords_sql = array();
|
86 |
|
87 |
foreach ( $search_keywords as $keyword ) {
|
88 |
+
$postmeta_search_keywords_sql[] = " meta_value LIKE '%" . esc_sql( $keyword ) . "%' ";
|
89 |
$posts_search_keywords_sql[] = "
|
90 |
+
post_title LIKE '%" . esc_sql( $keyword ) . "%'
|
91 |
+
OR post_content LIKE '%" . esc_sql( $keyword ) . "%'
|
92 |
";
|
93 |
}
|
94 |
|
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.11.
|
7 |
Author: Mike Jolley
|
8 |
Author URI: http://mikejolley.com
|
9 |
Requires at least: 3.8
|
@@ -30,7 +30,7 @@ class WP_Job_Manager {
|
|
30 |
*/
|
31 |
public function __construct() {
|
32 |
// Define constants
|
33 |
-
define( 'JOB_MANAGER_VERSION', '1.11.
|
34 |
define( 'JOB_MANAGER_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
|
35 |
define( 'JOB_MANAGER_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
|
36 |
|
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.11.1
|
7 |
Author: Mike Jolley
|
8 |
Author URI: http://mikejolley.com
|
9 |
Requires at least: 3.8
|
30 |
*/
|
31 |
public function __construct() {
|
32 |
// Define constants
|
33 |
+
define( 'JOB_MANAGER_VERSION', '1.11.1' );
|
34 |
define( 'JOB_MANAGER_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
|
35 |
define( 'JOB_MANAGER_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
|
36 |
|