SEOPress - Version 4.1.4

Version Description

  • INFO Improve cookie bar default design
  • INFO Update NGINX configuration informations on XML sitemaps page
  • INFO Update updater to support automatic updates
  • FIX Google suggestions to target keywords field
  • FIX Tagify not defined in term taxonomy editing page
  • FIX Conflict with BuddyBoss search page
  • FIX Notice Trying to get property 'name' of non-object 5 in options-titles-metas.php
  • FIX Notice Undefined offset in options-titles-metas.php
Download this release

Release Info

Developer rainbowgeek
Plugin Icon 128x128 SEOPress
Version 4.1.4
Comparing to
See all releases

Code changes from version 4.1.3 to 4.1.4

assets/js/seopress-counters.js CHANGED
@@ -322,14 +322,33 @@ function sp_ca_toggle() {
322
  });
323
  }
324
 
325
- jQuery(document).ready(function(e) {
326
- //Tagify
327
- var input = document.querySelector('input[id=seopress_analysis_target_kw_meta]');
328
 
329
- new Tagify(input, {
330
- originalInputValueFormat: valuesArr => valuesArr.map(item => item.value).join(',')
331
- })
 
 
 
 
 
 
 
 
 
 
 
 
332
 
 
 
 
 
 
 
 
 
333
  //default state
334
  if (jQuery('#toggle-preview').attr('data-toggle') == '1') {
335
  jQuery("#seopress_cpt .google-snippet-preview").addClass("mobile-preview");
322
  });
323
  }
324
 
325
+ //Tagify
326
+ var input = document.querySelector('input[id=seopress_analysis_target_kw_meta]');
 
327
 
