Source of file SiteTreeLinkTracking_Parser.php
Size: 0,601 Bytes - Last Modified: 2021-12-23T10:05:48+00:00
/var/www/docs.ssmods.com/process/src/code/SiteTreeLinkTracking_Parser.php
123456789101112131415161718192021222324 | <?php namespace BetterAnchors; use SS_HTMLValue; class SiteTreeLinkTracking_Parser extends \SiteTreeLinkTracking_Parser { /** * This method stops anchors from being marked with .ss-broken */ public function process(SS_HTMLValue $htmlValue) { $results = parent::process($htmlValue); foreach ($results as $i => $result) { if ($result['Type'] == 'localanchor' && $result['Broken'] == true) { // @TODO: re-assess if this really is broken $results[$i]['Broken'] = 0; } } return $results; } } |