SEOPress - Version 1.7.1

Version Description

  • FIX XML Index sitemaps count column
  • FIX XML Sitemaps replace Published date by Modified date (last update)
  • FIX XML Sitemaps Notice: Undefined variable: product_img
  • FIX XML Sitemaps Warning: DOMDocument::loadHTML(): Empty string supplied as input
  • FIX XML Sitemaps Notice: Undefined variable: images
  • FIX Undefined index: logout wp-seopress-pro/inc/admin/admin.php (Google Analytics)
  • FIX Google Analytics Dashboard widget if no token
Download this release

Release Info

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

Code changes from version 1.7 to 1.7.1

inc/functions/sitemap/template-xml-sitemaps-single.php CHANGED
@@ -26,7 +26,7 @@ function seopress_xml_sitemap_single() {
26
  $seopress_sitemaps .= '<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">';
27
  $seopress_sitemaps .= "\n";
28
 
29
- $args = array( 'posts_per_page' => 1000, 'order'=> 'DESC', 'orderby' => 'date', 'post_type' => $path, 'post_status' => 'publish', 'meta_key' => '_seopress_robots_index', 'meta_value' => 'yes', 'meta_compare' => 'NOT EXISTS', 'fields' => 'ids', 'lang' => '' );
30
  $postslist = get_posts( $args );
31
  foreach ( $postslist as $post ) {
32
  setup_postdata( $post );
@@ -38,7 +38,7 @@ function seopress_xml_sitemap_single() {
38
  $seopress_sitemaps .= '</loc>';
39
  $seopress_sitemaps .= "\n";
40
  $seopress_sitemaps .= '<lastmod>';
41
- $seopress_sitemaps .= get_the_date('c', $post);
42
  $seopress_sitemaps .= '';
43
  $seopress_sitemaps .= '</lastmod>';
44
  $seopress_sitemaps .= "\n";
@@ -47,10 +47,14 @@ function seopress_xml_sitemap_single() {
47
  if (seopress_xml_sitemap_img_enable_option() =='1') {
48
 
49
  //Standard images
50
- $dom = new domDocument;
51
- $dom->loadHTML(get_the_content($post));
52
- $dom->preserveWhiteSpace = false;
53
- $images = $dom->getElementsByTagName('img');
 
 
 
 
54
 
55
  //WooCommerce
56
  global $product;
@@ -59,22 +63,29 @@ function seopress_xml_sitemap_single() {
59
  }
60
 
61
  //Galleries
62
- $galleries = get_post_galleries_images($post);
 
 
63
 
64
  //Post Thumbnail
65
  $post_thumbnail = get_the_post_thumbnail_url($post);
66
 
67
- if ($images->length>=1 || !empty($galleries) || !empty($product_img) || $post_thumbnail !='') {
 
68
  $seopress_sitemaps .= '<image:image>';
69
- if ($images->length>=1) {
70
- foreach($images as $img) {
71
- $url = $img->getAttribute('src');
72
- $seopress_sitemaps .= "\n";
73
- $seopress_sitemaps .= '<image:loc>';
74
- $seopress_sitemaps .= $url;
75
- $seopress_sitemaps .= '</image:loc>';
76
- }
 
 
 
77
  }
 
78
  if ($galleries !='') {
79
  foreach( $galleries as $gallery ) {
80
  foreach( $gallery as $url ) {
@@ -85,7 +96,8 @@ function seopress_xml_sitemap_single() {
85
  }
86
  }
87
  }
88
- if ($product_img !='') {
 
89
  foreach( $product_img as $product_attachment_id ) {
90
  $seopress_sitemaps .= "\n";
91
  $seopress_sitemaps .= '<image:loc>';
@@ -93,6 +105,7 @@ function seopress_xml_sitemap_single() {
93
  $seopress_sitemaps .= '</image:loc>';
94
  }
95
  }
 
96
  if ($post_thumbnail !='') {
97
  $seopress_sitemaps .= "\n";
98
  $seopress_sitemaps .= '<image:loc>';
26
  $seopress_sitemaps .= '<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">';
27
  $seopress_sitemaps .= "\n";
28
 
29
+ $args = array( 'posts_per_page' => 1000, 'order'=> 'DESC', 'orderby' => 'modified', 'post_type' => $path, 'post_status' => 'publish', 'meta_key' => '_seopress_robots_index', 'meta_value' => 'yes', 'meta_compare' => 'NOT EXISTS', 'fields' => 'ids', 'lang' => '' );
30
  $postslist = get_posts( $args );
31
  foreach ( $postslist as $post ) {
32
  setup_postdata( $post );
38
  $seopress_sitemaps .= '</loc>';
39
  $seopress_sitemaps .= "\n";
40
  $seopress_sitemaps .= '<lastmod>';
41
+ $seopress_sitemaps .= get_the_modified_date('c', $post);
42
  $seopress_sitemaps .= '';
43
  $seopress_sitemaps .= '</lastmod>';
44
  $seopress_sitemaps .= "\n";
47
  if (seopress_xml_sitemap_img_enable_option() =='1') {
48
 
49
  //Standard images
50
+ if (!empty (get_the_content($post))) {
51
+ $dom = new domDocument;
52
+ $dom->loadHTML(get_the_content($post));
53
+ $dom->preserveWhiteSpace = false;
54
+ if ($dom->getElementsByTagName('img') !='') {
55
+ $images = $dom->getElementsByTagName('img');
56
+ }
57
+ }
58
 
59
  //WooCommerce
60
  global $product;
63
  }
64
 
65
  //Galleries
66
+ if (get_post_galleries_images($post) !='') {
67
+ $galleries = get_post_galleries_images($post);
68
+ }
69
 
70
  //Post Thumbnail
71
  $post_thumbnail = get_the_post_thumbnail_url($post);
72
 
73
+ if ((isset($images) && !empty ($images) && $images->length>=1) || (isset($galleries) && !empty($galleries)) || (isset($product) && !empty($product_img)) || $post_thumbnail !='') {
74
+
75
  $seopress_sitemaps .= '<image:image>';
76
+ //Standard img
77
+ if (isset($images) && !empty ($images)) {
78
+ if ($images->length>=1) {
79
+ foreach($images as $img) {
80
+ $url = $img->getAttribute('src');
81
+ $seopress_sitemaps .= "\n";
82
+ $seopress_sitemaps .= '<image:loc>';
83
+ $seopress_sitemaps .= $url;
84
+ $seopress_sitemaps .= '</image:loc>';
85
+ }
86
+ }
87
  }
88
+ //Galleries
89
  if ($galleries !='') {
90
  foreach( $galleries as $gallery ) {
91
  foreach( $gallery as $url ) {
96
  }
97
  }
98
  }
99
+ //WooCommerce img
100
+ if ($product !='' && $product_img !='') {
101
  foreach( $product_img as $product_attachment_id ) {
102
  $seopress_sitemaps .= "\n";
103
  $seopress_sitemaps .= '<image:loc>';
105
  $seopress_sitemaps .= '</image:loc>';
106
  }
107
  }
108
+ //Post thumbnail
109
  if ($post_thumbnail !='') {
110
  $seopress_sitemaps .= "\n";
111
  $seopress_sitemaps .= '<image:loc>';
inc/functions/sitemap/template-xml-sitemaps-xsl.php CHANGED
@@ -68,23 +68,19 @@ function seopress_xml_sitemap_index_xsl() {
68
  margin-top: 20px;
69
  display: inline-block;
70
  }
71
- #sitemaps .loc, #sitemaps .lastmod, #sitemaps .count {
72
  font-weight: bold;
73
  display: inline-block;
74
  border-bottom: 1px solid rgba(224, 224, 224, 1);
75
  padding: 15px;
76
  }
77
  #sitemaps .loc {
78
- width: 60%;
79
  }
80
  #sitemaps .lastmod {
81
  width: 30%;
82
  padding-left: 0;
83
  }
84
- #sitemaps .count {
85
- width: 10%;
86
- padding-left: 0;
87
- }
88
  #sitemaps ul {
89
  margin: 10px 0;
90
  padding: 0;
@@ -101,7 +97,7 @@ function seopress_xml_sitemap_index_xsl() {
101
  background:#F3F6F8;
102
  }
103
  #sitemaps .item-loc {
104
- width: 60%;
105
  display: inline-block;
106
  }
107
  #sitemaps .item-lastmod {
@@ -109,11 +105,6 @@ function seopress_xml_sitemap_index_xsl() {
109
  display: inline-block;
110
  padding: 0 10px;
111
  }
112
- #sitemaps .item-count {
113
- width: 10%;
114
- display: inline-block;
115
- padding: 0 10px;
116
- }
117
  </style>';
118
 
119
  $seopress_sitemaps_xsl .='</head>';
@@ -128,16 +119,12 @@ function seopress_xml_sitemap_index_xsl() {
128
  $seopress_sitemaps_xsl .='<div class="lastmod">';
129
  $seopress_sitemaps_xsl .='Last update';
130
  $seopress_sitemaps_xsl .='</div>';
131
- $seopress_sitemaps_xsl .='<div class="count">';
132
- $seopress_sitemaps_xsl .='Items count';
133
- $seopress_sitemaps_xsl .='</div>';
134
  $seopress_sitemaps_xsl .='<ul>';
135
  $seopress_sitemaps_xsl .='<xsl:for-each select="sitemap:sitemapindex/sitemap:sitemap">';
136
  $seopress_sitemaps_xsl .='<li>';
137
  $seopress_sitemaps_xsl .='<xsl:variable name="sitemap_loc"><xsl:value-of select="sitemap:loc"/></xsl:variable>';
138
  $seopress_sitemaps_xsl .='<span class="item-loc"><a href="{$sitemap_loc}"><xsl:value-of select="sitemap:loc" /></a></span>';
139
  $seopress_sitemaps_xsl .='<span class="item-lastmod"><xsl:value-of select="sitemap:lastmod" /></span>';
140
- $seopress_sitemaps_xsl .='<span class="item-count"><xsl:value-of select="sitemap:count" /></span>';
141
  $seopress_sitemaps_xsl .='</li>';
142
  $seopress_sitemaps_xsl .='</xsl:for-each>';
143
  $seopress_sitemaps_xsl .='</ul>';
68
  margin-top: 20px;
69
  display: inline-block;
70
  }
71
+ #sitemaps .loc, #sitemaps .lastmod {
72
  font-weight: bold;
73
  display: inline-block;
74
  border-bottom: 1px solid rgba(224, 224, 224, 1);
75
  padding: 15px;
76
  }
77
  #sitemaps .loc {
78
+ width: 70%;
79
  }
80
  #sitemaps .lastmod {
81
  width: 30%;
82
  padding-left: 0;
83
  }
 
 
 
 
84
  #sitemaps ul {
85
  margin: 10px 0;
86
  padding: 0;
97
  background:#F3F6F8;
98
  }
99
  #sitemaps .item-loc {
100
+ width: 70%;
101
  display: inline-block;
102
  }
103
  #sitemaps .item-lastmod {
105
  display: inline-block;
106
  padding: 0 10px;
107
  }
 
 
 
 
 
