Version Description
Download this release
Release Info
Developer | hallsofmontezuma |
Plugin | All in One SEO Pack |
Version | 2.3.3 |
Comparing to | |
See all releases |
Code changes from version 2.3.2.1 to 2.3.3
- admin/aioseop_module_class.php +1 -2
- admin/display/general-metaboxes.php +119 -0
- admin/meta_import.php +578 -0
- aioseop_class.php +47 -221
- all_in_one_seo_pack.php +106 -41
- css/aiosp_admin.css +72 -0
- i18n/all-in-one-seo-pack-af.mo +0 -0
- i18n/all-in-one-seo-pack-ary.mo +0 -0
- i18n/all-in-one-seo-pack-bg_BG.mo +0 -0
- i18n/all-in-one-seo-pack-ca.mo +0 -0
- i18n/all-in-one-seo-pack-da_DK.mo +0 -0
- i18n/all-in-one-seo-pack-de_DE.mo +0 -0
- i18n/all-in-one-seo-pack-el.mo +0 -0
- i18n/all-in-one-seo-pack-en_AU.mo +0 -0
- i18n/all-in-one-seo-pack-en_CA.mo +0 -0
- i18n/all-in-one-seo-pack-en_GB.mo +0 -0
- i18n/all-in-one-seo-pack-en_NZ.mo +0 -0
- i18n/all-in-one-seo-pack-es_ES.mo +0 -0
- i18n/all-in-one-seo-pack-et.mo +0 -0
- i18n/all-in-one-seo-pack-fi.mo +0 -0
- i18n/all-in-one-seo-pack-fr_FR.mo +0 -0
- i18n/all-in-one-seo-pack-hi_IN.mo +0 -0
- i18n/all-in-one-seo-pack-hr.mo +0 -0
- i18n/all-in-one-seo-pack-hy +0 -0
- i18n/all-in-one-seo-pack-id_ID.mo +0 -0
- i18n/all-in-one-seo-pack-it_IT.mo +0 -0
- i18n/all-in-one-seo-pack-ja.mo +0 -0
- i18n/all-in-one-seo-pack-ko_KR.mo +0 -0
- i18n/all-in-one-seo-pack-nb_NO.mo +0 -0
- i18n/all-in-one-seo-pack-nl_NL.mo +0 -0
- i18n/all-in-one-seo-pack-nn_NO.mo +0 -0
- i18n/all-in-one-seo-pack-pl_PL.mo +0 -0
- i18n/all-in-one-seo-pack-pt_BR.mo +0 -0
- i18n/all-in-one-seo-pack-pt_PT.mo +0 -0
- i18n/all-in-one-seo-pack-ro_RO.mo +0 -0
- i18n/all-in-one-seo-pack-ru_RU.mo +0 -0
- i18n/all-in-one-seo-pack-sl_SL.mo +0 -0
- i18n/all-in-one-seo-pack-sr_RS.mo +0 -0
- i18n/all-in-one-seo-pack-sv_SE.mo +0 -0
- i18n/all-in-one-seo-pack-tr_TR.mo +0 -0
- i18n/all-in-one-seo-pack-ur.mo +0 -0
- i18n/all-in-one-seo-pack-vi.mo +0 -0
- i18n/all-in-one-seo-pack-zh_CH.mo +0 -0
- inc/aioseop_functions.php +7 -1
- inc/aioseop_updates_class.php +128 -0
- inc/aiosp_common.php +57 -0
- js/quickedit_functions.js +11 -0
- modules/aioseop_robots.php +2 -2
- readme.txt +1 -1
admin/aioseop_module_class.php
CHANGED
@@ -399,7 +399,6 @@ if ( !class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
|
|
399 |
"Crescent",
|
400 |
"discobot",
|
401 |
"DittoSpyder",
|
402 |
-
"DOC",
|
403 |
"DotBot",
|
404 |
"Download Ninja",
|
405 |
"EasouSpider",
|
@@ -1811,7 +1810,7 @@ if ( !class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
|
|
1811 |
'nonce-aioseop' => Array( 'type' => 'hidden', 'value' => wp_create_nonce('aioseop-nonce') ),
|
1812 |
'page_options' => Array( 'type' => 'hidden', 'value' => 'aiosp_home_description' ),
|
1813 |
'Submit' => Array( 'type' => 'submit', 'class' => 'button-primary', 'value' => __('Update Options', 'all-in-one-seo-pack') . ' »' ),
|
1814 |
-
'Submit_Default'=> Array( 'type' => 'submit', 'class' => 'button-
|
1815 |
);
|
1816 |
$submit_options = apply_filters( "{$this->prefix}submit_options", $submit_options, $location );
|
1817 |
foreach ( $submit_options as $k => $s ) {
|
399 |
"Crescent",
|
400 |
"discobot",
|
401 |
"DittoSpyder",
|
|
|
402 |
"DotBot",
|
403 |
"Download Ninja",
|
404 |
"EasouSpider",
|
1810 |
'nonce-aioseop' => Array( 'type' => 'hidden', 'value' => wp_create_nonce('aioseop-nonce') ),
|
1811 |
'page_options' => Array( 'type' => 'hidden', 'value' => 'aiosp_home_description' ),
|
1812 |
'Submit' => Array( 'type' => 'submit', 'class' => 'button-primary', 'value' => __('Update Options', 'all-in-one-seo-pack') . ' »' ),
|
1813 |
+
'Submit_Default'=> Array( 'type' => 'submit', 'class' => 'button-secondary', 'value' => __( sprintf( 'Reset %s Settings to Defaults', $name ), 'all-in-one-seo-pack') . ' »' )
|
1814 |
);
|
1815 |
$submit_options = apply_filters( "{$this->prefix}submit_options", $submit_options, $location );
|
1816 |
foreach ( $submit_options as $k => $s ) {
|
admin/display/general-metaboxes.php
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @package All-in-One-SEO-Pack
|
5 |
+
*/
|
6 |
+
|
7 |
+
class aiosp_metaboxes {
|
8 |
+
|
9 |
+
function __construct() {
|
10 |
+
//construct
|
11 |
+
|
12 |
+
}
|
13 |
+
|
14 |
+
|
15 |
+
|
16 |
+
|
17 |
+
|
18 |
+
|
19 |
+
|
20 |
+
static function display_extra_metaboxes( $add, $meta ) {
|
21 |
+
echo "<div class='aioseop_metabox_wrapper' >";
|
22 |
+
switch ( $meta['id'] ) {
|
23 |
+
case "aioseop-about":
|
24 |
+
?><div class="aioseop_metabox_text">
|
25 |
+
<p><h2 style="display:inline;"><?php echo AIOSEOP_PLUGIN_NAME; ?></h2><?php sprintf( __( "by %s of %s.", 'all-in-one-seo-pack' ), 'Michael Torbert', '<a target="_blank" title="Semper Fi Web Design"
|
26 |
+
href="http://semperfiwebdesign.com/">Semper Fi Web Design</a>' ); ?>.</p>
|
27 |
+
<?php
|
28 |
+
global $current_user;
|
29 |
+
$user_id = $current_user->ID;
|
30 |
+
$ignore = get_user_meta( $user_id, 'aioseop_ignore_notice' );
|
31 |
+
if ( !empty( $ignore ) ) {
|
32 |
+
$qa = Array();
|
33 |
+
wp_parse_str( $_SERVER["QUERY_STRING"], $qa );
|
34 |
+
$qa['aioseop_reset_notices'] = 1;
|
35 |
+
$url = '?' . build_query( $qa );
|
36 |
+
echo '<p><a href="' . $url . '">' . __( "Reset Dismissed Notices", 'all-in-one-seo-pack' ) . '</a></p>';
|
37 |
+
}
|
38 |
+
if ( !AIOSEOPPRO ) {
|
39 |
+
?>
|
40 |
+
<p>
|
41 |
+
<strong><?php echo aiosp_common::get_upgrade_hyperlink( 'side', __('Pro Version', 'all-in-one-seo-pack'), __('UPGRADE TO PRO VERSION', 'all-in-one-seo-pack'), '_blank' ); ?></strong></p>
|
42 |
+
<?php } ?>
|
43 |
+
</div>
|
44 |
+
<?php
|
45 |
+
case "aioseop-donate":
|
46 |
+
?>
|
47 |
+
<div>
|
48 |
+
|
49 |
+
<?php if ( !AIOSEOPPRO ) { ?>
|
50 |
+
<div class="aioseop_metabox_text">
|
51 |
+
<p>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"
|
52 |
+
target="_blank"><strong>donate</strong></a> button or send me a gift from my <a
|
53 |
+
href="https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web" target="_blank">
|
54 |
+
<strong>Amazon wishlist</strong></a>. Also, don't forget to follow me on <a
|
55 |
+
href="http://twitter.com/michaeltorbert/" target="_blank"><strong>Twitter</strong></a>.
|
56 |
+
</p>
|
57 |
+
</div>
|
58 |
+
<?php } ?>
|
59 |
+
|
60 |
+
<div class="aioseop_metabox_feature">
|
61 |
+
|
62 |
+
<?php if ( !AIOSEOPPRO ) { ?>
|
63 |
+
<a target="_blank" title="<?php _e( 'Donate', 'all-in-one-seo-pack' ); ?>"
|
64 |
+
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">
|
65 |
+
<img src="<?php echo AIOSEOP_PLUGIN_URL; ?>images/donate.jpg" alt="<?php _e('Donate with Paypal', 'all-in-one-seo-pack' ); ?>" /> </a>
|
66 |
+
<a target="_blank" title="Amazon Wish List" href="https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web">
|
67 |
+
<img src="<?php echo AIOSEOP_PLUGIN_URL; ?>images/amazon.jpg" alt="<?php _e('My Amazon Wish List', 'all-in-one-seo-pack' ); ?>" /> </a>
|
68 |
+
<?php } ?>
|
69 |
+
|
70 |
+
<a target="_blank" title="<?php _e( 'Follow us on Facebook', 'all-in-one-seo-pack' ); ?>" href="http://www.facebook.com/pages/Semper-Fi-Web-Design/121878784498475"><span class="aioseop_follow_button aioseop_facebook_follow"></span></a>
|
71 |
+
<a target="_blank" title="<?php _e( 'Follow us on Twitter', 'all-in-one-seo-pack' ); ?>" href="http://twitter.com/semperfidev/"><span class="aioseop_follow_button aioseop_twitter_follow"></span></a>
|
72 |
+
</div><?php if(get_locale() != 'en_US'){ ?>
|
73 |
+
<div><strong>
|
74 |
+
<a target="_blank" title="translate" href="https://translate.wordpress.org/projects/wp-plugins/all-in-one-seo-pack">
|
75 |
+
<?php _e( 'We need your help translating All in One SEO Pack into your language! Click Here to help make the translation complete and fix any errors.' , 'all-in-one-seo-pack' ); ?>
|
76 |
+
</a></strong>
|
77 |
+
</div>
|
78 |
+
<?php } ?>
|
79 |
+
</div>
|
80 |
+
<?php
|
81 |
+
break;
|
82 |
+
case "aioseop-list":
|
83 |
+
?>
|
84 |
+
<div class="aioseop_metabox_text">
|
85 |
+
<form action="http://semperfiwebdesign.us1.list-manage.com/subscribe/post?u=794674d3d54fdd912f961ef14&id=af0a96d3d9"
|
86 |
+
method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">
|
87 |
+
<h2><?php _e( 'Join our mailing list for tips, tricks, and WordPress secrets.', 'all-in-one-seo-pack' ); ?></h2>
|
88 |
+
<p><i><?php _e( 'Sign up today and receive a free copy of the e-book 5 SEO Tips for WordPress ($39 value).', 'all-in-one-seo-pack' ); ?></i></p>
|
89 |
+
<p><input type="text" value="" name="EMAIL" class="required email" id="mce-EMAIL" placeholder="Email Address">
|
90 |
+
<input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="btn"></p>
|
91 |
+
</form>
|
92 |
+
</div>
|
93 |
+
<?php
|
94 |
+
break;
|
95 |
+
case "aioseop-support":
|
96 |
+
?><div class="aioseop_metabox_text">
|
97 |
+
<p><div class="aioseop_icon aioseop_file_icon"></div><a target="_blank" href="http://semperplugins.com/documentation/"><?php _e( 'Read the All in One SEO Pack user guide', 'all-in-one-seo-pack' ); ?></a></p>
|
98 |
+
<p><div class="aioseop_icon aioseop_support_icon"></div><a target="_blank" title="<?php _e( 'All in One SEO Pro Plugin Support Forum', 'all-in-one-seo-pack' ); ?>"
|
99 |
+
href="http://semperplugins.com/support/"><?php _e( 'Access our Premium Support Forums', 'all-in-one-seo-pack' ); ?></a></p>
|
100 |
+
<p><div class="aioseop_icon aioseop_cog_icon"></div><a target="_blank" title="<?php _e( 'All in One SEO Pro Plugin Changelog', 'all-in-one-seo-pack' ); ?>"
|
101 |
+
href="<?php if ( AIOSEOPPRO ) { echo 'http://semperplugins.com/documentation/all-in-one-seo-pack-pro-changelog/'; } else { echo 'http://semperfiwebdesign.com/blog/all-in-one-seo-pack/all-in-one-seo-pack-release-history/'; } ?>"><?php _e( 'View the Changelog', 'all-in-one-seo-pack' ); ?></a></p>
|
102 |
+
<p><div class="aioseop_icon aioseop_youtube_icon"></div><a target="_blank" href="http://semperplugins.com/doc-type/video/"><?php _e( 'Watch video tutorials', 'all-in-one-seo-pack' ); ?></a></p>
|
103 |
+
<p><div class="aioseop_icon aioseop_book_icon"></div><a target="_blank" href="http://semperplugins.com/documentation/quick-start-guide/"><?php _e( 'Getting started? Read the Beginners Guide', 'all-in-one-seo-pack' ); ?></a></p>
|
104 |
+
</div>
|
105 |
+
<?php
|
106 |
+
break;
|
107 |
+
}
|
108 |
+
echo "</div>";
|
109 |
+
}
|
110 |
+
|
111 |
+
|
112 |
+
|
113 |
+
|
114 |
+
|
115 |
+
|
116 |
+
|
117 |
+
|
118 |
+
|
119 |
+
}
|
admin/meta_import.php
ADDED
@@ -0,0 +1,578 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if( class_exists( 'WPSEO_Import_Hooks' )){
|
4 |
+
class WPSEO_Import_AIOSEO_Hooks extends WPSEO_Import_Hooks {
|
5 |
+
|
6 |
+
protected $plugin_file = 'all-in-one-seo-pack/all_in_one_seo_pack.php';
|
7 |
+
|
8 |
+
protected $deactivation_listener = 'deactivate_aioseo';
|
9 |
+
|
10 |
+
public function show_import_settings_notice() {
|
11 |
+
// $url = admin_url( 'tools.php?page=seodt' ) );
|
12 |
+
//make these save to the database and dismissible
|
13 |
+
|
14 |
+
|
15 |
+
$yoasturl = add_query_arg( array( '_wpnonce' => wp_create_nonce( 'wpseo-import' ) ), admin_url( 'admin.php?page=wpseo_tools&tool=import-export&import=1&importaioseo=1#top#import-seo' ) );
|
16 |
+
$aiourl = add_query_arg( array( '_wpnonce' => wp_create_nonce( 'aiosp-import' ) ), admin_url( 'tools.php?page=seoimport' ) );
|
17 |
+
|
18 |
+
|
19 |
+
$aioseop_yst_detected_notice_dismissed = get_user_meta( get_current_user_id(), 'aioseop_yst_detected_notice_dismissed', true );
|
20 |
+
|
21 |
+
if ( empty( $aioseop_yst_detected_notice_dismissed ) ) {
|
22 |
+
|
23 |
+
echo '<div class="notice notice-warning row-title is-dismissible yst_notice"><p>', sprintf( esc_html__( 'The plugin Yoast SEO has been detected. Do you want to %simport its settings%s into All in One SEO Pack?', 'all-in-one-seo-pack' ), sprintf( '<a href="%s">', esc_url( $aiourl ) ), '</a>' ), '</p></div>';
|
24 |
+
|
25 |
+
}
|
26 |
+
|
27 |
+
|
28 |
+
echo '<div class="error"><p>', sprintf( esc_html__( 'The plugin All-In-One-SEO has been detected. Do you want to %simport its settings%s?', 'wordpress-seo' ), sprintf( '<a href="%s">', esc_url( $yoasturl ) ), '</a>' ), '</p></div>';
|
29 |
+
|
30 |
+
|
31 |
+
|
32 |
+
}
|
33 |
+
|
34 |
+
public function show_deactivate_notice() {
|
35 |
+
echo '<div class="updated"><p>', esc_html__( 'All in One SEO has been deactivated', 'all-in-one-seo-pack' ), '</p></div>';
|
36 |
+
}
|
37 |
+
}
|
38 |
+
}else{
|
39 |
+
delete_user_meta( get_current_user_id(), 'aioseop_yst_detected_notice_dismissed' );
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Register the admin menu page
|
44 |
+
*/
|
45 |
+
add_action('admin_menu', 'seodt_settings_init');
|
46 |
+
function seodt_settings_init() {
|
47 |
+
global $_seodt_admin_pagehook;
|
48 |
+
|
49 |
+
// Add submenu page link
|
50 |
+
$_seodt_admin_pagehook = add_submenu_page('tools.php', __('Import SEO Data','all-in-one-seo-pack'), __('SEO Data Import','all-in-one-seo-pack'), 'manage_options', 'seoimport', 'seodt_admin');
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* This function intercepts POST data from the form submission, and uses that
|
55 |
+
* data to convert values in the postmeta table from one platform to another.
|
56 |
+
*/
|
57 |
+
function seodt_action() {
|
58 |
+
|
59 |
+
//print_r($_REQUEST);
|
60 |
+
|
61 |
+
if ( empty( $_REQUEST['_wpnonce'] ) )
|
62 |
+
return;
|
63 |
+
|
64 |
+
if ( empty( $_REQUEST['platform_old'] ) ) {
|
65 |
+
printf( '<div class="error"><p>%s</p></div>', __('Sorry, you can\'t do that. Please choose a platform platforms.') );
|
66 |
+
return;
|
67 |
+
}
|
68 |
+
|
69 |
+
if ( $_REQUEST['platform_old'] == 'All in One SEO Pack' ) {
|
70 |
+
printf( '<div class="error"><p>%s</p></div>', __('Sorry, you can\'t do that. Please choose two different platforms.') );
|
71 |
+
return;
|
72 |
+
}
|
73 |
+
|
74 |
+
check_admin_referer('seodt'); // Verify nonce
|
75 |
+
|
76 |
+
if ( !empty( $_REQUEST['analyze'] ) ) {
|
77 |
+
|
78 |
+
printf( '<h3>%s</h3>', __('Analysis Results', 'all-in-one-seo-pack') );
|
79 |
+
|
80 |
+
$response = seodt_post_meta_analyze( $_REQUEST['platform_old'], 'All in One SEO Pack' );
|
81 |
+
if ( is_wp_error( $response ) ) {
|
82 |
+
printf( '<div class="error"><p>%s</p></div>', __('Sorry, something went wrong. Please try again') );
|
83 |
+
return;
|
84 |
+
}
|
85 |
+
|
86 |
+
printf( __('<p>Analyzing records in a %s to %s conversion…', 'all-in-one-seo-pack'), esc_html( $_POST['platform_old'] ), 'All in One SEO Pack' );
|
87 |
+
printf( '<p><b>%d</b> Compatible Records were identified</p>', $response->update );
|
88 |
+
// printf( '<p>%d Compatible Records will be ignored</p>', $response->ignore );
|
89 |
+
|
90 |
+
printf( '<p><b>%s</b></p>', __('Compatible data:', 'all-in-one-seo-pack') );
|
91 |
+
echo '<ol>';
|
92 |
+
foreach ( (array)$response->elements as $element ) {
|
93 |
+
printf( '<li>%s</li>', $element );
|
94 |
+
}
|
95 |
+
echo '</ol>';
|
96 |
+
|
97 |
+
return;
|
98 |
+
}
|
99 |
+
|
100 |
+
printf( '<h3>%s</h3>', __('Conversion Results', 'all-in-one-seo-pack') );
|
101 |
+
|
102 |
+
$result = seodt_post_meta_convert( stripslashes($_REQUEST['platform_old']), 'All in One SEO Pack' );
|
103 |
+
if ( is_wp_error( $result ) ) {
|
104 |
+
printf( '<p>%s</p>', __('Sorry, something went wrong. Please try again') );
|
105 |
+
return;
|
106 |
+
}
|
107 |
+
|
108 |
+
printf( '<p><b>%d</b> Records were updated</p>', isset( $result->updated ) ? $result->updated : 0 );
|
109 |
+
printf( '<p><b>%d</b> Records were ignored</p>', isset( $result->ignored ) ? $result->ignored : 0 );
|
110 |
+
|
111 |
+
return;
|
112 |
+
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* This function displays feedback to the user about compatible conversion
|
117 |
+
* elements and the conversion process via the admin_alert hook.
|
118 |
+
*/
|
119 |
+
|
120 |
+
/**
|
121 |
+
* The admin page output
|
122 |
+
*/
|
123 |
+
function seodt_admin() {
|
124 |
+
global $_seodt_themes, $_seodt_plugins, $_seodt_platforms;
|
125 |
+
?>
|
126 |
+
|
127 |
+
<div class="wrap">
|
128 |
+
|
129 |
+
<?php screen_icon('tools'); ?>
|
130 |
+
<h2><?php _e('Import SEO Settings', 'all-in-one-seo-pack'); ?></h2>
|
131 |
+
|
132 |
+
<p><span class="description"><?php printf( __('Use the drop down below to choose which plugin or theme you wish to import SEO data from.', 'all-in-one-seo-pack') ); ?></span></p>
|
133 |
+
|
134 |
+
<p><span class="description"><?php printf( __('Click "Analyze" for a list of SEO data that can be imported into All in One SEO Pack, along with the number of records that will be imported.', 'all-in-one-seo-pack') ); ?></span></p>
|
135 |
+
|
136 |
+
<p><span class="description"><strong><?php printf( __('Please Note: ') ); ?></strong><?php printf( __('Some plugins and themes do not share similar data, or they store data in a non-standard way. If we cannot import this data, it will remain unchanged in your database. Any compatible SEO data will be displayed for you to review. If a post or page already has SEO data in All in One SEO Pack, we will not import data from another plugin/theme.', 'all-in-one-seo-pack') ); ?></span></p>
|
137 |
+
|
138 |
+
<p><span class="description"><?php printf( __('Click "Convert" to perform the import. After the import has completed, you will be alerted to how many records were imported, and how many records had to be ignored, based on the criteria above.', 'all-in-one-seo-pack') ); ?></span></p>
|
139 |
+
|
140 |
+
<p><span class="row-title"><?php printf( esc_html__('Before performing an import, we strongly recommend that you make a backup of your site. We use and recommend %s BackupBuddy %s for backups.', 'all-in-one-seo-pack'), sprintf( '<a target="_blank" href="%s">', esc_url( 'http://semperfiwebdesign.com/backupbuddy/' ) ), '</a>' ); ?></span></p>
|
141 |
+
|
142 |
+
|
143 |
+
|
144 |
+
<form action="<?php echo admin_url('tools.php?page=seoimport'); ?>" method="post">
|
145 |
+
<?php
|
146 |
+
wp_nonce_field('seodt');
|
147 |
+
|
148 |
+
$platform_old = (!isset($_POST['platform_old'])) ? '' : $_POST['platform_old'];
|
149 |
+
|
150 |
+
_e('Import SEO data from:', 'all-in-one-seo-pack');
|
151 |
+
echo '<select name="platform_old">';
|
152 |
+
printf( '<option value="">%s</option>', __('Choose platform:', 'all-in-one-seo-pack') );
|
153 |
+
|
154 |
+
printf( '<optgroup label="%s">', __('Plugins', 'all-in-one-seo-pack') );
|
155 |
+
foreach ( $_seodt_plugins as $platform => $data ) {
|
156 |
+
if($platform != "All in One SEO Pack") printf( '<option value="%s" %s>%s</option>', $platform, selected($platform, $platform_old, 0), $platform );
|
157 |
+
}
|
158 |
+
printf( '</optgroup>' );
|
159 |
+
|
160 |
+
printf( '<optgroup label="%s">', __('Themes', 'all-in-one-seo-pack') );
|
161 |
+
foreach ( $_seodt_themes as $platform => $data ) {
|
162 |
+
printf( '<option value="%s" %s>%s</option>', $platform, selected($platform, $platform_old, 0), $platform );
|
163 |
+
}
|
164 |
+
printf( '</optgroup>' );
|
165 |
+
|
166 |
+
|
167 |
+
|
168 |
+
echo '</select>' . "\n\n";
|
169 |
+
|
170 |
+
?>
|
171 |
+
|
172 |
+
<input type="submit" class="button-highlighted" name="analyze" value="<?php _e('Analyze', 'genesis'); ?>" />
|
173 |
+
<input type="submit" class="button-primary" value="<?php _e('Convert', 'genesis') ?>" />
|
174 |
+
|
175 |
+
</form>
|
176 |
+
|
177 |
+
<?php seodt_action(); ?>
|
178 |
+
|
179 |
+
</div>
|
180 |
+
|
181 |
+
<?php
|
182 |
+
}
|
183 |
+
|
184 |
+
|
185 |
+
|
186 |
+
//////////////////FUNCTIONS//////////////////
|
187 |
+
|
188 |
+
/**
|
189 |
+
* This function converts $old meta_key entries in the postmeta table into $new entries.
|
190 |
+
*
|
191 |
+
* It first checks to see what records for the $new meta_key already exist,
|
192 |
+
* storing the corresponding post_id values in an array. When the conversion
|
193 |
+
* happens, rows that contain a post_id in that array will be ignored, to
|
194 |
+
* avoid duplicate $new meta_key entries.
|
195 |
+
*
|
196 |
+
* The $old entries will be left as-is if $delete_old is left false. If set
|
197 |
+
* to true, the $old entries will be deleted, rather than retained.
|
198 |
+
*
|
199 |
+
* The function returns an object for error detection, and the number of affected rows.
|
200 |
+
*/
|
201 |
+
function seodt_meta_key_convert( $old = '', $new = '', $delete_old = false ) {
|
202 |
+
|
203 |
+
do_action( 'pre_seodt_meta_key_convert_before', $old, $new, $delete_old );
|
204 |
+
|
205 |
+
global $wpdb;
|
206 |
+
|
207 |
+
$output = new stdClass;
|
208 |
+
|
209 |
+
if ( !$old || !$new ) {
|
210 |
+
$output->WP_Error = 1;
|
211 |
+
return $output;
|
212 |
+
}
|
213 |
+
|
214 |
+
// See which records we need to ignore, if any
|
215 |
+
$exclude = $wpdb->get_results( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = %s", $new ) );
|
216 |
+
|
217 |
+
// If no records to ignore, we'll do a basic UPDATE and DELETE
|
218 |
+
if ( !$exclude ) {
|
219 |
+
|
220 |
+
$output->updated = $wpdb->update( $wpdb->postmeta, array( 'meta_key' => $new ), array( 'meta_key' => $old ) );
|
221 |
+
$output->deleted = $delete_old ? $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->postmeta WHERE meta_key = %s", $old ) ) : 0;
|
222 |
+
$output->ignored = 0;
|
223 |
+
|
224 |
+
}
|
225 |
+
// Else, do a more complex UPDATE and DELETE
|
226 |
+
else {
|
227 |
+
|
228 |
+
foreach ( (array)$exclude as $key => $value ) {
|
229 |
+
$not_in[] = $value->post_id;
|
230 |
+
}
|
231 |
+
$not_in = implode(', ', (array)$not_in );
|
232 |
+
|
233 |
+
$output->updated = $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->postmeta SET meta_key = %s WHERE meta_key = %s AND post_id NOT IN ($not_in)", $new, $old ) );
|
234 |
+
$output->deleted = $delete_old ? $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->postmeta WHERE meta_key = %s", $old ) ) : 0;
|
235 |
+
$output->ignored = count( $exclude );
|
236 |
+
|
237 |
+
}
|
238 |
+
|
239 |
+
do_action( 'seodt_meta_key_convert', $output, $old, $new, $delete_old );
|
240 |
+
|
241 |
+
return $output;
|
242 |
+
|
243 |
+
}
|
244 |
+
|
245 |
+
/**
|
246 |
+
* This function cycles through all compatible SEO entries of two platforms,
|
247 |
+
* performs a seodt_meta_key_convert() conversion for each key, and returns
|
248 |
+
* the results as an object.
|
249 |
+
*
|
250 |
+
* It first checks for compatible entries between the two platforms. When it
|
251 |
+
* finds compatible entries, it loops through them and preforms the conversion
|
252 |
+
* on each entry.
|
253 |
+
*/
|
254 |
+
function seodt_post_meta_convert( $old_platform = '', $new_platform = 'All in One SEO Pack', $delete_old = false ) {
|
255 |
+
|
256 |
+
do_action( 'pre_seodt_post_meta_convert', $old_platform, $new_platform, $delete_old );
|
257 |
+
|
258 |
+
global $_seodt_platforms;
|
259 |
+
|
260 |
+
$output = new stdClass;
|
261 |
+
|
262 |
+
if ( empty( $_seodt_platforms[$old_platform] ) || empty( $_seodt_platforms[$new_platform] ) ) {
|
263 |
+
$output->WP_Error = 1;
|
264 |
+
return $output;
|
265 |
+
}
|
266 |
+
|
267 |
+
$output->updated = 0;
|
268 |
+
$output->deleted = 0;
|
269 |
+
$output->ignored = 0;
|
270 |
+
|
271 |
+
foreach ( (array)$_seodt_platforms[$old_platform] as $label => $meta_key ) {
|
272 |
+
|
273 |
+
// skip iterations where no $new analog exists
|
274 |
+
if ( empty( $_seodt_platforms[$new_platform][$label] ) )
|
275 |
+
continue;
|
276 |
+
|
277 |
+
// set $old and $new meta_key values
|
278 |
+
$old = $_seodt_platforms[$old_platform][$label];
|
279 |
+
$new = $_seodt_platforms[$new_platform][$label];
|
280 |
+
|
281 |
+
// convert
|
282 |
+
$result = seodt_meta_key_convert( $old, $new, $delete_old );
|
283 |
+
|
284 |
+
// error check
|
285 |
+
if ( is_wp_error( $result ) )
|
286 |
+
continue;
|
287 |
+
|
288 |
+
// update total updated/ignored count
|
289 |
+
$output->updated = $output->updated + (int)$result->updated;
|
290 |
+
$output->ignored = $output->ignored + (int)$result->ignored;
|
291 |
+
|
292 |
+
}
|
293 |
+
|
294 |
+
do_action( 'seodt_post_meta_convert', $output, $old_platform, $new_platform, $delete_old );
|
295 |
+
|
296 |
+
return $output;
|
297 |
+
|
298 |
+
}
|
299 |
+
|
300 |
+
/**
|
301 |
+
* This function analyzes two platforms to see what Compatible elements they share,
|
302 |
+
* what data can be converted from one to the other, and which elements to ignore (future).
|
303 |
+
*/
|
304 |
+
function seodt_post_meta_analyze( $old_platform = '', $new_platform = 'All in One SEO Pack' ) {
|
305 |
+
|
306 |
+
do_action( 'pre_seodt_post_meta_analyze', $old_platform, $new_platform );
|
307 |
+
|
308 |
+
global $wpdb, $_seodt_platforms;
|
309 |
+
|
310 |
+
$output = new stdClass;
|
311 |
+
|
312 |
+
if ( empty( $_seodt_platforms[$old_platform] ) || empty( $_seodt_platforms[$new_platform] ) ) {
|
313 |
+
$output->WP_Error = 1;
|
314 |
+
return $output;
|
315 |
+
}
|
316 |
+
|
317 |
+
$output->update = 0;
|
318 |
+
$output->ignore = 0;
|
319 |
+
$output->elements = '';
|
320 |
+
|
321 |
+
foreach ( (array)$_seodt_platforms[$old_platform] as $label => $meta_key ) {
|
322 |
+
|
323 |
+
// skip iterations where no $new analog exists
|
324 |
+
if ( empty( $_seodt_platforms[$new_platform][$label] ) )
|
325 |
+
continue;
|
326 |
+
|
327 |
+
$elements[] = $label;
|
328 |
+
|
329 |
+
// see which records to ignore, if any
|
330 |
+
$ignore = 0;
|
331 |
+
// $ignore = $wpdb->get_results( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = %s", $meta_key ) );
|
332 |
+
|
333 |
+
// see which records to update, if any
|
334 |
+
$update = $wpdb->get_results( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = %s", $meta_key ) );
|
335 |
+
|
336 |
+
// count items in returned arrays
|
337 |
+
// $ignore = count( (array)$ignore );
|
338 |
+
$update = count( (array)$update );
|
339 |
+
|
340 |
+
// calculate update/ignore by comparison
|
341 |
+
// $update = ( (int)$update > (int)$ignore ) ? ( (int)$update - (int)$ignore ) : 0;
|
342 |
+
|
343 |
+
// update output numbers
|
344 |
+
$output->update = $output->update + (int)$update;
|
345 |
+
$output->ignore = $output->ignore + (int)$ignore;
|
346 |
+
|
347 |
+
} // endforeach
|
348 |
+
|
349 |
+
$output->elements = $elements;
|
350 |
+
|
351 |
+
do_action( 'seodt_post_meta_analyze', $output, $old_platform, $new_platform );
|
352 |
+
|
353 |
+
return $output;
|
354 |
+
|
355 |
+
}
|
356 |
+
|
357 |
+
|
358 |
+
|
359 |
+
////////////PLUGIN/////////
|
360 |
+
|
361 |
+
|
362 |
+
// define('SEODT_PLUGIN_DIR', dirname(__FILE__));
|
363 |
+
|
364 |
+
//add_action( 'plugins_loaded', 'seodt_init' );
|
365 |
+
/**
|
366 |
+
* Initialize the SEO Data Transporter plugin
|
367 |
+
*/
|
368 |
+
function seodt_init() {
|
369 |
+
|
370 |
+
global $_seodt_themes, $_seodt_plugins, $_seodt_platforms;
|
371 |
+
|
372 |
+
/**
|
373 |
+
* The associative array of supported themes.
|
374 |
+
*/
|
375 |
+
$_seodt_themes = array(
|
376 |
+
// alphabatized
|
377 |
+
'Builder' => array(
|
378 |
+
'Custom Doctitle' => '_builder_seo_title',
|
379 |
+
'META Description' => '_builder_seo_description',
|
380 |
+
'META Keywords' => '_builder_seo_keywords',
|
381 |
+
),
|
382 |
+
'Catalyst' => array(
|
383 |
+
'Custom Doctitle' => '_catalyst_title',
|
384 |
+
'META Description' => '_catalyst_description',
|
385 |
+
'META Keywords' => '_catalyst_keywords',
|
386 |
+
'noindex' => '_catalyst_noindex',
|
387 |
+
'nofollow' => '_catalyst_nofollow',
|
388 |
+
'noarchive' => '_catalyst_noarchive',
|
389 |
+
),
|
390 |
+
'Frugal' => array(
|
391 |
+
'Custom Doctitle' => '_title',
|
392 |
+
'META Description' => '_description',
|
393 |
+
'META Keywords' => '_keywords',
|
394 |
+
'noindex' => '_noindex',
|
395 |
+
'nofollow' => '_nofollow',
|
396 |
+
),
|
397 |
+
'Genesis' => array(
|
398 |
+
'Custom Doctitle' => '_genesis_title',
|
399 |
+
'META Description' => '_genesis_description',
|
400 |
+
'META Keywords' => '_genesis_keywords',
|
401 |
+
'noindex' => '_genesis_noindex',
|
402 |
+
'nofollow' => '_genesis_nofollow',
|
403 |
+
'noarchive' => '_genesis_noarchive',
|
404 |
+
'Canonical URI' => '_genesis_canonical_uri',
|
405 |
+
'Custom Scripts' => '_genesis_scripts',
|
406 |
+
'Redirect URI' => 'redirect',
|
407 |
+
),
|
408 |
+
'Headway' => array(
|
409 |
+
'Custom Doctitle' => '_title',
|
410 |
+
'META Description' => '_description',
|
411 |
+
'META Keywords' => '_keywords',
|
412 |
+
),
|
413 |
+
'Hybrid' => array(
|
414 |
+
'Custom Doctitle' => 'Title',
|
415 |
+
'META Description' => 'Description',
|
416 |
+
'META Keywords' => 'Keywords',
|
417 |
+
),
|
418 |
+
'Thesis 1.x' => array(
|
419 |
+
'Custom Doctitle' => 'thesis_title',
|
420 |
+
'META Description' => 'thesis_description',
|
421 |
+
'META Keywords' => 'thesis_keywords',
|
422 |
+
'Custom Scripts' => 'thesis_javascript_scripts',
|
423 |
+
'Redirect URI' => 'thesis_redirect',
|
424 |
+
),
|
425 |
+
/*
|
426 |
+
'Thesis 2.x' => array(
|
427 |
+
'Custom Doctitle' => '_thesis_title_tag',
|
428 |
+
'META Description' => '_thesis_meta_description',
|
429 |
+
'META Keywords' => '_thesis_meta_keywords',
|
430 |
+
'Custom Scripts' => '_thesis_javascript_scripts',
|
431 |
+
'Canonical URI' => '_thesis_canonical_link',
|
432 |
+
'Redirect URI' => '_thesis_redirect',
|
433 |
+
),
|
434 |
+
*/
|
435 |
+
'WooFramework' => array(
|
436 |
+
'Custom Doctitle' => 'seo_title',
|
437 |
+
'META Description' => 'seo_description',
|
438 |
+
'META Keywords' => 'seo_keywords',
|
439 |
+
)
|
440 |
+
);
|
441 |
+
|
442 |
+
/**
|
443 |
+
* The associative array of supported plugins.
|
444 |
+
*/
|
445 |
+
$_seodt_plugins = array(
|
446 |
+
// alphabatized
|
447 |
+
'Add Meta Tags' => array(
|
448 |
+
'META Description' => 'description',
|
449 |
+
'META Keywords' => 'keywords',
|
450 |
+
),
|
451 |
+
'All in One SEO Pack' => array(
|
452 |
+
'Custom Doctitle' => '_aioseop_title',
|
453 |
+
'META Description' => '_aioseop_description',
|
454 |
+
'META Keywords' => '_aioseop_keywords',
|
455 |
+
),
|
456 |
+
'Greg\'s High Performance SEO' => array(
|
457 |
+
'Custom Doctitle' => '_ghpseo_secondary_title',
|
458 |
+
'META Description' => '_ghpseo_alternative_description',
|
459 |
+
'META Keywords' => '_ghpseo_keywords',
|
460 |
+
),
|
461 |
+
'Headspace2' => array(
|
462 |
+
'Custom Doctitle' => '_headspace_page_title',
|
463 |
+
'META Description' => '_headspace_description',
|
464 |
+
'META Keywords' => '_headspace_keywords',
|
465 |
+
'Custom Scripts' => '_headspace_scripts',
|
466 |
+
),
|
467 |
+
'Infinite SEO' => array(
|
468 |
+
'Custom Doctitle' => '_wds_title',
|
469 |
+
'META Description' => '_wds_metadesc',
|
470 |
+
'META Keywords' => '_wds_keywords',
|
471 |
+
'noindex' => '_wds_meta-robots-noindex',
|
472 |
+
'nofollow' => '_wds_meta-robots-nofollow',
|
473 |
+
'Canonical URI' => '_wds_canonical',
|
474 |
+
'Redirect URI' => '_wds_redirect',
|
475 |
+
),
|
476 |
+
'Meta SEO Pack' => array(
|
477 |
+
'META Description' => '_msp_description',
|
478 |
+
'META Keywords' => '_msp_keywords',
|
479 |
+
),
|
480 |
+
'Platinum SEO' => array(
|
481 |
+
'Custom Doctitle' => 'title',
|
482 |
+
'META Description' => 'description',
|
483 |
+
'META Keywords' => 'keywords',
|
484 |
+
),
|
485 |
+
'SEO Title Tag' => array(
|
486 |
+
'Custom Doctitle' => 'title_tag',
|
487 |
+
'META Description' => 'meta_description',
|
488 |
+
),
|
489 |
+
'SEO Ultimate' => array(
|
490 |
+
'Custom Doctitle' => '_su_title',
|
491 |
+
'META Description' => '_su_description',
|
492 |
+
'META Keywords' => '_su_keywords',
|
493 |
+
'noindex' => '_su_meta_robots_noindex',
|
494 |
+
'nofollow' => '_su_meta_robots_nofollow',
|
495 |
+
),
|
496 |
+
'Yoast SEO' => array(
|
497 |
+
'Custom Doctitle' => '_yoast_wpseo_title',
|
498 |
+
'META Description' => '_yoast_wpseo_metadesc',
|
499 |
+
'META Keywords' => '_yoast_wpseo_metakeywords',
|
500 |
+
'noindex' => '_yoast_wpseo_meta-robots-noindex',
|
501 |
+
'nofollow' => '_yoast_wpseo_meta-robots-nofollow',
|
502 |
+
'Canonical URI' => '_yoast_wpseo_canonical',
|
503 |
+
'Redirect URI' => '_yoast_wpseo_redirect',
|
504 |
+
)
|
505 |
+
);
|
506 |
+
|
507 |
+
/**
|
508 |
+
* The combined array of supported platforms.
|
509 |
+
*/
|
510 |
+
$_seodt_platforms = array_merge( $_seodt_themes, $_seodt_plugins );
|
511 |
+
|
512 |
+
/**
|
513 |
+
* Include the other elements of the plugin.
|
514 |
+
*/
|
515 |
+
// require_once( SEODT_PLUGIN_DIR . '/admin.php' );
|
516 |
+
// require_once( SEODT_PLUGIN_DIR . '/functions.php' );
|
517 |
+
|
518 |
+
/**
|
519 |
+
* Init hook.
|
520 |
+
*
|
521 |
+
* Hook fires after plugin functions are loaded.
|
522 |
+
*
|
523 |
+
* @since 0.9.10
|
524 |
+
*
|
525 |
+
*/
|
526 |
+
do_action( 'seodt_init' );
|
527 |
+
|
528 |
+
}
|
529 |
+
|
530 |
+
/**
|
531 |
+
* Activation Hook
|
532 |
+
* @since 0.9.4
|
533 |
+
*/
|
534 |
+
register_activation_hook( __FILE__, 'seodt_activation_hook' );
|
535 |
+
function seodt_activation_hook() {
|
536 |
+
|
537 |
+
// require_once( SEODT_PLUGIN_DIR . '/functions.php' );
|
538 |
+
|
539 |
+
seodt_meta_key_convert( '_yoast_seo_title', 'yoast_wpseo_title', true );
|
540 |
+
seodt_meta_key_convert( '_yoast_seo_metadesc', 'yoast_wpseo_metadesc', true );
|
541 |
+
|
542 |
+
}
|
543 |
+
|
544 |
+
/**
|
545 |
+
* Manual conversion test
|
546 |
+
*/
|
547 |
+
/*
|
548 |
+
$seodt_convert = seodt_post_meta_convert( 'All in One SEO Pack', 'Genesis', false );
|
549 |
+
printf( '%d records were updated', $seodt_convert->updated );
|
550 |
+
/**/
|
551 |
+
|
552 |
+
/**
|
553 |
+
* Manual analysis test
|
554 |
+
*/
|
555 |
+
/*
|
556 |
+
$seodt_analyze = seodt_post_meta_analyze( 'All in One SEO Pack', 'Genesis' );
|
557 |
+
printf( '<p><b>%d</b> Compatible Records were identified</p>', $seodt_analyze->update );
|
558 |
+
/**/
|
559 |
+
|
560 |
+
/**
|
561 |
+
* Delete all SEO data, from every platform
|
562 |
+
*/
|
563 |
+
/*
|
564 |
+
foreach ( $_seodt_platforms as $platform => $data ) {
|
565 |
+
|
566 |
+
foreach ( $data as $field ) {
|
567 |
+
$deleted = $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->postmeta WHERE meta_key = %s", $field ) );
|
568 |
+
printf( '%d %s records deleted<br />', $deleted, $field );
|
569 |
+
}
|
570 |
+
|
571 |
+
}
|
572 |
+
/**/
|
573 |
+
|
574 |
+
/**
|
575 |
+
* Query all SEO data to find the number of records to change
|
576 |
+
*/
|
577 |
+
|
578 |
+
|
aioseop_class.php
CHANGED
@@ -336,7 +336,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
336 |
'condshow' => Array( "aiosp_use_static_home_info" => 0 ) ),
|
337 |
"togglekeywords" => Array(
|
338 |
'name' => __( 'Use Keywords:', 'all-in-one-seo-pack' ),
|
339 |
-
'default' =>
|
340 |
'type' => 'radio',
|
341 |
'initial_options' => Array( 0 => __( 'Enabled', 'all-in-one-seo-pack' ),
|
342 |
1 => __( 'Disabled', 'all-in-one-seo-pack' ) )
|
@@ -395,7 +395,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
395 |
0 => __( 'Disabled', 'all-in-one-seo-pack' ) )
|
396 |
),
|
397 |
"cap_titles"=> Array(
|
398 |
-
'name' => __( 'Capitalize Titles:', 'all-in-one-seo-pack' ), 'default' => 1),
|
399 |
"cap_cats"=> Array(
|
400 |
'name' => __( 'Capitalize Category Titles:', 'all-in-one-seo-pack' ), 'default' => 1),
|
401 |
"home_page_title_format"=> Array(
|
@@ -706,8 +706,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
706 |
'edit' => Array( 'type' => 'hidden', 'default' => 'aiosp_edit', 'prefix' => true, 'nowrap' => 1 ),
|
707 |
'nonce-aioseop-edit' => Array( 'type' => 'hidden', 'default' => null, 'prefix' => false, 'nowrap' => 1 ),
|
708 |
'upgrade' => Array( 'type' => 'html', 'label' => 'none',
|
709 |
-
'default' => '
|
710 |
-
. __( 'Upgrade to All in One SEO Pack Pro Version', 'all-in-one-seo-pack' ) . '</a>'
|
711 |
),
|
712 |
'support' => Array( 'type' => 'html', 'label' => 'none',
|
713 |
'default' => '<a target="_blank" href="http://semperplugins.com/support/">'
|
@@ -758,11 +757,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
758 |
'help_link' => 'http://semperplugins.com/documentation/home-page-settings/',
|
759 |
'options' => Array( 'home_title', 'home_description', 'home_keywords', 'use_static_home_info' )
|
760 |
),
|
761 |
-
'keywords' => Array(
|
762 |
-
'name' => __( 'Keyword Settings', 'all-in-one-seo-pack' ),
|
763 |
-
'help_link' => 'http://semperplugins.com/documentation/keyword-settings/',
|
764 |
-
'options' => Array( "togglekeywords", "use_categories", "use_tags_as_keywords", "dynamic_postspage_keywords" )
|
765 |
-
),
|
766 |
'title' => Array(
|
767 |
'name' => __( 'Title Settings', 'all-in-one-seo-pack' ),
|
768 |
'help_link' => 'http://semperplugins.com/documentation/title-settings/',
|
@@ -800,6 +794,11 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
800 |
'name' => __( 'Advanced Settings', 'all-in-one-seo-pack' ),
|
801 |
'help_link' => 'http://semperplugins.com/documentation/advanced-settings/',
|
802 |
'options' => Array( 'generate_descriptions', 'skip_excerpt', 'run_shortcodes', 'hide_paginated_descriptions', 'dont_truncate_descriptions', 'unprotect_meta', 'ex_pages', 'post_meta_tags', 'page_meta_tags', 'front_meta_tags', 'home_meta_tags' )
|
|
|
|
|
|
|
|
|
|
|
803 |
)
|
804 |
);
|
805 |
|
@@ -821,7 +820,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
821 |
add_action('all_admin_notices', array( $this, 'visibility_warning'));
|
822 |
|
823 |
if(!AIOSEOPPRO){
|
824 |
-
|
825 |
}
|
826 |
}
|
827 |
if(AIOSEOPPRO){
|
@@ -976,18 +975,19 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
976 |
if ( strpos( $title_format, '%page_title%' ) !== false ) $title_format = str_replace( '%page_title%', $replace_title, $title_format );
|
977 |
if ( $w->is_category || $w->is_tag || $w->is_tax ) {
|
978 |
if(AIOSEOPPRO){
|
979 |
-
if ( !empty( $_GET ) && !empty( $_GET['taxonomy'] ) && function_exists( 'wp_get_split_terms' ) ) {
|
|
|
980 |
$was_split = get_term_meta( $term_id, '_aioseop_term_was_split', true );
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
|
|
|
|
986 |
}
|
987 |
}
|
988 |
}
|
989 |
-
}
|
990 |
-
}
|
991 |
if ( strpos( $title_format, '%category_title%' ) !== false ) $title_format = str_replace( '%category_title%', $replace_title, $title_format );
|
992 |
if ( strpos( $title_format, '%taxonomy_title%' ) !== false ) $title_format = str_replace( '%taxonomy_title%', $replace_title, $title_format );
|
993 |
} else {
|
@@ -1028,81 +1028,10 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
1028 |
wp_enqueue_script( 'wp-pointer', false, array( 'jquery' ) );
|
1029 |
wp_enqueue_style( 'wp-pointer' );
|
1030 |
$this->add_admin_pointers();
|
1031 |
-
?>
|
1032 |
-
<style>
|
1033 |
-
#toplevel_page_all-in-one-seo-pack-pro-aioseop_class .wp-menu-image {
|
1034 |
-
background: url(<?php echo AIOSEOP_PLUGIN_IMAGES_URL; ?>shield-sprite-16.png) no-repeat 8px 6px !important;
|
1035 |
-
}
|
1036 |
-
#toplevel_page_all-in-one-seo-pack-aioseop_class .wp-menu-image {
|
1037 |
-
background: url(<?php echo AIOSEOP_PLUGIN_IMAGES_URL; ?>shield-sprite-16.png) no-repeat 8px 6px !important;
|
1038 |
-
}
|
1039 |
-
#toplevel_page_all-in-one-seo-pack-pro-aioseop_class .wp-menu-image img {
|
1040 |
-
display: none;
|
1041 |
-
}
|
1042 |
-
#toplevel_page_all-in-one-seo-pack-aioseop_class .wp-menu-image img {
|
1043 |
-
display: none;
|
1044 |
-
}
|
1045 |
-
#adminmenu #toplevel_page_all-in-one-seo-pack-pro-aioseop_class .wp-menu-image:before {
|
1046 |
-
content: '';
|
1047 |
-
}
|
1048 |
-
#toplevel_page_all-in-one-seo-pack-aioseop_class .wp-menu-image:before {
|
1049 |
-
content: '' !important;
|
1050 |
-
}
|
1051 |
-
#toplevel_page_all-in-one-seo-pack-pro-aioseop_class:hover .wp-menu-image, #toplevel_page_all-in-one-seo-pack-pro-aioseop_class.wp-has-current-submenu .wp-menu-image {
|
1052 |
-
background-position: 8px -26px !important;
|
1053 |
-
}
|
1054 |
-
#toplevel_page_all-in-one-seo-pack-aioseop_class:hover .wp-menu-image, #toplevel_page_all-in-one-seo-pack-aioseop_class.wp-has-current-submenu .wp-menu-image {
|
1055 |
-
background-position: 8px -26px !important;
|
1056 |
-
}
|
1057 |
-
#icon-aioseop.icon32 {
|
1058 |
-
background: url(<?php echo AIOSEOP_PLUGIN_IMAGES_URL; ?>shield32.png) no-repeat left top !important;
|
1059 |
-
}
|
1060 |
-
#aioseop_settings_header #message {
|
1061 |
-
padding: 5px 0px 5px 50px;
|
1062 |
-
background-image: url(<?php echo AIOSEOP_PLUGIN_IMAGES_URL; ?>update32.png);
|
1063 |
-
background-repeat: no-repeat;
|
1064 |
-
background-position: 10px;
|
1065 |
-
font-size: 14px;
|
1066 |
-
min-height: 32px;
|
1067 |
-
clear: none;
|
1068 |
-
}
|
1069 |
-
|
1070 |
-
@media
|
1071 |
-
only screen and (-webkit-min-device-pixel-ratio: 1.5),
|
1072 |
-
only screen and ( min--moz-device-pixel-ratio: 1.5),
|
1073 |
-
only screen and ( -o-min-device-pixel-ratio: 3/2),
|
1074 |
-
only screen and ( min-device-pixel-ratio: 1.5),
|
1075 |
-
only screen and ( min-resolution: 1.5dppx) {
|
1076 |
-
|
1077 |
-
#toplevel_page_all-in-one-seo-pack-pro-aioseop_class .wp-menu-image {
|
1078 |
-
background-image: url('<?php echo AIOSEOP_PLUGIN_IMAGES_URL; ?>shield-sprite-32.png') !important;
|
1079 |
-
-webkit-background-size: 16px 48px !important;
|
1080 |
-
-moz-background-size: 16px 48px !important;
|
1081 |
-
background-size: 16px 48px !important;
|
1082 |
-
}
|
1083 |
-
|
1084 |
-
#toplevel_page_all-in-one-seo-pack-aioseop_class .wp-menu-image {
|
1085 |
-
background-image: url('<?php echo AIOSEOP_PLUGIN_IMAGES_URL; ?>shield-sprite-32.png') !important;
|
1086 |
-
-webkit-background-size: 16px 48px !important;
|
1087 |
-
-moz-background-size: 16px 48px !important;
|
1088 |
-
background-size: 16px 48px !important;
|
1089 |
-
}
|
1090 |
-
|
1091 |
-
#icon-aioseop.icon32 {
|
1092 |
-
background-image: url('<?php echo AIOSEOP_PLUGIN_IMAGES_URL; ?>shield64.png') !important;
|
1093 |
-
-webkit-background-size: 32px 32px !important;
|
1094 |
-
-moz-background-size: 32px 32px !important;
|
1095 |
-
background-size: 32px 32px !important;
|
1096 |
-
}
|
1097 |
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
-moz-background-size: 32px 32px !important;
|
1102 |
-
background-size: 32px 32px !important;
|
1103 |
-
}
|
1104 |
-
}
|
1105 |
-
</style>
|
1106 |
<script>
|
1107 |
function aioseop_show_pointer( handle, value ) {
|
1108 |
if ( typeof( jQuery ) != 'undefined' ) {
|
@@ -1286,7 +1215,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
1286 |
);
|
1287 |
$this->pointers['aioseop_welcome_230'] = Array( 'pointer_target' => '#aioseop_top_button',
|
1288 |
'pointer_text' => '<h3>' . sprintf( __( 'Review Your Settings', 'all-in-one-seo-pack' ), AIOSEOP_VERSION )
|
1289 |
-
. '</h3><p>' . __( 'New in 2.
|
1290 |
'pointer_edge' => 'bottom',
|
1291 |
'pointer_align' => 'left',
|
1292 |
'pointer_scope' => 'local'
|
@@ -1324,7 +1253,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
1324 |
|
1325 |
function filter_submit( $submit ) {
|
1326 |
$submit['Submit_Default']['value'] = __( 'Reset General Settings to Defaults', 'all-in-one-seo-pack' ) . ' »';
|
1327 |
-
$submit['Submit_All_Default'] = Array( 'type' => 'submit', 'class' => 'button-
|
1328 |
return $submit;
|
1329 |
}
|
1330 |
|
@@ -1514,98 +1443,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
1514 |
return $options;
|
1515 |
}
|
1516 |
|
1517 |
-
|
1518 |
-
echo "<div class='aioseop_metabox_wrapper' >";
|
1519 |
-
switch ( $meta['id'] ) {
|
1520 |
-
case "aioseop-about":
|
1521 |
-
?><div class="aioseop_metabox_text">
|
1522 |
-
<p><h2 style="display:inline;"><?php echo AIOSEOP_PLUGIN_NAME; ?></h2><?php sprintf( __( "by %s of %s.", 'all-in-one-seo-pack' ), 'Michael Torbert', '<a target="_blank" title="Semper Fi Web Design"
|
1523 |
-
href="http://semperfiwebdesign.com/">Semper Fi Web Design</a>' ); ?>.</p>
|
1524 |
-
<?php
|
1525 |
-
global $current_user;
|
1526 |
-
$user_id = $current_user->ID;
|
1527 |
-
$ignore = get_user_meta( $user_id, 'aioseop_ignore_notice' );
|
1528 |
-
if ( !empty( $ignore ) ) {
|
1529 |
-
$qa = Array();
|
1530 |
-
wp_parse_str( $_SERVER["QUERY_STRING"], $qa );
|
1531 |
-
$qa['aioseop_reset_notices'] = 1;
|
1532 |
-
$url = '?' . build_query( $qa );
|
1533 |
-
echo '<p><a href="' . $url . '">' . __( "Reset Dismissed Notices", 'all-in-one-seo-pack' ) . '</a></p>';
|
1534 |
-
}
|
1535 |
-
if ( !AIOSEOPPRO ) {
|
1536 |
-
?>
|
1537 |
-
<p>
|
1538 |
-
<strong><a target="_blank" title="<?php _e('Pro Version', 'all-in-one-seo-pack' ); ?>"
|
1539 |
-
href="http://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/?loc=side">
|
1540 |
-
<?php _e('UPGRADE TO PRO VERSION', 'all-in-one-seo-pack' ); ?></a></strong></p>
|
1541 |
-
<?php } ?>
|
1542 |
-
</div>
|
1543 |
-
<?php
|
1544 |
-
case "aioseop-donate":
|
1545 |
-
?>
|
1546 |
-
<div>
|
1547 |
-
|
1548 |
-
<?php if ( !AIOSEOPPRO ) { ?>
|
1549 |
-
<div class="aioseop_metabox_text">
|
1550 |
-
<p>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"
|
1551 |
-
target="_blank"><strong>donate</strong></a> button or send me a gift from my <a
|
1552 |
-
href="https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web" target="_blank">
|
1553 |
-
<strong>Amazon wishlist</strong></a>. Also, don't forget to follow me on <a
|
1554 |
-
href="http://twitter.com/michaeltorbert/" target="_blank"><strong>Twitter</strong></a>.
|
1555 |
-
</p>
|
1556 |
-
</div>
|
1557 |
-
<?php } ?>
|
1558 |
-
|
1559 |
-
<div class="aioseop_metabox_feature">
|
1560 |
-
|
1561 |
-
<?php if ( !AIOSEOPPRO ) { ?>
|
1562 |
-
<a target="_blank" title="<?php _e( 'Donate', 'all-in-one-seo-pack' ); ?>"
|
1563 |
-
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">
|
1564 |
-
<img src="<?php echo AIOSEOP_PLUGIN_URL; ?>images/donate.jpg" alt="<?php _e('Donate with Paypal', 'all-in-one-seo-pack' ); ?>" /> </a>
|
1565 |
-
<a target="_blank" title="Amazon Wish List" href="https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web">
|
1566 |
-
<img src="<?php echo AIOSEOP_PLUGIN_URL; ?>images/amazon.jpg" alt="<?php _e('My Amazon Wish List', 'all-in-one-seo-pack' ); ?>" /> </a>
|
1567 |
-
<?php } ?>
|
1568 |
-
|
1569 |
-
<a target="_blank" title="<?php _e( 'Follow us on Facebook', 'all-in-one-seo-pack' ); ?>" href="http://www.facebook.com/pages/Semper-Fi-Web-Design/121878784498475"><span class="aioseop_follow_button aioseop_facebook_follow"></span></a>
|
1570 |
-
<a target="_blank" title="<?php _e( 'Follow us on Twitter', 'all-in-one-seo-pack' ); ?>" href="http://twitter.com/semperfidev/"><span class="aioseop_follow_button aioseop_twitter_follow"></span></a>
|
1571 |
-
</div><?php if(get_locale() != 'en_US'){ ?>
|
1572 |
-
<div><strong>
|
1573 |
-
<a target="_blank" title="translate" href="https://translate.wordpress.org/projects/wp-plugins/all-in-one-seo-pack">
|
1574 |
-
<?php _e( 'We need your help translating All in One SEO Pack into your language! Click Here to help make the translation complete and fix any errors.' , 'all-in-one-seo-pack' ); ?>
|
1575 |
-
</a></strong>
|
1576 |
-
</div>
|
1577 |
-
<?php } ?>
|
1578 |
-
</div>
|
1579 |
-
<?php
|
1580 |
-
break;
|
1581 |
-
case "aioseop-list":
|
1582 |
-
?>
|
1583 |
-
<div class="aioseop_metabox_text">
|
1584 |
-
<form action="http://semperfiwebdesign.us1.list-manage.com/subscribe/post?u=794674d3d54fdd912f961ef14&id=af0a96d3d9"
|
1585 |
-
method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">
|
1586 |
-
<h2><?php _e( 'Join our mailing list for tips, tricks, and WordPress secrets.', 'all-in-one-seo-pack' ); ?></h2>
|
1587 |
-
<p><i><?php _e( 'Sign up today and receive a free copy of the e-book 5 SEO Tips for WordPress ($39 value).', 'all-in-one-seo-pack' ); ?></i></p>
|
1588 |
-
<p><input type="text" value="" name="EMAIL" class="required email" id="mce-EMAIL" placeholder="Email Address">
|
1589 |
-
<input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="btn"></p>
|
1590 |
-
</form>
|
1591 |
-
</div>
|
1592 |
-
<?php
|
1593 |
-
break;
|
1594 |
-
case "aioseop-support":
|
1595 |
-
?><div class="aioseop_metabox_text">
|
1596 |
-
<p><div class="aioseop_icon aioseop_file_icon"></div><a target="_blank" href="http://semperplugins.com/documentation/"><?php _e( 'Read the All in One SEO Pack user guide', 'all-in-one-seo-pack' ); ?></a></p>
|
1597 |
-
<p><div class="aioseop_icon aioseop_support_icon"></div><a target="_blank" title="<?php _e( 'All in One SEO Pro Plugin Support Forum', 'all-in-one-seo-pack' ); ?>"
|
1598 |
-
href="http://semperplugins.com/support/"><?php _e( 'Access our Premium Support Forums', 'all-in-one-seo-pack' ); ?></a></p>
|
1599 |
-
<p><div class="aioseop_icon aioseop_cog_icon"></div><a target="_blank" title="<?php _e( 'All in One SEO Pro Plugin Changelog', 'all-in-one-seo-pack' ); ?>"
|
1600 |
-
href="<?php if ( AIOSEOPPRO ) { echo 'http://semperplugins.com/documentation/all-in-one-seo-pack-pro-changelog/'; } else { echo 'http://semperfiwebdesign.com/blog/all-in-one-seo-pack/all-in-one-seo-pack-release-history/'; } ?>"><?php _e( 'View the Changelog', 'all-in-one-seo-pack' ); ?></a></p>
|
1601 |
-
<p><div class="aioseop_icon aioseop_youtube_icon"></div><a target="_blank" href="http://semperplugins.com/doc-type/video/"><?php _e( 'Watch video tutorials', 'all-in-one-seo-pack' ); ?></a></p>
|
1602 |
-
<p><div class="aioseop_icon aioseop_book_icon"></div><a target="_blank" href="http://semperplugins.com/documentation/quick-start-guide/"><?php _e( 'Getting started? Read the Beginners Guide', 'all-in-one-seo-pack' ); ?></a></p>
|
1603 |
-
</div>
|
1604 |
-
<?php
|
1605 |
-
break;
|
1606 |
-
}
|
1607 |
-
echo "</div>";
|
1608 |
-
}
|
1609 |
|
1610 |
function get_queried_object() {
|
1611 |
static $p = null;
|
@@ -1912,7 +1750,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
1912 |
|
1913 |
$aioseop_woo_upgrade_notice_dismissed = get_user_meta( get_current_user_id(), 'aioseop_woo_upgrade_notice_dismissed', true );
|
1914 |
|
1915 |
-
if ( class_exists( 'WooCommerce' ) && empty( $aioseop_woo_upgrade_notice_dismissed ) ) {
|
1916 |
|
1917 |
printf( '
|
1918 |
<div id="message" class="notice-info notice is-dismissible aioseop-notice woo-upgrade-notice">
|
@@ -1923,7 +1761,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
1923 |
</p>
|
1924 |
</div>',
|
1925 |
__( 'We\'ve detected you\'re running WooCommerce.', 'all-in-one-seo-pack' ),
|
1926 |
-
sprintf( __( '%s Upgrade%s to All in One SEO Pack Pro for increased SEO compatibility for your products.', 'all-in-one-seo-pack' ), sprintf( '<a target="_blank" href="%s">', esc_url( 'http://semperplugins.com/plugins/all-in-one-seo-pack-pro-version
|
1927 |
|
1928 |
}elseif( !class_exists( 'WooCommerce' ) && !empty( $aioseop_woo_upgrade_notice_dismissed ) ){
|
1929 |
delete_user_meta( get_current_user_id(), 'aioseop_woo_upgrade_notice_dismissed' );
|
@@ -2077,7 +1915,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
2077 |
}
|
2078 |
} elseif ( empty( $aioseop_options['aiosp_dynamic_postspage_keywords'] ) && $this->is_static_posts_page() ) {
|
2079 |
$keywords = stripslashes( $this->internationalize( $opts["aiosp_keywords"] ) ); // and if option = use page set keywords instead of keywords from recent posts
|
2080 |
-
} elseif ( ( $blog_page =
|
2081 |
$keywords = stripslashes( $this->internationalize( get_post_meta( $blog_page->ID, "_aioseop_keywords", true ) ) );
|
2082 |
} elseif ( empty( $aioseop_options['aiosp_dynamic_postspage_keywords'] ) && ( is_archive() || is_post_type_archive() ) ) {
|
2083 |
$keywords = "";
|
@@ -2098,7 +1936,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
2098 |
return;
|
2099 |
}
|
2100 |
if ( is_home() && !is_front_page() ) {
|
2101 |
-
$post =
|
2102 |
} else {
|
2103 |
$post = $this->get_queried_object();
|
2104 |
}
|
@@ -2116,7 +1954,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
2116 |
echo "[$this->title_start,$this->title_end] ";
|
2117 |
echo "-->\n";
|
2118 |
if ( AIOSEOPPRO ) echo "<!-- " . __( "Debug String", 'all-in-one-seo-pack' ) . ": " . $aioseop_update_checker->get_verification_code() . " -->\n";
|
2119 |
-
$blog_page =
|
2120 |
$save_posts = $posts;
|
2121 |
if ( function_exists( 'woocommerce_get_page_id' ) && is_post_type_archive( 'product' ) && ( $post_id = woocommerce_get_page_id( 'shop' ) ) && ( $post = get_post( $post_id ) ) ) {
|
2122 |
global $posts;
|
@@ -2629,27 +2467,12 @@ EOF;
|
|
2629 |
return $description;
|
2630 |
}
|
2631 |
|
2632 |
-
function get_blog_page( $p = null ) {
|
2633 |
-
static $blog_page = '';
|
2634 |
-
static $page_for_posts = '';
|
2635 |
-
if ( $p === null ) {
|
2636 |
-
global $post;
|
2637 |
-
} else {
|
2638 |
-
$post = $p;
|
2639 |
-
}
|
2640 |
-
if ( $blog_page === '' ) {
|
2641 |
-
if ( $page_for_posts === '' ) $page_for_posts = get_option( 'page_for_posts' );
|
2642 |
-
if ( $page_for_posts && is_home() && ( !is_object( $post ) || ( $page_for_posts != $post->ID ) ) )
|
2643 |
-
$blog_page = get_post( $page_for_posts );
|
2644 |
-
}
|
2645 |
-
return $blog_page;
|
2646 |
-
}
|
2647 |
|
2648 |
function get_aioseop_description( $post = null ) {
|
2649 |
global $aioseop_options;
|
2650 |
if ( $post === null )
|
2651 |
$post = $GLOBALS["post"];
|
2652 |
-
$blog_page =
|
2653 |
$description = '';
|
2654 |
if ( is_front_page() && empty( $aioseop_options['aiosp_use_static_home_info'] ) )
|
2655 |
$description = trim( ( $this->internationalize( $aioseop_options['aiosp_home_description'] ) ) );
|
@@ -3189,8 +3012,9 @@ EOF;
|
|
3189 |
$title = $this->get_original_title();
|
3190 |
|
3191 |
//if we're going to have this here, which seems logical, we should probably take it out of other places... do all titles pass through here?
|
3192 |
-
|
3193 |
-
|
|
|
3194 |
|
3195 |
return apply_filters( 'aioseop_title', $title );
|
3196 |
}
|
@@ -3488,21 +3312,22 @@ EOF;
|
|
3488 |
$url = esc_url( admin_url( 'admin.php?page=' . $menu_slug ) );
|
3489 |
|
3490 |
$wp_admin_bar->add_menu( array( 'id' => AIOSEOP_PLUGIN_DIRNAME, 'title' => __( 'SEO', 'all-in-one-seo-pack' ), 'href' => $url ) );
|
3491 |
-
|
3492 |
-
|
|
|
|
|
|
|
|
|
3493 |
$aioseop_admin_menu = 1;
|
3494 |
if ( !is_admin() && !empty( $post ) ) {
|
3495 |
-
$blog_page =
|
3496 |
if ( !empty( $blog_page ) ) $post = $blog_page;
|
3497 |
$wp_admin_bar->add_menu( array( 'id' => 'aiosp_edit_' . $post->ID, 'parent' => AIOSEOP_PLUGIN_DIRNAME, 'title' => __( 'Edit SEO', 'all-in-one-seo-pack' ), 'href' => get_edit_post_link( $post->ID ) . '#aiosp' ) );
|
3498 |
}
|
3499 |
}
|
3500 |
}
|
3501 |
|
3502 |
-
|
3503 |
-
global $wp_admin_bar;
|
3504 |
-
$wp_admin_bar->add_menu( array( 'parent' => AIOSEOP_PLUGIN_DIRNAME, 'title' => __( 'Upgrade To Pro', 'all-in-one-seo-pack' ), 'id' => 'aioseop-pro-upgrade', 'href' => 'http://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/?loc=menu', 'meta' => Array( 'target' => '_blank' ) ) );
|
3505 |
-
}
|
3506 |
|
3507 |
function menu_order() {
|
3508 |
return 5;
|
@@ -3643,13 +3468,13 @@ EOF;
|
|
3643 |
else
|
3644 |
add_utility_page( $menu_name, $menu_name, apply_filters( 'manage_aiosp', 'aiosp_manage_seo' ), $file, Array( $this, 'display_settings_page' ) );
|
3645 |
|
3646 |
-
add_meta_box('aioseop-list', __( "Join Our Mailing List", 'all-in-one-seo-pack' ), array(
|
3647 |
if ( AIOSEOPPRO ){
|
3648 |
-
add_meta_box('aioseop-about', __( "About", 'all-in-one-seo-pack' ), array(
|
3649 |
} else {
|
3650 |
-
add_meta_box('aioseop-about', "About <span class='Taha' style='float:right;'>Version <b>" . AIOSEOP_VERSION . "</b></span>", array(
|
3651 |
}
|
3652 |
-
add_meta_box('aioseop-support', __( "Support", 'all-in-one-seo-pack' ) . " <span class='Taha' style='float:right;'>" . __( "Version", 'all-in-one-seo-pack' ) . " <b>" . AIOSEOP_VERSION . "</b></span>", array(
|
3653 |
|
3654 |
add_action( 'aioseop_modules_add_menus', Array( $this, 'add_menu' ), 5 );
|
3655 |
do_action( 'aioseop_modules_add_menus', $file );
|
@@ -3792,4 +3617,5 @@ EOF;
|
|
3792 |
</div>
|
3793 |
<?php
|
3794 |
}
|
3795 |
-
|
|
336 |
'condshow' => Array( "aiosp_use_static_home_info" => 0 ) ),
|
337 |
"togglekeywords" => Array(
|
338 |
'name' => __( 'Use Keywords:', 'all-in-one-seo-pack' ),
|
339 |
+
'default' => 1,
|
340 |
'type' => 'radio',
|
341 |
'initial_options' => Array( 0 => __( 'Enabled', 'all-in-one-seo-pack' ),
|
342 |
1 => __( 'Disabled', 'all-in-one-seo-pack' ) )
|
395 |
0 => __( 'Disabled', 'all-in-one-seo-pack' ) )
|
396 |
),
|
397 |
"cap_titles"=> Array(
|
398 |
+
'name' => __( 'Capitalize Tag and Search Titles:', 'all-in-one-seo-pack' ), 'default' => 1),
|
399 |
"cap_cats"=> Array(
|
400 |
'name' => __( 'Capitalize Category Titles:', 'all-in-one-seo-pack' ), 'default' => 1),
|
401 |
"home_page_title_format"=> Array(
|
706 |
'edit' => Array( 'type' => 'hidden', 'default' => 'aiosp_edit', 'prefix' => true, 'nowrap' => 1 ),
|
707 |
'nonce-aioseop-edit' => Array( 'type' => 'hidden', 'default' => null, 'prefix' => false, 'nowrap' => 1 ),
|
708 |
'upgrade' => Array( 'type' => 'html', 'label' => 'none',
|
709 |
+
'default' => aiosp_common::get_upgrade_hyperlink( 'meta', __('Upgrade to All in One SEO Pack Pro Version', 'all-in-one-seo-pack'), __('UPGRADE TO PRO VERSION', 'all-in-one-seo-pack'), '_blank' )
|
|
|
710 |
),
|
711 |
'support' => Array( 'type' => 'html', 'label' => 'none',
|
712 |
'default' => '<a target="_blank" href="http://semperplugins.com/support/">'
|
757 |
'help_link' => 'http://semperplugins.com/documentation/home-page-settings/',
|
758 |
'options' => Array( 'home_title', 'home_description', 'home_keywords', 'use_static_home_info' )
|
759 |
),
|
|
|
|
|
|
|
|
|
|
|
760 |
'title' => Array(
|
761 |
'name' => __( 'Title Settings', 'all-in-one-seo-pack' ),
|
762 |
'help_link' => 'http://semperplugins.com/documentation/title-settings/',
|
794 |
'name' => __( 'Advanced Settings', 'all-in-one-seo-pack' ),
|
795 |
'help_link' => 'http://semperplugins.com/documentation/advanced-settings/',
|
796 |
'options' => Array( 'generate_descriptions', 'skip_excerpt', 'run_shortcodes', 'hide_paginated_descriptions', 'dont_truncate_descriptions', 'unprotect_meta', 'ex_pages', 'post_meta_tags', 'page_meta_tags', 'front_meta_tags', 'home_meta_tags' )
|
797 |
+
),
|
798 |
+
'keywords' => Array(
|
799 |
+
'name' => __( 'Keyword Settings', 'all-in-one-seo-pack' ),
|
800 |
+
'help_link' => 'http://semperplugins.com/documentation/keyword-settings/',
|
801 |
+
'options' => Array( "togglekeywords", "use_categories", "use_tags_as_keywords", "dynamic_postspage_keywords" )
|
802 |
)
|
803 |
);
|
804 |
|
820 |
add_action('all_admin_notices', array( $this, 'visibility_warning'));
|
821 |
|
822 |
if(!AIOSEOPPRO){
|
823 |
+
// add_action('all_admin_notices', array( $this, 'woo_upgrade_notice'));
|
824 |
}
|
825 |
}
|
826 |
if(AIOSEOPPRO){
|
975 |
if ( strpos( $title_format, '%page_title%' ) !== false ) $title_format = str_replace( '%page_title%', $replace_title, $title_format );
|
976 |
if ( $w->is_category || $w->is_tag || $w->is_tax ) {
|
977 |
if(AIOSEOPPRO){
|
978 |
+
if ( !empty( $_GET ) && !empty( $_GET['taxonomy'] ) && !empty( $_GET['tag_ID'] ) && function_exists( 'wp_get_split_terms' ) ) {
|
979 |
+
$term_id = intval( $_GET['tag_ID'] );
|
980 |
$was_split = get_term_meta( $term_id, '_aioseop_term_was_split', true );
|
981 |
+
if ( !$was_split ) {
|
982 |
+
$split_terms = wp_get_split_terms( $term_id, $_GET['taxonomy'] );
|
983 |
+
if ( !empty( $split_terms ) ) {
|
984 |
+
foreach ( $split_terms as $new_tax => $new_term ) {
|
985 |
+
$this->split_shared_term( $term_id, $new_term );
|
986 |
+
}
|
987 |
+
}
|
988 |
}
|
989 |
}
|
990 |
}
|
|
|
|
|
991 |
if ( strpos( $title_format, '%category_title%' ) !== false ) $title_format = str_replace( '%category_title%', $replace_title, $title_format );
|
992 |
if ( strpos( $title_format, '%taxonomy_title%' ) !== false ) $title_format = str_replace( '%taxonomy_title%', $replace_title, $title_format );
|
993 |
} else {
|
1028 |
wp_enqueue_script( 'wp-pointer', false, array( 'jquery' ) );
|
1029 |
wp_enqueue_style( 'wp-pointer' );
|
1030 |
$this->add_admin_pointers();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1031 |
|
1032 |
+
|
1033 |
+
wp_enqueue_style( 'aiosp_admin_style' , AIOSEOP_PLUGIN_URL . 'css/aiosp_admin.css' );
|
1034 |
+
?>
|
|
|
|
|
|
|
|
|
|
|
1035 |
<script>
|
1036 |
function aioseop_show_pointer( handle, value ) {
|
1037 |
if ( typeof( jQuery ) != 'undefined' ) {
|
1215 |
);
|
1216 |
$this->pointers['aioseop_welcome_230'] = Array( 'pointer_target' => '#aioseop_top_button',
|
1217 |
'pointer_text' => '<h3>' . sprintf( __( 'Review Your Settings', 'all-in-one-seo-pack' ), AIOSEOP_VERSION )
|
1218 |
+
. '</h3><p>' . __( 'New in 2.4: Improved support for taxonomies, Woocommerce and massive performance improvements under the hood! Please review your settings on each options page!', 'all-in-one-seo-pack' ) . '</p>',
|
1219 |
'pointer_edge' => 'bottom',
|
1220 |
'pointer_align' => 'left',
|
1221 |
'pointer_scope' => 'local'
|
1253 |
|
1254 |
function filter_submit( $submit ) {
|
1255 |
$submit['Submit_Default']['value'] = __( 'Reset General Settings to Defaults', 'all-in-one-seo-pack' ) . ' »';
|
1256 |
+
$submit['Submit_All_Default'] = Array( 'type' => 'submit', 'class' => 'button-secondary', 'value' => __( 'Reset ALL Settings to Defaults', 'all-in-one-seo-pack' ) . ' »' );
|
1257 |
return $submit;
|
1258 |
}
|
1259 |
|
1443 |
return $options;
|
1444 |
}
|
1445 |
|
1446 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1447 |
|
1448 |
function get_queried_object() {
|
1449 |
static $p = null;
|
1750 |
|
1751 |
$aioseop_woo_upgrade_notice_dismissed = get_user_meta( get_current_user_id(), 'aioseop_woo_upgrade_notice_dismissed', true );
|
1752 |
|
1753 |
+
if ( class_exists( 'WooCommerce' ) && empty( $aioseop_woo_upgrade_notice_dismissed ) && current_user_can( 'manage_options' ) ) {
|
1754 |
|
1755 |
printf( '
|
1756 |
<div id="message" class="notice-info notice is-dismissible aioseop-notice woo-upgrade-notice">
|
1761 |
</p>
|
1762 |
</div>',
|
1763 |
__( 'We\'ve detected you\'re running WooCommerce.', 'all-in-one-seo-pack' ),
|
1764 |
+
sprintf( __( '%s Upgrade%s to All in One SEO Pack Pro for increased SEO compatibility for your products.', 'all-in-one-seo-pack' ), sprintf( '<a target="_blank" href="%s">', esc_url( 'http://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/?loc=woo' ) ), '</a>' ));
|
1765 |
|
1766 |
}elseif( !class_exists( 'WooCommerce' ) && !empty( $aioseop_woo_upgrade_notice_dismissed ) ){
|
1767 |
delete_user_meta( get_current_user_id(), 'aioseop_woo_upgrade_notice_dismissed' );
|
1915 |
}
|
1916 |
} elseif ( empty( $aioseop_options['aiosp_dynamic_postspage_keywords'] ) && $this->is_static_posts_page() ) {
|
1917 |
$keywords = stripslashes( $this->internationalize( $opts["aiosp_keywords"] ) ); // and if option = use page set keywords instead of keywords from recent posts
|
1918 |
+
} elseif ( ( $blog_page = aiosp_common::get_blog_page( $post ) ) && empty( $aioseop_options['aiosp_dynamic_postspage_keywords'] ) ) {
|
1919 |
$keywords = stripslashes( $this->internationalize( get_post_meta( $blog_page->ID, "_aioseop_keywords", true ) ) );
|
1920 |
} elseif ( empty( $aioseop_options['aiosp_dynamic_postspage_keywords'] ) && ( is_archive() || is_post_type_archive() ) ) {
|
1921 |
$keywords = "";
|
1936 |
return;
|
1937 |
}
|
1938 |
if ( is_home() && !is_front_page() ) {
|
1939 |
+
$post = aiosp_common::get_blog_page();
|
1940 |
} else {
|
1941 |
$post = $this->get_queried_object();
|
1942 |
}
|
1954 |
echo "[$this->title_start,$this->title_end] ";
|
1955 |
echo "-->\n";
|
1956 |
if ( AIOSEOPPRO ) echo "<!-- " . __( "Debug String", 'all-in-one-seo-pack' ) . ": " . $aioseop_update_checker->get_verification_code() . " -->\n";
|
1957 |
+
$blog_page = aiosp_common::get_blog_page( $post );
|
1958 |
$save_posts = $posts;
|
1959 |
if ( function_exists( 'woocommerce_get_page_id' ) && is_post_type_archive( 'product' ) && ( $post_id = woocommerce_get_page_id( 'shop' ) ) && ( $post = get_post( $post_id ) ) ) {
|
1960 |
global $posts;
|
2467 |
return $description;
|
2468 |
}
|
2469 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2470 |
|
2471 |
function get_aioseop_description( $post = null ) {
|
2472 |
global $aioseop_options;
|
2473 |
if ( $post === null )
|
2474 |
$post = $GLOBALS["post"];
|
2475 |
+
$blog_page = aiosp_common::get_blog_page();
|
2476 |
$description = '';
|
2477 |
if ( is_front_page() && empty( $aioseop_options['aiosp_use_static_home_info'] ) )
|
2478 |
$description = trim( ( $this->internationalize( $aioseop_options['aiosp_home_description'] ) ) );
|
3012 |
$title = $this->get_original_title();
|
3013 |
|
3014 |
//if we're going to have this here, which seems logical, we should probably take it out of other places... do all titles pass through here?
|
3015 |
+
// The following lines have been commented out to fix an error with Capitalize Titles as reported in the WP forums
|
3016 |
+
// if ( !empty( $aioseop_options['aiosp_cap_titles'] ) )
|
3017 |
+
// $title = $this->capitalize( $title );
|
3018 |
|
3019 |
return apply_filters( 'aioseop_title', $title );
|
3020 |
}
|
3312 |
$url = esc_url( admin_url( 'admin.php?page=' . $menu_slug ) );
|
3313 |
|
3314 |
$wp_admin_bar->add_menu( array( 'id' => AIOSEOP_PLUGIN_DIRNAME, 'title' => __( 'SEO', 'all-in-one-seo-pack' ), 'href' => $url ) );
|
3315 |
+
|
3316 |
+
if ( current_user_can( 'update_plugins' ) && !AIOSEOPPRO ){
|
3317 |
+
$wp_admin_bar->add_menu( array( 'parent' => AIOSEOP_PLUGIN_DIRNAME, 'title' => __( 'Upgrade To Pro', 'all-in-one-seo-pack' ), 'id' => 'aioseop-pro-upgrade', 'href' => 'http://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/?loc=menu', 'meta' => Array( 'target' => '_blank' ) ) );
|
3318 |
+
// add_action( 'admin_bar_menu', array( $this, 'admin_bar_upgrade_menu' ), 1101 );
|
3319 |
+
}
|
3320 |
+
|
3321 |
$aioseop_admin_menu = 1;
|
3322 |
if ( !is_admin() && !empty( $post ) ) {
|
3323 |
+
$blog_page = aiosp_common::get_blog_page( $post );
|
3324 |
if ( !empty( $blog_page ) ) $post = $blog_page;
|
3325 |
$wp_admin_bar->add_menu( array( 'id' => 'aiosp_edit_' . $post->ID, 'parent' => AIOSEOP_PLUGIN_DIRNAME, 'title' => __( 'Edit SEO', 'all-in-one-seo-pack' ), 'href' => get_edit_post_link( $post->ID ) . '#aiosp' ) );
|
3326 |
}
|
3327 |
}
|
3328 |
}
|
3329 |
|
3330 |
+
|
|
|
|
|
|
|
3331 |
|
3332 |
function menu_order() {
|
3333 |
return 5;
|
3468 |
else
|
3469 |
add_utility_page( $menu_name, $menu_name, apply_filters( 'manage_aiosp', 'aiosp_manage_seo' ), $file, Array( $this, 'display_settings_page' ) );
|
3470 |
|
3471 |
+
add_meta_box('aioseop-list', __( "Join Our Mailing List", 'all-in-one-seo-pack' ), array( 'aiosp_metaboxes', 'display_extra_metaboxes'), 'aioseop_metaboxes', 'normal', 'core');
|
3472 |
if ( AIOSEOPPRO ){
|
3473 |
+
add_meta_box('aioseop-about', __( "About", 'all-in-one-seo-pack' ), array( 'aiosp_metaboxes', 'display_extra_metaboxes'), 'aioseop_metaboxes', 'side', 'core');
|
3474 |
} else {
|
3475 |
+
add_meta_box('aioseop-about', "About <span class='Taha' style='float:right;'>Version <b>" . AIOSEOP_VERSION . "</b></span>", array( 'aiosp_metaboxes', 'display_extra_metaboxes'), 'aioseop_metaboxes', 'side', 'core');
|
3476 |
}
|
3477 |
+
add_meta_box('aioseop-support', __( "Support", 'all-in-one-seo-pack' ) . " <span class='Taha' style='float:right;'>" . __( "Version", 'all-in-one-seo-pack' ) . " <b>" . AIOSEOP_VERSION . "</b></span>", array( 'aiosp_metaboxes', 'display_extra_metaboxes'), 'aioseop_metaboxes', 'side', 'core');
|
3478 |
|
3479 |
add_action( 'aioseop_modules_add_menus', Array( $this, 'add_menu' ), 5 );
|
3480 |
do_action( 'aioseop_modules_add_menus', $file );
|
3617 |
</div>
|
3618 |
<?php
|
3619 |
}
|
3620 |
+
|
3621 |
+
}
|
all_in_one_seo_pack.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: All In One SEO Pack
|
4 |
Plugin URI: http://semperfiwebdesign.com
|
5 |
Description: Out-of-the-box SEO for your WordPress blog. Features like XML Sitemaps, SEO for custom post types, SEO for blogs or business sites, SEO for ecommerce sites, and much more. Almost 30 million downloads since 2007.
|
6 |
-
Version: 2.3.
|
7 |
Author: Michael Torbert
|
8 |
Author URI: http://michaeltorbert.com
|
9 |
Text Domain: all-in-one-seo-pack
|
@@ -29,27 +29,48 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
29 |
|
30 |
/**
|
31 |
* @package All-in-One-SEO-Pack
|
32 |
-
* @version 2.3.
|
33 |
*/
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
if ( ! defined( 'ABSPATH' ) ) return;
|
36 |
|
37 |
-
define('AIOSEOPPRO', false);
|
38 |
|
39 |
-
|
40 |
-
|
|
|
|
|
|
|
|
|
41 |
if ( ! defined( 'AIOSEOP_PLUGIN_NAME' ) ) define( 'AIOSEOP_PLUGIN_NAME', $aioseop_plugin_name );
|
42 |
-
|
43 |
|
44 |
//register_activation_hook(__FILE__,'aioseop_activate_pl');
|
45 |
|
46 |
if ( ! defined( 'AIOSEOP_PLUGIN_DIR' ) ) {
|
47 |
define( 'AIOSEOP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
48 |
} elseif ( AIOSEOP_PLUGIN_DIR != plugin_dir_path( __FILE__ ) ) {
|
|
|
|
|
|
|
49 |
add_action( 'admin_notices', create_function( '', 'echo "' . "<div class='error'>" . sprintf(
|
50 |
__( "%s detected a conflict; please deactivate the plugin located in %s.", 'all-in-one-seo-pack' ),
|
51 |
$aioseop_plugin_name, AIOSEOP_PLUGIN_DIR ) . "</div>" . '";' ) );
|
|
|
|
|
52 |
return;
|
|
|
|
|
53 |
}
|
54 |
|
55 |
if ( ! defined( 'AIOSEOP_PLUGIN_BASENAME' ) )
|
@@ -174,6 +195,8 @@ if ( !function_exists( 'aioseop_activate' ) ) {
|
|
174 |
$aiosp_activation = true;
|
175 |
delete_transient( "aioseop_oauth_current" );
|
176 |
|
|
|
|
|
177 |
if ( AIOSEOPPRO ){
|
178 |
$aioseop_update_checker->checkForUpdates();
|
179 |
}
|
@@ -181,11 +204,52 @@ if ( !function_exists( 'aioseop_activate' ) ) {
|
|
181 |
}
|
182 |
|
183 |
add_action( 'plugins_loaded', 'aioseop_init_class' );
|
184 |
-
add_filter( 'plugin_action_links_' . plugin_basename(__FILE__) , 'sfwd_add_action_links', 10, 2 );
|
185 |
-
//add_filter( 'plugin_row_meta', 'sfwd_plugin_row_meta', 10, 2 );
|
186 |
-
|
187 |
|
188 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
|
190 |
$aioseop_plugin_dirname = AIOSEOP_PLUGIN_DIRNAME;
|
191 |
$action_links = Array();
|
@@ -218,35 +282,13 @@ $action_links['proupgrade'] =
|
|
218 |
);
|
219 |
}
|
220 |
|
221 |
-
return
|
222 |
}
|
223 |
-
|
224 |
-
function sfwd_plugin_row_meta( $actions, $plugin_file ) {
|
225 |
-
|
226 |
-
if(!AIOSEOPPRO){
|
227 |
-
|
228 |
-
$action_links = array(
|
229 |
-
'donatelink' => array(
|
230 |
-
'label' => __('Donate', 'all-in-one-seo-pack'),
|
231 |
-
'url' => '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'
|
232 |
-
)
|
233 |
-
,
|
234 |
-
'amazon' => array(
|
235 |
-
'label' => __('Amazon Wishlist', 'all-in-one-seo-pack'),
|
236 |
-
'url' => 'https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web'
|
237 |
-
)
|
238 |
-
|
239 |
-
|
240 |
-
);
|
241 |
-
|
242 |
-
}else{
|
243 |
-
$action_links = '';
|
244 |
}
|
245 |
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
function sfwd_action_links ( $actions, $plugin_file, $action_links = array(), $position = 'after' ) {
|
250 |
static $plugin;
|
251 |
if( !isset($plugin) ) {
|
252 |
$plugin = plugin_basename( __FILE__ );
|
@@ -263,22 +305,34 @@ function sfwd_action_links ( $actions, $plugin_file, $action_links = array(),
|
|
263 |
}// if
|
264 |
return $actions;
|
265 |
}
|
266 |
-
|
267 |
if ( !function_exists( 'aioseop_init_class' ) ) {
|
268 |
function aioseop_init_class() {
|
269 |
global $aiosp;
|
270 |
load_plugin_textdomain( 'all-in-one-seo-pack', false, dirname( plugin_basename( __FILE__ ) ) . '/i18n/' );
|
271 |
require_once( AIOSEOP_PLUGIN_DIR . 'inc/aioseop_functions.php' );
|
272 |
require_once( AIOSEOP_PLUGIN_DIR . 'aioseop_class.php' );
|
|
|
273 |
require_once( AIOSEOP_PLUGIN_DIR . 'inc/commonstrings.php');
|
274 |
require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/postedit.php');
|
|
|
|
|
|
|
275 |
|
276 |
if( AIOSEOPPRO ){
|
277 |
require_once( AIOSEOP_PLUGIN_DIR . 'pro/functions_general.php' );
|
278 |
require_once( AIOSEOP_PLUGIN_DIR . 'pro/functions_class.php');
|
|
|
279 |
}
|
280 |
-
|
281 |
$aiosp = new All_in_One_SEO_Pack();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
|
283 |
if ( aioseop_option_isset( 'aiosp_unprotect_meta' ) )
|
284 |
add_filter( 'is_protected_meta', 'aioseop_unprotect_meta', 10, 3 );
|
@@ -287,6 +341,7 @@ if ( !function_exists( 'aioseop_init_class' ) ) {
|
|
287 |
|
288 |
|
289 |
add_action( 'init', array( $aiosp, 'add_hooks' ) );
|
|
|
290 |
|
291 |
if ( defined( 'DOING_AJAX' ) && !empty( $_POST ) && !empty( $_POST['action'] ) && ( $_POST['action'] === 'aioseop_ajax_scan_header' ) ) {
|
292 |
remove_action( 'init', array( $aiosp, 'add_hooks' ) );
|
@@ -313,7 +368,8 @@ if ( is_admin() ) {
|
|
313 |
}
|
314 |
add_action( 'wp_ajax_aioseop_ajax_save_settings', 'aioseop_ajax_save_settings');
|
315 |
add_action( 'wp_ajax_aioseop_ajax_get_menu_links', 'aioseop_ajax_get_menu_links');
|
316 |
-
add_action( '
|
|
|
317 |
add_action( 'wp_ajax_aioseo_dismiss_woo_upgrade_notice' , 'aioseop_woo_upgrade_notice_dismissed');
|
318 |
if(AIOSEOPPRO){
|
319 |
add_action( 'wp_ajax_aioseop_ajax_update_oembed', 'aioseop_ajax_update_oembed' );
|
@@ -333,8 +389,17 @@ if ( !function_exists( 'aioseop_scan_post_header' ) ) {
|
|
333 |
require_once( AIOSEOP_PLUGIN_DIR . 'aioseop_init.php' );
|
334 |
|
335 |
|
336 |
-
|
|
|
337 |
|
338 |
-
function
|
339 |
aioseop_activate();
|
340 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
Plugin Name: All In One SEO Pack
|
4 |
Plugin URI: http://semperfiwebdesign.com
|
5 |
Description: Out-of-the-box SEO for your WordPress blog. Features like XML Sitemaps, SEO for custom post types, SEO for blogs or business sites, SEO for ecommerce sites, and much more. Almost 30 million downloads since 2007.
|
6 |
+
Version: 2.3.3
|
7 |
Author: Michael Torbert
|
8 |
Author URI: http://michaeltorbert.com
|
9 |
Text Domain: all-in-one-seo-pack
|
29 |
|
30 |
/**
|
31 |
* @package All-in-One-SEO-Pack
|
32 |
+
* @version 2.3.3
|
33 |
*/
|
34 |
|
35 |
+
if(!defined('AIOSEOPPRO')) define('AIOSEOPPRO', false);
|
36 |
+
if ( ! defined( 'AIOSEOP_VERSION' ) ) define( 'AIOSEOP_VERSION', '2.3.3' );
|
37 |
+
global $aioseop_plugin_name;
|
38 |
+
$aioseop_plugin_name = 'All in One SEO Pack';
|
39 |
+
|
40 |
+
/*******
|
41 |
+
*
|
42 |
+
* All in One SEO Pack
|
43 |
+
*
|
44 |
+
*******/
|
45 |
+
|
46 |
if ( ! defined( 'ABSPATH' ) ) return;
|
47 |
|
|
|
48 |
|
49 |
+
if( AIOSEOPPRO ){
|
50 |
+
|
51 |
+
add_action( 'admin_init', 'disable_all_in_one_free', 1 );
|
52 |
+
|
53 |
+
}
|
54 |
+
|
55 |
if ( ! defined( 'AIOSEOP_PLUGIN_NAME' ) ) define( 'AIOSEOP_PLUGIN_NAME', $aioseop_plugin_name );
|
56 |
+
|
57 |
|
58 |
//register_activation_hook(__FILE__,'aioseop_activate_pl');
|
59 |
|
60 |
if ( ! defined( 'AIOSEOP_PLUGIN_DIR' ) ) {
|
61 |
define( 'AIOSEOP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
62 |
} elseif ( AIOSEOP_PLUGIN_DIR != plugin_dir_path( __FILE__ ) ) {
|
63 |
+
|
64 |
+
//this is not a great message
|
65 |
+
/*
|
66 |
add_action( 'admin_notices', create_function( '', 'echo "' . "<div class='error'>" . sprintf(
|
67 |
__( "%s detected a conflict; please deactivate the plugin located in %s.", 'all-in-one-seo-pack' ),
|
68 |
$aioseop_plugin_name, AIOSEOP_PLUGIN_DIR ) . "</div>" . '";' ) );
|
69 |
+
*/
|
70 |
+
|
71 |
return;
|
72 |
+
|
73 |
+
|
74 |
}
|
75 |
|
76 |
if ( ! defined( 'AIOSEOP_PLUGIN_BASENAME' ) )
|
195 |
$aiosp_activation = true;
|
196 |
delete_transient( "aioseop_oauth_current" );
|
197 |
|
198 |
+
delete_user_meta( get_current_user_id(), 'aioseop_yst_detected_notice_dismissed' );
|
199 |
+
|
200 |
if ( AIOSEOPPRO ){
|
201 |
$aioseop_update_checker->checkForUpdates();
|
202 |
}
|
204 |
}
|
205 |
|
206 |
add_action( 'plugins_loaded', 'aioseop_init_class' );
|
|
|
|
|
|
|
207 |
|
208 |
+
|
209 |
+
|
210 |
+
if(!function_exists('aiosp_plugin_row_meta')){
|
211 |
+
|
212 |
+
add_filter( 'plugin_row_meta', 'aiosp_plugin_row_meta', 10, 2 );
|
213 |
+
|
214 |
+
function aiosp_plugin_row_meta( $actions, $plugin_file ) {
|
215 |
+
|
216 |
+
if(!AIOSEOPPRO){
|
217 |
+
|
218 |
+
$action_links = array(
|
219 |
+
'donatelink' => array(
|
220 |
+
'label' => __('Donate', 'all-in-one-seo-pack'),
|
221 |
+
'url' => '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'
|
222 |
+
)
|
223 |
+
,
|
224 |
+
'amazon' => array(
|
225 |
+
'label' => __('Amazon Wishlist', 'all-in-one-seo-pack'),
|
226 |
+
'url' => 'https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web'
|
227 |
+
)
|
228 |
+
|
229 |
+
|
230 |
+
);
|
231 |
+
|
232 |
+
}else{
|
233 |
+
$action_links = '';
|
234 |
+
}
|
235 |
+
|
236 |
+
return aiosp_action_links( $actions, $plugin_file, $action_links, 'after');
|
237 |
+
}
|
238 |
+
}
|
239 |
+
|
240 |
+
|
241 |
+
|
242 |
+
|
243 |
+
|
244 |
+
|
245 |
+
if(!function_exists('aiosp_add_action_links')) {
|
246 |
+
|
247 |
+
|
248 |
+
add_filter( 'plugin_action_links_' . plugin_basename(__FILE__) , 'aiosp_add_action_links', 10, 2 );
|
249 |
+
|
250 |
+
|
251 |
+
|
252 |
+
function aiosp_add_action_links( $actions, $plugin_file ) {
|
253 |
|
254 |
$aioseop_plugin_dirname = AIOSEOP_PLUGIN_DIRNAME;
|
255 |
$action_links = Array();
|
282 |
);
|
283 |
}
|
284 |
|
285 |
+
return aiosp_action_links( $actions, $plugin_file, $action_links, 'before');
|
286 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
}
|
288 |
|
289 |
+
if(!function_exists('aiosp_action_links')) {
|
290 |
+
|
291 |
+
function aiosp_action_links ( $actions, $plugin_file, $action_links = array(), $position = 'after' ) {
|
|
|
292 |
static $plugin;
|
293 |
if( !isset($plugin) ) {
|
294 |
$plugin = plugin_basename( __FILE__ );
|
305 |
}// if
|
306 |
return $actions;
|
307 |
}
|
308 |
+
}
|
309 |
if ( !function_exists( 'aioseop_init_class' ) ) {
|
310 |
function aioseop_init_class() {
|
311 |
global $aiosp;
|
312 |
load_plugin_textdomain( 'all-in-one-seo-pack', false, dirname( plugin_basename( __FILE__ ) ) . '/i18n/' );
|
313 |
require_once( AIOSEOP_PLUGIN_DIR . 'inc/aioseop_functions.php' );
|
314 |
require_once( AIOSEOP_PLUGIN_DIR . 'aioseop_class.php' );
|
315 |
+
require_once( AIOSEOP_PLUGIN_DIR . 'inc/aioseop_updates_class.php');
|
316 |
require_once( AIOSEOP_PLUGIN_DIR . 'inc/commonstrings.php');
|
317 |
require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/postedit.php');
|
318 |
+
require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/general-metaboxes.php');
|
319 |
+
require_once( AIOSEOP_PLUGIN_DIR . 'inc/aiosp_common.php');
|
320 |
+
require_once( AIOSEOP_PLUGIN_DIR . 'admin/meta_import.php');
|
321 |
|
322 |
if( AIOSEOPPRO ){
|
323 |
require_once( AIOSEOP_PLUGIN_DIR . 'pro/functions_general.php' );
|
324 |
require_once( AIOSEOP_PLUGIN_DIR . 'pro/functions_class.php');
|
325 |
+
require_once( AIOSEOP_PLUGIN_DIR . 'pro/aioseop_pro_updates_class.php');
|
326 |
}
|
327 |
+
seodt_init();
|
328 |
$aiosp = new All_in_One_SEO_Pack();
|
329 |
+
|
330 |
+
$aioseop_updates = new AIOSEOP_Updates();
|
331 |
+
|
332 |
+
if( AIOSEOPPRO ){
|
333 |
+
$aioseop_pro_updates = new AIOSEOP_Pro_Updates();
|
334 |
+
add_action( 'admin_init', array( $aioseop_pro_updates, 'version_updates' ), 12 );
|
335 |
+
}
|
336 |
|
337 |
if ( aioseop_option_isset( 'aiosp_unprotect_meta' ) )
|
338 |
add_filter( 'is_protected_meta', 'aioseop_unprotect_meta', 10, 3 );
|
341 |
|
342 |
|
343 |
add_action( 'init', array( $aiosp, 'add_hooks' ) );
|
344 |
+
add_action( 'admin_init', array( $aioseop_updates, 'version_updates' ), 11 );
|
345 |
|
346 |
if ( defined( 'DOING_AJAX' ) && !empty( $_POST ) && !empty( $_POST['action'] ) && ( $_POST['action'] === 'aioseop_ajax_scan_header' ) ) {
|
347 |
remove_action( 'init', array( $aiosp, 'add_hooks' ) );
|
368 |
}
|
369 |
add_action( 'wp_ajax_aioseop_ajax_save_settings', 'aioseop_ajax_save_settings');
|
370 |
add_action( 'wp_ajax_aioseop_ajax_get_menu_links', 'aioseop_ajax_get_menu_links');
|
371 |
+
add_action( 'wp_ajax_aioseo_dismiss_yst_notice' , 'aioseop_update_yst_detected_notice');
|
372 |
+
add_action( 'wp_ajax_aioseo_dismiss_visibility_notice' , 'aioseop_update_user_visibilitynotice');
|
373 |
add_action( 'wp_ajax_aioseo_dismiss_woo_upgrade_notice' , 'aioseop_woo_upgrade_notice_dismissed');
|
374 |
if(AIOSEOPPRO){
|
375 |
add_action( 'wp_ajax_aioseop_ajax_update_oembed', 'aioseop_ajax_update_oembed' );
|
389 |
require_once( AIOSEOP_PLUGIN_DIR . 'aioseop_init.php' );
|
390 |
|
391 |
|
392 |
+
if(!function_exists('aioseop_install')){
|
393 |
+
register_activation_hook( __FILE__, 'aioseop_install' );
|
394 |
|
395 |
+
function aioseop_install(){
|
396 |
aioseop_activate();
|
397 |
}
|
398 |
+
}
|
399 |
+
|
400 |
+
if(!function_exists('disable_all_in_one_free')){
|
401 |
+
function disable_all_in_one_free(){
|
402 |
+
if ( AIOSEOPPRO && is_plugin_active( 'all-in-one-seo-pack/all_in_one_seo_pack.php' )){
|
403 |
+
deactivate_plugins( 'all-in-one-seo-pack/all_in_one_seo_pack.php' );
|
404 |
+
}
|
405 |
+
}}
|
css/aiosp_admin.css
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#toplevel_page_all-in-one-seo-pack-pro-aioseop_class .wp-menu-image {
|
2 |
+
background: url(../images/shield-sprite-16.png) no-repeat 8px 6px !important;
|
3 |
+
}
|
4 |
+
#toplevel_page_all-in-one-seo-pack-aioseop_class .wp-menu-image {
|
5 |
+
background: url(../images/shield-sprite-16.png) no-repeat 8px 6px !important;
|
6 |
+
}
|
7 |
+
#toplevel_page_all-in-one-seo-pack-pro-aioseop_class .wp-menu-image img {
|
8 |
+
display: none;
|
9 |
+
}
|
10 |
+
#toplevel_page_all-in-one-seo-pack-aioseop_class .wp-menu-image img {
|
11 |
+
display: none;
|
12 |
+
}
|
13 |
+
#adminmenu #toplevel_page_all-in-one-seo-pack-pro-aioseop_class .wp-menu-image:before {
|
14 |
+
content: '';
|
15 |
+
}
|
16 |
+
#toplevel_page_all-in-one-seo-pack-aioseop_class .wp-menu-image:before {
|
17 |
+
content: '' !important;
|
18 |
+
}
|
19 |
+
#toplevel_page_all-in-one-seo-pack-pro-aioseop_class:hover .wp-menu-image, #toplevel_page_all-in-one-seo-pack-pro-aioseop_class.wp-has-current-submenu .wp-menu-image {
|
20 |
+
background-position: 8px -26px !important;
|
21 |
+
}
|
22 |
+
#toplevel_page_all-in-one-seo-pack-aioseop_class:hover .wp-menu-image, #toplevel_page_all-in-one-seo-pack-aioseop_class.wp-has-current-submenu .wp-menu-image {
|
23 |
+
background-position: 8px -26px !important;
|
24 |
+
}
|
25 |
+
#icon-aioseop.icon32 {
|
26 |
+
background: url(../images/shield32.png) no-repeat left top !important;
|
27 |
+
}
|
28 |
+
#aioseop_settings_header #message {
|
29 |
+
padding: 5px 0px 5px 50px;
|
30 |
+
background-image: url(../images/update32.png);
|
31 |
+
background-repeat: no-repeat;
|
32 |
+
background-position: 10px;
|
33 |
+
font-size: 14px;
|
34 |
+
min-height: 32px;
|
35 |
+
clear: none;
|
36 |
+
}
|
37 |
+
|
38 |
+
@media
|
39 |
+
only screen and (-webkit-min-device-pixel-ratio: 1.5),
|
40 |
+
only screen and ( min--moz-device-pixel-ratio: 1.5),
|
41 |
+
only screen and ( -o-min-device-pixel-ratio: 3/2),
|
42 |
+
only screen and ( min-device-pixel-ratio: 1.5),
|
43 |
+
only screen and ( min-resolution: 1.5dppx) {
|
44 |
+
|
45 |
+
#toplevel_page_all-in-one-seo-pack-pro-aioseop_class .wp-menu-image {
|
46 |
+
background-image: url('../images/shield-sprite-32.png') !important;
|
47 |
+
-webkit-background-size: 16px 48px !important;
|
48 |
+
-moz-background-size: 16px 48px !important;
|
49 |
+
background-size: 16px 48px !important;
|
50 |
+
}
|
51 |
+
|
52 |
+
#toplevel_page_all-in-one-seo-pack-aioseop_class .wp-menu-image {
|
53 |
+
background-image: url('../images/shield-sprite-32.png') !important;
|
54 |
+
-webkit-background-size: 16px 48px !important;
|
55 |
+
-moz-background-size: 16px 48px !important;
|
56 |
+
background-size: 16px 48px !important;
|
57 |
+
}
|
58 |
+
|
59 |
+
#icon-aioseop.icon32 {
|
60 |
+
background-image: url('../images/shield64.png') !important;
|
61 |
+
-webkit-background-size: 32px 32px !important;
|
62 |
+
-moz-background-size: 32px 32px !important;
|
63 |
+
background-size: 32px 32px !important;
|
64 |
+
}
|
65 |
+
|
66 |
+
#aioseop_settings_header #message {
|
67 |
+
background-image: url(../images/update64.png) !important;
|
68 |
+
-webkit-background-size: 32px 32px !important;
|
69 |
+
-moz-background-size: 32px 32px !important;
|
70 |
+
background-size: 32px 32px !important;
|
71 |
+
}
|
72 |
+
}
|
i18n/all-in-one-seo-pack-af.mo
ADDED
Binary file
|
i18n/all-in-one-seo-pack-ary.mo
ADDED
Binary file
|
i18n/all-in-one-seo-pack-bg_BG.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-ca.mo
ADDED
Binary file
|
i18n/all-in-one-seo-pack-da_DK.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-de_DE.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-el.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-en_AU.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-en_CA.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-en_GB.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-en_NZ.mo
ADDED
Binary file
|
i18n/all-in-one-seo-pack-es_ES.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-et.mo
ADDED
Binary file
|
i18n/all-in-one-seo-pack-fi.mo
ADDED
Binary file
|
i18n/all-in-one-seo-pack-fr_FR.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-hi_IN.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-hr.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-hy
ADDED
Binary file
|
i18n/all-in-one-seo-pack-id_ID.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-it_IT.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-ja.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-ko_KR.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-nb_NO.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-nl_NL.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-nn_NO.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-pl_PL.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-pt_BR.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-pt_PT.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-ro_RO.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-ru_RU.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-sl_SL.mo
ADDED
Binary file
|
i18n/all-in-one-seo-pack-sr_RS.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-sv_SE.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-tr_TR.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-ur.mo
ADDED
Binary file
|
i18n/all-in-one-seo-pack-vi.mo
CHANGED
Binary file
|
i18n/all-in-one-seo-pack-zh_CH.mo
ADDED
Binary file
|
inc/aioseop_functions.php
CHANGED
@@ -780,7 +780,13 @@ function aioseop_update_user_visibilitynotice(){
|
|
780 |
update_user_meta( get_current_user_id(), 'aioseop_visibility_notice_dismissed', true );
|
781 |
|
782 |
}
|
783 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
784 |
function aioseop_woo_upgrade_notice_dismissed(){
|
785 |
|
786 |
update_user_meta( get_current_user_id(), 'aioseop_woo_upgrade_notice_dismissed', true );
|
780 |
update_user_meta( get_current_user_id(), 'aioseop_visibility_notice_dismissed', true );
|
781 |
|
782 |
}
|
783 |
+
|
784 |
+
function aioseop_update_yst_detected_notice(){
|
785 |
+
|
786 |
+
update_user_meta( get_current_user_id(), 'aioseop_yst_detected_notice_dismissed', true );
|
787 |
+
|
788 |
+
}
|
789 |
+
|
790 |
function aioseop_woo_upgrade_notice_dismissed(){
|
791 |
|
792 |
update_user_meta( get_current_user_id(), 'aioseop_woo_upgrade_notice_dismissed', true );
|
inc/aioseop_updates_class.php
ADDED
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package All-in-One-SEO-Pack
|
4 |
+
*/
|
5 |
+
|
6 |
+
/**
|
7 |
+
* AIOSEOP Updates class.
|
8 |
+
*
|
9 |
+
* Handle detection of new plugin version updates, migration of old settings,
|
10 |
+
* new WP core feature support, etc.
|
11 |
+
*/
|
12 |
+
class aioseop_updates {
|
13 |
+
/**
|
14 |
+
* Constructor
|
15 |
+
*/
|
16 |
+
function __construct() {
|
17 |
+
}
|
18 |
+
|
19 |
+
function version_updates() {
|
20 |
+
global $aiosp, $aioseop_options;
|
21 |
+
if ( empty( $aioseop_options ) ) {
|
22 |
+
$aioseop_options = get_option( $aioseop_options );
|
23 |
+
if ( empty( $aioseop_options ) ) {
|
24 |
+
// something's wrong. bail.
|
25 |
+
return;
|
26 |
+
}
|
27 |
+
}
|
28 |
+
|
29 |
+
// Last known running plugin version
|
30 |
+
$last_active_version = isset( $aioseop_options['last_active_version'] ) ? $aioseop_options['last_active_version'] : '0.0';
|
31 |
+
|
32 |
+
// See if we are running a newer version than last time we checked.
|
33 |
+
if ( version_compare( $aioseop_options['last_active_version'], AIOSEOP_VERSION, '<' ) ) {
|
34 |
+
|
35 |
+
// Do upgrades based on previous version
|
36 |
+
$this->do_version_updates( $last_active_version );
|
37 |
+
|
38 |
+
// If we're running Pro, let the Pro updater set the version.
|
39 |
+
if ( !AIOSEOPPRO ) {
|
40 |
+
// Save the current plugin version as the new last_active_version
|
41 |
+
$aioseop_options['last_active_version'] = AIOSEOP_VERSION;
|
42 |
+
$aiosp->update_class_option( $aioseop_options );
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Perform updates that are dependent on external factors, not
|
48 |
+
* just the plugin version.
|
49 |
+
*/
|
50 |
+
$this->do_feature_updates();
|
51 |
+
|
52 |
+
}
|
53 |
+
|
54 |
+
function do_version_updates( $old_version ) {
|
55 |
+
global $aioseop_options;
|
56 |
+
|
57 |
+
if (
|
58 |
+
( !AIOSEOPPRO && version_compare( $old_version, '2.3.3', '<' ) ) ||
|
59 |
+
( AIOSEOPPRO && version_compare( $old_version, '2.4.3', '<' ) )
|
60 |
+
) {
|
61 |
+
$this->bad_bots_201603();
|
62 |
+
}
|
63 |
+
|
64 |
+
/*
|
65 |
+
if (
|
66 |
+
( !AIOSEOPPRO && version_compare( $old_version, '2.4', '<' ) ) ||
|
67 |
+
( AIOSEOPPRO && version_compare( $old_version, '2.5', '<' ) )
|
68 |
+
) {
|
69 |
+
// Do changes needed for 2.4/2.5... etc
|
70 |
+
}
|
71 |
+
*/
|
72 |
+
}
|
73 |
+
|
74 |
+
function do_feature_updates() {
|
75 |
+
global $aioseop_options;
|
76 |
+
|
77 |
+
// We don't need to check all the time. Use a transient to limit frequency.
|
78 |
+
if ( get_site_transient( 'aioseop_update_check_time' ) ) return;
|
79 |
+
|
80 |
+
// If we're running Pro, let the Pro updater set the transient.
|
81 |
+
if ( !AIOSEOPPRO ) {
|
82 |
+
// We haven't checked recently. Reset the timestamp, timeout 6 hours.
|
83 |
+
set_site_transient( 'aioseop_update_check_time', time(), apply_filters( 'aioseop_update_check_time', 3600 * 6 ) );
|
84 |
+
}
|
85 |
+
|
86 |
+
/*
|
87 |
+
if ( ! ( isset( $aioseop_options['version_feature_flags']['FEATURE_NAME'] ) &&
|
88 |
+
$aioseop_options['version_feature_flags']['FEATURE_NAME'] === 'yes' ) ) {
|
89 |
+
$this->some_feature_update_method(); // sets flag to 'yes' on completion.
|
90 |
+
}
|
91 |
+
*/
|
92 |
+
}
|
93 |
+
|
94 |
+
/*
|
95 |
+
* Functions for specific version milestones
|
96 |
+
*/
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Remove overzealous 'DOC' entry which is causing false-positive bad
|
100 |
+
* bot blocking.
|
101 |
+
*/
|
102 |
+
function bad_bots_201603() {
|
103 |
+
global $aiosp, $aioseop_options;
|
104 |
+
// Remove 'DOC' from bad bots list to avoid false positives
|
105 |
+
if ( isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] ) ) {
|
106 |
+
$list = $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'];
|
107 |
+
$list = str_replace(array( "DOC\r\n", "DOC\n"), '', $list);
|
108 |
+
$aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
|
109 |
+
update_option( 'aioseop_options', $aioseop_options );
|
110 |
+
$aiosp->update_class_option( $aioseop_options );
|
111 |
+
|
112 |
+
if ( isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_htaccess_rules'] ) ){
|
113 |
+
|
114 |
+
if(!class_exists('All_in_One_SEO_Pack_Bad_Robots')){
|
115 |
+
require_once( AIOSEOP_PLUGIN_DIR . 'admin/aioseop_module_class.php');
|
116 |
+
require_once( AIOSEOP_PLUGIN_DIR . 'modules/aioseop_bad_robots.php');
|
117 |
+
}
|
118 |
+
|
119 |
+
$aiosp_reset_htaccess = new All_in_One_SEO_Pack_Bad_Robots;
|
120 |
+
$aiosp_reset_htaccess->generate_htaccess_blocklist();
|
121 |
+
}
|
122 |
+
|
123 |
+
if ( !isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_htaccess_rules'] ) && extract_from_markers( get_home_path() . '.htaccess', 'Bad Bot Blocker' ) ){
|
124 |
+
insert_with_markers( get_home_path() . '.htaccess', 'Bad Bot Blocker', '' );
|
125 |
+
}
|
126 |
+
}
|
127 |
+
}
|
128 |
+
}
|
inc/aiosp_common.php
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @package All-in-One-SEO-Pack
|
5 |
+
*/
|
6 |
+
|
7 |
+
class aiosp_common {
|
8 |
+
|
9 |
+
function __construct(){
|
10 |
+
//construct
|
11 |
+
}
|
12 |
+
|
13 |
+
|
14 |
+
static function get_blog_page( $p = null ) {
|
15 |
+
static $blog_page = '';
|
16 |
+
static $page_for_posts = '';
|
17 |
+
if ( $p === null ) {
|
18 |
+
global $post;
|
19 |
+
} else {
|
20 |
+
$post = $p;
|
21 |
+
}
|
22 |
+
if ( $blog_page === '' ) {
|
23 |
+
if ( $page_for_posts === '' ) $page_for_posts = get_option( 'page_for_posts' );
|
24 |
+
if ( $page_for_posts && is_home() && ( !is_object( $post ) || ( $page_for_posts != $post->ID ) ) )
|
25 |
+
$blog_page = get_post( $page_for_posts );
|
26 |
+
}
|
27 |
+
return $blog_page;
|
28 |
+
}
|
29 |
+
|
30 |
+
static function get_upgrade_hyperlink( $location = '', $title = '', $anchor = '', $target = '', $class = '', $id = '' ){
|
31 |
+
|
32 |
+
$affiliate_id = '';
|
33 |
+
|
34 |
+
//call during plugins_loaded
|
35 |
+
$affiliate_id = apply_filters( 'aiosp_aff_id' , $affiliate_id );
|
36 |
+
|
37 |
+
|
38 |
+
//build URL
|
39 |
+
$url = 'http://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/';
|
40 |
+
if( $location ) $url .= '?loc=' . $location;
|
41 |
+
if( $affiliate_id ) $url .= "?ap_id=$affiliate_id";
|
42 |
+
|
43 |
+
|
44 |
+
//build hyperlink
|
45 |
+
$hyperlink = '<a ';
|
46 |
+
if( $target ) $hyperlink .= "target=\"$target\" ";
|
47 |
+
if( $title ) $hyperlink .= "title=\"$title\" ";
|
48 |
+
$hyperlink .= "href=\"$url\">$title</a>";
|
49 |
+
|
50 |
+
return $hyperlink;
|
51 |
+
}
|
52 |
+
|
53 |
+
static function get_upgrade_url(){
|
54 |
+
//put build URL stuff in here
|
55 |
+
}
|
56 |
+
|
57 |
+
}
|
js/quickedit_functions.js
CHANGED
@@ -9,6 +9,17 @@ jQuery(document).on( 'click', '.visibility-notice', function() {
|
|
9 |
|
10 |
})
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
jQuery(document).on( 'click', '.woo-upgrade-notice', function() {
|
13 |
|
14 |
jQuery.ajax({
|
9 |
|
10 |
})
|
11 |
|
12 |
+
jQuery(document).on( 'click', '.yst_notice', function() {
|
13 |
+
|
14 |
+
jQuery.ajax({
|
15 |
+
url: ajaxurl,
|
16 |
+
data: {
|
17 |
+
action: 'aioseo_dismiss_yst_notice'
|
18 |
+
}
|
19 |
+
})
|
20 |
+
|
21 |
+
})
|
22 |
+
|
23 |
jQuery(document).on( 'click', '.woo-upgrade-notice', function() {
|
24 |
|
25 |
jQuery.ajax({
|
modules/aioseop_robots.php
CHANGED
@@ -122,8 +122,8 @@ if ( !class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
|
|
122 |
}
|
123 |
$access = ( get_option('blog_public') ) ? 'allow' : 'block';
|
124 |
if ( $access ) {
|
125 |
-
$allow_rule = "
|
126 |
-
$block_rule = "
|
127 |
if ( empty( $options[$prefix . 'robotgen'] ) ) $options[$prefix . 'robotgen'] = '';
|
128 |
if ( isset( $_POST['Submit_Preview'] ) && ( ( $options[$prefix . 'robotgen'] == $allow_rule ) ||
|
129 |
( $options[$prefix . 'robotgen'] == $block_rule ) ) )
|
122 |
}
|
123 |
$access = ( get_option('blog_public') ) ? 'allow' : 'block';
|
124 |
if ( $access ) {
|
125 |
+
$allow_rule = "Sitemap: \n\n# global\nUser-agent: *\nDisallow: /xmlrpc.php\n\n";
|
126 |
+
$block_rule = "# global\nUser-agent: *\nDisallow: /\n\n";
|
127 |
if ( empty( $options[$prefix . 'robotgen'] ) ) $options[$prefix . 'robotgen'] = '';
|
128 |
if ( isset( $_POST['Submit_Preview'] ) && ( ( $options[$prefix . 'robotgen'] == $allow_rule ) ||
|
129 |
( $options[$prefix . 'robotgen'] == $block_rule ) ) )
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtor
|
|
4 |
Tags: seo, SEO, all in one seo, widget, Post, plugin, admin, posts, shortcode, sidebar, google, twitter, page, images, comments, image, social, search engine optimization, sitemap, WordPress SEO, meta, meta description, xml sitemap, xml sitemaps, google sitemap, sitemaps, robots meta, rss, rss footer, yahoo, bing, news sitemaps, XML News Sitemaps, multisite, canonical, nofollow, noindex, keywords, meta keywords, description, webmaster tools, google webmaster tools, google analytics, seo pack
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.4
|
7 |
-
Stable tag: 2.3.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
4 |
Tags: seo, SEO, all in one seo, widget, Post, plugin, admin, posts, shortcode, sidebar, google, twitter, page, images, comments, image, social, search engine optimization, sitemap, WordPress SEO, meta, meta description, xml sitemap, xml sitemaps, google sitemap, sitemaps, robots meta, rss, rss footer, yahoo, bing, news sitemaps, XML News Sitemaps, multisite, canonical, nofollow, noindex, keywords, meta keywords, description, webmaster tools, google webmaster tools, google analytics, seo pack
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.4
|
7 |
+
Stable tag: 2.3.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|