Version Description
Download this release
Release Info
Developer | hallsofmontezuma |
Plugin | All in One SEO Pack |
Version | 2.3.12 |
Comparing to | |
See all releases |
Code changes from version 2.3.11.4 to 2.3.12
- admin/aioseop_module_class.php +1 -1
- admin/display/credits-content.php +1 -0
- admin/display/menu.php +35 -0
- admin/display/welcome-content.php +2 -2
- admin/meta_import.php +4 -0
- aioseop_class.php +103 -17
- all_in_one_seo_pack.php +4 -3
- css/aiosp_admin.css +5 -0
- modules/aioseop_opengraph.php +58 -52
- modules/aioseop_robots.php +1 -1
- modules/aioseop_sitemap.php +1 -1
- readme.txt +2 -2
admin/aioseop_module_class.php
CHANGED
@@ -2557,7 +2557,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
|
|
2557 |
'Submit_Default' => array(
|
2558 |
'type' => 'submit',
|
2559 |
'class' => 'button-secondary',
|
2560 |
-
'value' =>
|
2561 |
),
|
2562 |
);
|
2563 |
$submit_options = apply_filters( "{$this->prefix}submit_options", $submit_options, $location );
|
2557 |
'Submit_Default' => array(
|
2558 |
'type' => 'submit',
|
2559 |
'class' => 'button-secondary',
|
2560 |
+
'value' => sprintf( __( 'Reset %s Settings to Defaults', 'all-in-one-seo-pack' ), $name ) . ' »',
|
2561 |
),
|
2562 |
);
|
2563 |
$submit_options = apply_filters( "{$this->prefix}submit_options", $submit_options, $location );
|
admin/display/credits-content.php
CHANGED
@@ -72,6 +72,7 @@
|
|
72 |
<a href="https://profiles.wordpress.org/webaware/" target="_blank">webaware</a>,
|
73 |
<a href="https://profiles.wordpress.org/escribirelmundo/" target="_blank">escribirelmundo</a>,
|
74 |
<a href="https://profiles.wordpress.org/casiepa/" target="_blank">Pascal Casier</a>,
|
|
|
75 |
<a href="https://profiles.wordpress.org/nurron/" target="_blank">Nurron Shodiqin</a>,
|
76 |
<a href="https://profiles.wordpress.org/aprmndr/" target="_blank">Alyssa Primandaru</a>,
|
77 |
<a href="https://profiles.wordpress.org/facestoro/" target="_blank">facestoro</a>,
|
72 |
<a href="https://profiles.wordpress.org/webaware/" target="_blank">webaware</a>,
|
73 |
<a href="https://profiles.wordpress.org/escribirelmundo/" target="_blank">escribirelmundo</a>,
|
74 |
<a href="https://profiles.wordpress.org/casiepa/" target="_blank">Pascal Casier</a>,
|
75 |
+
<a href="https://profiles.wordpress.org/shoheitanaka/" target="_blank">Shohei Tanaka</a>,
|
76 |
<a href="https://profiles.wordpress.org/nurron/" target="_blank">Nurron Shodiqin</a>,
|
77 |
<a href="https://profiles.wordpress.org/aprmndr/" target="_blank">Alyssa Primandaru</a>,
|
78 |
<a href="https://profiles.wordpress.org/facestoro/" target="_blank">facestoro</a>,
|
admin/display/menu.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class AIOSEOPAdminMenus
|
5 |
+
*
|
6 |
+
* @since 2.3.11.5
|
7 |
+
*/
|
8 |
+
class AIOSEOPAdminMenus {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Constructor to add the actions.
|
12 |
+
*/
|
13 |
+
function __construct() {
|
14 |
+
add_action( 'admin_menu', array( $this, 'add_pro_submenu' ), 11 );
|
15 |
+
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Adds Upgrade link to our menu.
|
20 |
+
*
|
21 |
+
* @since 2.3.11.5
|
22 |
+
*/
|
23 |
+
function add_pro_submenu() {
|
24 |
+
global $submenu;
|
25 |
+
$url = 'https://semperplugins.com/all-in-one-seo-pack-pro-version/';
|
26 |
+
$upgrade_text = __('Upgrade to Pro', 'all-in-one-seo-pack');
|
27 |
+
$submenu['all-in-one-seo-pack/aioseop_class.php'][] = array(
|
28 |
+
"<span class='upgrade_menu_link'>$upgrade_text</span>",
|
29 |
+
'manage_options',
|
30 |
+
$url,
|
31 |
+
);
|
32 |
+
}
|
33 |
+
}
|
34 |
+
|
35 |
+
new AIOSEOPAdminMenus();
|
admin/display/welcome-content.php
CHANGED
@@ -52,10 +52,10 @@
|
|
52 |
target="_blank"><?php echo __( 'We have complete documentation on every setting and feature', 'all-in-one-seo-pack' ); ?></a>
|
53 |
</li>
|
54 |
<li><a href="https://semperplugins.com/videos/"
|
55 |
-
target="_blank"><?php echo __( '
|
56 |
</li>
|
57 |
<li><a href="https://semperplugins.com/all-in-one-seo-pack-pro-version/?loc=aio_welcome"
|
58 |
-
target="_blank"><?php echo __( '
|
59 |
</li>
|
60 |
</ul>
|
61 |
</div>
|
52 |
target="_blank"><?php echo __( 'We have complete documentation on every setting and feature', 'all-in-one-seo-pack' ); ?></a>
|
53 |
</li>
|
54 |
<li><a href="https://semperplugins.com/videos/"
|
55 |
+
target="_blank"><?php echo __( 'Access to video tutorials about SEO with the Pro version', 'all-in-one-seo-pack' ); ?></a>
|
56 |
</li>
|
57 |
<li><a href="https://semperplugins.com/all-in-one-seo-pack-pro-version/?loc=aio_welcome"
|
58 |
+
target="_blank"><?php echo __( 'Control SEO on categories, tags and custom taxonomies with the Pro version', 'all-in-one-seo-pack' ); ?></a>
|
59 |
</li>
|
60 |
</ul>
|
61 |
</div>
|
admin/meta_import.php
CHANGED
@@ -520,6 +520,10 @@ function aiosp_seometa_import() {
|
|
520 |
'META Description' => 'description',
|
521 |
'META Keywords' => 'keywords',
|
522 |
),
|
|
|
|
|
|
|
|
|
523 |
'SEO Title Tag' => array(
|
524 |
'Custom Doctitle' => 'title_tag',
|
525 |
'META Description' => 'meta_description',
|
520 |
'META Description' => 'description',
|
521 |
'META Keywords' => 'keywords',
|
522 |
),
|
523 |
+
'SEOpressor' => array(
|
524 |
+
'Custom Doctitle' => '_seopressor_meta_title',
|
525 |
+
'META Description' => '_seopressor_meta_description',
|
526 |
+
),
|
527 |
'SEO Title Tag' => array(
|
528 |
'Custom Doctitle' => 'title_tag',
|
529 |
'META Description' => 'meta_description',
|
aioseop_class.php
CHANGED
@@ -161,9 +161,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
161 |
'description_format' => __( 'This controls the format of Meta Descriptions.The following macros are supported:', 'all-in-one-seo-pack' ) .
|
162 |
'<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
|
163 |
__( '%blog_description% - Your blog description', 'all-in-one-seo-pack' ) . '</li><li>' .
|
164 |
-
__( '%description% -
|
165 |
__( '%post_title% - The original title of the post', 'all-in-one-seo-pack' ) . '</li><li>' .
|
166 |
-
__( '%wp_title% - The original
|
167 |
__( '%current_date% - The current date (localized)', 'all-in-one-seo-pack' ) . '</li></ul>',
|
168 |
'404_title_format' => __( 'This controls the format of the title tag for the 404 page.<br />The following macros are supported:', 'all-in-one-seo-pack' ) .
|
169 |
'<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
|
@@ -219,7 +219,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
219 |
'cpostnoodp' => __( 'Set the default noodp setting for each Post Type.', 'all-in-one-seo-pack' ),
|
220 |
'noydir' => __( 'Check this box to ask Yahoo! not to use descriptions from the Yahoo! directory for your entire site.', 'all-in-one-seo-pack' ),
|
221 |
'cpostnoydir' => __( 'Set the default noydir setting for each Post Type.', 'all-in-one-seo-pack' ),
|
222 |
-
'skip_excerpt' => __( "
|
223 |
'generate_descriptions' => __( 'Check this and your Meta Descriptions will be auto-generated from your excerpt or content.', 'all-in-one-seo-pack' ),
|
224 |
'run_shortcodes' => __( 'Check this and shortcodes will get executed for descriptions auto-generated from content.', 'all-in-one-seo-pack' ),
|
225 |
'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' ),
|
@@ -832,14 +832,15 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
832 |
'name' => __( 'Exclude site from Yahoo! Directory:', 'all-in-one-seo-pack' ),
|
833 |
'default' => 0,
|
834 |
),
|
835 |
-
'skip_excerpt' => array(
|
836 |
-
'name' => __( 'Avoid Using The Excerpt In Descriptions:', 'all-in-one-seo-pack' ),
|
837 |
-
'default' => 0,
|
838 |
-
),
|
839 |
'generate_descriptions' => array(
|
840 |
'name' => __( 'Autogenerate Descriptions:', 'all-in-one-seo-pack' ),
|
841 |
'default' => 0,
|
842 |
),
|
|
|
|
|
|
|
|
|
|
|
843 |
'run_shortcodes' => array(
|
844 |
'name' => __( 'Run Shortcodes In Autogenerated Descriptions:', 'all-in-one-seo-pack' ),
|
845 |
'default' => 0,
|
@@ -1624,10 +1625,10 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
1624 |
global $post;
|
1625 |
$post_id = $post->ID;
|
1626 |
|
1627 |
-
if ( is_post_type_archive() && is_post_type_archive( 'product' ) && $post_id =
|
1628 |
$frontpage_id = get_option( 'page_on_front' );
|
1629 |
|
1630 |
-
if (
|
1631 |
$title = $this->internationalize( get_post_meta( $post->ID, '_aioseop_title', true ) );
|
1632 |
}
|
1633 |
// $title = $this->internationalize( $aioseop_options['aiosp_home_title'] );
|
@@ -1708,7 +1709,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
1708 |
|
1709 |
return $title;
|
1710 |
}
|
1711 |
-
} else if ( function_exists( '
|
1712 |
// Too far down? -mrt.
|
1713 |
$title = $this->internationalize( get_post_meta( $post->ID, '_aioseop_title', true ) );
|
1714 |
if ( ! $title ) {
|
@@ -2488,15 +2489,15 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
2488 |
$description = '';
|
2489 |
if ( is_author() && $this->show_page_description() ) {
|
2490 |
$description = $this->internationalize( get_the_author_meta( 'description' ) );
|
2491 |
-
} else if ( function_exists( '
|
2492 |
// $description = $this->get_post_description( $post );
|
2493 |
// $description = $this->apply_cf_fields( $description );
|
2494 |
-
if ( ! (
|
2495 |
$description = trim( $this->internationalize( get_post_meta( $post->ID, '_aioseop_description', true ) ) );
|
2496 |
-
} else if (
|
2497 |
// $description = $this->get_aioseop_description( $post );
|
2498 |
$description = trim( $this->internationalize( get_post_meta( $post->ID, '_aioseop_description', true ) ) );
|
2499 |
-
} else if (
|
2500 |
$description = $this->get_aioseop_description( $post );
|
2501 |
}
|
2502 |
} else if ( is_front_page() ) {
|
@@ -3581,17 +3582,30 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
3581 |
* @return mixed|string
|
3582 |
*/
|
3583 |
function rewrite_title( $header ) {
|
|
|
3584 |
global $wp_query;
|
3585 |
if ( ! $wp_query ) {
|
3586 |
-
$header .= "<!-- no wp_query found! -->\n";
|
3587 |
-
|
3588 |
return $header;
|
3589 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3590 |
$title = $this->wp_title();
|
3591 |
if ( ! empty( $title ) ) {
|
3592 |
$header = $this->replace_title( $header, $title );
|
3593 |
}
|
3594 |
|
|
|
|
|
|
|
|
|
|
|
3595 |
return $header;
|
3596 |
}
|
3597 |
|
@@ -3653,6 +3667,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
3653 |
add_action( 'aioseop_modules_wp_head', array( $this, 'aiosp_google_analytics' ) );
|
3654 |
}
|
3655 |
add_action( 'wp_head', array( $this, 'wp_head' ), apply_filters( 'aioseop_wp_head_priority', 1 ) );
|
|
|
3656 |
add_action( 'template_redirect', array( $this, 'template_redirect' ), 0 );
|
3657 |
}
|
3658 |
}
|
@@ -3724,7 +3739,44 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
3724 |
return $description;
|
3725 |
}
|
3726 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3727 |
function wp_head() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3728 |
if ( ! $this->is_page_included() ) {
|
3729 |
return;
|
3730 |
}
|
@@ -3761,12 +3813,16 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
3761 |
}
|
3762 |
$blog_page = aiosp_common::get_blog_page( $post );
|
3763 |
$save_posts = $posts;
|
3764 |
-
|
|
|
|
|
|
|
3765 |
global $posts;
|
3766 |
$opts = $this->meta_opts = $this->get_current_options( array(), 'aiosp', null, $post );
|
3767 |
$posts = array();
|
3768 |
$posts[] = $post;
|
3769 |
}
|
|
|
3770 |
$posts = $save_posts;
|
3771 |
$description = apply_filters( 'aioseop_description', $this->get_main_description( $post ) ); // Get the description.
|
3772 |
// Handle the description format.
|
@@ -3912,6 +3968,13 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
3912 |
} else {
|
3913 |
echo "<!-- /all in one seo pack -->\n";
|
3914 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3915 |
}
|
3916 |
|
3917 |
/**
|
@@ -4008,6 +4071,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
4008 |
|
4009 |
/**
|
4010 |
* @return string
|
|
|
|
|
4011 |
*/
|
4012 |
function get_robots_meta() {
|
4013 |
global $aioseop_options;
|
@@ -4079,6 +4144,11 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
4079 |
if ( $aiosp_noydir ) {
|
4080 |
$nofollow .= ',noydir';
|
4081 |
}
|
|
|
|
|
|
|
|
|
|
|
4082 |
$robots_meta = $noindex . ',' . $nofollow;
|
4083 |
if ( $robots_meta == 'index,follow' ) {
|
4084 |
$robots_meta = '';
|
@@ -4087,6 +4157,22 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
|
|
4087 |
return $robots_meta;
|
4088 |
}
|
4089 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4090 |
/**
|
4091 |
* @return mixed|void
|
4092 |
*/
|
161 |
'description_format' => __( 'This controls the format of Meta Descriptions.The following macros are supported:', 'all-in-one-seo-pack' ) .
|
162 |
'<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
|
163 |
__( '%blog_description% - Your blog description', 'all-in-one-seo-pack' ) . '</li><li>' .
|
164 |
+
__( '%description% - This outputs the description you write for each page/post or the autogenerated description, if you have that option enabled', 'all-in-one-seo-pack' ) . '</li><li>' .
|
165 |
__( '%post_title% - The original title of the post', 'all-in-one-seo-pack' ) . '</li><li>' .
|
166 |
+
__( '%wp_title% - The original WordPress title, e.g. post_title for posts', 'all-in-one-seo-pack' ) . '</li><li>' .
|
167 |
__( '%current_date% - The current date (localized)', 'all-in-one-seo-pack' ) . '</li></ul>',
|
168 |
'404_title_format' => __( 'This controls the format of the title tag for the 404 page.<br />The following macros are supported:', 'all-in-one-seo-pack' ) .
|
169 |
'<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
|
219 |
'cpostnoodp' => __( 'Set the default noodp setting for each Post Type.', 'all-in-one-seo-pack' ),
|
220 |
'noydir' => __( 'Check this box to ask Yahoo! not to use descriptions from the Yahoo! directory for your entire site.', 'all-in-one-seo-pack' ),
|
221 |
'cpostnoydir' => __( 'Set the default noydir setting for each Post Type.', 'all-in-one-seo-pack' ),
|
222 |
+
'skip_excerpt' => __( "This option will auto generate your meta descriptions from your post content instead of your post excerpt. This is useful if you want to use your content for your autogenerated meta descriptions instead of the excerpt. WooCommerce users should read the documentation regarding this setting.", 'all-in-one-seo-pack' ),
|
223 |
'generate_descriptions' => __( 'Check this and your Meta Descriptions will be auto-generated from your excerpt or content.', 'all-in-one-seo-pack' ),
|
224 |
'run_shortcodes' => __( 'Check this and shortcodes will get executed for descriptions auto-generated from content.', 'all-in-one-seo-pack' ),
|
225 |
'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' ),
|
832 |
'name' => __( 'Exclude site from Yahoo! Directory:', 'all-in-one-seo-pack' ),
|
833 |
'default' => 0,
|
834 |
),
|
|
|
|
|
|
|
|
|
835 |
'generate_descriptions' => array(
|
836 |
'name' => __( 'Autogenerate Descriptions:', 'all-in-one-seo-pack' ),
|
837 |
'default' => 0,
|
838 |
),
|
839 |
+
'skip_excerpt' => array(
|
840 |
+
'name' => __( 'Use Content For Autogenerated Descriptions:', 'all-in-one-seo-pack' ),
|
841 |
+
'default' => 0,
|
842 |
+
'condshow' => array( 'aiosp_generate_descriptions' => 'on' ),
|
843 |
+
),
|
844 |
'run_shortcodes' => array(
|
845 |
'name' => __( 'Run Shortcodes In Autogenerated Descriptions:', 'all-in-one-seo-pack' ),
|
846 |
'default' => 0,
|
1625 |
global $post;
|
1626 |
$post_id = $post->ID;
|
1627 |
|
1628 |
+
if ( is_post_type_archive() && is_post_type_archive( 'product' ) && $post_id = wc_get_page_id( 'shop' ) && $post = get_post( $post_id ) ) {
|
1629 |
$frontpage_id = get_option( 'page_on_front' );
|
1630 |
|
1631 |
+
if ( wc_get_page_id( 'shop' ) == get_option( 'page_on_front' ) && ! empty( $aioseop_options['aiosp_use_static_home_info'] ) ) {
|
1632 |
$title = $this->internationalize( get_post_meta( $post->ID, '_aioseop_title', true ) );
|
1633 |
}
|
1634 |
// $title = $this->internationalize( $aioseop_options['aiosp_home_title'] );
|
1709 |
|
1710 |
return $title;
|
1711 |
}
|
1712 |
+
} else if ( function_exists( 'wc_get_page_id' ) && is_post_type_archive( 'product' ) && ( $post_id = wc_get_page_id( 'shop' ) ) && ( $post = get_post( $post_id ) ) ) {
|
1713 |
// Too far down? -mrt.
|
1714 |
$title = $this->internationalize( get_post_meta( $post->ID, '_aioseop_title', true ) );
|
1715 |
if ( ! $title ) {
|
2489 |
$description = '';
|
2490 |
if ( is_author() && $this->show_page_description() ) {
|
2491 |
$description = $this->internationalize( get_the_author_meta( 'description' ) );
|
2492 |
+
} else if ( function_exists( 'wc_get_page_id' ) && is_post_type_archive( 'product' ) && ( $post_id = wc_get_page_id( 'shop' ) ) && ( $post = get_post( $post_id ) ) ) {
|
2493 |
// $description = $this->get_post_description( $post );
|
2494 |
// $description = $this->apply_cf_fields( $description );
|
2495 |
+
if ( ! ( wc_get_page_id( 'shop' ) == get_option( 'page_on_front' ) ) ) {
|
2496 |
$description = trim( $this->internationalize( get_post_meta( $post->ID, '_aioseop_description', true ) ) );
|
2497 |
+
} else if ( wc_get_page_id( 'shop' ) == get_option( 'page_on_front' ) && ! empty( $aioseop_options['aiosp_use_static_home_info'] ) ) {
|
2498 |
// $description = $this->get_aioseop_description( $post );
|
2499 |
$description = trim( $this->internationalize( get_post_meta( $post->ID, '_aioseop_description', true ) ) );
|
2500 |
+
} else if ( wc_get_page_id( 'shop' ) == get_option( 'page_on_front' ) && empty( $aioseop_options['aiosp_use_static_home_info'] ) ) {
|
2501 |
$description = $this->get_aioseop_description( $post );
|
2502 |
}
|
2503 |
} else if ( is_front_page() ) {
|
3582 |
* @return mixed|string
|
3583 |
*/
|
3584 |
function rewrite_title( $header ) {
|
3585 |
+
|
3586 |
global $wp_query;
|
3587 |
if ( ! $wp_query ) {
|
3588 |
+
$header .= "<!-- AIOSEOP no wp_query found! -->\n";
|
|
|
3589 |
return $header;
|
3590 |
}
|
3591 |
+
|
3592 |
+
// Check if we're in the main query to support bad themes and plugins.
|
3593 |
+
$old_wp_query = null;
|
3594 |
+
if ( ! $wp_query->is_main_query() ) {
|
3595 |
+
$old_wp_query = $wp_query;
|
3596 |
+
wp_reset_query();
|
3597 |
+
}
|
3598 |
+
|
3599 |
$title = $this->wp_title();
|
3600 |
if ( ! empty( $title ) ) {
|
3601 |
$header = $this->replace_title( $header, $title );
|
3602 |
}
|
3603 |
|
3604 |
+
if ( ! empty( $old_wp_query ) ) {
|
3605 |
+
$GLOBALS['wp_query'] = $old_wp_query;
|
3606 |
+
// Change the query back after we've finished.
|
3607 |
+
unset( $old_wp_query );
|
3608 |
+
}
|
3609 |
return $header;
|
3610 |
}
|
3611 |
|
3667 |
add_action( 'aioseop_modules_wp_head', array( $this, 'aiosp_google_analytics' ) );
|
3668 |
}
|
3669 |
add_action( 'wp_head', array( $this, 'wp_head' ), apply_filters( 'aioseop_wp_head_priority', 1 ) );
|
3670 |
+
add_action( 'amp_post_template_head', array( $this, 'amp_head' ), 11 );
|
3671 |
add_action( 'template_redirect', array( $this, 'template_redirect' ), 0 );
|
3672 |
}
|
3673 |
}
|
3739 |
return $description;
|
3740 |
}
|
3741 |
|
3742 |
+
/**
|
3743 |
+
* Adds meta description to AMP pages.
|
3744 |
+
*
|
3745 |
+
* @since 2.3.11.5
|
3746 |
+
*/
|
3747 |
+
function amp_head() {
|
3748 |
+
$post = $this->get_queried_object();
|
3749 |
+
$description = apply_filters( 'aioseop_amp_description', $this->get_main_description( $post ) ); // Get the description.
|
3750 |
+
// Handle the description format.
|
3751 |
+
if ( isset( $description ) && ( $this->strlen( $description ) > $this->minimum_description_length ) && ! ( is_front_page() && is_paged() ) ) {
|
3752 |
+
$description = $this->trim_description( $description );
|
3753 |
+
if ( ! isset( $meta_string ) ) {
|
3754 |
+
$meta_string = '';
|
3755 |
+
}
|
3756 |
+
// Description format.
|
3757 |
+
$description = apply_filters( 'aioseop_amp_description_full', $this->apply_description_format( $description, $post ) );
|
3758 |
+
$desc_attr = '';
|
3759 |
+
if ( ! empty( $aioseop_options['aiosp_schema_markup'] ) ) {
|
3760 |
+
$desc_attr = '';
|
3761 |
+
}
|
3762 |
+
$desc_attr = apply_filters( 'aioseop_amp_description_attributes', $desc_attr );
|
3763 |
+
$meta_string .= sprintf( "<meta name=\"description\" %s content=\"%s\" />\n", $desc_attr, $description );
|
3764 |
+
}
|
3765 |
+
if( ! empty( $meta_string) ){
|
3766 |
+
echo $meta_string;
|
3767 |
+
}
|
3768 |
+
}
|
3769 |
+
|
3770 |
function wp_head() {
|
3771 |
+
|
3772 |
+
// Check if we're in the main query to support bad themes and plugins.
|
3773 |
+
global $wp_query;
|
3774 |
+
$old_wp_query = null;
|
3775 |
+
if ( ! $wp_query->is_main_query() ) {
|
3776 |
+
$old_wp_query = $wp_query;
|
3777 |
+
wp_reset_query();
|
3778 |
+
}
|
3779 |
+
|
3780 |
if ( ! $this->is_page_included() ) {
|
3781 |
return;
|
3782 |
}
|
3813 |
}
|
3814 |
$blog_page = aiosp_common::get_blog_page( $post );
|
3815 |
$save_posts = $posts;
|
3816 |
+
|
3817 |
+
// This outputs robots meta tags and custom canonical URl on WooCommerce product archive page.
|
3818 |
+
// See Github issue https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/755.
|
3819 |
+
if ( function_exists( 'wc_get_page_id' ) && is_post_type_archive( 'product' ) && ( $post_id = wc_get_page_id( 'shop' ) ) && ( $post = get_post( $post_id ) ) ) {
|
3820 |
global $posts;
|
3821 |
$opts = $this->meta_opts = $this->get_current_options( array(), 'aiosp', null, $post );
|
3822 |
$posts = array();
|
3823 |
$posts[] = $post;
|
3824 |
}
|
3825 |
+
|
3826 |
$posts = $save_posts;
|
3827 |
$description = apply_filters( 'aioseop_description', $this->get_main_description( $post ) ); // Get the description.
|
3828 |
// Handle the description format.
|
3968 |
} else {
|
3969 |
echo "<!-- /all in one seo pack -->\n";
|
3970 |
}
|
3971 |
+
|
3972 |
+
if ( ! empty( $old_wp_query ) ) {
|
3973 |
+
// Change the query back after we've finished.
|
3974 |
+
$GLOBALS['wp_query'] = $old_wp_query;
|
3975 |
+
unset( $old_wp_query );
|
3976 |
+
}
|
3977 |
+
|
3978 |
}
|
3979 |
|
3980 |
/**
|
4071 |
|
4072 |
/**
|
4073 |
* @return string
|
4074 |
+
* @since 0.0
|
4075 |
+
* @since 2.3.11.5 Added no index API filter hook for password protected posts.
|
4076 |
*/
|
4077 |
function get_robots_meta() {
|
4078 |
global $aioseop_options;
|
4144 |
if ( $aiosp_noydir ) {
|
4145 |
$nofollow .= ',noydir';
|
4146 |
}
|
4147 |
+
|
4148 |
+
if ( is_singular() && $this->is_password_protected() && apply_filters( 'aiosp_noindex_password_posts', false ) ){
|
4149 |
+
$noindex = 'noindex';
|
4150 |
+
}
|
4151 |
+
|
4152 |
$robots_meta = $noindex . ',' . $nofollow;
|
4153 |
if ( $robots_meta == 'index,follow' ) {
|
4154 |
$robots_meta = '';
|
4157 |
return $robots_meta;
|
4158 |
}
|
4159 |
|
4160 |
+
/**
|
4161 |
+
* Determine if post is password protected.
|
4162 |
+
* @since 2.3.11.5
|
4163 |
+
* @return bool
|
4164 |
+
*/
|
4165 |
+
function is_password_protected(){
|
4166 |
+
global $post;
|
4167 |
+
|
4168 |
+
if (!empty($post->post_password)) {
|
4169 |
+
return true;
|
4170 |
+
}
|
4171 |
+
|
4172 |
+
return false;
|
4173 |
+
|
4174 |
+
}
|
4175 |
+
|
4176 |
/**
|
4177 |
* @return mixed|void
|
4178 |
*/
|
all_in_one_seo_pack.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: All In One SEO Pack
|
4 |
Plugin URI: https://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: https://michaeltorbert.com
|
9 |
Text Domain: all-in-one-seo-pack
|
@@ -31,14 +31,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
31 |
* The original WordPress SEO plugin.
|
32 |
*
|
33 |
* @package All-in-One-SEO-Pack
|
34 |
-
* @version 2.3.
|
35 |
*/
|
36 |
|
37 |
if ( ! defined( 'AIOSEOPPRO' ) ) {
|
38 |
define( 'AIOSEOPPRO', false );
|
39 |
}
|
40 |
if ( ! defined( 'AIOSEOP_VERSION' ) ) {
|
41 |
-
define( 'AIOSEOP_VERSION', '2.3.
|
42 |
}
|
43 |
global $aioseop_plugin_name;
|
44 |
$aioseop_plugin_name = 'All in One SEO Pack';
|
@@ -387,6 +387,7 @@ if ( ! function_exists( 'aioseop_init_class' ) ) {
|
|
387 |
require_once( AIOSEOP_PLUGIN_DIR . 'public/google-analytics.php' );
|
388 |
require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/welcome.php' );
|
389 |
require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/dashboard_widget.php' );
|
|
|
390 |
|
391 |
$aioseop_welcome = new aioseop_welcome(); // TODO move this to updates file.
|
392 |
|
3 |
Plugin Name: All In One SEO Pack
|
4 |
Plugin URI: https://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.12
|
7 |
Author: Michael Torbert
|
8 |
Author URI: https://michaeltorbert.com
|
9 |
Text Domain: all-in-one-seo-pack
|
31 |
* The original WordPress SEO plugin.
|
32 |
*
|
33 |
* @package All-in-One-SEO-Pack
|
34 |
+
* @version 2.3.12
|
35 |
*/
|
36 |
|
37 |
if ( ! defined( 'AIOSEOPPRO' ) ) {
|
38 |
define( 'AIOSEOPPRO', false );
|
39 |
}
|
40 |
if ( ! defined( 'AIOSEOP_VERSION' ) ) {
|
41 |
+
define( 'AIOSEOP_VERSION', '2.3.12' );
|
42 |
}
|
43 |
global $aioseop_plugin_name;
|
44 |
$aioseop_plugin_name = 'All in One SEO Pack';
|
387 |
require_once( AIOSEOP_PLUGIN_DIR . 'public/google-analytics.php' );
|
388 |
require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/welcome.php' );
|
389 |
require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/dashboard_widget.php' );
|
390 |
+
require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/menu.php' );
|
391 |
|
392 |
$aioseop_welcome = new aioseop_welcome(); // TODO move this to updates file.
|
393 |
|
css/aiosp_admin.css
CHANGED
@@ -127,3 +127,8 @@ li#wp-admin-bar-aioseop-pro-upgrade a.ab-item {
|
|
127 |
background-color:#00aced;
|
128 |
border-radius:2px;
|
129 |
}
|
|
|
|
|
|
|
|
|
|
127 |
background-color:#00aced;
|
128 |
border-radius:2px;
|
129 |
}
|
130 |
+
.upgrade_menu_link {
|
131 |
+
font-weight: 900;
|
132 |
+
color: #d54e21;
|
133 |
+
font-size: 105%;
|
134 |
+
}
|
modules/aioseop_opengraph.php
CHANGED
@@ -84,7 +84,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
|
|
84 |
|
85 |
$this->help_text = Array(
|
86 |
"setmeta" => __( "Checking this box will use the Home Title and Home Description set in All in One SEO Pack, General Settings as the Open Graph title and description for your home page.", 'all-in-one-seo-pack' ),
|
87 |
-
"key" => __( "Enter your Facebook Admin ID here. You can look up your Facebook ID using this tool http://findmyfbid.com/", 'all-in-one-seo-pack' ),
|
88 |
"appid" => __( "Enter your Facebook App ID here. Information about how to get your Facebook App ID can be found at https://developers.facebook.com/docs/apps/register", 'all-in-one-seo-pack' ),
|
89 |
"title_shortcodes" => __( "Run shortcodes that appear in social title meta tags.", 'all-in-one-seo-pack' ),
|
90 |
"description_shortcodes" => __( "Run shortcodes that appear in social description meta tags.", 'all-in-one-seo-pack' ),
|
@@ -93,7 +93,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
|
|
93 |
"description" => __( "The Home Description is the Open Graph description for your home page.", 'all-in-one-seo-pack' ),
|
94 |
"homeimage" => __( "The Home Image is the Open Graph image for your home page.", 'all-in-one-seo-pack' ),
|
95 |
"hometag" => __( "The Home Tag allows you to add a list of keywords that best describe your home page content.", 'all-in-one-seo-pack' ),
|
96 |
-
"generate_descriptions" => __( "
|
97 |
"defimg" => __( "This option lets you choose which image will be displayed by default for the Open Graph image. You may override this on individual posts.", 'all-in-one-seo-pack' ),
|
98 |
"fallback" => __( "This option lets you fall back to the default image if no image could be found above.", 'all-in-one-seo-pack' ),
|
99 |
"dimg" => __( "This option sets a default image that can be used for the Open Graph image. You can upload an image, select an image from your Media Library or paste the URL of an image here.", 'all-in-one-seo-pack' ),
|
@@ -247,8 +247,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
|
|
247 |
'condshow' => Array( 'aiosp_opengraph_categories' => 'article' ),
|
248 |
),
|
249 |
'generate_descriptions' => Array(
|
250 |
-
'name' => __( '
|
251 |
-
'default' =>
|
252 |
),
|
253 |
'defimg' => Array(
|
254 |
'name' => __( 'Select OG:Image Source', 'all-in-one-seo-pack' ),
|
@@ -555,11 +555,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
|
|
555 |
);
|
556 |
|
557 |
$this->layout = Array(
|
558 |
-
'default' => Array(
|
559 |
-
'name' => __( 'General Settings', 'all-in-one-seo-pack' ),
|
560 |
-
'help_link' => 'https://semperplugins.com/documentation/social-meta-module/',
|
561 |
-
'options' => Array() // this is set below, to the remaining options -- pdb
|
562 |
-
),
|
563 |
'home' => Array(
|
564 |
'name' => __( 'Home Page Settings', 'all-in-one-seo-pack' ),
|
565 |
'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#use-aioseo-title-and-description',
|
@@ -596,6 +591,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
|
|
596 |
'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#default-twitter-card',
|
597 |
'options' => Array( 'defcard', 'setcard', 'twitter_site', 'twitter_creator', 'twitter_domain' ),
|
598 |
),
|
|
|
|
|
|
|
|
|
|
|
599 |
'scan_meta' => Array(
|
600 |
'name' => __( 'Scan Social Meta', 'all-in-one-seo-pack' ),
|
601 |
'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#scan_meta',
|
@@ -874,6 +874,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
|
|
874 |
return $output;
|
875 |
}
|
876 |
|
|
|
|
|
|
|
|
|
|
|
|
|
877 |
function add_meta() {
|
878 |
global $post, $aiosp, $aioseop_options, $wp_query;
|
879 |
$metabox = $this->get_current_options( Array(), 'settings' );
|
@@ -903,6 +909,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
|
|
903 |
$title = $this->options['aiosp_opengraph_hometitle'];
|
904 |
if ( $first_page ) {
|
905 |
$description = $this->options['aiosp_opengraph_description'];
|
|
|
|
|
|
|
906 |
}
|
907 |
if ( ! empty( $this->options['aiosp_opengraph_homeimage'] ) ) {
|
908 |
$thumbnail = $this->options['aiosp_opengraph_homeimage'];
|
@@ -926,8 +935,15 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
|
|
926 |
$sitename = get_bloginfo( 'name' );
|
927 |
}
|
928 |
|
929 |
-
if ( empty( $description ) && $first_page &&
|
930 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
931 |
}
|
932 |
|
933 |
if ( empty( $description ) && $first_page ) {
|
@@ -998,12 +1014,20 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
|
|
998 |
$description = trim( strip_tags( get_post_meta( $post->ID, "_aioseop_description", true ) ) );
|
999 |
}
|
1000 |
|
1001 |
-
/* Add
|
1002 |
if ( empty( $title ) ) {
|
1003 |
$title = get_the_title();
|
1004 |
}
|
1005 |
-
|
1006 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1007 |
}
|
1008 |
if ( empty( $type ) ) {
|
1009 |
$type = 'article';
|
@@ -1165,7 +1189,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
|
|
1165 |
$creator = AIOSEOP_Opengraph_Public::prepare_twitter_username( $creator );
|
1166 |
}
|
1167 |
|
1168 |
-
|
|
|
|
|
1169 |
|
1170 |
if ( isset( $metabox['aioseop_opengraph_settings_customimg_twitter'] ) && ! empty( $metabox['aioseop_opengraph_settings_customimg_twitter'] ) ) {
|
1171 |
// Set Twitter image from custom.
|
@@ -1205,45 +1231,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
|
|
1205 |
),
|
1206 |
);
|
1207 |
|
1208 |
-
//Only show if "use schema.org markup is checked"
|
1209 |
if ( ! empty( $aioseop_options['aiosp_schema_markup'] ) ) {
|
1210 |
$meta['google+'] = Array( 'thumbnail' => 'image' );
|
1211 |
}
|
1212 |
|
1213 |
-
// Add links to testing tools
|
1214 |
-
|
1215 |
-
/*
|
1216 |
-
http://developers.facebook.com/tools/debug
|
1217 |
-
https://dev.twitter.com/docs/cards/preview
|
1218 |
-
http://www.google.com/webmasters/tools/richsnippets
|
1219 |
-
*/
|
1220 |
-
/*
|
1221 |
-
$meta = Array(
|
1222 |
-
'facebook' => Array(
|
1223 |
-
'title' => 'og:title',
|
1224 |
-
'type' => 'og:type',
|
1225 |
-
'url' => 'og:url',
|
1226 |
-
'thumbnail' => 'og:image',
|
1227 |
-
'sitename' => 'og:site_name',
|
1228 |
-
'key' => 'fb:admins',
|
1229 |
-
'description' => 'og:description'
|
1230 |
-
),
|
1231 |
-
'google+' => Array(
|
1232 |
-
'thumbnail' => 'image',
|
1233 |
-
'title' => 'name',
|
1234 |
-
'description' => 'description'
|
1235 |
-
),
|
1236 |
-
'twitter' => Array(
|
1237 |
-
'card' => 'twitter:card',
|
1238 |
-
'url' => 'twitter:url',
|
1239 |
-
'title' => 'twitter:title',
|
1240 |
-
'description' => 'twitter:description',
|
1241 |
-
'thumbnail' => 'twitter:image'
|
1242 |
-
|
1243 |
-
)
|
1244 |
-
);
|
1245 |
-
*/
|
1246 |
-
|
1247 |
$tags = Array(
|
1248 |
'facebook' => Array( 'name' => 'property', 'value' => 'content' ),
|
1249 |
'twitter' => Array( 'name' => 'name', 'value' => 'content' ),
|
@@ -1261,8 +1253,21 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
|
|
1261 |
if ( ! is_array( $filtered_value ) ) {
|
1262 |
$filtered_value = Array( $filtered_value );
|
1263 |
}
|
1264 |
-
|
1265 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1266 |
}
|
1267 |
}
|
1268 |
}
|
@@ -1303,6 +1308,7 @@ END;
|
|
1303 |
}
|
1304 |
if ( ! defined( 'DOING_AJAX' ) ) {
|
1305 |
add_action( 'aioseop_modules_wp_head', Array( $this, 'add_meta' ), 5 );
|
|
|
1306 |
}
|
1307 |
}
|
1308 |
|
84 |
|
85 |
$this->help_text = Array(
|
86 |
"setmeta" => __( "Checking this box will use the Home Title and Home Description set in All in One SEO Pack, General Settings as the Open Graph title and description for your home page.", 'all-in-one-seo-pack' ),
|
87 |
+
"key" => __( "Enter your Facebook Admin ID here. You can enter multiple IDs separated by a comma. You can look up your Facebook ID using this tool http://findmyfbid.com/", 'all-in-one-seo-pack' ),
|
88 |
"appid" => __( "Enter your Facebook App ID here. Information about how to get your Facebook App ID can be found at https://developers.facebook.com/docs/apps/register", 'all-in-one-seo-pack' ),
|
89 |
"title_shortcodes" => __( "Run shortcodes that appear in social title meta tags.", 'all-in-one-seo-pack' ),
|
90 |
"description_shortcodes" => __( "Run shortcodes that appear in social description meta tags.", 'all-in-one-seo-pack' ),
|
93 |
"description" => __( "The Home Description is the Open Graph description for your home page.", 'all-in-one-seo-pack' ),
|
94 |
"homeimage" => __( "The Home Image is the Open Graph image for your home page.", 'all-in-one-seo-pack' ),
|
95 |
"hometag" => __( "The Home Tag allows you to add a list of keywords that best describe your home page content.", 'all-in-one-seo-pack' ),
|
96 |
+
"generate_descriptions" => __( "This option will auto generate your Open Graph descriptions from your post content instead of your post excerpt. WooCommerce users should read the documentation regarding this setting.", 'all-in-one-seo-pack' ),
|
97 |
"defimg" => __( "This option lets you choose which image will be displayed by default for the Open Graph image. You may override this on individual posts.", 'all-in-one-seo-pack' ),
|
98 |
"fallback" => __( "This option lets you fall back to the default image if no image could be found above.", 'all-in-one-seo-pack' ),
|
99 |
"dimg" => __( "This option sets a default image that can be used for the Open Graph image. You can upload an image, select an image from your Media Library or paste the URL of an image here.", 'all-in-one-seo-pack' ),
|
247 |
'condshow' => Array( 'aiosp_opengraph_categories' => 'article' ),
|
248 |
),
|
249 |
'generate_descriptions' => Array(
|
250 |
+
'name' => __( 'Use Content For Autogenerated OG Descriptions', 'all-in-one-seo-pack' ),
|
251 |
+
'default' => 0,
|
252 |
),
|
253 |
'defimg' => Array(
|
254 |
'name' => __( 'Select OG:Image Source', 'all-in-one-seo-pack' ),
|
555 |
);
|
556 |
|
557 |
$this->layout = Array(
|
|
|
|
|
|
|
|
|
|
|
558 |
'home' => Array(
|
559 |
'name' => __( 'Home Page Settings', 'all-in-one-seo-pack' ),
|
560 |
'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#use-aioseo-title-and-description',
|
591 |
'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#default-twitter-card',
|
592 |
'options' => Array( 'defcard', 'setcard', 'twitter_site', 'twitter_creator', 'twitter_domain' ),
|
593 |
),
|
594 |
+
'default' => Array(
|
595 |
+
'name' => __( 'Advanced Settings', 'all-in-one-seo-pack' ),
|
596 |
+
'help_link' => 'https://semperplugins.com/documentation/social-meta-module/',
|
597 |
+
'options' => Array() // this is set below, to the remaining options -- pdb
|
598 |
+
),
|
599 |
'scan_meta' => Array(
|
600 |
'name' => __( 'Scan Social Meta', 'all-in-one-seo-pack' ),
|
601 |
'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#scan_meta',
|
874 |
return $output;
|
875 |
}
|
876 |
|
877 |
+
/**
|
878 |
+
* Add our social meta.
|
879 |
+
*
|
880 |
+
* @since 1.0.0
|
881 |
+
* @since 2.3.11.5 Support for multiple fb_admins.
|
882 |
+
*/
|
883 |
function add_meta() {
|
884 |
global $post, $aiosp, $aioseop_options, $wp_query;
|
885 |
$metabox = $this->get_current_options( Array(), 'settings' );
|
909 |
$title = $this->options['aiosp_opengraph_hometitle'];
|
910 |
if ( $first_page ) {
|
911 |
$description = $this->options['aiosp_opengraph_description'];
|
912 |
+
if ( empty( $description ) ){
|
913 |
+
$description = get_bloginfo( 'description' );
|
914 |
+
}
|
915 |
}
|
916 |
if ( ! empty( $this->options['aiosp_opengraph_homeimage'] ) ) {
|
917 |
$thumbnail = $this->options['aiosp_opengraph_homeimage'];
|
935 |
$sitename = get_bloginfo( 'name' );
|
936 |
}
|
937 |
|
938 |
+
if ( empty( $description ) && $first_page && ! empty( $post ) && ! post_password_required( $post ) ) {
|
939 |
+
|
940 |
+
if ( ! empty( $post->post_content ) || ! empty( $post->post_excerpt ) ) {
|
941 |
+
$description = $aiosp->trim_excerpt_without_filters( $aiosp->internationalize( preg_replace( '/\s+/', ' ', $post->post_excerpt ) ), 1000 );
|
942 |
+
|
943 |
+
if ( ! empty( $this->options['aiosp_opengraph_generate_descriptions'] ) ) {
|
944 |
+
$description = $aiosp->trim_excerpt_without_filters( $aiosp->internationalize( preg_replace( '/\s+/', ' ', $post->post_content ) ), 1000 );
|
945 |
+
}
|
946 |
+
}
|
947 |
}
|
948 |
|
949 |
if ( empty( $description ) && $first_page ) {
|
1014 |
$description = trim( strip_tags( get_post_meta( $post->ID, "_aioseop_description", true ) ) );
|
1015 |
}
|
1016 |
|
1017 |
+
/* Add default title */
|
1018 |
if ( empty( $title ) ) {
|
1019 |
$title = get_the_title();
|
1020 |
}
|
1021 |
+
|
1022 |
+
// Add default description.
|
1023 |
+
if ( empty( $description ) && ! post_password_required( $post ) ) {
|
1024 |
+
|
1025 |
+
$description = $post->post_excerpt;
|
1026 |
+
|
1027 |
+
if ( $this->options['aiosp_opengraph_generate_descriptions'] || empty( $description ) ){
|
1028 |
+
$description = $post->post_content;
|
1029 |
+
}
|
1030 |
+
|
1031 |
}
|
1032 |
if ( empty( $type ) ) {
|
1033 |
$type = 'article';
|
1189 |
$creator = AIOSEOP_Opengraph_Public::prepare_twitter_username( $creator );
|
1190 |
}
|
1191 |
|
1192 |
+
if ( ! empty( $thumbnail ) ) {
|
1193 |
+
$twitter_thumbnail = $thumbnail; // Default Twitter image if custom isn't set.
|
1194 |
+
}
|
1195 |
|
1196 |
if ( isset( $metabox['aioseop_opengraph_settings_customimg_twitter'] ) && ! empty( $metabox['aioseop_opengraph_settings_customimg_twitter'] ) ) {
|
1197 |
// Set Twitter image from custom.
|
1231 |
),
|
1232 |
);
|
1233 |
|
1234 |
+
// Only show if "use schema.org markup is checked".
|
1235 |
if ( ! empty( $aioseop_options['aiosp_schema_markup'] ) ) {
|
1236 |
$meta['google+'] = Array( 'thumbnail' => 'image' );
|
1237 |
}
|
1238 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1239 |
$tags = Array(
|
1240 |
'facebook' => Array( 'name' => 'property', 'value' => 'content' ),
|
1241 |
'twitter' => Array( 'name' => 'name', 'value' => 'content' ),
|
1253 |
if ( ! is_array( $filtered_value ) ) {
|
1254 |
$filtered_value = Array( $filtered_value );
|
1255 |
}
|
1256 |
+
|
1257 |
+
/**
|
1258 |
+
* This is to accomodate multiple fb:admins on separate lines.
|
1259 |
+
* @TODO Eventually we'll want to put this in its own function so things like images work too.
|
1260 |
+
*/
|
1261 |
+
if( 'key' === $k ){
|
1262 |
+
$fbadmins = explode( ',', str_replace(' ', '', $filtered_value[0] ) ); // Trim spaces then turn comma-separated values into an array.
|
1263 |
+
foreach( $fbadmins as $fbadmin){
|
1264 |
+
echo '<meta ' . $tags[ $t ]['name'] . '="' . $v . '" ' . $tags[ $t ]['value'] . '="' . $fbadmin . '" />' . "\n";
|
1265 |
+
}
|
1266 |
+
}else{
|
1267 |
+
// For everything else.
|
1268 |
+
foreach ( $filtered_value as $f ) {
|
1269 |
+
echo '<meta ' . $tags[ $t ]['name'] . '="' . $v . '" ' . $tags[ $t ]['value'] . '="' . $f . '" />' . "\n";
|
1270 |
+
}
|
1271 |
}
|
1272 |
}
|
1273 |
}
|
1308 |
}
|
1309 |
if ( ! defined( 'DOING_AJAX' ) ) {
|
1310 |
add_action( 'aioseop_modules_wp_head', Array( $this, 'add_meta' ), 5 );
|
1311 |
+
add_action( 'amp_post_template_head', Array( $this, 'add_meta' ), 12 ); // Add social meta to AMP plugin.
|
1312 |
}
|
1313 |
}
|
1314 |
|
modules/aioseop_robots.php
CHANGED
@@ -246,7 +246,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
|
|
246 |
$access = ( get_option( 'blog_public' ) ) ? 'allow' : 'block';
|
247 |
if ( $access ) {
|
248 |
global $aioseop_options;
|
249 |
-
$
|
250 |
$sitemap_filename = $this->get_sitemap_filename();
|
251 |
if ( $sitemap_filename ) {
|
252 |
$sitemapurl = trailingslashit( get_home_url() ) . $sitemap_filename . '.xml';
|
246 |
$access = ( get_option( 'blog_public' ) ) ? 'allow' : 'block';
|
247 |
if ( $access ) {
|
248 |
global $aioseop_options;
|
249 |
+
$sitemapurl = '';
|
250 |
$sitemap_filename = $this->get_sitemap_filename();
|
251 |
if ( $sitemap_filename ) {
|
252 |
$sitemapurl = trailingslashit( get_home_url() ) . $sitemap_filename . '.xml';
|
modules/aioseop_sitemap.php
CHANGED
@@ -619,7 +619,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
|
|
619 |
$options[ $this->prefix . 'link' ] = sprintf( __( 'Click here to %s.', 'all-in-one-seo-pack' ), '<a href="' . esc_url( $url ) . '" target="_blank">' . __( 'view your sitemap', 'all-in-one-seo-pack' ) . '</a>' );
|
620 |
$options[ $this->prefix . 'link' ] .= __( ' Your sitemap has been created', 'all-in-one-seo-pack' );
|
621 |
if ( '0' !== get_option( 'blog_public' ) ){
|
622 |
-
$options[ $this->prefix . 'link' ] .= __( ' and changes are automatically submitted to search engines' );
|
623 |
}
|
624 |
$options[ $this->prefix . 'link' ] .= '.';
|
625 |
|
619 |
$options[ $this->prefix . 'link' ] = sprintf( __( 'Click here to %s.', 'all-in-one-seo-pack' ), '<a href="' . esc_url( $url ) . '" target="_blank">' . __( 'view your sitemap', 'all-in-one-seo-pack' ) . '</a>' );
|
620 |
$options[ $this->prefix . 'link' ] .= __( ' Your sitemap has been created', 'all-in-one-seo-pack' );
|
621 |
if ( '0' !== get_option( 'blog_public' ) ){
|
622 |
+
$options[ $this->prefix . 'link' ] .= __( ' and changes are automatically submitted to search engines', 'all-in-one-seo-pack' );
|
623 |
}
|
624 |
$options[ $this->prefix . 'link' ] .= '.';
|
625 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtor
|
|
4 |
Tags: seo, all in one seo, google, twitter, page, image seo, social, search engine optimization, sitemap, WordPress SEO, meta, meta description, xml sitemap, google sitemap, sitemaps, robots meta, yahoo, bing, news sitemaps, multisite, canonical, nofollow, noindex, keywords, description, webmaster tools, google webmaster tools, google analytics
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.7
|
7 |
-
Stable tag: 2.3.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -12,7 +12,7 @@ The original SEO plugin for WordPress, downloaded over 30,000,000 times since 20
|
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
**All in One SEO Pack**
|
16 |
|
17 |
**[Upgrade to Pro Version](http://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/?loc=readme_utpv)**
|
18 |
|
4 |
Tags: seo, all in one seo, google, twitter, page, image seo, social, search engine optimization, sitemap, WordPress SEO, meta, meta description, xml sitemap, google sitemap, sitemaps, robots meta, yahoo, bing, news sitemaps, multisite, canonical, nofollow, noindex, keywords, description, webmaster tools, google webmaster tools, google analytics
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.7
|
7 |
+
Stable tag: 2.3.12
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
Use **All in One SEO Pack** to optimize your WordPress site for SEO. It's easy and works out of the box for beginners, and has advanced features and an API for developers.
|
16 |
|
17 |
**[Upgrade to Pro Version](http://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/?loc=readme_utpv)**
|
18 |
|