WP Job Manager - Version 1.23.13

Version Description

  • Fix - Conflict between the_job_location() and the regions plugin.
  • Tweak - Allow some HTML in the_job_location - uses wp_kses_post.
Download this release

Release Info

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

Code changes from version 1.23.12 to 1.23.13

Files changed (3) hide show
  1. readme.txt +5 -1
  2. wp-job-manager-template.php +10 -7
  3. wp-job-manager.php +2 -2
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.4
7
- Stable tag: 1.23.12
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 [translate.wordpress.org](htt
142
 
143
  == Changelog ==
144
 
 
 
 
 
145
  = 1.23.12 =
146
  * Fix - Transient clear query.
147
  * Tweak - New user notification pluggable function.
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.4
7
+ Stable tag: 1.23.13
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
142
 
143
  == Changelog ==
144
 
145
+ = 1.23.13 =
146
+ * Fix - Conflict between the_job_location() and the regions plugin.
147
+ * Tweak - Allow some HTML in the_job_location - uses wp_kses_post.
148
+
149
  = 1.23.12 =
150
  * Fix - Transient clear query.
151
  * Tweak - New user notification pluggable function.
wp-job-manager-template.php CHANGED
@@ -268,19 +268,21 @@ function get_the_job_type( $post = null ) {
268
 
269
  /**
270
  * the_job_location function.
271
- * @param boolean $map_link whether or not to link to the map on google maps
272
  * @return [type]
273
  */
274
  function the_job_location( $map_link = true, $post = null ) {
275
  $location = get_the_job_location( $post );
276
 
277
  if ( $location ) {
278
- if ( $map_link )
279
- echo apply_filters( 'the_job_location_map_link', '<a class="google_map_link" href="http://maps.google.com/maps?q=' . urlencode( $location ) . '&zoom=14&size=512x512&maptype=roadmap&sensor=false" target="_blank">' . esc_html( $location ) . '</a>', $location, $post );
280
- else
281
- echo esc_html( $location );
 
 
282
  } else {
283
- echo apply_filters( 'the_job_location_anywhere_text', __( 'Anywhere', 'wp-job-manager' ) );
284
  }
285
  }
286
 
@@ -293,8 +295,9 @@ function the_job_location( $map_link = true, $post = null ) {
293
  */
294
  function get_the_job_location( $post = null ) {
295
  $post = get_post( $post );
296
- if ( $post->post_type !== 'job_listing' )
297
  return;
 
298
 
299
  return apply_filters( 'the_job_location', $post->_job_location, $post );
300
  }
268
 
269
  /**
270
  * the_job_location function.
271
+ * @param boolean $map_link whether or not to link to google maps
272
  * @return [type]
273
  */
274
  function the_job_location( $map_link = true, $post = null ) {
275
  $location = get_the_job_location( $post );
276
 
277
  if ( $location ) {
278
+ if ( $map_link ) {
279
+ // If linking to google maps, we don't want anything but text here
280
+ echo apply_filters( 'the_job_location_map_link', '<a class="google_map_link" href="' . esc_url( 'http://maps.google.com/maps?q=' . urlencode( strip_tags( $location ) ) . '&zoom=14&size=512x512&maptype=roadmap&sensor=false' ) . '" target="_blank">' . esc_html( strip_tags( $location ) ) . '</a>', $location, $post );
281
+ } else {
282
+ echo wp_kses_post( $location );
283
+ }
284
  } else {
285
+ echo wp_kses_post( apply_filters( 'the_job_location_anywhere_text', __( 'Anywhere', 'wp-job-manager' ) ) );
286
  }
287
  }
288
 
295
  */
296
  function get_the_job_location( $post = null ) {
297
  $post = get_post( $post );
298
+ if ( $post->post_type !== 'job_listing' ) {
299
  return;
300
+ }
301
 
302
  return apply_filters( 'the_job_location', $post->_job_location, $post );
303
  }
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.12
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.12' );
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.13
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.13' );
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