WP Job Manager - Version 1.22.2

Version Description

  • Tweak - Set form actions to current page.
  • Fix - Video embeds.
  • Fix - Load textdomain before post types are registered.
Download this release

Release Info

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

Code changes from version 1.22.1 to 1.22.2

includes/abstracts/abstract-wp-job-manager-form.php CHANGED
@@ -70,12 +70,14 @@ abstract class WP_Job_Manager_Form {
70
  }
71
 
72
  /**
73
- * Get action
 
 
74
  *
75
  * @return string
76
  */
77
  public function get_action() {
78
- return $this->action;
79
  }
80
 
81
  /**
70
  }
71
 
72
  /**
73
+ * Get action (URL for forms to post to).
74
+ *
75
+ * As of 1.22.2 this defaults to the current page permalink.
76
  *
77
  * @return string
78
  */
79
  public function get_action() {
80
+ return $this->action ? $this->action : get_permalink();
81
  }
82
 
83
  /**
includes/forms/class-wp-job-manager-form-submit-job.php CHANGED
@@ -607,11 +607,12 @@ class WP_Job_Manager_Form_Submit_Job extends WP_Job_Manager_Form {
607
 
608
  if ( $this->job_id ) {
609
  $job_preview = true;
 
610
  $post = get_post( $this->job_id );
611
  setup_postdata( $post );
612
  $post->post_status = 'preview';
613
  ?>
614
- <form method="post" id="job_preview">
615
  <div class="job_listing_preview_title">
616
  <input type="submit" name="continue" id="job_preview_submit_button" class="button" value="<?php echo apply_filters( 'submit_job_step_preview_submit_text', __( 'Submit Listing', 'wp-job-manager' ) ); ?>" />
617
  <input type="submit" name="edit_job" class="button" value="<?php _e( 'Edit listing', 'wp-job-manager' ); ?>" />
607
 
608
  if ( $this->job_id ) {
609
  $job_preview = true;
610
+ $action = $this->get_action();
611
  $post = get_post( $this->job_id );
612
  setup_postdata( $post );
613
  $post->post_status = 'preview';
614
  ?>
615
+ <form method="post" id="job_preview" action="<?php echo esc_url( $action ); ?>">
616
  <div class="job_listing_preview_title">
617
  <input type="submit" name="continue" id="job_preview_submit_button" class="button" value="<?php echo apply_filters( 'submit_job_step_preview_submit_text', __( 'Submit Listing', 'wp-job-manager' ) ); ?>" />
618
  <input type="submit" name="edit_job" class="button" value="<?php _e( 'Edit listing', 'wp-job-manager' ); ?>" />
languages/wp-job-manager-sv_SE.mo CHANGED
Binary file
languages/wp-job-manager-sv_SE.po CHANGED
@@ -9,8 +9,8 @@ msgstr ""
9
  "Project-Id-Version: WP Job Manager\n"
10
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/WP-Job-Manager\n"
11
  "POT-Creation-Date: 2015-04-16 21:48:26+00:00\n"
12
- "PO-Revision-Date: 2015-04-16 21:48+0000\n"
13
- "Last-Translator: Mike Jolley <mike.jolley@me.com>\n"
14
  "Language-Team: Swedish (Sweden) (http://www.transifex.com/projects/p/wp-job-manager/language/sv_SE/)\n"
15
  "MIME-Version: 1.0\n"
16
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -303,7 +303,7 @@ msgstr "Om aktiverat, kommer icke-inloggade användare att kunna skapa ett konto
303
 
304
  #: includes/admin/class-wp-job-manager-settings.php:125
305
  msgid "Account Username"
306
- msgstr ""
307
 
308
  #: includes/admin/class-wp-job-manager-settings.php:126
309
  msgid "Automatically Generate Username from Email Address"
@@ -540,7 +540,7 @@ msgstr "Om du planerar att hantera platsannonser från administratörkontrollpan
540
  #: includes/admin/class-wp-job-manager-setup.php:189
541
  msgctxt "Default page title (wizard)"
542
  msgid "Jobs"
543
- msgstr "Jobannonser"
544
 
545
  #: includes/admin/class-wp-job-manager-setup.php:190
546
  msgid ""
@@ -697,7 +697,7 @@ msgstr ""
697
 
698
  #: includes/admin/class-wp-job-manager-writepanels.php:84
699
  msgid "Featured Listing"
700
- msgstr ""
701
 
702
  #: includes/admin/class-wp-job-manager-writepanels.php:86
703
  msgid ""
@@ -707,7 +707,7 @@ msgstr "Utvalda annonser kommer att vara klistrade under sökning och kan få en
707
 
708
  #: includes/admin/class-wp-job-manager-writepanels.php:90
709
  msgid "Listing Expiry Date"
710
- msgstr ""
711
 
712
  #: includes/admin/class-wp-job-manager-writepanels.php:91
713
  msgid "yyyy-mm-dd"
@@ -739,7 +739,7 @@ msgstr "Lägg till fil"
739
 
740
  #: includes/admin/class-wp-job-manager-writepanels.php:333
741
  msgid "Guest User"
742
- msgstr ""
743
 
744
  #: includes/admin/class-wp-job-manager-writepanels.php:335
745
  msgid "Change"
@@ -1127,7 +1127,7 @@ msgstr ""
1127
 
1128
  #: includes/forms/class-wp-job-manager-form-submit-job.php:617
1129
  msgid "Edit listing"
1130
- msgstr ""
1131
 
1132
  #: templates/account-signin.php:4
1133
  msgid "Your account"
9
  "Project-Id-Version: WP Job Manager\n"
10
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/WP-Job-Manager\n"
11
  "POT-Creation-Date: 2015-04-16 21:48:26+00:00\n"
12
+ "PO-Revision-Date: 2015-04-21 13:36+0000\n"
13
+ "Last-Translator: jerwre\n"
14
  "Language-Team: Swedish (Sweden) (http://www.transifex.com/projects/p/wp-job-manager/language/sv_SE/)\n"
15
  "MIME-Version: 1.0\n"
16
  "Content-Type: text/plain; charset=UTF-8\n"
303
 
304
  #: includes/admin/class-wp-job-manager-settings.php:125
305
  msgid "Account Username"
306
+ msgstr "Kontonamn"
307
 
308
  #: includes/admin/class-wp-job-manager-settings.php:126
309
  msgid "Automatically Generate Username from Email Address"
540
  #: includes/admin/class-wp-job-manager-setup.php:189
541
  msgctxt "Default page title (wizard)"
542
  msgid "Jobs"
543
+ msgstr "Jobbannonser"
544
 
545
  #: includes/admin/class-wp-job-manager-setup.php:190
546
  msgid ""
697
 
698
  #: includes/admin/class-wp-job-manager-writepanels.php:84
699
  msgid "Featured Listing"
700
+ msgstr "Utvald annons"
701
 
702
  #: includes/admin/class-wp-job-manager-writepanels.php:86
703
  msgid ""
707
 
708
  #: includes/admin/class-wp-job-manager-writepanels.php:90
709
  msgid "Listing Expiry Date"
710
+ msgstr "Annonsens utgångsdatum"
711
 
712
  #: includes/admin/class-wp-job-manager-writepanels.php:91
713
  msgid "yyyy-mm-dd"
739
 
740
  #: includes/admin/class-wp-job-manager-writepanels.php:333
741
  msgid "Guest User"
742
+ msgstr "Gästanvändare"
743
 
744
  #: includes/admin/class-wp-job-manager-writepanels.php:335
745
  msgid "Change"
1127
 
1128
  #: includes/forms/class-wp-job-manager-form-submit-job.php:617
1129
  msgid "Edit listing"
1130
+ msgstr "Redigera annons"
1131
 
1132
  #: templates/account-signin.php:4
1133
  msgid "Your account"
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.22.0\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/WP-Job-Manager\n"
7
- "POT-Creation-Date: 2015-04-16 21:48:26+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -995,7 +995,7 @@ msgstr ""
995
 
996
  #: includes/forms/class-wp-job-manager-form-submit-job.php:39
997
  #: includes/forms/class-wp-job-manager-form-submit-job.php:376
998
- #: includes/forms/class-wp-job-manager-form-submit-job.php:622
999
  msgid "Preview"
1000
  msgstr ""
1001
 
@@ -1087,7 +1087,7 @@ msgid "%s is invalid"
1087
  msgstr ""
1088
 
1089
  #: includes/forms/class-wp-job-manager-form-submit-job.php:261
1090
- #: wp-job-manager-functions.php:654
1091
  msgid "\"%s\" (filetype %s) needs to be one of the following file types: %s"
1092
  msgstr ""
1093
 
@@ -1115,11 +1115,11 @@ msgstr ""
1115
  msgid "You must be signed in to post a new listing."
1116
  msgstr ""
1117
 
1118
- #: includes/forms/class-wp-job-manager-form-submit-job.php:616
1119
  msgid "Submit Listing"
1120
  msgstr ""
1121
 
1122
- #: includes/forms/class-wp-job-manager-form-submit-job.php:617
1123
  msgid "Edit listing"
1124
  msgstr ""
1125
 
@@ -1334,7 +1334,7 @@ msgstr ""
1334
  msgid "Choose a category&hellip;"
1335
  msgstr ""
1336
 
1337
- #: wp-job-manager-functions.php:656
1338
  msgid "Uploaded files need to be one of the following file types: %s"
1339
  msgstr ""
1340
 
@@ -1342,11 +1342,11 @@ msgstr ""
1342
  msgid "Inactive"
1343
  msgstr ""
1344
 
1345
- #: wp-job-manager-template.php:220
1346
  msgid "Application via \"%s\" listing on %s"
1347
  msgstr ""
1348
 
1349
- #: wp-job-manager-template.php:281
1350
  msgid "Anywhere"
1351
  msgstr ""
1352
 
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.22.2\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/WP-Job-Manager\n"
7
+ "POT-Creation-Date: 2015-04-21 17:31:16+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
995
 
996
  #: includes/forms/class-wp-job-manager-form-submit-job.php:39
997
  #: includes/forms/class-wp-job-manager-form-submit-job.php:376
998
+ #: includes/forms/class-wp-job-manager-form-submit-job.php:623
999
  msgid "Preview"
1000
  msgstr ""
1001
 
1087
  msgstr ""
1088
 
1089
  #: includes/forms/class-wp-job-manager-form-submit-job.php:261
1090
+ #: wp-job-manager-functions.php:662
1091
  msgid "\"%s\" (filetype %s) needs to be one of the following file types: %s"
1092
  msgstr ""
1093
 
1115
  msgid "You must be signed in to post a new listing."
1116
  msgstr ""
1117
 
1118
+ #: includes/forms/class-wp-job-manager-form-submit-job.php:617
1119
  msgid "Submit Listing"
1120
  msgstr ""
1121
 
1122
+ #: includes/forms/class-wp-job-manager-form-submit-job.php:618
1123
  msgid "Edit listing"
1124
  msgstr ""
1125
 
1334
  msgid "Choose a category&hellip;"
1335
  msgstr ""
1336
 
1337
+ #: wp-job-manager-functions.php:664
1338
  msgid "Uploaded files need to be one of the following file types: %s"
1339
  msgstr ""
1340
 
1342
  msgid "Inactive"
1343
  msgstr ""
1344
 
1345
+ #: wp-job-manager-template.php:222
1346
  msgid "Application via \"%s\" listing on %s"
1347
  msgstr ""
1348
 
1349
+ #: wp-job-manager-template.php:283
1350
  msgid "Anywhere"
1351
  msgstr ""
1352
 
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.2
7
- Stable tag: 1.22.1
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -142,6 +142,11 @@ You can view (and contribute) translations via the [Transifex project here](http
142
 
143
  == Changelog ==
144
 
 
 
 
 
 
145
  = 1.22.1 =
146
  * Fix - It's 2015, but some people are still running PHP 5.2. Compatibility fix.
147
 
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.2
7
+ Stable tag: 1.22.2
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
142
 
143
  == Changelog ==
144
 
145
+ = 1.22.2 =
146
+ * Tweak - Set form actions to current page.
147
+ * Fix - Video embeds.
148
+ * Fix - Load textdomain before post types are registered.
149
+
150
  = 1.22.1 =
151
  * Fix - It's 2015, but some people are still running PHP 5.2. Compatibility fix.
152
 
templates/form-fields/term-multiselect-field.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php
2
  // Get selected value
3
  if ( isset( $field['value'] ) ) {
4
  $selected = $field['value'];
@@ -18,10 +18,10 @@ $args = array(
18
  'name' => isset( $field['name'] ) ? $field['name'] : $key,
19
  'orderby' => 'name',
20
  'selected' => $selected,
21
- 'hide_empty' => FALSE
22
  );
23
 
24
- if( isset( $field['placeholder'] ) && ! empty( $field['placeholder'] ) ) $args['placeholder'] = $field['placeholder'];
25
 
26
  job_manager_dropdown_categories( apply_filters( 'job_manager_term_multiselect_field_args', $args ) );
27
 
1
+ <?php
2
  // Get selected value
3
  if ( isset( $field['value'] ) ) {
4
  $selected = $field['value'];
18
  'name' => isset( $field['name'] ) ? $field['name'] : $key,
19
  'orderby' => 'name',
20
  'selected' => $selected,
21
+ 'hide_empty' => false
22
  );
23
 
24
+ if ( isset( $field['placeholder'] ) && ! empty( $field['placeholder'] ) ) $args['placeholder'] = $field['placeholder'];
25
 
26
  job_manager_dropdown_categories( apply_filters( 'job_manager_term_multiselect_field_args', $args ) );
27
 
templates/job-dashboard.php CHANGED
@@ -59,7 +59,7 @@
59
  if ( $value['nonce'] ) {
60
  $action_url = wp_nonce_url( $action_url, 'job_manager_my_job_actions' );
61
  }
62
- echo '<li><a href="' . $action_url . '" class="job-dashboard-action-' . $action . '">' . $value['label'] . '</a></li>';
63
  }
64
  ?>
65
  </ul>
59
  if ( $value['nonce'] ) {
60
  $action_url = wp_nonce_url( $action_url, 'job_manager_my_job_actions' );
61
  }
62
+ echo '<li><a href="' . esc_url( $action_url ) . '" class="job-dashboard-action-' . esc_attr( $action ) . '">' . esc_html( $value['label'] ) . '</a></li>';
63
  }
64
  ?>
65
  </ul>
templates/job-submit.php CHANGED
@@ -6,7 +6,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
6
 
7
  global $job_manager;
8
  ?>
9
- <form action="<?php echo $action; ?>" method="post" id="submit-job-form" class="job-manager-form" enctype="multipart/form-data">
10
 
11
  <?php if ( apply_filters( 'submit_job_form_show_signin', true ) ) : ?>
12
 
6
 
7
  global $job_manager;
8
  ?>
9
+ <form action="<?php echo esc_url( $action ); ?>" method="post" id="submit-job-form" class="job-manager-form" enctype="multipart/form-data">
10
 
11
  <?php if ( apply_filters( 'submit_job_form_show_signin', true ) ) : ?>
12
 
wp-job-manager-functions.php CHANGED
@@ -520,9 +520,17 @@ function job_manager_dropdown_categories( $args = '' ) {
520
 
521
  // Store in a transient to help sites with many cats
522
  $categories_hash = 'jm_cats_' . md5( json_encode( $r ) . WP_Job_Manager_Cache_Helper::get_transient_version( 'jm_get_' . $r['taxonomy'] ) );
523
-
524
- if ( false === ( $categories = get_transient( $categories_hash ) ) ) {
525
- $categories = get_terms( $taxonomy, $r );
 
 
 
 
 
 
 
 
526
  set_transient( $categories_hash, $categories, DAY_IN_SECONDS * 30 );
527
  }
528
 
520
 
521
  // Store in a transient to help sites with many cats
522
  $categories_hash = 'jm_cats_' . md5( json_encode( $r ) . WP_Job_Manager_Cache_Helper::get_transient_version( 'jm_get_' . $r['taxonomy'] ) );
523
+ $categories = get_transient( $categories_hash );
524
+
525
+ if ( empty( $categories ) ) {
526
+ $categories = get_terms( $taxonomy, array(
527
+ 'orderby' => $r['orderby'],
528
+ 'order' => $r['order'],
529
+ 'hide_empty' => $r['hide_empty'],
530
+ 'child_of' => $r['child_of'],
531
+ 'exclude' => $r['exclude'],
532
+ 'hierarchical' => $r['hierarchical']
533
+ ) );
534
  set_transient( $categories_hash, $categories, DAY_IN_SECONDS * 30 );
535
  }
536
 
wp-job-manager-template.php CHANGED
@@ -402,8 +402,14 @@ function job_manager_get_resized_image( $logo, $size ) {
402
  * Output the company video
403
  */
