WP Job Manager - Version 1.23.11

Version Description

  • Fix - Author check in job_manager_user_can_edit_job().
  • Tweak - Before deleting a job, delete its attachments.
  • Tweak - Show previews in backend if needed.
Download this release

Release Info

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

Code changes from version 1.23.10 to 1.23.11

includes/class-wp-job-manager-post-types.php CHANGED
@@ -36,6 +36,8 @@ class WP_Job_Manager_Post_Types {
36
  add_action( 'update_post_meta', array( $this, 'maybe_update_menu_order' ), 10, 4 );
37
  add_action( 'wp_insert_post', array( $this, 'maybe_add_default_meta_data' ), 10, 2 );
38
 
 
 
39
  // WP ALL Import
40
  add_action( 'pmxi_saved_post', array( $this, 'pmxi_saved_post' ), 10, 1 );
41
 
@@ -224,10 +226,12 @@ class WP_Job_Manager_Post_Types {
224
  'label_count' => _n_noop( 'Expired <span class="count">(%s)</span>', 'Expired <span class="count">(%s)</span>', 'wp-job-manager' ),
225
  ) );
226
  register_post_status( 'preview', array(
 
227
  'public' => false,
228
  'exclude_from_search' => true,
229
  'show_in_admin_all_list' => false,
230
- 'show_in_admin_status_list' => false,
 
231
  ) );
232
  }
233
 
@@ -621,4 +625,24 @@ class WP_Job_Manager_Post_Types {
621
  }
622
  return $weight;
623
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
624
  }
36
  add_action( 'update_post_meta', array( $this, 'maybe_update_menu_order' ), 10, 4 );
37
  add_action( 'wp_insert_post', array( $this, 'maybe_add_default_meta_data' ), 10, 2 );
38
 
39
+ add_action( 'before_delete_post', array( $this, 'before_delete_job' ) );
40
+
41
  // WP ALL Import
42
  add_action( 'pmxi_saved_post', array( $this, 'pmxi_saved_post' ), 10, 1 );
43
 
226
  'label_count' => _n_noop( 'Expired <span class="count">(%s)</span>', 'Expired <span class="count">(%s)</span>', 'wp-job-manager' ),
227
  ) );
228
  register_post_status( 'preview', array(
229
+ 'label' => _x( 'Preview', 'post status', 'wp-job-manager' ),
230
  'public' => false,
231
  'exclude_from_search' => true,
232
  'show_in_admin_all_list' => false,
233
+ 'show_in_admin_status_list' => true,
234
+ 'label_count' => _n_noop( 'Preview <span class="count">(%s)</span>', 'Preview <span class="count">(%s)</span>', 'wp-job-manager' ),
235
  ) );
236
  }
237
 
625
  }
626
  return $weight;
627
  }
628
+
629
+ /**
630
+ * When deleting a job, delete its attachments
631
+ * @param int $post_id
632
+ */
633
+ public function before_delete_job( $post_id ) {
634
+ if ( 'job_listing' === get_post_type( $post_id ) ) {
635
+ $attachments = get_children( array(
636
+ 'post_parent' => $post_id,
637
+ 'post_type' => 'attachment'
638
+ ) );
639
+
640
+ if ( $attachments ) {
641
+ foreach ( $attachments as $attachment ) {
642
+ wp_delete_attachment( $attachment->ID );
643
+ @unlink( get_attached_file( $attachment->ID ) );
644
+ }
645
+ }
646
+ }
647
+ }
648
  }
includes/forms/class-wp-job-manager-form-edit-job.php CHANGED
@@ -125,4 +125,4 @@ class WP_Job_Manager_Form_Edit_Job extends WP_Job_Manager_Form_Submit_Job {
125
  return;
126
  }
127
  }
128
- }
125
  return;
126
  }
127
  }
128
+ }
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.23.10\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/WP-Job-Manager\n"
7
- "POT-Creation-Date: 2015-10-08 15:55:01+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -176,7 +176,7 @@ msgid "View"
176
  msgstr ""
177
 
178
  #: includes/admin/class-wp-job-manager-cpt.php:352
179
- #: includes/class-wp-job-manager-post-types.php:184
180
  #: templates/job-dashboard.php:33 templates/job-dashboard.php:49
