Skip to content

Commit

Permalink
Consider scheduled listing as published when deciding if its editable
Browse files Browse the repository at this point in the history
  • Loading branch information
yscik committed Jan 30, 2025
1 parent 3f37322 commit b400b88
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions includes/class-wp-job-manager-post-types.php
Original file line number Diff line number Diff line change
Expand Up @@ -1243,9 +1243,11 @@ public static function job_is_editable( $job_id ) {
$job_is_editable = true;
$post_status = get_post_status( $job_id );

$published = in_array( $post_status, [ 'future', 'publish' ], true );

if (
( 'publish' === $post_status && ! wpjm_user_can_edit_published_submissions() )
|| ( 'publish' !== $post_status && ! job_manager_user_can_edit_pending_submissions() )
( $published && ! wpjm_user_can_edit_published_submissions() )
|| ( ! $published && ! job_manager_user_can_edit_pending_submissions() )
) {
$job_is_editable = false;
}
Expand Down

0 comments on commit b400b88

Please sign in to comment.