wp404 icon indicating copy to clipboard operation
wp404 copied to clipboard

Reporter: "Producer"

Open stevegrunwell opened this issue 9 years ago • 1 comments
trafficstars

A discussion I had with @lukaspawlik (where I admittedly misinterpreted his idea) led me to the "Producer" reporter: hook in early in the process and adjust the registered reporters based on information gathered about the post.

For example, the Producer might get information about a post (like the post_exists reporter) and, if it's an older post maybe we remove some of the more detailed reporters from the queue. Alternately, if we're getting 404s on posts published before a migration, maybe we want to tack on additional reporters.

It's possible this isn't a reporter at all (since that doesn't really fit), but perhaps an action (or series of actions) that fire before we build the report.

BTW, "Producer" is totally a news joke, playing off "Reporter". I make no apologies for that.

Deal with it

stevegrunwell avatar Mar 16 '16 15:03 stevegrunwell

Upon further consideration, I'm going to introduce this as the "wp404_before_report" action, which will fire before we begin building the reporters. It's a simple approach that still gives developers access to the $wp_query object before we they start building reports, the last possible second to add and/or remove filters to tailor the logs.

stevegrunwell avatar Mar 17 '16 03:03 stevegrunwell