Version Description
Release Date: August 20, 2019
- Bug fix: Fixed situations where markup for canonical URLs can be ouput multiple times. #9. Props @jessecowens
- Bug fix: Titles with markup should now be properly parsed. #8
- Bug fix: Titles with commas had the commas turned into pipe seperators. #7
- Update: Added missing translation string for archives with paginated pages. #12
Download this release
Release Info
Developer | joemoto |
Plugin | BoldGrid Easy SEO – Simple and Effective SEO |
Version | 1.6.3 |
Comparing to | |
See all releases |
Code changes from version 1.6.2 to 1.6.3
- boldgrid-easy-seo.php +1 -1
- includes/class-boldgrid-seo-admin.php +56 -13
- includes/class-boldgrid-seo.php +1 -1
- includes/configs/admin.config.php +3 -0
- languages/bgseo.pot +4 -0
- readme.txt +11 -2
boldgrid-easy-seo.php
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
* Plugin Name: BoldGrid Easy SEO
|
15 |
* Plugin URI: https://www.boldgrid.com/boldgrid-seo/
|
16 |
* Description: Easily manage your website's search engine optimization with Easy SEO by BoldGrid!
|
17 |
-
* Version: 1.6.
|
18 |
* Author: BoldGrid <support@boldgrid.com>
|
19 |
* Author URI: https://www.boldgrid.com/
|
20 |
* License: GPL-2.0+
|
14 |
* Plugin Name: BoldGrid Easy SEO
|
15 |
* Plugin URI: https://www.boldgrid.com/boldgrid-seo/
|
16 |
* Description: Easily manage your website's search engine optimization with Easy SEO by BoldGrid!
|
17 |
+
* Version: 1.6.3
|
18 |
* Author: BoldGrid <support@boldgrid.com>
|
19 |
* Author URI: https://www.boldgrid.com/
|
20 |
* License: GPL-2.0+
|
includes/class-boldgrid-seo-admin.php
CHANGED
@@ -140,7 +140,9 @@ class Boldgrid_Seo_Admin {
|
|
140 |
$sep = "|";
|
141 |
}
|
142 |
|
143 |
-
$
|
|
|
|
|
144 |
|
145 |
if ( is_feed() ) {
|
146 |
return $title;
|
@@ -152,19 +154,55 @@ class Boldgrid_Seo_Admin {
|
|
152 |
if ( $content ) {
|
153 |
$title = $content;
|
154 |
}
|
155 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
return $title;
|
157 |
}
|
158 |
|
159 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
global $wp_query, $posts;
|
|
|
|
|
161 |
$content = $this->util->get_url( $wp_query );
|
162 |
-
|
|
|
|
|
|
|
163 |
// Look for a custom canonical url to override the default permalink.
|
164 |
-
|
|
|
|
|
165 |
}
|
166 |
|
167 |
-
|
|
|
|
|
|
|
|
|
168 |
}
|
169 |
|
170 |
/**
|
@@ -233,14 +271,19 @@ class Boldgrid_Seo_Admin {
|
|
233 |
}
|
234 |
}
|
235 |
}
|
|
|
236 |
// Add pagination
|
237 |
-
if ( $content
|
238 |
-
|
239 |
-
|
240 |
-
$
|
|
|
|
|
|
|
|
|
241 |
}
|
242 |
|
243 |
-
return $content;
|
244 |
}
|
245 |
|
246 |
public function simplify_archive_title( $title ) {
|
@@ -334,10 +377,10 @@ class Boldgrid_Seo_Admin {
|
|
334 |
* @since 1.0.0
|
335 |
* @return void
|
336 |
*/
|
337 |
-
public function meta_og_title(
|
338 |
$content = $this->seo_title( ',' );
|
339 |
if ( is_author() ) {
|
340 |
-
$content = str_replace( ',', ' |',
|
341 |
}
|
342 |
if ( $content ) {
|
343 |
printf( $this->settings['meta_fields']['title'] . "\n", $content );
|
140 |
$sep = "|";
|
141 |
}
|
142 |
|
143 |
+
$site_title = esc_attr( get_bloginfo( 'blogname' ) ); // Not esc_html - used for meta tag attributes output.
|
144 |
+
|
145 |
+
$title = "$title $sep $site_title";
|
146 |
|
147 |
if ( is_feed() ) {
|
148 |
return $title;
|
154 |
if ( $content ) {
|
155 |
$title = $content;
|
156 |
}
|
157 |
+
|
158 |
+
// Validate seo_title format returned and fix any uncaught
|
159 |
+
$correct_format = "$sep $site_title";
|
160 |
+
|
161 |
+
$title_length = strlen( $title );
|
162 |
+
$correct_format_length = strlen( $correct_format );
|
163 |
+
|
164 |
+
if ( $title_length < $correct_format_length ) {
|
165 |
+
if ( substr_compare( $title, $correct_format, $title_length - $correct_format_length, $correct_format_length ) === 0 ) {
|
166 |
+
$match = ", $site_title";
|
167 |
+
$match_pos = strrpos( $title, $match );
|
168 |
+
|
169 |
+
if ( $match_pos !== false ) {
|
170 |
+
$title = substr_replace( $title, " $sep $site_title", $match_pos, strlen( $match ) );
|
171 |
+
}
|
172 |
+
}
|
173 |
+
}
|
174 |
+
|
175 |
return $title;
|
176 |
}
|
177 |
|
178 |
+
/**
|
179 |
+
* Ouput Canonical URL markup.
|
180 |
+
*
|
181 |
+
* Markup is stored in the admin configs of this plugin: `$configs['admin']['meta_fields']['canonical']`.
|
182 |
+
*
|
183 |
+
* @since 1.0.0
|
184 |
+
* @return void
|
185 |
+
*/
|
186 |
+
public function canonical_url() {
|
187 |
global $wp_query, $posts;
|
188 |
+
|
189 |
+
// Get custom canonical URL defaults.
|
190 |
$content = $this->util->get_url( $wp_query );
|
191 |
+
|
192 |
+
if ( ! empty( $GLOBALS['post']->ID ) ) {
|
193 |
+
$canonical = get_post_meta( $GLOBALS['post']->ID, 'bgseo_canonical', true );
|
194 |
+
|
195 |
// Look for a custom canonical url to override the default permalink.
|
196 |
+
if ( ! empty( $canonical ) ) {
|
197 |
+
$content = $canonical;
|
198 |
+
}
|
199 |
}
|
200 |
|
201 |
+
// Ouput markup.
|
202 |
+
if ( ! empty( $content ) ) {
|
203 |
+
remove_action( 'wp_head', 'rel_canonical' ); // @since 1.6.3 - Remove core provided canonical markup.
|
204 |
+
printf( $this->settings['meta_fields']['canonical'] . "\n", esc_url( $content ) );
|
205 |
+
}
|
206 |
}
|
207 |
|
208 |
/**
|
271 |
}
|
272 |
}
|
273 |
}
|
274 |
+
|
275 |
// Add pagination
|
276 |
+
if ( $content && ( 1 < $GLOBALS['paged'] || 1 < $GLOBALS['page'] ) ) {
|
277 |
+
$paginated_title_format = array(
|
278 |
+
$sep,
|
279 |
+
$this->settings['i18n']['page'],
|
280 |
+
max( $GLOBALS['paged'], $GLOBALS['page'] ),
|
281 |
+
);
|
282 |
+
|
283 |
+
$content .= implode( ' ', $paginated_title_format );
|
284 |
}
|
285 |
|
286 |
+
return wp_strip_all_tags( $content );
|
287 |
}
|
288 |
|
289 |
public function simplify_archive_title( $title ) {
|
377 |
* @since 1.0.0
|
378 |
* @return void
|
379 |
*/
|
380 |
+
public function meta_og_title() {
|
381 |
$content = $this->seo_title( ',' );
|
382 |
if ( is_author() ) {
|
383 |
+
$content = str_replace( ',', ' |', $content );
|
384 |
}
|
385 |
if ( $content ) {
|
386 |
printf( $this->settings['meta_fields']['title'] . "\n", $content );
|
includes/class-boldgrid-seo.php
CHANGED
@@ -151,7 +151,7 @@ class Boldgrid_Seo {
|
|
151 |
$this->loader->add_action( "{$this->prefix}/seo/description", $admin, 'meta_description' );
|
152 |
$this->loader->add_action( "{$this->prefix}/seo/robots", $admin, 'robots' );
|
153 |
$this->loader->add_action( "{$this->prefix}/seo/canonical", $admin, 'canonical_url' );
|
154 |
-
$this->loader->add_action( "{$this->prefix}/seo/
|
155 |
$this->loader->add_action( "{$this->prefix}/seo/og:title", $admin, 'meta_og_title' );
|
156 |
$this->loader->add_action( "{$this->prefix}/seo/og:site_name", $admin, 'meta_og_site_name' );
|
157 |
$this->loader->add_action( "{$this->prefix}/seo/og:type", $admin, 'meta_og_type' );
|
151 |
$this->loader->add_action( "{$this->prefix}/seo/description", $admin, 'meta_description' );
|
152 |
$this->loader->add_action( "{$this->prefix}/seo/robots", $admin, 'robots' );
|
153 |
$this->loader->add_action( "{$this->prefix}/seo/canonical", $admin, 'canonical_url' );
|
154 |
+
$this->loader->add_action( "{$this->prefix}/seo/og:locale", $admin, 'meta_og_locale' );
|
155 |
$this->loader->add_action( "{$this->prefix}/seo/og:title", $admin, 'meta_og_title' );
|
156 |
$this->loader->add_action( "{$this->prefix}/seo/og:site_name", $admin, 'meta_og_site_name' );
|
157 |
$this->loader->add_action( "{$this->prefix}/seo/og:type", $admin, 'meta_og_type' );
|
includes/configs/admin.config.php
CHANGED
@@ -16,4 +16,7 @@ return array(
|
|
16 |
'og_site_name' => '<meta property="og:site_name" content="%s" />',
|
17 |
'canonical' => '<link rel="canonical" href="%s" />',
|
18 |
),
|
|
|
|
|
|
|
19 |
);
|
16 |
'og_site_name' => '<meta property="og:site_name" content="%s" />',
|
17 |
'canonical' => '<link rel="canonical" href="%s" />',
|
18 |
),
|
19 |
+
'i18n' => array(
|
20 |
+
'page' => esc_attr__( 'Page', 'bgseo' ),
|
21 |
+
),
|
22 |
);
|
languages/bgseo.pot
CHANGED
@@ -24,6 +24,10 @@ msgstr ""
|
|
24 |
msgid "Easy SEO Error: You must have PHP 5.3 or higher and WordPress 4.0 or higher to use this plugin."
|
25 |
msgstr ""
|
26 |
|
|
|
|
|
|
|
|
|
27 |
#: includes/configs/i18n/content.config.php:5
|
28 |
msgid "Word Count: %s."
|
29 |
msgstr ""
|
24 |
msgid "Easy SEO Error: You must have PHP 5.3 or higher and WordPress 4.0 or higher to use this plugin."
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: includes/configs/admin.config.php:20
|
28 |
+
msgid "Page"
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
#: includes/configs/i18n/content.config.php:5
|
32 |
msgid "Word Count: %s."
|
33 |
msgstr ""
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: boldgrid, timph, rramo012, imh_brad, joemoto
|
3 |
Tags: seo, search engine optimization, content analysis, readability, boldgrid
|
4 |
Requires at least: 4.4
|
5 |
-
Tested up to: 5.
|
6 |
Requires PHP: 5.3
|
7 |
-
Stable tag: 1.6.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -78,6 +78,15 @@ The BoldGrid Easy SEO plugin is open source software. Join in on our [GitHub rep
|
|
78 |
|
79 |
== Changelog ==
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
= 1.6.2 =
|
82 |
|
83 |
Release Date: February 14, 2019
|
2 |
Contributors: boldgrid, timph, rramo012, imh_brad, joemoto
|
3 |
Tags: seo, search engine optimization, content analysis, readability, boldgrid
|
4 |
Requires at least: 4.4
|
5 |
+
Tested up to: 5.3
|
6 |
Requires PHP: 5.3
|
7 |
+
Stable tag: 1.6.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
78 |
|
79 |
== Changelog ==
|
80 |
|
81 |
+
= 1.6.3 =
|
82 |
+
|
83 |
+
Release Date: August 20, 2019
|
84 |
+
|
85 |
+
* Bug fix: Fixed situations where markup for canonical URLs can be ouput multiple times. [#9](https://github.com/BoldGrid/boldgrid-seo/issues/9). Props [@jessecowens](https://profiles.wordpress.org/jessecowens/)
|
86 |
+
* Bug fix: Titles with markup should now be properly parsed. [#8](https://github.com/BoldGrid/boldgrid-seo/issues/8)
|
87 |
+
* Bug fix: Titles with commas had the commas turned into pipe seperators. [#7](https://github.com/BoldGrid/boldgrid-seo/issues/7)
|
88 |
+
* Update: Added missing translation string for archives with paginated pages. [#12](https://github.com/BoldGrid/boldgrid-seo/issues/12)
|
89 |
+
|
90 |
= 1.6.2 =
|
91 |
|
92 |
Release Date: February 14, 2019
|