WP Job Manager - Version 1.26.1

Version Description

  • Enhancement: Add language using WordPress's current locale to geocode requests. (@jom; https://github.com/Automattic/WP-Job-Manager/pull/1007)
  • Fix: Allow attempts to use Google Maps Geocode API without an API key. (@spencerfinnell; https://github.com/Automattic/WP-Job-Manager/pull/998)
  • Fix: Issue affecting job expiry date when editing a job listing. (@spencerfinnell, @jom; https://github.com/Automattic/WP-Job-Manager/pull/1008)
  • Fix: Show correct total count of results on [jobs] shortcode. (@jom; https://github.com/Automattic/WP-Job-Manager/pull/1006)
Download this release

Release Info

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

Code changes from version 1.26.0 to 1.26.1

changelog.txt CHANGED
@@ -1,3 +1,9 @@
 
 
 
 
 
 
1
  = 1.26.0 =
2
  * Enhancement: Warn the user if they're editing an existing job. (@donnchawp; https://github.com/Automattic/WP-Job-Manager/pull/847)
3
  * Enhancement: WP Admin Job Listing page's table is now responsive. (@turtlepod; https://github.com/Automattic/WP-Job-Manager/pull/906)
1
+ = 1.26.1 =
2
+ * Enhancement: Add language using WordPress's current locale to geocode requests. (@jom; https://github.com/Automattic/WP-Job-Manager/pull/1007)
3
+ * Fix: Allow attempts to use Google Maps Geocode API without an API key. (@spencerfinnell; https://github.com/Automattic/WP-Job-Manager/pull/998)
4
+ * Fix: Issue affecting job expiry date when editing a job listing. (@spencerfinnell, @jom; https://github.com/Automattic/WP-Job-Manager/pull/1008)
5
+ * Fix: Show correct total count of results on `[jobs]` shortcode. (@jom; https://github.com/Automattic/WP-Job-Manager/pull/1006)
6
+
7
  = 1.26.0 =
8
  * Enhancement: Warn the user if they're editing an existing job. (@donnchawp; https://github.com/Automattic/WP-Job-Manager/pull/847)
9
  * Enhancement: WP Admin Job Listing page's table is now responsive. (@turtlepod; https://github.com/Automattic/WP-Job-Manager/pull/906)
includes/admin/class-wp-job-manager-writepanels.php CHANGED
@@ -104,13 +104,14 @@ class WP_Job_Manager_Writepanels {
104
  'description' => __( 'Featured listings will be sticky during searches, and can be styled differently.', 'wp-job-manager' ),
105
  'priority' => 10
106
  );
 
107
  $fields['_job_expires'] = array(
108
  'label' => __( 'Listing Expiry Date', 'wp-job-manager' ),
109
  'priority' => 11,
110
  'classes' => array( 'job-manager-datepicker' ),
111
  /* translators: date format placeholder, see https://secure.php.net/date */
112
- 'placeholder' => metadata_exists( 'post', $post->ID, '_job_expires' ) ? _x( 'yyyy-mm-dd', 'Date format placeholder.', 'wp-job-manager' ) : calculate_job_expiry( $post->ID ),
113
- 'value' => get_post_meta( $post->ID, '_job_expires', true ),
114
  );
115
  }
116
  if ( $current_user->has_cap( 'edit_others_job_listings' ) ) {
104
  'description' => __( 'Featured listings will be sticky during searches, and can be styled differently.', 'wp-job-manager' ),
105
  'priority' => 10
106
  );
107
+ $job_expires = get_post_meta( $post->ID, '_job_expires', true );
108
  $fields['_job_expires'] = array(
109
  'label' => __( 'Listing Expiry Date', 'wp-job-manager' ),
110
  'priority' => 11,
111
  'classes' => array( 'job-manager-datepicker' ),
112
  /* translators: date format placeholder, see https://secure.php.net/date */
113
+ 'placeholder' => ! empty( $job_expires ) ? _x( 'yyyy-mm-dd', 'Date format placeholder.', 'wp-job-manager' ) : calculate_job_expiry( $post->ID ),
114
+ 'value' => ! empty( $job_expires ) ? date( 'Y-m-d H:i:s', strtotime( $job_expires ) ) : '',
115
  );
116
  }
117
  if ( $current_user->has_cap( 'edit_others_job_listings' ) ) {
includes/class-wp-job-manager-ajax.php CHANGED
@@ -165,7 +165,7 @@ class WP_Job_Manager_Ajax {
165
  );
166
 
167
  if ( $jobs->post_count && ( $search_location || $search_keywords || $search_categories ) ) {
168
- $message = sprintf( _n( 'Search completed. Found %d matching record.', 'Search completed. Found %d matching records.', $jobs->post_count, 'wp-job-manager' ), $jobs->post_count );
169
  $result['showing_all'] = true;
170
  } else {
171
  $message = '';
165
  );
166
 
167
  if ( $jobs->post_count && ( $search_location || $search_keywords || $search_categories ) ) {
168
+ $message = sprintf( _n( 'Search completed. Found %d matching record.', 'Search completed. Found %d matching records.', $jobs->found_posts, 'wp-job-manager' ), $jobs->found_posts );
169
  $result['showing_all'] = true;
170
  } else {
171
  $message = '';
includes/class-wp-job-manager-geocode.php CHANGED
@@ -148,16 +148,20 @@ class WP_Job_Manager_Geocode {
148
  * @return string|bool
149
  */
150
  public function add_geolocation_endpoint_query_args( $geocode_endpoint_url, $raw_address ) {
 
151
  $api_key = apply_filters( 'job_manager_geolocation_api_key', '', $raw_address );
152
 
153
- // Google Maps API no longer accepts requests without an API key
154
- if ( '' === $api_key ) {
155
- return false;
156
  }
157
 
158
- $geocode_endpoint_url = add_query_arg( 'key', urlencode( $api_key ), $geocode_endpoint_url );
159
  $geocode_endpoint_url = add_query_arg( 'address', urlencode( $raw_address ), $geocode_endpoint_url );
160
 
 
 
 
 
 
161
  $region = apply_filters( 'job_manager_geolocation_region_cctld', '', $raw_address );
162
  if ( '' !== $region ) {
163
  $geocode_endpoint_url = add_query_arg( 'region', urlencode( $region ), $geocode_endpoint_url );
148
  * @return string|bool
149
  */
150
  public function add_geolocation_endpoint_query_args( $geocode_endpoint_url, $raw_address ) {
151
+ // Add an API key if available.
152
  $api_key = apply_filters( 'job_manager_geolocation_api_key', '', $raw_address );
153
 
154
+ if ( '' !== $api_key ) {
155
+ $geocode_endpoint_url = add_query_arg( 'key', urlencode( $api_key ), $geocode_endpoint_url );
 
156
  }
157
 
 
158
  $geocode_endpoint_url = add_query_arg( 'address', urlencode( $raw_address ), $geocode_endpoint_url );
159
 
160
+ $locale = get_locale();
161
+ if ( $locale ) {
162
+ $geocode_endpoint_url = add_query_arg( 'language', substr( $locale, 0, 2 ), $geocode_endpoint_url );
163
+ }
164
+
165
  $region = apply_filters( 'job_manager_geolocation_region_cctld', '', $raw_address );
166
  if ( '' !== $region ) {
167
  $geocode_endpoint_url = add_query_arg( 'region', urlencode( $region ), $geocode_endpoint_url );
languages/wp-job-manager.pot CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: WP Job Manager 1.26.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-job-manager\n"
7
- "POT-Creation-Date: 2017-05-18 17:27:44+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -803,17 +803,17 @@ msgid_plural "Search completed. Found %d matching records."
803
  msgstr[0] ""
804
  msgstr[1] ""
805
 
806
- #: includes/class-wp-job-manager-geocode.php:217
807
  msgid "No results found"
808
  msgstr ""
809
 
810
- #: includes/class-wp-job-manager-geocode.php:221
811
  msgid "Query limit reached"
812
  msgstr ""
813
 
814
- #: includes/class-wp-job-manager-geocode.php:227
815
  #: includes/class-wp-job-manager-geocode.php:231
816
  #: includes/class-wp-job-manager-geocode.php:235
 
817
  msgid "Geocoding error"
818
  msgstr ""
819
 
4
  msgstr ""
5
  "Project-Id-Version: WP Job Manager 1.26.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-job-manager\n"
7
+ "POT-Creation-Date: 2017-05-31 22:26:08+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
803
  msgstr[0] ""
804
  msgstr[1] ""
805
 
806
+ #: includes/class-wp-job-manager-geocode.php:221
807
  msgid "No results found"
808
  msgstr ""
809
 
810
+ #: includes/class-wp-job-manager-geocode.php:225
811
  msgid "Query limit reached"
812
  msgstr ""
813
 
 
814
  #: includes/class-wp-job-manager-geocode.php:231
815
  #: includes/class-wp-job-manager-geocode.php:235
816
+ #: includes/class-wp-job-manager-geocode.php:239
817
  msgid "Geocoding error"
818
  msgstr ""
819
 
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: mikejolley, automattic, adamkheckler, annezazu, cena, chaselivingston, csonnek, davor.altman, drawmyface, erania-pinnera, jacobshere, jakeom, jeherve, jenhooks, jgs, jonryan, kraftbj, lamdayap, lschuyler, macmanx, nancythanki, orangesareorange, rachelsquirrel, ryancowles, richardmtl, scarstocea
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.1
5
- Tested up to: 4.7
6
- Stable tag: 1.26.0
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -141,6 +141,12 @@ You can view (and contribute) translations via the [translate.wordpress.org](htt
141
 
142
  == Changelog ==
143
 
 
 
 
 
 
 
144
  = 1.26.0 =
145
  * Enhancement: Warn the user if they're editing an existing job. (@donnchawp; https://github.com/Automattic/WP-Job-Manager/pull/847)
146
  * Enhancement: WP Admin Job Listing page's table is now responsive. (@turtlepod; https://github.com/Automattic/WP-Job-Manager/pull/906)
2
  Contributors: mikejolley, automattic, adamkheckler, annezazu, cena, chaselivingston, csonnek, davor.altman, drawmyface, erania-pinnera, jacobshere, jakeom, jeherve, jenhooks, jgs, jonryan, kraftbj, lamdayap, lschuyler, macmanx, nancythanki, orangesareorange, rachelsquirrel, ryancowles, richardmtl, scarstocea
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.1
5
+ Tested up to: 4.8
6
+ Stable tag: 1.26.1
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
141
 
142
  == Changelog ==
143
 
144
+ = 1.26.1 =
145
+ * Enhancement: Add language using WordPress's current locale to geocode requests. (@jom; https://github.com/Automattic/WP-Job-Manager/pull/1007)
146
+ * Fix: Allow attempts to use Google Maps Geocode API without an API key. (@spencerfinnell; https://github.com/Automattic/WP-Job-Manager/pull/998)
147
+ * Fix: Issue affecting job expiry date when editing a job listing. (@spencerfinnell, @jom; https://github.com/Automattic/WP-Job-Manager/pull/1008)
148
+ * Fix: Show correct total count of results on `[jobs]` shortcode. (@jom; https://github.com/Automattic/WP-Job-Manager/pull/1006)
149
+
150
  = 1.26.0 =
151
  * Enhancement: Warn the user if they're editing an existing job. (@donnchawp; https://github.com/Automattic/WP-Job-Manager/pull/847)
152
  * Enhancement: WP Admin Job Listing page's table is now responsive. (@turtlepod; https://github.com/Automattic/WP-Job-Manager/pull/906)
wp-job-manager-functions.php CHANGED
@@ -5,7 +5,7 @@ if ( ! function_exists( 'get_job_listings' ) ) :
5
  *
6
  * @since 1.0.5
7
  * @param string|array|object $args Arguments used to retrieve job listings.
8
- * @return array
9
  */
10
  function get_job_listings( $args = array() ) {
11
  global $wpdb, $job_manager_keyword;
5
  *
6
  * @since 1.0.5
7
  * @param string|array|object $args Arguments used to retrieve job listings.
8
+ * @return WP_Query
9
  */
10
  function get_job_listings( $args = array() ) {
11
  global $wpdb, $job_manager_keyword;
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.26.0
7
  * Author: Automattic
8
  * Author URI: https://wpjobmanager.com/
9
  * Requires at least: 4.1
@@ -53,7 +53,7 @@ class WP_Job_Manager {
53
  */
54
  public function __construct() {
55
  // Define constants
56
- define( 'JOB_MANAGER_VERSION', '1.26.0' );
57
  define( 'JOB_MANAGER_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
58
  define( 'JOB_MANAGER_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
59
 
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.26.1
7
  * Author: Automattic
8
  * Author URI: https://wpjobmanager.com/
9
  * Requires at least: 4.1
53
  */
54
  public function __construct() {
55
  // Define constants
56
+ define( 'JOB_MANAGER_VERSION', '1.26.1' );
57
  define( 'JOB_MANAGER_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
58
  define( 'JOB_MANAGER_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
59