Version Description
Download this release
Release Info
Developer | freediver |
Plugin | SEO Smart Links |
Version | 1.9.2 |
Comparing to | |
See all releases |
Code changes from version 1.9 to 1.9.2
- readme.txt +5 -2
- seo-links.php +9 -8
readme.txt
CHANGED
@@ -6,11 +6,13 @@ Requires at least: 2.3
|
|
6 |
Tested up to: 2.7
|
7 |
Stable tag: trunk
|
8 |
|
9 |
-
SEO Smart Links
|
10 |
|
11 |
|
12 |
== Description ==
|
13 |
|
|
|
|
|
14 |
SEO Smart Links can automatically link keywords and phrases in your posts and comments with corresponding posts, pages, categories and tags on your blog.
|
15 |
|
16 |
Further SEO Smart links allows you to set up your own keywords and set of matching URLs. Finally SEO Smart links allows you to set nofollow attribute and open links in new window.
|
@@ -19,7 +21,8 @@ Everything happens completely transparent, and you can edit the options from the
|
|
19 |
|
20 |
Change log:
|
21 |
|
22 |
-
|
|
|
23 |
- Various improvements and bug fixes
|
24 |
|
25 |
v1.8.0
|
6 |
Tested up to: 2.7
|
7 |
Stable tag: trunk
|
8 |
|
9 |
+
SEO Smart Links provides automatic SEO benefits for your site in addition to custom keyword lists, nofollow and much more.
|
10 |
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
SEO Smart Links provides automatic SEO benefits for your site in addition to custom keyword lists, nofollow and much more.
|
15 |
+
|
16 |
SEO Smart Links can automatically link keywords and phrases in your posts and comments with corresponding posts, pages, categories and tags on your blog.
|
17 |
|
18 |
Further SEO Smart links allows you to set up your own keywords and set of matching URLs. Finally SEO Smart links allows you to set nofollow attribute and open links in new window.
|
21 |
|
22 |
Change log:
|
23 |
|
24 |
+
|
25 |
+
v1.9.2
|
26 |
- Various improvements and bug fixes
|
27 |
|
28 |
v1.8.0
|
seo-links.php
CHANGED
@@ -2,13 +2,15 @@
|
|
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
|
9 |
-
Description: SEO Smart Links provides automatic
|
10 |
*/
|
11 |
|
|
|
|
|
12 |
|
13 |
// Avoid name collisions.
|
14 |
if ( !class_exists('SEOLinks') ) :
|
@@ -105,7 +107,7 @@ function SEOLinks_process_text($text, $mode)
|
|
105 |
foreach ($kw_array as $name=>$url)
|
106 |
{
|
107 |
|
108 |
-
if ((!$maxlinks || ($links < $maxlinks)) && strtolower($
|
109 |
{
|
110 |
$name= preg_quote($name, '/');
|
111 |
|
@@ -170,7 +172,7 @@ function SEOLinks_process_text($text, $mode)
|
|
170 |
|
171 |
foreach ($categories as $cat)
|
172 |
{
|
173 |
-
if ((!$maxlinks || ($links < $maxlinks)) &&
|
174 |
{
|
175 |
$name= preg_quote($cat->name, '/');
|
176 |
$regexp="/(?!(?:[^<]+>|[^>]+<\/a>))\b($name)\b/imsU";
|
@@ -201,7 +203,7 @@ function SEOLinks_process_text($text, $mode)
|
|
201 |
|
202 |
foreach ($tags as $tag)
|
203 |
{
|
204 |
-
if ((!$maxlinks || ($links < $maxlinks)) &&
|
205 |
{
|
206 |
$name = preg_quote($tag->name, '/');
|
207 |
$regexp="/(?!(?:[^<]+>|[^>]+<\/a>))\b($name)\b/imsU";
|
@@ -231,6 +233,7 @@ function SEOLinks_the_content_filter($text) {
|
|
231 |
|
232 |
if ($options['blanko'])
|
233 |
$result = preg_replace('%<a(\s+.*?href=\S(?!' . $host . '))%i', '<a target="_blank"\\1', $result); // credit to Kaf Oseo
|
|
|
234 |
if ($options['nofolo'])
|
235 |
$result = preg_replace('%<a(\s+.*?href=\S(?!' . $host . '))%i', '<a rel="nofollow"\\1', $result);
|
236 |
return $result;
|
@@ -363,7 +366,7 @@ function SEOLinks_comment_text_filter($text) {
|
|
363 |
$ignore=$options['ignore'];
|
364 |
$maxlinks=$options['maxlinks'];
|
365 |
$maxsingle=$options['maxsingle'];
|
366 |
-
$customkey
|
367 |
$nofoln=$options['nofoln']=='on'?'checked':'';
|
368 |
$nofolo=$options['nofolo']=='on'?'checked':'';
|
369 |
$blankn=$options['blankn']=='on'?'checked':'';
|
@@ -371,9 +374,7 @@ function SEOLinks_comment_text_filter($text) {
|
|
371 |
$onlysingle=$options['onlysingle']=='on'?'checked':'';
|
372 |
|
373 |
$nonce=wp_create_nonce( 'seo-smart-links');
|
374 |
-
|
375 |
|
376 |
-
|
377 |
$imgpath=trailingslashit(get_option('siteurl')). 'wp-content/plugins/seo-automatic-links/i';
|
378 |
echo <<<END
|
379 |
|
2 |
|
3 |
/*
|
4 |
Plugin Name: SEO Smart Links
|
5 |
+
Version: 1.9.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
|
9 |
+
Description: SEO Smart Links provides automatic SEO benefits for your site in addition to custom keyword lists, nofollow and much more.
|
10 |
*/
|
11 |
|
12 |
+
// todo It's possible to have option for case insensitive ?
|
13 |
+
// $count in preg_replace, max links towards same url
|
14 |
|
15 |
// Avoid name collisions.
|
16 |
if ( !class_exists('SEOLinks') ) :
|
107 |
foreach ($kw_array as $name=>$url)
|
108 |
{
|
109 |
|
110 |
+
if ((!$maxlinks || ($links < $maxlinks)) && strtolower($url)!=$thistitle && !in_array( strtolower($name), $arrignore))
|
111 |
{
|
112 |
$name= preg_quote($name, '/');
|
113 |
|
172 |
|
173 |
foreach ($categories as $cat)
|
174 |
{
|
175 |
+
if ((!$maxlinks || ($links < $maxlinks)) && !in_array( strtolower($cat->name), $arrignore) )
|
176 |
{
|
177 |
$name= preg_quote($cat->name, '/');
|
178 |
$regexp="/(?!(?:[^<]+>|[^>]+<\/a>))\b($name)\b/imsU";
|
203 |
|
204 |
foreach ($tags as $tag)
|
205 |
{
|
206 |
+
if ((!$maxlinks || ($links < $maxlinks)) && !in_array( strtolower($tag->name), $arrignore) )
|
207 |
{
|
208 |
$name = preg_quote($tag->name, '/');
|
209 |
$regexp="/(?!(?:[^<]+>|[^>]+<\/a>))\b($name)\b/imsU";
|
233 |
|
234 |
if ($options['blanko'])
|
235 |
$result = preg_replace('%<a(\s+.*?href=\S(?!' . $host . '))%i', '<a target="_blank"\\1', $result); // credit to Kaf Oseo
|
236 |
+
|
237 |
if ($options['nofolo'])
|
238 |
$result = preg_replace('%<a(\s+.*?href=\S(?!' . $host . '))%i', '<a rel="nofollow"\\1', $result);
|
239 |
return $result;
|
366 |
$ignore=$options['ignore'];
|
367 |
$maxlinks=$options['maxlinks'];
|
368 |
$maxsingle=$options['maxsingle'];
|
369 |
+
$customkey=stripslashes($options['customkey']);
|
370 |
$nofoln=$options['nofoln']=='on'?'checked':'';
|
371 |
$nofolo=$options['nofolo']=='on'?'checked':'';
|
372 |
$blankn=$options['blankn']=='on'?'checked':'';
|
374 |
$onlysingle=$options['onlysingle']=='on'?'checked':'';
|
375 |
|
376 |
$nonce=wp_create_nonce( 'seo-smart-links');
|
|
|
377 |
|
|
|
378 |
$imgpath=trailingslashit(get_option('siteurl')). 'wp-content/plugins/seo-automatic-links/i';
|
379 |
echo <<<END
|
380 |
|