A federal judge has ordered the immediate restoration of federal funding that the Trump administration attempted to freeze.