How to trigger an error: “You are not allowed to edit this post.”

Check or Alter user capabilities on call of current_user_can. Check current_user_can fucntion and has_cap fitler for further info.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)