Skip to content

Commit

Permalink
Default job_manager_delete_expired_jobs to false. Set to true to have…
Browse files Browse the repository at this point in the history
… expired jobs deleted automatically. More sensible default.

Closes Automattic#517
  • Loading branch information
mikejolley committed Aug 19, 2015
1 parent dbd9343 commit 13d2b53
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions includes/class-wp-job-manager-post-types.php
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ public function check_for_expired_jobs() {
}

// Delete old expired jobs
if ( apply_filters( 'job_manager_delete_expired_jobs', true ) ) {
if ( apply_filters( 'job_manager_delete_expired_jobs', false ) ) {
$job_ids = $wpdb->get_col( $wpdb->prepare( "
SELECT posts.ID FROM {$wpdb->posts} as posts
WHERE posts.post_type = 'job_listing'
Expand Down Expand Up @@ -621,4 +621,4 @@ public function rp4wp_related_meta_fields_weight( $weight, $post, $meta_field )
}
return $weight;
}
}
}
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ You can view (and contribute) translations via the [Transifex project here](http
== Changelog ==

* Fix - 4.3 issue showing "Description is a required field" due to editor field.
* Tweak - Default job_manager_delete_expired_jobs to false. Set to true to have expired jobs deleted automatically. More sensible default.

= 1.23.6 =
* Fix - job_manager_ajax_filters -> job_manager_ajax_file_upload in file upload script.
Expand Down
4 changes: 2 additions & 2 deletions templates/job-dashboard.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div id="job-manager-job-dashboard">
<p><?php _e( 'Your listings are shown in the table below. Expired listings will be automatically removed after 30 days.', 'wp-job-manager' ); ?></p>
<p><?php _e( 'Your listings are shown in the table below.', 'wp-job-manager' ); ?></p>
<table class="job-manager-jobs">
<thead>
<tr>
Expand Down Expand Up @@ -80,4 +80,4 @@
</tbody>
</table>
<?php get_job_manager_template( 'pagination.php', array( 'max_num_pages' => $max_num_pages ) ); ?>
</div>
</div>

0 comments on commit 13d2b53

Please sign in to comment.