SEO Smart Links - Version 1.7.5

Version Description

Download this release

Release Info

Developer freediver
Plugin Icon 128x128 SEO Smart Links
Version 1.7.5
Comparing to
See all releases

Code changes from version 1.7.2 to 1.7.5

Files changed (2) hide show
  1. readme.txt +1 -1
  2. seo-links.php +7 -5
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: freediver
3
  Donate link: https://www.networkforgood.org/donation/MakeDonation.aspx?ORGID2=520781390
4
  Tags: Post, posts, comments, links, seo, google, automatic
5
  Requires at least: 2.3
6
- Tested up to: 2.6.3
7
  Stable tag: trunk
8
 
9
  SEO Smart Links can automatically link keywords and phrases in your posts and comments with corresponding posts, pages, categories and tags.
3
  Donate link: https://www.networkforgood.org/donation/MakeDonation.aspx?ORGID2=520781390
4
  Tags: Post, posts, comments, links, seo, google, automatic
5
  Requires at least: 2.3
6
+ Tested up to: 2.7
7
  Stable tag: trunk
8
 
9
  SEO Smart Links can automatically link keywords and phrases in your posts and comments with corresponding posts, pages, categories and tags.
seo-links.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  /*
4
  Plugin Name: SEO Smart Links
5
- Version: 1.7.2
6
  Plugin URI: http://www.prelovac.com/vladimir/wordpress-plugins/seo-smart-links
7
  Author: Vladimir Prelovac
8
  Author URI: http://www.prelovac.com/vladimir
@@ -78,6 +78,7 @@ function SEOLinks_process_text($text, $mode)
78
 
79
  $arrignore=$this->explode_trim(",", strtolower($options['ignore'].$add));
80
 
 
81
  $text = " $text ";
82
 
83
  // custom keywords
@@ -124,8 +125,9 @@ function SEOLinks_process_text($text, $mode)
124
 
125
  foreach ($posts as $postitem)
126
  {
127
- if (($options['lposts'] && $postitem->post_type=='post') || ($options['lpages'] && $postitem->post_type=='page') &&
128
- !$maxlinks || ($links < $maxlinks) && !in_array( strtolower($postitem->post_title), $arrignore) && strstr($text, $postitem->post_title) )
 
129
  {
130
  $name = preg_quote($postitem->post_title, '/');
131
  $regexp="/(?!(?:[^<]+>|[^>]+<\/a>))\b($name)\b/imsU";
@@ -154,7 +156,7 @@ function SEOLinks_process_text($text, $mode)
154
 
155
  foreach ($categories as $cat)
156
  {
157
- if (!$maxlinks || ($links < $maxlinks) && !in_array( strtolower($cat->name), $arrignore) && strstr($text, $cat->name) )
158
  {
159
  $name= preg_quote($cat->name, '/');
160
  $regexp="/(?!(?:[^<]+>|[^>]+<\/a>))\b($name)\b/imsU";
@@ -185,7 +187,7 @@ function SEOLinks_process_text($text, $mode)
185
 
186
  foreach ($tags as $tag)
187
  {
188
- if (!$maxlinks || ($links < $maxlinks) && !in_array( strtolower($name), $arrignore) && strstr($text, $tag->name))
189
  {
190
  $name = preg_quote($tag->name, '/');
191
  $regexp="/(?!(?:[^<]+>|[^>]+<\/a>))\b($name)\b/imsU";
2
 
3
  /*
4
  Plugin Name: SEO Smart Links
5
+ Version: 1.7.5
6
  Plugin URI: http://www.prelovac.com/vladimir/wordpress-plugins/seo-smart-links
7
  Author: Vladimir Prelovac
8
  Author URI: http://www.prelovac.com/vladimir
78
 
79
  $arrignore=$this->explode_trim(",", strtolower($options['ignore'].$add));
80
 
81
+
82
  $text = " $text ";
83
 
84
  // custom keywords
125
 
126
  foreach ($posts as $postitem)
127
  {
128
+
129
+ if ((($options['lposts'] && $postitem->post_type=='post') || ($options['lpages'] && $postitem->post_type=='page')) &&
130
+ (!$maxlinks || ($links < $maxlinks)) && (!in_array( strtolower($postitem->post_title), $arrignore)) && strstr($text, $postitem->post_title) )
131
  {
132
  $name = preg_quote($postitem->post_title, '/');
133
  $regexp="/(?!(?:[^<]+>|[^>]+<\/a>))\b($name)\b/imsU";
156
 
157
  foreach ($categories as $cat)
158
  {
159
+ if ((!$maxlinks || ($links < $maxlinks)) && !in_array( strtolower($cat->name), $arrignore) && strstr($text, $cat->name) )
160
  {
161
  $name= preg_quote($cat->name, '/');
162
  $regexp="/(?!(?:[^<]+>|[^>]+<\/a>))\b($name)\b/imsU";
187
 
188
  foreach ($tags as $tag)
189
  {
190
+ if ((!$maxlinks || ($links < $maxlinks)) && !in_array( strtolower($name), $arrignore) && strstr($text, $tag->name))
191
  {
192
  $name = preg_quote($tag->name, '/');
193
  $regexp="/(?!(?:[^<]+>|[^>]+<\/a>))\b($name)\b/imsU";