181
  msgid "Edit"
182
  msgstr ""
@@ -187,8 +187,8 @@ msgid "Delete"
187
  msgstr ""
188
 
189
  #: includes/admin/class-wp-job-manager-settings.php:42
190
- #: includes/class-wp-job-manager-post-types.php:180
191
- #: includes/class-wp-job-manager-post-types.php:240
192
  msgid "Job Listings"
193
  msgstr ""
194
 
@@ -769,137 +769,149 @@ msgstr ""
769
  msgid "Employer"
770
  msgstr ""
771
 
772
- #: includes/class-wp-job-manager-post-types.php:64
773
  #: includes/forms/class-wp-job-manager-form-submit-job.php:146
774
  msgid "Job category"
775
  msgstr ""
776
 
777
- #: includes/class-wp-job-manager-post-types.php:65
778
  msgid "Job categories"
779
  msgstr ""
780
 
781
- #: includes/class-wp-job-manager-post-types.php:69
782
  msgctxt "Job category slug - resave permalinks after changing this"
783
  msgid "job-category"
784
  msgstr ""
785
 
786
- #: includes/class-wp-job-manager-post-types.php:89
787
- #: includes/class-wp-job-manager-post-types.php:135
788
- #: includes/class-wp-job-manager-post-types.php:189
789
- msgid "Search %s"
790
- msgstr ""
791
-
792
- #: includes/class-wp-job-manager-post-types.php:90
793
- #: includes/class-wp-job-manager-post-types.php:136
794
- #: includes/class-wp-job-manager-post-types.php:181
795
- msgid "All %s"
796
- msgstr ""
797
-
798
  #: includes/class-wp-job-manager-post-types.php:91
799
  #: includes/class-wp-job-manager-post-types.php:137
800
- #: includes/class-wp-job-manager-post-types.php:192
801
- msgid "Parent %s"
802
  msgstr ""
803
 
804
  #: includes/class-wp-job-manager-post-types.php:92
805
  #: includes/class-wp-job-manager-post-types.php:138
806
- msgid "Parent %s:"
 
807
  msgstr ""
808
 
809
  #: includes/class-wp-job-manager-post-types.php:93
810
  #: includes/class-wp-job-manager-post-types.php:139
811
- #: includes/class-wp-job-manager-post-types.php:185
812
- msgid "Edit %s"
813
  msgstr ""
814
 
815
  #: includes/class-wp-job-manager-post-types.php:94
816
  #: includes/class-wp-job-manager-post-types.php:140
817
- msgid "Update %s"
818
  msgstr ""
819
 
820
  #: includes/class-wp-job-manager-post-types.php:95
821
  #: includes/class-wp-job-manager-post-types.php:141
822
- msgid "Add New %s"
 
823
  msgstr ""
824
 
825
  #: includes/class-wp-job-manager-post-types.php:96
826
  #: includes/class-wp-job-manager-post-types.php:142
 
 
 
 
 
 
 
 
 
 
827
  msgid "New %s Name"
828
  msgstr ""
829
 
830
- #: includes/class-wp-job-manager-post-types.php:111
831
  #: includes/forms/class-wp-job-manager-form-submit-job.php:137
832
  msgid "Job type"
833
  msgstr ""
834
 
835
- #: includes/class-wp-job-manager-post-types.php:112
836
  msgid "Job types"
837
  msgstr ""
838
 
839
- #: includes/class-wp-job-manager-post-types.php:116
840
  msgctxt "Job type slug - resave permalinks after changing this"
841
  msgid "job-type"
842
  msgstr ""
843
 
844
- #: includes/class-wp-job-manager-post-types.php:159
845
  msgid "Job"
846
  msgstr ""
847
 
848
- #: includes/class-wp-job-manager-post-types.php:160
849
  msgid "Jobs"
850
  msgstr ""
851
 
852
- #: includes/class-wp-job-manager-post-types.php:163
853
  msgctxt "Post type archive slug - resave permalinks after changing this"
854
  msgid "jobs"
855
  msgstr ""
856
 
857
- #: includes/class-wp-job-manager-post-types.php:169
858
  msgctxt "Job permalink - resave permalinks after changing this"
