SEO Smart Links - Version 3.0.1

Version Description

  • Fixed load on save post
Download this release

Release Info

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

Code changes from version 3.0 to 3.0.1

Files changed (2) hide show
  1. readme.txt +4 -1
  2. seo-links.php +14 -69
readme.txt CHANGED
@@ -11,7 +11,6 @@ SEO Smart Links provides automatic SEO benefits for your site in addition to cus
11
 
12
  == Description ==
13
 
14
- <a href="http://www.prelovac.com/products/seo-smart-links">SEO Smart Links Premium</a> is now available with premium support and new features.
15
 
16
  SEO Smart Links provides automatic SEO benefits for your site in addition to custom keyword lists, nofollow and much more.
17
 
@@ -23,9 +22,13 @@ It is a perfect solution to get your blog posts interlinked or add affiliate lin
23
 
24
  Everything happens completely transparent, and you can edit the options from the administration settings panel.
25
 
 
26
 
27
  == Changelog ==
28
 
 
 
 
29
  = 3.0 =
30
  * Major update of the code
31
  * Fixed all reported bugs
11
 
12
  == Description ==
13
 
 
14
 
15
  SEO Smart Links provides automatic SEO benefits for your site in addition to custom keyword lists, nofollow and much more.
16
 
22
 
23
  Everything happens completely transparent, and you can edit the options from the administration settings panel.
24
 
25
+ <a href="http://www.prelovac.com/products/seo-smart-links">SEO Smart Links Premium</a> is now available with premium support and new features.
26
 
27
  == Changelog ==
28
 
29
+ = 3.0.1 =
30
+ * Fixed load on save post
31
+
32
  = 3.0 =
33
  * Major update of the code
34
  * Fixed all reported bugs
