Added init and is admin condition for front or admin only codes