Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'publish_post', function ( $ID ) {
- $post = get_post( $ID );
- $plain_content = strip_tags( $post->post_content );
- $new_post = array(
- 'ID' => $ID,
- 'post_content' => $plain_content,
- );
- wp_update_post( $new_post );
- } );
Add Comment
Please, Sign In to add comment