WP Meta SEO - Version 3.7.1

Version Description

  • Fix : Sitemap categories not properly added
  • Fix : Broken link display column header
  • Fix : Render meta description on frontend
Download this release

Release Info

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

Code changes from version 3.7.0 to 3.7.1

inc/class.metaseo-broken-link-table.php CHANGED
@@ -106,7 +106,7 @@ class MetaSeoBrokenLinkTable extends WP_List_Table
106
  'col_hit' => __('Hits number', 'wp-meta-seo'),
107
  'col_status' => __('Status', 'wp-meta-seo'),
108
  'col_link_text' => __('Type or Link text', 'wp-meta-seo'),
109
- 'col_source' => __('Source', 'wp-meta-seo'),
110
  );
111
  }
112
 
@@ -189,6 +189,7 @@ class MetaSeoBrokenLinkTable extends WP_List_Table
189
  $class[] = 'sortable';
190
  $class[] = $desc_first ? 'asc' : 'desc';
191
  }
 
192
  $hr = esc_url(add_query_arg(compact('orderby', 'order'), $current_url));
193
  $column_name = '<a href="' . $hr . '">';
194
  $column_name .= '<span>' . $column_display_name . '</span>';
@@ -203,9 +204,9 @@ class MetaSeoBrokenLinkTable extends WP_List_Table
203
  }
204
 
205
  if ($column_key === 'cb') {
206
- echo "<th scope='col' $id $class style='padding:8px 10px;'>$column_name</th>";
207
  } else {
208
- echo "<th scope='col' $id $class $style colspan=\"3\">$column_name</th>";
209
  }
210
  }
211
  }
@@ -280,7 +281,6 @@ class MetaSeoBrokenLinkTable extends WP_List_Table
280
  $hidden = array();
281
  $sortable = $this->get_sortable_columns();
282
  $this->_column_headers = array($columns, $hidden, $sortable);
283
-
284
  $query = "SELECT * FROM " . $wpdb->prefix . "wpms_links WHERE " . implode(' AND ', $where) . $orderStr;
285
  if (!empty($_REQUEST['metaseo_broken_link_per_page'])) {
286
  $_per_page = intval($_REQUEST['metaseo_broken_link_per_page']);
106
  'col_hit' => __('Hits number', 'wp-meta-seo'),
107
  'col_status' => __('Status', 'wp-meta-seo'),
108
  'col_link_text' => __('Type or Link text', 'wp-meta-seo'),
109
+ 'col_source' => __('Source', 'wp-meta-seo')
110
  );
111
  }
112
 
189
  $class[] = 'sortable';
190
  $class[] = $desc_first ? 'asc' : 'desc';
191
  }
192
+
193
  $hr = esc_url(add_query_arg(compact('orderby', 'order'), $current_url));
194
  $column_name = '<a href="' . $hr . '">';
195
  $column_name .= '<span>' . $column_display_name . '</span>';
204
  }
205
 
206
  if ($column_key === 'cb') {
207
+ echo "<th scope='col' $id $class style='padding:8px 10px;'>$column_display_name</th>";
208
  } else {
209
+ echo "<th scope='col' $id $class $style colspan=\"3\">$column_display_name</th>";
210
  }
211
  }
212
  }
281
  $hidden = array();
282
  $sortable = $this->get_sortable_columns();
283
  $this->_column_headers = array($columns, $hidden, $sortable);
 
284
  $query = "SELECT * FROM " . $wpdb->prefix . "wpms_links WHERE " . implode(' AND ', $where) . $orderStr;
285
  if (!empty($_REQUEST['metaseo_broken_link_per_page'])) {
286
  $_per_page = intval($_REQUEST['metaseo_broken_link_per_page']);
inc/class.metaseo-content-list-table.php CHANGED
@@ -365,7 +365,7 @@ class MetaSeoContentListTable extends WP_List_Table
365
  WHERE meta_key = '_metaseo_metadesc') md ON md.post_id = $wpdb->posts.ID "
366
  . " LEFT JOIN (SELECT * FROM $wpdb->postmeta
367
  WHERE meta_key = '_metaseo_metakeywords') mk ON mk.post_id = $wpdb->posts.ID "
368
- . " WHERE " . implode(' AND ', $where) . $orderStr;
369
 
370
  $total_items = $wpdb->get_var($query);
371
  $query = "SELECT DISTINCT ID, post_title, post_name, post_type, post_status,
365
  WHERE meta_key = '_metaseo_metadesc') md ON md.post_id = $wpdb->posts.ID "