859
  msgid "job"
860
  msgstr ""
861
 
862
- #: includes/class-wp-job-manager-post-types.php:182
863
  msgid "Add New"
864
  msgstr ""
865
 
866
- #: includes/class-wp-job-manager-post-types.php:183
867
  msgid "Add %s"
868
  msgstr ""
869
 
870
- #: includes/class-wp-job-manager-post-types.php:186
871
  msgid "New %s"
872
  msgstr ""
873
 
874
- #: includes/class-wp-job-manager-post-types.php:187
875
- #: includes/class-wp-job-manager-post-types.php:188
876
  msgid "View %s"
877
  msgstr ""
878
 
879
- #: includes/class-wp-job-manager-post-types.php:190
880
  msgid "No %s found"
881
  msgstr ""
882
 
883
- #: includes/class-wp-job-manager-post-types.php:191
884
  msgid "No %s found in trash"
885
  msgstr ""
886
 
887
- #: includes/class-wp-job-manager-post-types.php:194
888
  msgid "This is where you can create and manage %s."
889
  msgstr ""
890
 
891
- #: includes/class-wp-job-manager-post-types.php:219
892
- #: wp-job-manager-functions.php:191
893
  msgctxt "post status"
894
  msgid "Expired"
895
  msgstr ""
896
 
897
- #: includes/class-wp-job-manager-post-types.php:224
898
  msgid "Expired <span class=\"count\">(%s)</span>"
899
  msgid_plural "Expired <span class=\"count\">(%s)</span>"
900
  msgstr[0] ""
901
  msgstr[1] ""
902
 
 
 
 
 
 
 
 
 
 
 
 
 
903
  #: includes/class-wp-job-manager-shortcodes.php:62
904
  msgid "Invalid ID"
905
  msgstr ""
@@ -1091,7 +1103,7 @@ msgid "%s is invalid"
1091
  msgstr ""
1092
 
1093
  #: includes/forms/class-wp-job-manager-form-submit-job.php:263
1094
- #: wp-job-manager-functions.php:671
1095
  msgid "\"%s\" (filetype %s) needs to be one of the following file types: %s"
1096
  msgstr ""
1097
 
@@ -1209,12 +1221,12 @@ msgid "Maximum file size: %s."
1209
  msgstr ""
1210
 
1211
  #: templates/form-fields/multiselect-field.php:3
1212
- #: wp-job-manager-functions.php:515
1213
  msgid "No results match"
1214
  msgstr ""
1215
 
1216
  #: templates/form-fields/multiselect-field.php:3
1217
- #: wp-job-manager-functions.php:516
1218
  msgid "Select Some Options"
1219
  msgstr ""
1220
 
@@ -1296,56 +1308,51 @@ msgstr ""
1296
  msgid "%s submitted successfully. Your listing will be visible once approved."
1297
  msgstr ""
1298
 
1299
- #: wp-job-manager-functions.php:190
1300
  msgctxt "post status"
1301
  msgid "Draft"
1302
  msgstr ""
1303
 
1304
- #: wp-job-manager-functions.php:192
1305
- msgctxt "post status"
1306
- msgid "Preview"
1307
- msgstr ""
1308
-
1309
- #: wp-job-manager-functions.php:193
1310
  msgctxt "post status"
1311
  msgid "Pending approval"
1312
  msgstr ""
1313
 
1314
- #: wp-job-manager-functions.php:194
1315
  msgctxt "post status"
1316
  msgid "Pending payment"
1317
  msgstr ""
1318
 
1319
- #: wp-job-manager-functions.php:195
1320
  msgctxt "post status"
1321
  msgid "Active"
1322
  msgstr ""
1323
 
1324
- #: wp-job-manager-functions.php:280
1325
  msgid "Reset"
1326
  msgstr ""
1327
 
1328
- #: wp-job-manager-functions.php:284
1329
  msgid "RSS"
1330
  msgstr ""
1331
 
1332
- #: wp-job-manager-functions.php:354
1333
  msgid "Invalid email address."
1334
  msgstr ""
1335
 
