I read on Adam Brown’s website that the content_save_pre
filter is depreciated as of WordPress 3.8 – is this true? It doesn’t say it on the official codex page for content_save_pre
so I’m skeptical. If it is depreciated, which filter would I use to edit the content after I press Publish/Update but before it writes it to the database?
Leave a Reply
You must be logged in to post a comment.
What Adam Brown’s site says is that the hook no longer appears in 3.8. I
grep
ed a 3.9 and found:Interestingly the filter is not applied anywhere, but is still used by the Core in several places. That would be a big oversight. If you look around a bit more you will find this:
So
grep
again a bit less rigidly and right at the bottom:It is a dynamic filter, which I assume is why Adam Brown lost track. This is confirmed by the Codex itself:
I believe that that is the hook you are looking for. In other words,
content_save_pre
should still work. It is generated dynamically but should still work.