function interlink_h6_cleanup_existing_links() { $args = [ 'post_type' => get_post_types(['public' => true]), 'posts_per_page' => -1, 'post_status' => 'publish', ]; $posts = get_posts($args); foreach ($posts as $post) { $content = $post->post_content; $new_content = preg_replace('/