WP Job Manager - Version 1.21.1

Version Description

  • Fix - Remove file type check when field is not required and empty.
  • Fix - Hide "Applications have closed" for previews.
Download this release

Release Info

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

Code changes from version 1.21.0 to 1.21.1

includes/forms/class-wp-job-manager-form-submit-job.php CHANGED
@@ -414,13 +414,15 @@ class WP_Job_Manager_Form_Submit_Job extends WP_Job_Manager_Form {
414
  }
415
  if ( 'file' === $field['type'] && ! empty( $field['allowed_mime_types'] ) ) {
416
  if ( is_array( $values[ $group_key ][ $key ] ) ) {
417
- $check_value = $values[ $group_key ][ $key ];
418
  } else {
419
- $check_value = array( $values[ $group_key ][ $key ] );
420
  }
421
- foreach ( $check_value as $file_url ) {
422
- if ( ( $info = wp_check_filetype( $file_url ) ) && ! in_array( $info['type'], $field['allowed_mime_types'] ) ) {
423
- throw new Exception( sprintf( __( '"%s" (filetype %s) needs to be one of the following file types: %s', 'wp-job-manager' ), $field['label'], $info['ext'], implode( ', ', array_keys( $field['allowed_mime_types'] ) ) ) );
 
 
424
  }
425
  }
426
  }
414
  }
415
  if ( 'file' === $field['type'] && ! empty( $field['allowed_mime_types'] ) ) {
416
  if ( is_array( $values[ $group_key ][ $key ] ) ) {
417
+ $check_value = array_filter( $values[ $group_key ][ $key ] );
418
  } else {
419
+ $check_value = array_filter( array( $values[ $group_key ][ $key ] ) );
420
  }
421
+ if ( ! empty( $check_value ) ) {
422
+ foreach ( $check_value as $file_url ) {
423
+ if ( ( $info = wp_check_filetype( $file_url ) ) && ! in_array( $info['type'], $field['allowed_mime_types'] ) ) {
424
+ throw new Exception( sprintf( __( '"%s" (filetype %s) needs to be one of the following file types: %s', 'wp-job-manager' ), $field['label'], $info['ext'], implode( ', ', array_keys( $field['allowed_mime_types'] ) ) ) );
425
+ }
426
  }
427
  }
428
  }
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: 4.1
6
  Tested up to: 4.1
7
- Stable tag: 1.21.0
8
 
9
  Manage job listings from the WordPress admin panel, and allow users to post jobs directly to your site.
10
 
@@ -119,6 +119,10 @@ You can view (and contribute) translations via the [Transifex project here](http
119
 
120
  == Changelog ==
121
 
 
 
 
 
122
  = 1.21.0 =
123
  * Feature - Ajax loading history - back button will take you back to current position in the search. If you are on > page 1, a 'load previous' button will be shown so you can paginate either way.
124
  * Feature - Ajax file upload during job submission.
4
  Tags: job listing, job board, job, jobs, company, hiring, employment, employees, candidate, freelance, internship
5
  Requires at least: 4.1
6
  Tested up to: 4.1
7
+ Stable tag: 1.21.1
8
 
9
  Manage job listings from the WordPress admin panel, and allow users to post jobs directly to your site.
10
 
119
 
120
  == Changelog ==
121
 
122
+ = 1.21.1 =
123
+ * Fix - Remove file type check when field is not required and empty.
124
+ * Fix - Hide "Applications have closed" for previews.
125
+
126
  = 1.21.0 =
127
  * Feature - Ajax loading history - back button will take you back to current position in the search. If you are on > page 1, a 'load previous' button will be shown so you can paginate either way.
128
  * Feature - Ajax file upload during job submission.
templates/content-single-job_listing-meta.php CHANGED
@@ -6,8 +6,9 @@
6
  *
7
  * @since 1.14.0
8
  */
9
- ?>
10
- <?php do_action( 'single_job_listing_meta_before' ); ?>
 
11
 
12
  <ul class="meta">
13
  <?php do_action( 'single_job_listing_meta_start' ); ?>
@@ -20,7 +21,7 @@
20
 
21
  <?php if ( is_position_filled() ) : ?>
22
  <li class="position-filled"><?php _e( 'This position has been filled', 'wp-job-manager' ); ?></li>
23
- <?php elseif ( ! candidates_can_apply() ) : ?>
24
  <li class="listing-expired"><?php _e( 'Applications have closed', 'wp-job-manager' ); ?></li>
25
  <?php endif; ?>
26
 
6
  *
7
  * @since 1.14.0
8
  */
9
+ global $post;
10
+
11
+ do_action( 'single_job_listing_meta_before' ); ?>
12
 
13
  <ul class="meta">
14
  <?php do_action( 'single_job_listing_meta_start' ); ?>
21
 
22
  <?php if ( is_position_filled() ) : ?>
23
  <li class="position-filled"><?php _e( 'This position has been filled', 'wp-job-manager' ); ?></li>
24
+ <?php elseif ( ! candidates_can_apply() && 'preview' !== $post->post_status ) : ?>
25
  <li class="listing-expired"><?php _e( 'Applications have closed', 'wp-job-manager' ); ?></li>
26
  <?php endif; ?>
27
 
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.21.0
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.21.0' );
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.21.1
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.21.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