WP Meta SEO - Version 3.5.1

Version Description

  • Language filter for meta, images and sitemap XML
  • Fix : Encoding issue on dashboard page
  • Fix : JS error when empty post content
Download this release

Release Info

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

Code changes from version 3.5.0 to 3.5.1

css/metaseo_sitemap.css CHANGED
@@ -51,4 +51,13 @@
51
 
52
  a:active {
53
  outline: 0px dashed red;
 
 
 
 
 
 
 
 
 
54
  }
51
 
52
  a:active {
53
  outline: 0px dashed red;
54
+ }
55
+
56
+ .wpmsleft{
57
+ float: left;
58
+ }
59
+
60
+ .wpms_langcheckbox{
61
+ line-height: 28px;
62
+ vertical-align: middle;
63
  }
css/style.css CHANGED
@@ -1,15 +1,8 @@
1
  .search-box{padding: 0px 0px 20px 0px; float: left}
2
  .img_advan{border: #CCC 1px solid;border-radius: 0px 30px 30px 0px}
3
  .listpre img{float: left; padding: 5px}
4
- .listpre:hover>.show-popup{display: block;}
5
 
6
- a.show-popup {
7
- display: none;
8
- margin:10px 0 0 0;
9
- float:left;
10
-
11
- }
12
- div.popup-bg {
13
  position:absolute;
14
  top:0;
15
  bottom:0;
@@ -19,14 +12,14 @@ div.popup-bg {
19
  background:#999;
20
  display:none;
21
  }
22
- div.popup {
23
  border-radius:2px;
24
  z-index:999;
25
  display:none;
26
  background:#FFF;
27
  overflow: auto;
28
  }
29
- div.popup-header {
30
  position:relative;
31
  float:left;
32
  width:1000px;
@@ -34,14 +27,14 @@ div.popup-header {
34
  background:#FF9933;
35
  }
36
 
37
- .popup-header .pop-title{
38
  background: #FFF;
39
  padding: 6px 0px 0px 15px;
40
  color:#555!important;
41
  margin:0;
42
  font-size:16px;
43
  }
44
- span.popup-close {
45
  cursor:pointer;
46
  color: #555;
47
  font-weight: bold;
@@ -50,10 +43,10 @@ span.popup-close {
50
  right:10px;
51
  z-index:9999;
52
  }
53
- div.popup-content .content-header{
54
- color:#666;margin:0;padding: 10px 10px 12px 14px;background: #fffeee
55
  }
56
- div.popup-content .content-box{
57
  /*width:980px;*/
58
  min-height:250px;
59
  overflow: auto;
@@ -61,6 +54,7 @@ div.popup-content .content-box{
61
  position: relative;
62
  }
63
 
 
64
  span.spinner-light{
65
  background: url("../../../../wp-admin/images/wpspin_light.gif") no-repeat scroll 0 0 / 16px 16px rgba(0, 0, 0, 0);
66
  background-size: 16px 16px;
@@ -297,4 +291,8 @@ span.hz-loading{
297
 
298
  #filter-by-flush{
299
  margin-left: 5px;
 
 
 
 
300
  }
1
  .search-box{padding: 0px 0px 20px 0px; float: left}
2
  .img_advan{border: #CCC 1px solid;border-radius: 0px 30px 30px 0px}
3
  .listpre img{float: left; padding: 5px}
 
4
 
5
+ .metaseo_images div.popup-bg {
 
 
 
 
 
 
6
  position:absolute;
7
  top:0;
8
  bottom:0;
12
  background:#999;
13
  display:none;
14
  }
15
+ .metaseo_images div.popup {
16
  border-radius:2px;
17
  z-index:999;
18
  display:none;
19
  background:#FFF;
20
  overflow: auto;
21
  }
22
+ .metaseo_images div.popup-header {
23
  position:relative;
24
  float:left;
25
  width:1000px;
27
  background:#FF9933;
28
  }
29
 
30
+ .metaseo_images .popup-header .pop-title{
31
  background: #FFF;
32
  padding: 6px 0px 0px 15px;
33
  color:#555!important;
34
  margin:0;
35
  font-size:16px;
36
  }
37
+ .metaseo_images span.popup-close {
38
  cursor:pointer;
39
  color: #555;
40
  font-weight: bold;
43
  right:10px;
44
  z-index:9999;
45
  }
46
+ .metaseo_images div.popup-content .content-header{
47
+ color:#666;margin:0;padding: 10px 10px 12px 14px;background: #fffeee
48
  }
49
+ .metaseo_images div.popup-content .content-box{
50
  /*width:980px;*/
51
  min-height:250px;
52
  overflow: auto;
54
  position: relative;
55
  }
56
 
57
+
58
  span.spinner-light{
59
  background: url("../../../../wp-admin/images/wpspin_light.gif") no-repeat scroll 0 0 / 16px 16px rgba(0, 0, 0, 0);
60
  background-size: 16px 16px;
291
 
292
  #filter-by-flush{
293
  margin-left: 5px;
294
+ }
295
+
296
+ .wpms_lang_list{
297
+ min-width: 200px;
298
  }
inc/class.metaseo-admin.php CHANGED
@@ -591,7 +591,7 @@ class MetaSeo_Admin {
591
  }
592
 
593
  // meta title filled
594
- if (($_POST['datas']['meta_title'] != '' && strlen($_POST['datas']['meta_title']) <= self::$title_length)) {
595
  $output .= $this->metaseo_create_field('metatitle', $tooltip_page['meta_title'], 'done', __('Meta title filled', 'wp-meta-seo'), 1);
596
  $check++;
597
  } else {
@@ -599,7 +599,7 @@ class MetaSeo_Admin {
599
  }
600
 
601
  // desc filled
602
- if (($_POST['datas']['meta_desc'] != '' && strlen($_POST['datas']['meta_desc']) <= self::$desc_length)) {
603
  $output .= $this->metaseo_create_field('metadesc', $tooltip_page['meta_desc'], 'done', __('Meta description filled', 'wp-meta-seo'), 1);
604
  $check++;
605
  } else {
@@ -1250,7 +1250,7 @@ class MetaSeo_Admin {
1250
  'wpmetaseoAdmin', plugins_url('js/metaseo_admin.js', dirname(__FILE__)), array('jquery'), WPMSEO_VERSION, true
1251
  );
1252
 
1253
- if(in_array($current_screen->base, $array_menu) || $pagenow == 'post.php'){
1254
  wp_enqueue_style('wpmetaseoAdmin', plugins_url('css/metaseo_admin.css', dirname(__FILE__)), array(), WPMSEO_VERSION);
1255
  wp_enqueue_style('tooltip-metaimage', plugins_url('/css/tooltip-metaimage.css', dirname(__FILE__)), array(), WPMSEO_VERSION);
1256
  wp_enqueue_style('style', plugins_url('/css/style.css', dirname(__FILE__)), array(), WPMSEO_VERSION);
@@ -1760,6 +1760,18 @@ class MetaSeo_Admin {
1760
  require_once( WPMETASEO_PLUGIN_DIR . 'inc/pages/notification.php' );
1761
  break;
1762
  case 'metaseo_google_sitemap':
 
 
 
 
 
 
 
 
 
 
 
 
1763
  if (!class_exists('MetaSeo_Content_List_Table')) {
1764
  require_once( WPMETASEO_PLUGIN_DIR . '/inc/class.metaseo-sitemap.php' );
1765
  }
591
  }
592
 
593
  // meta title filled
594
+ if (($_POST['datas']['meta_title'] != '' && mb_strlen($_POST['datas']['meta_title'],'UTF-8') <= self::$title_length)) {
595
  $output .= $this->metaseo_create_field('metatitle', $tooltip_page['meta_title'], 'done', __('Meta title filled', 'wp-meta-seo'), 1);
596
  $check++;
597
  } else {
599
  }
600
 
601
  // desc filled
602
+ if (($_POST['datas']['meta_desc'] != '' && mb_strlen($_POST['datas']['meta_desc'],'UTF-8') <= self::$desc_length)) {
603
  $output .= $this->metaseo_create_field('metadesc', $tooltip_page['meta_desc'], 'done', __('Meta description filled', 'wp-meta-seo'), 1);
604
  $check++;
605
  } else {
1250
  'wpmetaseoAdmin', plugins_url('js/metaseo_admin.js', dirname(__FILE__)), array('jquery'), WPMSEO_VERSION, true
1251
  );
1252
 
1253
+ if(in_array($current_screen->base, $array_menu) || $pagenow == 'post.php' || $pagenow == 'post-new.php'){
1254
  wp_enqueue_style('wpmetaseoAdmin', plugins_url('css/metaseo_admin.css', dirname(__FILE__)), array(), WPMSEO_VERSION);
1255
  wp_enqueue_style('tooltip-metaimage', plugins_url('/css/tooltip-metaimage.css', dirname(__FILE__)), array(), WPMSEO_VERSION);
1256
  wp_enqueue_style('style', plugins_url('/css/style.css', dirname(__FILE__)), array(), WPMSEO_VERSION);
1760
  require_once( WPMETASEO_PLUGIN_DIR . 'inc/pages/notification.php' );
1761
  break;
1762
  case 'metaseo_google_sitemap':
1763
+ if(is_plugin_active(WPMSEO_ADDON_FILENAME)) {
1764
+ // remove filter by lang
1765
+ if (is_plugin_active('sitepress-multilingual-cms/sitepress.php')) {
1766
+ global $sitepress;
1767
+ remove_filter('terms_clauses', array($sitepress,'terms_clauses'));
1768
+ }elseif(is_plugin_active('polylang/polylang.php')){
1769
+ global $polylang;
1770
+ $filters_term = $polylang->filters_term;
1771
+ remove_filter('terms_clauses', array($filters_term, 'terms_clauses'));
1772
+ }
1773
+ }
1774
+
1775
  if (!class_exists('MetaSeo_Content_List_Table')) {
1776
  require_once( WPMETASEO_PLUGIN_DIR . '/inc/class.metaseo-sitemap.php' );
1777
  }
inc/class.metaseo-content-list-table.php CHANGED
@@ -126,8 +126,15 @@ class MetaSeo_Content_List_Table extends WP_List_Table {
126
 
127
  echo sprintf('<select name="post_type_filter" class="metaseo-filter">%1$s</select>', $options);
128
  echo $sl_duplicate;
 
 
 
 
 
129
  echo '<input type="submit" name="do_filter" id="post-query-submit" class="wpmsbtn wpmsbtn_small wpmsbtn_secondary" value="'.__('Filter', 'wp-meta-seo').'">';
130
  echo $sl_bulk . $btn_bulk;
 
 
131
  echo "</div>";
132
  }
133
 
@@ -293,13 +300,30 @@ class MetaSeo_Content_List_Table extends WP_List_Table {
293
  . " FROM $wpdb->posts "
294
  . " LEFT JOIN (SELECT * FROM $wpdb->postmeta WHERE meta_key = '_metaseo_metatitle') mt ON mt.post_id = $wpdb->posts.ID "
295
  . " LEFT JOIN (SELECT * FROM $wpdb->postmeta WHERE meta_key = '_metaseo_metadesc') md ON md.post_id = $wpdb->posts.ID "
296
- . " LEFT JOIN (SELECT * FROM $wpdb->postmeta WHERE meta_key = '_metaseo_metakeywords') mk ON mk.post_id = $wpdb->posts.ID "
297
- . " WHERE " . implode(' AND ', $where) . $orderStr;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
298
  if (!empty($_REQUEST['metaseo_posts_per_page'])) {
299
  $_per_page = intval($_REQUEST['metaseo_posts_per_page']);
300
  } else {
301
  $_per_page = 0;
302
  }
 
303
  $per_page = get_user_option('metaseo_posts_per_page');
304
  if ($per_page !== false) {
305
  if ($_per_page && $_per_page !== $per_page) {
@@ -495,10 +519,10 @@ class MetaSeo_Content_List_Table extends WP_List_Table {
495
 
496
  $current_url = set_url_scheme('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
497
  $redirect = false;
498
-
499
  if (isset($_POST['do_filter'])) {
500
  $current_url = add_query_arg(array("post_type_filter" => $_POST['post_type_filter']), $current_url);
501
  $current_url = add_query_arg(array("wpms_duplicate_meta" => $_POST['wpms_duplicate_meta']), $current_url);
 
502
  $redirect = true;
503
  }
504
 
126
 
127
  echo sprintf('<select name="post_type_filter" class="metaseo-filter">%1$s</select>', $options);
128
  echo $sl_duplicate;
129
+ if(is_plugin_active(WPMSEO_ADDON_FILENAME) && (is_plugin_active('sitepress-multilingual-cms/sitepress.php') || is_plugin_active('polylang/polylang.php'))){
130
+ $lang = !empty($_REQUEST['wpms_lang_list']) ? $_REQUEST['wpms_lang_list'] : '0';
131
+ $sl_lang = apply_filters('wpms_get_languagesList','',$lang);
132
+ echo $sl_lang;
133
+ }
134
  echo '<input type="submit" name="do_filter" id="post-query-submit" class="wpmsbtn wpmsbtn_small wpmsbtn_secondary" value="'.__('Filter', 'wp-meta-seo').'">';
135
  echo $sl_bulk . $btn_bulk;
136
+
137
+
138
  echo "</div>";
139
  }
140
 
300
  . " FROM $wpdb->posts "
301
  . " LEFT JOIN (SELECT * FROM $wpdb->postmeta WHERE meta_key = '_metaseo_metatitle') mt ON mt.post_id = $wpdb->posts.ID "
302
  . " LEFT JOIN (SELECT * FROM $wpdb->postmeta WHERE meta_key = '_metaseo_metadesc') md ON md.post_id = $wpdb->posts.ID "
303
+ . " LEFT JOIN (SELECT * FROM $wpdb->postmeta WHERE meta_key = '_metaseo_metakeywords') mk ON mk.post_id = $wpdb->posts.ID ";
304
+ // query post by lang with polylang plugin
305
+ if(is_plugin_active(WPMSEO_ADDON_FILENAME) && is_plugin_active('polylang/polylang.php')){
306
+ if(isset($_GET['wpms_lang_list']) && $_GET['wpms_lang_list'] != '0'){
307
+ $query .= " INNER JOIN (SELECT * FROM $wpdb->term_relationships as ml INNER JOIN (SELECT * FROM $wpdb->terms WHERE slug='".$_GET['wpms_lang_list']."') mp ON mp.term_id = ml.term_taxonomy_id) ml ON ml.object_id = $wpdb->posts.ID ";
308
+ }
309
+ }
310
+
311
+ // query post by lang with WPML plugin
312
+ if(is_plugin_active(WPMSEO_ADDON_FILENAME) && is_plugin_active('sitepress-multilingual-cms/sitepress.php')){
313
+ if(isset($_GET['wpms_lang_list']) && $_GET['wpms_lang_list'] != '0'){
314
+ $query .= " INNER JOIN (SELECT * FROM ".$wpdb->prefix."icl_translations WHERE element_type LIKE 'post_%' AND language_code='".$_GET['wpms_lang_list']."') t ON t.element_id = $wpdb->posts.ID ";
315
+ }
316
+ }
317
+
318
+ $query .= " WHERE " . implode(' AND ', $where) . $orderStr;
319
+
320
+
321
  if (!empty($_REQUEST['metaseo_posts_per_page'])) {
322
  $_per_page = intval($_REQUEST['metaseo_posts_per_page']);
323
  } else {
324
  $_per_page = 0;
325
  }
326
+
327
  $per_page = get_user_option('metaseo_posts_per_page');
328
  if ($per_page !== false) {
329
  if ($_per_page && $_per_page !== $per_page) {
519
 
520
  $current_url = set_url_scheme('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
521
  $redirect = false;
 
522
  if (isset($_POST['do_filter'])) {
523
  $current_url = add_query_arg(array("post_type_filter" => $_POST['post_type_filter']), $current_url);
524
  $current_url = add_query_arg(array("wpms_duplicate_meta" => $_POST['wpms_duplicate_meta']), $current_url);
525
+ $current_url = add_query_arg(array("wpms_lang_list" => $_POST['wpms_lang_list']), $current_url);
526
  $redirect = true;
527
  }
528
 
inc/class.metaseo-dashboard.php CHANGED
@@ -268,7 +268,7 @@ class MetaSeo_Dashboard {
268
  $meta_analysis = array();
269
 
270
  $meta_title = get_post_meta($post->ID, '_metaseo_metatitle', true);
271
- if (($meta_title != '' && strlen($meta_title) <= self::$meta_title_length ) || (!empty($meta_analysis) && !empty($meta_analysis['metatitle']))) {
272
  $metatitle_filled++;
273
  }
274
  }
@@ -325,7 +325,7 @@ class MetaSeo_Dashboard {
325
  $meta_analysis = array();
326
 
327
  $meta_desc = get_post_meta($post->ID, '_metaseo_metadesc', true);
328
- if (($meta_desc != '' && strlen($meta_desc) <= self::$meta_desc_length ) || (!empty($meta_analysis) && !empty($meta_analysis['metadesc']))) {
329
  $metadesc_filled++;
330
  }
331
  }
268
  $meta_analysis = array();
269
 
270
  $meta_title = get_post_meta($post->ID, '_metaseo_metatitle', true);
271
+ if (($meta_title != '' && mb_strlen($meta_title,'UTF-8') <= self::$meta_title_length ) || (!empty($meta_analysis) && !empty($meta_analysis['metatitle']))) {
272
  $metatitle_filled++;
273
  }
274
  }
325
  $meta_analysis = array();
326
 
327
  $meta_desc = get_post_meta($post->ID, '_metaseo_metadesc', true);
328
+ if (($meta_desc != '' && mb_strlen($meta_desc,'UTF-8') <= self::$meta_desc_length ) || (!empty($meta_analysis) && !empty($meta_analysis['metadesc']))) {
329
  $metadesc_filled++;
330
  }
331
  }
inc/class.metaseo-image-list-table.php CHANGED
@@ -36,6 +36,11 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
36
  <?php
37
  $this->months_fillter('sldate');
38
  $this->meta_fillter('slmeta', 'filter_meta_action');
 
 
 
 
 
39
  ?>
40
  </div>
41
  <?php elseif ($which == 'bottom'): ?>
@@ -44,10 +49,17 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
44
  <?php
45
  $this->months_fillter('sldate1');
46
  $this->meta_fillter('slmeta1', 'filter_meta_action');
 
 
 
 
 
47
  ?>
48
  </div>
49
  <?php endif ?>
 
50
 
 
51
  <div class="alignleft actions">
52
  <select name="image_mbulk_copy" class="mbulk_copy">
53
  <option value="0"><?php _e('Bulk copy', 'wp-meta-seo') ?></option>
@@ -341,6 +353,20 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
341
  $join = "LEFT JOIN (SELECT * FROM {$wpdb->prefix}postmeta WHERE meta_key = '_wp_attachment_image_alt') mt ON mt.post_id = posts.ID ";
342
  }
343
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
344
  $query = "SELECT COUNT(ID)
345
  FROM $wpdb->posts as posts
346
  ". $join ."
@@ -395,6 +421,7 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
395
  $hidden = array();
396
  $sortable = $this->get_sortable_columns();
397
  $this->_column_headers = array($columns, $hidden, $sortable);
 
398
  $this->items = $wpdb->get_results($query);
399
  }
400
 
@@ -905,6 +932,13 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
905
  $redirect = true;
906
  }
907
 
 
 
 
 
 
 
 
908
  if ($redirect === true) {
909
  wp_redirect($current_url);
910
  ob_end_flush();
36
  <?php
37
  $this->months_fillter('sldate');
38
  $this->meta_fillter('slmeta', 'filter_meta_action');
39
+ if(is_plugin_active(WPMSEO_ADDON_FILENAME) && (is_plugin_active('sitepress-multilingual-cms/sitepress.php') || is_plugin_active('polylang/polylang.php'))){
40
+ $lang = !empty($_REQUEST['wpms_lang_list']) ? $_REQUEST['wpms_lang_list'] : '0';
41
+ $sl_lang = apply_filters('wpms_get_languagesList','',$lang);
42
+ echo $sl_lang;
43
+ }
44
  ?>
45
  </div>
46
  <?php elseif ($which == 'bottom'): ?>
49
  <?php
50
  $this->months_fillter('sldate1');
51
  $this->meta_fillter('slmeta1', 'filter_meta_action');
52
+ if(is_plugin_active(WPMSEO_ADDON_FILENAME) && (is_plugin_active('sitepress-multilingual-cms/sitepress.php') || is_plugin_active('polylang/polylang.php'))){
53
+ $lang = !empty($_REQUEST['wpms_lang_list']) ? $_REQUEST['wpms_lang_list'] : '0';
54
+ $sl_lang = apply_filters('wpms_get_languagesList','',$lang);
55
+ echo $sl_lang;
56
+ }
57
  ?>
58
  </div>
59
  <?php endif ?>
60
+ <?php
61
 
62
+ ?>
63
  <div class="alignleft actions">
64
  <select name="image_mbulk_copy" class="mbulk_copy">
65
  <option value="0"><?php _e('Bulk copy', 'wp-meta-seo') ?></option>
353
  $join = "LEFT JOIN (SELECT * FROM {$wpdb->prefix}postmeta WHERE meta_key = '_wp_attachment_image_alt') mt ON mt.post_id = posts.ID ";
354
  }
355
 
356
+ // query post by lang with polylang plugin
357
+ if(is_plugin_active(WPMSEO_ADDON_FILENAME) && is_plugin_active('polylang/polylang.php')){
358
+ if(isset($_GET['wpms_lang_list']) && $_GET['wpms_lang_list'] != '0'){
359
+ $join .= " INNER JOIN (SELECT * FROM $wpdb->term_relationships as ml INNER JOIN (SELECT * FROM $wpdb->terms WHERE slug='".$_GET['wpms_lang_list']."') mp ON mp.term_id = ml.term_taxonomy_id) ml ON ml.object_id = posts.ID ";
360
+ }
361
+ }
362
+
363
+ // query post by lang with WPML plugin
364
+ if(is_plugin_active(WPMSEO_ADDON_FILENAME) && is_plugin_active('sitepress-multilingual-cms/sitepress.php')){
365
+ if(isset($_GET['wpms_lang_list']) && $_GET['wpms_lang_list'] != '0'){
366
+ $join .= " INNER JOIN (SELECT * FROM ".$wpdb->prefix."icl_translations WHERE element_type LIKE 'post_%' AND language_code='".$_GET['wpms_lang_list']."') t ON t.element_id = $wpdb->posts.ID ";
367
+ }
368
+ }
369
+
370
  $query = "SELECT COUNT(ID)
371
  FROM $wpdb->posts as posts
372
  ". $join ."
421
  $hidden = array();
422
  $sortable = $this->get_sortable_columns();
423
  $this->_column_headers = array($columns, $hidden, $sortable);
424
+
425
  $this->items = $wpdb->get_results($query);
426
  }
427
 
932
  $redirect = true;
933
  }
934
 
935
+ if (!empty($_POST['wpms_lang_list'])) {
936
+ $current_url = add_query_arg(array("wpms_lang_list" => $_POST['wpms_lang_list']), $current_url);
937
+ $redirect = true;
938
+ }
939
+
940
+
941
+
942
  if ($redirect === true) {
943
  wp_redirect($current_url);
944
  ob_end_flush();
inc/class.metaseo-metabox.php CHANGED
@@ -596,7 +596,7 @@ class WPMSEO_Metabox extends WPMSEO_Meta {
596
 
597
  /* load param meta title */
598
  function metaseo_check_metatitle($meta_title, $tooltip_page, $meta_analysis) {
599
- if (($meta_title != '' && strlen($meta_title) <= self::$meta_title_length) || (!empty($meta_analysis) && !empty($meta_analysis['metatitle']))) {
600
  $output = $this->metaseo_create_field('metatitle', $tooltip_page['meta_title'], 'done', __('Meta title filled', 'wp-meta-seo'), 1);
601
  $this->perc_score++;
602
  } else {
@@ -607,7 +607,7 @@ class WPMSEO_Metabox extends WPMSEO_Meta {
607
 
608
  /* load param meta description */
609
  function metaseo_check_metadesc($meta_desc, $tooltip_page, $meta_analysis) {
610
- if (($meta_desc != '' && strlen($meta_desc) <= self::$meta_length) || (!empty($meta_analysis) && !empty($meta_analysis['metadesc']))) {
611
  $output = $this->metaseo_create_field('metadesc', $tooltip_page['meta_desc'], 'done', __('Meta description filled', 'wp-meta-seo'), 1);
612
  $this->perc_score++;
613
  } else {
596
 
597
  /* load param meta title */
598
  function metaseo_check_metatitle($meta_title, $tooltip_page, $meta_analysis) {
599
+ if (($meta_title != '' && mb_strlen($meta_title,'UTF-8') <= self::$meta_title_length) || (!empty($meta_analysis) && !empty($meta_analysis['metatitle']))) {
600
  $output = $this->metaseo_create_field('metatitle', $tooltip_page['meta_title'], 'done', __('Meta title filled', 'wp-meta-seo'), 1);
601
  $this->perc_score++;
602
  } else {
607
 
608
  /* load param meta description */
609
  function metaseo_check_metadesc($meta_desc, $tooltip_page, $meta_analysis) {
610
+ if (($meta_desc != '' && mb_strlen($meta_desc,'UTF-8') <= self::$meta_length) || (!empty($meta_analysis) && !empty($meta_analysis['metadesc']))) {
611
  $output = $this->metaseo_create_field('metadesc', $tooltip_page['meta_desc'], 'done', __('Meta description filled', 'wp-meta-seo'), 1);
612
  $this->perc_score++;
613
  } else {
inc/class.metaseo-sitemap.php CHANGED
@@ -29,7 +29,8 @@ class MetaSeo_Sitemap {
29
  "wpms_public_name_pages" => "",
30
  "wpms_public_name_posts" => "",
31
  "wpms_sitemap_posts" => array(),
32
- "wpms_sitemap_pages" => array()
 
33
  );
34
 
35
  if(is_plugin_active(WPMSEO_ADDON_FILENAME)) {
@@ -56,7 +57,7 @@ class MetaSeo_Sitemap {
56
  if (is_array($settings)) {
57
  $this->settings_sitemap = array_merge($this->settings_sitemap, $settings);
58
  }
59
-
60
  add_action('admin_init', array($this, 'metaseo_field_settings_sitemap'));
61
  add_action('admin_enqueue_scripts', array($this, 'metaseo_sitemap_scripts'));
62
  add_action('wp_enqueue_scripts', array($this, 'site_metaseo_sitemap_scripts'));
@@ -131,6 +132,18 @@ class MetaSeo_Sitemap {
131
  add_settings_field('wpms_html_sitemap_position', __('HTML Sitemap Position', 'wp-meta-seo'), array($this, 'wpms_html_sitemap_position'), 'metaseo_settings_sitemap', 'metaseo_sitemap');
132
  add_settings_field('wpms_sitemap_add', __('Sitemap and robot.txt', 'wp-meta-seo'), array($this, 'wpms_sitemap_add'), 'metaseo_settings_sitemap', 'metaseo_sitemap', array('label_for' => __('You can include a link to your xml sitemap in the robot.txt. It helps some search engines to find it', 'wp-meta-seo')));
133
  add_settings_field('wpms_sitemap_root', __('Sitemap root', 'wp-meta-seo'), array($this, 'wpms_sitemap_root'), 'metaseo_settings_sitemap', 'metaseo_sitemap', array('label_for' => __('Add a copy of the lastest version of your .xml sitemap at the root of your WordPress install named sitemap.xml. Some SEO tools and search engines bots are searching for it.', 'wp-meta-seo')));
 
 
 
 
 
 
 
 
 
 
 
 
134
  if(is_plugin_active(WPMSEO_ADDON_FILENAME)) {
135
  add_settings_field('wpms_sitemap_link_check', __('Sitemap link check', 'wp-meta-seo'), array($this, 'wpms_sitemap_link_check'), 'metaseo_settings_sitemap', 'metaseo_sitemap', array('label_for' => __('A page is automatically generated to display your HTML sitemap. You can also use any of the existing pages.', 'wp-meta-seo')));
136
  }
@@ -173,6 +186,13 @@ class MetaSeo_Sitemap {
173
  <?php
174
  }
175
  }
 
 
 
 
 
 
 
176
 
177
  /* Display field sitemap root */
178
  public function wpms_sitemap_root() {
@@ -301,7 +321,7 @@ class MetaSeo_Sitemap {
301
 
302
  $xml = new DomDocument('1.0', 'utf-8');
303
  $home_url = site_url('/');
304
- $xml_stylesheet_path = ( defined('WP_CONTENT_DIR') ) ? $home_url . basename(WP_CONTENT_DIR) : $home_url . 'wp-content';
305
  $xml_stylesheet_path .= ( defined('WP_PLUGIN_DIR') ) ? '/' . basename(WP_PLUGIN_DIR) . '/wp-meta-seo/wpms-sitemap.xsl' : '/plugins/wp-meta-seo/sitemap.xsl';
306
 
307
  $xslt = $xml->createProcessingInstruction('xml-stylesheet', "type=\"text/xsl\" href=\"$xml_stylesheet_path\"");
@@ -363,6 +383,8 @@ class MetaSeo_Sitemap {
363
  }
364
  $priority->appendChild($xml->createTextNode($this->settings_sitemap['wpms_sitemap_menus'][$menu_id]['priority']));
365
  }
 
 
366
  }
367
  }
368
  }
@@ -423,6 +445,7 @@ class MetaSeo_Sitemap {
423
  }
424
  $priority->appendChild($xml->createTextNode($menupriority));
425
  }
 
426
  }
427
  }
428
  }
@@ -434,6 +457,7 @@ class MetaSeo_Sitemap {
434
  $res = $this->wpms_get_posts_sitemap();
435
  if (!empty($res)) {
436
  foreach ($res as $val) {
 
437
  $permalink = get_permalink($val->ID);
438
  if (!in_array($permalink, $list_links)) {
439
  $list_links[] = $permalink;
@@ -467,6 +491,8 @@ class MetaSeo_Sitemap {
467
  }
468
  $priority->appendChild($xml->createTextNode($postpriority));
469
  }
 
 
470
  }
471
  }
472
  }
@@ -530,6 +556,8 @@ class MetaSeo_Sitemap {
530
  }
531
  $priority->appendChild($xml->createTextNode($postpriority));
532
  }
 
 
533
  }
534
  }
535
  }
@@ -582,6 +610,7 @@ class MetaSeo_Sitemap {
582
  if (!empty($res)) {
583
  $page_on_front = get_option('page_on_front');
584
  foreach ($res as $val) {
 
585
  $permalink = get_permalink($val->ID);
586
  if (!in_array($permalink, $list_links)) {
587
  $list_links[] = $permalink;
@@ -615,6 +644,8 @@ class MetaSeo_Sitemap {
615
  }
616
  $priority->appendChild($xml->createTextNode($pagepriority));
617
  }
 
 
618
  }
619
  }
620
  }
@@ -661,6 +692,77 @@ class MetaSeo_Sitemap {
661
  $this->wpms_sitemap_info();
662
  }
663
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
664
  /* Retrieves the full permalink for the current post or post ID */
665
  public function wpms_get_permalink_sitemap($type, $id) {
666
  if (isset($type) && $type == 'custom') {
@@ -1551,7 +1653,6 @@ ORDER BY p.post_date DESC",array($post_type,$taxo,$cat->slug));
1551
  $info_file = $this->wpms_get_path_filename_sitemap();
1552
  $wpms_url_robot = ABSPATH . "robots.txt";
1553
  $wpms_url_home = site_url('/');
1554
- $xml_url = site_url('/') . $info_file['name'];
1555
  $this->metaseo_create_sitemap($this->wpms_sitemap_name);
1556
  if ($this->settings_sitemap['wpms_sitemap_root'] == 1) {
1557
  $this->metaseo_create_sitemap($this->wpms_sitemap_default_name);
@@ -1582,7 +1683,7 @@ ORDER BY p.post_date DESC",array($post_type,$taxo,$cat->slug));
1582
  /* Display priority for each item */
1583
  public function wpms_view_select_priority($id, $name, $selected) {
1584
  $values = array('1' => '100%', '0.9' => '90%', '0.8' => '80%', '0.7' => '70%', '0.6' => '60%', '0.5' => '50%');
1585
- $select = '<select id="' . $id . '" name="' . $name . '">';
1586
  $select .= '<option value="1">' . __('Priority', 'wp-meta-seo') . '</option>';
1587
  foreach ($values as $k => $v) {
1588
  if ($k == $selected) {
@@ -1594,11 +1695,11 @@ ORDER BY p.post_date DESC",array($post_type,$taxo,$cat->slug));
1594
  $select .= '</select>';
1595
  return $select;
1596
  }
1597
-
1598
  /* Display frequency for each item */
1599
  public function wpms_view_select_frequency($id, $name, $selected) {
1600
  $values = array('always' => 'Always', 'hourly' => 'Hourly', 'daily' => 'Daily', 'weekly' => 'Weekly', 'monthly' => 'Monthly', 'yearly' => 'Yearly', 'never' => 'Never');
1601
- $select = '<select id="' . $id . '" name="' . $name . '">';
1602
  $select .= '<option value="monthly">' . __('Frequency', 'wp-meta-seo') . '</option>';
1603
  foreach ($values as $k => $v) {
1604
  if ($k == $selected) {
@@ -1676,6 +1777,11 @@ ORDER BY p.post_date DESC",array($post_type,$taxo,$cat->slug));
1676
  }
1677
 
1678
  $lists_selected["wpms_sitemap_customUrl"] = array();
 
 
 
 
 
1679
  }
1680
 
1681
  foreach ($lists_selected as $k => $v) {
29
  "wpms_public_name_pages" => "",
30
  "wpms_public_name_posts" => "",
31
  "wpms_sitemap_posts" => array(),
32
+ "wpms_sitemap_pages" => array(),
33
+ "wpms_sitemap_include_lang" => array()
34
  );
35
 
36
  if(is_plugin_active(WPMSEO_ADDON_FILENAME)) {
57
  if (is_array($settings)) {
58
  $this->settings_sitemap = array_merge($this->settings_sitemap, $settings);
59
  }
60
+
61
  add_action('admin_init', array($this, 'metaseo_field_settings_sitemap'));
62
  add_action('admin_enqueue_scripts', array($this, 'metaseo_sitemap_scripts'));
63
  add_action('wp_enqueue_scripts', array($this, 'site_metaseo_sitemap_scripts'));
132
  add_settings_field('wpms_html_sitemap_position', __('HTML Sitemap Position', 'wp-meta-seo'), array($this, 'wpms_html_sitemap_position'), 'metaseo_settings_sitemap', 'metaseo_sitemap');
133
  add_settings_field('wpms_sitemap_add', __('Sitemap and robot.txt', 'wp-meta-seo'), array($this, 'wpms_sitemap_add'), 'metaseo_settings_sitemap', 'metaseo_sitemap', array('label_for' => __('You can include a link to your xml sitemap in the robot.txt. It helps some search engines to find it', 'wp-meta-seo')));
134
  add_settings_field('wpms_sitemap_root', __('Sitemap root', 'wp-meta-seo'), array($this, 'wpms_sitemap_root'), 'metaseo_settings_sitemap', 'metaseo_sitemap', array('label_for' => __('Add a copy of the lastest version of your .xml sitemap at the root of your WordPress install named sitemap.xml. Some SEO tools and search engines bots are searching for it.', 'wp-meta-seo')));
135
+
136
+ if(is_plugin_active(WPMSEO_ADDON_FILENAME)) {
137
+ if (is_plugin_active('sitepress-multilingual-cms/sitepress.php')) {
138
+ $label = __('WPML language', 'wp-meta-seo');
139
+ add_settings_field('wpms_sitemap_include_lang', $label, array($this, 'wpms_sitemap_include_lang'), 'metaseo_settings_sitemap', 'metaseo_sitemap', array('label_for' => __('Select a language to include in your sitemap, it will add the relative menu, post, page… content automatically', 'wp-meta-seo')));
140
+ }elseif(is_plugin_active('polylang/polylang.php')){
141
+ $label = __('Polylang language', 'wp-meta-seo');
142
+ add_settings_field('wpms_sitemap_include_lang', $label, array($this, 'wpms_sitemap_include_lang'), 'metaseo_settings_sitemap', 'metaseo_sitemap', array('label_for' => __('Select a language to include in your sitemap, it will add the relative menu, post, page… content automatically', 'wp-meta-seo')));
143
+ }
144
+ }
145
+
146
+
147
  if(is_plugin_active(WPMSEO_ADDON_FILENAME)) {
148
  add_settings_field('wpms_sitemap_link_check', __('Sitemap link check', 'wp-meta-seo'), array($this, 'wpms_sitemap_link_check'), 'metaseo_settings_sitemap', 'metaseo_sitemap', array('label_for' => __('A page is automatically generated to display your HTML sitemap. You can also use any of the existing pages.', 'wp-meta-seo')));
149
  }
186
  <?php
187
  }
188
  }
189
+
190
+ /* Display field sitemap lang */
191
+ public function wpms_sitemap_include_lang() {
192
+ $lang = $this->settings_sitemap['wpms_sitemap_include_lang'];
193
+ $sl_lang = apply_filters('wpms_get_languagesList','',$lang,'multiple');
194
+ echo $sl_lang;
195
+ }
196
 
197
  /* Display field sitemap root */
198
  public function wpms_sitemap_root() {
321
 
322
  $xml = new DomDocument('1.0', 'utf-8');
323
  $home_url = site_url('/');
324
+ $xml_stylesheet_path = content_url();
325
  $xml_stylesheet_path .= ( defined('WP_PLUGIN_DIR') ) ? '/' . basename(WP_PLUGIN_DIR) . '/wp-meta-seo/wpms-sitemap.xsl' : '/plugins/wp-meta-seo/sitemap.xsl';
326
 
327
  $xslt = $xml->createProcessingInstruction('xml-stylesheet', "type=\"text/xsl\" href=\"$xml_stylesheet_path\"");
383
  }
384
  $priority->appendChild($xml->createTextNode($this->settings_sitemap['wpms_sitemap_menus'][$menu_id]['priority']));
385
  }
386
+
387
+ $this->wpms_create_xml_lang($xml,$menu_id,'wpms_sitemap_menus','post_post',$loc);
388
  }
389
  }
390
  }
445
  }
446
  $priority->appendChild($xml->createTextNode($menupriority));
447
  }
448
+ $this->wpms_create_xml_lang($xml,$menu_id,'wpms_sitemap_menus','post_post',$loc);
449
  }
450
  }
451
  }
457
  $res = $this->wpms_get_posts_sitemap();
458
  if (!empty($res)) {
459
  foreach ($res as $val) {
460
+ /* get translation post id */
461
  $permalink = get_permalink($val->ID);
462
  if (!in_array($permalink, $list_links)) {
463
  $list_links[] = $permalink;
491
  }
492
  $priority->appendChild($xml->createTextNode($postpriority));
493
  }
494
+
495
+ $this->wpms_create_xml_lang($xml,$val->ID,'wpms_sitemap_posts','post_post',$loc);
496
  }
497
  }
498
  }
556
  }
557
  $priority->appendChild($xml->createTextNode($postpriority));
558
  }
559
+
560
+ $this->wpms_create_xml_lang($xml,$val->ID,'wpms_sitemap_'.$post_type,'post_post',$loc);
561
  }
562
  }
563
  }
610
  if (!empty($res)) {
611
  $page_on_front = get_option('page_on_front');
612
  foreach ($res as $val) {
613
+ /* get translation post id */
614
  $permalink = get_permalink($val->ID);
615
  if (!in_array($permalink, $list_links)) {
616
  $list_links[] = $permalink;
644
  }
645
  $priority->appendChild($xml->createTextNode($pagepriority));
646
  }
647
+
648
+ $this->wpms_create_xml_lang($xml,$val->ID,'wpms_sitemap_pages','post_page',$loc);
649
  }
650
  }
651
  }
692
  $this->wpms_sitemap_info();
693
  }
