SEOPress - Version 4.1.5

Version Description

  • NEW Google Place ID field for Local Business Widget (SEO, PRO, Local Business) to display POI when clicking on the map link (PRO)
  • INFO Exclude posts and terms from XML sitemaps if custom canonical URL set from SEO metabox
  • FIX Empty Term taxonomy XML paginated sitemap
  • FIX Fatal error: Uncaught Error: Call to undefined function seopress_get_option_post_need_redirects() if filter 'seopress_post_automatic_redirect' used
  • FIX White label custom website for SEOPress PRO
  • FIX Conflict with WPML
  • FIX Bulk editing for 404 errors, 'delete_redirections' capability was missing
  • FIX Global LocalBusiness schema
  • FIX DomDocument issue if "Automatically set the image Alt text from target keywords" is enabled (thanks to Emilien Degert)
Download this release

Release Info

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

Code changes from version 4.1.4 to 4.1.5

inc/admin/admin-wizard.php CHANGED
@@ -852,7 +852,7 @@ class SEOPRESS_Admin_Setup_Wizard {
852
  update_option('seopress_notices',$seopress_notices);
853
 
854
  //Flush permalinks
855
- flush_rewrite_rules();
856
  ?>
857
  <h1><?php esc_html_e( "Your site is now ready for search engines!", 'wp-seopress' ); ?></h1>
858
 
852
  update_option('seopress_notices',$seopress_notices);
853
 
854
  //Flush permalinks
855
+ flush_rewrite_rules(false);
856
  ?>
857
  <h1><?php esc_html_e( "Your site is now ready for search engines!", 'wp-seopress' ); ?></h1>
858
 
inc/admin/ajax.php CHANGED
@@ -480,7 +480,7 @@ add_action('wp_ajax_seopress_do_real_preview', 'seopress_do_real_preview');
480
  ///////////////////////////////////////////////////////////////////////////////////////////////////
481
  function seopress_flush_permalinks() {
482
  check_ajax_referer( 'seopress_flush_permalinks_nonce', $_GET['_ajax_nonce'], true );
483
- flush_rewrite_rules();
484
  die();
485
  }
486
  add_action('wp_ajax_seopress_flush_permalinks', 'seopress_flush_permalinks');
480
  ///////////////////////////////////////////////////////////////////////////////////////////////////
481
  function seopress_flush_permalinks() {
482
  check_ajax_referer( 'seopress_flush_permalinks_nonce', $_GET['_ajax_nonce'], true );
483
+ flush_rewrite_rules(false);
484
  die();
485
  }
486
  add_action('wp_ajax_seopress_flush_permalinks', 'seopress_flush_permalinks');
inc/functions/options-advanced.php CHANGED
@@ -233,9 +233,9 @@ if (seopress_advanced_advanced_image_auto_alt_target_kw_option() !='') {
233
  $internalErrors = libxml_use_internal_errors(true);
234
 
235
  if (function_exists('mb_convert_encoding')) {
236
- $dom->loadHTML(mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8'));
237
  } else {
238
- $dom->loadHTML('<?xml encoding="utf-8" ?>'.$content);
239
  }
240
 
241
  $dom->preserveWhiteSpace = false;
@@ -255,7 +255,7 @@ if (seopress_advanced_advanced_image_auto_alt_target_kw_option() !='') {
255
  }
256
  }
257
  }
258
- $content = $dom->saveHTML();
259
 
260
  return $content;
261
  }
233
  $internalErrors = libxml_use_internal_errors(true);
234
 
235
  if (function_exists('mb_convert_encoding')) {
236
+ $dom->loadHTML(mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8'), LIBXML_HTML_NOIMPLIED); //Remove doctype, HTML/Body tags
237
  } else {
238
+ $dom->loadHTML('<?xml encoding="utf-8" ?>'.$content, LIBXML_HTML_NOIMPLIED); //Remove doctype, HTML/Body tags
239
  }
240
 
241
  $dom->preserveWhiteSpace = false;
255
  }