366
  . " LEFT JOIN (SELECT * FROM $wpdb->postmeta
367
  WHERE meta_key = '_metaseo_metakeywords') mk ON mk.post_id = $wpdb->posts.ID "
368
+ . " WHERE " . implode(' AND ', $where);
369
 
370
  $total_items = $wpdb->get_var($query);
371
  $query = "SELECT DISTINCT ID, post_title, post_name, post_type, post_status,
inc/class.metaseo-opengraph.php CHANGED
@@ -43,7 +43,7 @@ class MetaSeoOpenGraph
43
  $meta_title = $post->post_title;
44
  }
45
 
46
- return $meta_title;
47
  }
48
 
49
  /**
@@ -63,7 +63,7 @@ class MetaSeoOpenGraph
63
  }
64
  }
65
 
66
- return $meta_title_esc;
67
  }
68
 
69
  /**
@@ -79,7 +79,7 @@ class MetaSeoOpenGraph
79
  $meta_keywords = get_post_meta($id, '_metaseo_metakeywords', true);
80
  $keywords = esc_attr($meta_keywords);
81
  }
82
- return $keywords;
83
  }
84
 
85
  /**
@@ -91,30 +91,28 @@ class MetaSeoOpenGraph
91
  */
92
  public function getDesc($settings, $id, $content)
93
  {
94
- $meta_description = get_post_meta($id, '_metaseo_metadesc', true);
95
- if ($meta_description != maybe_unserialize($meta_description)) {
96
- $meta_description = '';
97
  }
98
 
99
- if ($meta_description == '') {
100
  $content = strip_shortcodes($content);
101
  $content = trim(strip_tags($content));
102
  if (strlen($content) > MPMSCAT_DESC_LENGTH) {
103
- $meta_description = substr($content, 0, 316) . ' ...';
104
  } else {
105
- $meta_description = $content;
106
  }
107
  }
108
 
109
- $meta_desc_esc = esc_attr($meta_description);
110
-
111
  if (get_post_meta($id, '_metaseo_metadesc', true) == '' && is_front_page()) {
112
  $meta_desc_esc = esc_attr($settings['metaseo_desc_home']);
113
  if ($meta_desc_esc != maybe_unserialize($meta_desc_esc)) {
114
  $meta_desc_esc = '';
115
  }
116
  }
117
- return $meta_desc_esc;
118
  }
119
 
120
  /**
@@ -134,7 +132,7 @@ class MetaSeoOpenGraph
134
  $meta_fbtitle = $meta_title_esc;
135
  }
136
 
137
- return $meta_fbtitle;
138
  }
139
 
140
  /**
@@ -154,7 +152,7 @@ class MetaSeoOpenGraph
154
  $meta_fbdesc = $meta_desc_esc;
155
  }
156
 
157
- return $meta_fbdesc;
158
  }
159
 
160
  /**
@@ -197,7 +195,7 @@ class MetaSeoOpenGraph
197
  $meta_twtitle = $meta_title_esc;
198
  }
199
 
200
- return $meta_twtitle;
201
  }
202
 
203
  /**
@@ -218,7 +216,7 @@ class MetaSeoOpenGraph
218
  $meta_twdesc = $meta_desc_esc;
219
  }
220
 
221
- return $meta_twdesc;
222
  }
223
 
224
  /**
@@ -306,8 +304,8 @@ class MetaSeoOpenGraph
306
  $page_follow = get_post_meta($mpage_on_front, '_metaseo_metafollow', true);
307
  $page_index = get_post_meta($mpage_on_front, '_metaseo_metaindex', true);
308
  return array(
309
- 'title' => $title,
310
- 'desc' => $desc,
311
  'page_follow' => $page_follow,
312
  'page_index' => $page_index,
313
  );
@@ -359,8 +357,8 @@ class MetaSeoOpenGraph
359
  }
360
 
361
  return array(
362
- 'title' => $title,
363
- 'desc' => $desc,
364
  'keyword' => $meta_keywords_esc
365
  );
366
  }
43
  $meta_title = $post->post_title;
44
  }
45
 
46
+ return esc_html($meta_title);
47
  }
48
 
49
  /**
63
  }
64
  }
65
 
66
+ return esc_html($meta_title_esc);
67
  }
68
 
69
  /**
79
  $meta_keywords = get_post_meta($id, '_metaseo_metakeywords', true);
80
  $keywords = esc_attr($meta_keywords);
81
  }
82
+ return esc_html($keywords);
83
  }
84
 
85
  /**
91
  */