694
 
695
+ /*
696
+ * return translation post id
697
+ */
698
+ public function wpms_get_translation_id($id,$el_type,$setting_name) {
699
+ $valID = $id;
700
+ if(is_plugin_active(WPMSEO_ADDON_FILENAME) && is_plugin_active('sitepress-multilingual-cms/sitepress.php')){
701
+ global $sitepress;
702
+ if(!empty($this->settings_sitemap[$setting_name][$id]['lang'])){
703
+ $trid = $sitepress->get_element_trid($id, $el_type);
704
+ if ($trid) {
705
+ $translations = $sitepress->get_element_translations($trid, $el_type, true, true, true);
706
+ foreach ($translations as $translation) {
707
+ if(isset($translation->language_code) && $translation->language_code == $this->settings_sitemap[$setting_name][$id]['lang']){
708
+ $valID = $translation->element_id;
709
+ break;
710
+ }
711
+ }
712
+ }
713
+ }
714
+ }
715
+ return $valID;
716
+ }
717
+
718
+ /*
719
+ * create xml language
720
+ */
721
+ public function wpms_create_xml_lang($xml,$id,$setting_name,$el_type,$loc){
722
+ if(is_plugin_active(WPMSEO_ADDON_FILENAME) && is_plugin_active('sitepress-multilingual-cms/sitepress.php')){
723
+ if(!empty($this->settings_sitemap['wpms_sitemap_include_lang'])){
724
+ global $sitepress;
725
+ $trid = $sitepress->get_element_trid($id, $el_type);
726
+ if ($trid) {
727
+ // get post $translation
728
+ $translations = $sitepress->get_element_translations($trid, $el_type, true, true, true);
729
+ foreach ($translations as $translation) {
730
+ if(isset($translation->language_code) && in_array($translation->language_code,$this->settings_sitemap['wpms_sitemap_include_lang'])){
731
+ $permalink = get_permalink($translation->element_id);
732
+ $node = $xml->appendChild($xml->createElement('xhtml:link')); // can use $xml->appendChild($xml->createElementNS('http://www.w3.org/1999/xhtml', 'xhtml:link'));
733
+ $node->setAttribute('rel', 'alternate');
734
+ $node->setAttribute('hreflang', $translation->language_code);
735
+ $node->setAttribute('href', $permalink);
736
+ $loc->parentNode->appendChild($node);
737
+ }
738
+ }
739
+ }
740
+ }
741
+ }elseif(is_plugin_active(WPMSEO_ADDON_FILENAME) && is_plugin_active('polylang/polylang.php')){
742
+ if(!empty($this->settings_sitemap['wpms_sitemap_include_lang'])){
743
+ global $polylang;
744
+ $model = $polylang->filters->links_model->model;
745
+ $model_post = $polylang->filters->links_model->model->post;
746
+ foreach ( $model->get_languages_list() as $language ) {
747
+ $value = $model_post->get_translation( $id, $language );
748
+ if ( ! $value ) {
749
+
750
+ }else{
751
+ $lang = pll_get_post_language($value);
752
+ if(isset($lang) && in_array($lang,$this->settings_sitemap['wpms_sitemap_include_lang'])){
753
+ $permalink = get_permalink($value);
754
+ $node = $xml->appendChild($xml->createElementNS('http://www.w3.org/1999/xhtml', 'xhtml:link'));
755
+ $node->setAttribute('rel', 'alternate');
756
+ $node->setAttribute('hreflang', $lang);
757
+ $node->setAttribute('href', $permalink);
758
+ $loc->parentNode->appendChild($node);
759
+ }
760
+ }
761
+ }
762
+ }
763
+ }
764
+ }
765
+
766
  /* Retrieves the full permalink for the current post or post ID */
