All in One SEO Pack - Version 1.6.10.1

Version Description

Download this release

Release Info

Developer hallsofmontezuma
Plugin Icon 128x128 All in One SEO Pack
Version 1.6.10.1
Comparing to
See all releases

Code changes from version 1.6.11.1 to 1.6.10.1

aioseop.class.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  class All_in_One_SEO_Pack {
4
 
5
- var $version = "1.6.11.1";
6
 
7
  /** Max numbers of chars in auto-generated description */
8
  var $maximum_description_length = 160;
@@ -267,149 +267,151 @@ if (function_exists('load_plugin_textdomain')) {
267
 
268
  // $keywords = $this->get_unique_keywords($keywords);
269
 
270
- } else {
271
  $keywords = $this->get_all_keywords();
272
  }
273
- if (is_single() || is_page() || $this->is_static_posts_page()) {
274
- if ($this->is_static_front_page()) {
275
- $description = trim(stripcslashes($this->internationalize($aioseop_options['aiosp_home_description'])));
276
- } else {
277
- $description = $this->get_post_description($post);
278
- $description = apply_filters('aioseop_description',$description);
279
- }
280
- } else if (is_home()) {
281
  $description = trim(stripcslashes($this->internationalize($aioseop_options['aiosp_home_description'])));
282
- } else if (is_category()) {
283
- $description = $this->internationalize(category_description());
284
- }
 
 
 
 
 
 
285
 
286
- if (isset($description) && (strlen($description) > $this->minimum_description_length) && !(is_home() && is_paged())) {
287
- $description = trim(strip_tags($description));
288
- $description = str_replace('"', '', $description);
289
 
290
- // replace newlines on mac / windows?
291
- $description = str_replace("\r\n", ' ', $description);
292
 
293
- // maybe linux uses this alone
294
- $description = str_replace("\n", ' ', $description);
295
-
296
- if (isset($meta_string)) {
297
- //$meta_string .= "\n";
298
- } else {
299
- $meta_string = '';
300
- }
301
 
302
- // description format
303
- $description_format = $aioseop_options['aiosp_description_format'];
304
- if (!isset($description_format) || empty($description_format)) {
305
- $description_format = "%description%";
306
- }
307
- $description = str_replace('%description%', $description, $description_format);
308
- $description = str_replace('%blog_title%', get_bloginfo('name'), $description);
309
- $description = str_replace('%blog_description%', get_bloginfo('description'), $description);
310
- $description = str_replace('%wp_title%', $this->get_original_title(), $description);
311
- //$description = html_entity_decode($description, ENT_COMPAT, get_bloginfo('charset'));
312
- if($aioseop_options['aiosp_can'] && is_attachment()){
313
- $url = $this->aiosp_mrt_get_url($wp_query);
314
- if ($url) {
315
- preg_match_all('/(\d+)/', $url, $matches);
316
- if (is_array($matches)){
317
- $uniqueDesc = join('',$matches[0]);
318
- }
319
- }
320
- $description .= ' ' . $uniqueDesc;
321
- }
322
- $meta_string .= sprintf("<meta name=\"description\" content=\"%s\" />", $description);
323
  }
324
- $keywords = apply_filters('aioseop_keywords',$keywords);
325
- if (isset ($keywords) && !empty($keywords) && !(is_home() && is_paged())) {
326
- if (isset($meta_string)) {
327
- $meta_string .= "\n";
328
- }
329
- $keywords = str_replace('"','',$keywords);
330
- $meta_string .= sprintf("<meta name=\"keywords\" content=\"%s\" />", $keywords);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
331
  }
 
 
332
 
333
- if (function_exists('is_tag')) {
334
- $is_tag = is_tag();
335
- }
336
 
337
- if ((is_category() && $aioseop_options['aiosp_category_noindex']) || (!is_category() && is_archive() &&!$is_tag && $aioseop_options['aiosp_archive_noindex']) || ($aioseop_options['aiosp_tags_noindex'] && $is_tag)) {
338
- if (isset($meta_string)) {
339
- $meta_string .= "\n";
340
- }
341
- $meta_string .= '<meta name="robots" content="noindex,follow" />';
342
  }
 
 
343
 
344
- $page_meta = stripcslashes($aioseop_options['aiosp_page_meta_tags']);
345
- $post_meta = stripcslashes($aioseop_options['aiosp_post_meta_tags']);
346
- $home_meta = stripcslashes($aioseop_options['aiosp_home_meta_tags']);
347
- if (is_page() && isset($page_meta) && !empty($page_meta) || $this->is_static_posts_page()) {
348
- if (isset($meta_string)) {
349
- $meta_string .= "\n";
350
- }
351
- echo "\n$page_meta";
352
  }
 
 
353
 
354
- if (is_single() && isset($post_meta) && !empty($post_meta)) {
355
- if (isset($meta_string)) {
356
- $meta_string .= "\n";
357
- }
358
- $meta_string .= "$post_meta";
359
  }
 
 
360
 
361
- if (is_home() && !empty($home_meta)) {
362
- if (isset($meta_string)) {
363
- $meta_string .= "\n";
364
- }
365
- $meta_string .= "$home_meta";
366
  }
 
 
367
 
368
- if ($meta_string != null) {
369
- echo "$meta_string\n";
370
- }
371
 
372
- if($aioseop_options['aiosp_can']){
373
- $url = $this->aiosp_mrt_get_url($wp_query);
374
  if ($url) {
375
  $url = apply_filters('aioseop_canonical_url',$url);
376
 
377
- echo "".'<link rel="canonical" href="'.$url.'" />'."\n";
378
- }
379
  }
380
-
381
- echo "<!-- /all in one seo pack -->\n";
382
  }
 
 
 
383
 
384
- // Thank you, Yoast de Valk, for much of this code.
385
 