328
+ var target_kw = new Tagify(input, {
329
+ originalInputValueFormat: valuesArr => valuesArr.map(item => item.value).join(',')
330
+ })
331
+
332
+ function seopress_google_suggest(data){
333
+
334
+ var raw_suggestions = String(data);
335
+ var suggestions_array = raw_suggestions.split(',');
336
+
337
+ var i;
338
+ for (i = 0; i < suggestions_array.length; i++) {
339
+ if (suggestions_array[i] != null && suggestions_array[i] != undefined && suggestions_array[i] !='' && suggestions_array[i] !='[object Object]') {
340
+ document.getElementById('seopress_suggestions').innerHTML += '<li><a href=\"#\" class=\"sp-suggest-btn button button-small\">'+suggestions_array[i]+'</a></li>';
341
+ }
342
+ }
343
 
344
+ jQuery('.sp-suggest-btn').click(function(e) {
345
+ e.preventDefault();
346
+
347
+ target_kw.addTags(jQuery(this).text());
348
+ });
349
+ }
350
+
351
+ jQuery(document).ready(function(e) {
352
  //default state
353
  if (jQuery('#toggle-preview').attr('data-toggle') == '1') {
354
  jQuery("#seopress_cpt .google-snippet-preview").addClass("mobile-preview");
assets/js/seopress-counters.min.js CHANGED
@@ -1 +1 @@
1
- function sp_titles_counters(){var e=jQuery("#seopress_titles_title_meta").val(),t=jQuery("#seopress_titles_title_meta").attr("placeholder");if(jQuery("#seopress_titles_title_counters").after('<div id="seopress_titles_title_counters_val">/ 60</div>'),e.length>0?(jQuery("#seopress_titles_title_counters").text(e.length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(e))):t.length&&(jQuery("#seopress_titles_title_counters").text(t.length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(t))),e.length>60?jQuery("#seopress_titles_title_counters").css("color","red"):t.length>60&&jQuery("#seopress_titles_title_counters").css("color","red"),pixelTitle(e)>568?jQuery("#seopress_titles_title_pixel").css("color","red"):pixelTitle(t)>568&&jQuery("#seopress_titles_title_pixel").css("color","red"),e.length)var s=Math.round(pixelTitle(e)/568*100);else s=Math.round(pixelTitle(t)/568*100);s>=100&&(s=100),jQuery("#seopress_titles_title_counters_progress").attr("aria-valuenow",s),jQuery("#seopress_titles_title_counters_progress").text(s+"%"),jQuery("#seopress_titles_title_counters_progress").css("width",s+"%"),jQuery("#seopress_titles_title_meta, #seopress-tag-single-title, #seopress-tag-single-site-title, #seopress-tag-single-sep").on("keyup paste change click",function(e){var t=jQuery("#seopress_titles_title_meta").val(),s=jQuery("#seopress_titles_title_meta").attr("placeholder");if(jQuery("#seopress_titles_title_counters").css("color","inherit"),jQuery("#seopress_titles_title_pixel").css("color","inherit"),t.length>60&&jQuery("#seopress_titles_title_counters").css("color","red"),pixelTitle(t)>568&&jQuery("#seopress_titles_title_pixel").css("color","red"),0==t.length&&(s.length>60&&jQuery("#seopress_titles_title_counters").css("color","red"),pixelTitle(s)>568&&jQuery("#seopress_titles_title_pixel").css("color","red")),t.length>0?(jQuery("#seopress_titles_title_counters").text(t.length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(t))):s.length&&(jQuery("#seopress_titles_title_counters").text(s.length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(s))),t.length>0?(jQuery(".snippet-title-custom").text(e.target.value),jQuery(".snippet-title").css("display","none"),jQuery(".snippet-title-custom").css("display","block"),jQuery(".snippet-title-default").css("display","none")):0==t.length&&(jQuery(".snippet-title-default").css("display","block"),jQuery(".snippet-title-custom").css("display","none"),jQuery(".snippet-title").css("display","none")),t.length)var i=Math.round(pixelTitle(t)/568*100);else i=Math.round(pixelTitle(s)/568*100);i>=100&&(i=100),jQuery("#seopress_titles_title_counters_progress").attr("aria-valuenow",i),jQuery("#seopress_titles_title_counters_progress").text(i+"%"),jQuery("#seopress_titles_title_counters_progress").css("width",i+"%")})}function sp_meta_desc_counters(){var e=jQuery("#seopress_titles_desc_meta").val(),t=jQuery("#seopress_titles_desc_meta").attr("placeholder");if(jQuery("#seopress_titles_desc_counters").after('<div id="seopress_titles_desc_counters_val">/ 160</div>'),e.length>0?(jQuery("#seopress_titles_desc_counters").text(e.length),jQuery("#seopress_titles_desc_pixel").text(pixelDesc(e))):t.length&&(jQuery("#seopress_titles_desc_counters").text(t.length),jQuery("#seopress_titles_desc_pixel").text(pixelDesc(t))),e.length>160?jQuery("#seopress_titles_desc_counters").css("color","red"):t.length>160&&jQuery("#seopress_titles_desc_counters").css("color","red"),pixelDesc(e)>940?jQuery("#seopress_titles_desc_pixel").css("color","red"):pixelDesc(t)>940&&jQuery("#seopress_titles_desc_pixel").css("color","red"),e.length)var s=Math.round(pixelDesc(e)/940*100);else s=Math.round(pixelDesc(t)/940*100);s>=100&&(s=100),jQuery("#seopress_titles_desc_counters_progress").attr("aria-valuenow",s),jQuery("#seopress_titles_desc_counters_progress").text(s+"%"),jQuery("#seopress_titles_desc_counters_progress").css("width",s+"%"),jQuery("#seopress_titles_desc_meta, #seopress-tag-single-excerpt").on("keyup paste change click",function(e){var t=jQuery("#seopress_titles_desc_meta").val(),s=jQuery("#seopress_titles_desc_meta").attr("placeholder");if(jQuery("#seopress_titles_desc_counters").css("color","inherit"),jQuery("#seopress_titles_desc_pixel").css("color","inherit"),t.length>160&&jQuery("#seopress_titles_desc_counters").css("color","red"),pixelDesc(t)>940&&jQuery("#seopress_titles_desc_pixel").css("color","red"),0==t.length&&(s.length>160&&jQuery("#seopress_titles_desc_counters").css("color","red"),pixelDesc(s)>940&&jQuery("#seopress_titles_desc_pixel").css("color","red")),t.length>0?(jQuery("#seopress_titles_desc_counters").text(t.length),jQuery("#seopress_titles_desc_pixel").text(pixelDesc(t))):s.length&&(jQuery("#seopress_titles_desc_counters").text(s.length),jQuery("#seopress_titles_desc_pixel").text(pixelDesc(s))),t.length>0?(jQuery(".snippet-description-custom").text(e.target.value),jQuery(".snippet-description").css("display","none"),jQuery(".snippet-description-custom").css("display","inline"),jQuery(".snippet-description-default").css("display","none")):0==t.length&&(jQuery(".snippet-description-default").css("display","inline"),jQuery(".snippet-description-custom").css("display","none"),jQuery(".snippet-description").css("display","none")),t.length)var i=Math.round(pixelDesc(t)/940*100);else i=Math.round(pixelDesc(s)/940*100);i>=100&&(i=100),jQuery("#seopress_titles_desc_counters_progress").attr("aria-valuenow",i),jQuery("#seopress_titles_desc_counters_progress").text(i+"%"),jQuery("#seopress_titles_desc_counters_progress").css("width",i+"%")}),jQuery("#excerpt, .editor-post-excerpt textarea").keyup(function(e){var t=jQuery("#seopress_titles_desc_meta").val(),s=jQuery("#seopress_titles_desc_meta").attr("placeholder");if(0==t.length&&0==jQuery(".snippet-description-custom").val().length&&(jQuery(".snippet-description-custom").text(e.target.value),jQuery(".snippet-description").css("display","none"),jQuery(".snippet-description-custom").css("display","inline"),jQuery(".snippet-description-default").css("display","none")),t.length)var i=t.length;else i=s.length;i>=100&&(i=100),jQuery("#seopress_titles_desc_counters_progress").attr("aria-valuenow",i),jQuery("#seopress_titles_desc_counters_progress").text(i+"%"),jQuery("#seopress_titles_desc_counters_progress").css("width",i+"%")})}function pixelTitle(e){return inputText=e,font="18px Arial",canvas=document.createElement("canvas"),context=canvas.getContext("2d"),context.font=font,width=context.measureText(inputText).width,formattedWidth=Math.ceil(width),formattedWidth}function pixelDesc(e){return inputText=e,font="14px Arial",canvas=document.createElement("canvas"),context=canvas.getContext("2d"),context.font=font,width=context.measureText(inputText).width,formattedWidth=Math.ceil(width),formattedWidth}function sp_is_valid_url(e){var t=e.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g);return null!==t}function sp_social_img(e){jQuery(".snippet-"+e+"-img-alert").css("display","none");var t=jQuery("#seopress_social_"+e+"_img_meta").val();if(""==t)t=jQuery("#seopress_social_"+e+"_img_meta").attr("placeholder");!0===sp_is_valid_url(t)?(t.length>0?(jQuery(".snippet-"+e+"-img-custom img").attr("src",t),jQuery(".snippet-"+e+"-img").css("display","none"),jQuery(".snippet-"+e+"-img-custom").css("display","block"),jQuery(".snippet-"+e+"-img-default").css("display","none")):0==t.length&&(jQuery(".snippet-"+e+"-img-default").css("display","block"),jQuery(".snippet-"+e+"-img-custom").css("display","none"),jQuery(".snippet-"+e+"-img").css("display","none")),t.length>0&&jQuery.get(t).done(function(){var s=t.split(/\#|\?/)[0].split(".").pop().trim(),i=["jpg","jpeg","gif","png"];if(-1==i.indexOf(s))jQuery(".snippet-"+e+"-img-alert.alert1").css("display","block");else{var r=new Image;r.src=t,jQuery(r).one("load",function(){pic_real_width=parseInt(r.width),pic_real_height=parseInt(r.height),"fb"==e?(min_width=200,min_height=200):(min_width=144,min_height=144),(pic_real_width<min_width||pic_real_height<min_height)&&jQuery(".snippet-"+e+"-img-alert.alert2").css("display","block"),ratio_img=(pic_real_width/pic_real_height).toFixed(2),jQuery(".snippet-"+e+"-img-alert.alert4").css("display","block"),jQuery(".snippet-"+e+"-img-alert.alert4 span").text(ratio_img)})}}).fail(function(){jQuery(".snippet-"+e+"-img-alert.alert3").css("display","block")})):jQuery(".snippet-"+e+"-img-alert.alert5").css("display","block")}function sp_social(){jQuery("#seopress_social_fb_title_meta, #seopress-tag-single-title, #seopress-tag-single-site-title, #seopress-tag-single-sep").on("keyup paste change click",function(e){var t=jQuery("#seopress_social_fb_title_meta").val();t.length>0?(jQuery(".snippet-fb-title-custom").text(e.target.value),jQuery(".snippet-fb-title").css("display","none"),jQuery(".snippet-fb-title-custom").css("display","block"),jQuery(".snippet-fb-title-default").css("display","none")):0==t.length&&(jQuery(".snippet-fb-title-default").css("display","block"),jQuery(".snippet-fb-title-custom").css("display","none"),jQuery(".snippet-fb-title").css("display","none"))}),jQuery("#seopress_social_fb_desc_meta").on("keyup paste change click",function(e){var t=jQuery("#seopress_social_fb_desc_meta").val();t.length>0?(jQuery(".snippet-fb-description-custom").text(e.target.value),jQuery(".snippet-fb-description").css("display","none"),jQuery(".snippet-fb-description-custom").css("display","block"),jQuery(".snippet-fb-description-default").css("display","none")):0==t.length&&(jQuery(".snippet-fb-description-default").css("display","block"),jQuery(".snippet-fb-description-custom").css("display","none"),jQuery(".snippet-fb-description").css("display","none"))}),sp_social_img("fb"),jQuery("#seopress_social_fb_img_meta").on("keyup paste change click",function(){sp_social_img("fb")}),jQuery("#seopress_social_twitter_title_meta").on("keyup paste change click",function(e){var t=jQuery("#seopress_social_twitter_title_meta").val();t.length>0?(jQuery(".snippet-twitter-title-custom").text(e.target.value),jQuery(".snippet-twitter-title").css("display","none"),jQuery(".snippet-twitter-title-custom").css("display","block"),jQuery(".snippet-twitter-title-default").css("display","none")):0==t.length&&(jQuery(".snippet-twitter-title-default").css("display","block"),jQuery(".snippet-twitter-title-custom").css("display","none"),jQuery(".snippet-twitter-title").css("display","none"))}),jQuery("#seopress_social_twitter_desc_meta").on("keyup paste change click",function(e){var t=jQuery("#seopress_social_twitter_desc_meta").val();t.length>0?(jQuery(".snippet-twitter-description-custom").text(e.target.value),jQuery(".snippet-twitter-description").css("display","none"),jQuery(".snippet-twitter-description-custom").css("display","block"),jQuery(".snippet-twitter-description-default").css("display","none")):0==t.length&&(jQuery(".snippet-twitter-description-default").css("display","block"),jQuery(".snippet-twitter-description-custom").css("display","none"),jQuery(".snippet-twitter-description").css("display","none"))}),sp_social_img("twitter"),jQuery("#seopress_social_twitter_img_meta").on("keyup paste change click",function(){sp_social_img("twitter")})}function sp_ca_toggle(){var e=!1;jQuery(".gr-analysis-title .btn-toggle").on("click",function(t){e&&(event.stopImmediatePropagation(),event.preventDefault(),e=!1),jQuery(this).toggleClass("open"),jQuery(this).parent().parent().next(".gr-analysis-content").toggle()}),jQuery("#expand-all").on("click",function(e){e.preventDefault(),jQuery(".gr-analysis-content").show()}),jQuery("#close-all").on("click",function(e){e.preventDefault(),jQuery(".gr-analysis-content").hide()})}jQuery(document).ready(function(e){function t(){e.ajax({method:"GET",url:seopressAjaxRealPreview.seopress_real_preview,data:{action:"seopress_do_real_preview",post_id:e("#seopress-tabs").attr("data_id"),tax_name:e("#seopress-tabs").attr("data_tax"),origin:e("#seopress-tabs").attr("data_origin"),post_type:e("#seopress_launch_analysis").attr("data_post_type"),seopress_analysis_target_kw:e("#seopress_analysis_target_kw_meta").val(),_ajax_nonce:seopressAjaxRealPreview.seopress_nonce},beforeSend:function(){e(".analysis-score p span").fadeIn().text(seopressAjaxRealPreview.i18n.progress),e(".analysis-score p").addClass("loading")},success:function(t){void 0===t.data.og_title?og_title="":og_title=t.data.og_title.values,void 0===t.data.og_desc?og_desc="":og_desc=t.data.og_desc.values,void 0===t.data.og_img?og_img="":og_img=t.data.og_img.values,void 0===t.data.og_url?og_url="":og_url=t.data.og_url.host,void 0===t.data.og_site_name?og_site_name="":og_site_name=t.data.og_site_name.values,void 0===t.data.tw_title?tw_title="":tw_title=t.data.tw_title.values,void 0===t.data.tw_desc?tw_desc="":tw_desc=t.data.tw_desc.values,void 0===t.data.tw_img?tw_img="":tw_img=t.data.tw_img.values,void 0===t.data.meta_robots?meta_robots="":meta_robots=t.data.meta_robots[0];var s={og_title:og_title,og_desc:og_desc,og_img:og_img,og_url:og_url,og_site_name:og_site_name,tw_title:tw_title,tw_desc:tw_desc,tw_img:tw_img};for(var i in s)s.length&&(i=s[i].length>1?s[i].slice(-1)[0]:s[i][0]);meta_robots=meta_robots.toString(),e("#sp-advanced-alert").empty();var r=new RegExp("noindex");r.test(meta_robots)&&e("#sp-advanced-alert").append('<span class="impact high" aria-hidden="true"></span>'),e("#seopress_cpt .google-snippet-preview .snippet-title").html(t.data.title),e("#seopress_cpt .google-snippet-preview .snippet-title-default").html(t.data.title),e("#seopress_titles_title_meta").attr("placeholder",t.data.title),e("#seopress_cpt .google-snippet-preview .snippet-description").html(t.data.meta_desc),e("#seopress_cpt .google-snippet-preview .snippet-description-default").html(t.data.meta_desc),e("#seopress_titles_desc_meta").attr("placeholder",t.data.meta_desc),s.og_title&&(e("#seopress_cpt #seopress_social_fb_title_meta").attr("placeholder",s.og_title[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-title").html(s.og_title[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-title-default").html(s.og_title[0])),s.og_desc&&(e("#seopress_cpt #seopress_social_fb_desc_meta").attr("placeholder",s.og_desc[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-description").html(s.og_desc[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-description-default").html(s.og_desc[0])),s.og_img&&(e("#seopress_cpt #seopress_social_fb_img_meta").attr("placeholder",s.og_img[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-img img").attr("src",s.og_img[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-img-default img").attr("src",s.og_img[0])),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-url").html(s.og_url),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-site-name").html(s.og_site_name),s.tw_title&&(e("#seopress_cpt #seopress_social_twitter_title_meta").attr("placeholder",s.tw_title[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-title").html(s.tw_title[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-title-default").html(s.tw_title[0])),s.tw_desc&&(e("#seopress_cpt #seopress_social_twitter_desc_meta").attr("placeholder",s.tw_desc[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-description").html(s.tw_desc[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-description-default").html(s.tw_desc[0])),s.tw_img&&(e("#seopress_cpt #seopress_social_twitter_img_meta").attr("placeholder",s.tw_img[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-img img").attr("src",s.tw_img[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-img-default img").attr("src",s.tw_img[0])),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-url").html(s.og_url),e("#seopress_cpt #seopress_robots_canonical_meta").attr("placeholder",t.data.canonical),e("#seopress-analysis-tabs").load(" #seopress-analysis-tabs-1","",sp_ca_toggle),e(".analysis-score p").removeClass("loading"),e(" #seopress_titles_title_counters_val").remove(),e(" #seopress_titles_desc_counters_val").remove(),sp_titles_counters(),sp_meta_desc_counters(),sp_social()}})}var s=document.querySelector("input[id=seopress_analysis_target_kw_meta]");new Tagify(s,{originalInputValueFormat:e=>e.map(e=>e.value).join(",")}),"1"==jQuery("#toggle-preview").attr("data-toggle")?jQuery("#seopress_cpt .google-snippet-preview").addClass("mobile-preview"):jQuery("#seopress_cpt .google-snippet-preview").removeClass("mobile-preview"),jQuery("#toggle-preview").on("click",function(){jQuery("#toggle-preview").attr("data-toggle","1"==jQuery("#toggle-preview").attr("data-toggle")?"0":"1"),jQuery("#seopress_cpt .google-snippet-preview").toggleClass("mobile-preview")}),t(),e("#seopress_launch_analysis").on("click",function(){t()}),sp_ca_toggle()});
1
+ function sp_titles_counters(){var meta_title_val=jQuery("#seopress_titles_title_meta").val(),meta_title_placeholder=jQuery("#seopress_titles_title_meta").attr("placeholder");if(jQuery("#seopress_titles_title_counters").after('<div id="seopress_titles_title_counters_val">/ 60</div>'),meta_title_val.length>0?(jQuery("#seopress_titles_title_counters").text(meta_title_val.length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(meta_title_val))):meta_title_placeholder.length&&(jQuery("#seopress_titles_title_counters").text(meta_title_placeholder.length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(meta_title_placeholder))),meta_title_val.length>60?jQuery("#seopress_titles_title_counters").css("color","red"):meta_title_placeholder.length>60&&jQuery("#seopress_titles_title_counters").css("color","red"),pixelTitle(meta_title_val)>568?jQuery("#seopress_titles_title_pixel").css("color","red"):pixelTitle(meta_title_placeholder)>568&&jQuery("#seopress_titles_title_pixel").css("color","red"),meta_title_val.length)var progress=Math.round(pixelTitle(meta_title_val)/568*100);else var progress=Math.round(pixelTitle(meta_title_placeholder)/568*100);progress>=100&&(progress=100),jQuery("#seopress_titles_title_counters_progress").attr("aria-valuenow",progress),jQuery("#seopress_titles_title_counters_progress").text(progress+"%"),jQuery("#seopress_titles_title_counters_progress").css("width",progress+"%"),jQuery("#seopress_titles_title_meta, #seopress-tag-single-title, #seopress-tag-single-site-title, #seopress-tag-single-sep").on("keyup paste change click",(function(e){var meta_title_val=jQuery("#seopress_titles_title_meta").val(),meta_title_placeholder=jQuery("#seopress_titles_title_meta").attr("placeholder");if(jQuery("#seopress_titles_title_counters").css("color","inherit"),jQuery("#seopress_titles_title_pixel").css("color","inherit"),meta_title_val.length>60&&jQuery("#seopress_titles_title_counters").css("color","red"),pixelTitle(meta_title_val)>568&&jQuery("#seopress_titles_title_pixel").css("color","red"),0==meta_title_val.length&&(meta_title_placeholder.length>60&&jQuery("#seopress_titles_title_counters").css("color","red"),pixelTitle(meta_title_placeholder)>568&&jQuery("#seopress_titles_title_pixel").css("color","red")),meta_title_val.length>0?(jQuery("#seopress_titles_title_counters").text(meta_title_val.length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(meta_title_val))):meta_title_placeholder.length&&(jQuery("#seopress_titles_title_counters").text(meta_title_placeholder.length),jQuery("#seopress_titles_title_pixel").text(pixelTitle(meta_title_placeholder))),meta_title_val.length>0?(jQuery(".snippet-title-custom").text(e.target.value),jQuery(".snippet-title").css("display","none"),jQuery(".snippet-title-custom").css("display","block"),jQuery(".snippet-title-default").css("display","none")):0==meta_title_val.length&&(jQuery(".snippet-title-default").css("display","block"),jQuery(".snippet-title-custom").css("display","none"),jQuery(".snippet-title").css("display","none")),meta_title_val.length)var progress=Math.round(pixelTitle(meta_title_val)/568*100);else var progress=Math.round(pixelTitle(meta_title_placeholder)/568*100);progress>=100&&(progress=100),jQuery("#seopress_titles_title_counters_progress").attr("aria-valuenow",progress),jQuery("#seopress_titles_title_counters_progress").text(progress+"%"),jQuery("#seopress_titles_title_counters_progress").css("width",progress+"%")}))}function sp_meta_desc_counters(){var meta_desc_val=jQuery("#seopress_titles_desc_meta").val(),meta_desc_placeholder=jQuery("#seopress_titles_desc_meta").attr("placeholder");if(jQuery("#seopress_titles_desc_counters").after('<div id="seopress_titles_desc_counters_val">/ 160</div>'),meta_desc_val.length>0?(jQuery("#seopress_titles_desc_counters").text(meta_desc_val.length),jQuery("#seopress_titles_desc_pixel").text(pixelDesc(meta_desc_val))):meta_desc_placeholder.length&&(jQuery("#seopress_titles_desc_counters").text(meta_desc_placeholder.length),jQuery("#seopress_titles_desc_pixel").text(pixelDesc(meta_desc_placeholder))),meta_desc_val.length>160?jQuery("#seopress_titles_desc_counters").css("color","red"):meta_desc_placeholder.length>160&&jQuery("#seopress_titles_desc_counters").css("color","red"),pixelDesc(meta_desc_val)>940?jQuery("#seopress_titles_desc_pixel").css("color","red"):pixelDesc(meta_desc_placeholder)>940&&jQuery("#seopress_titles_desc_pixel").css("color","red"),meta_desc_val.length)var progress=Math.round(pixelDesc(meta_desc_val)/940*100);else var progress=Math.round(pixelDesc(meta_desc_placeholder)/940*100);progress>=100&&(progress=100),jQuery("#seopress_titles_desc_counters_progress").attr("aria-valuenow",progress),jQuery("#seopress_titles_desc_counters_progress").text(progress+"%"),jQuery("#seopress_titles_desc_counters_progress").css("width",progress+"%"),jQuery("#seopress_titles_desc_meta, #seopress-tag-single-excerpt").on("keyup paste change click",(function(e){var meta_desc_val=jQuery("#seopress_titles_desc_meta").val(),meta_desc_placeholder=jQuery("#seopress_titles_desc_meta").attr("placeholder");if(jQuery("#seopress_titles_desc_counters").css("color","inherit"),jQuery("#seopress_titles_desc_pixel").css("color","inherit"),meta_desc_val.length>160&&jQuery("#seopress_titles_desc_counters").css("color","red"),pixelDesc(meta_desc_val)>940&&jQuery("#seopress_titles_desc_pixel").css("color","red"),0==meta_desc_val.length&&(meta_desc_placeholder.length>160&&jQuery("#seopress_titles_desc_counters").css("color","red"),pixelDesc(meta_desc_placeholder)>940&&jQuery("#seopress_titles_desc_pixel").css("color","red")),meta_desc_val.length>0?(jQuery("#seopress_titles_desc_counters").text(meta_desc_val.length),jQuery("#seopress_titles_desc_pixel").text(pixelDesc(meta_desc_val))):meta_desc_placeholder.length&&(jQuery("#seopress_titles_desc_counters").text(meta_desc_placeholder.length),jQuery("#seopress_titles_desc_pixel").text(pixelDesc(meta_desc_placeholder))),meta_desc_val.length>0?(jQuery(".snippet-description-custom").text(e.target.value),jQuery(".snippet-description").css("display","none"),jQuery(".snippet-description-custom").css("display","inline"),jQuery(".snippet-description-default").css("display","none")):0==meta_desc_val.length&&(jQuery(".snippet-description-default").css("display","inline"),jQuery(".snippet-description-custom").css("display","none"),jQuery(".snippet-description").css("display","none")),meta_desc_val.length)var progress=Math.round(pixelDesc(meta_desc_val)/940*100);else var progress=Math.round(pixelDesc(meta_desc_placeholder)/940*100);progress>=100&&(progress=100),jQuery("#seopress_titles_desc_counters_progress").attr("aria-valuenow",progress),jQuery("#seopress_titles_desc_counters_progress").text(progress+"%"),jQuery("#seopress_titles_desc_counters_progress").css("width",progress+"%")})),jQuery("#excerpt, .editor-post-excerpt textarea").keyup((function(e){var meta_desc_val=jQuery("#seopress_titles_desc_meta").val(),meta_desc_placeholder=jQuery("#seopress_titles_desc_meta").attr("placeholder");if(0==meta_desc_val.length&&0==jQuery(".snippet-description-custom").val().length&&(jQuery(".snippet-description-custom").text(e.target.value),jQuery(".snippet-description").css("display","none"),jQuery(".snippet-description-custom").css("display","inline"),jQuery(".snippet-description-default").css("display","none")),meta_desc_val.length)var progress=meta_desc_val.length;else var progress=meta_desc_placeholder.length;progress>=100&&(progress=100),jQuery("#seopress_titles_desc_counters_progress").attr("aria-valuenow",progress),jQuery("#seopress_titles_desc_counters_progress").text(progress+"%"),jQuery("#seopress_titles_desc_counters_progress").css("width",progress+"%")}))}function pixelTitle(e){return inputText=e,font="18px Arial",canvas=document.createElement("canvas"),context=canvas.getContext("2d"),context.font=font,width=context.measureText(inputText).width,formattedWidth=Math.ceil(width),formattedWidth}function pixelDesc(e){return inputText=e,font="14px Arial",canvas=document.createElement("canvas"),context=canvas.getContext("2d"),context.font=font,width=context.measureText(inputText).width,formattedWidth=Math.ceil(width),formattedWidth}function sp_is_valid_url(string){var res;return null!==string.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)}function sp_social_img(social_slug){var meta_img_val;if(jQuery(".snippet-"+social_slug+"-img-alert").css("display","none"),""==(meta_img_val=jQuery("#seopress_social_"+social_slug+"_img_meta").val()))var meta_img_val=jQuery("#seopress_social_"+social_slug+"_img_meta").attr("placeholder");!0===sp_is_valid_url(meta_img_val)?(meta_img_val.length>0?(jQuery(".snippet-"+social_slug+"-img-custom img").attr("src",meta_img_val),jQuery(".snippet-"+social_slug+"-img").css("display","none"),jQuery(".snippet-"+social_slug+"-img-custom").css("display","block"),jQuery(".snippet-"+social_slug+"-img-default").css("display","none")):0==meta_img_val.length&&(jQuery(".snippet-"+social_slug+"-img-default").css("display","block"),jQuery(".snippet-"+social_slug+"-img-custom").css("display","none"),jQuery(".snippet-"+social_slug+"-img").css("display","none")),meta_img_val.length>0&&jQuery.get(meta_img_val).done((function(){var meta_img_filetype=meta_img_val.split(/\#|\?/)[0].split(".").pop().trim(),types;if(-1==["jpg","jpeg","gif","png"].indexOf(meta_img_filetype))jQuery(".snippet-"+social_slug+"-img-alert.alert1").css("display","block");else{var tmp_img=new Image;tmp_img.src=meta_img_val,jQuery(tmp_img).one("load",(function(){pic_real_width=parseInt(tmp_img.width),pic_real_height=parseInt(tmp_img.height),"fb"==social_slug?(min_width=200,min_height=200):(min_width=144,min_height=144),(pic_real_width<min_width||pic_real_height<min_height)&&jQuery(".snippet-"+social_slug+"-img-alert.alert2").css("display","block"),ratio_img=(pic_real_width/pic_real_height).toFixed(2),jQuery(".snippet-"+social_slug+"-img-alert.alert4").css("display","block"),jQuery(".snippet-"+social_slug+"-img-alert.alert4 span").text(ratio_img)}))}})).fail((function(){jQuery(".snippet-"+social_slug+"-img-alert.alert3").css("display","block")}))):jQuery(".snippet-"+social_slug+"-img-alert.alert5").css("display","block")}function sp_social(){jQuery("#seopress_social_fb_title_meta, #seopress-tag-single-title, #seopress-tag-single-site-title, #seopress-tag-single-sep").on("keyup paste change click",(function(e){var meta_fb_title_val=jQuery("#seopress_social_fb_title_meta").val();meta_fb_title_val.length>0?(jQuery(".snippet-fb-title-custom").text(e.target.value),jQuery(".snippet-fb-title").css("display","none"),jQuery(".snippet-fb-title-custom").css("display","block"),jQuery(".snippet-fb-title-default").css("display","none")):0==meta_fb_title_val.length&&(jQuery(".snippet-fb-title-default").css("display","block"),jQuery(".snippet-fb-title-custom").css("display","none"),jQuery(".snippet-fb-title").css("display","none"))})),jQuery("#seopress_social_fb_desc_meta").on("keyup paste change click",(function(e){var meta_fb_desc_val=jQuery("#seopress_social_fb_desc_meta").val();meta_fb_desc_val.length>0?(jQuery(".snippet-fb-description-custom").text(e.target.value),jQuery(".snippet-fb-description").css("display","none"),jQuery(".snippet-fb-description-custom").css("display","block"),jQuery(".snippet-fb-description-default").css("display","none")):0==meta_fb_desc_val.length&&(jQuery(".snippet-fb-description-default").css("display","block"),jQuery(".snippet-fb-description-custom").css("display","none"),jQuery(".snippet-fb-description").css("display","none"))})),sp_social_img("fb"),jQuery("#seopress_social_fb_img_meta").on("keyup paste change click",(function(){sp_social_img("fb")})),jQuery("#seopress_social_twitter_title_meta").on("keyup paste change click",(function(e){var meta_fb_title_val=jQuery("#seopress_social_twitter_title_meta").val();meta_fb_title_val.length>0?(jQuery(".snippet-twitter-title-custom").text(e.target.value),jQuery(".snippet-twitter-title").css("display","none"),jQuery(".snippet-twitter-title-custom").css("display","block"),jQuery(".snippet-twitter-title-default").css("display","none")):0==meta_fb_title_val.length&&(jQuery(".snippet-twitter-title-default").css("display","block"),jQuery(".snippet-twitter-title-custom").css("display","none"),jQuery(".snippet-twitter-title").css("display","none"))})),jQuery("#seopress_social_twitter_desc_meta").on("keyup paste change click",(function(e){var meta_fb_desc_val=jQuery("#seopress_social_twitter_desc_meta").val();meta_fb_desc_val.length>0?(jQuery(".snippet-twitter-description-custom").text(e.target.value),jQuery(".snippet-twitter-description").css("display","none"),jQuery(".snippet-twitter-description-custom").css("display","block"),jQuery(".snippet-twitter-description-default").css("display","none")):0==meta_fb_desc_val.length&&(jQuery(".snippet-twitter-description-default").css("display","block"),jQuery(".snippet-twitter-description-custom").css("display","none"),jQuery(".snippet-twitter-description").css("display","none"))})),sp_social_img("twitter"),jQuery("#seopress_social_twitter_img_meta").on("keyup paste change click",(function(){sp_social_img("twitter")}))}function sp_ca_toggle(){var stop=!1;jQuery(".gr-analysis-title .btn-toggle").on("click",(function(e){stop&&(event.stopImmediatePropagation(),event.preventDefault(),stop=!1),jQuery(this).toggleClass("open"),jQuery(this).parent().parent().next(".gr-analysis-content").toggle()})),jQuery("#expand-all").on("click",(function(e){e.preventDefault(),jQuery(".gr-analysis-content").show()})),jQuery("#close-all").on("click",(function(e){e.preventDefault(),jQuery(".gr-analysis-content").hide()}))}var input=document.querySelector("input[id=seopress_analysis_target_kw_meta]"),target_kw=new Tagify(input,{originalInputValueFormat:valuesArr=>valuesArr.map(item=>item.value).join(",")});function seopress_google_suggest(data){var raw_suggestions,suggestions_array=String(data).split(","),i;for(i=0;i<suggestions_array.length;i++)null!=suggestions_array[i]&&null!=suggestions_array[i]&&""!=suggestions_array[i]&&"[object Object]"!=suggestions_array[i]&&(document.getElementById("seopress_suggestions").innerHTML+='<li><a href="#" class="sp-suggest-btn button button-small">'+suggestions_array[i]+"</a></li>");jQuery(".sp-suggest-btn").click((function(e){e.preventDefault(),target_kw.addTags(jQuery(this).text())}))}jQuery(document).ready((function(e){function s(){e.ajax({method:"GET",url:seopressAjaxRealPreview.seopress_real_preview,data:{action:"seopress_do_real_preview",post_id:e("#seopress-tabs").attr("data_id"),tax_name:e("#seopress-tabs").attr("data_tax"),origin:e("#seopress-tabs").attr("data_origin"),post_type:e("#seopress_launch_analysis").attr("data_post_type"),seopress_analysis_target_kw:e("#seopress_analysis_target_kw_meta").val(),_ajax_nonce:seopressAjaxRealPreview.seopress_nonce},beforeSend:function(){e(".analysis-score p span").fadeIn().text(seopressAjaxRealPreview.i18n.progress),e(".analysis-score p").addClass("loading")},success:function(s){void 0===s.data.og_title?og_title="":og_title=s.data.og_title.values,void 0===s.data.og_desc?og_desc="":og_desc=s.data.og_desc.values,void 0===s.data.og_img?og_img="":og_img=s.data.og_img.values,void 0===s.data.og_url?og_url="":og_url=s.data.og_url.host,void 0===s.data.og_site_name?og_site_name="":og_site_name=s.data.og_site_name.values,void 0===s.data.tw_title?tw_title="":tw_title=s.data.tw_title.values,void 0===s.data.tw_desc?tw_desc="":tw_desc=s.data.tw_desc.values,void 0===s.data.tw_img?tw_img="":tw_img=s.data.tw_img.values,void 0===s.data.meta_robots?meta_robots="":meta_robots=s.data.meta_robots[0];var data_arr={og_title:og_title,og_desc:og_desc,og_img:og_img,og_url:og_url,og_site_name:og_site_name,tw_title:tw_title,tw_desc:tw_desc,tw_img:tw_img},if_noindex;for(var key in data_arr)data_arr.length&&(key=data_arr[key].length>1?data_arr[key].slice(-1)[0]:data_arr[key][0]);meta_robots=meta_robots.toString(),e("#sp-advanced-alert").empty(),new RegExp("noindex").test(meta_robots)&&e("#sp-advanced-alert").append('<span class="impact high" aria-hidden="true"></span>'),e("#seopress_cpt .google-snippet-preview .snippet-title").html(s.data.title),e("#seopress_cpt .google-snippet-preview .snippet-title-default").html(s.data.title),e("#seopress_titles_title_meta").attr("placeholder",s.data.title),e("#seopress_cpt .google-snippet-preview .snippet-description").html(s.data.meta_desc),e("#seopress_cpt .google-snippet-preview .snippet-description-default").html(s.data.meta_desc),e("#seopress_titles_desc_meta").attr("placeholder",s.data.meta_desc),data_arr.og_title&&(e("#seopress_cpt #seopress_social_fb_title_meta").attr("placeholder",data_arr.og_title[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-title").html(data_arr.og_title[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-title-default").html(data_arr.og_title[0])),data_arr.og_desc&&(e("#seopress_cpt #seopress_social_fb_desc_meta").attr("placeholder",data_arr.og_desc[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-description").html(data_arr.og_desc[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-description-default").html(data_arr.og_desc[0])),data_arr.og_img&&(e("#seopress_cpt #seopress_social_fb_img_meta").attr("placeholder",data_arr.og_img[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-img img").attr("src",data_arr.og_img[0]),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-img-default img").attr("src",data_arr.og_img[0])),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-url").html(data_arr.og_url),e("#seopress_cpt .facebook-snippet-preview .snippet-fb-site-name").html(data_arr.og_site_name),data_arr.tw_title&&(e("#seopress_cpt #seopress_social_twitter_title_meta").attr("placeholder",data_arr.tw_title[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-title").html(data_arr.tw_title[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-title-default").html(data_arr.tw_title[0])),data_arr.tw_desc&&(e("#seopress_cpt #seopress_social_twitter_desc_meta").attr("placeholder",data_arr.tw_desc[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-description").html(data_arr.tw_desc[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-description-default").html(data_arr.tw_desc[0])),data_arr.tw_img&&(e("#seopress_cpt #seopress_social_twitter_img_meta").attr("placeholder",data_arr.tw_img[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-img img").attr("src",data_arr.tw_img[0]),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-img-default img").attr("src",data_arr.tw_img[0])),e("#seopress_cpt .twitter-snippet-preview .snippet-twitter-url").html(data_arr.og_url),e("#seopress_cpt #seopress_robots_canonical_meta").attr("placeholder",s.data.canonical),e("#seopress-analysis-tabs").load(" #seopress-analysis-tabs-1","",sp_ca_toggle),e(".analysis-score p").removeClass("loading"),e(" #seopress_titles_title_counters_val").remove(),e(" #seopress_titles_desc_counters_val").remove(),sp_titles_counters(),sp_meta_desc_counters(),sp_social()}})}"1"==jQuery("#toggle-preview").attr("data-toggle")?jQuery("#seopress_cpt .google-snippet-preview").addClass("mobile-preview"):jQuery("#seopress_cpt .google-snippet-preview").removeClass("mobile-preview"),jQuery("#toggle-preview").on("click",(function(){jQuery("#toggle-preview").attr("data-toggle","1"==jQuery("#toggle-preview").attr("data-toggle")?"0":"1"),jQuery("#seopress_cpt .google-snippet-preview").toggleClass("mobile-preview")})),s(),e("#seopress_launch_analysis").on("click",(function(){s()})),sp_ca_toggle()}));
inc/admin/admin-metaboxes-content-analysis-form.php CHANGED
@@ -49,28 +49,6 @@ if ( is_plugin_active( 'wp-seopress-pro/seopress-pro.php' ) ) {
49
  }
50
 
51
  echo "<script>
52
- function seopress_google_suggest(data){
53
- var raw_suggestions = String(data);
54
- var suggestions_array = raw_suggestions.split(',');
55
-
56
- var i;
57
- for (i = 0; i < suggestions_array.length; i++) {
58
- if (suggestions_array[i] != null && suggestions_array[i] != undefined && suggestions_array[i] !='' && suggestions_array[i] !='[object Object]') {
59
- document.getElementById('seopress_suggestions').innerHTML += '<li><a href=\"#\" class=\"sp-suggest-btn button button-small\">'+suggestions_array[i]+'</a></li>';
60
- }
61
- }
62
-
63
- jQuery('.sp-suggest-btn').click(function(e) {
64
- e.preventDefault();
65
- if(jQuery('#seopress_analysis_target_kw_meta').val().length == 0){
66
- jQuery('#seopress_analysis_target_kw_meta').val(jQuery(this).text() + ',');
67
- } else {
68
- str = jQuery('#seopress_analysis_target_kw_meta').val();
69
- str = str.replace(/,\s*$/, '');
70
- jQuery('#seopress_analysis_target_kw_meta').val(str+','+jQuery(this).text());
71
- }
72
- });
73
- }
74
  jQuery('#seopress_get_suggestions').on('click', function(data) {
75
  data.preventDefault();
76
 
49
  }
50
 
51
  echo "<script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  jQuery('#seopress_get_suggestions').on('click', function(data) {
53
  data.preventDefault();
54
 
inc/admin/admin-metaboxes.php CHANGED
@@ -441,6 +441,11 @@ function seopress_display_ca_metaboxe() {
441
  $prefix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
442
  wp_nonce_field( plugin_basename( __FILE__ ), 'seopress_content_analysis_nonce' );
443
 
 
 
 
 
 
444
  wp_enqueue_script( 'seopress-cpt-counters-js', plugins_url( 'assets/js/seopress-counters' . $prefix . '.js', dirname(dirname( __FILE__ ))), array( 'jquery', 'jquery-ui-tabs', 'jquery-ui-accordion' ), SEOPRESS_VERSION );
445
  $seopress_real_preview = array(
446
  'seopress_nonce' => wp_create_nonce('seopress_real_preview_nonce'),
441
  $prefix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
442
  wp_nonce_field( plugin_basename( __FILE__ ), 'seopress_content_analysis_nonce' );
443
 
444
+ //Tagify
445
+ wp_enqueue_script( 'seopress-tagify-js', plugins_url( 'assets/js/tagify.min.js', dirname( dirname( __FILE__ ) ) ), [ 'jquery' ], SEOPRESS_VERSION, true );
446
+ wp_register_style('seopress-tagify', plugins_url('assets/css/tagify.min.css', dirname( dirname( __FILE__ ) ) ), [], SEOPRESS_VERSION);
447
+ wp_enqueue_style('seopress-tagify');
448
+
449
  wp_enqueue_script( 'seopress-cpt-counters-js', plugins_url( 'assets/js/seopress-counters' . $prefix . '.js', dirname(dirname( __FILE__ ))), array( 'jquery', 'jquery-ui-tabs', 'jquery-ui-accordion' ), SEOPRESS_VERSION );
450
  $seopress_real_preview = array(
451
  'seopress_nonce' => wp_create_nonce('seopress_real_preview_nonce'),
inc/admin/admin-term-metaboxes.php CHANGED
@@ -194,6 +194,11 @@ function seopress_display_seo_term_metaboxe() {
194
  wp_enqueue_script( 'seopress-cpt-tabs-js', plugins_url( 'assets/js/seopress-tabs2.js', dirname(dirname(__FILE__ ))), array( 'jquery-ui-tabs' ), SEOPRESS_VERSION);
195
 
196
  if ("seopress_404" != $typenow) {
 
 
 
 
 
197
  //Register Google Snippet Preview / Content Analysis JS
198
  wp_enqueue_script( 'seopress-cpt-counters-js', plugins_url( 'assets/js/seopress-counters.min.js', dirname(dirname( __FILE__ ))), array( 'jquery', 'jquery-ui-tabs', 'jquery-ui-accordion' ), SEOPRESS_VERSION );
199
 
194
  wp_enqueue_script( 'seopress-cpt-tabs-js', plugins_url( 'assets/js/seopress-tabs2.js', dirname(dirname(__FILE__ ))), array( 'jquery-ui-tabs' ), SEOPRESS_VERSION);
195
 
196
  if ("seopress_404" != $typenow) {
197
+ //Tagify
198
+ wp_enqueue_script( 'seopress-tagify-js', plugins_url( 'assets/js/tagify.min.js', dirname( dirname( __FILE__ ) ) ), [ 'jquery' ], SEOPRESS_VERSION, true );
199
+ wp_register_style('seopress-tagify', plugins_url('assets/css/tagify.min.css', dirname( dirname( __FILE__ ) ) ), [], SEOPRESS_VERSION);
200
+ wp_enqueue_style('seopress-tagify');
201
+
202
  //Register Google Snippet Preview / Content Analysis JS
203
  wp_enqueue_script( 'seopress-cpt-counters-js', plugins_url( 'assets/js/seopress-counters.min.js', dirname(dirname( __FILE__ ))), array( 'jquery', 'jquery-ui-tabs', 'jquery-ui-accordion' ), SEOPRESS_VERSION );
204
 
inc/admin/admin.php CHANGED
@@ -3087,12 +3087,12 @@ class seopress_options
3087
  echo '<pre style="margin:0;padding:10px;font-weight: bold;background:#F3F3F3;display:inline-block;width: 100%">
3088
  location ~ ([^/]*)sitemap(.*)\.x(m|s)l$ {
3089
  ## SEOPress
3090
- rewrite ^/sitemaps\.xml$ /index.php?seopress_sitemap=1 last;
3091
- rewrite ^/sitemaps/news.xml$ /index.php?seopress_news=$1 last;
3092
- rewrite ^/sitemaps/video.xml$ /index.php?seopress_video=$1 last;
3093
- rewrite ^/sitemaps/author.xml$ /index.php?seopress_author=$1 last;
3094
- rewrite ^/sitemaps_xsl\.xsl$ /index.php?seopress_sitemap_xsl=1 last;
3095
- rewrite ^/sitemaps/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?seopress_cpt=$1&seopress_paged=$2 last;
3096
  }
3097
  </pre>';
3098
  }
3087
  echo '<pre style="margin:0;padding:10px;font-weight: bold;background:#F3F3F3;display:inline-block;width: 100%">
3088
  location ~ ([^/]*)sitemap(.*)\.x(m|s)l$ {
3089
  ## SEOPress
3090
+ rewrite ^.*/sitemaps\.xml$ /index.php?seopress_sitemap=1 last;
3091
+ rewrite ^.*/sitemaps/news.xml$ /index.php?seopress_news=$1 last;
3092
+ rewrite ^.*/sitemaps/video.xml$ /index.php?seopress_video=$1 last;
3093
+ rewrite ^.*/sitemaps/author.xml$ /index.php?seopress_author=$1 last;
3094
+ rewrite ^.*/sitemaps_xsl\.xsl$ /index.php?seopress_sitemap_xsl=1 last;
3095
+ rewrite ^.*/sitemaps/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?seopress_cpt=$1&seopress_paged=$2 last;
3096
  }
3097
  </pre>';
3098
  }
inc/functions/options-google-analytics.php CHANGED
@@ -248,7 +248,7 @@ if (seopress_google_analytics_disable_option() =='1' && ( (empty($_COOKIE["seopr
248
  }
249
 
250
  function seopress_cookies_user_consent_styles(){
251
- $styles = '<style>.seopress-user-consent {left: 50%;position: fixed;z-index: 8000;padding: 20px;display: block;border: 1px solid #CCC;max-width:100%;';
252
 
253
  //Width
254
  if (seopress_google_analytics_cb_width_option() !='') {
@@ -294,7 +294,7 @@ if (seopress_google_analytics_disable_option() =='1' && ( (empty($_COOKIE["seopr
294
  $styles .= 'background:#F1F1F1;';
295
  }
296
 
297
- $styles .='}.seopress-user-consent p:first-child {margin-bottom:20px}.seopress-user-consent p {margin: 0;font-size: 0.8em;align-self: center;';
298
 
299
  //Text color
300
  if (seopress_google_analytics_cb_txt_col_option() !='') {
248
  }
249
 
250
  function seopress_cookies_user_consent_styles(){
251
+ $styles = '<style>.seopress-user-consent {left: 50%;position: fixed;z-index: 8000;padding: 20px;display: inline-flex;justify-content: center;border: 1px solid #CCC;max-width:100%;';
252
 
253
  //Width
254
  if (seopress_google_analytics_cb_width_option() !='') {
294
  $styles .= 'background:#F1F1F1;';
295
  }
296
 
297
+ $styles .='}@media (max-width: 782px) {.seopress-user-consent {display: block;}}.seopress-user-consent p:first-child {margin-right:20px}.seopress-user-consent p {margin: 0;font-size: 0.8em;align-self: center;';
298
 
299
  //Text color
300
  if (seopress_google_analytics_cb_txt_col_option() !='') {
inc/functions/options-social.php CHANGED
@@ -628,7 +628,7 @@ function seopress_social_fb_desc_home_option() {
628
  }
629
 
630
  function seopress_social_fb_desc_hook() {
631
- if (seopress_social_facebook_og_option() =='1') {
632
  global $post;
633
  //Init
634
  $seopress_social_og_desc ='';
@@ -1168,7 +1168,7 @@ function seopress_social_twitter_desc_home_option() {
1168
 
1169
  function seopress_social_twitter_desc_hook() {
1170
  //If Twitter cards enable
1171
- if (seopress_social_twitter_card_option() =='1') {
1172
  global $post;
1173
  setup_postdata( $post );
1174
  //Init
628
  }
629
 
630
  function seopress_social_fb_desc_hook() {
631
+ if (seopress_social_facebook_og_option() =='1' && !is_search()) {
632
  global $post;
633
  //Init
634
  $seopress_social_og_desc ='';
1168
 
1169
  function seopress_social_twitter_desc_hook() {
1170
  //If Twitter cards enable
1171
+ if (seopress_social_twitter_card_option() =='1' && !is_search()) {
1172
  global $post;
1173
  setup_postdata( $post );
1174
  //Init
inc/functions/options-titles-metas.php CHANGED
@@ -421,7 +421,7 @@ function seopress_titles_the_title() {
421
 
422
  foreach ($matches2['1'] as $key => $value) {
423
  $term = wp_get_post_terms( $post->ID, $value );
424
- if (!is_wp_error($term)) {
425
  $terms = esc_attr($term[0]->name);
426
  $seopress_titles_ct_template_replace_array[] = apply_filters('seopress_titles_custom_tax', $terms, $value);
427
  }
421
 
422
  foreach ($matches2['1'] as $key => $value) {
423
  $term = wp_get_post_terms( $post->ID, $value );
424
+ if (!is_wp_error($term) && isset($term[0])) {
425
  $terms = esc_attr($term[0]->name);
426
  $seopress_titles_ct_template_replace_array[] = apply_filters('seopress_titles_custom_tax', $terms, $value);
427
  }
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: SEO, XML sitemap, meta title, open graph, content analysis, knowledge grap
6
  Requires at least: 4.7+
7
  Tested up to: 5.5
8
  Requires PHP: 5.6
9
- Stable tag: 4.1.3
10
  License: GPLv2 or later
11
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -310,6 +310,15 @@ You're theme is probably using a deprecated function to handle the title. <a hre
310
  8. Installation Wizard
311
 
312
  == Changelog ==
 
 
 
 
 
 
 
 
 
313
  = 4.1.3 =
314
  * FIX PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Elementor\Core\Settings\Page\Manager::ajax_before_save_settings() must be of the type array, null given
315
  * FIX Delete bulk edit option for Redirections
@@ -366,55 +375,5 @@ You're theme is probably using a deprecated function to handle the title. <a hre
366
  * FIX Remove BuddyPress groups from Titles and settings if BuddyBoss or BuddyPress is not activated
367
  * FIX WooCommerce XML sitemaps product attributes
368
  * FIX Quotes with target keywords
369
- = 4.0.3 =
370
- * FIX Elementor CSS
371
- = 4.0.2 =
372
- * FIX Elementor missing features
373
- = 4.0.1 =
374
- * FIX Fatal Error Cannot redeclare seopress_title_columns() with TablePress
375
- * FIX Fatal Error wp-seopress-pro/inc/action-scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php
376
- * FIX Remove redirect notice
377
- = 4.0 <a href="https://www.seopress.org/blog/elementor-integration-semi-automatic-redirections-seopress-4-0/">Read our Blog post update</a> =
378
- * NEW Elementor integration (part 2): now with Google Preview and Content Analysis
379
- * NEW Semi-automatic redirections when you delete/change a slug (PRO) 🎉
380
- * NEW BuddyPress / BuddyBoss compatibility 🎉
381
- * NEW Chinese language for the Free version (PRO version will follow soon) 🎉
382
- * NEW Local Business widget to easily display your business address, phone and more! (PRO) 🎉 (Appearance > Widgets > Local Business)
383
- * NEW Notice in admin bar if you're site is globally set to noindex
384
- * NEW Notice in admin bar if you're CPT is globally set to noindex / nofollow
385
- * NEW Import your post and term metadata from wpSEO plugin (https://www.seopress.org/support/guides/import-post-and-terms-metadata-from-wpseo-to-seopress/)
386
- * NEW Notification in SEOPress Dashboard to warn TagDiv / Newspaper users about a compatibility issue
387
- * NEW Notification in SEOPress Dashboard to warn users if DIVI SEO options are enabled to avoid conflicts
388
- * NEW Notification in SEOPress Dashboard to warn users about a wrong configuration with permalink structure
389
- * NEW Dynamic variable for meta / custom schema: %%post_url%% - Post URL (ie: permalink)
390
- * NEW 'seopress_post_automatic_redirect' hook to disable automatic redirect suggestions (https://www.seopress.org/support/hooks/disable-automatic-redirect-suggestions/)
391
- * NEW 'seopress_titles_post_url' hook to filter post URL dynamic variable (https://www.seopress.org/support/hooks/filter-seopress_titles_post_url-dynamic-variable/)
392
- * NEW 'seopress_lb_widget_title' hook to filter Local Business widget title (https://www.seopress.org/support/hooks/filter-local-business-widget-title/)
393
- * NEW 'seopress_lb_widget_desc' hook to filter Local Business widget description (https://www.seopress.org/support/hooks/filter-local-business-widget-description/)
394
- * NEW 'seopress_lb_widget_street_address' hook to filter Local Business widget street address (https://www.seopress.org/support/hooks/filter-local-business-widget-street-address/)
395
- * NEW 'seopress_lb_widget_city' hook to filter Local Business widget city (https://www.seopress.org/support/hooks/filter-local-business-widget-city/)
396
- * NEW 'seopress_lb_widget_state' hook to filter Local Business widget state (https://www.seopress.org/support/hooks/filter-local-business-widget-state/)
397
- * NEW 'seopress_lb_widget_code' hook to filter Local Business widget postal code (https://www.seopress.org/support/hooks/filter-local-business-widget-postal-code/)
398
- * NEW 'seopress_lb_widget_country' hook to filter Local Business widget country (https://www.seopress.org/support/hooks/filter-local-business-widget-country/)
399
- * NEW 'seopress_lb_widget_map' hook to filter Local Business widget map (https://www.seopress.org/support/hooks/filter-local-business-widget-map-link/)
400
- * NEW 'seopress_lb_widget_phone' hook to filter Local Business widget phone number (https://www.seopress.org/support/hooks/filter-local-business-widget-phone-number/)
401
- * NEW 'seopress_lb_widget_opening_hours' hook to filter Local Business widget opening hours (https://www.seopress.org/support/hooks/filter-local-business-widget-opening-hours/)
402
- * NEW 'seopress_lb_widget_css' hook to filter Local Business widget custom inline css
403
- * INFO Automatically remove duplicate entries when importing redirections using a CSV file
404
- * INFO Updated the following translations: English, French, Spanish, German, Dutch, Russian, Japanese, Hindi, Portuguese
405
- * INFO Display Content Analysis Score columns in post type by default (SEO > Advanced > Appearance to customze the settings)
406
- * INFO Add additional checks to avoid fatal error when we set default values
407
- * INFO Improve schemas upgrader
408
- * INFO Improve UI for Structured Data Types metabox
409
- * INFO Improve help for XML sitemaps settings page
410
- * INFO Native WP XML sitemaps are now disabled only our sitemap feature is enabled (ON by default)
411
- * INFO Add some comments for translators
412
- * INFO Change canonical URL for paginated archive pages to current URL
413
- * FIX Issue when using %%wc_product_attributes%% in custom schema
414
- * FIX Welcome screen SVG image missing
415
- * FIX LifterLMS compatibility for private areas
416
- * FIX Closing <li> tag (thanks to @Presskopp https://github.com/wp-seopress/wp-seopress-public/pull/18)
417
- * FIX Incorrect conditional tag for Where to display the schema? option (props @maigret)
418
- * FIX i18n strings
419
 
420
  <a href="https://www.seopress.org/changelog/" target="_blank">View complete changelog</a>
6
  Requires at least: 4.7+
7
  Tested up to: 5.5
8
  Requires PHP: 5.6
9
+ Stable tag: 4.1.4
10
  License: GPLv2 or later
11
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
12
 
310
  8. Installation Wizard
311
 
312
  == Changelog ==
313
+ = 4.1.4 =
314
+ * INFO Improve cookie bar default design
315
+ * INFO Update NGINX configuration informations on XML sitemaps page
316
+ * INFO Update updater to support automatic updates
317
+ * FIX Google suggestions to target keywords field
318
+ * FIX Tagify not defined in term taxonomy editing page
319
+ * FIX Conflict with BuddyBoss search page
320
+ * FIX Notice Trying to get property 'name' of non-object 5 in options-titles-metas.php
321
+ * FIX Notice Undefined offset in options-titles-metas.php
322
  = 4.1.3 =
323
  * FIX PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Elementor\Core\Settings\Page\Manager::ajax_before_save_settings() must be of the type array, null given
324
  * FIX Delete bulk edit option for Redirections
375
  * FIX Remove BuddyPress groups from Titles and settings if BuddyBoss or BuddyPress is not activated
376
  * FIX WooCommerce XML sitemaps product attributes
377
  * FIX Quotes with target keywords
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
378
 
379
  <a href="https://www.seopress.org/changelog/" target="_blank">View complete changelog</a>
seopress.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: SEOPress
4
  Plugin URI: https://www.seopress.org/
5
  Description: One of the best SEO plugins for WordPress.
6
- Version: 4.1.3
7
  Author: SEOPress
8
  Author URI: https://www.seopress.org/
9
  License: GPLv2
@@ -55,7 +55,7 @@ register_deactivation_hook(__FILE__, 'seopress_deactivation');
55
  ///////////////////////////////////////////////////////////////////////////////////////////////////
56
  //Define
57
  ///////////////////////////////////////////////////////////////////////////////////////////////////
58
- define( 'SEOPRESS_VERSION', '4.1.3' );
59
  define( 'SEOPRESS_AUTHOR', 'Benjamin Denis' );
60
 
61
  ///////////////////////////////////////////////////////////////////////////////////////////////////
3
  Plugin Name: SEOPress
4
  Plugin URI: https://www.seopress.org/
5
  Description: One of the best SEO plugins for WordPress.
6
+ Version: 4.1.4
7
  Author: SEOPress
8
  Author URI: https://www.seopress.org/
9
  License: GPLv2
55
  ///////////////////////////////////////////////////////////////////////////////////////////////////
56
  //Define
57
  ///////////////////////////////////////////////////////////////////////////////////////////////////
58
+ define( 'SEOPRESS_VERSION', '4.1.4' );
59
  define( 'SEOPRESS_AUTHOR', 'Benjamin Denis' );
60
 
61
  ///////////////////////////////////////////////////////////////////////////////////////////////////