seo-links.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  /*
4
  Plugin Name: SEO Smart Links
5
- Version: 3.0
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
@@ -13,7 +13,7 @@ if (!class_exists('SEOLinks')):
13
  class SEOLinks
14
  {
15
  // Name for our options in the DB
16
- var $version = '3.0';
17
  var $name = 'SEO Smart Links';
18
  var $SEOLinks_DB_option = 'SEOLinks';
19
  var $SEOLinks_options;
@@ -36,11 +36,7 @@ if (!class_exists('SEOLinks')):
36
  &$this,
37
  'SEOLinks_the_content_filter'
38
  ), 200);
39
- if ($options['comment'])
40
- add_filter('comment_text', array(
41
- &$this,
42
- 'SEOLinks_the_content_filter'
43
- ), 200);
44
  }
45
 
46
 
@@ -61,17 +57,8 @@ if (!class_exists('SEOLinks')):
61
  remove_filter('comment_text', 'wptexturize');
62
  remove_filter('the_title', 'wptexturize');
63
  }
64
- if ($options['box_custom']) {
65
- add_action('admin_menu', array(
66
- &$this,
67
- 'create_meta_box'
68
- ));
69
 
70
- add_action('save_post', array(
71
- &$this,
72
- 'save_meta_box'
73
- ));
74
- }
75
  }
76
 
77
 
@@ -189,11 +176,7 @@ if (!class_exists('SEOLinks')):
189
  $thisurl = '';
190
 
191
 
192
- if ($options['box_custom']) {
193
- $sml_meta_data = get_post_meta($post->ID, $this->key, true);
194
- if (isset($sml_meta_data['box_process']) && $sml_meta_data['box_process'] == 'on')
195
- return $text;
196
- }
197
 
198
  if (is_feed() && !$options['allowfeed'])
199
  return $text;
@@ -271,14 +254,7 @@ if (!class_exists('SEOLinks')):
271
 
272
  $text = " $text ";
273
 
274
- if ($options['box_custom']) {
275
- if (isset($sml_meta_data['box_custom_keywords']) && $sml_meta_data['box_custom_keywords']) {
276
- if (isset($sml_meta_data['add_instead_override']) && $sml_meta_data['add_instead_override'] == 'on')
277
- $options['customkey'] = $sml_meta_data['box_custom_keywords'] . "\n" . $options['customkey'];
278
- else
279
- $options['customkey'] = $sml_meta_data['box_custom_keywords'];
280
- }
281
- }
282
 
283
 
284
 
@@ -411,13 +387,7 @@ if (!class_exists('SEOLinks')):
411
  if ((($options['lposts'] && $postitem->post_type == 'post') || ($options['lpages'] && $postitem->post_type == 'page')) && (!$maxlinks || ($links < $maxlinks)) && ($postitem->ID != $self_id) && (!in_array(($options['casesens'] ? ($postitem->post_title) : strtolower(($postitem->post_title))), $arrignore))) {
412
  $sml_target_data = '';
413
 
414
- if ($options['box_custom']) {
415
- $sml_target_data = get_post_meta($postitem->ID, $this->key, true);
416
-
417
- if (isset($sml_target_data['box_nolink']) && $sml_target_data['box_nolink'] == 'on') {
418
- continue;
419
- }
420
- }
421
  $name = trim($postitem->post_title);
422
 
423
 
@@ -671,7 +641,7 @@ if (!class_exists('SEOLinks')):
671
  'limit_posts' => 500,
672
  'customkey_form_file' => '',
673
  'append_or_replace' => '',
674
- 'box_custom' => '',
675
  'base_url' => 'go',
676
  'time' => 0,
677
  'visual_kw_edit' => '',
@@ -1193,7 +1163,7 @@ END;
1193
  $options['disable_texturize'] = $_POST['disable_texturize'];
1194
  $options['match_slug'] = $_POST['match_slug'];
1195
  $options['limit_posts'] = (int) $_POST['limit_posts'];
1196
- $options['box_custom'] = $_POST['box_custom'];
1197
 
1198
  $options['base_url'] = $_POST['base_url'];
1199
  $options['min_length'] = (int) $_POST['min_length'];
@@ -1256,7 +1226,7 @@ END;
1256
  $disable_texturize = $options['disable_texturize'] == 'on' ? 'checked' : '';
1257
  $match_slug = $options['match_slug'] == 'on' ? 'checked' : '';
1258
  $limit_posts = $options['limit_posts'];
1259
- $box_custom = $options['box_custom'] == 'on' ? 'checked' : '';
1260
 
1261
  $base_url = $options['base_url'];
1262
  $min_length = $options['min_length'];
@@ -1324,7 +1294,7 @@ END;
1324
 
1325
 
1326
  <h2>Processing options</h2>
1327
- <p>SEO Smart Links can process your posts, pages and comments in search for suitable keywords for creating links. Use the checkboxes below to select what should be processed.</p>
1328
  <input type="checkbox" name="post" $post/><label for="post"> Posts</label>
1329
  <ul>&nbsp;<input type="checkbox" name="postself" $postself/><label for="postself"> Allow post autolinking to itself</label></ul>
1330
  <br />
@@ -1334,9 +1304,7 @@ END;
1334
 
1335
  Process only posts older than: <input type="text" name="skipdays" size="3" value="$skipdays"/> days
1336
  <br />
1337
- <br />
1338
- <input type="checkbox" name="comment" $comment /><label for="comment"> Comments (WARNING: comment links are never cached, be cautious about turning this on for big websites)</label> <br>
1339
-
1340
 
1341
  <h2>Automatic interlinking</h2>
1342
 
@@ -1385,12 +1353,7 @@ END;
1385
  <input type="checkbox" name="utfsupport" $utfsupport /><label for="utfsupprt"> Enable UTF-8 support</label> <br>
1386
  <br>
1387
 
1388
- <h2>Override options per post</h2>
1389
- <p>If the following option is checked, you will have an extra box in the write post screen for overriding default rules. If unchecked, only the global rules will apply..</p>
1390
- <input type="checkbox" name="box_custom" $box_custom /><label for="box_custom"> Enable options in post screen</label> <br>
1391
- &nbsp;&nbsp;&nbsp;
1392
-
1393
-
1394
 
1395
  <h2>Link Template</h2>
1396
  <p>Allows you to custimize the link HTML template.</p><p>It recognizes special replacements: <em>{keyword}</em> (replaced by the matched keyword), <em>{url}</em> (replaced with the target URL) and <em>{description}</em> (replaced by post excerpt, or taxonomy description).</p>
@@ -1650,25 +1613,7 @@ END;
1650
  <?php
1651
  }
1652
 
1653
- function save_meta_box($post_id)
1654
- {
1655
- global $post;
1656
-
1657
-
1658
- foreach ($this->meta_boxes as $meta_box) {
1659
- $data[$meta_box['name']] = $_POST[$meta_box['name']];
1660
- }
1661
-
1662
-
1663
- if (!wp_verify_nonce($_POST['sml_nonce'], plugin_basename(__FILE__)))
1664
- return $post_id;
1665
-
1666
- if (!current_user_can('edit_post', $post_id))
1667
- return $post_id;
1668
-
1669
- update_post_meta($post_id, $this->key, $data);
1670
- }
1671
-
1672
 
1673
 
1674
  }
2
 
3
  /*
4
  Plugin Name: SEO Smart Links
5
+ Version: 3.0.1
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
13
  class SEOLinks
14
  {
15
  // Name for our options in the DB
16
+ var $version = '3.0.1';
17
  var $name = 'SEO Smart Links';
18
  var $SEOLinks_DB_option = 'SEOLinks';
19
  var $SEOLinks_options;
36
  &$this,
37
  'SEOLinks_the_content_filter'
38
  ), 200);
39
+
 
 
 
 
40
  }
41
 
42
 
57
  remove_filter('comment_text', 'wptexturize');
58
  remove_filter('the_title', 'wptexturize');
59
  }
60
+
 
 
 
 
61
 
 
 
 
 
 
62
  }
63
 
64
 
176
  $thisurl = '';
177
 
178
 
179
+
 
 
 
 
180
 
181
  if (is_feed() && !$options['allowfeed'])
182
  return $text;
254
 
255
  $text = " $text ";
256
 
257
+
 
 
 
 
 
 
 
258
 
259
 
260
 
387
  if ((($options['lposts'] && $postitem->post_type == 'post') || ($options['lpages'] && $postitem->post_type == 'page')) && (!$maxlinks || ($links < $maxlinks)) && ($postitem->ID != $self_id) && (!in_array(($options['casesens'] ? ($postitem->post_title) : strtolower(($postitem->post_title))), $arrignore))) {
388
  $sml_target_data = '';
389
 
390
+
 
 
 
 
 
 
391
  $name = trim($postitem->post_title);
392
 
393
 
641
  'limit_posts' => 500,
642
  'customkey_form_file' => '',
643
  'append_or_replace' => '',
644
+
645
  'base_url' => 'go',
646
  'time' => 0,
647
  'visual_kw_edit' => '',
1163
  $options['disable_texturize'] = $_POST['disable_texturize'];
1164
  $options['match_slug'] = $_POST['match_slug'];
1165
  $options['limit_posts'] = (int) $_POST['limit_posts'];
1166
+
1167
 
1168
  $options['base_url'] = $_POST['base_url'];
1169
  $options['min_length'] = (int) $_POST['min_length'];
1226
  $disable_texturize = $options['disable_texturize'] == 'on' ? 'checked' : '';
1227
  $match_slug = $options['match_slug'] == 'on' ? 'checked' : '';
1228
  $limit_posts = $options['limit_posts'];
1229
+
1230
 
1231
  $base_url = $options['base_url'];
1232
  $min_length = $options['min_length'];
1294
 
1295
 
1296
  <h2>Processing options</h2>
1297
+ <p>SEO Smart Links can process your posts and pages in search for suitable keywords for creating links. Use the checkboxes below to select what should be processed.</p>
1298
  <input type="checkbox" name="post" $post/><label for="post"> Posts</label>
1299
  <ul>&nbsp;<input type="checkbox" name="postself" $postself/><label for="postself"> Allow post autolinking to itself</label></ul>
1300
  <br />
1304
 
1305
  Process only posts older than: <input type="text" name="skipdays" size="3" value="$skipdays"/> days
1306
  <br />
1307
+
 
 
1308
 
1309
  <h2>Automatic interlinking</h2>
1310
 
1353
  <input type="checkbox" name="utfsupport" $utfsupport /><label for="utfsupprt"> Enable UTF-8 support</label> <br>
1354
  <br>
1355
 
1356
+
 
 
 
 
 
1357
 
1358
  <h2>Link Template</h2>
1359
  <p>Allows you to custimize the link HTML template.</p><p>It recognizes special replacements: <em>{keyword}</em> (replaced by the matched keyword), <em>{url}</em> (replaced with the target URL) and <em>{description}</em> (replaced by post excerpt, or taxonomy description).</p>
1613
  <?php
1614
  }
1615
 
1616
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1617
 
1618
 
1619
  }