Check if someone is editing a post (this content is currently locked)
Yes, there is a function in WP for that: wp_check_post_lock() Give it the post ID and it will return the user ID that is currently editing the post OR false if no one is editing the post (i.e. it is not locked). $is_locked = wp_check_post_lock( $post_id ); if ( false === $is_locked ) { // … Read more