1336
- #: wp-job-manager-functions.php:362
1337
  msgid "Your email address isn&#8217;t correct."
1338
  msgstr ""
1339
 
1340
- #: wp-job-manager-functions.php:366
1341
  msgid "This email is already registered, please choose another one."
1342
  msgstr ""
1343
 
1344
- #: wp-job-manager-functions.php:514
1345
  msgid "Choose a category&hellip;"
1346
  msgstr ""
1347
 
1348
- #: wp-job-manager-functions.php:673
1349
  msgid "Uploaded files need to be one of the following file types: %s"
1350
  msgstr ""
1351
 
@@ -1361,15 +1368,15 @@ msgstr ""
1361
  msgid "Anywhere"
1362
  msgstr ""
1363
 
1364
- #: wp-job-manager.php:147
1365
  msgid "Invalid file type. Accepted types:"
1366
  msgstr ""
1367
 
1368
- #: wp-job-manager.php:160
1369
  msgid "Load previous listings"
1370
  msgstr ""
1371
 
1372
- #: wp-job-manager.php:163
1373
  msgid "Are you sure you want to delete this listing?"
1374
  msgstr ""
1375
 
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.23.11\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/WP-Job-Manager\n"
7
+ "POT-Creation-Date: 2015-11-05 12:42:49+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
176
  msgstr ""
177
 
178
  #: includes/admin/class-wp-job-manager-cpt.php:352
179
+ #: includes/class-wp-job-manager-post-types.php:186
180
  #: templates/job-dashboard.php:33 templates/job-dashboard.php:49
181
  msgid "Edit"
182
  msgstr ""
187
  msgstr ""
188
 
189
  #: includes/admin/class-wp-job-manager-settings.php:42
190
+ #: includes/class-wp-job-manager-post-types.php:182
191
+ #: includes/class-wp-job-manager-post-types.php:244
192
  msgid "Job Listings"
193
  msgstr ""
194
 
769
  msgid "Employer"
770
  msgstr ""
771
 
772
+ #: includes/class-wp-job-manager-post-types.php:66
773
  #: includes/forms/class-wp-job-manager-form-submit-job.php:146
774
  msgid "Job category"
775
  msgstr ""
776
 
777
+ #: includes/class-wp-job-manager-post-types.php:67
778
  msgid "Job categories"
779
  msgstr ""
780
 
781
+ #: includes/class-wp-job-manager-post-types.php:71
782
  msgctxt "Job category slug - resave permalinks after changing this"
783
  msgid "job-category"
784
  msgstr ""
785
 
 
 
 
 
 
 
 
 
 
 
 
 
786
  #: includes/class-wp-job-manager-post-types.php:91
787
  #: includes/class-wp-job-manager-post-types.php:137
788
+ #: includes/class-wp-job-manager-post-types.php:191
789
+ msgid "Search %s"
790
  msgstr ""
791
 
792
  #: includes/class-wp-job-manager-post-types.php:92
793
  #: includes/class-wp-job-manager-post-types.php:138
794
+ #: includes/class-wp-job-manager-post-types.php:183
795
+ msgid "All %s"
796
  msgstr ""
797
 
798
  #: includes/class-wp-job-manager-post-types.php:93
799
  #: includes/class-wp-job-manager-post-types.php:139
800
+ #: includes/class-wp-job-manager-post-types.php:194
801
+ msgid "Parent %s"
802
  msgstr ""
803
 
804
  #: includes/class-wp-job-manager-post-types.php:94
805
  #: includes/class-wp-job-manager-post-types.php:140
806
+ msgid "Parent %s:"
807
  msgstr ""
808
 
809
  #: includes/class-wp-job-manager-post-types.php:95
810
  #: includes/class-wp-job-manager-post-types.php:141
811
+ #: includes/class-wp-job-manager-post-types.php:187
812
+ msgid "Edit %s"
813
  msgstr ""
814
 
815
  #: includes/class-wp-job-manager-post-types.php:96
816
  #: includes/class-wp-job-manager-post-types.php:142