767
  public function wpms_get_permalink_sitemap($type, $id) {
768
  if (isset($type) && $type == 'custom') {
1653
  $info_file = $this->wpms_get_path_filename_sitemap();
1654
  $wpms_url_robot = ABSPATH . "robots.txt";
1655
  $wpms_url_home = site_url('/');
 
1656
  $this->metaseo_create_sitemap($this->wpms_sitemap_name);
1657
  if ($this->settings_sitemap['wpms_sitemap_root'] == 1) {
1658
  $this->metaseo_create_sitemap($this->wpms_sitemap_default_name);
1683
  /* Display priority for each item */
1684
  public function wpms_view_select_priority($id, $name, $selected) {
1685
  $values = array('1' => '100%', '0.9' => '90%', '0.8' => '80%', '0.7' => '70%', '0.6' => '60%', '0.5' => '50%');
1686
+ $select = '<select id="' . $id . '" name="' . $name . '" class="wpmsleft">';
1687
  $select .= '<option value="1">' . __('Priority', 'wp-meta-seo') . '</option>';
1688
  foreach ($values as $k => $v) {
1689
  if ($k == $selected) {
1695
  $select .= '</select>';
1696
  return $select;
1697
  }
1698
+
1699
  /* Display frequency for each item */
1700
  public function wpms_view_select_frequency($id, $name, $selected) {
1701
  $values = array('always' => 'Always', 'hourly' => 'Hourly', 'daily' => 'Daily', 'weekly' => 'Weekly', 'monthly' => 'Monthly', 'yearly' => 'Yearly', 'never' => 'Never');
1702
+ $select = '<select id="' . $id . '" name="' . $name . '" class="wpmsleft">';
1703
  $select .= '<option value="monthly">' . __('Frequency', 'wp-meta-seo') . '</option>';
1704
  foreach ($values as $k => $v) {
1705
  if ($k == $selected) {
1777
  }
1778
 
1779
  $lists_selected["wpms_sitemap_customUrl"] = array();
1780
+
1781
+ // save setting include lang
1782
+ if(isset($_POST['wpms_lang_list']) && is_array($_POST['wpms_lang_list'])){
1783
+ $settings_sitemap['wpms_sitemap_include_lang'] = $_POST['wpms_lang_list'];
1784
+ }
1785
  }
1786
 
1787
  foreach ($lists_selected as $k => $v) {
inc/pages/sitemaps/metaseo-source_posts.php CHANGED
@@ -111,7 +111,6 @@
111
  echo '</div>';
112
  }
113
 
114
-
115
  echo '</div>';
116
  echo '<div style="margin-left:200px">' . $select_priority . $select_frequency . '</div>';
117
  echo '</div>';
111
  echo '</div>';
112
  }
113
 
 
114
  echo '</div>';
115
  echo '<div style="margin-left:200px">' . $select_priority . $select_frequency . '</div>';
116
  echo '</div>';
js/metaseo_admin.js CHANGED
@@ -1002,6 +1002,15 @@ jQuery(document).ready(function ($) {
1002
  });
1003
  });
1004
 
 
 
 
 
 
 
 
 
 
1005
  $('.mbulk_copy').bind('change', function () {
1006
  var value = $(this).val();
1007
  $('.mbulk_copy').each(function (i, e) {
1002
  });
1003
  });
1004
 
1005
+ $('.wpms_lang_list').bind('change', function () {
1006
+ var value = $(this).val();
1007
+ $('.wpms_lang_list').each(function (i, e) {
1008
+ if ($(e).val() != value) {
1009
+ $(e).val(value);
1010
+ }
1011
+ });
1012
+ });
1013
+
1014
  $('.mbulk_copy').bind('change', function () {
1015
  var value = $(this).val();
1016
  $('.mbulk_copy').each(function (i, e) {
js/metaseo_sitemap.js CHANGED
@@ -107,7 +107,7 @@
107
  var cat_id = $(v).data('category');
108
  var priority = $('#priority_'+post_type+'_' + id).val();
109
  var frequency = $('#frequency_'+post_type+'_' + id).val();
110
- custom_post_type[post_type][cat_id + '-' + id] = {'post_id': id, 'priority': priority, 'frequency': frequency};
111
  }
112
  });
113
  });
@@ -210,7 +210,8 @@
210
  wpms_display_order_pages: $('.wpms_display_order_pages').val(),
211
  wpms_display_order_menus: $('.wpms_display_order_menus').val(),
212
  wpms_display_order_urls: $('.wpms_display_order_urls').val(),
213
- wpms_sitemap_taxonomies: taxonomies
 
214
  };
215
 
216
  $.each(wpmseositemap.post_type,function(i,post_type){
107
  var cat_id = $(v).data('category');
108
  var priority = $('#priority_'+post_type+'_' + id).val();
109
  var frequency = $('#frequency_'+post_type+'_' + id).val();
110
+ custom_post_type[post_type][id] = {'post_id': id, 'priority': priority, 'frequency': frequency};
111
  }
112
  });