386
- function aiosp_mrt_get_url($query) {
387
- global $aioseop_options;
388
- if ($query->is_404 || $query->is_search) {
389
- return false;
390
- }
391
- $haspost = count($query->posts) > 0;
392
- $has_ut = function_exists('user_trailingslashit');
393
-
394
- if (get_query_var('m')) {
395
- $m = preg_replace('/[^0-9]/', '', get_query_var('m'));
396
- switch (strlen($m)) {
397
- case 4:
398
- $link = get_year_link($m);
399
- break;
400
- case 6:
401
- $link = get_month_link(substr($m, 0, 4), substr($m, 4, 2));
402
- break;
403
- case 8:
404
- $link = get_day_link(substr($m, 0, 4), substr($m, 4, 2), substr($m, 6, 2));
405
  break;
406
- default:
407
- return false;
408
- }
409
- } elseif (($query->is_single || $query->is_page) && $haspost) {
410
- $post = $query->posts[0];
411
- $link = get_permalink($post->ID);
412
- $link = $this->yoast_get_paged($link);
 
 
 
 
 
 
 
413
  /* if ($page && $page > 1) {
414
  $link = trailingslashit($link) . "page/". "$page";
415
  if ($has_ut) {
@@ -423,29 +425,31 @@ if (function_exists('load_plugin_textdomain')) {
423
  {
424
  $link = trailingslashit($link);
425
  }*/
426
- } elseif ($query->is_author && $haspost) {
427
- global $wp_version;
428
- if ($wp_version >= '2') {
429
- $author = get_userdata(get_query_var('author'));
430
- if ($author === false)
431
- return false;
432
- $link = get_author_link(false, $author->ID, $author->user_nicename);
433
- } else {
434
- global $cache_userdata;
 
435
  $userid = get_query_var('author');
436
- $link = get_author_link(false, $userid, $cache_userdata[$userid]->user_nicename);
437
- }
438
- } elseif ($query->is_category && $haspost) {
439
- $link = get_category_link(get_query_var('cat'));
 
440
  $link = $this->yoast_get_paged($link);
441
  } else if ($query->is_tag && $haspost) {
442
  $tag = get_term_by('slug',get_query_var('tag'),'post_tag');
443
- if (!empty($tag->term_id)) {
444
- $link = get_tag_link($tag->term_id);
445
- }
446
- $link = $this->yoast_get_paged($link);
447
- } elseif ($query->is_day && $haspost) {
448
- $link = get_day_link(get_query_var('year'),
449
  get_query_var('monthnum'),
450
  get_query_var('day'));
451
  } elseif ($query->is_month && $haspost) {
@@ -664,7 +668,6 @@ if (function_exists('load_plugin_textdomain')) {
664
  }
665
  }
666
  $title_format = $aioseop_options['aiosp_post_title_format'];
667
- /*
668
  $new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
669
  $new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
670
  $new_title = str_replace('%post_title%', $title, $new_title);
@@ -674,13 +677,8 @@ if (function_exists('load_plugin_textdomain')) {
674
  $new_title = str_replace('%post_author_nicename%', $authordata->user_nicename, $new_title);
675
  $new_title = str_replace('%post_author_firstname%', ucwords($authordata->first_name), $new_title);
676
  $new_title = str_replace('%post_author_lastname%', ucwords($authordata->last_name), $new_title);
677
- */
678
- $r_title = array('%blog_title%','%blog_description%','%post_title%','%category%','%category_title%','%post_author_login%','%post_author_nicename%','%post_author_firstname%','%post_author_lastname%');
679
- $d_title = array($this->internationalize(get_bloginfo('name')),$this->internationalize(get_bloginfo('description')),$title, $category, $category, $authordata->user_login, $authordata->user_nicename, ucwords($authordata->first_name), ucwords($authordata->last_name));
680
- $title = trim(str_replace($r_title, $d_title, $title_format));
681
-
682
- // $title = $new_title;
683
- // $title = trim($title);
684
  $title = apply_filters('aioseop_title_single',$title);
685
  $header = $this->replace_title($header, $title);
686
  } else if (is_search() && isset($s) && !empty($s)) {
@@ -736,7 +734,6 @@ if (function_exists('load_plugin_textdomain')) {
736
  $new_title = str_replace('%page_author_firstname%', ucwords($authordata->first_name), $new_title);
737
  $new_title = str_replace('%page_author_lastname%', ucwords($authordata->last_name), $new_title);
738
  $title = trim($new_title);
739
- $title = $this->paged_title($title);
740
  $title = apply_filters('aioseop_title_page',$title);
741
  $header = $this->replace_title($header, $title);
742
  }
@@ -1217,86 +1214,93 @@ if (function_exists('load_plugin_textdomain')) {
1217
 
1218
  <?php if (substr($this->wp_version, 0, 3) >= '2.5') { ?>
1219
  <div id="postaiosp" class="postbox closed">
1220
- <h3><?php _e('All in One SEO Pack', 'all_in_one_seo_pack') ?></h3>
1221
- <div class="inside">
1222
- <div id="postaiosp">
1223
  <?php } else { ?>
1224
- <div class="dbx-b-ox-wrapper">
1225
- <fieldset id="seodiv" class="dbx-box">
1226
- <div class="dbx-h-andle-wrapper">
1227
- <h3 class="dbx-handle"><?php _e('All in One SEO Pack', 'all_in_one_seo_pack') ?></h3>
1228
- </div>
1229
- <div class="dbx-c-ontent-wrapper">
1230
- <div class="dbx-content">
1231
  <?php } ?>
1232
 
1233
- <a target="__blank" href="http://semperfiwebdesign.com/portfolio/wordpress/wordpress-plugins/all-in-one-seo-pack/"><?php _e('Click here for Support', 'all_in_one_seo_pack') ?></a>
1234
- <input value="aiosp_edit" type="hidden" name="aiosp_edit" />
1235
- <table style="margin-bottom:40px">
1236
- <tr>
1237
- <th style="text-align:left;" colspan="2">
1238
- </th>
1239
- </tr>
1240
- <tr>
1241
- <th scope="row" style="text-align:right;"><?php _e('Title:', 'all_in_one_seo_pack') ?></th>
1242
- <td><input value="<?php echo $title ?>" type="text" name="aiosp_title" size="62"/></td>
1243
- </tr>
1244
- <tr>
1245
- <th scope="row" style="text-align:right;"><?php _e('Description:', 'all_in_one_seo_pack') ?></th>
1246
- <td><textarea name="aiosp_description" rows="1" cols="60" onKeyDown="countChars(document.post.aiosp_description,document.post.length1)" onKeyUp="countChars(document.post.aiosp_description,document.post.length1)"><?php echo $description ?>
1247
- </textarea><br />
1248
- <input readonly type="text" name="length1" size="3" maxlength="3" value="<?php echo strlen($description);?>" />
1249
- <?php _e(' characters. Most search engines use a maximum of 160 chars for the description.', 'all_in_one_seo_pack') ?>
1250
- </td>
1251
- </tr>
1252
- <tr>
1253
- <th scope="row" style="text-align:right;"><?php _e('Keywords (comma separated):', 'all_in_one_seo_pack') ?></th>
1254
- <td><input value="<?php echo $keywords ?>" type="text" name="aiosp_keywords" size="62"/></td>
1255
- </tr>
1256
- <input type="hidden" name="nonce-aioseop-edit" value="<?php echo wp_create_nonce('edit-aioseop-nonce'); ?>" />
1257
- <?php if ($this->is_admin()) { ?>
1258
- <tr>
1259
- <th scope="row" style="text-align:right; vertical-align:top;">
1260
- <?php _e('Disable on this page/post:', 'all_in_one_seo_pack')?>
1261
- </th>
1262
- <td>
1263
- <input type="checkbox" name="aiosp_disable" <?php if ($aiosp_disable) echo "checked=\"1\""; ?>/>
1264
- </td>
1265
- </tr>
 
 
 
 
 
 
 
 
 
 
 
1266
 
1267
- <tr>
1268
- <th scope="row" style="text-align:right;"><?php _e('Title Attribute:', 'all_in_one_seo_pack') ?></th>
1269
- <td><input value="<?php echo $aiosp_titleatr ?>" type="text" name="aiosp_titleatr" size="62"/></td>
1270
- </tr>
1271
- <tr>
1272
- <th scope="row" style="text-align:right;"><?php _e('Menu Label:', 'all_in_one_seo_pack') ?></th>
1273
- <td><input value="<?php echo $aiosp_menulabel ?>" type="text" name="aiosp_menulabel" size="62"/></td>
1274
- </tr>
1275
- <?php } ?>
1276
- </table>
1277
 
1278
- <?php if (substr($this->wp_version, 0, 3) >= '2.5') { ?>
1279
- </div>
1280
- </div>
1281
- </div>
1282
- <?php } else { ?>
1283
- </div>
 
 
 
 
 
 
1284
  </fieldset>
1285
- </div>
1286
- <?php } ?>
1287
 
1288
- <?php
1289
  }
1290
 
1291
  function admin_menu() {
1292
  $file = __FILE__;
1293
-
1294
  // hack for 1.5
1295
  if (substr($this->wp_version, 0, 3) == '1.5') {
1296
  $file = 'all-in-one-seo-pack/all_in_one_seo_pack.php';
1297
  }
1298
  //add_management_page(__('All in One SEO Title', 'all_in_one_seo_pack'), __('All in One SEO', 'all_in_one_seo_pack'), 10, $file, array($this, 'management_panel'));
1299
- add_submenu_page('options-general.php', __('All in One SEO', 'all_in_one_seo_pack'), __('All in One SEO', 'all_in_one_seo_pack'), 'manage_options', $file, array($this, 'options_panel'));
1300
  }
1301
 
1302
  function management_panel() {
@@ -1309,20 +1313,21 @@ if (function_exists('load_plugin_textdomain')) {
1309
  }
1310
  ?>
1311
 
1312
- <ul class="aiosp_menu">
1313
- <li><a href="<?php echo $base_url ?>&type=posts">Posts</a>
1314
- </li>
1315
- <li><a href="<?php echo $base_url ?>&type=pages">Pages</a>
1316
- </li>
1317
- </ul>
1318
 
1319
  <?php
1320
 
1321
- if ($type == "posts") {
1322
- echo("posts");
1323
  } elseif ($type == "pages") {
1324
  echo("pages");
1325
  }
 
1326
  }
1327
 
1328
  function options_panel() {
@@ -1330,96 +1335,97 @@ if (function_exists('load_plugin_textdomain')) {
1330
  //$message_updated = __("All in One SEO Options Updated.", 'all_in_one_seo_pack');
1331
  global $aioseop_options;
1332
 
1333
- if(!$aioseop_options['aiosp_cap_cats']) {
 
1334
  $aioseop_options['aiosp_cap_cats'] = '1';
1335
  }
1336
-
1337
-
1338
- if (isset($_POST['action']) && $_POST['action'] == 'aiosp_update' && isset($_POST['Submit_Default'])) {
1339
  $nonce = $_POST['nonce-aioseop'];
1340
  if (!wp_verify_nonce($nonce, 'aioseop-nonce')) die ( 'Security Check - If you receive this in error, log out and back in to WordPress');
1341
  $message = __("All in One SEO Options Reset.", 'all_in_one_seo_pack');
1342
  delete_option('aioseop_options');
1343
  $res_aioseop_options = array(
1344
- "aiosp_can"=>1,
1345
- "aiosp_donate"=>0,
1346
- "aiosp_home_title"=>null,
1347
- "aiosp_home_description"=>'',
1348
- "aiosp_home_keywords"=>null,
1349
- "aiosp_max_words_excerpt"=>'something',
1350
- "aiosp_rewrite_titles"=>1,
1351
- "aiosp_post_title_format"=>'%post_title% | %blog_title%',
1352
- "aiosp_page_title_format"=>'%page_title% | %blog_title%',
1353
- "aiosp_category_title_format"=>'%category_title% | %blog_title%',
1354
- "aiosp_archive_title_format"=>'%date% | %blog_title%',
1355
- "aiosp_tag_title_format"=>'%tag% | %blog_title%',
1356
- "aiosp_search_title_format"=>'%search% | %blog_title%',
1357
- "aiosp_description_format"=>'%description%',
1358
- "aiosp_404_title_format"=>'Nothing found for %request_words%',
1359
- "aiosp_paged_format"=>' - Part %page%',
1360
- "aiosp_use_categories"=>0,
1361
- "aiosp_dynamic_postspage_keywords"=>1,
1362
- "aiosp_category_noindex"=>1,
1363
- "aiosp_archive_noindex"=>1,
1364
- "aiosp_tags_noindex"=>0,
1365
- "aiosp_cap_cats"=>1,
1366
- "aiosp_generate_descriptions"=>1,
1367
- "aiosp_debug_info"=>null,
1368
- "aiosp_post_meta_tags"=>'',
1369
- "aiosp_page_meta_tags"=>'',
1370
- "aiosp_home_meta_tags"=>'',
1371
- "aiosp_enabled" =>0,
1372
- "aiosp_use_tags_as_keywords" =>1,
1373
- "aiosp_do_log"=>null);
1374
  update_option('aioseop_options', $res_aioseop_options);
 
1375
  }
1376
-
 
1377
 
1378
  // update options
1379
- if(isset($_POST['action'])){
1380
- if ($_POST['action'] && $_POST['action'] == 'aiosp_update' && $_POST['Submit']!='') {
1381
- $nonce = $_POST['nonce-aioseop'];
1382
- if (!wp_verify_nonce($nonce, 'aioseop-nonce')) die ( 'Security Check - If you receive this in error, log out and back in to WordPress');
1383
- $message = __("All in One SEO Options Updated.", 'all_in_one_seo_pack');
1384
- $aioseop_options['aiosp_can'] = $_POST['aiosp_can'];
1385
- $aioseop_options['aiosp_donate'] = $_POST['aiosp_donate'];
1386
- $aioseop_options['aiosp_home_title'] = $_POST['aiosp_home_title'];
1387
- $aioseop_options['aiosp_home_description'] = $_POST['aiosp_home_description'];
1388
- $aioseop_options['aiosp_home_keywords'] = $_POST['aiosp_home_keywords'];
1389
- $aioseop_options['aiosp_max_words_excerpt'] = $_POST['aiosp_max_words_excerpt'];
1390
- $aioseop_options['aiosp_rewrite_titles'] = $_POST['aiosp_rewrite_titles'];
1391
- $aioseop_options['aiosp_post_title_format'] = $_POST['aiosp_post_title_format'];
1392
- $aioseop_options['aiosp_page_title_format'] = $_POST['aiosp_page_title_format'];
1393
- $aioseop_options['aiosp_category_title_format'] = $_POST['aiosp_category_title_format'];
1394
- $aioseop_options['aiosp_archive_title_format'] = $_POST['aiosp_archive_title_format'];
1395
- $aioseop_options['aiosp_tag_title_format'] = $_POST['aiosp_tag_title_format'];
1396
- $aioseop_options['aiosp_search_title_format'] = $_POST['aiosp_search_title_format'];
1397
- $aioseop_options['aiosp_description_format'] = $_POST['aiosp_description_format'];
1398
- $aioseop_options['aiosp_404_title_format'] = $_POST['aiosp_404_title_format'];
1399
- $aioseop_options['aiosp_paged_format'] = $_POST['aiosp_paged_format'];
1400
- $aioseop_options['aiosp_use_categories'] = $_POST['aiosp_use_categories'];
1401
- $aioseop_options['aiosp_dynamic_postspage_keywords'] = $_POST['aiosp_dynamic_postspage_keywords'];
1402
- $aioseop_options['aiosp_category_noindex'] = $_POST['aiosp_category_noindex'];
1403
- $aioseop_options['aiosp_archive_noindex'] = $_POST['aiosp_archive_noindex'];
1404
- $aioseop_options['aiosp_tags_noindex'] = $_POST['aiosp_tags_noindex'];
1405
- $aioseop_options['aiosp_generate_descriptions'] = $_POST['aiosp_generate_descriptions'];
1406
- $aioseop_options['aiosp_cap_cats'] = $_POST['aiosp_cap_cats'];
1407
- $aioseop_options['aiosp_debug_info'] = $_POST['aiosp_debug_info'];
1408
- $aioseop_options['aiosp_post_meta_tags'] = $_POST['aiosp_post_meta_tags'];
1409
- $aioseop_options['aiosp_page_meta_tags'] = $_POST['aiosp_page_meta_tags'];
1410
- $aioseop_options['aiosp_home_meta_tags'] = $_POST['aiosp_home_meta_tags'];
1411
- $aioseop_options['aiosp_ex_pages'] = $_POST['aiosp_ex_pages'];
1412
- $aioseop_options['aiosp_do_log'] = $_POST['aiosp_do_log'];
1413
- $aioseop_options['aiosp_enabled'] = $_POST['aiosp_enabled'];
1414
- $aioseop_options['aiosp_use_tags_as_keywords'] = $_POST['aiosp_use_tags_as_keywords'];
1415
 
1416
- update_option('aioseop_options', $aioseop_options);
1417
 
1418
- if (function_exists('wp_cache_flush')) {
1419
- wp_cache_flush();
1420
- }
1421
- }
1422
- } /*elseif ($_POST['aiosp_upgrade']) {
1423
  $message = __("Upgraded to newest version. Please revisit the options page to make sure you see the newest version.", 'all_in_one_seo_pack');
1424
  $success = $this->install_newest_version();
1425
  if (!$success) {
@@ -1432,16 +1438,16 @@ if (function_exists('load_plugin_textdomain')) {
1432
  }
1433
  }*/
1434
 
1435
- if ($message){
1436
- echo "<div id=\"message\" class=\"updated fade\"><p>$message</p></div>";
1437
- }
1438
  ?>
1439
- <div id="dropmessage" class="updated" style="display:none;"></div>
1440
- <div class="wrap">
1441
- <h2><?php _e('All in One SEO Plugin Options', 'all_in_one_seo_pack'); ?></h2>
1442
- by <strong>Michael Torbert</strong> of <strong>Semper Fi Web Design</strong>
1443
- <p>
1444
- <?php //_e("This is version ", 'all_in_one_seo_pack') ?><?php //_e("$this->version ", 'all_in_one_seo_pack') ?>
 
 
 
1445
  &nbsp;<a target="_blank" title="<?php _e('All in One SEO Plugin Release History', 'all_in_one_seo_pack')?>"
1446
  href="http://semperfiwebdesign.com/documentation/all-in-one-seo-pack/all-in-one-seo-pack-release-history/"><?php _e("Changelog", 'all_in_one_seo_pack')?>
1447
  </a>
@@ -1469,29 +1475,39 @@ href="http://twitter.com/michaeltorbert/"><img src="<?php //echo WP_PLUGIN_URL;
1469
  </p>
1470
 
1471
  <div style="width:832px;">
1472
- <div style="float:left;background-color:white;padding: 10px 10px 10px 10px;margin-right:15px;border: 1px solid #ddd;">
1473
- <div style="width:350px;height:130px;">
1474
- <h3>Donate</h3>
1475
- <em>If you like this plugin and find it useful, help keep this plugin free and actively developed by clicking the <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support%20Open%20Source&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8" target="_blank"><strong>donate</strong></a> button or send me a gift from my <a href="https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web" target="_blank"><strong>Amazon wishlist</strong></a>. Also, don't forget to follow me on <a href="http://twitter.com/michaeltorbert/" target="_blank"><strong>Twitter</strong></a>.</em>
1476
- </div>
1477
- <a target="_blank" title="<?php echo 'Donate' ?>"
1478
  href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support%20Open%20Source&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8">
1479
- <img src="<?php echo WP_PLUGIN_URL; ?>/all-in-one-seo-pack/images/donate.jpg" alt="<?php _e('Donate with Paypal', 'all_in_one_seo_pack') ?>" /> </a>
1480
- <a target="_blank" title="Amazon Wish List" href="https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web">
1481
- <img src="<?php echo WP_PLUGIN_URL; ?>/all-in-one-seo-pack/images/amazon.jpg" alt="<?php _e('My Amazon Wish List', 'all_in_one_seo_pack') ?>" /> </a>
1482
- <a target="_blank" title="<?php _e('Follow us on Twitter', 'all_in_one_seo_pack') ?>" href="http://twitter.com/michaeltorbert/">
1483
- <img src="<?php echo WP_PLUGIN_URL; ?>/all-in-one-seo-pack/images/twitter.jpg" alt="<?php _e('Follow Us on Twitter', 'all_in_one_seo_pack') ?>" /> </a>
1484
- </div>
 
1485
 
1486
- <div style="float:left;background-color:white;padding: 10px 10px 10px 10px;border: 1px solid #ddd;">
1487
- <div style="width:423px;height:130px;">
1488
- <h3>PageLines Themes</h3>
1489
- We would also like to recommend <a href="http://www.pagelines.com/wpthemes/" target="_blank">PageLines</a> for Professional WordPress Themes. They are attractive, affordable, performance optimized CMS themes that integrate perfectly with All in One SEO Pack to put your professional website at the top of the rankings.
1490
- </div>
1491
- <a target="_blank" title="iBlogPro" href="http://www.pagelines.com/wpthemes/"><img src="<?php echo WP_PLUGIN_URL; ?>/all-in-one-seo-pack/images/iblogpro.jpg" alt="<?php _e('iBlogPro theme', 'all_in_one_seo_pack') ?>" /></a>
1492
- <a target="_blank" title="PageLines Themes" href="http://www.pagelines.com/wpthemes/"><img src="<?php echo WP_PLUGIN_URL; ?>/all-in-one-seo-pack/images/pagelines.jpg" alt="<?php _e('Pagelines Themes', 'all_in_one_seo_pack') ?>" /></a>
1493
- <a target="_blank" title="WhiteHouse" href="http://www.pagelines.com/wpthemes/"><img src="<?php echo WP_PLUGIN_URL; ?>/all-in-one-seo-pack/images/whitehouse.jpg" alt="<?php _e('WhiteHouse theme', 'all_in_one_seo_pack') ?>" /></a>
1494
- </div>
 
 
 
 
 
 
 
 
 
1495
  </div>
1496
  <div style="clear:both";></div>
1497
  <!--
@@ -1549,11 +1565,11 @@ $rss_items = $rss->get_items(0, $maxitems);
1549
  ?>
1550
 
1551
  <ul>
1552
- <?php if ($maxitems == 0) echo '<li>No items.</li>';
1553
- else
1554
  // Loop through each feed item and display each item as a hyperlink.
1555
- foreach ( $rss_items as $item ) : ?>
1556
- <li>
1557
  <a href='<?php echo $item->get_permalink(); ?>'
1558
  title='<?php echo 'Posted '.$item->get_date('j F Y | g:i a'); ?>'>
1559
  <?php echo $item->get_title(); ?></a>
2
 
3
  class All_in_One_SEO_Pack {
4
 
5
+ var $version = "1.6.10.1";
6
 
7
  /** Max numbers of chars in auto-generated description */
8
  var $maximum_description_length = 160;
267
 
268
  // $keywords = $this->get_unique_keywords($keywords);
269
 
270
+ }else {
271
  $keywords = $this->get_all_keywords();
272
  }
273
+ if (is_single() || is_page() || $this->is_static_posts_page()) {
274
+ if ($this->is_static_front_page()) {
 
 
 
 
 
 
275
  $description = trim(stripcslashes($this->internationalize($aioseop_options['aiosp_home_description'])));
276
+ } else {
277
+ $description = $this->get_post_description($post);
278
+ $description = apply_filters('aioseop_description',$description);
279
+ }
280
+ } else if (is_home()) {
281
+ $description = trim(stripcslashes($this->internationalize($aioseop_options['aiosp_home_description'])));
282
+ } else if (is_category()) {
283
+ $description = $this->internationalize(category_description());
284
+ }
285
 
286
+ if (isset($description) && (strlen($description) > $this->minimum_description_length) && !(is_home() && is_paged())) {
287
+ $description = trim(strip_tags($description));
288
+ $description = str_replace('"', '', $description);
289
 
290
+ // replace newlines on mac / windows?
291
+ $description = str_replace("\r\n", ' ', $description);
292
 
293
+ // maybe linux uses this alone
294
+ $description = str_replace("\n", ' ', $description);
 
 
 
 
 
 
295
 
296
+ if (isset($meta_string)) {
297
+ //$meta_string .= "\n";
298
+ } else {
299
+ $meta_string = '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
300
  }
301
+
302
+ // description format
303
+ $description_format = $aioseop_options['aiosp_description_format'];
304
+ if (!isset($description_format) || empty($description_format)) {
305
+ $description_format = "%description%";
306
+ }
307
+ $description = str_replace('%description%', $description, $description_format);
308
+ $description = str_replace('%blog_title%', get_bloginfo('name'), $description);
309
+ $description = str_replace('%blog_description%', get_bloginfo('description'), $description);
310
+ $description = str_replace('%wp_title%', $this->get_original_title(), $description);
311
+ //$description = html_entity_decode($description, ENT_COMPAT, get_bloginfo('charset'));
312
+ if($aioseop_options['aiosp_can'] && is_attachment()){
313
+ $url = $this->aiosp_mrt_get_url($wp_query);
314
+ if ($url) {
315
+ preg_match_all('/(\d+)/', $url, $matches);
316
+ if (is_array($matches)){
317
+ $uniqueDesc = join('',$matches[0]);
318
+ }
319
+ }
320
+ $description .= ' ' . $uniqueDesc;
321
+ }
322
+ $meta_string .= sprintf("<meta name=\"description\" content=\"%s\" />", $description);
323
+ }
324
+ $keywords = apply_filters('aioseop_keywords',$keywords);
325
+ if (isset ($keywords) && !empty($keywords) && !(is_home() && is_paged())) {
326
+ if (isset($meta_string)) {
327
+ $meta_string .= "\n";
328
  }
329
+ $meta_string .= sprintf("<meta name=\"keywords\" content=\"%s\" />", $keywords);
330
+ }
331
 
332
+ if (function_exists('is_tag')) {
333
+ $is_tag = is_tag();
334
+ }
335
 
336
+ if ((is_category() && $aioseop_options['aiosp_category_noindex']) ||
337
+ (!is_category() && is_archive() &&!$is_tag && $aioseop_options['aiosp_archive_noindex']) ||
338
+ ($aioseop_options['aiosp_tags_noindex'] && $is_tag)) {
339
+ if (isset($meta_string)) {
340
+ $meta_string .= "\n";
341
  }
342
+ $meta_string .= '<meta name="robots" content="noindex,follow" />';
343
+ }
344
 
345
+ $page_meta = stripcslashes($aioseop_options['aiosp_page_meta_tags']);
346
+ $post_meta = stripcslashes($aioseop_options['aiosp_post_meta_tags']);
347
+ $home_meta = stripcslashes($aioseop_options['aiosp_home_meta_tags']);
348
+ if (is_page() && isset($page_meta) && !empty($page_meta) || $this->is_static_posts_page()) {
349
+ if (isset($meta_string)) {
350
+ $meta_string .= "\n";
 
 
351
  }
352
+ echo "\n$page_meta";
353
+ }
354
 
355
+ if (is_single() && isset($post_meta) && !empty($post_meta)) {
356
+ if (isset($meta_string)) {
357
+ $meta_string .= "\n";
 
 
358
  }
359
+ $meta_string .= "$post_meta";
360
+ }
361
 
362
+ if (is_home() && !empty($home_meta)) {
363
+ if (isset($meta_string)) {
364
+ $meta_string .= "\n";
 
 
365
  }
366
+ $meta_string .= "$home_meta";
367
+ }
368
 
369
+ if ($meta_string != null) {
370
+ echo "$meta_string\n";
371
+ }
372
 
373
+ if($aioseop_options['aiosp_can']){
374
+ $url = $this->aiosp_mrt_get_url($wp_query);
375
  if ($url) {
376
  $url = apply_filters('aioseop_canonical_url',$url);
377
 
378
+ echo "".'<link rel="canonical" href="'.$url.'" />'."\n";
 
379
  }
 
 
380
  }
381
+
382
+ echo "<!-- /all in one seo pack -->\n";
383
+ }
384
 
385
+ // Thank you, Yoast de Valk, for much of this code.
386
 
387
+ function aiosp_mrt_get_url($query) {
388
+ global $aioseop_options;
389
+ if ($query->is_404 || $query->is_search) {
390
+ return false;
391
+ }
392
+ $haspost = count($query->posts) > 0;
393
+ $has_ut = function_exists('user_trailingslashit');
394
+
395
+ if (get_query_var('m')) {
396
+ $m = preg_replace('/[^0-9]/', '', get_query_var('m'));
397
+ switch (strlen($m)) {
398
+ case 4:
399
+ $link = get_year_link($m);
 
 
 
 
 
 
400
  break;
401
+ case 6:
402
+ $link = get_month_link(substr($m, 0, 4), substr($m, 4, 2));
403
+ break;
404
+ case 8:
405
+ $link = get_day_link(substr($m, 0, 4), substr($m, 4, 2),
406
+ substr($m, 6, 2));
407
+ break;
408
+ default:
409
+ return false;
410
+ }
411
+ } elseif (($query->is_single || $query->is_page) && $haspost) {
412
+ $post = $query->posts[0];
413
+ $link = get_permalink($post->ID);
414
+ $link = $this->yoast_get_paged($link);
415
  /* if ($page && $page > 1) {
416
  $link = trailingslashit($link) . "page/". "$page";
417
  if ($has_ut) {
425
  {
426
  $link = trailingslashit($link);
427
  }*/
428
+ } elseif ($query->is_author && $haspost) {
429
+ global $wp_version;
430
+ if ($wp_version >= '2') {
431
+ $author = get_userdata(get_query_var('author'));
432
+ if ($author === false)
433
+ return false;
434
+ $link = get_author_link(false, $author->ID,
435
+ $author->user_nicename);
436
+ } else {
437
+ global $cache_userdata;
438
  $userid = get_query_var('author');
439
+ $link = get_author_link(false, $userid,
440
+ $cache_userdata[$userid]->user_nicename);
441
+ }
442
+ } elseif ($query->is_category && $haspost) {
443
+ $link = get_category_link(get_query_var('cat'));
444
  $link = $this->yoast_get_paged($link);
445
  } else if ($query->is_tag && $haspost) {
446
  $tag = get_term_by('slug',get_query_var('tag'),'post_tag');
447
+ if (!empty($tag->term_id)) {
448
+ $link = get_tag_link($tag->term_id);
449
+ }
450
+ $link = $this->yoast_get_paged($link);
451
+ } elseif ($query->is_day && $haspost) {
452
+ $link = get_day_link(get_query_var('year'),
453
  get_query_var('monthnum'),
454
  get_query_var('day'));
455
  } elseif ($query->is_month && $haspost) {
668
  }
669
  }
670
  $title_format = $aioseop_options['aiosp_post_title_format'];
 
671
  $new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
672
  $new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
673
  $new_title = str_replace('%post_title%', $title, $new_title);
677
  $new_title = str_replace('%post_author_nicename%', $authordata->user_nicename, $new_title);
678
  $new_title = str_replace('%post_author_firstname%', ucwords($authordata->first_name), $new_title);
679
  $new_title = str_replace('%post_author_lastname%', ucwords($authordata->last_name), $new_title);
680
+ $title = $new_title;
681
+ $title = trim($title);
 
 
 
 
 
682
  $title = apply_filters('aioseop_title_single',$title);
683
  $header = $this->replace_title($header, $title);
684
  } else if (is_search() && isset($s) && !empty($s)) {
734
  $new_title = str_replace('%page_author_firstname%', ucwords($authordata->first_name), $new_title);
735
  $new_title = str_replace('%page_author_lastname%', ucwords($authordata->last_name), $new_title);
736
  $title = trim($new_title);
 
737
  $title = apply_filters('aioseop_title_page',$title);
738
  $header = $this->replace_title($header, $title);
739
  }
1214
 
1215
  <?php if (substr($this->wp_version, 0, 3) >= '2.5') { ?>
1216
  <div id="postaiosp" class="postbox closed">
1217
+ <h3><?php _e('All in One SEO Pack', 'all_in_one_seo_pack') ?></h3>
1218
+ <div class="inside">
1219
+ <div id="postaiosp">
1220
  <?php } else { ?>
1221
+ <div class="dbx-b-ox-wrapper">
1222
+ <fieldset id="seodiv" class="dbx-box">
1223
+ <div class="dbx-h-andle-wrapper">
1224
+ <h3 class="dbx-handle"><?php _e('All in One SEO Pack', 'all_in_one_seo_pack') ?></h3>
1225
+ </div>
1226
+ <div class="dbx-c-ontent-wrapper">
1227
+ <div class="dbx-content">
1228
  <?php } ?>
1229
 
1230
+ <a target="__blank" href="http://semperfiwebdesign.com/portfolio/wordpress/wordpress-plugins/all-in-one-seo-pack/"><?php _e('Click here for Support', 'all_in_one_seo_pack') ?></a>
1231
+ <input value="aiosp_edit" type="hidden" name="aiosp_edit" />
1232
+ <table style="margin-bottom:40px">
1233
+ <tr>
1234
+ <th style="text-align:left;" colspan="2">
1235
+ </th>
1236
+ </tr>
1237
+ <tr>
1238
+ <th scope="row" style="text-align:right;"><?php _e('Title:', 'all_in_one_seo_pack') ?></th>
1239
+ <td><input value="<?php echo $title ?>" type="text" name="aiosp_title" size="62"/></td>
1240
+ </tr>
1241
+ <tr>
1242
+ <th scope="row" style="text-align:right;"><?php _e('Description:', 'all_in_one_seo_pack') ?></th>
1243
+ <td><textarea name="aiosp_description" rows="1" cols="60"
1244
+ onKeyDown="countChars(document.post.aiosp_description,document.post.length1)"
1245
+ onKeyUp="countChars(document.post.aiosp_description,document.post.length1)"><?php echo $description ?></textarea><br />
1246
+ <input readonly type="text" name="length1" size="3" maxlength="3" value="<?php echo strlen($description);?>" />
1247
+ <?php _e(' characters. Most search engines use a maximum of 160 chars for the description.', 'all_in_one_seo_pack') ?>
1248
+ </td>
1249
+ </tr>
1250
+ <tr>
1251
+ <th scope="row" style="text-align:right;"><?php _e('Keywords (comma separated):', 'all_in_one_seo_pack') ?></th>
1252
+ <td><input value="<?php echo $keywords ?>" type="text" name="aiosp_keywords" size="62"/></td>
1253
+ </tr>
1254
+ <input type="hidden" name="nonce-aioseop-edit" value="<?php echo wp_create_nonce('edit-aioseop-nonce'); ?>" />
1255
+ <?php if ($this->is_admin()) { ?>
1256
+ <tr>
1257
+ <th scope="row" style="text-align:right; vertical-align:top;">
1258
+ <?php _e('Disable on this page/post:', 'all_in_one_seo_pack')?>
1259
+ </th>
1260
+ <td>
1261
+ <input type="checkbox" name="aiosp_disable" <?php if ($aiosp_disable) echo "checked=\"1\""; ?>/>
1262
+ </td>
1263
+ </tr>
1264
+
1265
+ <tr>
1266
+ <th scope="row" style="text-align:right;"><?php _e('Title Attribute:', 'all_in_one_seo_pack') ?></th>
1267
+ <td><input value="<?php echo $aiosp_titleatr ?>" type="text" name="aiosp_titleatr" size="62"/></td>
1268
+ </tr>
1269
+
1270
+ <tr>
1271
+ <th scope="row" style="text-align:right;"><?php _e('Menu Label:', 'all_in_one_seo_pack') ?></th>
1272
+ <td><input value="<?php echo $aiosp_menulabel ?>" type="text" name="aiosp_menulabel" size="62"/></td>
1273
+ </tr>
1274
 
 
 
 
 
 
 
 
 
 
 
1275
 
1276
+
1277
+
1278
+
1279
+
1280
+ <?php } ?>
1281
+
1282
+ </table>
1283
+
1284
+ <?php if (substr($this->wp_version, 0, 3) >= '2.5') { ?>
1285
+ </div></div></div>
1286
+ <?php } else { ?>
1287
+ </div>
1288
  </fieldset>
1289
+ </div>
1290
+ <?php } ?>
1291
 
1292
+ <?php
1293
  }
