Disable Post Trashed/Deleted/Slug Change Notifications
-
Hi Team Yoast,
I write a plugin called Matador Jobs which creates Job Postings type posts from externally API-accessed data. It also removes those postings when they expire or are closed.
Per Google’s documentation on Job Postings Schema for Google for Jobs, Google prefers we either serve a 410 temporarily and/or 404 (permanently) when a job posting is removed. Yoast, when active on a site, will create a notification for every removed Job Posting, which can be 10s or 100s per day and extremely annoying for users.
They value 404, slug change, etc notifications for blog posts and pages, but not for jobs. I want to add code to my plugin to nicely ask Yoast to ignore our post type.
In this help forum post, filters were offered to hide or suppress the notifications:
https://wordpress.org/support/topic/cant-disable-seo-warning-about-deleted-posts/
That said, in Yoast 21.5, I cannot find the filters in the code to determine which, if any, arguments are passed to the function to granularly determine if the notification should be suppressed. A review of
class-slug-change-watcher.php
found where these notifications are enqueued and in that andclass Yoast_Notification
there are no filters or actions to prevent this notifications.Question 1: is the answer on the above linked help forum answer still valid in Yoast 21? If so, can the full documentation of the filter be provided and/or location in the code referenced, and can a third-party developer granularly disable notifications for post types they create?
Question 2: if not, can developers please given a way to granularly disable notifications for post types they create?
Thank you.
- The topic ‘Disable Post Trashed/Deleted/Slug Change Notifications’ is closed to new replies.