WP Meta SEO - Version 1.7.1

Version Description

  • Fix RSS feed is broken with WP Meta SEO 1.7.0
  • Edit separatelly the content title from the meta title (for search engine)
Download this release

Release Info

Developer JoomUnited
Plugin Icon 128x128 WP Meta SEO
Version 1.7.1
Comparing to
See all releases

Code changes from version 1.7.0 to 1.7.1

Files changed (3) hide show
  1. inc/class.metaseo-meta.php +1 -5
  2. readme.txt +5 -1
  3. wp-meta-seo.php +21 -11
inc/class.metaseo-meta.php CHANGED
@@ -385,11 +385,7 @@ class WPMSEO_Meta {
385
if ($custom[self::$meta_prefix . $key][0] === $unserialized) {
386
return $custom[self::$meta_prefix . $key][0];
387
} else {
388
- $field_def = self::$meta_fields[self::$fields_index[self::$meta_prefix . $key]['subset']][self::$fields_index[self::$meta_prefix . $key]['key']];
389
- if (isset($field_def['serialized']) && $field_def['serialized'] === true) {
390
- // Ok, serialize value expected/allowed.
391
- return $unserialized;
392
- }
393
}
394
}
395
385
if ($custom[self::$meta_prefix . $key][0] === $unserialized) {
386
return $custom[self::$meta_prefix . $key][0];
387
} else {
388
+ return '';
389
}
390
}
391
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: JoomUnited
3
Tags: google, webmaster tools, keywords, meta, meta description, meta keywords, meta title, robots meta, search engine optimization, seo, wordpress seo, yahoo, image optimization, image resize, custom post seo
4
Requires at least: 4.0
5
Tested up to: 4.4.0
6
- Stable tag: 1.7.0
7
License: GPLv2 or later
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
@@ -171,6 +171,10 @@ This manual SEO validation on click on the reload analysis button.
171
172
== Changelog ==
173
174
= 1.7.0 =
175
* Add link SEO title field in link editor tool
176
* Add a SEO bulk edition view on your links titles (of all your content)
3
Tags: google, webmaster tools, keywords, meta, meta description, meta keywords, meta title, robots meta, search engine optimization, seo, wordpress seo, yahoo, image optimization, image resize, custom post seo
4
Requires at least: 4.0
5
Tested up to: 4.4.0
6
+ Stable tag: 1.7.1
7
License: GPLv2 or later
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
171
172
== Changelog ==
173
174
+ = 1.7.1 =
175
+ * Fix RSS feed is broken with WP Meta SEO 1.7.0
176
+ * Edit separatelly the content title from the meta title (for search engine)
177
+
178
= 1.7.0 =
179
* Add link SEO title field in link editor tool
180
* Add a SEO bulk edition view on your links titles (of all your content)
wp-meta-seo.php CHANGED
@@ -4,7 +4,7 @@
4
* Plugin Name: WP Meta SEO
5
* Plugin URI: http://www.joomunited.com/wordpress-products/wp-meta-seo
6
* Description: WP Meta SEO is a plugin for WordPress to fill meta for content, images and main SEO info in a single view.
7
- * Version: 1.7.0
8
* Text Domain: wp-meta-seo
9
* Domain Path: /languages
10
* Author: JoomUnited
@@ -47,7 +47,7 @@ if (!defined('URL'))
47
define('URL', get_site_url());
48
49
if (!defined('WPMSEO_VERSION'))
50
- define('WPMSEO_VERSION', '1.7.0');
51
52
if (!defined('WPMSEO_FILE'))
53
define('WPMSEO_FILE', __FILE__);
@@ -93,6 +93,7 @@ if (is_admin()) {
93
global $wp_query;
94
// get meta title
95
$meta_title = get_post_meta($wp_query->post->ID, '_metaseo_metatitle', true);
96
if($meta_title == '') $meta_title = $wp_query->post->post_title;
97
$meta_title_esc = esc_attr($meta_title);
98
@@ -107,6 +108,7 @@ if (is_admin()) {
107
108
// get meta description
109
$meta_description = get_post_meta($wp_query->post->ID, '_metaseo_metadesc', true);
110
if($meta_description == '') {
111
$meta_description = (strlen($wp_query->post->post_content) > 156)?substr($wp_query->post->post_content,0,152) . ' ...':$wp_query->post->post_content;
112
}
@@ -120,19 +122,23 @@ if (is_admin()) {
120
// check homepage is a page
121
if(get_post_meta($wp_query->post->ID, '_metaseo_metatitle', true) == '' && is_front_page() ){
122
$meta_title_esc = esc_attr($settings['metaseo_title_home']);
123
}
124
125
if(get_post_meta($wp_query->post->ID, '_metaseo_metadesc', true) == '' && is_front_page() ){
126
$meta_description_esc = esc_attr($settings['metaseo_desc_home']);
127
}
128
129
// get meta title for twitter
130
$twitter_title = get_post_meta($wp_query->post->ID, '_metaseo_metatwitter-title', true);
131
$meta_twitter_title = esc_attr($twitter_title);
132
if($meta_twitter_title == '') $meta_twitter_title = $meta_title_esc;
133
134
// get meta description for twitter
135
$twitter_desc = get_post_meta($wp_query->post->ID, '_metaseo_metatwitter-desc', true);
136
$meta_twitter_desc = esc_attr($twitter_desc);
137
if($meta_twitter_desc == '') $meta_twitter_desc = $meta_description_esc;
138
@@ -155,30 +161,36 @@ if (is_admin()) {
155
$meta_twitter_image = get_post_meta($wp_query->post->ID,'_metaseo_metatwitter-image',true);
156
157
$meta_facebook_title = get_post_meta($wp_query->post->ID,'_metaseo_metaopengraph-title',true);
158
if($meta_facebook_title == '') $meta_facebook_title = $meta_title_esc;
159
160
$meta_facebook_desc = get_post_meta($wp_query->post->ID,'_metaseo_metaopengraph-desc',true);
161
if($meta_facebook_desc == '') $meta_facebook_desc = $meta_description_esc;
162
$meta_facebook_image = get_post_meta($wp_query->post->ID,'_metaseo_metaopengraph-image',true);
163
164
// check homepage is latest post
165
if((empty($mpage_for_posts) && empty($mpage_on_front) && $mshow_on_front == 'posts' && is_home()) || (empty($mpage_on_front) && !empty($mpage_for_posts) && $mshow_on_front== 'page' && is_home())){
166
- $meta_title = $meta_title_esc = $meta_twitter_title = $meta_facebook_title = esc_attr($settings['metaseo_title_home']);
167
- $meta_description_esc = $meta_twitter_desc = $meta_facebook_desc = esc_attr($settings['metaseo_desc_home']);
168
169
if($settings['metaseo_title_home'] == ''){
170
- $meta_title = $meta_title_esc = $meta_twitter_title = $meta_facebook_title = get_bloginfo('name').' - '.get_bloginfo('description');
171
}
172
173
if($settings['metaseo_desc_home'] == ''){
174
- $meta_description_esc = $meta_twitter_desc = $meta_facebook_desc = get_bloginfo('description');
175
}
176
}
177
178
if ( is_category() || is_tag() || is_tax() ) {
179
$term = $wp_query->get_queried_object();
180
- $meta_title = $meta_title_esc = $meta_facebook_title = $meta_twitter_title = $term->name;
181
- $meta_description_esc = $meta_facebook_desc = $meta_twitter_desc = $term->description;
182
}
183
184
$patterns = array(
@@ -206,8 +218,6 @@ if (is_admin()) {
206
'#<meta name="twitter:title" [^<>]+ ?>#i',
207
'<meta name="twitter:title" content="' . $meta_twitter_title . '" />',
208
($meta_twitter_title != '' ? true : false)),
209
- '_title' => array('#<title>[^<>]+?<\/title>#i', '<title>' . $meta_title . '</title>',
210
- ($meta_title != '' ? true : false)),
211
'facebook_admin' => array(
212
'#<meta property="fb:admins" [^<>]+ ?>#i',
213
'<meta property="fb:admins" content="' . $facebook_admin . '" />',
@@ -422,4 +432,4 @@ function text_link( $field, $meta ) {
422
echo '<input class="cmb_link_button button" type="button" value="Voeg link toe" />','<p class="cmb_metabox_description">', $field['desc'], '</p>';
423
}
424
add_action( 'cmb_render_text_link', 'text_link', 10, 2 );
425
- /**********************************************************************************/
4
* Plugin Name: WP Meta SEO
5
* Plugin URI: http://www.joomunited.com/wordpress-products/wp-meta-seo
6
* Description: WP Meta SEO is a plugin for WordPress to fill meta for content, images and main SEO info in a single view.
7
+ * Version: 1.7.1
8
* Text Domain: wp-meta-seo
9
* Domain Path: /languages
10
* Author: JoomUnited
47
define('URL', get_site_url());
48
49
if (!defined('WPMSEO_VERSION'))
50
+ define('WPMSEO_VERSION', '1.7.1');
51
52
if (!defined('WPMSEO_FILE'))
53
define('WPMSEO_FILE', __FILE__);
93
global $wp_query;
94
// get meta title
95
$meta_title = get_post_meta($wp_query->post->ID, '_metaseo_metatitle', true);
96
+ if($meta_title != maybe_unserialize($meta_title)) $meta_title = '';
97
if($meta_title == '') $meta_title = $wp_query->post->post_title;
98
$meta_title_esc = esc_attr($meta_title);
99
108
109
// get meta description
110
$meta_description = get_post_meta($wp_query->post->ID, '_metaseo_metadesc', true);
111
+ if($meta_description != maybe_unserialize($meta_description)) $meta_description = '';
112
if($meta_description == '') {
113
$meta_description = (strlen($wp_query->post->post_content) > 156)?substr($wp_query->post->post_content,0,152) . ' ...':$wp_query->post->post_content;
114
}
122
// check homepage is a page
123
if(get_post_meta($wp_query->post->ID, '_metaseo_metatitle', true) == '' && is_front_page() ){
124
$meta_title_esc = esc_attr($settings['metaseo_title_home']);
125
+ if($meta_title_esc != maybe_unserialize($meta_title_esc)) $meta_title_esc = '';
126
}
127
128
if(get_post_meta($wp_query->post->ID, '_metaseo_metadesc', true) == '' && is_front_page() ){
129
$meta_description_esc = esc_attr($settings['metaseo_desc_home']);
130
+ if($meta_description_esc != maybe_unserialize($meta_description_esc)) $meta_description_esc = '';
131
}
132
133
// get meta title for twitter
134
$twitter_title = get_post_meta($wp_query->post->ID, '_metaseo_metatwitter-title', true);
135
+ if($twitter_title != maybe_unserialize($twitter_title)) $twitter_title = '';
136
$meta_twitter_title = esc_attr($twitter_title);
137
if($meta_twitter_title == '') $meta_twitter_title = $meta_title_esc;
138
139
// get meta description for twitter
140
$twitter_desc = get_post_meta($wp_query->post->ID, '_metaseo_metatwitter-desc', true);
141
+ if($twitter_desc != maybe_unserialize($twitter_desc)) $twitter_desc = '';
142
$meta_twitter_desc = esc_attr($twitter_desc);
143
if($meta_twitter_desc == '') $meta_twitter_desc = $meta_description_esc;
144
161
$meta_twitter_image = get_post_meta($wp_query->post->ID,'_metaseo_metatwitter-image',true);
162
163
$meta_facebook_title = get_post_meta($wp_query->post->ID,'_metaseo_metaopengraph-title',true);
164
+ if($meta_facebook_title != maybe_unserialize($meta_facebook_title)) $meta_facebook_title = '';
165
if($meta_facebook_title == '') $meta_facebook_title = $meta_title_esc;
166
167
$meta_facebook_desc = get_post_meta($wp_query->post->ID,'_metaseo_metaopengraph-desc',true);
168
+ if($meta_facebook_desc != maybe_unserialize($meta_facebook_desc)) $meta_facebook_desc = '';
169
if($meta_facebook_desc == '') $meta_facebook_desc = $meta_description_esc;
170
$meta_facebook_image = get_post_meta($wp_query->post->ID,'_metaseo_metaopengraph-image',true);
171
172
// check homepage is latest post
173
if((empty($mpage_for_posts) && empty($mpage_on_front) && $mshow_on_front == 'posts' && is_home()) || (empty($mpage_on_front) && !empty($mpage_for_posts) && $mshow_on_front== 'page' && is_home())){
174
+ $settings_title_home = esc_attr($settings['metaseo_title_home']);
175
+ $settings_desc_home = esc_attr($settings['metaseo_desc_home']);
176
+ if($settings_title_home != maybe_unserialize($settings_title_home)) $settings_title_home = '';
177
+ if($settings_desc_home != maybe_unserialize($settings_desc_home)) $settings_desc_home = '';
178
+ $meta_title = $meta_title_esc = $meta_twitter_title = $meta_facebook_title = $settings_title_home;
179
+ $meta_description_esc = $meta_twitter_desc = $meta_facebook_desc = $settings_desc_home;
180
181
if($settings['metaseo_title_home'] == ''){
182
+ $meta_title = $meta_title_esc = $meta_twitter_title = $meta_facebook_title = esc_attr(get_bloginfo('name').' - '.get_bloginfo('description'));
183
}
184
185
if($settings['metaseo_desc_home'] == ''){
186
+ $meta_description_esc = $meta_twitter_desc = $meta_facebook_desc = esc_attr(get_bloginfo('description'));
187
}
188
}
189
190
if ( is_category() || is_tag() || is_tax() ) {
191
$term = $wp_query->get_queried_object();
192
+ $meta_title = $meta_title_esc = $meta_facebook_title = $meta_twitter_title = esc_attr($term->name);
193
+ $meta_description_esc = $meta_facebook_desc = $meta_twitter_desc = esc_attr($term->description);
194
}
195
196
$patterns = array(
218
'#<meta name="twitter:title" [^<>]+ ?>#i',
219
'<meta name="twitter:title" content="' . $meta_twitter_title . '" />',
220
($meta_twitter_title != '' ? true : false)),
221
'facebook_admin' => array(
222
'#<meta property="fb:admins" [^<>]+ ?>#i',
223
'<meta property="fb:admins" content="' . $facebook_admin . '" />',
432
echo '<input class="cmb_link_button button" type="button" value="Voeg link toe" />','<p class="cmb_metabox_description">', $field['desc'], '</p>';
433
}
434
add_action( 'cmb_render_text_link', 'text_link', 10, 2 );
435
+ /**********************************************************************************/