Is it possible to run wp_kses on all posts?
For security purposes, we're mostly using the wordpress json api to display our posts/categories and we went to remove any malicious tags. I'm a bit unfamiliar with WP development... but what I'm trying to achieve is basically:
- Query all current posts
- Run
wp_kses
on all the post's content?
What I'm trying so far in functions.php
$post_args = array(
'posts_per_page' = -1
);
$post_query = new WP_Query($post_args);
while( $post_query-have_posts()): $post_query-the_post();
// wp_kses the content here???
endwhile;
I'm not entirely sure where go from here.