SEOPress - Version 2.7.3

Version Description

  • FIX Meta title / description
Download this release

Release Info

Developer rainbowgeek
Plugin Icon 128x128 SEOPress
Version 2.7.3
Comparing to
See all releases

Code changes from version 2.7.2 to 2.7.3

inc/functions/options-titles-metas.php CHANGED
@@ -282,6 +282,18 @@ function seopress_titles_the_title() {
282
  }
283
  $get_search_query = apply_filters('seopress_get_search_query', $get_search_query);
284
 
 
 
 
 
 
 
 
 
 
 
 
 
285
  $woo_single_cat_html ='';
286
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
287
  if ( is_plugin_active( 'woocommerce/woocommerce.php' )) {
@@ -347,7 +359,7 @@ function seopress_titles_the_title() {
347
  get_bloginfo('name'),
348
  get_bloginfo('description'),
349
  the_title_attribute('echo=0'),
350
- $seopress_excerpt,
351
  get_the_date(),
352
  $the_author_meta,
353
  $post_category,
@@ -364,7 +376,7 @@ function seopress_titles_the_title() {
364
  get_the_archive_title(),
365
  $woo_single_cat_html,
366
  $woo_single_tag_html,
367
- $seopress_excerpt,
368
  );
369
 
370
  if ( is_front_page() && is_home() && get_post_meta($post->ID,'_seopress_titles_title',true) =='') { //HOMEPAGE
@@ -624,7 +636,7 @@ function seopress_titles_the_description_content() {
624
  get_the_archive_title(),
625
  $woo_single_cat_html,
626
  $woo_single_tag_html,
627
- $seopress_excerpt,
628
  );
629
 
630
  if ( is_front_page() && is_home() && get_post_meta($post->ID,'_seopress_titles_desc',true) =='' ) { //HOMEPAGE
@@ -701,8 +713,8 @@ function seopress_titles_the_description_content() {
701
  }
702
  } else {
703
  setup_postdata( $post );
704
- if ($seopress_excerpt !='' || get_the_content() !='') { //DEFAULT EXCERPT OR THE CONTENT
705
- $seopress_titles_the_description = wp_trim_words(stripslashes_deep(wp_filter_nohtml_kses($seopress_excerpt)), 30);
706
 
707
  $seopress_titles_description_template = str_replace($seopress_titles_template_variables_array, $seopress_titles_template_replace_array, $seopress_titles_the_description);
708
  }
@@ -713,7 +725,7 @@ function seopress_titles_the_description_content() {
713
  $seopress_titles_description_template = str_replace($seopress_titles_template_variables_array, $seopress_titles_template_replace_array, $seopress_titles_the_description);
714
  } elseif ((is_tax() || is_category() || is_tag()) && seopress_titles_tax_desc_option()) { //IS TAX
715
  if (get_term_meta(get_queried_object()->{'term_id'},'_seopress_titles_desc',true)) {
716
- $seopress_titles_the_description = esc_attr(get_term_meta(get_queried_object()->{'term_id'},'_seopress_titles_desc',true));
717
  } else {
718
  $seopress_titles_the_description = esc_attr(seopress_titles_tax_desc_option());
719
 
282
  }
283
  $get_search_query = apply_filters('seopress_get_search_query', $get_search_query);
284
 
285
+ if ($seopress_excerpt !='') {
286
+ $seopress_get_the_excerpt = wp_trim_words(esc_attr(stripslashes_deep(wp_filter_nohtml_kses($seopress_excerpt))), 30);
287
+ } elseif ($post !='') {
288
+ if (get_post_field('post_content', $post->ID) !='') {
289
+ $seopress_get_the_excerpt = wp_trim_words(esc_attr(stripslashes_deep(wp_filter_nohtml_kses(get_post_field('post_content', $post->ID)))), 30);
290
+ } else {
291
+ $seopress_get_the_excerpt = null;
292
+ }
293
+ } else {
294
+ $seopress_get_the_excerpt = null;
295
+ }
296
+
297
  $woo_single_cat_html ='';
298
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
299
  if ( is_plugin_active( 'woocommerce/woocommerce.php' )) {
359
  get_bloginfo('name'),
360
  get_bloginfo('description'),
361
  the_title_attribute('echo=0'),
362
+ $seopress_get_the_excerpt,
363
  get_the_date(),
364
  $the_author_meta,
365
  $post_category,
376
  get_the_archive_title(),
377
  $woo_single_cat_html,
378
  $woo_single_tag_html,
379
+ $seopress_get_the_excerpt,
380
  );
381
 
382
  if ( is_front_page() && is_home() && get_post_meta($post->ID,'_seopress_titles_title',true) =='') { //HOMEPAGE
636
  get_the_archive_title(),
637
  $woo_single_cat_html,
638
  $woo_single_tag_html,
639
+ $seopress_get_the_excerpt,
640
  );
641
 
642
  if ( is_front_page() && is_home() && get_post_meta($post->ID,'_seopress_titles_desc',true) =='' ) { //HOMEPAGE
713
  }
714
  } else {
715
  setup_postdata( $post );
716
+ if ($seopress_get_the_excerpt !='' || get_the_content() !='') { //DEFAULT EXCERPT OR THE CONTENT
717
+ $seopress_titles_the_description = wp_trim_words(stripslashes_deep(wp_filter_nohtml_kses($seopress_get_the_excerpt)), 30);
718
 
719
  $seopress_titles_description_template = str_replace($seopress_titles_template_variables_array, $seopress_titles_template_replace_array, $seopress_titles_the_description);
720
  }
725
  $seopress_titles_description_template = str_replace($seopress_titles_template_variables_array, $seopress_titles_template_replace_array, $seopress_titles_the_description);
726
  } elseif ((is_tax() || is_category() || is_tag()) && seopress_titles_tax_desc_option()) { //IS TAX
727
  if (get_term_meta(get_queried_object()->{'term_id'},'_seopress_titles_desc',true)) {
728
+ $seopress_titles_description_template = esc_attr(get_term_meta(get_queried_object()->{'term_id'},'_seopress_titles_desc',true));
729
  } else {
730
  $seopress_titles_the_description = esc_attr(seopress_titles_tax_desc_option());
731
 
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: seo, search engine optimization, meta title, open graph, content analysis,
6
  Requires at least: 4.4+
7
  Tested up to: 4.9
8
  Requires PHP: 5.4
9
- Stable tag: 2.7.2
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -155,6 +155,8 @@ Subscribe on <a href="https://www.seopress.org/" target="_blank">seopress.org</a
155
  44. Structured Data Types metaboxe in post, page, custom post type (PRO)
156
 
157
  == Changelog ==
 
 
158
  = 2.7.2 =
159
  * NEW Add Vietnamese language (thanks to Anh)
160
  * NEW Add seopress_titles_canonical hook to filter canonical URL tag
6
  Requires at least: 4.4+
7
  Tested up to: 4.9
8
  Requires PHP: 5.4
9
+ Stable tag: 2.7.3
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
155
  44. Structured Data Types metaboxe in post, page, custom post type (PRO)
156
 
157
  == Changelog ==
158
+ = 2.7.3 =
159
+ * FIX Meta title / description
160
  = 2.7.2 =
161
  * NEW Add Vietnamese language (thanks to Anh)
162
  * NEW Add seopress_titles_canonical hook to filter canonical URL tag
seopress.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: SEOPress
4
  Plugin URI: https://www.seopress.org/
5
  Description: The best SEO plugin.
6
- Version: 2.7.2
7
  Author: Benjamin DENIS
8
  Author URI: https://www.seopress.org/
9
  License: GPLv2
@@ -55,7 +55,7 @@ register_deactivation_hook(__FILE__, 'seopress_deactivation');
55
  //Define
56
  ///////////////////////////////////////////////////////////////////////////////////////////////////
57
 
58
- define( 'SEOPRESS_VERSION', '2.7.2' );
59
  define( 'SEOPRESS_AUTHOR', 'Benjamin Denis' );
60
 
61
  ///////////////////////////////////////////////////////////////////////////////////////////////////
3
  Plugin Name: SEOPress
4
  Plugin URI: https://www.seopress.org/
5
  Description: The best SEO plugin.
6
+ Version: 2.7.3
7
  Author: Benjamin DENIS
8
  Author URI: https://www.seopress.org/
9
  License: GPLv2
55
  //Define
56
  ///////////////////////////////////////////////////////////////////////////////////////////////////
57
 
58
+ define( 'SEOPRESS_VERSION', '2.7.3' );
59
  define( 'SEOPRESS_AUTHOR', 'Benjamin Denis' );
60
 
61
  ///////////////////////////////////////////////////////////////////////////////////////////////////