PluginProbe
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO / 2.8.0
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO v2.8.0
2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.1 2.1.0 2.0.2 2.0.1 2.0.0 1.32.0 1.31.0 1.30.0 1.29.0 1.28.0 1.27.0 1.26.0 1.25.0 trunk 1.0.0 1.0.1 1.0.2 1.1.0 All 49 releases
← All changes | includes/seo/class-ai-content-analyzer.php +2 -1 1.28.02.8.0 View file →
@@ -843,8 +843,9 @@
843 843 private function find_keyword_positions(string $content, string $keyword): array {
844 844 $positions = [];
845 845 $offset = 0;
846 846
847 + // phpcs:ignore Generic.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition -- the canonical strpos() scan loop; hoisting it needs a duplicated call.
847 848 while (($pos = strpos($content, $keyword, $offset)) !== false) {
848 849 $positions[] = $pos;
849 850 $offset = $pos + 1;
850 851 }
@@ -943,9 +944,9 @@
943 944 // Get recent posts for blog homepage
944 945 $recent_posts = get_posts(['numberposts' => 3]);
945 946 $content_parts = [];
946 947 foreach ($recent_posts as $post) {
947 - $content_parts[] = $post->post_title . ' ' . wp_trim_words($post->post_content, 100);
948 + $content_parts[] = $post->post_title . ' ' . \ThinkRank\Core\Seo_Text::trim_words($post->post_content, 100, '...', 1000);
948 949 }
949 950 $content = implode(' ', $content_parts);
950 951 }
951 952 break;