92
  public function getDesc($settings, $id, $content)
93
  {
94
+ $meta_desc_esc = get_post_meta($id, '_metaseo_metadesc', true);
95
+ if ($meta_desc_esc != maybe_unserialize($meta_desc_esc)) {
96
+ $meta_desc_esc = '';
97
  }
98
 
99
+ if ($meta_desc_esc == '') {
100
  $content = strip_shortcodes($content);
101
  $content = trim(strip_tags($content));
102
  if (strlen($content) > MPMSCAT_DESC_LENGTH) {
103
+ $meta_desc_esc = substr($content, 0, 316) . ' ...';
104
  } else {
105
+ $meta_desc_esc = $content;
106
  }
107
  }
108
 
 
 
109
  if (get_post_meta($id, '_metaseo_metadesc', true) == '' && is_front_page()) {
110
  $meta_desc_esc = esc_attr($settings['metaseo_desc_home']);
111
  if ($meta_desc_esc != maybe_unserialize($meta_desc_esc)) {
112
  $meta_desc_esc = '';
113
  }
114
  }
115
+ return esc_html($meta_desc_esc);
116
  }
117
 
118
  /**
132
  $meta_fbtitle = $meta_title_esc;
133
  }
134
 
135
+ return esc_html($meta_fbtitle);
136
  }
137
 
138
  /**
152
  $meta_fbdesc = $meta_desc_esc;
153
  }
154
 
155
+ return esc_html($meta_fbdesc);
156
  }
157
 
158
  /**
195
  $meta_twtitle = $meta_title_esc;
196
  }
197
 
198
+ return esc_html($meta_twtitle);
199
  }
200
 
201
  /**
216
  $meta_twdesc = $meta_desc_esc;
217
  }
218
 
219
+ return esc_html($meta_twdesc);
220
  }
221
 
222
  /**
304
  $page_follow = get_post_meta($mpage_on_front, '_metaseo_metafollow', true);
305
  $page_index = get_post_meta($mpage_on_front, '_metaseo_metaindex', true);
306
  return array(
307
+ 'title' => esc_html($title),
308
+ 'desc' => esc_html($desc),
309
  'page_follow' => $page_follow,
310
  'page_index' => $page_index,
311
  );
357
  }
358
 
359
  return array(
360
+ 'title' => esc_html($title),
361
+ 'desc' => esc_html($desc),
362
  'keyword' => $meta_keywords_esc
363
  );
364
  }
inc/class.metaseo-snippet-preview.php CHANGED
@@ -116,11 +116,13 @@ class WPMSEOSnippetPreview
116
  protected function setSlug()
117
  {
118
  $frontpage_post_id = (int)(get_option('page_on_front'));
119
-
120
  if (is_object($this->post) && isset($this->post->post_name) && $this->post->post_name !== ''
121
  && $this->post->ID !== $frontpage_post_id) {
122
  $this->slug = sanitize_title($this->title);
123
- $this->url .= esc_html($this->slug);
 
 
124
  }
125
  }
126
 
116
  protected function setSlug()
117
  {
118
  $frontpage_post_id = (int)(get_option('page_on_front'));
119
+ $permalink_structure = get_option('permalink_structure');
120
  if (is_object($this->post) && isset($this->post->post_name) && $this->post->post_name !== ''
121
  && $this->post->ID !== $frontpage_post_id) {
122
  $this->slug = sanitize_title($this->title);
123
+ if (!empty($permalink_structure)) {
124
+ $this->url .= esc_html($this->slug);
125
+ }
126
  }
127
  }
128
 
inc/pages/content-meta.php CHANGED
@@ -62,7 +62,7 @@ if (!empty($_REQUEST['_wp_http_referer'])) {
62
  });
63
 
64
  $('.metaseo-metatitle').bind('input propertychange', function () {
65
- metaseo_titlelength(this.id, false);
66
  });
67
 
68
  $('.metaseo-metatitle').blur(function () {
62
  });
63
 
64
  $('.metaseo-metatitle').bind('input propertychange', function () {
65
+ metaseo_titlelength(this.id, true);
66
  });
67
 
68
  $('.metaseo-metatitle').blur(function () {
inc/pages/sitemaps/metaseo-google-sitemap.php CHANGED
@@ -51,5 +51,12 @@ $w = '99%';
51
  $text = __('Bring your WordPress website SEO to the next level with the PRO Addon:
52
  Sitemap for any custom post type, auto submission to the Google Search Console and more!', 'wp-meta-seo');
53
  $class_btn_close = 'close_sitemap';
54
- require_once(WPMETASEO_PLUGIN_DIR . 'inc/pages/notification.php');
55
- ?>
 
 
 
 
 
 
 
51
  $text = __('Bring your WordPress website SEO to the next level with the PRO Addon:
52
  Sitemap for any custom post type, auto submission to the Google Search Console and more!', 'wp-meta-seo');
53
  $class_btn_close = 'close_sitemap';
54
+ if (!empty($_COOKIE['close_dashboard'])) {
55
+ $check = time() - (int)$_COOKIE['close_dashboard'];
56
+ $month = 30 * 24 * 60 * 60;
57
+ }
58
+
59
+ if ((empty($_COOKIE['close_dashboard']) || (!empty($_COOKIE['close_dashboard']) && $check >= $month))
60
+ && !is_plugin_active(WPMSEO_ADDON_FILENAME)) {
61
+ require_once(WPMETASEO_PLUGIN_DIR . 'inc/pages/notification.php');
62
+ }
inc/pages/sitemaps/metaseo-source_posts.php CHANGED
@@ -74,18 +74,18 @@
74
  echo '<div class="wpms_row"><h3>';
75
  echo '<div class="pure-checkbox">';
76
  echo '<input for="' . $desclink_category_remove . '"
77
- class="sitemap_addlink_categories" id="sitemap_addlink_categories"
78
  type="checkbox" value="' . $post->cat_ID . '" checked>';
79
- echo '<label for="sitemap_addlink_categories">' . $post->cat_name . '</label>';
80
  echo '</div>';
81
  echo '</h3></div>';
82
  } else {
83
  echo '<div class="wpms_row"><h3>';
84
  echo '<div class="pure-checkbox">';
85
  echo '<input for="' . $desclink_category_remove . '"
86
- class="sitemap_addlink_categories" id="sitemap_addlink_categories"
87
  type="checkbox" value="' . $post->cat_ID . '">';
88
- echo '<label for="sitemap_addlink_categories">' . $post->cat_name . '</label>';
89
  echo '</div>';
90
  echo '</h3></div>';
91
  }
74
  echo '<div class="wpms_row"><h3>';
75
  echo '<div class="pure-checkbox">';
76
  echo '<input for="' . $desclink_category_remove . '"
77
+ class="sitemap_addlink_categories" id="sitemap_addlink_categories_' . $post->cat_ID . '"
78
  type="checkbox" value="' . $post->cat_ID . '" checked>';
79
+ echo '<label for="sitemap_addlink_categories_' . $post->cat_ID . '">' . $post->cat_name . '</label>';
80
  echo '</div>';
81
  echo '</h3></div>';
82
  } else {
83
  echo '<div class="wpms_row"><h3>';
84
  echo '<div class="pure-checkbox">';
85
  echo '<input for="' . $desclink_category_remove . '"
86
+ class="sitemap_addlink_categories" id="sitemap_addlink_categories_' . $post->cat_ID . '"
87
  type="checkbox" value="' . $post->cat_ID . '">';
88
+ echo '<label for="sitemap_addlink_categories_' . $post->cat_ID . '">' . $post->cat_name . '</label>';
89
  echo '</div>';
90
  echo '</h3></div>';
91
  }
languages/wp-meta-seo-en_US.mo CHANGED
Binary file
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  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, redirect, redirection, 301, broken link
4
  Requires at least: 4.0
5
- Tested up to: 4.9.5
6
- Stable tag: 3.7.0
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -276,6 +276,11 @@ Yes WP Meta SEO is compatible with Gutenberg editor since 3.7 version.
276
 
277
  == Changelog ==
278
 
 
 
 
 
 
279
  = 3.7.0 =
280
  * Add : Compatible with Gutemberg editor
281
  * Fix : Reload analysis in metabox
2
  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, redirect, redirection, 301, broken link
4
  Requires at least: 4.0
5
+ Tested up to: 4.9.6
6
+ Stable tag: 3.7.1
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
276
 
277
  == Changelog ==
278
 
279
+ = 3.7.1 =
280
+ * Fix : Sitemap categories not properly added
281
+ * Fix : Broken link display column header
282
+ * Fix : Render meta description on frontend
283
+
284
  = 3.7.0 =
285
  * Add : Compatible with Gutemberg editor
286
  * Fix : Reload analysis in metabox
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: 3.7.0
8
  * Text Domain: wp-meta-seo
9
  * Domain Path: /languages
10
  * Author: JoomUnited
@@ -99,7 +99,7 @@ if (!defined('WPMSEO_VERSION')) {
99
  /**
100
  * plugin version
101
  */
