It’s a three step process.
-
First, get a list of Editors using
WP_User_Query
. -
Get a list of each user’s posts using
get_posts
and delete them usingwp_delete_post
. -
Lastly, delete the user itself using
wp_delete_user
.
It’s a three step process.
First, get a list of Editors using WP_User_Query
.
Get a list of each user’s posts using get_posts
and delete them using wp_delete_post
.
Lastly, delete the user itself using wp_delete_user
.