Security:
- Dropped the nopriv registration from both delete actions (cred_delete_post, legacy cred-ajax-delete-post)
- Added a hard is_user_logged_in() gate in both delete handlers
- Delete caps no longer granted to logged-out users (own → requires login; others → requires delete_others_posts)
Fix: PHP 8+ fatal error during heartbeat autosave
reset(),array_keys(),foreach()ongetAttachedData()now guarded withis_array()check- Prevents fatal errors when metadata is corrupted (string instead of array)
- Fixes both autosave crash and post deletion crash