A radio presenter was given “no direction” not to post about the Israel-Gaza war on social media before she was sacked, a court has been told.