1294
 
1295
  function admin_menu() {
1296
  $file = __FILE__;
1297
+
1298
  // hack for 1.5
1299
  if (substr($this->wp_version, 0, 3) == '1.5') {
1300
  $file = 'all-in-one-seo-pack/all_in_one_seo_pack.php';
1301
  }
1302
  //add_management_page(__('All in One SEO Title', 'all_in_one_seo_pack'), __('All in One SEO', 'all_in_one_seo_pack'), 10, $file, array($this, 'management_panel'));
1303
+ add_submenu_page('options-general.php', __('All in One SEO', 'all_in_one_seo_pack'), __('All in One SEO', 'all_in_one_seo_pack'), 10, $file, array($this, 'options_panel'));
1304
  }
1305
 
1306
  function management_panel() {
1313
  }
1314
  ?>
1315
 
1316
+ <ul class="aiosp_menu">
1317
+ <li><a href="<?php echo $base_url ?>&type=posts">Posts</a>
1318
+ </li>
1319
+ <li><a href="<?php echo $base_url ?>&type=pages">Pages</a>
1320
+ </li>
1321
+ </ul>
1322
 
1323
  <?php
1324
 
1325
+ if ($type == "posts") {
1326
+ echo("posts");
1327
  } elseif ($type == "pages") {
1328
  echo("pages");
1329
  }
