WP Job Manager - Version 1.5.2

Version Description

  • Fix wp-editor field
  • Fix editing job images
Download this release

Release Info

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

Code changes from version 1.5.1 to 1.5.2

includes/admin/class-wp-job-manager-writepanels.php CHANGED
@@ -82,12 +82,10 @@ class WP_Job_Manager_Writepanels {
82
  /**
83
  * input_text function.
84
  *
85
- * @access private
86
  * @param mixed $key
87
  * @param mixed $field
88
- * @return void
89
  */
90
- private function input_file( $key, $field ) {
91
  global $thepostid;
92
 
93
  if ( empty( $field['value'] ) )
@@ -142,12 +140,10 @@ class WP_Job_Manager_Writepanels {
142
  /**
143
  * input_text function.
144
  *
145
- * @access private
146
  * @param mixed $key
147
  * @param mixed $field
148
- * @return void
149
  */
150
- private function input_text( $key, $field ) {
151
  global $thepostid;
152
 
153
  if ( empty( $field['value'] ) )
@@ -164,12 +160,10 @@ class WP_Job_Manager_Writepanels {
164
  /**
165
  * input_text function.
166
  *
167
- * @access private
168
  * @param mixed $key
169
  * @param mixed $field
170
- * @return void
171
  */
172
- private function input_textarea( $key, $field ) {
173
  global $thepostid;
174
 
175
  if ( empty( $field['value'] ) )
@@ -186,12 +180,10 @@ class WP_Job_Manager_Writepanels {
186
  /**
187
  * input_select function.
188
  *
189
- * @access private
190
  * @param mixed $key
191
  * @param mixed $field
192
- * @return void
193
  */
194
- private function input_select( $key, $field ) {
195
  global $thepostid;
196
 
197
  if ( empty( $field['value'] ) )
@@ -212,12 +204,10 @@ class WP_Job_Manager_Writepanels {
212
  /**
213
  * input_select function.
214
  *
215
- * @access private
216
  * @param mixed $key
217
  * @param mixed $field
218
- * @return void
219
  */
220
- private function input_multiselect( $key, $field ) {
221
  global $thepostid;
222
 
223
  if ( empty( $field['value'] ) )
@@ -238,12 +228,10 @@ class WP_Job_Manager_Writepanels {
238
  /**
239
  * input_checkbox function.
240
  *
241
- * @access private
242
  * @param mixed $key
243
  * @param mixed $field
244
- * @return void
245
  */
246
- private function input_checkbox( $key, $field ) {
247
  global $thepostid;
248
 
249
  if ( empty( $field['value'] ) )
82
  /**
83
  * input_text function.
84
  *
 
85
  * @param mixed $key
86
  * @param mixed $field
 
87
  */
88
+ public function input_file( $key, $field ) {
89
  global $thepostid;
90
 
91
  if ( empty( $field['value'] ) )
140
  /**
141
  * input_text function.
142
  *
 
143
  * @param mixed $key
144
  * @param mixed $field
 
145
  */
146
+ public function input_text( $key, $field ) {
147
  global $thepostid;
148
 
149
  if ( empty( $field['value'] ) )
160
  /**
161
  * input_text function.
162
  *
 
163
  * @param mixed $key
164
  * @param mixed $field
 
165
  */
166
+ public function input_textarea( $key, $field ) {
167
  global $thepostid;
168
 
169
  if ( empty( $field['value'] ) )
180
  /**
181
  * input_select function.
182
  *
 
183
  * @param mixed $key
184
  * @param mixed $field
 
185
  */
186
+ public function input_select( $key, $field ) {
187
  global $thepostid;
188
 
189
  if ( empty( $field['value'] ) )
204
  /**
205
  * input_select function.
206
  *
 
207
  * @param mixed $key
208
  * @param mixed $field
 
209
  */
210
+ public function input_multiselect( $key, $field ) {
211
  global $thepostid;
212
 
213
  if ( empty( $field['value'] ) )
228
  /**
229
  * input_checkbox function.
230
  *
 
231
  * @param mixed $key
232
  * @param mixed $field
 
233
  */
234
+ public function input_checkbox( $key, $field ) {
235
  global $thepostid;
236
 
237
  if ( empty( $field['value'] ) )
includes/forms/class-wp-job-manager-form-submit-job.php CHANGED
@@ -206,8 +206,10 @@ class WP_Job_Manager_Form_Submit_Job extends WP_Job_Manager_Form {
206
  foreach ( self::$fields as $group_key => $fields ) {
207
  foreach ( $fields as $key => $field ) {
208
  // Get the value
209
- if ( method_exists( __CLASS__, "get_posted_{$field['type']}_field" ) )
210
- $values[ $group_key ][ $key ] = call_user_func( __CLASS__ . "::get_posted_{$field['type']}_field", $key, $field );
 
 
211
  else
212
  $values[ $group_key ][ $key ] = self::get_posted_field( $key, $field );
213
 
@@ -246,7 +248,12 @@ class WP_Job_Manager_Form_Submit_Job extends WP_Job_Manager_Form {
246
  * @return string
247
  */
248
  protected static function get_posted_file_field( $key, $field ) {
249
- return self::upload_image( $key );
 
 
 
 
 
250
  }
251
 
252
  /**
206
  foreach ( self::$fields as $group_key => $fields ) {
207
  foreach ( $fields as $key => $field ) {
208
  // Get the value
209
+ $field_type = str_replace( '-', '_', $field['type'] );
210
+
211
+ if ( method_exists( __CLASS__, "get_posted_{$field_type}_field" ) )
212
+ $values[ $group_key ][ $key ] = call_user_func( __CLASS__ . "::get_posted_{$field_type}_field", $key, $field );
213
  else
214
  $values[ $group_key ][ $key ] = self::get_posted_field( $key, $field );
215
 
248
  * @return string
249
  */
250
  protected static function get_posted_file_field( $key, $field ) {
251
+ $file = self::upload_image( $key );
252
+
253
+ if ( ! $file )
254
+ $file = self::get_posted_field( 'current_' . $key, $field );
255
+
256
+ return $file;
257
  }
258
 
259
  /**
languages/job_manager-ru_RU.mo ADDED
Binary file
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
5
  Requires at least: 3.5
6
  Tested up to: 3.7
7
- Stable tag: 1.5.1
8
 
9
  Manage job listings from the WordPress admin panel, and allow users to post jobs directly to your site.
10
 
@@ -72,6 +72,10 @@ The manual installation method involves downloading the plugin and uploading it
72
 
73
  == Changelog ==
74
 
 
 
 
 
75
  = 1.5.1 =
76
  * Changed get_the_time to get_post_time
77
  * Added textarea and wp-editor to form api
4
  Tags: job listing, job board, job, jobs, company
5
  Requires at least: 3.5
6
  Tested up to: 3.7
7
+ Stable tag: 1.5.2
8
 
9
  Manage job listings from the WordPress admin panel, and allow users to post jobs directly to your site.
10
 
72
 
73
  == Changelog ==
74
 
75
+ = 1.5.2 =
76
+ * Fix wp-editor field
77
+ * Fix editing job images
78
+
79
  = 1.5.1 =
80
  * Changed get_the_time to get_post_time
81
  * Added textarea and wp-editor to form api
templates/content-job_listing.php CHANGED
@@ -13,7 +13,7 @@
13
  </div>
14
  <ul class="meta">
15
  <li class="job-type <?php echo get_the_job_type() ? sanitize_title( get_the_job_type()->slug ) : ''; ?>"><?php the_job_type(); ?></li>
16
- <li class="date"><date><?php echo human_time_diff( get_post_time( 'U' ), current_time( 'timestamp' ) ) . ' ' . __( 'ago', 'job_manager' ); ?></date></li>
17
  </ul>
18
  </a>
19
  </li>
13
  </div>
14
  <ul class="meta">
15
  <li class="job-type <?php echo get_the_job_type() ? sanitize_title( get_the_job_type()->slug ) : ''; ?>"><?php the_job_type(); ?></li>
16
+ <li class="date"><date><?php printf( __( 'Posted %s ago', 'job_manager' ), human_time_diff( get_post_time( 'U' ), current_time( 'timestamp' ) ) ); ?></date></li>
17
  </ul>
18
  </a>
19
  </li>
templates/content-single-job_listing.php CHANGED
@@ -16,7 +16,7 @@
16
 
17
  <li class="location" itemprop="jobLocation"><?php the_job_location(); ?></li>
18
 
19
- <li class="date-posted" itemprop="datePosted"><?php _e( 'Posted', 'job_manager' ); ?> <date><?php echo human_time_diff( get_post_time( 'U' ), current_time( 'timestamp' ) ) . ' ' . __( 'ago', 'job_manager' ); ?></date></li>
20
 
21
  <?php if ( is_position_filled() ) : ?>
22
  <li class="position-filled"><?php _e( 'This position has been filled', 'job_manager' ); ?></li>
16
 
17
  <li class="location" itemprop="jobLocation"><?php the_job_location(); ?></li>
18
 
19
+ <li class="date-posted" itemprop="datePosted"><date><?php printf( __( 'Posted %s ago', 'job_manager' ), human_time_diff( get_post_time( 'U' ), current_time( 'timestamp' ) ) ); ?></date></li>
20
 
21
  <?php if ( is_position_filled() ) : ?>
22
  <li class="position-filled"><?php _e( 'This position has been filled', 'job_manager' ); ?></li>
templates/content-summary-job_listing.php CHANGED
@@ -11,7 +11,7 @@
11
 
12
  <h1><?php the_title(); ?></h1>
13
 
14
- <p class="meta"><?php the_job_location( false ); ?> &mdash; <date><?php echo human_time_diff( get_post_time( 'U' ), current_time( 'timestamp' ) ) . ' ' . __( 'ago', 'job_manager' ); ?></date></p>
15
 
16
  </div>
17
  </a>
11
 
12
  <h1><?php the_title(); ?></h1>
13
 
14
+ <p class="meta"><?php the_job_location( false ); ?> &mdash; <date><?php printf( __( 'Posted %s ago', 'job_manager' ), human_time_diff( get_post_time( 'U' ), current_time( 'timestamp' ) ) ); ?></date></p>
15
 
16
  </div>
17
  </a>
templates/form-fields/file-field.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php if ( ! empty( $field['value'] ) ) : ?>
2
  <div class="job-manager-uploaded-image uploaded_image">
3
  <img src="<?php echo $field['value']; ?>" /> <?php echo '<code>' . basename( $field['value'] ) . ' <a class="job-manager-remove-uploaded-image" href="#">[' . __( 'remove', 'job_manager' ) . ']</a>' . '</code> ' . __( 'or', 'job_manager' ) . '&hellip;'; ?>
4
- <input type="hidden" class="input-text" name="<?php echo esc_attr( isset( $field['name'] ) ? $field['name'] : $key ); ?>" value="<?php echo isset( $field['value'] ) ? esc_attr( $field['value'] ) : ''; ?>" />
5
  </div>
6
  <?php endif; ?>
7
 
1
  <?php if ( ! empty( $field['value'] ) ) : ?>
2
  <div class="job-manager-uploaded-image uploaded_image">
3
  <img src="<?php echo $field['value']; ?>" /> <?php echo '<code>' . basename( $field['value'] ) . ' <a class="job-manager-remove-uploaded-image" href="#">[' . __( 'remove', 'job_manager' ) . ']</a>' . '</code> ' . __( 'or', 'job_manager' ) . '&hellip;'; ?>
4
+ <input type="hidden" class="input-text" name="current_<?php echo esc_attr( isset( $field['name'] ) ? $field['name'] : $key ); ?>" value="<?php echo isset( $field['value'] ) ? esc_attr( $field['value'] ) : ''; ?>" />
5
  </div>
6
  <?php endif; ?>
7
 
wp-job-manager.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP Job Manager
4
  Plugin URI: http://mikejolley.com/projects/wp-job-manager/
5
  Description: Manage job listings from the WordPress admin panel, and allow users to post jobs directly to your site.
6
- Version: 1.5.1
7
  Author: Mike Jolley
8
  Author URI: http://mikejolley.com
9
  Requires at least: 3.5
@@ -28,7 +28,7 @@ class WP_Job_Manager {
28
  */
29
  public function __construct() {
30
  // Define constants
31
- define( 'JOB_MANAGER_VERSION', '1.5.1' );
32
  define( 'JOB_MANAGER_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
33
  define( 'JOB_MANAGER_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
34
 
3
  Plugin Name: WP Job Manager
4
  Plugin URI: http://mikejolley.com/projects/wp-job-manager/
5
  Description: Manage job listings from the WordPress admin panel, and allow users to post jobs directly to your site.
6
+ Version: 1.5.2
7
  Author: Mike Jolley
8
  Author URI: http://mikejolley.com
9
  Requires at least: 3.5
28
  */
29
  public function __construct() {
30
  // Define constants
31
+ define( 'JOB_MANAGER_VERSION', '1.5.2' );
32
  define( 'JOB_MANAGER_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
33
  define( 'JOB_MANAGER_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
34