The K7 is currently Pentax's top of the line model. It was announced earlier this year and has been shipping for a couple of months now.
Officially, Pentax never really indicated that the K7 was the K20's replacement, as they called it the summer camera for a while. The K7 is a new body style and they never directly stated that the K20 style was the end of the line, they did hint that there would be no K30. The KX replaces the KM/2000, and they alluded to a mid level camera earlier this year, but what they are actually going to do - who knows.
Even with the K20 discontinued, does not mean that it will not take pictures any longer. They will continue to support it, providing warranty services and parts. They just are not producing any new bodies. The K20 still works with all the lenses that Pentax produces and are available. Pentax recently updated the firmware to version 1.3 for the K20 a couple of months ago. I see no problems with the K20 at all.
I upgraded from the K100 to the K20 in April for a great price. I am very happy with it and will be for years to come. The K7 is twice the price and although the features are improved, I do not see it as twice the camera.
... hope that helps ...