function onAfterUnpublish() { GoogleSitemap::ping(); }
function unpublish() { $SQL_id = Convert::raw2sql($_REQUEST['ID']); $page = DataObject::get_by_id("SiteTree", $SQL_id); $page->deleteFromStage('Live'); $page->flushCache(); $page = DataObject::get_by_id("SiteTree", $SQL_id); $page->Status = "Unpublished"; $page->write(); GoogleSitemap::ping(); return $this->tellBrowserAboutPublicationChange($page, sprintf(_t('CMSMain.REMOVEDPAGE', "Removed '%s' from the published site"), $page->Title)); }