113
  });
210
  wpms_display_order_pages: $('.wpms_display_order_pages').val(),
211
  wpms_display_order_menus: $('.wpms_display_order_menus').val(),
212
  wpms_display_order_urls: $('.wpms_display_order_urls').val(),
213
+ wpms_sitemap_taxonomies: taxonomies,
214
+ wpms_lang_list: $('.wpms_lang_list').val()
215
  };
216
 
217
  $.each(wpmseositemap.post_type,function(i,post_type){
js/pop-up.js DELETED
@@ -1,33 +0,0 @@
1
- jQuery(document).ready(function () {
2
- (function ($) {
3
- $.fn.absoluteCenter = function () {
4
- this.each(function () {
5
- var top = -($(this).outerHeight() / 2) + 'px';
6
- var left = -($(this).outerWidth() / 2) + 'px';
7
- $(this).css({'position': 'absolute', 'position':'fixed', 'margin-top': top, 'margin-left': left, 'top': '40%', 'left': '50%'});
8
- return this;
9
- });
10
- }
11
- })(jQuery);
12
-
13
- $('a.show-popup').click(function () {
14
- var bg = $('div.popup-bg');
15
- var obj = $(this).parent().find('div.popup');
16
- var btnClose = obj.find('.popup-close');
17
- bg.animate({opacity: 0.2}, 0).fadeIn(200);
18
- obj.fadeIn(200).draggable({cursor: 'move', handle: '.popup-header'}).absoluteCenter();
19
- btnClose.click(function () {
20
- bg.fadeOut(100);
21
- obj.fadeOut(100);
22
- });
23
- bg.click(function () {
24
- btnClose.click();
25
- });
26
- $(document).keydown(function (e) {
27
- if (e.keyCode == 27) {
28
- btnClose.click();
29
- }
30
- });
31
- return false;
32
- });
33
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/wp-metaseo-metabox.js CHANGED
@@ -194,26 +194,8 @@ function msUpdateDesc() {
194
  snippet.find('.desc span.content').html(desc);
195
  });
196
  } else {
197
- jQuery('#' + wpmseoMetaboxL10n.field_prefix + 'desc-length').addClass('length-true').removeClass('length-wrong').html('<span class="good">' + wpmseoMetaboxL10n.wpmseo_meta_desc_length + '</span>');
198
- // Clear the generated description
199
- snippet.find('.desc span.content').html('');
200
-
201
-
202
- if (typeof tinyMCE !== 'undefined' && tinyMCE.get('excerpt') !== null) {
203
- desc = tinyMCE.get('excerpt').getContent();
204
- desc = msClean(desc);
205
- }
206
-
207
- if (typeof tinyMCE !== 'undefined' && tinyMCE.get('content') !== null && desc.length === 0) {
208
- desc = tinyMCE.get('content').getContent();
209
-
210
- desc = msClean(desc);
211
- }
212
-
213
- desc = desc.substr(0, wpmseoMetaboxL10n.wpmseo_meta_desc_length);
214
- desc = msSanitizeDesc(desc);
215
-
216
- snippet.find('.desc span.autogen').html(desc);
217
  }
218
  }
219
 
194
  snippet.find('.desc span.content').html(desc);
195
  });