1330
+
1331
  }
1332
 
1333
  function options_panel() {
1335
  //$message_updated = __("All in One SEO Options Updated.", 'all_in_one_seo_pack');
1336
  global $aioseop_options;
1337
 
1338
+
1339
+ if(!$aioseop_options['aiosp_cap_cats']){
1340
  $aioseop_options['aiosp_cap_cats'] = '1';
1341
  }
1342
+
1343
+
1344
+ if ($_POST['action'] && $_POST['action'] == 'aiosp_update' && $_POST['Submit_Default']!='') {
1345
  $nonce = $_POST['nonce-aioseop'];
1346
  if (!wp_verify_nonce($nonce, 'aioseop-nonce')) die ( 'Security Check - If you receive this in error, log out and back in to WordPress');
1347
  $message = __("All in One SEO Options Reset.", 'all_in_one_seo_pack');
1348
  delete_option('aioseop_options');
1349
  $res_aioseop_options = array(
1350
+ "aiosp_can"=>1,
1351
+ "aiosp_donate"=>0,
1352
+ "aiosp_home_title"=>null,
1353
+ "aiosp_home_description"=>'',
1354
+ "aiosp_home_keywords"=>null,
1355
+ "aiosp_max_words_excerpt"=>'something',
1356
+ "aiosp_rewrite_titles"=>1,
1357
+ "aiosp_post_title_format"=>'%post_title% | %blog_title%',
1358
+ "aiosp_page_title_format"=>'%page_title% | %blog_title%',
1359
+ "aiosp_category_title_format"=>'%category_title% | %blog_title%',
1360
+ "aiosp_archive_title_format"=>'%date% | %blog_title%',
1361
+ "aiosp_tag_title_format"=>'%tag% | %blog_title%',
1362
+ "aiosp_search_title_format"=>'%search% | %blog_title%',
1363
+ "aiosp_description_format"=>'%description%',
1364
+ "aiosp_404_title_format"=>'Nothing found for %request_words%',
1365
+ "aiosp_paged_format"=>' - Part %page%',
1366
+ "aiosp_use_categories"=>0,
1367
+ "aiosp_dynamic_postspage_keywords"=>1,
1368
+ "aiosp_category_noindex"=>1,
1369
+ "aiosp_archive_noindex"=>1,
1370
+ "aiosp_tags_noindex"=>0,
1371
+ "aiosp_cap_cats"=>1,
1372
+ "aiosp_generate_descriptions"=>1,
1373
+ "aiosp_debug_info"=>null,
1374
+ "aiosp_post_meta_tags"=>'',
1375
+ "aiosp_page_meta_tags"=>'',
1376
+ "aiosp_home_meta_tags"=>'',
1377
+ "aiosp_enabled" =>0,
1378
+ "aiosp_use_tags_as_keywords" =>1,
1379
+ "aiosp_do_log"=>null);
1380
  update_option('aioseop_options', $res_aioseop_options);
1381
+
1382
  }
1383
+
1384
+
1385
 
1386
  // update options
1387
+ if ($_POST['action'] && $_POST['action'] == 'aiosp_update' && $_POST['Submit']!='') {
1388
+ $nonce = $_POST['nonce-aioseop'];
1389
+ if (!wp_verify_nonce($nonce, 'aioseop-nonce')) die ( 'Security Check - If you receive this in error, log out and back in to WordPress');
1390
+ $message = __("All in One SEO Options Updated.", 'all_in_one_seo_pack');
1391
+ $aioseop_options['aiosp_can'] = $_POST['aiosp_can'];
1392
+ $aioseop_options['aiosp_donate'] = $_POST['aiosp_donate'];
1393
+ $aioseop_options['aiosp_home_title'] = $_POST['aiosp_home_title'];
1394
+ $aioseop_options['aiosp_home_description'] = $_POST['aiosp_home_description'];
1395
+ $aioseop_options['aiosp_home_keywords'] = $_POST['aiosp_home_keywords'];
1396
+ $aioseop_options['aiosp_max_words_excerpt'] = $_POST['aiosp_max_words_excerpt'];
1397
+ $aioseop_options['aiosp_rewrite_titles'] = $_POST['aiosp_rewrite_titles'];
1398
+ $aioseop_options['aiosp_post_title_format'] = $_POST['aiosp_post_title_format'];
1399
+ $aioseop_options['aiosp_page_title_format'] = $_POST['aiosp_page_title_format'];
1400
+ $aioseop_options['aiosp_category_title_format'] = $_POST['aiosp_category_title_format'];
1401
+ $aioseop_options['aiosp_archive_title_format'] = $_POST['aiosp_archive_title_format'];
1402
+ $aioseop_options['aiosp_tag_title_format'] = $_POST['aiosp_tag_title_format'];
1403
+ $aioseop_options['aiosp_search_title_format'] = $_POST['aiosp_search_title_format'];
1404
+ $aioseop_options['aiosp_description_format'] = $_POST['aiosp_description_format'];
1405
+ $aioseop_options['aiosp_404_title_format'] = $_POST['aiosp_404_title_format'];
1406
+ $aioseop_options['aiosp_paged_format'] = $_POST['aiosp_paged_format'];
1407
+ $aioseop_options['aiosp_use_categories'] = $_POST['aiosp_use_categories'];
1408
+ $aioseop_options['aiosp_dynamic_postspage_keywords'] = $_POST['aiosp_dynamic_postspage_keywords'];
1409
+ $aioseop_options['aiosp_category_noindex'] = $_POST['aiosp_category_noindex'];
1410
+ $aioseop_options['aiosp_archive_noindex'] = $_POST['aiosp_archive_noindex'];
1411
+ $aioseop_options['aiosp_tags_noindex'] = $_POST['aiosp_tags_noindex'];
1412
+ $aioseop_options['aiosp_generate_descriptions'] = $_POST['aiosp_generate_descriptions'];
1413
+ $aioseop_options['aiosp_cap_cats'] = $_POST['aiosp_cap_cats'];
1414
+ $aioseop_options['aiosp_debug_info'] = $_POST['aiosp_debug_info'];
1415
+ $aioseop_options['aiosp_post_meta_tags'] = $_POST['aiosp_post_meta_tags'];
1416
+ $aioseop_options['aiosp_page_meta_tags'] = $_POST['aiosp_page_meta_tags'];
1417
+ $aioseop_options['aiosp_home_meta_tags'] = $_POST['aiosp_home_meta_tags'];
1418
+ $aioseop_options['aiosp_ex_pages'] = $_POST['aiosp_ex_pages'];
1419
+ $aioseop_options['aiosp_do_log'] = $_POST['aiosp_do_log'];
1420
+ $aioseop_options['aiosp_enabled'] = $_POST['aiosp_enabled'];
1421
+ $aioseop_options['aiosp_use_tags_as_keywords'] = $_POST['aiosp_use_tags_as_keywords'];
 
1422
 
1423
+ update_option('aioseop_options', $aioseop_options);
1424
 
1425
+ if (function_exists('wp_cache_flush')) {
1426
+ wp_cache_flush();
1427
+ }
1428
+ } /*elseif ($_POST['aiosp_upgrade']) {
 
1429
  $message = __("Upgraded to newest version. Please revisit the options page to make sure you see the newest version.", 'all_in_one_seo_pack');
1430
  $success = $this->install_newest_version();
1431
  if (!$success) {
1438
  }
1439
  }*/
1440
 
 
 
 
1441
  ?>
1442
+ <?php if ($message) : ?>
1443
+ <div id="message" class="updated fade"><p><?php echo $message; ?></p></div>
1444
+ <?php endif; ?>
1445
+ <div id="dropmessage" class="updated" style="display:none;"></div>
1446
+ <div class="wrap">
1447
+ <h2><?php _e('All in One SEO Plugin Options', 'all_in_one_seo_pack'); ?></h2>
1448
+ by <strong>Michael Torbert</strong> of <strong>Semper Fi Web Design</strong>
1449
+ <p>
1450
+ <?php //_e("This is version ", 'all_in_one_seo_pack') ?><?php //_e("$this->version ", 'all_in_one_seo_pack') ?>
1451
  &nbsp;<a target="_blank" title="<?php _e('All in One SEO Plugin Release History', 'all_in_one_seo_pack')?>"
1452
  href="http://semperfiwebdesign.com/documentation/all-in-one-seo-pack/all-in-one-seo-pack-release-history/"><?php _e("Changelog", 'all_in_one_seo_pack')?>
1453
  </a>
1475
  </p>
1476
 
1477
  <div style="width:832px;">
1478
+ <div style="float:left;background-color:white;padding: 10px 10px 10px 10px;margin-right:15px;border: 1px solid #ddd;">
1479
+ <div style="width:350px;height:130px;">
1480
+ <h3>Donate</h3>
1481
+ <em>If you like this plugin and find it useful, help keep this plugin free and actively developed by clicking the <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support%20Open%20Source&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8" target="_blank"><strong>donate</strong></a> button or send me a gift from my <a href="https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web" target="_blank"><strong>Amazon wishlist</strong></a>. Also, don't forget to follow me on <a href="http://twitter.com/michaeltorbert/" target="_blank"><strong>Twitter</strong></a>.</em>
1482
+ </div>
1483
+ <a target="_blank" title="<?php echo 'Donate' ?>"
1484
  href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support%20Open%20Source&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8">
1485
+ <img src="<?php echo WP_PLUGIN_URL; ?>/all-in-one-seo-pack/images/donate.jpg" alt="<?php _e('Donate with Paypal', 'all_in_one_seo_pack') ?>" /> </a>
1486
+
1487
+ <a target="_blank" title="Amazon Wish List" href="https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web">
1488
+ <img src="<?php echo WP_PLUGIN_URL; ?>/all-in-one-seo-pack/images/amazon.jpg" alt="<?php _e('My Amazon Wish List', 'all_in_one_seo_pack') ?>" /> </a>
1489
+
1490
+ <a target="_blank" title="<?php _e('Follow us on Twitter', 'all_in_one_seo_pack') ?>" href="http://twitter.com/michaeltorbert/">
1491
+ <img src="<?php echo WP_PLUGIN_URL; ?>/all-in-one-seo-pack/images/twitter.jpg" alt="<?php _e('Follow Us on Twitter', 'all_in_one_seo_pack') ?>" /> </a>
1492
 
1493
+
1494
+ </div>
1495
+
1496
+ <div style="float:left;background-color:white;padding: 10px 10px 10px 10px;border: 1px solid #ddd;">
1497
+ <div style="width:423px;height:130px;">
1498
+ <h3>PageLines Themes</h3>
1499
+ We would also like to recommend <a href="http://www.pagelines.com/wpthemes/" target="_blank">PageLines</a> for Professional WordPress Themes. They are attractive, affordable, performance optimized CMS themes that integrate perfectly with All in One SEO Pack to put your professional website at the top of the rankings.
1500
+ </div>
1501
+ <a target="_blank" title="iBlogPro" href="http://www.pagelines.com/wpthemes/">
1502
+ <img src="<?php echo WP_PLUGIN_URL; ?>/all-in-one-seo-pack/images/iblogpro.jpg" alt="<?php _e('iBlogPro theme', 'all_in_one_seo_pack') ?>" /> </a>
1503
+
1504
+ <a target="_blank" title="PageLines Themes" href="http://www.pagelines.com/wpthemes/">
1505
+ <img src="<?php echo WP_PLUGIN_URL; ?>/all-in-one-seo-pack/images/pagelines.jpg" alt="<?php _e('Pagelines Themes', 'all_in_one_seo_pack') ?>" /> </a>
1506
+
1507
+ <a target="_blank" title="WhiteHouse" href="http://www.pagelines.com/wpthemes/">
1508
+ <img src="<?php echo WP_PLUGIN_URL; ?>/all-in-one-seo-pack/images/whitehouse.jpg" alt="<?php _e('WhiteHouse theme', 'all_in_one_seo_pack') ?>" /> </a>
1509
+
1510
+ </div>
1511
  </div>
1512
  <div style="clear:both";></div>
1513
  <!--
1565
  ?>
1566
 
1567
  <ul>
1568
+ <?php if ($maxitems == 0) echo '<li>No items.</li>';
1569
+ else
1570
  // Loop through each feed item and display each item as a hyperlink.
1571
+ foreach ( $rss_items as $item ) : ?>
1572
+ <li>
1573
  <a href='<?php echo $item->get_permalink(); ?>'
1574
  title='<?php echo 'Posted '.$item->get_date('j F Y | g:i a'); ?>'>
1575
  <?php echo $item->get_title(); ?></a>
aioseop_options.php DELETED
File without changes
all_in_one_seo_pack-bg_BG.mo CHANGED
Binary file
all_in_one_seo_pack-cs_CZ.mo DELETED
Binary file
all_in_one_seo_pack-tr_TR.mo CHANGED
Binary file
all_in_one_seo_pack.php CHANGED
@@ -1,11 +1,10 @@
1
  <?php
2
 
3
-
4
  /*
5
  Plugin Name: All in One SEO Pack
6
  Plugin URI: http://semperfiwebdesign.com
7
  Description: Out-of-the-box SEO for your Wordpress blog. <a href="options-general.php?page=all-in-one-seo-pack/aioseop.class.php">Options configuration panel</a> | <a href="http://wpplugins.com/plugin/50/all-in-one-seo-pack-pro-version">Upgrade to Pro Version</a> | <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support%20Open%20Source&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8">Donate</a> | <a href="http://semperfiwebdesign.com/forum/" >Support</a> | <a href="https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web" target="_blank" title="Amazon Wish List">Amazon Wishlist</a>
8
- Version: 1.6.11.1
9
  Author: Michael Torbert
10
  Author URI: http://michaeltorbert.com
11
  */
@@ -534,8 +533,8 @@ if(!get_option('aioseop_options')){
534
  }
535
  */
536
 
537
- if(isset($_POST['aioseop_migrate'])) aioseop_mrt_fix_meta();
538
- if(isset($_POST['aioseop_migrate_options'])) aioseop_mrt_mkarry();
539
  if(!get_option('aiosp_post_title_format') && !get_option('aioseop_options')) aioseop_mrt_mkarry();
540
 
541
  //}end _post('turn_on')
@@ -554,7 +553,9 @@ $wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '_aioseop_disable' WHERE met
554
  echo "<div class='updated fade' style='background-color:green;border-color:green;'><p><strong>Updating SEO post meta in database.</strong></p></div";
555
  }
