Skip to content

Commit

Permalink
Merge branch 'release/1.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-norden committed May 18, 2021
2 parents 9413462 + 919d04d commit 4401d31
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _config/injector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ SilverStripe\Core\Injector\Injector:
class: NorthCreationAgency\SEOHelper\NCAPageSeoExtension
QuinnInteractive\Seo\Seo:
class: NorthCreationAgency\SEOHelper\SeoInjector
QuinnInteractive\Seo\Analysis\WordCountAnalysis:
class: NorthCreationAgency\SEOHelper\WordCountAnalysisInjector

14 changes: 14 additions & 0 deletions code/injectors/WordCountAnalysisInjector.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace NorthCreationAgency\SEOHelper;

use NorthCreationAgency\SEOHelper\SeoInjector;
use QuinnInteractive\Seo\Analysis\WordCountAnalysis;

class WordCountAnalysisInjector extends WordCountAnalysis
{
public function getWordCount()
{
return count(array_filter(explode(' ', SeoInjector::collateContentFields($this->getPage()))));
}
}

0 comments on commit 4401d31

Please sign in to comment.