196
  } else {
197
+ var len = wpmseoMetaboxL10n.wpmseo_meta_desc_length;
198
+ metaseo_status_length(len, '#' + wpmseoMetaboxL10n.field_prefix + 'desc-length');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
199
  }
200
  }
201
 
languages/wp-meta-seo-en_US.mo CHANGED
Binary file
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, redirect, redirection, 301, broken link
4
  Requires at least: 4.0
5
  Tested up to: 4.8.1
6
- Stable tag: 3.5.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -177,6 +177,7 @@ The redirect manager will help you to fix all types of 404 errors you can encoun
177
  * WP Table Manager: <a href="https://www.joomunited.com/wordpress-products/wp-file-download" rel="friend">https://www.joomunited.com/wordpress-products/wp-file-download</a>
178
  * WP Speed of Light: <a href="https://www.joomunited.com/wordpress-products/wp-speed-of-light" rel="friend">https://www.joomunited.com/wordpress-products/wp-speed-of-light</a>
179
  * WP Latest Posts: <a href="https://www.joomunited.com/wordpress-products/wp-latest-posts" rel="friend">https://www.joomunited.com/wordpress-products/wp-latest-posts</a>
 
180
 
181
 
182
  = Support =
@@ -270,6 +271,11 @@ It could be! if you have a lot of pages that need to be indexed with no specific
270
 