102
- define('WPMSEO_VERSION', '3.7.0');
103
  }
104
 
105
  if (!defined('WPMS_CLIENTID')) {
@@ -429,7 +429,7 @@ if (is_admin()) {
429
  } else {
430
  $id = $wp_query->post->ID;
431
  }
432
- $settings = get_option('_metaseo_settings');
433
  $opengraph = new MetaSeoOpenGraph();
434
  $meta_title = $opengraph->getTitle($is_shop, $id);
435
 
@@ -654,6 +654,7 @@ function wpmsTemplateRedirect()
654
  'wpms_page_redirected' => 'none'
655
  );
656
  $wpms_settings_404 = get_option('wpms_settings_404');
 
657
  if (is_array($wpms_settings_404)) {
658
  $defaul_settings_404 = array_merge($defaul_settings_404, $wpms_settings_404);
659
  }
@@ -703,30 +704,30 @@ function wpmsTemplateRedirect()
703
  // redirect by rule
704
  if (is_plugin_active(WPMSEO_ADDON_FILENAME)) {
705
  $url = $_SERVER['REQUEST_URI'];
706
- $matches = false;
707
- $all_links = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "wpms_links");
708
- $target = '';
709
- $status_redirect = 302;
710
- foreach ($all_links as $link) {
711
- if ($link->link_url == '/') {
712
- continue;
713
- }
714
- $link->link_url = str_replace('/*', '/(.*)', $link->link_url);
715
- if ((@preg_match('@' . str_replace('@', '\\@', $link->link_url) . '@', $url, $matches) > 0) || (@preg_match('@' . str_replace('@', '\\@', $link->link_url) . '@', urldecode($url), $matches) > 0)) { // Check if our match wants this URL
716
- $target = $link->link_url_redirect;
717
- if ($link->type == 'add_custom') {
718
- $status_redirect = $link->meta_title;
 
719
  }
720
- break;
721
  }
722
- }
723
 
