Version Description
Download this release
Release Info
Developer | benjaminprojas |
Plugin | All in One SEO Pack |
Version | 3.7.1 |
Comparing to | |
See all releases |
Code changes from version 3.7.0 to 3.7.1
- admin/class-aioseop-helper.php +0 -10
- admin/class-aioseop-usage.php +1 -1
- admin/display/notices/deprecated-additional-headers-settings-notice.php +59 -0
- admin/display/notices/deprecated-unprotect-post-meta-setting-notice.php +38 -0
- aioseop_class.php +4 -76
- all_in_one_seo_pack.php +1 -1
- class-aioseop-core.php +2 -4
- css/aioseop-font-icons-rtl.css +4 -0
- inc/admin/class-aioseop-site-health.php +392 -0
- inc/aioseop_functions.php +0 -22
- inc/aioseop_updates_class.php +27 -7
- modules/aioseop_sitemap.php +13 -6
- readme.txt +2 -2
admin/class-aioseop-helper.php
CHANGED
@@ -443,14 +443,9 @@ class AIOSEOP_Helper {
|
|
443 |
'aiosp_run_shortcodes' => __( 'Check this and shortcodes will get executed for descriptions auto-generated from content.', 'all-in-one-seo-pack' ),
|
444 |
'aiosp_hide_paginated_descriptions' => __( 'Check this and your Meta Descriptions will be removed from page 2 or later of paginated content.', 'all-in-one-seo-pack' ),
|
445 |
'aiosp_dont_truncate_descriptions' => __( 'Check this to prevent your Description from being truncated regardless of its length.', 'all-in-one-seo-pack' ),
|
446 |
-
'aiosp_unprotect_meta' => __( "Check this to unprotect internal postmeta fields for use with XMLRPC. If you don't know what that is, leave it unchecked.", 'all-in-one-seo-pack' ),
|
447 |
'aiosp_redirect_attachement_parent' => __( 'Redirect attachment pages to post parent.', 'all-in-one-seo-pack' ),
|
448 |
/* translators: %s is a placeholder, which means that it should not be translated. It will be replaced with the name of the plugin, All in One SEO Pack. */
|
449 |
'aiosp_ex_pages' => sprintf( __( 'Enter a comma separated list of pages here to be excluded by %s. This is helpful when using plugins which generate their own non-WordPress dynamic pages. Ex: <em>/forum/, /contact/</em><br />For instance, if you want to exclude the virtual pages generated by a forum plugin, all you have to do is add "forum" or "/forum" or "/forum/" or any URL with the word "forum" in it here, such as "http://example.com/forum" or "http://example.com/forum/someforumpage", and it will be excluded.', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME ),
|
450 |
-
'aiosp_post_meta_tags' => __( 'What you enter here will be copied verbatim to the header of all Posts. You can enter whatever additional headers you want here, even references to stylesheets.', 'all-in-one-seo-pack' ),
|
451 |
-
'aiosp_page_meta_tags' => __( 'What you enter here will be copied verbatim to the header of all Pages. You can enter whatever additional headers you want here, even references to stylesheets.', 'all-in-one-seo-pack' ),
|
452 |
-
'aiosp_front_meta_tags' => __( 'What you enter here will be copied verbatim to the header of the front page if you have set a static page in Settings, Reading, Front Page Displays. You can enter whatever additional headers you want here, even references to stylesheets. This will fall back to using Additional Page Headers if you have them set and nothing is entered here.', 'all-in-one-seo-pack' ),
|
453 |
-
'aiosp_home_meta_tags' => __( 'What you enter here will be copied verbatim to the header of the home page if you have Front page displays your latest posts selected in Settings, Reading. It will also be copied verbatim to the header on the Posts page if you have one set in Settings, Reading. You can enter whatever additional headers you want here, even references to stylesheets.', 'all-in-one-seo-pack' ),
|
454 |
|
455 |
// RSS Content Settings.
|
456 |
'aiosp_rss_content_before' =>
|
@@ -662,13 +657,8 @@ class AIOSEOP_Helper {
|
|
662 |
'aiosp_run_shortcodes' => 'https://semperplugins.com/documentation/all-in-one-seo-pack-advanced-settings/#never-shorten-long-descriptions',
|
663 |
'aiosp_hide_paginated_descriptions' => 'https://semperplugins.com/documentation/all-in-one-seo-pack-advanced-settings/#unprotect-post-meta-fields',
|
664 |
'aiosp_dont_truncate_descriptions' => 'https://semperplugins.com/documentation/all-in-one-seo-pack-advanced-settings/#never-shorten-long-descriptions',
|
665 |
-
'aiosp_unprotect_meta' => 'https://semperplugins.com/documentation/all-in-one-seo-pack-advanced-settings/#unprotect-post-meta-fields',
|
666 |
'aiosp_redirect_attachement_parent' => 'https://semperplugins.com/documentation/all-in-one-seo-pack-advanced-settings/#redirect-attachments-to-post-parent',
|
667 |
'aiosp_ex_pages' => 'https://semperplugins.com/documentation/all-in-one-seo-pack-advanced-settings/#exclude-pages',
|
668 |
-
'aiosp_post_meta_tags' => 'https://semperplugins.com/documentation/all-in-one-seo-pack-advanced-settings/#additional-post-headers',
|
669 |
-
'aiosp_page_meta_tags' => 'https://semperplugins.com/documentation/all-in-one-seo-pack-advanced-settings/#additional-page-headers',
|
670 |
-
'aiosp_front_meta_tags' => 'https://semperplugins.com/documentation/all-in-one-seo-pack-advanced-settings/#additional-front-page-headers',
|
671 |
-
'aiosp_home_meta_tags' => 'https://semperplugins.com/documentation/all-in-one-seo-pack-advanced-settings/#additional-blog-page-headers',
|
672 |
|
673 |
// RSS Content Settings.
|
674 |
'aiosp_rss_content_before' => 'https://semperplugins.com/documentation/rss-content-settings/',
|
443 |
'aiosp_run_shortcodes' => __( 'Check this and shortcodes will get executed for descriptions auto-generated from content.', 'all-in-one-seo-pack' ),
|
444 |
'aiosp_hide_paginated_descriptions' => __( 'Check this and your Meta Descriptions will be removed from page 2 or later of paginated content.', 'all-in-one-seo-pack' ),
|
445 |
'aiosp_dont_truncate_descriptions' => __( 'Check this to prevent your Description from being truncated regardless of its length.', 'all-in-one-seo-pack' ),
|
|
|
446 |
'aiosp_redirect_attachement_parent' => __( 'Redirect attachment pages to post parent.', 'all-in-one-seo-pack' ),
|
447 |
/* translators: %s is a placeholder, which means that it should not be translated. It will be replaced with the name of the plugin, All in One SEO Pack. */
|
448 |
'aiosp_ex_pages' => sprintf( __( 'Enter a comma separated list of pages here to be excluded by %s. This is helpful when using plugins which generate their own non-WordPress dynamic pages. Ex: <em>/forum/, /contact/</em><br />For instance, if you want to exclude the virtual pages generated by a forum plugin, all you have to do is add "forum" or "/forum" or "/forum/" or any URL with the word "forum" in it here, such as "http://example.com/forum" or "http://example.com/forum/someforumpage", and it will be excluded.', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME ),
|
|
|
|
|
|
|
|
|
449 |
|
450 |
// RSS Content Settings.
|
451 |
'aiosp_rss_content_before' =>
|
657 |
'aiosp_run_shortcodes' => 'https://semperplugins.com/documentation/all-in-one-seo-pack-advanced-settings/#never-shorten-long-descriptions',
|
658 |
'aiosp_hide_paginated_descriptions' => 'https://semperplugins.com/documentation/all-in-one-seo-pack-advanced-settings/#unprotect-post-meta-fields',
|
659 |
'aiosp_dont_truncate_descriptions' => 'https://semperplugins.com/documentation/all-in-one-seo-pack-advanced-settings/#never-shorten-long-descriptions',
|
|
|
660 |
'aiosp_redirect_attachement_parent' => 'https://semperplugins.com/documentation/all-in-one-seo-pack-advanced-settings/#redirect-attachments-to-post-parent',
|
661 |
'aiosp_ex_pages' => 'https://semperplugins.com/documentation/all-in-one-seo-pack-advanced-settings/#exclude-pages',
|
|
|
|
|
|
|
|
|
662 |
|
663 |
// RSS Content Settings.
|
664 |
'aiosp_rss_content_before' => 'https://semperplugins.com/documentation/rss-content-settings/',
|
admin/class-aioseop-usage.php
CHANGED
@@ -153,7 +153,7 @@ class AIOSEOP_Usage {
|
|
153 |
* @return string The url.
|
154 |
*/
|
155 |
private function get_url() {
|
156 |
-
$url = 'https://
|
157 |
if ( defined( 'AIOSEO_USAGE_TRACKING_URL' ) ) {
|
158 |
$url = AIOSEO_USAGE_TRACKING_URL;
|
159 |
}
|
153 |
* @return string The url.
|
154 |
*/
|
155 |
private function get_url() {
|
156 |
+
$url = 'https://aiousage.com/v1/track';
|
157 |
if ( defined( 'AIOSEO_USAGE_TRACKING_URL' ) ) {
|
158 |
$url = AIOSEO_USAGE_TRACKING_URL;
|
159 |
}
|
admin/display/notices/deprecated-additional-headers-settings-notice.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Configures the Deprecated Additional Headers Settings notice.
|
4 |
+
*
|
5 |
+
* Appears when the user was previously using the Additional Headers settings. These have been removed in 3.7.1.
|
6 |
+
*
|
7 |
+
* @since 3.7.1
|
8 |
+
*
|
9 |
+
* @return array The notice data.
|
10 |
+
*/
|
11 |
+
function aioseoDeprecatedAdditionalHeadersSettings() {
|
12 |
+
global $aioseop_options;
|
13 |
+
$settings = array_filter( array(
|
14 |
+
__( 'Additional Post Headers', 'all-in-one-seo-pack' ) => $aioseop_options['aiosp_post_meta_tags'],
|
15 |
+
__( 'Additional Page Headers', 'all-in-one-seo-pack' ) => $aioseop_options['aiosp_page_meta_tags'],
|
16 |
+
__( 'Additional Front Page Headers', 'all-in-one-seo-pack' ) => $aioseop_options['aiosp_front_meta_tags'],
|
17 |
+
__( 'Additional Posts Page Headers', 'all-in-one-seo-pack' ) => $aioseop_options['aiosp_home_meta_tags']
|
18 |
+
));
|
19 |
+
|
20 |
+
if ( ! count( $settings ) ) {
|
21 |
+
return array();
|
22 |
+
}
|
23 |
+
|
24 |
+
$message = sprintf( __( 'The Additional Headers settings have been deprecated and removed from %1$s.
|
25 |
+
You are seeing this message because you may have been using these settings. We recommend you use the Insert Headers and Footers plugin from WPBeginner instead.
|
26 |
+
Below you can find details of the settings that you were using:', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME );
|
27 |
+
|
28 |
+
$content = "<p>$message<p/><ul>";
|
29 |
+
foreach ( $settings as $name => $value ) {
|
30 |
+
$content = $content ."<li>$name - $value</li>";
|
31 |
+
}
|
32 |
+
$content = $content . '</ul><style>
|
33 |
+
.aioseop-notice-deprecated_additional_headers_settings ul {
|
34 |
+
list-style-type: disc;
|
35 |
+
margin-top: -5px;
|
36 |
+
margin-left: 40px;
|
37 |
+
}
|
38 |
+
</style>';
|
39 |
+
|
40 |
+
return array(
|
41 |
+
'slug' => 'deprecated_additional_headers_settings',
|
42 |
+
'delay_time' => 0,
|
43 |
+
'html' => $content,
|
44 |
+
'class' => 'notice-warning',
|
45 |
+
'target' => 'site',
|
46 |
+
'screens' => array(),
|
47 |
+
'action_options' => array(
|
48 |
+
array(
|
49 |
+
'time' => 0,
|
50 |
+
'text' => __( 'Install Headers and Footers plugin', 'all-in-one-seo-pack' ),
|
51 |
+
'link' => admin_url( "plugin-install.php?s=insert+headers+and+footers&tab=search&type=term" ),
|
52 |
+
'new_tab' => false,
|
53 |
+
'dismiss' => false,
|
54 |
+
'class' => 'button-primary',
|
55 |
+
)
|
56 |
+
),
|
57 |
+
);
|
58 |
+
}
|
59 |
+
add_filter( 'aioseop_admin_notice-deprecated_additional_headers_settings', 'aioseoDeprecatedAdditionalHeadersSettings' );
|
admin/display/notices/deprecated-unprotect-post-meta-setting-notice.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Configures the Deprecated Unprotect Post Meta Setting notice.
|
4 |
+
*
|
5 |
+
* Appears when the user was previously using the Unprotect Post Meta setting. It has been removed in 3.7.1.
|
6 |
+
*
|
7 |
+
* @since 3.7.1
|
8 |
+
*
|
9 |
+
* @return array The notice data.
|
10 |
+
*/
|
11 |
+
function aioseoDeprecatedUnprotectPostMetaSetting() {
|
12 |
+
$anchor = sprintf( '<a href="https://semperplugins.com/documentation/unprotecting-aioseops-post-meta/" target="_blank">%1$s</a>', __( 'this filter hook', 'all-in-one-seo-pack' ) );
|
13 |
+
$message = sprintf( __( 'The Unprotect Post Meta setting in the General Settings menu has been deprecated and removed from %1$s.
|
14 |
+
You are seeing this message only because you had it enabled. If you would like to retain this functionality, then you can do so by using %2$s.', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME, $anchor );
|
15 |
+
|
16 |
+
return array(
|
17 |
+
'slug' => 'deprecated_unprotect_post_meta_setting',
|
18 |
+
'delay_time' => 0,
|
19 |
+
'html' => "<p>$message</p><style>
|
20 |
+
.aioseop-notice-deprecated_unprotect_post_meta_setting .aioseo-action-buttons {
|
21 |
+
display: none;
|
22 |
+
}
|
23 |
+
</style>",
|
24 |
+
'class' => 'notice-warning',
|
25 |
+
'target' => 'site',
|
26 |
+
'screens' => array(),
|
27 |
+
'action_options' => array(
|
28 |
+
array(
|
29 |
+
'time' => 0,
|
30 |
+
'text' => '',
|
31 |
+
'link' => '',
|
32 |
+
'dismiss' => true,
|
33 |
+
'class' => 'aioseo-dismiss-review-notice-button',
|
34 |
+
),
|
35 |
+
),
|
36 |
+
);
|
37 |
+
}
|
38 |
+
add_filter( 'aioseop_admin_notice-deprecated_unprotect_post_meta_setting', 'aioseoDeprecatedUnprotectPostMetaSetting' );
|
aioseop_class.php
CHANGED
@@ -832,11 +832,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
832 |
'name' => __( 'Never Shorten Long Descriptions', 'all-in-one-seo-pack' ),
|
833 |
'default' => 0,
|
834 |
),
|
835 |
-
'unprotect_meta' => array(
|
836 |
-
/* translators: This is a setting that allows users to unprotect internal postmeta fields for use with XML-RPC. */
|
837 |
-
'name' => __( 'Unprotect Post Meta Fields', 'all-in-one-seo-pack' ),
|
838 |
-
'default' => 0,
|
839 |
-
),
|
840 |
'redirect_attachement_parent' => array(
|
841 |
/* translators: This is the name of a setting. By enabling it, the plugin will redirect attachment page requests to the post parent, or in other words, the post/page where the media is embedded. */
|
842 |
'name' => __( 'Redirect Attachments to Post Parent', 'all-in-one-seo-pack' ),
|
@@ -848,34 +843,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
848 |
'type' => 'textarea',
|
849 |
'default' => '',
|
850 |
),
|
851 |
-
'post_meta_tags' => array(
|
852 |
-
/* translators: This is a setting that allows users to ouput additional code, such as references to stylesheets or JavaScript libraries, into the HEAD section of each post. */
|
853 |
-
'name' => __( 'Additional Post Headers', 'all-in-one-seo-pack' ),
|
854 |
-
'type' => 'textarea',
|
855 |
-
'default' => '',
|
856 |
-
'sanitize' => 'default',
|
857 |
-
),
|
858 |
-
'page_meta_tags' => array(
|
859 |
-
/* translators: This is a setting that allows users to ouput additional HTML tags, such as references to stylesheets or JavaScript libraries, into the HEAD section of each page. */
|
860 |
-
'name' => __( 'Additional Page Headers', 'all-in-one-seo-pack' ),
|
861 |
-
'type' => 'textarea',
|
862 |
-
'default' => '',
|
863 |
-
'sanitize' => 'default',
|
864 |
-
),
|
865 |
-
'front_meta_tags' => array(
|
866 |
-
/* translators: This is a setting that allows users to ouput additional HTML tags, such as references to stylesheets or JavaScript libraries, into the HEAD section of the frontpage/homepage. */
|
867 |
-
'name' => __( 'Additional Front Page Headers', 'all-in-one-seo-pack' ),
|
868 |
-
'type' => 'textarea',
|
869 |
-
'default' => '',
|
870 |
-
'sanitize' => 'default',
|
871 |
-
),
|
872 |
-
'home_meta_tags' => array(
|
873 |
-
/* translators: This is a setting that allows users to ouput additional HTML tags, such as references to stylesheets or JavaScript libraries, into the HEAD section of the static Posts page (see Settings > Reading). */
|
874 |
-
'name' => __( 'Additional Posts Page Headers', 'all-in-one-seo-pack' ),
|
875 |
-
'type' => 'textarea',
|
876 |
-
'default' => '',
|
877 |
-
'sanitize' => 'default',
|
878 |
-
),
|
879 |
'do_log' => array(
|
880 |
/* translators: This is a setting that enables All in One SEO Pack to log important events to help with debugging. */
|
881 |
'name' => __( 'Log important events', 'all-in-one-seo-pack' ),
|
@@ -1211,13 +1178,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
1211 |
'run_shortcodes',
|
1212 |
'hide_paginated_descriptions',
|
1213 |
'dont_truncate_descriptions',
|
1214 |
-
'unprotect_meta',
|
1215 |
'redirect_attachement_parent',
|
1216 |
-
'ex_pages'
|
1217 |
-
'post_meta_tags',
|
1218 |
-
'page_meta_tags',
|
1219 |
-
'front_meta_tags',
|
1220 |
-
'home_meta_tags',
|
1221 |
),
|
1222 |
),
|
1223 |
'keywords' => array(
|
@@ -1627,7 +1589,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
1627 |
$description = $opts['aiosp_description'];
|
1628 |
}
|
1629 |
if ( empty( $description ) ) {
|
1630 |
-
$description = term_description();
|
1631 |
}
|
1632 |
$description = $this->internationalize( $description );
|
1633 |
}
|
@@ -2755,7 +2717,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
2755 |
$desc = '';
|
2756 |
}
|
2757 |
if ( empty( $desc ) ) {
|
2758 |
-
$desc = term_description( '', $tax );
|
2759 |
}
|
2760 |
|
2761 |
return $this->internationalize( $desc );
|
@@ -2949,7 +2911,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
2949 |
$description = $opts['aiosp_description'];
|
2950 |
}
|
2951 |
if ( empty( $description ) ) {
|
2952 |
-
$description = term_description();
|
2953 |
}
|
2954 |
$description = $this->internationalize( $description );
|
2955 |
}
|
@@ -4700,40 +4662,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
4700 |
}
|
4701 |
}
|
4702 |
}
|
4703 |
-
// Handle extra meta fields.
|
4704 |
-
foreach ( array( 'page_meta', 'post_meta', 'home_meta', 'front_meta' ) as $meta ) {
|
4705 |
-
if ( ! empty( $aioseop_options[ "aiosp_{$meta}_tags" ] ) ) {
|
4706 |
-
$$meta = html_entity_decode( stripslashes( $aioseop_options[ "aiosp_{$meta}_tags" ] ), ENT_QUOTES, 'UTF-8' );
|
4707 |
-
} else {
|
4708 |
-
$$meta = '';
|
4709 |
-
}
|
4710 |
-
}
|
4711 |
-
if ( is_page() && isset( $page_meta ) && ! empty( $page_meta ) && ( ! is_front_page() || empty( $front_meta ) ) ) {
|
4712 |
-
if ( isset( $meta_string ) ) {
|
4713 |
-
$meta_string .= "\n";
|
4714 |
-
}
|
4715 |
-
$meta_string .= $page_meta;
|
4716 |
-
}
|
4717 |
-
if ( is_single() && isset( $post_meta ) && ! empty( $post_meta ) ) {
|
4718 |
-
if ( isset( $meta_string ) ) {
|
4719 |
-
$meta_string .= "\n";
|
4720 |
-
}
|
4721 |
-
$meta_string .= $post_meta;
|
4722 |
-
}
|
4723 |
-
|
4724 |
-
if ( is_front_page() && ! empty( $front_meta ) ) {
|
4725 |
-
if ( isset( $meta_string ) ) {
|
4726 |
-
$meta_string .= "\n";
|
4727 |
-
}
|
4728 |
-
$meta_string .= $front_meta;
|
4729 |
-
} else {
|
4730 |
-
if ( is_home() && ! empty( $home_meta ) ) {
|
4731 |
-
if ( isset( $meta_string ) ) {
|
4732 |
-
$meta_string .= "\n";
|
4733 |
-
}
|
4734 |
-
$meta_string .= $home_meta;
|
4735 |
-
}
|
4736 |
-
}
|
4737 |
$prev_next = $this->get_prev_next_links( $post );
|
4738 |
$prev = apply_filters( 'aioseop_prev_link', $prev_next['prev'] );
|
4739 |
$next = apply_filters( 'aioseop_next_link', $prev_next['next'] );
|
832 |
'name' => __( 'Never Shorten Long Descriptions', 'all-in-one-seo-pack' ),
|
833 |
'default' => 0,
|
834 |
),
|
|
|
|
|
|
|
|
|
|
|
835 |
'redirect_attachement_parent' => array(
|
836 |
/* translators: This is the name of a setting. By enabling it, the plugin will redirect attachment page requests to the post parent, or in other words, the post/page where the media is embedded. */
|
837 |
'name' => __( 'Redirect Attachments to Post Parent', 'all-in-one-seo-pack' ),
|
843 |
'type' => 'textarea',
|
844 |
'default' => '',
|
845 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
846 |
'do_log' => array(
|
847 |
/* translators: This is a setting that enables All in One SEO Pack to log important events to help with debugging. */
|
848 |
'name' => __( 'Log important events', 'all-in-one-seo-pack' ),
|
1178 |
'run_shortcodes',
|
1179 |
'hide_paginated_descriptions',
|
1180 |
'dont_truncate_descriptions',
|
|
|
1181 |
'redirect_attachement_parent',
|
1182 |
+
'ex_pages'
|
|
|
|
|
|
|
|
|
1183 |
),
|
1184 |
),
|
1185 |
'keywords' => array(
|
1589 |
$description = $opts['aiosp_description'];
|
1590 |
}
|
1591 |
if ( empty( $description ) ) {
|
1592 |
+
$description = wp_strip_all_tags( term_description() );
|
1593 |
}
|
1594 |
$description = $this->internationalize( $description );
|
1595 |
}
|
2717 |
$desc = '';
|
2718 |
}
|
2719 |
if ( empty( $desc ) ) {
|
2720 |
+
$desc = wp_strip_all_tags( term_description( '', $tax ) );
|
2721 |
}
|
2722 |
|
2723 |
return $this->internationalize( $desc );
|
2911 |
$description = $opts['aiosp_description'];
|
2912 |
}
|
2913 |
if ( empty( $description ) ) {
|
2914 |
+
$description = wp_strip_all_tags( term_description() );
|
2915 |
}
|
2916 |
$description = $this->internationalize( $description );
|
2917 |
}
|
4662 |
}
|
4663 |
}
|
4664 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4665 |
$prev_next = $this->get_prev_next_links( $post );
|
4666 |
$prev = apply_filters( 'aioseop_prev_link', $prev_next['prev'] );
|
4667 |
$next = apply_filters( 'aioseop_next_link', $prev_next['next'] );
|
all_in_one_seo_pack.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: All In One SEO Pack
|
4 |
Plugin URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
|
5 |
Description: Out-of-the-box SEO for WordPress. Features like XML Sitemaps, SEO for custom post types, SEO for blogs or business sites, SEO for ecommerce sites, and much more. More than 50 million downloads since 2007.
|
6 |
-
Version: 3.7.
|
7 |
Author: All in One SEO Team
|
8 |
Author URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
|
9 |
Text Domain: all-in-one-seo-pack
|
3 |
Plugin Name: All In One SEO Pack
|
4 |
Plugin URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
|
5 |
Description: Out-of-the-box SEO for WordPress. Features like XML Sitemaps, SEO for custom post types, SEO for blogs or business sites, SEO for ecommerce sites, and much more. More than 50 million downloads since 2007.
|
6 |
+
Version: 3.7.1
|
7 |
Author: All in One SEO Team
|
8 |
Author URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
|
9 |
Text Domain: all-in-one-seo-pack
|
class-aioseop-core.php
CHANGED
@@ -141,6 +141,7 @@ class AIOSEOP_Core {
|
|
141 |
AIOSEOP_Flyout::init();
|
142 |
|
143 |
new AIOSEOP_Usage();
|
|
|
144 |
|
145 |
// TODO Move this add_action to All_in_One_SEO_Pack::__construct().
|
146 |
add_action( 'init', array( $aiosp, 'add_hooks' ) );
|
@@ -340,6 +341,7 @@ class AIOSEOP_Core {
|
|
340 |
require_once( AIOSEOP_PLUGIN_DIR . 'inc/admin/views/class-aioseop-flyout.php' );
|
341 |
require_once( AIOSEOP_PLUGIN_DIR . 'inc/admin/views/class-aioseop-about.php' );
|
342 |
require_once( AIOSEOP_PLUGIN_DIR . 'inc/class-aioseop-rss.php' );
|
|
|
343 |
|
344 |
// Loads pro files and other pro init stuff.
|
345 |
if ( AIOSEOPPRO ) {
|
@@ -410,10 +412,6 @@ class AIOSEOP_Core {
|
|
410 |
|
411 |
add_action( 'init', 'aioseop_load_modules', 1 );
|
412 |
|
413 |
-
if ( aioseop_option_isset( 'aiosp_unprotect_meta' ) ) {
|
414 |
-
add_filter( 'is_protected_meta', 'aioseop_unprotect_meta', 10, 3 );
|
415 |
-
}
|
416 |
-
|
417 |
// phpcs:ignore Squiz.Commenting.InlineComment.InvalidEndChar
|
418 |
// add_action( 'after_setup_theme', 'aioseop_load_modules' );
|
419 |
|
141 |
AIOSEOP_Flyout::init();
|
142 |
|
143 |
new AIOSEOP_Usage();
|
144 |
+
new AIOSEOP_Site_Health();
|
145 |
|
146 |
// TODO Move this add_action to All_in_One_SEO_Pack::__construct().
|
147 |
add_action( 'init', array( $aiosp, 'add_hooks' ) );
|
341 |
require_once( AIOSEOP_PLUGIN_DIR . 'inc/admin/views/class-aioseop-flyout.php' );
|
342 |
require_once( AIOSEOP_PLUGIN_DIR . 'inc/admin/views/class-aioseop-about.php' );
|
343 |
require_once( AIOSEOP_PLUGIN_DIR . 'inc/class-aioseop-rss.php' );
|
344 |
+
require_once( AIOSEOP_PLUGIN_DIR . 'inc/admin/class-aioseop-site-health.php' );
|
345 |
|
346 |
// Loads pro files and other pro init stuff.
|
347 |
if ( AIOSEOPPRO ) {
|
412 |
|
413 |
add_action( 'init', 'aioseop_load_modules', 1 );
|
414 |
|
|
|
|
|
|
|
|
|
415 |
// phpcs:ignore Squiz.Commenting.InlineComment.InvalidEndChar
|
416 |
// add_action( 'after_setup_theme', 'aioseop_load_modules' );
|
417 |
|
css/aioseop-font-icons-rtl.css
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
.aioseop-quickedit-pencil {
|
2 |
+
padding-left: 5px;
|
3 |
+
margin: 0;
|
4 |
+
}
|
inc/admin/class-aioseop-site-health.php
ADDED
@@ -0,0 +1,392 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Handles our Site Health tests & info.
|
5 |
+
*
|
6 |
+
* @since 3.8.0
|
7 |
+
*/
|
8 |
+
class AIOSEOP_Site_Health {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Class constructor.
|
12 |
+
*
|
13 |
+
* @since 3.8.0
|
14 |
+
*/
|
15 |
+
public function __construct() {
|
16 |
+
add_filter( 'site_status_tests', array( $this, 'registerTests' ), 10, 1 );
|
17 |
+
add_filter( 'debug_information', array( $this, 'addDebugInfo' ), 10, 1 );
|
18 |
+
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Registers our site health tests.
|
22 |
+
*
|
23 |
+
* @since 3.8.0
|
24 |
+
*
|
25 |
+
* @param array $tests The site health tests.
|
26 |
+
* @return array $tests The site health tests.
|
27 |
+
*/
|
28 |
+
public function registerTests( $tests ) {
|
29 |
+
global $aioseop_options;
|
30 |
+
|
31 |
+
$tests['direct']['aioseo_site_public'] = array(
|
32 |
+
'label' => 'AIOSEO Site Public',
|
33 |
+
'test' => array( $this, 'sitePublic' ),
|
34 |
+
);
|
35 |
+
$tests['direct']['aioseo_site_info'] = array(
|
36 |
+
'label' => 'AIOSEO Site Info',
|
37 |
+
'test' => array( $this, 'siteInfo' ),
|
38 |
+
);
|
39 |
+
$tests['direct']['aioseo_plugin_update'] = array(
|
40 |
+
'label' => 'AIOSEO Plugin Update',
|
41 |
+
'test' => array( $this, 'pluginUpdate' ),
|
42 |
+
);
|
43 |
+
|
44 |
+
if ( ! empty( $aioseop_options['aiosp_schema_markup'] ) ) {
|
45 |
+
$tests['direct']['aioseo_schema_markup'] = array(
|
46 |
+
'label' => 'AIOSEO Schema Markup',
|
47 |
+
'test' => array( $this, 'schemaMarkup' ),
|
48 |
+
);
|
49 |
+
|
50 |
+
}
|
51 |
+
return $tests;
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Checks whether the site is public.
|
56 |
+
*
|
57 |
+
* @since 3.8.0
|
58 |
+
*
|
59 |
+
* @return array The test result.
|
60 |
+
*/
|
61 |
+
public function sitePublic() {
|
62 |
+
if ( ! get_option( 'blog_public' ) ) {
|
63 |
+
return $this->result(
|
64 |
+
'aioseo_site_public',
|
65 |
+
'critical',
|
66 |
+
__( 'Your site does not appear in search results', 'all-in-one-seo-pack' ),
|
67 |
+
__( 'Your site is set to private. This means WordPress asks search engines to exclude your website from search results.', 'all-in-one-seo-pack' ),
|
68 |
+
$this->actionLink( admin_url( 'options-reading.php' ), __( 'Go to Settings > Reading', 'all-in-one-seo-pack' ) )
|
69 |
+
);
|
70 |
+
}
|
71 |
+
return $this->result(
|
72 |
+
'aioseo_site_public',
|
73 |
+
'good',
|
74 |
+
__( 'Your site appears in search results', 'all-in-one-seo-pack' ),
|
75 |
+
__( 'Your site is set to public. Search engines will index your website and it will appear in search results.', 'all-in-one-seo-pack' )
|
76 |
+
);
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Checks whether the site title and tagline are set.
|
81 |
+
*
|
82 |
+
* @since 3.8.0
|
83 |
+
*
|
84 |
+
* @return array The test result.
|
85 |
+
*/
|
86 |
+
public function siteInfo() {
|
87 |
+
$siteTitle = get_bloginfo( 'name' );
|
88 |
+
$siteTagline = get_bloginfo( 'description' );
|
89 |
+
|
90 |
+
if ( ! $siteTitle || ! $siteTagline ) {
|
91 |
+
return $this->result(
|
92 |
+
'aioseo_site_info',
|
93 |
+
'recommended',
|
94 |
+
__( 'Your Site Title and/or Tagline are blank', 'all-in-one-seo-pack' ),
|
95 |
+
__( 'Your Site Title and/or Tagline are blank. We recommend setting both of these values as AIOSEO requires these for various features, including our schema markup' , 'all-in-one-seo-pack' ),
|
96 |
+
$this->actionLink( admin_url( 'options-general.php' ), __( 'Go to Settings > General', 'all-in-one-seo-pack' ) )
|
97 |
+
);
|
98 |
+
}
|
99 |
+
return $this->result(
|
100 |
+
'aioseo_site_info',
|
101 |
+
'good',
|
102 |
+
__( 'Your Site Title and Tagline are set', 'all-in-one-seo-pack' ),
|
103 |
+
__( "Great! These are required for AIOSEO's schema markup and are often used as fallback values for various other features." , 'all-in-one-seo-pack' )
|
104 |
+
);
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Checks whether the required settings for our schema markup are set.
|
109 |
+
*
|
110 |
+
* @since 3.8.0
|
111 |
+
*
|
112 |
+
* @return array The test result.
|
113 |
+
*/
|
114 |
+
public function schemaMarkup() {
|
115 |
+
global $aioseop_options;
|
116 |
+
|
117 |
+
$dirname = dirname( plugin_basename( AIOSEO_PLUGIN_FILE ) );
|
118 |
+
$menuPath = admin_url( "admin.php?page=$dirname/aioseop_class.php" );
|
119 |
+
|
120 |
+
if ( 'organization' === $aioseop_options['aiosp_schema_site_represents'] ) {
|
121 |
+
if ( ! $aioseop_options['aiosp_schema_organization_name'] || ( ! $aioseop_options['aiosp_schema_organization_logo'] && ! aioseop_get_site_logo_url() ) ) {
|
122 |
+
return $this->result(
|
123 |
+
'aioseo_schema_markup',
|
124 |
+
'recommended',
|
125 |
+
__( 'Your Organization Name and/or Logo are blank', 'all-in-one-seo-pack' ),
|
126 |
+
__( "Your Organization Name and/or Logo are blank. These values are required for AIOSEO's Organization schema markup.", 'all-in-one-seo-pack' ),
|
127 |
+
$this->actionLink( $menuPath, __( 'Go to General Settings', 'all-in-one-seo-pack' ) )
|
128 |
+
);
|
129 |
+
}
|
130 |
+
return $this->result(
|
131 |
+
'aioseo_schema_markup',
|
132 |
+
'good',
|
133 |
+
__( 'Your Organization Name and Logo are set', 'all-in-one-seo-pack' ),
|
134 |
+
__( "Awesome! These are required for AIOSEO's Organization schema markup.", 'all-in-one-seo-pack' )
|
135 |
+
);
|
136 |
+
}
|
137 |
+
|
138 |
+
if (
|
139 |
+
0 === intval( $aioseop_options['aiosp_schema_person_user'] ) ||
|
140 |
+
( -1 === intval( $aioseop_options['aiosp_schema_person_user'] ) && ( ! $aioseop_options['aiosp_schema_person_manual_name'] || ! $aioseop_options['aiosp_schema_person_manual_image'] ) )
|
141 |
+
) {
|
142 |
+
return $this->result(
|
143 |
+
'aioseo_schema_markup',
|
144 |
+
'recommended',
|
145 |
+
__( 'Your Person Name and/or Image are blank', 'all-in-one-seo-pack' ),
|
146 |
+
__( "Your Person Name and/or Image are blank. These values are required for AIOSEO's Person schema markup.", 'all-in-one-seo-pack' ),
|
147 |
+
$this->actionLink( $menuPath, __( 'Go to General Settings', 'all-in-one-seo-pack' ) )
|
148 |
+
);
|
149 |
+
}
|
150 |
+
return $this->result(
|
151 |
+
'aioseo_schema_markup',
|
152 |
+
'good',
|
153 |
+
__( 'Your Person Name and Image are set', 'all-in-one-seo-pack' ),
|
154 |
+
__( "Awesome! These are required for AIOSEO's Person schema markup.", 'all-in-one-seo-pack' )
|
155 |
+
);
|
156 |
+
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Checks whether the required settings for our schema markup are set.
|
160 |
+
*
|
161 |
+
* @since 3.8.0
|
162 |
+
*
|
163 |
+
* @return array The test result.
|
164 |
+
*/
|
165 |
+
public function pluginUpdate() {
|
166 |
+
global $aioseop_version;
|
167 |
+
|
168 |
+
$shouldUpdate = false;
|
169 |
+
if ( ! AIOSEOPPRO ) {
|
170 |
+
$response = wp_remote_get( 'https://api.wordpress.org/plugins/info/1.0/all-in-one-seo-pack.json' );
|
171 |
+
$body = wp_remote_retrieve_body( $response );
|
172 |
+
if ( ! $body ) {
|
173 |
+
// Something went wrong.
|
174 |
+
return;
|
175 |
+
}
|
176 |
+
|
177 |
+
$pluginData = json_decode( $body );
|
178 |
+
$shouldUpdate = version_compare( AIOSEOP_VERSION, $pluginData->version, '<' );
|
179 |
+
} else {
|
180 |
+
if ( AIOSEOPPRO ) {
|
181 |
+
global $aioseop_update_checker;
|
182 |
+
if ( null !== $aioseop_update_checker->checkForUpdates() ) {
|
183 |
+
$shouldUpdate = true;
|
184 |
+
}
|
185 |
+
}
|
186 |
+
}
|
187 |
+
|
188 |
+
if ( $shouldUpdate ) {
|
189 |
+
return $this->result(
|
190 |
+
'aioseo_plugin_update',
|
191 |
+
'critical',
|
192 |
+
__( 'All in One SEO needs to be updated', 'all-in-one-seo-pack' ),
|
193 |
+
__( "An update is available for All in One SEO. Upgrade to the latest version to receive all the latest features, bug fixes and security improvements.", 'all-in-one-seo-pack' ),
|
194 |
+
$this->actionLink( admin_url( 'plugins.php' ), __( 'Go to Plugins', 'all-in-one-seo-pack' ) )
|
195 |
+
);
|
196 |
+
}
|
197 |
+
return $this->result(
|
198 |
+
'aioseo_plugin_update',
|
199 |
+
'good',
|
200 |
+
__( 'All in One SEO is updated to the latest version', 'all-in-one-seo-pack' ),
|
201 |
+
__( "Fantastic! By updating to the latest version, you have access to all the latest features, bug fixes and security improvements.", 'all-in-one-seo-pack' )
|
202 |
+
);
|
203 |
+
}
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Returns the test result.
|
207 |
+
*
|
208 |
+
* @since 3.8.0
|
209 |
+
*
|
210 |
+
* @param string $name The test name.
|
211 |
+
* @param string $status The result status.
|
212 |
+
* @param string $header The test header.
|
213 |
+
* @param string $description The result description.
|
214 |
+
* @param string $actions The result actions.
|
215 |
+
* @return array The test result.
|
216 |
+
*/
|
217 |
+
private function result( $name, $status, $header, $description, $actions = '' ) {
|
218 |
+
$color = 'blue';
|
219 |
+
switch ( $status ) {
|
220 |
+
case 'good':
|
221 |
+
break;
|
222 |
+
case 'recommended':
|
223 |
+
$color = 'orange';
|
224 |
+
break;
|
225 |
+
case 'critical':
|
226 |
+
$color = 'red';
|
227 |
+
break;
|
228 |
+
default:
|
229 |
+
break;
|
230 |
+
}
|
231 |
+
|
232 |
+
return array(
|
233 |
+
'test' => $name,
|
234 |
+
'status' => $status,
|
235 |
+
'label' => $header,
|
236 |
+
'description' => $description,
|
237 |
+
'actions' => $actions,
|
238 |
+
'badge' => array(
|
239 |
+
'label' => AIOSEOP_PLUGIN_NAME,
|
240 |
+
'color' => $color,
|
241 |
+
),
|
242 |
+
);
|
243 |
+
}
|
244 |
+
|
245 |
+
/**
|
246 |
+
* Adds our site health debug info.
|
247 |
+
*
|
248 |
+
* @since 3.8.0
|
249 |
+
*
|
250 |
+
* @param array $debugInfo The debug info.
|
251 |
+
* @return array $debugInfo The debug info.
|
252 |
+
*/
|
253 |
+
public function addDebugInfo( $debugInfo ) {
|
254 |
+
$fields = array();
|
255 |
+
|
256 |
+
$noindexed = $this->noindexed();
|
257 |
+
if ( $noindexed ) {
|
258 |
+
$fields['noindexed'] = $this->field(
|
259 |
+
__( 'Noindexed content', 'all-in-one-seo-pack' ),
|
260 |
+
implode( ', ', $noindexed )
|
261 |
+
);
|
262 |
+
}
|
263 |
+
|
264 |
+
$nofollowed = $this->nofollowed();
|
265 |
+
if ( $nofollowed ) {
|
266 |
+
$fields['nofollowed'] = $this->field(
|
267 |
+
__( 'Nofollowed content', 'all-in-one-seo-pack' ),
|
268 |
+
implode( ', ', $nofollowed )
|
269 |
+
);
|
270 |
+
}
|
271 |
+
|
272 |
+
if ( ! count( $fields ) ) {
|
273 |
+
return $debugInfo;
|
274 |
+
}
|
275 |
+
|
276 |
+
$debugInfo['aioseo'] = array(
|
277 |
+
'label' => __( 'SEO', 'all-in-one-seo-pack' ),
|
278 |
+
'description' => __( 'The fields below contain important SEO information from All in One SEO that may effect your site.', 'all-in-one-seo-pack' ),
|
279 |
+
'private' => false,
|
280 |
+
'show_count' => true,
|
281 |
+
'fields' => $fields,
|
282 |
+
);
|
283 |
+
return $debugInfo;
|
284 |
+
}
|
285 |
+
|
286 |
+
/**
|
287 |
+
* Returns a list of noindexed content.
|
288 |
+
*
|
289 |
+
* @since 3.8.0
|
290 |
+
*
|
291 |
+
* @return array $noindexed A list of noindexed content.
|
292 |
+
*/
|
293 |
+
private function noindexed() {
|
294 |
+
global $aioseop_options;
|
295 |
+
$settings = array(
|
296 |
+
'aiosp_category_noindex' => __( 'Categories', 'all-in-one-seo-pack' ),
|
297 |
+
'aiosp_tags_noindex' => __( 'Tags', 'all-in-one-seo-pack' ),
|
298 |
+
'aiosp_paginated_noindex' => __( 'Paginated Content', 'all-in-one-seo-pack' ),
|
299 |
+
'aiosp_archive_author_noindex' => __( 'Author Archives', 'all-in-one-seo-pack' ),
|
300 |
+
'aiosp_archive_date_noindex' => __( 'Date Archives', 'all-in-one-seo-pack' ),
|
301 |
+
'aiosp_search_noindex' => __( 'Search Page', 'all-in-one-seo-pack' ),
|
302 |
+
'aiosp_404_noindex' => __( '404 Not Found Page', 'all-in-one-seo-pack' ),
|
303 |
+
);
|
304 |
+
|
305 |
+
$noindexed = array();
|
306 |
+
if ( ! empty( $aioseop_options['aiosp_cpostnoindex'] ) && is_array( $aioseop_options['aiosp_cpostnoindex'] ) ) {
|
307 |
+
$postTypes = get_post_types( array( 'public' => true ), 'objects' );
|
308 |
+
foreach ( $postTypes as $postType ) {
|
309 |
+
if ( in_array( $postType->name, $aioseop_options['aiosp_cpostnoindex'] ) ) {
|
310 |
+
array_push( $noindexed, ucfirst( $postType->label ) . " ($postType->name)" );
|
311 |
+
}
|
312 |
+
}
|
313 |
+
}
|
314 |
+
|
315 |
+
if ( ! empty( $aioseop_options['aiosp_tax_noindex'] ) && is_array( $aioseop_options['aiosp_tax_noindex'] ) ) {
|
316 |
+
$taxonomies = get_taxonomies( array( 'public' => true ), 'objects' );
|
317 |
+
foreach ( $taxonomies as $taxonomy ) {
|
318 |
+
if ( in_array( $taxonomy->name, $aioseop_options['aiosp_tax_noindex'] ) ) {
|
319 |
+
array_push( $noindexed, ucfirst( $taxonomy->label ) . " ($taxonomy->name)" );
|
320 |
+
}
|
321 |
+
}
|
322 |
+
}
|
323 |
+
|
324 |
+
foreach ( $settings as $name => $type ) {
|
325 |
+
if ( ! empty( $aioseop_options[ $name ] ) ) {
|
326 |
+
array_push( $noindexed, $type );
|
327 |
+
}
|
328 |
+
}
|
329 |
+
return $noindexed;
|
330 |
+
}
|
331 |
+
|
332 |
+
/**
|
333 |
+
* Returns a list of nofollowed content.
|
334 |
+
*
|
335 |
+
* @since 3.8.0
|
336 |
+
*
|
337 |
+
* @return array $nofollowed A list of nofollowed content.
|
338 |
+
*/
|
339 |
+
private function nofollowed() {
|
340 |
+
global $aioseop_options;
|
341 |
+
|
342 |
+
$nofollowed = array();
|
343 |
+
if ( ! empty( $aioseop_options['aiosp_cpostnofollow'] ) && is_array( $aioseop_options['aiosp_cpostnofollow'] ) ) {
|
344 |
+
$postTypes = get_post_types( array( 'public' => true ), 'objects' );
|
345 |
+
foreach ( $postTypes as $postType ) {
|
346 |
+
if ( in_array( $postType->name, $aioseop_options['aiosp_cpostnofollow'] ) ) {
|
347 |
+
array_push( $nofollowed, ucfirst( $postType->label ) . " ($postType->name)" );
|
348 |
+
}
|
349 |
+
}
|
350 |
+
}
|
351 |
+
|
352 |
+
if ( ! empty( $aioseop_options['aiosp_paginated_nofollow'] ) ) {
|
353 |
+
array_push( $nofollowed, __( 'Paginated Content', 'all-in-one-seo-pack' ) );
|
354 |
+
}
|
355 |
+
return $nofollowed;
|
356 |
+
}
|
357 |
+
|
358 |
+
/**
|
359 |
+
* Returns a debug info data field.
|
360 |
+
*
|
361 |
+
* @since 3.8.0
|
362 |
+
*
|
363 |
+
* @param string $label The field label.
|
364 |
+
* @param string $value The field value.
|
365 |
+
* @param boolean $private Whether the field shouldn't be included if the debug info is copied.
|
366 |
+
* @return array The debug info data field.
|
367 |
+
*/
|
368 |
+
private function field( $label, $value, $private = false ) {
|
369 |
+
return array(
|
370 |
+
'label' => $label,
|
371 |
+
'value' => $value,
|
372 |
+
'private' => $private,
|
373 |
+
);
|
374 |
+
}
|
375 |
+
|
376 |
+
/**
|
377 |
+
* Returns an action link.
|
378 |
+
*
|
379 |
+
* @since 3.8.0
|
380 |
+
*
|
381 |
+
* @param string $path The path.
|
382 |
+
* @param string $anchor The anchor text.
|
383 |
+
* @return string The action link.
|
384 |
+
*/
|
385 |
+
private function actionLink( $path, $anchor ) {
|
386 |
+
return sprintf(
|
387 |
+
'<p><a href="%1$s">%2$s</a></p>',
|
388 |
+
$path,
|
389 |
+
$anchor
|
390 |
+
);
|
391 |
+
}
|
392 |
+
}
|
inc/aioseop_functions.php
CHANGED
@@ -927,28 +927,6 @@ if ( ! function_exists( 'aioseop_ajax_save_meta' ) ) {
|
|
927 |
}
|
928 |
}
|
929 |
|
930 |
-
if ( ! function_exists( 'aioseop_unprotect_meta' ) ) {
|
931 |
-
|
932 |
-
/**
|
933 |
-
* AIOSEOP Unprotect Meta
|
934 |
-
*
|
935 |
-
* @since ?
|
936 |
-
*
|
937 |
-
* @param $protected
|
938 |
-
* @param $meta_key
|
939 |
-
* @param $meta_type
|
940 |
-
*
|
941 |
-
* @return bool
|
942 |
-
*/
|
943 |
-
function aioseop_unprotect_meta( $protected, $meta_key, $meta_type ) {
|
944 |
-
if ( isset( $meta_key ) && ( substr( $meta_key, 0, 9 ) === '_aioseop_' ) ) {
|
945 |
-
return false;
|
946 |
-
}
|
947 |
-
|
948 |
-
return $protected;
|
949 |
-
}
|
950 |
-
}
|
951 |
-
|
952 |
if ( ! function_exists( 'aioseop_mrt_exclude_this_page' ) ) {
|
953 |
|
954 |
/**
|
927 |
}
|
928 |
}
|
929 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
930 |
if ( ! function_exists( 'aioseop_mrt_exclude_this_page' ) ) {
|
931 |
|
932 |
/**
|
inc/aioseop_updates_class.php
CHANGED
@@ -17,13 +17,6 @@
|
|
17 |
*/
|
18 |
class AIOSEOP_Updates {
|
19 |
|
20 |
-
/**
|
21 |
-
* Constructor
|
22 |
-
*/
|
23 |
-
function __construct() {
|
24 |
-
|
25 |
-
}
|
26 |
-
|
27 |
/**
|
28 |
* Updates version.
|
29 |
*
|
@@ -169,6 +162,10 @@ class AIOSEOP_Updates {
|
|
169 |
if ( version_compare( $old_version, '3.7.0', '<' ) ) {
|
170 |
$this->rssContent();
|
171 |
}
|
|
|
|
|
|
|
|
|
172 |
}
|
173 |
|
174 |
/**
|
@@ -465,4 +462,27 @@ class AIOSEOP_Updates {
|
|
465 |
update_option( 'aioseop_options', $aioseop_options );
|
466 |
}
|
467 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
468 |
}
|
17 |
*/
|
18 |
class AIOSEOP_Updates {
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
/**
|
21 |
* Updates version.
|
22 |
*
|
162 |
if ( version_compare( $old_version, '3.7.0', '<' ) ) {
|
163 |
$this->rssContent();
|
164 |
}
|
165 |
+
|
166 |
+
if ( version_compare( $old_version, '3.7.1', '<' ) ) {
|
167 |
+
$this->deprecateSettings();
|
168 |
+
}
|
169 |
}
|
170 |
|
171 |
/**
|
462 |
update_option( 'aioseop_options', $aioseop_options );
|
463 |
}
|
464 |
|
465 |
+
/**
|
466 |
+
* Registers notices for deprecated settings if they were being used.
|
467 |
+
*
|
468 |
+
* @since 3.7.1
|
469 |
+
*
|
470 |
+
* @return void
|
471 |
+
*/
|
472 |
+
private function deprecateSettings() {
|
473 |
+
global $aioseop_options, $aioseop_notices;
|
474 |
+
if (
|
475 |
+
! empty( $aioseop_options['aiosp_post_meta_tags'] ) ||
|
476 |
+
! empty( $aioseop_options['aiosp_page_meta_tags'] ) ||
|
477 |
+
! empty( $aioseop_options['aiosp_front_meta_tags'] ) ||
|
478 |
+
! empty( $aioseop_options['aiosp_home_meta_tags'] )
|
479 |
+
) {
|
480 |
+
$aioseop_notices->activate_notice( 'deprecated_additional_headers_settings' );
|
481 |
+
}
|
482 |
+
|
483 |
+
if ( isset( $aioseop_options['aiosp_unprotect_meta'] ) && $aioseop_options['aiosp_unprotect_meta'] ) {
|
484 |
+
$aioseop_notices->activate_notice( 'deprecated_unprotect_post_meta_setting' );
|
485 |
+
}
|
486 |
+
}
|
487 |
+
|
488 |
}
|
modules/aioseop_sitemap.php
CHANGED
@@ -814,6 +814,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
|
|
814 |
|
815 |
$taxonomy_terms_tmp = get_terms( apply_filters( 'aioseop_sitemap_add_post_types_taxonomy_terms_args', $args_terms ) );
|
816 |
foreach ( $taxonomy_terms_tmp as $k2_id => $v2_term ) {
|
|
|
|
|
|
|
817 |
$excl_terms_init_opts[ $v1_taxonomy . '-' . $k2_id ] = $v2_term . ' (' . $v1_taxonomy . ')';
|
818 |
}
|
819 |
}
|
@@ -1685,12 +1688,16 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
|
|
1685 |
// if the sitemap has no content, it's probabaly invalid and is being called directly.
|
1686 |
// @issue ( https://github.com/awesomemotive/all-in-one-seo-pack/issues/2190 ).
|
1687 |
if ( empty( $content ) ) {
|
1688 |
-
|
1689 |
-
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
|
|
|
|
|
|
|
|
1694 |
}
|
1695 |
|
1696 |
echo $content;
|
814 |
|
815 |
$taxonomy_terms_tmp = get_terms( apply_filters( 'aioseop_sitemap_add_post_types_taxonomy_terms_args', $args_terms ) );
|
816 |
foreach ( $taxonomy_terms_tmp as $k2_id => $v2_term ) {
|
817 |
+
if ( ! is_string( $v2_term ) ) {
|
818 |
+
continue;
|
819 |
+
}
|
820 |
$excl_terms_init_opts[ $v1_taxonomy . '-' . $k2_id ] = $v2_term . ' (' . $v1_taxonomy . ')';
|
821 |
}
|
822 |
}
|
1688 |
// if the sitemap has no content, it's probabaly invalid and is being called directly.
|
1689 |
// @issue ( https://github.com/awesomemotive/all-in-one-seo-pack/issues/2190 ).
|
1690 |
if ( empty( $content ) ) {
|
1691 |
+
return add_action( 'template_redirect', function() {
|
1692 |
+
global $wp_query;
|
1693 |
+
$wp_query->set_404();
|
1694 |
+
status_header( 404 );
|
1695 |
+
$blog_charset = get_option( 'blog_charset' );
|
1696 |
+
header( "Content-Type: text/html; charset=$blog_charset", true );
|
1697 |
+
nocache_headers();
|
1698 |
+
include( get_404_template() );
|
1699 |
+
exit();
|
1700 |
+
});
|
1701 |
}
|
1702 |
|
1703 |
echo $content;
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: semperplugins, smub, benjaminprojas
|
3 |
Tags: SEO, Google Search Console, XML Sitemap, meta description, meta title, noindex
|
4 |
Requires at least: 4.9
|
5 |
-
Tested up to: 5.5
|
6 |
-
Stable tag: 3.7.
|
7 |
License: GPLv2 or later
|
8 |
Requires PHP: 5.2.4
|
9 |
|
2 |
Contributors: semperplugins, smub, benjaminprojas
|
3 |
Tags: SEO, Google Search Console, XML Sitemap, meta description, meta title, noindex
|
4 |
Requires at least: 4.9
|
5 |
+
Tested up to: 5.5.1
|
6 |
+
Stable tag: 3.7.1
|
7 |
License: GPLv2 or later
|
8 |
Requires PHP: 5.2.4
|
9 |
|