271
  == Changelog ==
272
 
 
 
 
 
 
273
  = 3.5.0 =
274
  * Fix : Check content of page builders: Visual composer, DIVI Builder, Beaver Builder, ACF, Site Origine, Themify builder, Live composer, Elementor plugins
275
  * Add : Generate rich snippet breadcrumb shortcode and PHP code
@@ -488,4 +494,4 @@ Site-wide SEO: it's more about your whole site and structure between multiple ar
488
 
489
  And... don't forget to check each month your SEO dashboard :)
490
 
491
- PHP 5.3+, WP 4.3+
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.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
177
  * WP Table Manager: <a href="https://www.joomunited.com/wordpress-products/wp-file-download" rel="friend">https://www.joomunited.com/wordpress-products/wp-file-download</a>
178
  * WP Speed of Light: <a href="https://www.joomunited.com/wordpress-products/wp-speed-of-light" rel="friend">https://www.joomunited.com/wordpress-products/wp-speed-of-light</a>
179
  * WP Latest Posts: <a href="https://www.joomunited.com/wordpress-products/wp-latest-posts" rel="friend">https://www.joomunited.com/wordpress-products/wp-latest-posts</a>
180
+ * WP Smart Editor: <a href="https://wordpress.org/plugins/wp-smart-editor" rel="friend">https://wordpress.org/plugins/wp-smart-editor</a>
181
 
182
 
183
  = Support =
271
 
272
  == Changelog ==
273
 
274
+ = 3.5.1 =
275
+ * Language filter for meta, images and sitemap XML
276
+ * Fix : Encoding issue on dashboard page
277
+ * Fix : JS error when empty post content
278
+
279
  = 3.5.0 =
280
  * Fix : Check content of page builders: Visual composer, DIVI Builder, Beaver Builder, ACF, Site Origine, Themify builder, Live composer, Elementor plugins
281
  * Add : Generate rich snippet breadcrumb shortcode and PHP code
494
 
495
  And... don't forget to check each month your SEO dashboard :)
496
 
497
+ PHP 5.3+, WP 4.3+
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.0
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.0');
79
  }
80
 
81
  if (!defined('WPMS_CLIENTID')) {
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.1
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.1');
79
  }
80
 
81
  if (!defined('WPMS_CLIENTID')) {