WP Meta SEO - Version 3.5.3

Version Description

  • Fix : Display WordPress page with sitemap
  • Fix : Set default image for facebook and Twitter
  • Fix : Return error when using undefined get_term_meta function
Download this release

Release Info

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

Code changes from version 3.5.2 to 3.5.3

inc/class.metaseo-admin.php CHANGED
@@ -1857,6 +1857,7 @@ class MetaSeo_Admin {
1857
  $local_business = array(
1858
  "enable" => 0,
1859
  "logo" => "",
 
1860
  "country" => "",
1861
  "address" => "",
1862
  "city" => "",
1857
  $local_business = array(
1858
  "enable" => 0,
1859
  "logo" => "",
1860
+ "type_name" => "",
1861
  "country" => "",
1862
  "address" => "",
1863
  "city" => "",
inc/class.metaseo-metabox.php CHANGED
@@ -350,7 +350,7 @@ class WPMSEO_Metabox extends WPMSEO_Meta {
350
  $this->do_tab('general', __('General', 'wp-meta-seo'), $content);
351
  if(is_plugin_active(WPMSEO_ADDON_FILENAME)){
352
  if($check_connected){
353
- apply_filters('wpmsaddon_google_search_keywords' , '' ,$post->post_content,$service);
354
  }
355
  }
356
 
350
  $this->do_tab('general', __('General', 'wp-meta-seo'), $content);
351
  if(is_plugin_active(WPMSEO_ADDON_FILENAME)){
352
  if($check_connected){
353
+ echo apply_filters('wpmsaddon_google_search_keywords' , '' ,$post->post_content,$service);
354
  }
355
  }
356
 
inc/class.metaseo-sitemap.php CHANGED
@@ -902,18 +902,17 @@ class MetaSeo_Sitemap {
902
  /* display sitemap customUrl by column in front-end */
903
  public function wpms_display_column_customUrl() {
904
  $html = '';
905
- $html .= '<div id="sitemap_customUrl" class="wpms_sitemap_customUrl">';
906
- if (!empty($this->settings_sitemap['wpms_public_name_customUrl'])) {
907
- $publictitle = $this->settings_sitemap['wpms_public_name_customUrl'];
908
- }else{
909
- $publictitle = __('Custom Url' , 'wp-meta-seo');
910
- }
911
- $html .= '<h4>' . $publictitle . '</h4>';
912
- $html .= '<ul>';
913
-
914
  $lists = $this->settings_sitemap['wpms_sitemap_customUrl'];
915
  $links = get_option('wpms_customUrls_list');
916
  if(!empty($lists)){
 
 
 
 
 
 
 
 
917
  foreach ($lists as $key => $list) {
918
  if(!empty($links[$key])){
919
  $html .= "<li>";
@@ -921,11 +920,10 @@ class MetaSeo_Sitemap {
921
  $html .= "</li>";
922
  }
923
  }
 
 
924
  }
925
 
926
- $html .= '</ul></div>';
927
- $html .= '<div class="holder holder_sitemaps_customUrl"></div>';
928
-
929
  return $html;
930
  }
931
 
@@ -979,14 +977,13 @@ class MetaSeo_Sitemap {
979
  $postTitle = $postTitle->label;
980
  }
981
 
982
- $html .= '<div id="sitemap_posts" class="wpms_sitemap_posts"><h4>';
983
- $html .= $postTitle;
984
- $html .= '</h4><ul>';
985
-
986
  global $wpdb;
987
  $taxonomy_objects = get_object_taxonomies($post_type, 'names');
988
  $ids = array(0);
989
  if (!empty($this->settings_sitemap['wpms_sitemap_' . $post_type])) {
 
 
 
990
  foreach ((array)$this->settings_sitemap['wpms_sitemap_' . $post_type] as $k => $v) {
991
  if (!empty($v['post_id'])) {
992
  $ids[] = $k;
@@ -1029,7 +1026,10 @@ ORDER BY p.post_date DESC";
1029
  }
1030
  }
1031
  }
1032
- $html .= '</ul></div>';
 
 
 
1033
 
1034
  //======================================================================================
1035
  }
@@ -1074,8 +1074,6 @@ ORDER BY p.post_date DESC";
1074
  }
1075
  }
1076
 
1077
-
1078
-
1079
  $html .= '</div>';
1080
  }
1081
 
902
  /* display sitemap customUrl by column in front-end */
903
  public function wpms_display_column_customUrl() {
904
  $html = '';
 
 
 
 
 
 
 
 
 
905
  $lists = $this->settings_sitemap['wpms_sitemap_customUrl'];
906
  $links = get_option('wpms_customUrls_list');
907
  if(!empty($lists)){
908
+ $html .= '<div id="sitemap_customUrl" class="wpms_sitemap_customUrl">';
909
+ if (!empty($this->settings_sitemap['wpms_public_name_customUrl'])) {
910
+ $publictitle = $this->settings_sitemap['wpms_public_name_customUrl'];
911
+ }else{
912
+ $publictitle = __('Custom Url' , 'wp-meta-seo');
913
+ }
914
+ $html .= '<h4>' . $publictitle . '</h4>';
915
+ $html .= '<ul>';
916
  foreach ($lists as $key => $list) {
917
  if(!empty($links[$key])){
918
  $html .= "<li>";
920
  $html .= "</li>";
921
  }
922
  }
923
+ $html .= '</ul></div>';
924
+ $html .= '<div class="holder holder_sitemaps_customUrl"></div>';
925
  }
926
 
 
 
 
927
  return $html;
928
  }
929
 
977
  $postTitle = $postTitle->label;
978
  }
979
 
 
 
 
 
980
  global $wpdb;
981
  $taxonomy_objects = get_object_taxonomies($post_type, 'names');
982
  $ids = array(0);
983
  if (!empty($this->settings_sitemap['wpms_sitemap_' . $post_type])) {
984
+ $html .= '<div id="sitemap_posts" class="wpms_sitemap_posts"><h4>';
985
+ $html .= $postTitle;
986
+ $html .= '</h4><ul>';
987
  foreach ((array)$this->settings_sitemap['wpms_sitemap_' . $post_type] as $k => $v) {
988
  if (!empty($v['post_id'])) {
989
  $ids[] = $k;
1026
  }
1027
  }
1028
  }
1029
+
1030
+ if (!empty($this->settings_sitemap['wpms_sitemap_' . $post_type])) {
1031
+ $html .= '</ul></div>';
1032
+ }
1033
 
1034
  //======================================================================================
1035
  }