724
- if (!empty($target)) {
725
- if (empty($status_redirect)) {
726
- $status_redirect = 302;
 
 
 
727
  }
728
- wp_redirect($target, $status_redirect);
729
- exit();
730
  }
731
  }
732
  }
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: 3.7.1
8
  * Text Domain: wp-meta-seo
9
  * Domain Path: /languages
10
  * Author: JoomUnited
99
  /**
100
  * plugin version
101
  */
102
+ define('WPMSEO_VERSION', '3.7.1');
103
  }
104
 
105
  if (!defined('WPMS_CLIENTID')) {
429
  } else {
430
  $id = $wp_query->post->ID;
431
  }
432
+
433
  $opengraph = new MetaSeoOpenGraph();
434
  $meta_title = $opengraph->getTitle($is_shop, $id);
435
 
654
  'wpms_page_redirected' => 'none'
655
  );
656
  $wpms_settings_404 = get_option('wpms_settings_404');
657
+
658
  if (is_array($wpms_settings_404)) {
659
  $defaul_settings_404 = array_merge($defaul_settings_404, $wpms_settings_404);
660
  }
704
  // redirect by rule
705
  if (is_plugin_active(WPMSEO_ADDON_FILENAME)) {
706
  $url = $_SERVER['REQUEST_URI'];
707
+ if ($url != '/') {
708
+ $matches = false;
709
+ $sql = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "wpms_links WHERE link_url != %s AND link_url LIKE %s", array('/', '%' .$url. '%'));
710
+ $all_links = $wpdb->get_results($sql);
711
+ $target = '';
712
+ $status_redirect = 302;
713
+ foreach ($all_links as $link) {
714
+ $link->link_url = str_replace('/*', '/(.*)', $link->link_url);
715
+ if ((@preg_match('@' . str_replace('@', '\\@', $link->link_url) . '@', $url, $matches) > 0) || (@preg_match('@' . str_replace('@', '\\@', $link->link_url) . '@', urldecode($url), $matches) > 0)) { // Check if our match wants this URL
716
+ $target = $link->link_url_redirect;
717
+ if ($link->type == 'add_custom') {
718
+ $status_redirect = $link->meta_title;
719
+ }
720
+ break;
721
  }
 
722
  }
 
723
 
724
+ if (!empty($target)) {
725
+ if (empty($status_redirect)) {
726
+ $status_redirect = 302;
727
+ }
728
+ wp_redirect($target, $status_redirect);
729
+ exit();
730
  }
 
 
731
  }
732
  }
733
  }