108
  </style>';
109
 
110
  $seopress_sitemaps_xsl .='</head>';
119
  $seopress_sitemaps_xsl .='<div class="lastmod">';
120
  $seopress_sitemaps_xsl .='Last update';
121
  $seopress_sitemaps_xsl .='</div>';
 
 
 
122
  $seopress_sitemaps_xsl .='<ul>';
123
  $seopress_sitemaps_xsl .='<xsl:for-each select="sitemap:sitemapindex/sitemap:sitemap">';
124
  $seopress_sitemaps_xsl .='<li>';
125
  $seopress_sitemaps_xsl .='<xsl:variable name="sitemap_loc"><xsl:value-of select="sitemap:loc"/></xsl:variable>';
126
  $seopress_sitemaps_xsl .='<span class="item-loc"><a href="{$sitemap_loc}"><xsl:value-of select="sitemap:loc" /></a></span>';
127
  $seopress_sitemaps_xsl .='<span class="item-lastmod"><xsl:value-of select="sitemap:lastmod" /></span>';
 
128
  $seopress_sitemaps_xsl .='</li>';
129
  $seopress_sitemaps_xsl .='</xsl:for-each>';
130
  $seopress_sitemaps_xsl .='</ul>';
inc/functions/sitemap/template-xml-sitemaps.php CHANGED
@@ -24,17 +24,13 @@ function seopress_xml_sitemap_index() {
24
  $seopress_sitemaps .= '<loc>';
25
  $seopress_sitemaps .= home_url().'/sitemaps/'.$cpt_key.'.xml';
26
  $seopress_sitemaps .= '</loc>';
27
- $get_latest_post = new WP_Query(array('post_type' => $cpt_key, 'post_status' => 'publish', 'ignore_sticky_posts' => true, 'posts_per_page' => 1000, 'meta_key' => '_seopress_robots_index', 'meta_value' => 'yes', 'meta_compare' => 'NOT EXISTS', 'order' => 'DESC', 'orderby' => 'date', 'lang' => ''));
28
  if($get_latest_post->have_posts()){
29
  $seopress_sitemaps .= "\n";
30
  $seopress_sitemaps .= '<lastmod>';
31
- $seopress_sitemaps .= date("c", strtotime($get_latest_post->posts[0]->post_date));
32
  $seopress_sitemaps .= '</lastmod>';
33
  $seopress_sitemaps .= "\n";
34
- $seopress_sitemaps .= '<count>';
35
- $seopress_sitemaps .= count($get_latest_post->posts);
36
- $seopress_sitemaps .= '</count>';
37
- $seopress_sitemaps .= "\n";
38
  }
39
  $seopress_sitemaps .= '</sitemap>';
40
  }