1074
  }
1075
  }
1076
 
 
 
1077
  $html .= '</div>';
1078
  }
1079
 
inc/pages/settings.php CHANGED
@@ -353,6 +353,7 @@ wp_enqueue_script('jquery-qtip');
353
  action : 'wpms_save_local_business',
354
  enable : enable,
355
  logo : $('#wpms_local_business_logo').val(),
 
356
  country : $('#wpms_local_business_country').val(),
357
  address : $('#wpms_local_business_address').val(),
358
  city : $('#wpms_local_business_city').val(),
353
  action : 'wpms_save_local_business',
354
  enable : enable,
355
  logo : $('#wpms_local_business_logo').val(),
356
+ type_name : $('#wpms_local_business_type_name').val(),
357
  country : $('#wpms_local_business_country').val(),
358
  address : $('#wpms_local_business_address').val(),
359
  city : $('#wpms_local_business_city').val(),
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.8.1
6
- Stable tag: 3.5.2
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -272,6 +272,11 @@ It could be! if you have a lot of pages that need to be indexed with no specific
272
 
273
  == Changelog ==
274
 
 
 
 
 
 
275
  = 3.5.2 =
276
  * Fix : Create robots.txt file for multisite
277
  * Fix : Add meta tags og:type and fb:app_id (Facebook page share)
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.8.3
6
+ Stable tag: 3.5.3
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
272
 
