Making the admin able to bypass pending
-
Hi there,
I’m trying to get the plugin to be able to allow admins to post jobs without having to be approved while the ‘Moderate New Listings’ option is enabled. I’ve identified the code affecting this as being in the /public_html/wp-content/plugins/wp-job-manager/includes/forms/class-wp-job-manager-form-submit-job.php file. On line 660, there is some code that determines whether the job post gets set to the pending or published status. I tried changing the following code
(it won’t allow me to mark this section as code for some reason)
$update_job['post_status'] = get_option( 'job_manager_submission_requires_approval' ) ? 'pending' : 'publish';
to
if ( ! is_admin() ) { $update_job['post_status'] = get_option( 'job_manager_submission_requires_approval' ) ? 'pending' : 'publish'; } else { $update_job['post_status'] = 'publish'; }
to make admins always have the published status for their job posts, but it’s still behaving the way it originally did. Can someone tell me what I’m doing wrong?
- The topic ‘Making the admin able to bypass pending’ is closed to new replies.