Hide categories from frontend, but not admin / post editor

Just don’t apply the filter if is_admin().

Unrelated- you should also take a look at add_filter, your arguments are not correct.

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