@@ -71,9 +67,9 @@ function seopress_xml_sitemap_index() {
71
  $seopress_sitemaps .= "\n";
72
  $seopress_sitemaps .= '<lastmod>';
73
 
74
- $get_latest_post = new WP_Query(array('post_type' => 'post', 'post_status' => 'publish', 'ignore_sticky_posts' => true, 'posts_per_page' => 1, 'orderby' => 'date', 'meta_key' => '_seopress_robots_index', 'meta_value' => 'yes', 'meta_compare' => 'NOT EXISTS', 'order' => 'DESC'));
75
  if($get_latest_post->have_posts()){
76
- $seopress_sitemaps .= date("c", strtotime($get_latest_post->posts[0]->post_date));
77
  }
78
 
79
  $seopress_sitemaps .= '</lastmod>';
24
  $seopress_sitemaps .= '<loc>';
25
  $seopress_sitemaps .= home_url().'/sitemaps/'.$cpt_key.'.xml';
26
  $seopress_sitemaps .= '</loc>';
27
+ $get_latest_post = new WP_Query(array('post_type' => $cpt_key, 'post_status' => 'publish', 'ignore_sticky_posts' => true, 'posts_per_page' => 1, 'meta_key' => '_seopress_robots_index', 'meta_value' => 'yes', 'meta_compare' => 'NOT EXISTS', 'order' => 'DESC', 'orderby' => 'modified', 'lang' => ''));
28
  if($get_latest_post->have_posts()){
29
  $seopress_sitemaps .= "\n";
30
  $seopress_sitemaps .= '<lastmod>';
31
+ $seopress_sitemaps .= date("c", strtotime($get_latest_post->posts[0]->post_modified));
32
  $seopress_sitemaps .= '</lastmod>';
33
  $seopress_sitemaps .= "\n";
 
 
 
 
34
  }
35
  $seopress_sitemaps .= '</sitemap>';
36
  }
