remove_menu_page breaks “Add media”

It’s because you’ve hooked it to the wrong action, it should be admin_menu, not admin_init.

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