Version Description
Download this release
Release Info
Developer | freediver |
Plugin | SEO Smart Links |
Version | 1.9.3 |
Comparing to | |
See all releases |
Code changes from version 1.9.2 to 1.9.3
- readme.txt +1 -1
- seo-links.php +9 -5
readme.txt
CHANGED
@@ -22,7 +22,7 @@ Everything happens completely transparent, and you can edit the options from the
|
|
22 |
Change log:
|
23 |
|
24 |
|
25 |
-
v1.9.
|
26 |
- Various improvements and bug fixes
|
27 |
|
28 |
v1.8.0
|
22 |
Change log:
|
23 |
|
24 |
|
25 |
+
v1.9.3
|
26 |
- Various improvements and bug fixes
|
27 |
|
28 |
v1.8.0
|
seo-links.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
/*
|
4 |
Plugin Name: SEO Smart Links
|
5 |
-
Version: 1.9.
|
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
|
@@ -64,9 +64,12 @@ function SEOLinks_process_text($text, $mode)
|
|
64 |
if (($post->post_type=='page' && !$options['pageself']) || ($post->post_type=='post' && !$options['postself'])) {
|
65 |
|
66 |
$thistitle=strtolower($post->post_title);
|
|
|
67 |
}
|
68 |
-
else
|
69 |
$thistitle='';
|
|
|
|
|
70 |
|
71 |
}
|
72 |
|
@@ -107,15 +110,16 @@ function SEOLinks_process_text($text, $mode)
|
|
107 |
foreach ($kw_array as $name=>$url)
|
108 |
{
|
109 |
|
110 |
-
if ((!$maxlinks || ($links < $maxlinks)) &&
|
111 |
{
|
|
|
112 |
$name= preg_quote($name, '/');
|
113 |
|
114 |
$replace="<a title=\"$1\" href=\"$url\">$1</a>";
|
115 |
$regexp="/(?!(?:[^<]+>|[^>]+<\/a>))\b($name)\b/imsU"; // this didnt work with unicode
|
116 |
//$regexp="/(?!(?:[^<]+>|[^>]+<\/a>))(?<!\p{L})($name)(?!\p{L})/imsU";
|
117 |
$newtext = preg_replace($regexp, $replace, $text, $maxsingle);
|
118 |
-
if ($newtext!=$text) {
|
119 |
$links++;
|
120 |
$text=$newtext;
|
121 |
}
|
@@ -443,7 +447,7 @@ function SEOLinks_comment_text_filter($text) {
|
|
443 |
cars, car, autos, auto, http://mycarblog.com/<br />
|
444 |
</p>
|
445 |
|
446 |
-
<textarea name="customkey" id="customkey" rows="10" cols="
|
447 |
<br><br>
|
448 |
|
449 |
<h3>Limits</h3>
|
2 |
|
3 |
/*
|
4 |
Plugin Name: SEO Smart Links
|
5 |
+
Version: 1.9.3
|
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
|
64 |
if (($post->post_type=='page' && !$options['pageself']) || ($post->post_type=='post' && !$options['postself'])) {
|
65 |
|
66 |
$thistitle=strtolower($post->post_title);
|
67 |
+
$thisurl=trailingslashit(get_permalink($post->ID));
|
68 |
}
|
69 |
+
else {
|
70 |
$thistitle='';
|
71 |
+
$thisurl='';
|
72 |
+
}
|
73 |
|
74 |
}
|
75 |
|
110 |
foreach ($kw_array as $name=>$url)
|
111 |
{
|
112 |
|
113 |
+
if ((!$maxlinks || ($links < $maxlinks)) && (trailingslashit($url)!=$thisurl) && !in_array( strtolower($name), $arrignore))
|
114 |
{
|
115 |
+
|
116 |
$name= preg_quote($name, '/');
|
117 |
|
118 |
$replace="<a title=\"$1\" href=\"$url\">$1</a>";
|
119 |
$regexp="/(?!(?:[^<]+>|[^>]+<\/a>))\b($name)\b/imsU"; // this didnt work with unicode
|
120 |
//$regexp="/(?!(?:[^<]+>|[^>]+<\/a>))(?<!\p{L})($name)(?!\p{L})/imsU";
|
121 |
$newtext = preg_replace($regexp, $replace, $text, $maxsingle);
|
122 |
+
if ($newtext!=$text) {
|
123 |
$links++;
|
124 |
$text=$newtext;
|
125 |
}
|
447 |
cars, car, autos, auto, http://mycarblog.com/<br />
|
448 |
</p>
|
449 |
|
450 |
+
<textarea name="customkey" id="customkey" rows="10" cols="90" >$customkey</textarea>
|
451 |
<br><br>
|
452 |
|
453 |
<h3>Limits</h3>
|