-
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
Change deactivation approach #2562
Changes from all commits
6e17f71
52e3cd9
0501cb6
30e4f0a
8ef9d31
63db340
fa4ba74
51ebc4b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -190,8 +190,7 @@ public function get_items() { | |
'meta_query' => [ | ||
[ | ||
'key' => WP_Job_Manager_Promoted_Jobs::PROMOTED_META_KEY, | ||
'value' => '1', | ||
'compare' => '=', | ||
'compare' => 'EXISTS', | ||
], | ||
], | ||
]; | ||
|
@@ -234,6 +233,7 @@ private function prepare_item_for_response( WP_Post $item ) { | |
return [ | ||
'id' => (string) $item->ID, | ||
'status' => $item->post_status, | ||
'promoted' => WP_Job_Manager_Promoted_Jobs::is_promoted( $item->ID ), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you foresee any changes we need to make on WPJMCOM to use this field? I am just thinking about the use-case here. 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently, I don't think so. But I added it because it can be useful in the future and make the feed more concise (we don't have promoted and not promoted jobs in the feed without a differentiation). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good, thanks! |
||
'title' => $item->post_title, | ||
'description' => $item->post_content, | ||
'permalink' => get_permalink( $item ), | ||
|
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.
Good catch on setting the flag only if we're creating a new job