404
  function the_company_video( $post = null ) {
405
- $video = get_the_company_video( $post );
406
- $video_embed = wp_video_shortcode( array( 'src' => $video ) );
 
 
 
 
 
 
407
 
408
  if ( $video_embed ) {
409
  echo '<div class="company_video">' . $video_embed . '</div>';
402
  * Output the company video
403
  */
404
  function the_company_video( $post = null ) {
405
+ $video = get_the_company_video( $post );
406
+ $filetype = wp_check_filetype( $video );
407
+
408
+ if ( ! empty( $filetype['ext'] ) ) {
409
+ $video_embed = wp_video_shortcode( array( 'src' => $video ) );
410
+ } else {
411
+ $video_embed = wp_oembed_get( $video );
412
+ }
413
 
414
  if ( $video_embed ) {
415
  echo '<div class="company_video">' . $video_embed . '</div>';
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.22.1
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.22.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
 
@@ -63,7 +63,7 @@ class WP_Job_Manager {
63
  add_action( 'switch_theme', 'flush_rewrite_rules', 15 );
64
 
65
  // Actions
66
- add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
67
  add_action( 'after_setup_theme', array( $this, 'include_template_functions' ), 11 );
68
  add_action( 'widgets_init', array( $this, 'widgets_init' ) );
69
  add_action( 'wp_enqueue_scripts', array( $this, 'frontend_scripts' ) );
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.22.2
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.22.2' );
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
 
63
  add_action( 'switch_theme', 'flush_rewrite_rules', 15 );
64
 
65
  // Actions
66
+ add_action( 'after_setup_theme', array( $this, 'load_plugin_textdomain' ) );
67
  add_action( 'after_setup_theme', array( $this, 'include_template_functions' ), 11 );
68
  add_action( 'widgets_init', array( $this, 'widgets_init' ) );
69
  add_action( 'wp_enqueue_scripts', array( $this, 'frontend_scripts' ) );