1

I want to store JSON in my post_content, but the kses filters makes it break.

I would like to remove the kses filters when creating or updating (well, saving) a specific post type; anywhere in the code (thus using filters, I guess).

How could I do that ?

Thanks !

2
  • Instead of saving it in post_conetnt (I know the pain as I have done it before), save it in the post meta Commented Mar 2, 2022 at 8:55
  • Thanks @Buttered_Toast. I ended up doing that, + using the edit_post_content filter, which allows me to "fake" the post_content when editing a post.
    – gordie
    Commented Mar 3, 2022 at 9:41

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.