Footer bugfix

Footer was not used correctly if global $post was overriden during the
parsing of the page (detected @Ronald's site)
Footer still used 3 parameter approach when invoking popup edit page;
this resulted in a function not found (fixed)