817
+ msgid "Update %s"
818
+ msgstr ""
819
+
820
+ #: includes/class-wp-job-manager-post-types.php:97
821
+ #: includes/class-wp-job-manager-post-types.php:143
822
+ msgid "Add New %s"
823
+ msgstr ""
824
+
825
+ #: includes/class-wp-job-manager-post-types.php:98
826
+ #: includes/class-wp-job-manager-post-types.php:144
827
  msgid "New %s Name"
828
  msgstr ""
829
 
830
+ #: includes/class-wp-job-manager-post-types.php:113
831
  #: includes/forms/class-wp-job-manager-form-submit-job.php:137
832
  msgid "Job type"
833
  msgstr ""
834
 
835
+ #: includes/class-wp-job-manager-post-types.php:114
836
  msgid "Job types"
837
  msgstr ""
838
 
839
+ #: includes/class-wp-job-manager-post-types.php:118
840
  msgctxt "Job type slug - resave permalinks after changing this"
841
  msgid "job-type"
842
  msgstr ""
843
 
844
+ #: includes/class-wp-job-manager-post-types.php:161
845
  msgid "Job"
846
  msgstr ""
847
 
848
+ #: includes/class-wp-job-manager-post-types.php:162
849
  msgid "Jobs"
850
  msgstr ""
851
 
852
+ #: includes/class-wp-job-manager-post-types.php:165
853
  msgctxt "Post type archive slug - resave permalinks after changing this"
854
  msgid "jobs"
855
  msgstr ""
856
 
857
+ #: includes/class-wp-job-manager-post-types.php:171
858
  msgctxt "Job permalink - resave permalinks after changing this"
859
  msgid "job"
860
  msgstr ""
861
 
862
+ #: includes/class-wp-job-manager-post-types.php:184
863
  msgid "Add New"
864
  msgstr ""
865
 
866
+ #: includes/class-wp-job-manager-post-types.php:185
867
  msgid "Add %s"
868
  msgstr ""
869
 
870
+ #: includes/class-wp-job-manager-post-types.php:188
871
  msgid "New %s"
872
  msgstr ""
873
 
874
+ #: includes/class-wp-job-manager-post-types.php:189
875
+ #: includes/class-wp-job-manager-post-types.php:190
876
  msgid "View %s"
877
  msgstr ""
878
 
879
+ #: includes/class-wp-job-manager-post-types.php:192
880
  msgid "No %s found"
881
  msgstr ""
882
 
883
+ #: includes/class-wp-job-manager-post-types.php:193
884
  msgid "No %s found in trash"
885
  msgstr ""
886
 
887
+ #: includes/class-wp-job-manager-post-types.php:196
888
  msgid "This is where you can create and manage %s."
889
  msgstr ""
890
 
891
+ #: includes/class-wp-job-manager-post-types.php:221
892
+ #: wp-job-manager-functions.php:196
893
  msgctxt "post status"
894
  msgid "Expired"
895
  msgstr ""
896
 
897
+ #: includes/class-wp-job-manager-post-types.php:226
898
  msgid "Expired <span class=\"count\">(%s)</span>"
899
  msgid_plural "Expired <span class=\"count\">(%s)</span>"
900
  msgstr[0] ""
901
  msgstr[1] ""
902
 
903
+ #: includes/class-wp-job-manager-post-types.php:229
904
+ #: wp-job-manager-functions.php:197
905
+ msgctxt "post status"
906
+ msgid "Preview"
907
+ msgstr ""
908
+
909
+ #: includes/class-wp-job-manager-post-types.php:234
910
+ msgid "Preview <span class=\"count\">(%s)</span>"
911
+ msgid_plural "Preview <span class=\"count\">(%s)</span>"
912
+ msgstr[0] ""
913
+ msgstr[1] ""
914
+
915
  #: includes/class-wp-job-manager-shortcodes.php:62
916
  msgid "Invalid ID"
917
  msgstr ""
1103
  msgstr ""
1104
 
1105
  #: includes/forms/class-wp-job-manager-form-submit-job.php:263
1106
+ #: wp-job-manager-functions.php:676
1107
  msgid "\"%s\" (filetype %s) needs to be one of the following file types: %s"
1108
  msgstr ""
1109
 
1221
  msgstr ""
1222
 
1223
  #: templates/form-fields/multiselect-field.php:3
