-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds a filter that disables promoted jobs #2808
Conversation
3585b09
to
d70ab7a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just small things
/** | ||
* Documented in class-wp-job-manager.php | ||
*/ | ||
$this->are_promoted_jobs_enabled = apply_filters( 'job_manager_enable_promoted_jobs', true ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking it's fine to just call the filter in multiple places, no need for a new class property for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I am not sure I agree with this one. It will be easier to update when we change the default value. Also we will probably need to repeat the comments too if we want all filters to be documented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
Part of https://github.com/Automattic/greenhouse/issues/2085
Changes Proposed in this Pull Request
Testing Instructions
add_filter('job_manager_enable_promoted_jobs', '__return_false' );
* Delete
wp_job_manager_dismissed_notices
both from the options table and the users table to reset notices* Publish a new job and observe that no popup is shown
* Go to job listings and observe that no Promote button exists