273
  == Changelog ==
274
 
275
+ = 3.5.3 =
276
+ * Fix : Display WordPress page with sitemap
277
+ * Fix : Set default image for facebook and Twitter
278
+ * Fix : Return error when using undefined get_term_meta function
279
+
280
  = 3.5.2 =
281
  * Fix : Create robots.txt file for multisite
282
  * Fix : Add meta tags og:type and fb:app_id (Facebook page share)
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.5.2
8
  * Text Domain: wp-meta-seo
9
  * Domain Path: /languages
10
  * Author: JoomUnited
@@ -75,7 +75,7 @@ if (!defined('URL'))
75
  define('URL', get_site_url());
76
 
77
  if (!defined('WPMSEO_VERSION')) {
78
- define('WPMSEO_VERSION', '3.5.2');
79
  }
80
 
81
  if (!defined('WPMS_CLIENTID')) {
@@ -285,6 +285,15 @@ if (is_admin()) {
285
  $meta_facebook_desc = $meta_description_esc;
286
  $meta_facebook_image = get_post_meta($wp_query->post->ID, '_metaseo_metaopengraph-image', true);
287
 
 
 
 
 
 
 
 
 
 
288
  // check homepage is latest post
289
  if (is_home()) {
290
  if ($mshow_on_front == 'posts') {
@@ -322,32 +331,51 @@ if (is_admin()) {
322
  $page_index = get_post_meta($mpage_on_front, '_metaseo_metaindex', true);
323
  }
324
 
 
325
  if (is_category() || is_tag() || is_tax()) {
326
  $term = $wp_query->get_queried_object();
327
- $cat_metatitle = get_term_meta($term->term_id,'wpms_category_metatitle',true);
328
- $cat_metadesc = get_term_meta($term->term_id,'wpms_category_metadesc',true);
 
 
 
 
 
 
329
 
330
- if (isset($settings['metaseo_showkeywords']) && $settings['metaseo_showkeywords'] == 1) {
331
- $meta_keywords = get_term_meta($term->term_id,'wpms_category_metakeywords',true);
332
- $meta_keywords_esc = esc_attr($meta_keywords);
333
- } else {
334
- $meta_keywords_esc = '';
335
- }
336
- if(isset($cat_metatitle) && $cat_metatitle != ''){
337
- $meta_title = $meta_title_esc = $meta_facebook_title = $meta_twitter_title = esc_attr($cat_metatitle);
338
- }else{
339
- $meta_title = $meta_title_esc = $meta_facebook_title = $meta_twitter_title = esc_attr($term->name);
340
- }
341
 
342
- if(isset($cat_metadesc) && $cat_metadesc != ''){
343
- $meta_description_esc = $meta_facebook_desc = $meta_twitter_desc = esc_attr($cat_metadesc);
344
- }else{
345
- $meta_description_esc = $meta_facebook_desc = $meta_twitter_desc = esc_attr($term->description);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
346
  }
347
 
348
  $page_follow = 'follow';
349
  }
350
 
 
351
  $current_url = 'http' . (isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) ? 's' : '') . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
352
  $current_url = esc_url($current_url);
353
 
@@ -740,6 +768,9 @@ function wpms_template_redirect() {
740
  $target = '';
741
  $status_redirect = 302;
742
  foreach ($all_links as $link){
 
 
 
743
  $link->link_url = str_replace('/*','/(.*)',$link->link_url);
744
  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
745
  $target = $link->link_url_redirect;
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.5.3
8
  * Text Domain: wp-meta-seo
9
  * Domain Path: /languages
10
  * Author: JoomUnited
75
  define('URL', get_site_url());
76
 
77
  if (!defined('WPMSEO_VERSION')) {
78
+ define('WPMSEO_VERSION', '3.5.3');
79
  }
80
 
81
  if (!defined('WPMS_CLIENTID')) {
285
  $meta_facebook_desc = $meta_description_esc;
286
  $meta_facebook_image = get_post_meta($wp_query->post->ID, '_metaseo_metaopengraph-image', true);
287
 
288
+ $default_image = wp_get_attachment_image_src(get_post_thumbnail_id(1), 'single-post-thumbnail');
289
+ if (empty($meta_twitter_image) && isset($default_image[0])) {
290
+ $meta_twitter_image = $default_image[0];
291
+ }
292
+
293
+ if (empty($meta_facebook_image) && isset($default_image[0])) {
294
+ $meta_facebook_image = $default_image[0];
295
+ }
296
+
297
  // check homepage is latest post
298
  if (is_home()) {
299
  if ($mshow_on_front == 'posts') {
331
  $page_index = get_post_meta($mpage_on_front, '_metaseo_metaindex', true);
332
  }
333
 
334
+
335
  if (is_category() || is_tag() || is_tax()) {
336
  $term = $wp_query->get_queried_object();
337
+ if (is_object($term) && !empty($term)) {
338
+ if(function_exists('get_term_meta')){
339
+ $cat_metatitle = get_term_meta($term->term_id,'wpms_category_metatitle',true);
340
+ $cat_metadesc = get_term_meta($term->term_id,'wpms_category_metadesc',true);
341
+ }else{
342
+ $cat_metatitle = get_metadata( 'term', $term->term_id, 'wpms_category_metatitle', true );
343
+ $cat_metadesc = get_metadata( 'term', $term->term_id, 'wpms_category_metadesc', true );
344
+ }
345
 
 
 
 
 
 
 
 
 
 
 
 
346
 
347
+ if (isset($settings['metaseo_showkeywords']) && $settings['metaseo_showkeywords'] == 1) {
348
+ if(function_exists('get_term_meta')){
349
+ $meta_keywords = get_term_meta($term->term_id,'wpms_category_metakeywords',true);
350
+ }else{
351
+ $meta_keywords = get_metadata( 'term', $term->term_id, 'wpms_category_metakeywords', true );
352
+ }
353
+
354
+ $meta_keywords_esc = esc_attr($meta_keywords);
355
+ } else {
356
+ $meta_keywords_esc = '';
357
+ }
358
+
359
+ if(isset($cat_metatitle) && $cat_metatitle != ''){
360
+ $meta_title = $meta_title_esc = $meta_facebook_title = $meta_twitter_title = esc_attr($cat_metatitle);
361
+ }else{
362
+ $meta_title = $meta_title_esc = $meta_facebook_title = $meta_twitter_title = esc_attr($term->name);
363
+ }
364
+
365
+ if(isset($cat_metadesc) && $cat_metadesc != ''){
366
+ $meta_description_esc = $meta_facebook_desc = $meta_twitter_desc = esc_attr($cat_metadesc);
367
+ }else{
368
+ $meta_description_esc = $meta_facebook_desc = $meta_twitter_desc = esc_attr($term->description);
369
+ }
370
+ } else {
371
+ $meta_title = $meta_title_esc = $meta_facebook_title = $meta_twitter_title = '';
372
+ $meta_description_esc = $meta_facebook_desc = $meta_twitter_desc = '';
373
  }
374
 
375
  $page_follow = 'follow';
376
  }
377
 
378
+
379
  $current_url = 'http' . (isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) ? 's' : '') . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
380
  $current_url = esc_url($current_url);
381
 
768
  $target = '';
769
  $status_redirect = 302;
770
  foreach ($all_links as $link){
771
+ if ($link->link_url == '/') {
772
+ continue;
773
+ }
774
  $link->link_url = str_replace('/*','/(.*)',$link->link_url);
775
  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
776
  $target = $link->link_url_redirect;