1224
+ #: wp-job-manager-functions.php:520
1225
  msgid "No results match"
1226
  msgstr ""
1227
 
1228
  #: templates/form-fields/multiselect-field.php:3
1229
+ #: wp-job-manager-functions.php:521
1230
  msgid "Select Some Options"
1231
  msgstr ""
1232
 
1308
  msgid "%s submitted successfully. Your listing will be visible once approved."
1309
  msgstr ""
1310
 
1311
+ #: wp-job-manager-functions.php:195
1312
  msgctxt "post status"
1313
  msgid "Draft"
1314
  msgstr ""
1315
 
1316
+ #: wp-job-manager-functions.php:198
 
 
 
 
 
1317
  msgctxt "post status"
1318
  msgid "Pending approval"
1319
  msgstr ""
1320
 
1321
+ #: wp-job-manager-functions.php:199
1322
  msgctxt "post status"
1323
  msgid "Pending payment"
1324
  msgstr ""
1325
 
1326
+ #: wp-job-manager-functions.php:200
1327
  msgctxt "post status"
1328
  msgid "Active"
1329
  msgstr ""
1330
 
1331
+ #: wp-job-manager-functions.php:285
1332
  msgid "Reset"
1333
  msgstr ""
1334
 
1335
+ #: wp-job-manager-functions.php:289
1336
  msgid "RSS"
1337
  msgstr ""
1338
 
1339
+ #: wp-job-manager-functions.php:359
1340
  msgid "Invalid email address."
1341
  msgstr ""
1342
 
1343
+ #: wp-job-manager-functions.php:367
1344
  msgid "Your email address isn&#8217;t correct."
1345
  msgstr ""
1346
 
1347
+ #: wp-job-manager-functions.php:371
1348
  msgid "This email is already registered, please choose another one."
1349
  msgstr ""
1350
 
1351
+ #: wp-job-manager-functions.php:519
1352
  msgid "Choose a category&hellip;"
1353
  msgstr ""
1354
 
1355
+ #: wp-job-manager-functions.php:678
1356
  msgid "Uploaded files need to be one of the following file types: %s"
1357
  msgstr ""
1358
 
1368
  msgid "Anywhere"
1369
  msgstr ""
1370
 
1371
+ #: wp-job-manager.php:151
1372
  msgid "Invalid file type. Accepted types:"
1373
  msgstr ""
1374
 
1375
+ #: wp-job-manager.php:164
1376
  msgid "Load previous listings"
1377
  msgstr ""
1378
 
1379
+ #: wp-job-manager.php:167
1380
  msgid "Are you sure you want to delete this listing?"
1381
  msgstr ""
1382
 
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.3
7
- Stable tag: 1.23.10
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 [translate.wordpress.org](htt
142
 
143
  == Changelog ==
144
 
 
 
 
 
 
145
  = 1.23.10 =
146
  * Fix - Handle WP 4.3 signup notification.
147
  * Fix - Map mime types to those that WordPress knows.
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.3
7
+ Stable tag: 1.23.11
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
142
 
143
  == Changelog ==
144
 
145
+ = 1.23.11 =
146
+ * Fix - Author check in job_manager_user_can_edit_job().
147
+ * Tweak - Before deleting a job, delete its attachments.
148
+ * Tweak - Show previews in backend if needed.
149
+
150
  = 1.23.10 =
151
  * Fix - Handle WP 4.3 signup notification.
152
  * Fix - Map mime types to those that WordPress knows.
wp-job-manager-functions.php CHANGED
@@ -449,7 +449,7 @@ function job_manager_user_can_edit_job( $job_id ) {
449
  } else {
450
  $job = get_post( $job_id );
451
 
452
- if ( ! $job || ( $job->post_author !== get_current_user_id() && ! current_user_can( 'edit_post', $job_id ) ) ) {
453
  $can_edit = false;
454
  }
455
  }
449
  } else {
450
  $job = get_post( $job_id );
451
 
452
+ if ( ! $job || ( absint( $job->post_author ) !== get_current_user_id() && ! current_user_can( 'edit_post', $job_id ) ) ) {
453
  $can_edit = false;
454
  }
455
  }
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.10
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.10' );
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.11
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.11' );
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