556
 
557
-
 
 
558
  $aioseopcc = 0;
559
 
560
 
@@ -582,7 +583,7 @@ $naioseop_options = array(
582
  "aiosp_archive_noindex"=>1,
583
  "aiosp_tags_noindex"=>0,
584
  "aiosp_cap_cats"=>1,
585
- "aiosp_generate_descriptions"=>0,
586
  "aiosp_debug_info"=>null,
587
  "aiosp_post_meta_tags"=>'',
588
  "aiosp_page_meta_tags"=>'',
@@ -625,8 +626,9 @@ if($aioseopcc){
625
  }
626
  }
627
 
628
- add_filter('wp_list_pages', 'aioseop_list_pages');
629
 
 
630
  if($aioseop_options['aiosp_can'] == '1' || $aioseop_options['aiosp_can'] == 'on'){
631
  remove_action( 'wp_head', 'rel_canonical' );
632
  }
@@ -639,9 +641,6 @@ function aioseop_activate_pl(){
639
  }
640
  }
641
 
642
- function aioseop_get_version(){
643
- return '1.6.11.1';
644
- }
645
 
646
  function add_plugin_row($links, $file) {
647
 
@@ -661,14 +660,15 @@ add_action('wp_head', array($aiosp, 'wp_head'));
661
  add_action('template_redirect', array($aiosp, 'template_redirect'));
662
  //add_action('admin_head',array($aiosp, 'seo_mrt_admin_head');
663
  add_action('admin_menu', array($aiosp, 'admin_menu'));
664
- add_action('admin_menu', 'aioseop_meta_box_add');
 
665
  add_action('admin_menu', 'aioseop_mrt_nap');
666
 
667
  function aioseop_mrt_nap(){
668
  // add_object_page('All in One SEO Pack','All in One SEO Pack','administrator','aioseop','sometop2');
669
  // add_object_page('All in One SEO Pack', 'SEO', 8, "__FILE__", 'aioseop_mrt_nap_menu2a','http://65.190.51.165/aioseo/wp-content/plugins/all-in-one-seo-pack/images/globe.png');
670
- add_submenu_page("__FILE__", 'Settings', 'Settings', 'manage_options', '__FILE__', 'aioseop_mrt_nap_menu2a');
671
- add_submenu_page("__FILE__", 'Tools', 'Tools', 'manage_options', 'subpageb', 'aioseop_mrt_nap_menu2b');
672
  }
673
 
674
  function aioseop_mrt_nap_menu(){
@@ -684,26 +684,18 @@ function aioseop_mrt_nap_menu2b(){
684
  echo "here2";
685
  }
686
 
687
- if(isset($_POST['aiosp_enabled'])){
688
- if( ($_POST['aiosp_enabled'] == null && $aioseop_options['aiosp_enabled']!='1') || $_POST['aiosp_enabled']=='0'){
689
- add_action( 'admin_notices', 'aioseop_activation_notice');
690
- }
691
- }
692
 
693
- // The following two functions are GPLed from Sarah G's Page Menu Editor, http://wordpress.org/extend/plugins/page-menu-editor/.
 
 
 
 
 
694
  function aioseop_list_pages($content){
695
- $matches = array();
696
- if (preg_match_all('/<li class="page_item page-item-(\d+)/i', $content, $matches)) {
697
- update_postmeta_cache(array_values($matches[1]));
698
- unset($matches);
699
  $pattern = '/<li class="page_item page-item-(\d+)([^\"]*)"><a href=\"([^\"]+)" title="([^\"]+)">([^<]+)<\/a>/i';
700
  return preg_replace_callback($pattern, "aioseop_filter_callback", $content);
701
  }
702
- return $content;
703
- }
704
-
705
-
706
-
707
 
708
  function aioseop_filter_callback($matches) {
709
  global $wpdb;
@@ -728,7 +720,7 @@ if (substr($aiosp->wp_version, 0, 3) < '2.5') {
728
 
729
 
730
 
731
- function aioseop_meta_box_add() {
732
  if ( function_exists('add_meta_box') ) {
733
  add_meta_box('aiosp',__('All in One SEO Pack', 'all_in_one_seo_pack'),'aiosp_meta','post');
734
  add_meta_box('aiosp',__('All in One SEO Pack', 'all_in_one_seo_pack'),'aiosp_meta','page');
@@ -773,7 +765,7 @@ function aiosp_meta() {
773
  <tr>
774
  <th scope="row" style="text-align:right;"><?php _e('Title:', 'all_in_one_seo_pack') ?></th>
775
  <td><input value="<?php echo $title ?>" type="text" name="aiosp_title" size="62" onKeyDown="countChars(document.post.aiosp_title,document.post.lengthT)" onKeyUp="countChars(document.post.aiosp_title,document.post.lengthT)"/><br />
776
- <input readonly type="text" name="lengthT" size="3" maxlength="3" style="text-align:center;" value="<?php echo strlen($title);?>" />
777
  <?php _e(' characters. Most search engines use a maximum of 60 chars for the title.', 'all_in_one_seo_pack') ?>
778
  </td>
779
  </tr>
@@ -812,6 +804,8 @@ function aiosp_meta() {
812
  <input type="checkbox" name="aiosp_disable" <?php if ($aiosp_disable) echo "checked=\"1\""; ?>/>
813
  </td>
814
  </tr>
 
 
815
  </table>
816
  <?php
817
  }
1
  <?php
2
 
 
3
  /*
4
  Plugin Name: All in One SEO Pack
5
  Plugin URI: http://semperfiwebdesign.com
6
  Description: Out-of-the-box SEO for your Wordpress blog. <a href="options-general.php?page=all-in-one-seo-pack/aioseop.class.php">Options configuration panel</a> | <a href="http://wpplugins.com/plugin/50/all-in-one-seo-pack-pro-version">Upgrade to Pro Version</a> | <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support%20Open%20Source&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8">Donate</a> | <a href="http://semperfiwebdesign.com/forum/" >Support</a> | <a href="https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web" target="_blank" title="Amazon Wish List">Amazon Wishlist</a>
7
+ Version: 1.6.10.1
8
  Author: Michael Torbert
9
  Author URI: http://michaeltorbert.com
10
  */
533
  }
534
  */
535
 
536
+ if($_POST['aioseop_migrate']) aioseop_mrt_fix_meta();
537
+ if($_POST['aioseop_migrate_options']) aioseop_mrt_mkarry();
538
  if(!get_option('aiosp_post_title_format') && !get_option('aioseop_options')) aioseop_mrt_mkarry();
539
 
540
  //}end _post('turn_on')
553
  echo "<div class='updated fade' style='background-color:green;border-color:green;'><p><strong>Updating SEO post meta in database.</strong></p></div";
554
  }
555
 
556
+ function aioseop_get_version(){
557
+ return '1.6.10.1';
558
+ }
559
  $aioseopcc = 0;
560
 
561
 
583
  "aiosp_archive_noindex"=>1,
584
  "aiosp_tags_noindex"=>0,
585
  "aiosp_cap_cats"=>1,
586
+ "aiosp_generate_descriptions"=>1,
587
  "aiosp_debug_info"=>null,
588
  "aiosp_post_meta_tags"=>'',
589
  "aiosp_page_meta_tags"=>'',
626
  }
627
  }
628
 
629
+ add_action('wp_list_pages', 'aioseop_list_pages');
630
 
631
+ //remove_action( 'wp_head', 'rel_canonical' );
632
  if($aioseop_options['aiosp_can'] == '1' || $aioseop_options['aiosp_can'] == 'on'){
633
  remove_action( 'wp_head', 'rel_canonical' );
634
  }
641
  }
642
  }
643
 
 
 
 
644
 
645
  function add_plugin_row($links, $file) {
646
 
660
  add_action('template_redirect', array($aiosp, 'template_redirect'));
661
  //add_action('admin_head',array($aiosp, 'seo_mrt_admin_head');
662
  add_action('admin_menu', array($aiosp, 'admin_menu'));
663
+ add_action('admin_menu', 'aiosp_meta_box_add');
664
+
665
  add_action('admin_menu', 'aioseop_mrt_nap');
666
 
667
  function aioseop_mrt_nap(){
668
  // add_object_page('All in One SEO Pack','All in One SEO Pack','administrator','aioseop','sometop2');
669
  // add_object_page('All in One SEO Pack', 'SEO', 8, "__FILE__", 'aioseop_mrt_nap_menu2a','http://65.190.51.165/aioseo/wp-content/plugins/all-in-one-seo-pack/images/globe.png');
670
+ add_submenu_page("__FILE__", 'Settings', 'Settings', 8, '__FILE__', 'aioseop_mrt_nap_menu2a');
671
+ add_submenu_page("__FILE__", 'Tools', 'Tools', 8, 'subpageb', 'aioseop_mrt_nap_menu2b');
672
  }
673
 
674
  function aioseop_mrt_nap_menu(){
684
  echo "here2";
685
  }
686
 
 
 
 
 
 
687
 
688
+ if( ($_POST['aiosp_enabled'] == null && $aioseop_options['aiosp_enabled']!='1') || $_POST['aiosp_enabled']=='0'){
689
+ add_action( 'admin_notices', 'aioseop_activation_notice');
690
+ }
691
+
692
+
693
+ // The following two functions copied entirely and modified slightly from Sarah G's Page Menu Editor, http://wordpress.org/extend/plugins/page-menu-editor/
694
  function aioseop_list_pages($content){
695
+ $url = preg_replace(array('/\//', '/\./', '/\-/'), array('\/', '\.', '\-'), get_option('siteurl'));
 
 
 
696
  $pattern = '/<li class="page_item page-item-(\d+)([^\"]*)"><a href=\"([^\"]+)" title="([^\"]+)">([^<]+)<\/a>/i';
697
  return preg_replace_callback($pattern, "aioseop_filter_callback", $content);
698
  }
 
 
 
 
 
699
 
700
  function aioseop_filter_callback($matches) {
701
  global $wpdb;
720
 
721
 
722
 
723
+ function aiosp_meta_box_add() {
724
  if ( function_exists('add_meta_box') ) {
725
  add_meta_box('aiosp',__('All in One SEO Pack', 'all_in_one_seo_pack'),'aiosp_meta','post');
726
  add_meta_box('aiosp',__('All in One SEO Pack', 'all_in_one_seo_pack'),'aiosp_meta','page');
765
  <tr>
766
  <th scope="row" style="text-align:right;"><?php _e('Title:', 'all_in_one_seo_pack') ?></th>
767
  <td><input value="<?php echo $title ?>" type="text" name="aiosp_title" size="62" onKeyDown="countChars(document.post.aiosp_title,document.post.lengthT)" onKeyUp="countChars(document.post.aiosp_title,document.post.lengthT)"/><br />
768
+ <input readonly type="text" name="lengthT" size="3 maxlength="3 style="text-align:center;" value="<?php echo strlen($title);?>" />
769
  <?php _e(' characters. Most search engines use a maximum of 60 chars for the title.', 'all_in_one_seo_pack') ?>
770
  </td>
771
  </tr>
804
  <input type="checkbox" name="aiosp_disable" <?php if ($aiosp_disable) echo "checked=\"1\""; ?>/>
805
  </td>
806
  </tr>
807
+
808
+
809
  </table>
810
  <?php
811
  }
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: hallsofmontezuma
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support%20Open%20Source&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8
4
  Tags: post,google,seo,meta,meta keywords,meta description,title,posts,plugin, search engine optimization
5
- Requires at least: 1.5
6
  Tested up to: 3.0
7
  Stable tag: trunk
8
 
@@ -21,6 +21,8 @@ Automatically optimizes your Wordpress blog for Search Engines (Search Engine Op
21
 
22
  Some features:
23
 
 
 
24
  * Advanced Canonical URLs
25
  * Fine tune Page Navigational Links
26
  * Built-in API so other plugins/themes can access and extend functionality
2
  Contributors: hallsofmontezuma
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support%20Open%20Source&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8
4
  Tags: post,google,seo,meta,meta keywords,meta description,title,posts,plugin, search engine optimization
5
+ Requires at least: 2.8
6
  Tested up to: 3.0
7
  Stable tag: trunk
8
 
21
 
22
  Some features:
23
 
24
+
25
+ * Support for Custom Post Types
26
  * Advanced Canonical URLs
27
  * Fine tune Page Navigational Links
28
  * Built-in API so other plugins/themes can access and extend functionality