diff --git a/admin/aioseop_module_class.php b/admin/aioseop_module_class.php
index 3cd6cef5f..77772b536 100644
--- a/admin/aioseop_module_class.php
+++ b/admin/aioseop_module_class.php
@@ -2258,6 +2258,9 @@ function get_option_html( $args ) {
$size = $options['size'];
} elseif ( isset( $options['rows'] ) && isset( $options['cols'] ) ) {
$size = $options['rows'] * $options['cols'];
+ }
+ if ( 'Description' === $options['name'] && isset( $options['name'] ) ) {
+ $size = ( $size - 90 ) . '-' . $size;
}
if ( isset( $options['count_desc'] ) ) {
$count_desc = $options['count_desc'];
diff --git a/aioseop_class.php b/aioseop_class.php
index 250b147d3..44a428665 100644
--- a/aioseop_class.php
+++ b/aioseop_class.php
@@ -20,7 +20,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
var $version = AIOSEOP_VERSION;
// Max numbers of chars in auto-generated description.
- var $maximum_description_length = 160;
+ var $maximum_description_length = 320;
// Minimum number of chars an excerpt should be so that it can be used as description.
var $minimum_description_length = 1;
@@ -56,6 +56,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
* All_in_One_SEO_Pack constructor.
*
* @since 2.3.14 #921 More google analytics options added.
+ * @since 2.4.0 #1395 Longer Meta Descriptions.
*/
function __construct() {
global $aioseop_options;
@@ -168,7 +169,7 @@ function __construct() {
'description_format' => __( 'This controls the format of Meta Descriptions.The following macros are supported:', 'all-in-one-seo-pack' ) .
'
- ' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '
- ' .
__( '%blog_description% - Your blog description', 'all-in-one-seo-pack' ) . '
- ' .
- __( '%description% - This outputs the description you write for each page/post or the autogenerated description, if you have that option enabled. Auto-generated descriptions are generated from the Post Excerpt, or the first 160 characters of the post content if there is no Post Excerpt.', 'all-in-one-seo-pack' ) . '
- ' .
+ __( '%description% - This outputs the description you write for each page/post or the autogenerated description, if you have that option enabled. Auto-generated descriptions are generated from the Post Excerpt, or the first 320 characters of the post content if there is no Post Excerpt.', 'all-in-one-seo-pack' ) . '
- ' .
__( '%post_title% - The original title of the post', 'all-in-one-seo-pack' ) . '
- ' .
__( '%wp_title% - The original WordPress title, e.g. post_title for posts', 'all-in-one-seo-pack' ) . '
- ' .
__( '%current_date% - The current date (localized)', 'all-in-one-seo-pack' ) . '
- ' .
@@ -226,7 +227,7 @@ function __construct() {
'paginated_noindex' => __( 'Check this to ask search engines not to index paginated pages/posts. Useful for avoiding duplicate content.', 'all-in-one-seo-pack' ),
'paginated_nofollow' => __( 'Check this to ask search engines not to follow links from paginated pages/posts. Useful for avoiding duplicate content.', 'all-in-one-seo-pack' ),
'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' ),
- 'generate_descriptions' => __( 'Check this and your Meta Descriptions for any Post Type will be auto-generated using the Post Excerpt, or the first 160 characters of the post content if there is no Post Excerpt. You can overwrite any auto-generated Meta Description by editing the post or page.', 'all-in-one-seo-pack' ),
+ 'generate_descriptions' => __( 'Check this and your Meta Descriptions for any Post Type will be auto-generated using the Post Excerpt, or the first 320 characters of the post content if there is no Post Excerpt. You can overwrite any auto-generated Meta Description by editing the post or page.', 'all-in-one-seo-pack' ),
'run_shortcodes' => __( 'Check this and shortcodes will get executed for descriptions auto-generated from content.', 'all-in-one-seo-pack' ),
'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' ),
'dont_truncate_descriptions' => __( 'Check this to prevent your Description from being truncated regardless of its length.', 'all-in-one-seo-pack' ),
@@ -366,7 +367,7 @@ function __construct() {
'sanitize' => 'text',
'count' => true,
'cols' => 80,
- 'rows' => 2,
+ 'rows' => 4,
'condshow' => array( 'aiosp_use_static_home_info' => 0 ),
),
'togglekeywords' => array(
@@ -967,7 +968,7 @@ function __construct() {
'type' => 'textarea',
'count' => true,
'cols' => 80,
- 'rows' => 2,
+ 'rows' => 4,
),
'keywords' => array(
@@ -2471,11 +2472,7 @@ function get_main_description( $post = null ) {
$description = $this->internationalize( $description );
}
- return apply_filters(
- 'aioseop_description',
- $description,
- empty( $aioseop_options['aiosp_dont_truncate_descriptions'] )
- );
+ return $description;
}
/**
@@ -2537,6 +2534,7 @@ function get_aioseop_description( $post = null ) {
* @since 2.3.13 #899 Fixes non breacking space, applies filter "aioseop_description".
* @since 2.3.14 #932 Removes filter "aioseop_description".
* @since 2.4 #951 Removes "wp_strip_all_tags" and "trim_excerpt_without_filters", they are done later in filter.
+ * @since 2.4 #1395 Longer Meta Descriptions & don't trim manual Descriptions.
*
* @param object $post Post object.
*
@@ -2563,6 +2561,11 @@ function get_post_description( $post ) {
}
$description =$this->internationalize( $content );
}
+ $description = apply_filters(
+ 'aioseop_description',
+ $description,
+ empty( $aioseop_options['aiosp_dont_truncate_descriptions'] )
+ );
}
return $description;
diff --git a/all_in_one_seo_pack.php b/all_in_one_seo_pack.php
index da09cc3c8..c4b6a53a6 100644
--- a/all_in_one_seo_pack.php
+++ b/all_in_one_seo_pack.php
@@ -3,7 +3,7 @@
Plugin Name: All In One SEO Pack
Plugin URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
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. More than 30 million downloads since 2007.
-Version: 2.4.3
+Version: 2.4.4
Author: Michael Torbert
Author URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
Text Domain: all-in-one-seo-pack
@@ -31,14 +31,14 @@
* The original WordPress SEO plugin.
*
* @package All-in-One-SEO-Pack
- * @version 2.4.3
+ * @version 2.4.4
*/
if ( ! defined( 'AIOSEOPPRO' ) ) {
define( 'AIOSEOPPRO', false );
}
if ( ! defined( 'AIOSEOP_VERSION' ) ) {
- define( 'AIOSEOP_VERSION', '2.4.3' );
+ define( 'AIOSEOP_VERSION', '2.4.4' );
}
global $aioseop_plugin_name;
$aioseop_plugin_name = 'All in One SEO Pack';
diff --git a/js/modules/aioseop_module.js b/js/modules/aioseop_module.js
index 40ebeff7e..d4d56a4a3 100644
--- a/js/modules/aioseop_module.js
+++ b/js/modules/aioseop_module.js
@@ -72,7 +72,7 @@ function countChars( field, cntfield ) {
cntfield.style.color = "#fff";
cntfield.style.backgroundColor = "#f00";
} else {
- if ( cntfield.value > ( field_size - 6 ) ) {
+ if ( cntfield.value > ( field_size - 91 ) ) {
cntfield.style.color = "#515151";
cntfield.style.backgroundColor = "#ff0";
} else {