SAN FRANCISCO — US judge bars Trump from denying federal funds to 'sanctuary' cities that limit cooperation with immigration authorities.