256
  }
257
  }
258
+ $content = $dom->saveHTML($dom->documentElement); //Fix encoding
259
 
260
  return $content;
261
  }
inc/functions/sitemap/template-xml-sitemaps-single-term.php CHANGED
@@ -66,7 +66,7 @@ function seopress_xml_sitemap_single_term() {
66
 
67
  foreach ( $termslist->terms as $term ) {
68
 
69
- if (!get_term_meta( $term, '_seopress_robots_index', true)) {
70
  $seopress_sitemaps_url = '';
71
  // array with all the information needed for a sitemap url
72
  $seopress_url = [
66
 
67
  foreach ( $termslist->terms as $term ) {
68
 
69
+ if (!get_term_meta( $term, '_seopress_robots_index', true) && !get_term_meta( $term, '_seopress_robots_canonical', true)) {
70
  $seopress_sitemaps_url = '';
71
  // array with all the information needed for a sitemap url
72
  $seopress_url = [
inc/functions/sitemap/template-xml-sitemaps-single.php CHANGED
@@ -103,19 +103,36 @@ function seopress_xml_sitemap_single() {
103
  'orderby' => 'modified',
104
  'post_type' => $path,
105
  'post_status' => 'publish',
106
- 'meta_query' => [
107
- 'relation' => 'OR',
108
  [
109
- 'key' => '_seopress_robots_index',
110
- 'value' => '',
111
- 'compare' => 'NOT EXISTS'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  ],
113
- [
114
- 'key' => '_seopress_robots_index',
115
- 'value' => 'yes',
116
- 'compare' => '!='
117
- ]
118
- ],
119
  'fields' => 'ids',
120
  'lang' => '',
121
  'has_password' => false
103
  'orderby' => 'modified',
104
  'post_type' => $path,
105
  'post_status' => 'publish',
106
+ 'meta_query' =>
 
107
  [
108
+ 'relation' => 'AND',
109
+ [
110
+ 'relation' => 'OR',
111
+ [
112
+ 'key' => '_seopress_robots_index',
113
+ 'value' => '',
114
+ 'compare' => 'NOT EXISTS'
115
+ ],
116
+ [
117
+ 'key' => '_seopress_robots_index',
118
+ 'value' => 'yes',
119
+ 'compare' => '!='
120
+ ],
121
+ ],
122
+ [
123
+ 'relation' => 'OR',
124
+ [
125
+ 'key' => '_seopress_robots_canonical',
126
+ 'value' => '',
127
+ 'compare' => 'NOT EXISTS'
128
+ ],
129
+ [
130
+ 'key' => '_seopress_robots_canonical',
131
+ 'value' => '',
132
+ 'compare' => '='
133
+ ],
134
+ ],
135
  ],
 
 
 
 
 
 
136
  'fields' => 'ids',
137
  'lang' => '',
138
  'has_password' => false
inc/functions/sitemap/template-xml-sitemaps.php CHANGED
@@ -51,18 +51,35 @@ function seopress_xml_sitemap_index() {
51
  'posts_per_page' => -1,
52
  'post_type' => $cpt_key,
53
  'post_status' => 'publish',
54
- 'meta_query' => [
55
- 'relation' => 'OR',
 
56
  [
57
- 'key' => '_seopress_robots_index',
58
- 'value' => '',
59
- 'compare' => 'NOT EXISTS'
 
 
 
 
 
 
 
 
60
  ],
61
  [
62
- 'key' => '_seopress_robots_index',
63
- 'value' => 'yes',
64
- 'compare' => '!='
65
- ]
 
 
 
 
 
 
 
 
66
  ],
67
  'fields' => 'ids',
68
  'lang' => '',
@@ -117,18 +134,35 @@ function seopress_xml_sitemap_index() {
117
  'post_status' => 'publish',
118
  'ignore_sticky_posts' => true,
119
  'posts_per_page' => 1,
120
- 'meta_query' => [
121
- 'relation' => 'OR',
 
122
  [
123
- 'key' => '_seopress_robots_index',
124
- 'value' => '',
125
- 'compare' => 'NOT EXISTS'
 
 
 
 
 
 
 
 
126
  ],
127
  [
128
- 'key' => '_seopress_robots_index',
129
- 'value' => 'yes',
130
- 'compare' => '!='
131
- ]
 
 
 
 
 
 
 
 
132
  ],
133
  'order' => 'DESC',
134
  'orderby' => 'modified',
@@ -167,24 +201,41 @@ function seopress_xml_sitemap_index() {
167
  'hide_empty' => false,
168
  'lang' => '',
169
  'fields' => 'ids',
170
- 'meta_query' => [
171
- 'relation' => 'OR',
 
172
  [
173
- 'key' => '_seopress_robots_index',
174
- 'value' => '',
175
- 'compare' => 'NOT EXISTS'
 
 
 
 
 
 
 
 
176
  ],
177
  [
178
- 'key' => '_seopress_robots_index',
179
- 'value' => 'yes',
180
- 'compare' => '!='
181
- ]
 
 
 
 
 
 
 
 
182
  ],
183
  ];
184
 
185
  $args = apply_filters('seopress_sitemaps_index_tax_query', $args, $tax_key);
186
 
187
- $count_terms = wp_count_terms($tax_key, $args);
188
 
189
  //Max terms per paginated sitemap
190
  $max = 1000;
51
  'posts_per_page' => -1,
52
  'post_type' => $cpt_key,
53
  'post_status' => 'publish',
54
+ 'meta_query' =>
55
+ [
56
+ 'relation' => 'AND',
57
  [
58
+ 'relation' => 'OR',
59
+ [
60
+ 'key' => '_seopress_robots_index',
61
+ 'value' => '',
62
+ 'compare' => 'NOT EXISTS'
63
+ ],
64
+ [
65
+ 'key' => '_seopress_robots_index',
66
+ 'value' => 'yes',
67
+ 'compare' => '!='
68
+ ],
69
  ],
70
  [
71
+ 'relation' => 'OR',
72
+ [
73
+ 'key' => '_seopress_robots_canonical',
74
+ 'value' => '',
75
+ 'compare' => 'NOT EXISTS'
76
+ ],
77
+ [
78
+ 'key' => '_seopress_robots_canonical',
79
+ 'value' => '',
80
+ 'compare' => '='
81
+ ],
82
+ ],
83
  ],
84
  'fields' => 'ids',
85
  'lang' => '',
134
  'post_status' => 'publish',
135
  'ignore_sticky_posts' => true,
136
  'posts_per_page' => 1,
137
+ 'meta_query' =>
138
+ [
139
+ 'relation' => 'AND',
140
  [
141
+ 'relation' => 'OR',
142
+ [
143
+ 'key' => '_seopress_robots_index',
144
+ 'value' => '',
145
+ 'compare' => 'NOT EXISTS'
146
+ ],
147
+ [
148
+ 'key' => '_seopress_robots_index',
149
+ 'value' => 'yes',
150
+ 'compare' => '!='
151
+ ],
152
  ],
153
  [
154
+ 'relation' => 'OR',
155
+ [
156
+ 'key' => '_seopress_robots_canonical',
157
+ 'value' => '',
158
+ 'compare' => 'NOT EXISTS'
159
+ ],
160
+ [
161
+ 'key' => '_seopress_robots_canonical',
162
+ 'value' => '',
163
+ 'compare' => '='
164
+ ],
165
+ ],
166
  ],
167
  'order' => 'DESC',
168
  'orderby' => 'modified',
201
  'hide_empty' => false,
202
  'lang' => '',
203
  'fields' => 'ids',
204
+ 'meta_query' =>
205
+ [
206
+ 'relation' => 'AND',
207
  [
208
+ 'relation' => 'OR',
209
+ [
210
+ 'key' => '_seopress_robots_index',
211
+ 'value' => '',
212
+ 'compare' => 'NOT EXISTS'
213
+ ],
214
+ [
215
+ 'key' => '_seopress_robots_index',
216
+ 'value' => 'yes',
217
+ 'compare' => '!='
218
+ ],
219
  ],
220
  [
221
+ 'relation' => 'OR',
222
+ [
223
+ 'key' => '_seopress_robots_canonical',
224
+ 'value' => '',
225
+ 'compare' => 'NOT EXISTS'
226
+ ],
227
+ [
228
+ 'key' => '_seopress_robots_canonical',
229
+ 'value' => '',
230
+ 'compare' => '='
231
+ ],
232
+ ],
233
  ],
234
  ];
235
 
236
  $args = apply_filters('seopress_sitemaps_index_tax_query', $args, $tax_key);
237
 
238
+ $count_terms = count(get_terms( $args ));
239
 
240
  //Max terms per paginated sitemap
241
  $max = 1000;
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: SEO, XML sitemap, meta title, open graph, content analysis, knowledge grap
6
  Requires at least: 4.7+
7
  Tested up to: 5.5
8
  Requires PHP: 5.6
9
- Stable tag: 4.1.4
10
  License: GPLv2 or later
11
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -310,6 +310,16 @@ You're theme is probably using a deprecated function to handle the title. <a hre
310
  8. Installation Wizard
311
 
312
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
313
  = 4.1.4 =
314
  * INFO Improve cookie bar default design
315
  * INFO Update NGINX configuration informations on XML sitemaps page
@@ -340,7 +350,7 @@ You're theme is probably using a deprecated function to handle the title. <a hre
340
  * NEW UI for adding/editing/managing target keywords 🎉
341
  * NEW Paginated XML sitemaps for taxonomies and videos 🎉
342
  * NEW Import term metadata from CSV file using our import tool (PRO) 🎉
343
- * NEW Custom user capabilities for Redirections post type (edit_redirection, edit_redirections, edit_others_redirections, publish_redirections, read_redirection, read_private_redirections, delete_redirection, delete_others_redirections, delete_published_redirections)
344
  * NEW Remove noindex item from Admin Bar in backend and frontend option from SEO, Advanced page, Appearance tab
345
  * NEW Change expiration date of the user consent cookie option from SEO, Analytics page, Cookie bar / GDPR tab
346
  * NEW Add servesCuisine for LocalBusiness automatic schema
6
  Requires at least: 4.7+
7
  Tested up to: 5.5
8
  Requires PHP: 5.6
9
+ Stable tag: 4.1.5
10
  License: GPLv2 or later
11
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
12
 
310
  8. Installation Wizard
311
 
312
  == Changelog ==
313
+ = 4.1.5 =
314
+ * NEW Google Place ID field for Local Business Widget (SEO, PRO, Local Business) to display POI when clicking on the map link (PRO)
315
+ * INFO Exclude posts and terms from XML sitemaps if custom canonical URL set from SEO metabox
316
+ * FIX Empty Term taxonomy XML paginated sitemap
317
+ * FIX Fatal error: Uncaught Error: Call to undefined function seopress_get_option_post_need_redirects() if filter 'seopress_post_automatic_redirect' used
318
+ * FIX White label custom website for SEOPress PRO
319
+ * FIX Conflict with WPML
320
+ * FIX Bulk editing for 404 errors, 'delete_redirections' capability was missing
321
+ * FIX Global LocalBusiness schema
322
+ * FIX DomDocument issue if "Automatically set the image Alt text from target keywords" is enabled (thanks to Emilien Degert)
323
  = 4.1.4 =
324
  * INFO Improve cookie bar default design
325
  * INFO Update NGINX configuration informations on XML sitemaps page
350
  * NEW UI for adding/editing/managing target keywords 🎉
351
  * NEW Paginated XML sitemaps for taxonomies and videos 🎉
352
  * NEW Import term metadata from CSV file using our import tool (PRO) 🎉
353
+ * NEW Custom user capabilities for Redirections post type (edit_redirection, edit_redirections, edit_others_redirections, publish_redirections, read_redirection, read_private_redirections, delete_redirection, delete_redirections, delete_others_redirections, delete_published_redirections)
354
  * NEW Remove noindex item from Admin Bar in backend and frontend option from SEO, Advanced page, Appearance tab
355
  * NEW Change expiration date of the user consent cookie option from SEO, Analytics page, Cookie bar / GDPR tab
356
  * NEW Add servesCuisine for LocalBusiness automatic schema
seopress.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: SEOPress
4
  Plugin URI: https://www.seopress.org/
5
  Description: One of the best SEO plugins for WordPress.
6
- Version: 4.1.4
7
  Author: SEOPress
8
  Author URI: https://www.seopress.org/
9
  License: GPLv2
@@ -38,7 +38,7 @@ if ( !function_exists( 'add_action' ) ) {
38
  ///////////////////////////////////////////////////////////////////////////////////////////////////
39
  function seopress_activation() {
40
  add_option( 'seopress_activated', 'yes' );
41
- flush_rewrite_rules();
42
  do_action('seopress_activation');
43
  }
44
  register_activation_hook(__FILE__, 'seopress_activation');
@@ -47,7 +47,7 @@ function seopress_deactivation() {
47
  deactivate_plugins( [ 'wp-seopress-pro/seopress-pro.php', 'wp-seopress-insights/seopress-insights.php' ] );
48
 
49
  delete_option( 'seopress_activated' );
50
- flush_rewrite_rules();
51
  do_action('seopress_deactivation');
52
  }
53
  register_deactivation_hook(__FILE__, 'seopress_deactivation');
@@ -55,7 +55,7 @@ register_deactivation_hook(__FILE__, 'seopress_deactivation');
55
  ///////////////////////////////////////////////////////////////////////////////////////////////////
56
  //Define
57
  ///////////////////////////////////////////////////////////////////////////////////////////////////
58
- define( 'SEOPRESS_VERSION', '4.1.4' );
59
  define( 'SEOPRESS_AUTHOR', 'Benjamin Denis' );
60
 
61
  ///////////////////////////////////////////////////////////////////////////////////////////////////
3
  Plugin Name: SEOPress
4
  Plugin URI: https://www.seopress.org/
5
  Description: One of the best SEO plugins for WordPress.
6
+ Version: 4.1.5
7
  Author: SEOPress
8
  Author URI: https://www.seopress.org/
9
  License: GPLv2
38
  ///////////////////////////////////////////////////////////////////////////////////////////////////
39
  function seopress_activation() {
40
  add_option( 'seopress_activated', 'yes' );
41
+ flush_rewrite_rules(false);
42
  do_action('seopress_activation');
43
  }
44
  register_activation_hook(__FILE__, 'seopress_activation');
47
  deactivate_plugins( [ 'wp-seopress-pro/seopress-pro.php', 'wp-seopress-insights/seopress-insights.php' ] );
48
 
49
  delete_option( 'seopress_activated' );
50
+ flush_rewrite_rules(false);
51
  do_action('seopress_deactivation');
52
  }
53
  register_deactivation_hook(__FILE__, 'seopress_deactivation');
55
  ///////////////////////////////////////////////////////////////////////////////////////////////////
56
  //Define
57
  ///////////////////////////////////////////////////////////////////////////////////////////////////
58
+ define( 'SEOPRESS_VERSION', '4.1.5' );
59
  define( 'SEOPRESS_AUTHOR', 'Benjamin Denis' );
60
 
61
  ///////////////////////////////////////////////////////////////////////////////////////////////////