function onAfterRender() { $app = JFactory::getApplication(); $doc = JFactory::getDocument(); if ($app->isAdmin() || $doc->getType() != 'html') { return; } $assetsFilter = new AssetsBuilderFilter(); $fixlinkFilter = new FixLinksFilter(); $hideLinksFilter = new HideLinksFilter(array('hide_link' => 'HideLinksFilter_hideLink')); $replaceMeta = new ReplaceMetaFilter(); JResponse::setBody($replaceMeta->process($hideLinksFilter->process($fixlinkFilter->process($assetsFilter->process(JResponse::getBody()))))); }
<?php require $_SERVER['DOCUMENT_ROOT'] . '/api/token_auth.php'; require $_SERVER['DOCUMENT_ROOT'] . '/app/lib/seo-filters/init.php'; $hideLinksFilter = new HideLinksFilter(); $hideLinksFilter->rebuildCacheAllowUrls(); echo '<br>'; $hideLinksFilter = new HideLinksFilter(); $hideLinksFilter->rebuildCacheExcludeUrls(); echo '<br>'; $fixlinkFilter = new FixLinksFilter(); $fixlinkFilter->rebuildCache(); echo '<br>'; $replaceMetaFilter = new ReplaceMetaFilter(); $replaceMetaFilter->rebuildCacheMeta(); echo '<br>';