67
  $seopress_sitemaps .= "\n";
68
  $seopress_sitemaps .= '<lastmod>';
69
 
70
+ $get_latest_post = new WP_Query(array('post_type' => 'post', 'post_status' => 'publish', 'ignore_sticky_posts' => true, 'posts_per_page' => 1, 'orderby' => 'modified', 'meta_key' => '_seopress_robots_index', 'meta_value' => 'yes', 'meta_compare' => 'NOT EXISTS', 'order' => 'DESC'));
71
  if($get_latest_post->have_posts()){
72
+ $seopress_sitemaps .= date("c", strtotime($get_latest_post->posts[0]->post_modified));
73
  }
74
 
75
  $seopress_sitemaps .= '</lastmod>';
languages/wp-seopress-fr_FR.mo CHANGED
Binary file
languages/wp-seopress-fr_FR.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: SEOPress\n"
4
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-cloudy\n"
5
- "POT-Creation-Date: 2017-02-23 19:57+0100\n"
6
- "PO-Revision-Date: 2017-02-23 19:59+0100\n"
7
  "Last-Translator: \n"
8
  "Language-Team: Benjamin DENIS <contact@seopress.org>\n"
9
  "Language: fr_FR\n"
2
  msgstr ""
3
  "Project-Id-Version: SEOPress\n"
4
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-cloudy\n"
5
+ "POT-Creation-Date: 2017-03-01 18:43+0100\n"
6
+ "PO-Revision-Date: 2017-03-01 18:43+0100\n"
7
  "Last-Translator: \n"
8
  "Language-Team: Benjamin DENIS <contact@seopress.org>\n"
9
  "Language: fr_FR\n"
languages/wp-seopress.mo CHANGED
Binary file
languages/wp-seopress.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: SEOPress\n"
4
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-cloudy\n"
5
- "POT-Creation-Date: 2017-02-23 19:57+0100\n"
6
- "PO-Revision-Date: 2017-02-23 19:57+0100\n"
7
  "Last-Translator: \n"
