Is it possible to run wp_kses on all posts?

Question

I’m a bit unfamiliar with WP development… but what I’m trying to achieve is basically:

  1. Query all current posts
  2. 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.

0
, killua 7 months 0 Answers 81 views 0

Leave an answer