Version Description
Download this release
Release Info
Developer | hallsofmontezuma |
Plugin | All in One SEO Pack |
Version | 1.6.12.1 |
Comparing to | |
See all releases |
Code changes from version 1.6.10.1 to 1.6.12.1
- aioseop.class.php +345 -344
- aioseop_options.php +0 -0
- all_in_one_seo_pack-bg_BG.mo +0 -0
- all_in_one_seo_pack-cs_CZ.mo +0 -0
- all_in_one_seo_pack-tr_TR.mo +0 -0
- all_in_one_seo_pack.php +53 -45
aioseop.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
class All_in_One_SEO_Pack {
|
4 |
|
5 |
-
var $version = "1.6.
|
6 |
|
7 |
/** Max numbers of chars in auto-generated description */
|
8 |
var $maximum_description_length = 160;
|
@@ -267,151 +267,149 @@ 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 |
-
|
274 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
275 |
$description = trim(stripcslashes($this->internationalize($aioseop_options['aiosp_home_description'])));
|
276 |
-
|
277 |
-
|
278 |
-
|
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 |
-
|
287 |
-
|
288 |
-
|
289 |
|
290 |
-
|
291 |
-
|
292 |
|
293 |
-
|
294 |
-
|
295 |
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
|
|
|
|
|
|
328 |
}
|
329 |
-
$meta_string .= sprintf("<meta name=\"keywords\" content=\"%s\" />", $keywords);
|
330 |
-
}
|
331 |
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
$meta_string .= "
|
341 |
}
|
342 |
-
$meta_string .= '<meta name="robots" content="noindex,follow" />';
|
343 |
-
}
|
344 |
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
|
|
|
|
351 |
}
|
352 |
-
echo "\n$page_meta";
|
353 |
-
}
|
354 |
|
355 |
-
|
356 |
-
|
357 |
-
|
|
|
|
|
358 |
}
|
359 |
-
$meta_string .= "$post_meta";
|
360 |
-
}
|
361 |
|
362 |
-
|
363 |
-
|
364 |
-
|
|
|
|
|
365 |
}
|
366 |
-
$meta_string .= "$home_meta";
|
367 |
-
}
|
368 |
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
|
373 |
-
|
374 |
-
|
375 |
if ($url) {
|
376 |
$url = apply_filters('aioseop_canonical_url',$url);
|
377 |
|
378 |
-
|
|
|
379 |
}
|
380 |
-
}
|
381 |
|
382 |
-
|
383 |
-
|
384 |
|
385 |
-
// Thank you, Yoast de Valk, for much of this code.
|
386 |
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
substr($m, 6, 2));
|
407 |
break;
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
/* if ($page && $page > 1) {
|
416 |
$link = trailingslashit($link) . "page/". "$page";
|
417 |
if ($has_ut) {
|
@@ -425,31 +423,29 @@ if (function_exists('load_plugin_textdomain')) {
|
|
425 |
{
|
426 |
$link = trailingslashit($link);
|
427 |
}*/
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
global $cache_userdata;
|
438 |
$userid = get_query_var('author');
|
439 |
-
$link = get_author_link(false, $userid,
|
440 |
-
|
441 |
-
|
442 |
-
|
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 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
get_query_var('monthnum'),
|
454 |
get_query_var('day'));
|
455 |
} elseif ($query->is_month && $haspost) {
|
@@ -668,6 +664,7 @@ if (function_exists('load_plugin_textdomain')) {
|
|
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,8 +674,13 @@ if (function_exists('load_plugin_textdomain')) {
|
|
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 |
-
|
681 |
-
$
|
|
|
|
|
|
|
|
|
|
|
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,6 +736,7 @@ if (function_exists('load_plugin_textdomain')) {
|
|
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,93 +1217,86 @@ if (function_exists('load_plugin_textdomain')) {
|
|
1214 |
|
1215 |
<?php if (substr($this->wp_version, 0, 3) >= '2.5') { ?>
|
1216 |
<div id="postaiosp" class="postbox closed">
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
<?php } else { ?>
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
<?php } ?>
|
1229 |
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
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 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
</div></div></div>
|
1286 |
-
<?php } else { ?>
|
1287 |
-
</div>
|
1288 |
</fieldset>
|
1289 |
-
|
1290 |
-
|
1291 |
|
1292 |
-
|
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'),
|
1304 |
}
|
1305 |
|
1306 |
function management_panel() {
|
@@ -1313,21 +1309,20 @@ if (function_exists('load_plugin_textdomain')) {
|
|
1313 |
}
|
1314 |
?>
|
1315 |
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
|
1323 |
<?php
|
1324 |
|
1325 |
-
|
1326 |
-
|
1327 |
} elseif ($type == "pages") {
|
1328 |
echo("pages");
|
1329 |
}
|
1330 |
-
|
1331 |
}
|
1332 |
|
1333 |
function options_panel() {
|
@@ -1335,97 +1330,98 @@ if (function_exists('load_plugin_textdomain')) {
|
|
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 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
|
|
1380 |
update_option('aioseop_options', $res_aioseop_options);
|
1381 |
-
|
1382 |
}
|
1383 |
-
|
1384 |
-
|
1385 |
|
1386 |
// update options
|
1387 |
-
if
|
1388 |
-
$
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
|
|
|
|
1422 |
|
1423 |
-
|
1424 |
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
|
|
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,16 +1434,16 @@ if (function_exists('load_plugin_textdomain')) {
|
|
1438 |
}
|
1439 |
}*/
|
1440 |
|
|
|
|
|
|
|
1441 |
?>
|
1442 |
-
|
1443 |
-
<div
|
1444 |
-
|
1445 |
-
<
|
1446 |
-
<
|
1447 |
-
|
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 |
<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,39 +1471,29 @@ href="http://twitter.com/michaeltorbert/"><img src="<?php //echo WP_PLUGIN_URL;
|
|
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 |
-
|
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¤cy_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 |
-
|
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¤cy_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8">
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
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 |
-
|
1495 |
-
|
1496 |
-
<
|
1497 |
-
<
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
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,11 +1551,11 @@ $rss_items = $rss->get_items(0, $maxitems);
|
|
1565 |
?>
|
1566 |
|
1567 |
<ul>
|
1568 |
-
|
1569 |
-
|
1570 |
// Loop through each feed item and display each item as a hyperlink.
|
1571 |
-
|
1572 |
-
|
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>
|
@@ -2015,6 +2001,22 @@ echo('</ul>');
|
|
2015 |
</td>
|
2016 |
</tr>
|
2017 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018 |
<tr>
|
2019 |
<th scope="row" style="text-align:right; vertical-align:top;">
|
2020 |
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_use_categories_tip');">
|
@@ -2030,7 +2032,6 @@ _e('Check this if you want your categories for a given post used as the META key
|
|
2030 |
</td>
|
2031 |
</tr>
|
2032 |
|
2033 |
-
|
2034 |
<tr>
|
2035 |
<th scope="row" style="text-align:right; vertical-align:top;">
|
2036 |
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_use_tags_as_keywords_tip');">
|
2 |
|
3 |
class All_in_One_SEO_Pack {
|
4 |
|
5 |
+
var $version = "1.6.12.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 |
+
$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 |
{
|
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 |
}
|
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 |
$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 |
$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 |
|
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 |
}
|
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 |
//$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_enablecpost"=>'0',
|
1370 |
+
"aiosp_page_meta_tags"=>'',
|
1371 |
+
"aiosp_home_meta_tags"=>'',
|
1372 |
+
"aiosp_enabled" =>0,
|
1373 |
+
"aiosp_use_tags_as_keywords" =>1,
|
1374 |
+
"aiosp_do_log"=>null);
|
1375 |
update_option('aioseop_options', $res_aioseop_options);
|
|
|
1376 |
}
|
1377 |
+
|
|
|
1378 |
|
1379 |
// update options
|
1380 |
+
if(isset($_POST['action'])){
|
1381 |
+
if ($_POST['action'] && $_POST['action'] == 'aiosp_update' && $_POST['Submit']!='') {
|
1382 |
+
$nonce = $_POST['nonce-aioseop'];
|
1383 |
+
if (!wp_verify_nonce($nonce, 'aioseop-nonce')) die ( 'Security Check - If you receive this in error, log out and back in to WordPress');
|
1384 |
+
$message = __("All in One SEO Options Updated.", 'all_in_one_seo_pack');
|
1385 |
+
$aioseop_options['aiosp_can'] = $_POST['aiosp_can'];
|
1386 |
+
$aioseop_options['aiosp_donate'] = $_POST['aiosp_donate'];
|
1387 |
+
$aioseop_options['aiosp_home_title'] = esc_attr($_POST['aiosp_home_title']);
|
1388 |
+
$aioseop_options['aiosp_home_description'] = esc_attr($_POST['aiosp_home_description']);
|
1389 |
+
$aioseop_options['aiosp_home_keywords'] = $_POST['aiosp_home_keywords'];
|
1390 |
+
$aioseop_options['aiosp_max_words_excerpt'] = $_POST['aiosp_max_words_excerpt'];
|
1391 |
+
$aioseop_options['aiosp_rewrite_titles'] = $_POST['aiosp_rewrite_titles'];
|
1392 |
+
$aioseop_options['aiosp_post_title_format'] = $_POST['aiosp_post_title_format'];
|
1393 |
+
$aioseop_options['aiosp_page_title_format'] = $_POST['aiosp_page_title_format'];
|
1394 |
+
$aioseop_options['aiosp_category_title_format'] = $_POST['aiosp_category_title_format'];
|
1395 |
+
$aioseop_options['aiosp_archive_title_format'] = $_POST['aiosp_archive_title_format'];
|
1396 |
+
$aioseop_options['aiosp_tag_title_format'] = $_POST['aiosp_tag_title_format'];
|
1397 |
+
$aioseop_options['aiosp_search_title_format'] = $_POST['aiosp_search_title_format'];
|
1398 |
+
$aioseop_options['aiosp_description_format'] = $_POST['aiosp_description_format'];
|
1399 |
+
$aioseop_options['aiosp_404_title_format'] = $_POST['aiosp_404_title_format'];
|
1400 |
+
$aioseop_options['aiosp_paged_format'] = $_POST['aiosp_paged_format'];
|
1401 |
+
$aioseop_options['aiosp_use_categories'] = $_POST['aiosp_use_categories'];
|
1402 |
+
$aioseop_options['aiosp_dynamic_postspage_keywords'] = $_POST['aiosp_dynamic_postspage_keywords'];
|
1403 |
+
$aioseop_options['aiosp_category_noindex'] = $_POST['aiosp_category_noindex'];
|
1404 |
+
$aioseop_options['aiosp_archive_noindex'] = $_POST['aiosp_archive_noindex'];
|
1405 |
+
$aioseop_options['aiosp_tags_noindex'] = $_POST['aiosp_tags_noindex'];
|
1406 |
+
$aioseop_options['aiosp_generate_descriptions'] = $_POST['aiosp_generate_descriptions'];
|
1407 |
+
$aioseop_options['aiosp_cap_cats'] = $_POST['aiosp_cap_cats'];
|
1408 |
+
$aioseop_options['aiosp_enablecpost'] = $_POST['aiosp_enablecpost'];
|
1409 |
+
$aioseop_options['aiosp_debug_info'] = $_POST['aiosp_debug_info'];
|
1410 |
+
$aioseop_options['aiosp_post_meta_tags'] = $_POST['aiosp_post_meta_tags'];
|
1411 |
+
$aioseop_options['aiosp_page_meta_tags'] = $_POST['aiosp_page_meta_tags'];
|
1412 |
+
$aioseop_options['aiosp_home_meta_tags'] = $_POST['aiosp_home_meta_tags'];
|
1413 |
+
$aioseop_options['aiosp_ex_pages'] = $_POST['aiosp_ex_pages'];
|
1414 |
+
$aioseop_options['aiosp_do_log'] = $_POST['aiosp_do_log'];
|
1415 |
+
$aioseop_options['aiosp_enabled'] = $_POST['aiosp_enabled'];
|
1416 |
+
$aioseop_options['aiosp_use_tags_as_keywords'] = $_POST['aiosp_use_tags_as_keywords'];
|
1417 |
|
1418 |
+
update_option('aioseop_options', $aioseop_options);
|
1419 |
|
1420 |
+
if (function_exists('wp_cache_flush')) {
|
1421 |
+
wp_cache_flush();
|
1422 |
+
}
|
1423 |
+
}
|
1424 |
+
} /*elseif ($_POST['aiosp_upgrade']) {
|
1425 |
$message = __("Upgraded to newest version. Please revisit the options page to make sure you see the newest version.", 'all_in_one_seo_pack');
|
1426 |
$success = $this->install_newest_version();
|
1427 |
if (!$success) {
|
1434 |
}
|
1435 |
}*/
|
1436 |
|
1437 |
+
if ($message){
|
1438 |
+
echo "<div id=\"message\" class=\"updated fade\"><p>$message</p></div>";
|
1439 |
+
}
|
1440 |
?>
|
1441 |
+
<div id="dropmessage" class="updated" style="display:none;"></div>
|
1442 |
+
<div class="wrap">
|
1443 |
+
<h2><?php _e('All in One SEO Plugin Options', 'all_in_one_seo_pack'); ?></h2>
|
1444 |
+
by <strong>Michael Torbert</strong> of <strong>Semper Fi Web Design</strong>
|
1445 |
+
<p>
|
1446 |
+
<?php //_e("This is version ", 'all_in_one_seo_pack') ?><?php //_e("$this->version ", 'all_in_one_seo_pack') ?>
|
|
|
|
|
|
|
1447 |
<a target="_blank" title="<?php _e('All in One SEO Plugin Release History', 'all_in_one_seo_pack')?>"
|
1448 |
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')?>
|
1449 |
</a>
|
1471 |
</p>
|
1472 |
|
1473 |
<div style="width:832px;">
|
1474 |
+
<div style="float:left;background-color:white;padding: 10px 10px 10px 10px;margin-right:15px;border: 1px solid #ddd;">
|
1475 |
+
<div style="width:350px;height:130px;">
|
1476 |
+
<h3>Donate</h3>
|
1477 |
+
<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¤cy_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>
|
1478 |
+
</div>
|
1479 |
+
<a target="_blank" title="<?php echo 'Donate' ?>"
|
1480 |
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¤cy_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8">
|
1481 |
+
<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>
|
1482 |
+
<a target="_blank" title="Amazon Wish List" href="https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web">
|
1483 |
+
<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>
|
1484 |
+
<a target="_blank" title="<?php _e('Follow us on Twitter', 'all_in_one_seo_pack') ?>" href="http://twitter.com/michaeltorbert/">
|
1485 |
+
<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>
|
1486 |
+
</div>
|
|
|
|
|
1487 |
|
1488 |
+
<div style="float:left;background-color:white;padding: 10px 10px 10px 10px;border: 1px solid #ddd;">
|
1489 |
+
<div style="width:423px;height:130px;">
|
1490 |
+
<h3>PageLines Themes</h3>
|
1491 |
+
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.
|
1492 |
+
</div>
|
1493 |
+
<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>
|
1494 |
+
<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>
|
1495 |
+
<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>
|
1496 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1497 |
</div>
|
1498 |
<div style="clear:both";></div>
|
1499 |
<!--
|
1551 |
?>
|
1552 |
|
1553 |
<ul>
|
1554 |
+
<?php if ($maxitems == 0) echo '<li>No items.</li>';
|
1555 |
+
else
|
1556 |
// Loop through each feed item and display each item as a hyperlink.
|
1557 |
+
foreach ( $rss_items as $item ) : ?>
|
1558 |
+
<li>
|
1559 |
<a href='<?php echo $item->get_permalink(); ?>'
|
1560 |
title='<?php echo 'Posted '.$item->get_date('j F Y | g:i a'); ?>'>
|
1561 |
<?php echo $item->get_title(); ?></a>
|
2001 |
</td>
|
2002 |
</tr>
|
2003 |
|
2004 |
+
<tr>
|
2005 |
+
<th scope="row" style="text-align:right; vertical-align:top;">
|
2006 |
+
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_enablecpost_tip');">
|
2007 |
+
<?php _e('SEO for Custom Post Types:', 'all_in_one_seo_pack')?>
|
2008 |
+
</td>
|
2009 |
+
<td>
|
2010 |
+
<input type="checkbox" name="aiosp_enablecpost" <?php if ($aioseop_options['aiosp_enablecpost']) echo "checked=\"1\""; ?>/>
|
2011 |
+
<div style="max-width:500px; text-align:left; display:none" id="aiosp_enablecpost_tip">
|
2012 |
+
<?php
|
2013 |
+
_e('Check this if you want your enable AIOSEOP support for Custom Post Types on this site.', 'all_in_one_seo_pack');
|
2014 |
+
?>
|
2015 |
+
</div>
|
2016 |
+
</td>
|
2017 |
+
</tr>
|
2018 |
+
|
2019 |
+
|
2020 |
<tr>
|
2021 |
<th scope="row" style="text-align:right; vertical-align:top;">
|
2022 |
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_use_categories_tip');">
|
2032 |
</td>
|
2033 |
</tr>
|
2034 |
|
|
|
2035 |
<tr>
|
2036 |
<th scope="row" style="text-align:right; vertical-align:top;">
|
2037 |
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'all_in_one_seo_pack')?>" onclick="toggleVisibility('aiosp_use_tags_as_keywords_tip');">
|
aioseop_options.php
ADDED
File without changes
|
all_in_one_seo_pack-bg_BG.mo
CHANGED
Binary file
|
all_in_one_seo_pack-cs_CZ.mo
ADDED
Binary file
|
all_in_one_seo_pack-tr_TR.mo
CHANGED
Binary file
|
all_in_one_seo_pack.php
CHANGED
@@ -1,10 +1,11 @@
|
|
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¤cy_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.
|
8 |
Author: Michael Torbert
|
9 |
Author URI: http://michaeltorbert.com
|
10 |
*/
|
@@ -28,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
28 |
*/
|
29 |
|
30 |
/*******************************************************************************************************/
|
31 |
-
|
32 |
|
33 |
$UTF8_TABLES['strtolower'] = array(
|
34 |
"Z" => "z", "Y" => "y", "X" => "x",
|
@@ -533,8 +534,8 @@ if(!get_option('aioseop_options')){
|
|
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,9 +554,7 @@ $wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '_aioseop_disable' WHERE met
|
|
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 |
-
|
557 |
-
return '1.6.10.1';
|
558 |
-
}
|
559 |
$aioseopcc = 0;
|
560 |
|
561 |
|
@@ -583,12 +582,13 @@ $naioseop_options = array(
|
|
583 |
"aiosp_archive_noindex"=>1,
|
584 |
"aiosp_tags_noindex"=>0,
|
585 |
"aiosp_cap_cats"=>1,
|
586 |
-
"aiosp_generate_descriptions"=>
|
587 |
"aiosp_debug_info"=>null,
|
588 |
"aiosp_post_meta_tags"=>'',
|
589 |
"aiosp_page_meta_tags"=>'',
|
590 |
"aiosp_home_meta_tags"=>'',
|
591 |
"aiosp_enabled" =>0,
|
|
|
592 |
"aiosp_use_tags_as_keywords" =>1,
|
593 |
"aiosp_do_log"=>null);
|
594 |
|
@@ -605,6 +605,7 @@ foreach( $naioseop_options as $aioseop_opt_name => $value ) {
|
|
605 |
delete_option($aioseop_opt_name);
|
606 |
}
|
607 |
}
|
|
|
608 |
add_option('aioseop_options',$naioseop_options);
|
609 |
echo "<div class='updated fade' style='background-color:green;border-color:green;'><p><strong>Updating SEO configuration options in database</strong></p></div";
|
610 |
|
@@ -614,7 +615,7 @@ echo "<div class='updated fade' style='background-color:green;border-color:green
|
|
614 |
function aioseop_activation_notice(){
|
615 |
global $aioseop_options;
|
616 |
if(function_exists('admin_url')){
|
617 |
-
echo '<div class="error fade" style="background-color:red;"><p><strong>All in One SEO Pack must be configured. Go to <a href="' . admin_url( 'options-general.php?page=all-in-one-seo-pack/aioseop.class.php' ) . '">the admin page</a> to enable and configure the plugin.</strong><br />
|
618 |
}else{
|
619 |
echo '<div class="error fade" style="background-color:red;"><p><strong>All in One SEO Pack must be configured. Go to <a href="' . get_option('siteurl') . 'options-general.php?page=all-in-one-seo-pack/aioseop.class.php' . '">the admin page</a> to enable and configure the plugin.</strong></p></div>';
|
620 |
}
|
@@ -626,13 +627,6 @@ if($aioseopcc){
|
|
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 |
-
}
|
635 |
-
|
636 |
function aioseop_activate_pl(){
|
637 |
if(get_option('aioseop_options')){
|
638 |
$aioseop_options = get_option('aioseop_options');
|
@@ -641,6 +635,13 @@ function aioseop_activate_pl(){
|
|
641 |
}
|
642 |
}
|
643 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
644 |
|
645 |
function add_plugin_row($links, $file) {
|
646 |
|
@@ -651,6 +652,7 @@ echo '</td>';
|
|
651 |
}
|
652 |
|
653 |
$aiosp = new All_in_One_SEO_Pack();
|
|
|
654 |
add_action('edit_post', array($aiosp, 'post_meta_tags'));
|
655 |
add_action('publish_post', array($aiosp, 'post_meta_tags'));
|
656 |
add_action('save_post', array($aiosp, 'post_meta_tags'));
|
@@ -658,17 +660,16 @@ add_action('edit_page_form', array($aiosp, 'post_meta_tags'));
|
|
658 |
add_action('init', array($aiosp, 'init'));
|
659 |
add_action('wp_head', array($aiosp, 'wp_head'));
|
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('
|
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',
|
671 |
-
add_submenu_page("__FILE__", 'Tools', 'Tools',
|
672 |
}
|
673 |
|
674 |
function aioseop_mrt_nap_menu(){
|
@@ -684,18 +685,22 @@ function aioseop_mrt_nap_menu2b(){
|
|
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
|
694 |
function aioseop_list_pages($content){
|
695 |
-
|
|
|
|
|
|
|
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;
|
@@ -717,13 +722,22 @@ if (substr($aiosp->wp_version, 0, 3) < '2.5') {
|
|
717 |
add_action('dbx_page_advanced', array($aiosp, 'add_meta_tags_textinput'));
|
718 |
}
|
719 |
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
function aiosp_meta_box_add() {
|
724 |
if ( function_exists('add_meta_box') ) {
|
725 |
-
|
726 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
727 |
} else {
|
728 |
add_action('dbx_post_advanced', array($aiosp, 'add_meta_tags_textinput'));
|
729 |
add_action('dbx_page_advanced', array($aiosp, 'add_meta_tags_textinput'));
|
@@ -731,20 +745,16 @@ function aiosp_meta_box_add() {
|
|
731 |
}
|
732 |
|
733 |
function aiosp_meta() {
|
734 |
-
|
735 |
global $post;
|
736 |
-
|
737 |
$post_id = $post;
|
738 |
-
if (is_object($post_id))
|
739 |
-
$post_id = $post_id->ID;
|
740 |
-
}
|
741 |
$keywords = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_keywords', true)));
|
742 |
-
|
743 |
$description = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_description', true)));
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
?>
|
749 |
<SCRIPT LANGUAGE="JavaScript">
|
750 |
<!-- Begin
|
@@ -765,7 +775,7 @@ function aiosp_meta() {
|
|
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
|
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,8 +814,6 @@ function aiosp_meta() {
|
|
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 |
}
|
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¤cy_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.12.1
|
9 |
Author: Michael Torbert
|
10 |
Author URI: http://michaeltorbert.com
|
11 |
*/
|
29 |
*/
|
30 |
|
31 |
/*******************************************************************************************************/
|
32 |
+
register_activation_hook(__FILE__,'aioseop_activate_pl');
|
33 |
|
34 |
$UTF8_TABLES['strtolower'] = array(
|
35 |
"Z" => "z", "Y" => "y", "X" => "x",
|
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 |
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 |
"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"=>'',
|
589 |
"aiosp_home_meta_tags"=>'',
|
590 |
"aiosp_enabled" =>0,
|
591 |
+
"aiosp_enablecpost" => 0,
|
592 |
"aiosp_use_tags_as_keywords" =>1,
|
593 |
"aiosp_do_log"=>null);
|
594 |
|
605 |
delete_option($aioseop_opt_name);
|
606 |
}
|
607 |
}
|
608 |
+
|
609 |
add_option('aioseop_options',$naioseop_options);
|
610 |
echo "<div class='updated fade' style='background-color:green;border-color:green;'><p><strong>Updating SEO configuration options in database</strong></p></div";
|
611 |
|
615 |
function aioseop_activation_notice(){
|
616 |
global $aioseop_options;
|
617 |
if(function_exists('admin_url')){
|
618 |
+
echo '<div class="error fade" style="background-color:red;"><p><strong>All in One SEO Pack must be configured. Go to <a href="' . admin_url( 'options-general.php?page=all-in-one-seo-pack/aioseop.class.php' ) . '">the admin page</a> to enable and configure the plugin.</strong><br />All in One SEO Pack now supports <em>Custom Post Types</em>.</p></div>';
|
619 |
}else{
|
620 |
echo '<div class="error fade" style="background-color:red;"><p><strong>All in One SEO Pack must be configured. Go to <a href="' . get_option('siteurl') . 'options-general.php?page=all-in-one-seo-pack/aioseop.class.php' . '">the admin page</a> to enable and configure the plugin.</strong></p></div>';
|
621 |
}
|
627 |
}
|
628 |
}
|
629 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
630 |
function aioseop_activate_pl(){
|
631 |
if(get_option('aioseop_options')){
|
632 |
$aioseop_options = get_option('aioseop_options');
|
635 |
}
|
636 |
}
|
637 |
|
638 |
+
if($aioseop_options['aiosp_can'] == '1' || $aioseop_options['aiosp_can'] == 'on'){
|
639 |
+
remove_action( 'wp_head', 'rel_canonical' );
|
640 |
+
}
|
641 |
+
|
642 |
+
function aioseop_get_version(){
|
643 |
+
return '1.6.12.1';
|
644 |
+
}
|
645 |
|
646 |
function add_plugin_row($links, $file) {
|
647 |
|
652 |
}
|
653 |
|
654 |
$aiosp = new All_in_One_SEO_Pack();
|
655 |
+
add_filter('wp_list_pages', 'aioseop_list_pages');
|
656 |
add_action('edit_post', array($aiosp, 'post_meta_tags'));
|
657 |
add_action('publish_post', array($aiosp, 'post_meta_tags'));
|
658 |
add_action('save_post', array($aiosp, 'post_meta_tags'));
|
660 |
add_action('init', array($aiosp, 'init'));
|
661 |
add_action('wp_head', array($aiosp, 'wp_head'));
|
662 |
add_action('template_redirect', array($aiosp, 'template_redirect'));
|
|
|
663 |
add_action('admin_menu', array($aiosp, 'admin_menu'));
|
664 |
+
//add_action('admin_head',array($aiosp, 'seo_mrt_admin_head');
|
665 |
+
add_action('admin_menu', 'aioseop_meta_box_add');
|
666 |
add_action('admin_menu', 'aioseop_mrt_nap');
|
667 |
|
668 |
function aioseop_mrt_nap(){
|
669 |
// add_object_page('All in One SEO Pack','All in One SEO Pack','administrator','aioseop','sometop2');
|
670 |
// 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');
|
671 |
+
add_submenu_page("__FILE__", 'Settings', 'Settings', 'manage_options', '__FILE__', 'aioseop_mrt_nap_menu2a');
|
672 |
+
add_submenu_page("__FILE__", 'Tools', 'Tools', 'manage_options', 'subpageb', 'aioseop_mrt_nap_menu2b');
|
673 |
}
|
674 |
|
675 |
function aioseop_mrt_nap_menu(){
|
685 |
echo "here2";
|
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 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 |
function aioseop_filter_callback($matches) {
|
706 |
global $wpdb;
|
722 |
add_action('dbx_page_advanced', array($aiosp, 'add_meta_tags_textinput'));
|
723 |
}
|
724 |
|
725 |
+
function aioseop_meta_box_add() {
|
|
|
|
|
|
|
726 |
if ( function_exists('add_meta_box') ) {
|
727 |
+
if( function_exists('get_post_types')){
|
728 |
+
$mrt_aioseop_pts=get_post_types('','names');
|
729 |
+
$aioseop_options = get_option('aioseop_options');
|
730 |
+
$aioseop_mrt_cpt = $aioseop_options['aiosp_enablecpost'];
|
731 |
+
foreach ($mrt_aioseop_pts as $mrt_aioseop_pt) {
|
732 |
+
if($mrt_aioseop_pt == 'post' || $mrt_aioseop_pt == 'page' || $aioseop_mrt_cpt){
|
733 |
+
add_meta_box('aiosp',__('All in One SEO Pack', 'all_in_one_seo_pack'),'aiosp_meta',$mrt_aioseop_pt);
|
734 |
+
}
|
735 |
+
}
|
736 |
+
}else{
|
737 |
+
add_meta_box('aiosp',__('All in One SEO Pack', 'all_in_one_seo_pack'),'aiosp_meta','post');
|
738 |
+
add_meta_box('aiosp',__('All in One SEO Pack', 'all_in_one_seo_pack'),'aiosp_meta','page');
|
739 |
+
}
|
740 |
+
|
741 |
} else {
|
742 |
add_action('dbx_post_advanced', array($aiosp, 'add_meta_tags_textinput'));
|
743 |
add_action('dbx_page_advanced', array($aiosp, 'add_meta_tags_textinput'));
|
745 |
}
|
746 |
|
747 |
function aiosp_meta() {
|
|
|
748 |
global $post;
|
|
|
749 |
$post_id = $post;
|
750 |
+
if (is_object($post_id)) $post_id = $post_id->ID;
|
|
|
|
|
751 |
$keywords = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_keywords', true)));
|
752 |
+
$title = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_title', true)));
|
753 |
$description = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_description', true)));
|
754 |
+
$aiosp_meta = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aiosp_meta', true)));
|
755 |
+
$aiosp_disable = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_disable', true)));
|
756 |
+
$aiosp_titleatr = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_titleatr', true)));
|
757 |
+
$aiosp_menulabel = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_menulabel', true)));
|
758 |
?>
|
759 |
<SCRIPT LANGUAGE="JavaScript">
|
760 |
<!-- Begin
|
775 |
<tr>
|
776 |
<th scope="row" style="text-align:right;"><?php _e('Title:', 'all_in_one_seo_pack') ?></th>
|
777 |
<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 />
|
778 |
+
<input readonly type="text" name="lengthT" size="3" maxlength="3" style="text-align:center;" value="<?php echo strlen($title);?>" />
|
779 |
<?php _e(' characters. Most search engines use a maximum of 60 chars for the title.', 'all_in_one_seo_pack') ?>
|
780 |
</td>
|
781 |
</tr>
|
814 |
<input type="checkbox" name="aiosp_disable" <?php if ($aiosp_disable) echo "checked=\"1\""; ?>/>
|
815 |
</td>
|
816 |
</tr>
|
|
|
|
|
817 |
</table>
|
818 |
<?php
|
819 |
}
|