8
  "Language-Team: Benjamin DENIS <contact@seopress.org>\n"
9
  "Language: en\n"
2
  msgstr ""
3
  "Project-Id-Version: SEOPress\n"
4
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-cloudy\n"
5
+ "POT-Creation-Date: 2017-03-01 18:43+0100\n"
6
+ "PO-Revision-Date: 2017-03-01 18:43+0100\n"
7
  "Last-Translator: \n"
8
  "Language-Team: Benjamin DENIS <contact@seopress.org>\n"
9
  "Language: en\n"
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://seopress.org/
4
  Tags: seo, search engine optimization, meta, title, description, keywords, serp, knowledge grah, schema.org, url, redirection, 301, xml sitemap, breadcrumbs, ranking, google analytics, woocommerce, dublin core, rich snippets, 404, html sitemap, bot, broken link checker
5
  Requires at least: 4.4+
6
  Tested up to: 4.7
7
- Stable tag: 1.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -109,8 +109,17 @@ SEOPress is a powerful plugin to optimize your SEO, boost your traffic and impro
109
  28. htaccess (PRO)
110
  29. SEOPress metaboxe in post, page, custom post type
111
  30. Structured Data Types metaboxe in post, page, custom post type
 
112
 
113
  == Changelog ==
 
 
 
 
 
 
 
 
114
  = 1.7 =
115
  * NEW SEOPress BOT : scan all your links in content and detect 404 errors, 301/302/307 redirects, links down... (SEOPress PRO only)
116
  * NEW SEOPress BOT : export links scan in CSV (SEOPress PRO only)
4
  Tags: seo, search engine optimization, meta, title, description, keywords, serp, knowledge grah, schema.org, url, redirection, 301, xml sitemap, breadcrumbs, ranking, google analytics, woocommerce, dublin core, rich snippets, 404, html sitemap, bot, broken link checker
5
  Requires at least: 4.4+
6
  Tested up to: 4.7
7
+ Stable tag: 1.7.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
109
  28. htaccess (PRO)
110
  29. SEOPress metaboxe in post, page, custom post type
111
  30. Structured Data Types metaboxe in post, page, custom post type
112
+ 31. SEOPress BOT
113
 
114
  == Changelog ==
115
+ = 1.7.1 =
116
+ * FIX XML Index sitemaps count column
117
+ * FIX XML Sitemaps replace Published date by Modified date (last update)
118
+ * FIX XML Sitemaps Notice: Undefined variable: product_img
119
+ * FIX XML Sitemaps Warning: DOMDocument::loadHTML(): Empty string supplied as input
120
+ * FIX XML Sitemaps Notice: Undefined variable: images
121
+ * FIX Undefined index: logout wp-seopress-pro/inc/admin/admin.php (Google Analytics)
122
+ * FIX Google Analytics Dashboard widget if no token
123
  = 1.7 =
124
  * NEW SEOPress BOT : scan all your links in content and detect 404 errors, 301/302/307 redirects, links down... (SEOPress PRO only)
125
  * NEW SEOPress BOT : export links scan in CSV (SEOPress PRO only)
seopress.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: SEOPress
5
  Plugin URI: http://seopress.org/
6
  Description: The best SEO plugin.
7
- Version: 1.7
8
  Author: Benjamin DENIS
9
  Author URI: http://seopress.org/
10
  License: GPLv2
@@ -56,7 +56,7 @@ register_deactivation_hook(__FILE__, 'seopress_deactivation');
56
  //Define
57
  ///////////////////////////////////////////////////////////////////////////////////////////////////
58
 
59
- define( 'SEOPRESS_VERSION', '1.7' );
60
  define( 'SEOPRESS_AUTHOR', 'Benjamin Denis' );
61
 
62
  ///////////////////////////////////////////////////////////////////////////////////////////////////
4
  Plugin Name: SEOPress
5
  Plugin URI: http://seopress.org/
6
  Description: The best SEO plugin.
7
+ Version: 1.7.1
8
  Author: Benjamin DENIS
9
  Author URI: http://seopress.org/
10
  License: GPLv2
56
  //Define
57
  ///////////////////////////////////////////////////////////////////////////////////////////////////
58
 
59
+ define( 'SEOPRESS_VERSION', '1.7.1' );
60
  define( 'SEOPRESS_AUTHOR', 'Benjamin Denis' );
61
 
62
  ///////////////////////////////////////////////////////////////////////////////////////////////////