Version Description
Download this release
Release Info
Developer | trustindex |
Plugin | Widgets for Google Reviews |
Version | 7.11 |
Comparing to | |
See all releases |
Code changes from version 7.10 to 7.11
- languages/trustindex-af.mo +0 -0
- languages/trustindex-ar.mo +0 -0
- languages/trustindex-ary.mo +0 -0
- languages/trustindex-az.mo +0 -0
- languages/trustindex-azb.mo +0 -0
- languages/trustindex-bg_BG.mo +0 -0
- languages/trustindex-bn_BD.mo +0 -0
- languages/trustindex-bs_BA.mo +0 -0
- languages/trustindex-cs_CZ.mo +0 -0
- languages/trustindex-cy.mo +0 -0
- languages/trustindex-da_DK.mo +0 -0
- languages/trustindex-de_AT.mo +0 -0
- languages/trustindex-de_CH.mo +0 -0
- languages/trustindex-de_CH_informal.mo +0 -0
- languages/trustindex-de_DE.mo +0 -0
- languages/trustindex-de_DE_formal.mo +0 -0
- languages/trustindex-el.mo +0 -0
- languages/trustindex-es_AR.mo +0 -0
- languages/trustindex-es_CL.mo +0 -0
- languages/trustindex-es_CO.mo +0 -0
- languages/trustindex-es_CR.mo +0 -0
- languages/trustindex-es_ES.mo +0 -0
- languages/trustindex-es_GT.mo +0 -0
- languages/trustindex-es_MX.mo +0 -0
- languages/trustindex-es_PE.mo +0 -0
- languages/trustindex-es_PR.mo +0 -0
- languages/trustindex-es_UY.mo +0 -0
- languages/trustindex-es_VE.mo +0 -0
- languages/trustindex-et.mo +0 -0
- languages/trustindex-fa_AF.mo +0 -0
- languages/trustindex-fa_IR.mo +0 -0
- languages/trustindex-fi.mo +0 -0
- languages/trustindex-fr_BR.mo +0 -0
- languages/trustindex-fr_CA.mo +0 -0
- languages/trustindex-fr_FR.mo +0 -0
- languages/trustindex-gd.mo +0 -0
- languages/trustindex-gl_ES.mo +0 -0
- languages/trustindex-he_IL.mo +0 -0
- languages/trustindex-hi_IN.mo +0 -0
- languages/trustindex-hr.mo +0 -0
- languages/trustindex-hu_HU.mo +0 -0
- languages/trustindex-hy.mo +0 -0
- languages/trustindex-id_ID.mo +0 -0
- languages/trustindex-is_IS.mo +0 -0
- languages/trustindex-it_IT.mo +0 -0
- languages/trustindex-ja.mo +0 -0
- languages/trustindex-ka_GE.mo +0 -0
- languages/trustindex-ko_KR.mo +0 -0
- languages/trustindex-lt_LT.mo +0 -0
- languages/trustindex-mk_MK.mo +0 -0
- languages/trustindex-ms_MY.mo +0 -0
- languages/trustindex-nb_NO.mo +0 -0
- languages/trustindex-nl_BE.mo +0 -0
- languages/trustindex-nl_NL.mo +0 -0
- languages/trustindex-nl_NL_formal.mo +0 -0
- languages/trustindex-nn_NO.mo +0 -0
- languages/trustindex-pl_PL.mo +0 -0
- languages/trustindex-pt_AO.mo +0 -0
- languages/trustindex-pt_BR.mo +0 -0
- languages/trustindex-pt_PT.mo +0 -0
- languages/trustindex-pt_PT_ao90.mo +0 -0
- languages/trustindex-ro_RO.mo +0 -0
- languages/trustindex-ru_RU.mo +0 -0
- languages/trustindex-sk_SK.mo +0 -0
- languages/trustindex-sl_SI.mo +0 -0
- languages/trustindex-sq.mo +0 -0
- languages/trustindex-sr_RS.mo +0 -0
- languages/trustindex-sv_SE.mo +0 -0
- languages/trustindex-th.mo +0 -0
- languages/trustindex-tr_TR.mo +0 -0
- languages/trustindex-uk.mo +0 -0
- languages/trustindex-vi.mo +0 -0
- languages/trustindex-zh_CN.mo +0 -0
- languages/trustindex-zh_HK.mo +0 -0
- languages/trustindex-zh_TW.mo +0 -0
- readme.txt +4 -4
- static/js/admin-page-settings-common.js +1 -1
- tabs/setup_no_reg.php +14 -0
- tabs/setup_no_reg_header.php +29 -7
- tabs/troubleshooting.php +46 -3
- trustindex-plugin.class.php +49 -4
- uninstall.php +1 -1
- wp-reviews-plugin-for-google.php +10 -9
languages/trustindex-af.mo
CHANGED
Binary file
|
languages/trustindex-ar.mo
CHANGED
Binary file
|
languages/trustindex-ary.mo
CHANGED
Binary file
|
languages/trustindex-az.mo
CHANGED
Binary file
|
languages/trustindex-azb.mo
CHANGED
Binary file
|
languages/trustindex-bg_BG.mo
CHANGED
Binary file
|
languages/trustindex-bn_BD.mo
CHANGED
Binary file
|
languages/trustindex-bs_BA.mo
CHANGED
Binary file
|
languages/trustindex-cs_CZ.mo
CHANGED
Binary file
|
languages/trustindex-cy.mo
CHANGED
Binary file
|
languages/trustindex-da_DK.mo
CHANGED
Binary file
|
languages/trustindex-de_AT.mo
CHANGED
Binary file
|
languages/trustindex-de_CH.mo
CHANGED
Binary file
|
languages/trustindex-de_CH_informal.mo
CHANGED
Binary file
|
languages/trustindex-de_DE.mo
CHANGED
Binary file
|
languages/trustindex-de_DE_formal.mo
CHANGED
Binary file
|
languages/trustindex-el.mo
CHANGED
Binary file
|
languages/trustindex-es_AR.mo
CHANGED
Binary file
|
languages/trustindex-es_CL.mo
CHANGED
Binary file
|
languages/trustindex-es_CO.mo
CHANGED
Binary file
|
languages/trustindex-es_CR.mo
CHANGED
Binary file
|
languages/trustindex-es_ES.mo
CHANGED
Binary file
|
languages/trustindex-es_GT.mo
CHANGED
Binary file
|
languages/trustindex-es_MX.mo
CHANGED
Binary file
|
languages/trustindex-es_PE.mo
CHANGED
Binary file
|
languages/trustindex-es_PR.mo
CHANGED
Binary file
|
languages/trustindex-es_UY.mo
CHANGED
Binary file
|
languages/trustindex-es_VE.mo
CHANGED
Binary file
|
languages/trustindex-et.mo
CHANGED
Binary file
|
languages/trustindex-fa_AF.mo
CHANGED
Binary file
|
languages/trustindex-fa_IR.mo
CHANGED
Binary file
|
languages/trustindex-fi.mo
CHANGED
Binary file
|
languages/trustindex-fr_BR.mo
CHANGED
Binary file
|
languages/trustindex-fr_CA.mo
CHANGED
Binary file
|
languages/trustindex-fr_FR.mo
CHANGED
Binary file
|
languages/trustindex-gd.mo
CHANGED
Binary file
|
languages/trustindex-gl_ES.mo
CHANGED
Binary file
|
languages/trustindex-he_IL.mo
CHANGED
Binary file
|
languages/trustindex-hi_IN.mo
CHANGED
Binary file
|
languages/trustindex-hr.mo
CHANGED
Binary file
|
languages/trustindex-hu_HU.mo
CHANGED
Binary file
|
languages/trustindex-hy.mo
CHANGED
Binary file
|
languages/trustindex-id_ID.mo
CHANGED
Binary file
|
languages/trustindex-is_IS.mo
CHANGED
Binary file
|
languages/trustindex-it_IT.mo
CHANGED
Binary file
|
languages/trustindex-ja.mo
CHANGED
Binary file
|
languages/trustindex-ka_GE.mo
ADDED
Binary file
|
languages/trustindex-ko_KR.mo
CHANGED
Binary file
|
languages/trustindex-lt_LT.mo
CHANGED
Binary file
|
languages/trustindex-mk_MK.mo
CHANGED
Binary file
|
languages/trustindex-ms_MY.mo
CHANGED
Binary file
|
languages/trustindex-nb_NO.mo
CHANGED
Binary file
|
languages/trustindex-nl_BE.mo
CHANGED
Binary file
|
languages/trustindex-nl_NL.mo
CHANGED
Binary file
|
languages/trustindex-nl_NL_formal.mo
CHANGED
Binary file
|
languages/trustindex-nn_NO.mo
CHANGED
Binary file
|
languages/trustindex-pl_PL.mo
CHANGED
Binary file
|
languages/trustindex-pt_AO.mo
CHANGED
Binary file
|
languages/trustindex-pt_BR.mo
CHANGED
Binary file
|
languages/trustindex-pt_PT.mo
CHANGED
Binary file
|
languages/trustindex-pt_PT_ao90.mo
CHANGED
Binary file
|
languages/trustindex-ro_RO.mo
CHANGED
Binary file
|
languages/trustindex-ru_RU.mo
CHANGED
Binary file
|
languages/trustindex-sk_SK.mo
CHANGED
Binary file
|
languages/trustindex-sl_SI.mo
CHANGED
Binary file
|
languages/trustindex-sq.mo
CHANGED
Binary file
|
languages/trustindex-sr_RS.mo
CHANGED
Binary file
|
languages/trustindex-sv_SE.mo
CHANGED
Binary file
|
languages/trustindex-th.mo
CHANGED
Binary file
|
languages/trustindex-tr_TR.mo
CHANGED
Binary file
|
languages/trustindex-uk.mo
CHANGED
Binary file
|
languages/trustindex-vi.mo
CHANGED
Binary file
|
languages/trustindex-zh_CN.mo
CHANGED
Binary file
|
languages/trustindex-zh_HK.mo
CHANGED
Binary file
|
languages/trustindex-zh_TW.mo
CHANGED
Binary file
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: google, google places reviews, reviews, widget, google business, review, t
|
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 5.8.2
|
7 |
Requires PHP: 5.2
|
8 |
-
Stable tag: 7.
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
Plugin Name: Widgets for Google Reviews
|
@@ -14,9 +14,9 @@ Plugin URI: https://wordpress.org/plugins/wp-reviews-plugin-for-google/
|
|
14 |
Author: Trustindex.io <support@trustindex.io>
|
15 |
Author URI: https://www.trustindex.io/
|
16 |
Text Domain: wp-reviews-plugin-for-google
|
17 |
-
Version: 7.
|
18 |
|
19 |
-
Embed Google reviews fast and easily into your WordPress site. Increase SEO, trust and sales using Google
|
20 |
|
21 |
== Description ==
|
22 |
|
@@ -128,7 +128,7 @@ Why not display your other ratings, too? Check out our other free review plugins
|
|
128 |
If your company does business globally, it’s in your interest to cater to various languages.
|
129 |
|
130 |
Our Widgets for Google Reviews supports the following languages:
|
131 |
-
Afrikaans, Albanian, Arabic, Armenian, Azerbaijani, Bengali, Bosnian, Bulgarian, Chinese, Croatian, Czech, Danish, Dutch, English, Estonian, Finnish, French, Galician, German, Greek, Hebrew, Hindi, Hungarian, Icelandic, Indonesian, Italian, Japanese, Korean, Lithuanian, Macedonian, Malay, Norwegian, Persian, Polish, Portuguese, Romanian, Russian, Scottish Gaelic, Serbian, Slovak, Slovenian, Spanish, Swedish, Thai, Turkish, Ukranian, Vietnamese, Welsh
|
132 |
|
133 |
== Support ==
|
134 |
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 5.8.2
|
7 |
Requires PHP: 5.2
|
8 |
+
Stable tag: 7.11
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
Plugin Name: Widgets for Google Reviews
|
14 |
Author: Trustindex.io <support@trustindex.io>
|
15 |
Author URI: https://www.trustindex.io/
|
16 |
Text Domain: wp-reviews-plugin-for-google
|
17 |
+
Version: 7.11
|
18 |
|
19 |
+
Embed Google reviews fast and easily into your WordPress site. Increase SEO, trust and sales using Google reviews.
|
20 |
|
21 |
== Description ==
|
22 |
|
128 |
If your company does business globally, it’s in your interest to cater to various languages.
|
129 |
|
130 |
Our Widgets for Google Reviews supports the following languages:
|
131 |
+
Afrikaans, Albanian, Arabic, Armenian, Azerbaijani, Bengali, Bosnian, Bulgarian, Chinese, Croatian, Czech, Danish, Dutch, English, Estonian, Finnish, French, Galician, Georgian, German, Greek, Hebrew, Hindi, Hungarian, Icelandic, Indonesian, Italian, Japanese, Korean, Lithuanian, Macedonian, Malay, Norwegian, Persian, Polish, Portuguese, Romanian, Russian, Scottish Gaelic, Serbian, Slovak, Slovenian, Spanish, Swedish, Thai, Turkish, Ukranian, Vietnamese, Welsh
|
132 |
|
133 |
== Support ==
|
134 |
|
static/js/admin-page-settings-common.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
String.prototype.ucfirst=function(){return this.charAt(0).toUpperCase()+this.slice(1)};jQuery(document).ready(function(){jQuery(".ti-toggle-password").on("click",function(g){g.preventDefault();let icon=jQuery(this);let parent=icon.closest(".form-group, .ti-input-field");if(icon.hasClass("dashicons-visibility")){parent.find("input").attr("type","text");icon.removeClass("dashicons-visibility").addClass("dashicons-hidden")}else{parent.find("input").attr("type","password");icon.removeClass("dashicons-hidden").addClass("dashicons-visibility")}});let nav=jQuery("#trustindex-plugin-settings-page .nav-tab-wrapper");if(nav.length){let width=nav.find(".nav-tab-right").outerWidth();nav.css("padding-right",parseInt(width+5)+"px")}jQuery(".ti-toggle-opacity").css("opacity",1);jQuery("#trustindex-plugin-settings-page .btn-toggle").on("click",function(g){g.preventDefault();jQuery(jQuery(this).attr("href")).toggle();return false});jQuery(".btn-copy2clipboard").click(function(g){g.preventDefault();let obj=jQuery(jQuery(this).attr("href"));let text=obj.html()?obj.html():obj.val();TI_copyTextToClipboard(text)});var a=function(){let style_id=jQuery("#ti-style-id").val();let box=jQuery("#ti-review-list").closest(".ti-preview-box");if(["8","9","10","11","12","20","22"].indexOf(style_id)!=-1&&!b){box.css("width","30%")}else{if(["6","7","24","25","26","27","28","29","35"].indexOf(style_id)!=-1&&!b){box.css("width","50%")}else{box.css("width","auto")}}box.css("width",box.width())};jQuery(".ti-checkbox:not(.disabled)").on("click",function(){let checkbox=jQuery(this).find("input[type=checkbox], input[type=radio]");checkbox.prop("checked",!checkbox.prop("checked")).trigger("change");return false});jQuery(".ti-select").each(function(){let el=jQuery(this);let selected=el.find("ul li.selected");if(selected.length==0){selected=el.find("ul li:first")}el.data("value",selected.data("value")).find("font").html(selected.html())});jQuery(document).on("click",".ti-select",function(){let el=jQuery(this);el.toggleClass("active");if(el.hasClass("active")){jQuery(window).unbind().on("click",function(g){if(!jQuery(g.target).is(el)&&jQuery(g.target).closest(".ti-select").length==0){el.removeClass("active");jQuery(window).unbind()}})}});jQuery(document).on("click",".ti-select li",function(){let el=jQuery(this);el.parent().parent().data("value",el.data("value")).trigger("change").find("font").html(el.html());el.parent().find("li").removeClass("selected");el.addClass("selected")});var b=false;var f=jQuery("#ti-review-list .ti-widget").clone();f.find(".ti-review-item").each(function(){let el=jQuery(this);let rating=el.find(".ti-stars .ti-star.f, .stars .ti-star.f").length;if(el.find(".ti-recommendation-icon.positive").length){rating=5}else{if(el.find(".ti-recommendation-icon.negative").length){rating=1}}if(el.find(".ti-polarity-icon.positive").length){rating=5}else{if(el.find(".ti-polarity-icon.neutral").length){rating=3}else{if(el.find(".ti-polarity-icon.negative").length){rating=1}}}if(el.find(".ti-rating-box").length){rating=Math.round(parseFloat(el.find(".ti-rating-box").text())/2)}let selector=".ti-review-content";if(el.find(".ti-review-content .ti-inner").length){selector=".ti-review-content .ti-inner"}else{if(el.find(".ti-review-text").length){selector=".ti-review-text"}}el.attr("data-rating",rating);el.attr("data-empty",el.find(selector).text().trim()==""?1:0)});var e=function(){let platform=(jQuery("#ti-filter #show-star").data("platform")||"google").ucfirst();let el=jQuery('<div class="ti-widget" style="display: none"><div class="source-'+platform+'"><span class="ti-star f"></span><span class="ti-star e"></span></div></div>');el.append("body");jQuery("body").append(el);jQuery("#ti-filter .ti-star.e").css("background",el.find(".ti-star.e").css("background"));jQuery("#ti-filter .ti-star.f").css("background",el.find(".ti-star.f").css("background"));el.remove()};e();var d=function(){let layout_id=jQuery("#ti-review-list .ti-widget").data("layout-id");return[11,12,20,22,24,25,26,27,28,29,35].indexOf(layout_id)!=-1};var c=function(g){let style_id=jQuery("#ti-style-id").val();let stars=(jQuery("#ti-filter #show-star").data("value")+"").split(",").map(function(h){return parseInt(h)});let show_only_ratings=jQuery("#ti-filter-only-ratings").prop("checked");if(!jQuery("#ti-filter").length){stars=[1,2,3,4,5];show_only_ratings=false}jQuery(".ti-widget .ti-reviews-container-wrapper .ti-review-item").remove();let widget=document.querySelector(".ti-widget");widget.replaceWith(widget.cloneNode(true));let results=0;f.find(".ti-review-item").each(function(){let el=jQuery(this);if(stars.indexOf(el.data("rating"))!==-1){if(show_only_ratings&&el.data("empty")){return}if(["8","9","10","18","33"].indexOf(style_id)!=-1&&results>4){return}let clone=el.clone();jQuery("#ti-review-list .ti-widget .ti-reviews-container-wrapper").append(clone);clone.hide();clone.fadeIn();results++}});if(typeof Trustindex!="undefined"&&Trustindex.intervalPointer){clearInterval(Trustindex.intervalPointer)}if(results==0&&!d()){jQuery("#ti-review-list").hide().next().fadeIn();b=true}else{jQuery("#ti-review-list").fadeIn().next().hide();b=false;if(g===undefined){let dot_container=jQuery("#ti-review-list .ti-widget .ti-controls-dots");if(dot_container.length){let dot=dot_container.children(":first").clone();if(dot.length){dot_container.html(" "+dot.removeAttr("data-pager-state")[0].outerHTML+" ")}}}if(typeof Trustindex!="undefined"){Trustindex.pager_inited=true;Trustindex.init_pager(document.querySelectorAll(".ti-widget"));Trustindex.resize_widgets()}}if(g!==true){jQuery.post("",{command:"save-filter",filter:JSON.stringify({stars:stars,"only-ratings":show_only_ratings})})}a()};jQuery("#ti-filter #show-star").on("change",c);jQuery("#ti-filter-only-ratings").on("change",function(g){g.preventDefault();c();return false});if(f.length){c(true);a()}jQuery("#ti-style-id, #ti-set-id, #ti-lang-id, #ti-dateformat-id, #ti-widget-options input[type=checkbox]:not(.no-form-update)").on("change",function(){let form=jQuery(this).closest("form");let data=form.serializeArray();form.find("input[type=checkbox]:not(.no-form-update)").each(function(){let checkbox=jQuery(this);if(!checkbox.prop("checked")&&checkbox.attr("name")){data.push({name:checkbox.attr("name"),value:0})}});jQuery("li.ti-preview-box").addClass("disabled");jQuery.ajax({url:form.attr("action"),type:"post",dataType:"application/json",data:data}).always(function(){location.reload(true)});return false});jQuery("input[name=layout-select]").on("change",function(g){g.preventDefault();let ids=(jQuery("input[name=layout-select]:checked").data("ids")+"").split(",");if(ids==""){jQuery(".ti-preview-boxes-container").find(".ti-full-width, .ti-half-width").fadeIn()}else{jQuery(".ti-preview-boxes-container").find(".ti-full-width, .ti-half-width").hide();ids.forEach(function(h){jQuery(".ti-preview-boxes-container").find('.ti-preview-boxes[data-layout-id="'+h+'"]').parent().fadeIn()})}return false});let is_stepping=false;jQuery(".ti-free-steps li.done, .ti-free-steps li.active").on("click",function(g){g.preventDefault();if(is_stepping){return false}is_stepping=true;window.location.href=jQuery(this).attr("href");return false});if(jQuery(".ti-free-steps:not(.ti-setup-guide-steps) li.current").length==0){jQuery(".ti-free-steps:not(.ti-setup-guide-steps) li.active:last").addClass("current")}jQuery(document).on("click",".btn-modal-close",function(g){g.preventDefault();jQuery(this).closest(".ti-modal").fadeOut()});jQuery(document).on("click",".ti-modal",function(g){if(g.target.nodeName!="A"){g.preventDefault();if(!jQuery(g.target).closest(".ti-modal-dialog").length){jQuery(this).fadeOut()}}});let highlight_modal=jQuery("#ti-highlight-modal");if(highlight_modal.length){let appendHiddenInputs=function(g){highlight_modal.find("input[type=hidden]").each(function(){let input=jQuery(this);g[input.attr("name")]=input.val()});return g};jQuery(document).on("click",".btn-highlight",function(g){g.preventDefault();let btn=jQuery(this);let review_box=btn.closest("tr").find(".ti-review-content");let raw_content=review_box.html();let content=raw_content.replace(/<mark class="ti-highlight">/g,"").replace(/<\/mark>/,"");highlight_modal.fadeIn();highlight_modal.find(".ti-highlight-content").html("<div class='raw-content'>"+raw_content+"</div><div class='selection-content'>"+content+"</div>");highlight_modal.find(".btn-highlight-confirm, .btn-highlight-remove").attr("href",btn.attr("href"));if(btn.hasClass("has-highlight")){highlight_modal.find(".btn-highlight-remove").show()}else{highlight_modal.find(".btn-highlight-remove").hide()}});jQuery(document).on("click",".btn-highlight-confirm",function(g){g.preventDefault();let btn=jQuery(this);let highlight_content=btn.closest(".ti-modal-content").find(".ti-highlight-content .selection-content");let data=TI_highlight_getSelection(highlight_content.get(0));if(data.start!==null){data.id=btn.attr("href");data["save-highlight"]=1;btn.css("pointer-events","none");btn.blur();btn.addClass("btn-disabled");TI_manage_dots(btn);btn.closest(".ti-modal").find(".btn-text").css("pointer-events","none");jQuery.ajax({method:"POST",url:window.location.href,data:appendHiddenInputs(data)}).always(function(){location.reload(true)})}});jQuery(document).on("click",".btn-highlight-remove",function(g){g.preventDefault();let btn=jQuery(this);let highlight_content=btn.closest(".ti-modal-content").find(".ti-highlight-content");let data=TI_highlight_getSelection(highlight_content.get(0));btn.css("pointer-events","none");btn.blur();btn.addClass("btn-disabled");TI_manage_dots(btn);btn.closest(".ti-modal").find(".btn-text").css("pointer-events","none");jQuery.ajax({method:"POST",url:window.location.href,data:appendHiddenInputs({id:btn.attr("href"),"save-highlight":1})}).always(function(){location.reload(true)})})}jQuery(document).on("click",".ti-notice.is-dismissible .notice-dismiss",function(){let button=jQuery(this);let container=button.closest(".ti-notice");container.fadeOut(200);if(button.data("command")&&!button.data("ajax-run")){button.data("ajax-run",1);jQuery.post("",{command:button.data("command")})}})});function TI_manage_dots(a){let loading_text=a.data("loading-text");let num_of_dots=(a.html().match(new RegExp(/\./,"g"))||[]).length;let next_dots=[".","..","...",""];a.html(loading_text+next_dots[num_of_dots]);setTimeout(function(){TI_manage_dots(a)},1000)}function decodeHTMLEntities(a){let textArea=document.createElement("textarea");textArea.innerHTML=a;return textArea.value}function TI_copyTextToClipboard(c){c=decodeHTMLEntities(c);if(!navigator.clipboard){var b=document.createElement("textarea");b.value=c;b.style.position="fixed";document.body.appendChild(b);b.focus();b.select();try{var d=document.execCommand("copy")}catch(a){}document.body.removeChild(b);return}navigator.clipboard.writeText(c).then(function(){},function(e){})};
|
1 |
+
String.prototype.ucfirst=function(){return this.charAt(0).toUpperCase()+this.slice(1)};jQuery(document).ready(function(){jQuery(".ti-toggle-password").on("click",function(g){g.preventDefault();let icon=jQuery(this);let parent=icon.closest(".form-group, .ti-input-field");if(icon.hasClass("dashicons-visibility")){parent.find("input").attr("type","text");icon.removeClass("dashicons-visibility").addClass("dashicons-hidden")}else{parent.find("input").attr("type","password");icon.removeClass("dashicons-hidden").addClass("dashicons-visibility")}});let nav=jQuery("#trustindex-plugin-settings-page .nav-tab-wrapper");if(nav.length){let width=nav.find(".nav-tab-right").outerWidth();nav.css("padding-right",parseInt(width+5)+"px")}jQuery(".ti-toggle-opacity").css("opacity",1);jQuery("#trustindex-plugin-settings-page .btn-toggle").on("click",function(g){g.preventDefault();jQuery(jQuery(this).attr("href")).toggle();return false});jQuery(".btn-copy2clipboard").click(function(g){g.preventDefault();let obj=jQuery(jQuery(this).attr("href"));let text=obj.html()?obj.html():obj.val();TI_copyTextToClipboard(text)});var a=function(){let style_id=jQuery("#ti-style-id").val();let box=jQuery("#ti-review-list").closest(".ti-preview-box");if(["8","9","10","11","12","20","22"].indexOf(style_id)!=-1&&!b){box.css("width","30%")}else{if(["6","7","24","25","26","27","28","29","35"].indexOf(style_id)!=-1&&!b){box.css("width","50%")}else{box.css("width","auto")}}box.css("width",box.width())};jQuery(".ti-checkbox:not(.disabled)").on("click",function(){let checkbox=jQuery(this).find("input[type=checkbox], input[type=radio]");checkbox.prop("checked",!checkbox.prop("checked")).trigger("change");return false});jQuery(".ti-select").each(function(){let el=jQuery(this);let selected=el.find("ul li.selected");if(selected.length==0){selected=el.find("ul li:first")}el.data("value",selected.data("value")).find("font").html(selected.html())});jQuery(document).on("click",".ti-select",function(){let el=jQuery(this);el.toggleClass("active");if(el.hasClass("active")){jQuery(window).unbind().on("click",function(g){if(!jQuery(g.target).is(el)&&jQuery(g.target).closest(".ti-select").length==0){el.removeClass("active");jQuery(window).unbind()}})}});jQuery(document).on("click",".ti-select li",function(){let el=jQuery(this);el.parent().parent().data("value",el.data("value")).trigger("change").find("font").html(el.html());el.parent().find("li").removeClass("selected");el.addClass("selected")});var b=false;var f=jQuery("#ti-review-list .ti-widget").clone();f.find(".ti-review-item").each(function(){let el=jQuery(this);let rating=el.find(".ti-stars .ti-star.f, .stars .ti-star.f").length;if(el.find(".ti-recommendation-icon.positive").length){rating=5}else{if(el.find(".ti-recommendation-icon.negative").length){rating=1}}if(el.find(".ti-polarity-icon.positive").length){rating=5}else{if(el.find(".ti-polarity-icon.neutral").length){rating=3}else{if(el.find(".ti-polarity-icon.negative").length){rating=1}}}if(el.find(".ti-rating-box").length){rating=Math.round(parseFloat(el.find(".ti-rating-box").text())/2)}let selector=".ti-review-content";if(el.find(".ti-review-content .ti-inner").length){selector=".ti-review-content .ti-inner"}else{if(el.find(".ti-review-text").length){selector=".ti-review-text"}}el.attr("data-rating",rating);el.attr("data-empty",el.find(selector).text().trim()==""?1:0)});var e=function(){let platform=(jQuery("#ti-filter #show-star").data("platform")||"google").ucfirst();let el=jQuery('<div class="ti-widget" style="display: none"><div class="source-'+platform+'"><span class="ti-star f"></span><span class="ti-star e"></span></div></div>');el.append("body");jQuery("body").append(el);jQuery("#ti-filter .ti-star.e").css("background",el.find(".ti-star.e").css("background"));jQuery("#ti-filter .ti-star.f").css("background",el.find(".ti-star.f").css("background"));el.remove()};e();var d=function(){let layout_id=jQuery("#ti-review-list .ti-widget").data("layout-id");return[11,12,20,22,24,25,26,27,28,29,35].indexOf(layout_id)!=-1};var c=function(g){let style_id=jQuery("#ti-style-id").val();let stars=(jQuery("#ti-filter #show-star").data("value")+"").split(",").map(function(h){return parseInt(h)});let show_only_ratings=jQuery("#ti-filter-only-ratings").prop("checked");if(!jQuery("#ti-filter").length){stars=[1,2,3,4,5];show_only_ratings=false}jQuery(".ti-widget .ti-reviews-container-wrapper .ti-review-item").remove();let widget=document.querySelector(".ti-widget");widget.replaceWith(widget.cloneNode(true));let results=0;f.find(".ti-review-item").each(function(){let el=jQuery(this);if(stars.indexOf(el.data("rating"))!==-1){if(show_only_ratings&&el.data("empty")){return}if(["8","9","10","18","33"].indexOf(style_id)!=-1&&results>4){return}let clone=el.clone();jQuery("#ti-review-list .ti-widget .ti-reviews-container-wrapper").append(clone);clone.hide();clone.fadeIn();results++}});if(typeof Trustindex!="undefined"&&Trustindex.intervalPointer){clearInterval(Trustindex.intervalPointer)}if(results==0&&!d()){jQuery("#ti-review-list").hide().next().fadeIn();b=true}else{jQuery("#ti-review-list").fadeIn().next().hide();b=false;if(g===undefined){let dot_container=jQuery("#ti-review-list .ti-widget .ti-controls-dots");if(dot_container.length){let dot=dot_container.children(":first").clone();if(dot.length){dot_container.html(" "+dot.removeAttr("data-pager-state")[0].outerHTML+" ")}}}if(typeof Trustindex!="undefined"){Trustindex.pager_inited=true;Trustindex.init_pager(document.querySelectorAll(".ti-widget"));Trustindex.resize_widgets()}}if(g!==true){jQuery.post("",{command:"save-filter",filter:JSON.stringify({stars:stars,"only-ratings":show_only_ratings})})}a()};jQuery("#ti-filter #show-star").on("change",c);jQuery("#ti-filter-only-ratings").on("change",function(g){g.preventDefault();c();return false});if(f.length){c(true);a()}jQuery("#ti-style-id, #ti-set-id, #ti-lang-id, #ti-dateformat-id, #ti-widget-options input[type=checkbox]:not(.no-form-update), #ti-align-id").on("change",function(){let form=jQuery(this).closest("form");let data=form.serializeArray();form.find("input[type=checkbox]:not(.no-form-update)").each(function(){let checkbox=jQuery(this);if(!checkbox.prop("checked")&&checkbox.attr("name")){data.push({name:checkbox.attr("name"),value:0})}});jQuery("li.ti-preview-box").addClass("disabled");jQuery.ajax({url:form.attr("action"),type:"post",dataType:"application/json",data:data}).always(function(){location.reload(true)});return false});jQuery("input[name=layout-select]").on("change",function(g){g.preventDefault();let ids=(jQuery("input[name=layout-select]:checked").data("ids")+"").split(",");if(ids==""){jQuery(".ti-preview-boxes-container").find(".ti-full-width, .ti-half-width").fadeIn()}else{jQuery(".ti-preview-boxes-container").find(".ti-full-width, .ti-half-width").hide();ids.forEach(function(h){jQuery(".ti-preview-boxes-container").find('.ti-preview-boxes[data-layout-id="'+h+'"]').parent().fadeIn()})}return false});let is_stepping=false;jQuery(".ti-free-steps li.done, .ti-free-steps li.active").on("click",function(g){g.preventDefault();if(is_stepping){return false}is_stepping=true;window.location.href=jQuery(this).attr("href");return false});if(jQuery(".ti-free-steps:not(.ti-setup-guide-steps) li.current").length==0){jQuery(".ti-free-steps:not(.ti-setup-guide-steps) li.active:last").addClass("current")}jQuery(document).on("click",".btn-modal-close",function(g){g.preventDefault();jQuery(this).closest(".ti-modal").fadeOut()});jQuery(document).on("click",".ti-modal",function(g){if(g.target.nodeName!="A"){g.preventDefault();if(!jQuery(g.target).closest(".ti-modal-dialog").length){jQuery(this).fadeOut()}}});let highlight_modal=jQuery("#ti-highlight-modal");if(highlight_modal.length){let appendHiddenInputs=function(g){highlight_modal.find("input[type=hidden]").each(function(){let input=jQuery(this);g[input.attr("name")]=input.val()});return g};jQuery(document).on("click",".btn-highlight",function(g){g.preventDefault();let btn=jQuery(this);let review_box=btn.closest("tr").find(".ti-review-content");let raw_content=review_box.html();let content=raw_content.replace(/<mark class="ti-highlight">/g,"").replace(/<\/mark>/,"");highlight_modal.fadeIn();highlight_modal.find(".ti-highlight-content").html("<div class='raw-content'>"+raw_content+"</div><div class='selection-content'>"+content+"</div>");highlight_modal.find(".btn-highlight-confirm, .btn-highlight-remove").attr("href",btn.attr("href"));if(btn.hasClass("has-highlight")){highlight_modal.find(".btn-highlight-remove").show()}else{highlight_modal.find(".btn-highlight-remove").hide()}});jQuery(document).on("click",".btn-highlight-confirm",function(g){g.preventDefault();let btn=jQuery(this);let highlight_content=btn.closest(".ti-modal-content").find(".ti-highlight-content .selection-content");let data=TI_highlight_getSelection(highlight_content.get(0));if(data.start!==null){data.id=btn.attr("href");data["save-highlight"]=1;btn.css("pointer-events","none");btn.blur();btn.addClass("btn-disabled");TI_manage_dots(btn);btn.closest(".ti-modal").find(".btn-text").css("pointer-events","none");jQuery.ajax({method:"POST",url:window.location.href,data:appendHiddenInputs(data)}).always(function(){location.reload(true)})}});jQuery(document).on("click",".btn-highlight-remove",function(g){g.preventDefault();let btn=jQuery(this);let highlight_content=btn.closest(".ti-modal-content").find(".ti-highlight-content");let data=TI_highlight_getSelection(highlight_content.get(0));btn.css("pointer-events","none");btn.blur();btn.addClass("btn-disabled");TI_manage_dots(btn);btn.closest(".ti-modal").find(".btn-text").css("pointer-events","none");jQuery.ajax({method:"POST",url:window.location.href,data:appendHiddenInputs({id:btn.attr("href"),"save-highlight":1})}).always(function(){location.reload(true)})})}jQuery(document).on("click",".ti-notice.is-dismissible .notice-dismiss",function(){let button=jQuery(this);let container=button.closest(".ti-notice");container.fadeOut(200);if(button.data("command")&&!button.data("ajax-run")){button.data("ajax-run",1);jQuery.post("",{command:button.data("command")})}})});function TI_manage_dots(a){let loading_text=a.data("loading-text");let num_of_dots=(a.html().match(new RegExp(/\./,"g"))||[]).length;let next_dots=[".","..","...",""];a.html(loading_text+next_dots[num_of_dots]);setTimeout(function(){TI_manage_dots(a)},1000)}function decodeHTMLEntities(a){let textArea=document.createElement("textarea");textArea.innerHTML=a;return textArea.value}function TI_copyTextToClipboard(c){c=decodeHTMLEntities(c);if(!navigator.clipboard){var b=document.createElement("textarea");b.value=c;b.style.position="fixed";document.body.appendChild(b);b.focus();b.select();try{var d=document.execCommand("copy")}catch(a){}document.body.removeChild(b);return}navigator.clipboard.writeText(c).then(function(){},function(e){})};
|
tabs/setup_no_reg.php
CHANGED
@@ -262,6 +262,20 @@ $widget_has_reviews = !in_array($widget_type, [ 'button', 'badge' ]) || in_array
|
|
262 |
</select>
|
263 |
</form>
|
264 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
<?php endif; ?>
|
266 |
</div>
|
267 |
<div class="ti-right-block">
|
262 |
</select>
|
263 |
</form>
|
264 |
</div>
|
265 |
+
<?php if(!in_array($style_id, [ 17, 21 ])): ?>
|
266 |
+
<div class="ti-input-row">
|
267 |
+
<label><?php echo TrustindexPlugin::___('Align'); ?></label>
|
268 |
+
<form method="post" action="">
|
269 |
+
<input type="hidden" name="command" value="save-align" />
|
270 |
+
<?php wp_nonce_field( 'save-align_'.$trustindex_pm_google->get_plugin_slug(), '_wpnonce_align' ); ?>
|
271 |
+
<select class="form-control" name="align" id="ti-align-id">
|
272 |
+
<?php foreach([ 'left', 'center', 'right', 'justify' ] as $align_type): ?>
|
273 |
+
<option value="<?php echo esc_attr($align_type); ?>" <?php echo $align_type == $align ? 'selected' : ''; ?>><?php echo TrustindexPlugin::___($align_type); ?></option>
|
274 |
+
<?php endforeach; ?>
|
275 |
+
</select>
|
276 |
+
</form>
|
277 |
+
</div>
|
278 |
+
<?php endif; ?>
|
279 |
<?php endif; ?>
|
280 |
</div>
|
281 |
<div class="ti-right-block">
|
tabs/setup_no_reg_header.php
CHANGED
@@ -9,7 +9,8 @@ $ti_command_list = [
|
|
9 |
'save-set',
|
10 |
'save-language',
|
11 |
'save-dateformat',
|
12 |
-
'save-options'
|
|
|
13 |
];
|
14 |
if(!in_array($ti_command, $ti_command_list))
|
15 |
{
|
@@ -104,6 +105,10 @@ global $wpdb;
|
|
104 |
delete_option( $trustindex_pm_google->get_option_name('page-details') );
|
105 |
delete_option( $trustindex_pm_google->get_option_name('review-content') );
|
106 |
delete_option( $trustindex_pm_google->get_option_name('css-content') );
|
|
|
|
|
|
|
|
|
107 |
if($settings_delete)
|
108 |
{
|
109 |
delete_option( $trustindex_pm_google->get_option_name('style-id') );
|
@@ -126,16 +131,25 @@ function trustindex_plugin_change_step($step = 5)
|
|
126 |
global $trustindex_pm_google;
|
127 |
if($step < 5)
|
128 |
{
|
129 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
}
|
131 |
if($step < 4)
|
132 |
{
|
133 |
-
$style_id = get_option($trustindex_pm_google->get_option_name('style-id'));
|
134 |
delete_option($trustindex_pm_google->get_option_name('scss-set'));
|
135 |
-
if(in_array($style_id, [ 17, 21 ]))
|
136 |
-
{
|
137 |
-
$step--;
|
138 |
-
}
|
139 |
}
|
140 |
if($step < 3)
|
141 |
{
|
@@ -264,6 +278,13 @@ delete_option( $trustindex_pm_google->get_option_name('review-content') );
|
|
264 |
$trustindex_pm_google->noreg_save_css(true);
|
265 |
exit;
|
266 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
267 |
$reviews = [];
|
268 |
$only_ratings_default = false;
|
269 |
if($trustindex_pm_google->is_noreg_linked())
|
@@ -290,6 +311,7 @@ $enable_animation = get_option( $trustindex_pm_google->get_option_name('enable-a
|
|
290 |
$show_arrows = get_option( $trustindex_pm_google->get_option_name('show-arrows'), 1 );
|
291 |
$widget_setted_up = get_option( $trustindex_pm_google->get_option_name('widget-setted-up'), 0);
|
292 |
$disable_font = get_option( $trustindex_pm_google->get_option_name('disable-font'), 0 );
|
|
|
293 |
$scss_set_tmp = $scss_set ? $scss_set : 'light-background';
|
294 |
$show_reviewers_photo = get_option( $trustindex_pm_google->get_option_name('show-reviewers-photo'), TrustindexPlugin::$widget_styles[$scss_set_tmp]['reviewer-photo'] ? 1 : 0 );
|
295 |
$show_logos = get_option( $trustindex_pm_google->get_option_name('show-logos'), TrustindexPlugin::$widget_styles[$scss_set_tmp]['hide-logos'] ? 0 : 1 );
|
9 |
'save-set',
|
10 |
'save-language',
|
11 |
'save-dateformat',
|
12 |
+
'save-options',
|
13 |
+
'save-align'
|
14 |
];
|
15 |
if(!in_array($ti_command, $ti_command_list))
|
16 |
{
|
105 |
delete_option( $trustindex_pm_google->get_option_name('page-details') );
|
106 |
delete_option( $trustindex_pm_google->get_option_name('review-content') );
|
107 |
delete_option( $trustindex_pm_google->get_option_name('css-content') );
|
108 |
+
if(is_file($trustindex_pm_google->getCssFile()))
|
109 |
+
{
|
110 |
+
unlink($trustindex_pm_google->getCssFile());
|
111 |
+
}
|
112 |
if($settings_delete)
|
113 |
{
|
114 |
delete_option( $trustindex_pm_google->get_option_name('style-id') );
|
131 |
global $trustindex_pm_google;
|
132 |
if($step < 5)
|
133 |
{
|
134 |
+
$options_to_delete = [
|
135 |
+
'widget-setted-up',
|
136 |
+
'align',
|
137 |
+
'verified-icon',
|
138 |
+
'enable-animation',
|
139 |
+
'no-rating-text',
|
140 |
+
'disable-font',
|
141 |
+
'show-reviewers-photo',
|
142 |
+
'show-logos',
|
143 |
+
'show-stars'
|
144 |
+
];
|
145 |
+
foreach($options_to_delete as $name)
|
146 |
+
{
|
147 |
+
delete_option($trustindex_pm_google->get_option_name($name));
|
148 |
+
}
|
149 |
}
|
150 |
if($step < 4)
|
151 |
{
|
|
|
152 |
delete_option($trustindex_pm_google->get_option_name('scss-set'));
|
|
|
|
|
|
|
|
|
153 |
}
|
154 |
if($step < 3)
|
155 |
{
|
278 |
$trustindex_pm_google->noreg_save_css(true);
|
279 |
exit;
|
280 |
}
|
281 |
+
elseif($ti_command == 'save-align')
|
282 |
+
{
|
283 |
+
check_admin_referer( 'save-align_'.$trustindex_pm_google->get_plugin_slug(), '_wpnonce_align' );
|
284 |
+
update_option( $trustindex_pm_google->get_option_name('align') , sanitize_text_field($_POST['align']), false );
|
285 |
+
$trustindex_pm_google->noreg_save_css(true);
|
286 |
+
exit;
|
287 |
+
}
|
288 |
$reviews = [];
|
289 |
$only_ratings_default = false;
|
290 |
if($trustindex_pm_google->is_noreg_linked())
|
311 |
$show_arrows = get_option( $trustindex_pm_google->get_option_name('show-arrows'), 1 );
|
312 |
$widget_setted_up = get_option( $trustindex_pm_google->get_option_name('widget-setted-up'), 0);
|
313 |
$disable_font = get_option( $trustindex_pm_google->get_option_name('disable-font'), 0 );
|
314 |
+
$align = get_option( $trustindex_pm_google->get_option_name('align'), in_array($style_id, [ 36, 37, 38, 39 ]) ? 'center' : 'left' );
|
315 |
$scss_set_tmp = $scss_set ? $scss_set : 'light-background';
|
316 |
$show_reviewers_photo = get_option( $trustindex_pm_google->get_option_name('show-reviewers-photo'), TrustindexPlugin::$widget_styles[$scss_set_tmp]['reviewer-photo'] ? 1 : 0 );
|
317 |
$show_logos = get_option( $trustindex_pm_google->get_option_name('show-logos'), TrustindexPlugin::$widget_styles[$scss_set_tmp]['hide-logos'] ? 0 : 1 );
|
tabs/troubleshooting.php
CHANGED
@@ -28,10 +28,20 @@ unlink($trustindex_pm_google->getCssFile());
|
|
28 |
header('Location: admin.php?page=' . sanitize_text_field($_GET['page']) . '&tab=troubleshooting');
|
29 |
exit;
|
30 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
$yes_icon = '<span class="dashicons dashicons-yes-alt"></span>';
|
32 |
$no_icon = '<span class="dashicons dashicons-dismiss"></span>';
|
33 |
-
$plugin_updated = ($trustindex_pm_google->get_plugin_current_version() <= "7.
|
34 |
$css_inline = get_option($trustindex_pm_google->get_option_name('load-css-inline'), 0);
|
|
|
35 |
?>
|
36 |
<div class="ti-box">
|
37 |
<div class="ti-header"><?php echo TrustindexPlugin::___("Troubleshooting"); ?></div>
|
@@ -46,10 +56,42 @@ $css_inline = get_option($trustindex_pm_google->get_option_name('load-css-inline
|
|
46 |
<?php echo TrustindexPlugin::___('Use automatic plugin update:') .' '. (in_array($plugin_slug, $auto_updates) ? $yes_icon : $no_icon); ?>
|
47 |
<?php if(!in_array($plugin_slug, $auto_updates)): ?>
|
48 |
<a href="?page=<?php echo sanitize_text_field($_GET['page']); ?>&tab=troubleshooting&auto_update"><?php echo TrustindexPlugin::___("Enable"); ?></a>
|
49 |
-
<div class="notice notice-warning">
|
50 |
<p><?php echo TrustindexPlugin::___("You should enable it, to get new features and fixes automatically, right after they published!"); ?></p>
|
51 |
</div>
|
52 |
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
</li>
|
54 |
<li>
|
55 |
<?php echo TrustindexPlugin::___("If CSS file could not saved:"); ?>
|
@@ -148,7 +190,8 @@ WP Table Prefix: <?php echo esc_html($wpdb->prefix) ."\n"; ?>
|
|
148 |
WP Version: <?php echo esc_html($wp_version) ."\n"; ?>
|
149 |
Server Name: <?php echo esc_html($_SERVER['SERVER_NAME']) ."\n"; ?>
|
150 |
Cookie Domain: <?php $cookieDomain = parse_url(strtolower(get_bloginfo('wpurl'))); echo esc_html($cookieDomain['host']) ."\n"; ?>
|
151 |
-
CURL Library Present: <?php echo (function_exists('curl_init') ? "Yes" : "No") ."\n
|
|
|
152 |
PHP Info: <?php echo "\n\t"; ?>
|
153 |
Version: <?php echo esc_html(phpversion()) ."\n\t"; ?>
|
154 |
Memory Usage: <?php echo round(memory_get_usage() / 1024 / 1024, 2) . "MB\n\t"; ?>
|
28 |
header('Location: admin.php?page=' . sanitize_text_field($_GET['page']) . '&tab=troubleshooting');
|
29 |
exit;
|
30 |
}
|
31 |
+
if(isset($_GET['delete_css']))
|
32 |
+
{
|
33 |
+
if(is_file($trustindex_pm_google->getCssFile()))
|
34 |
+
{
|
35 |
+
unlink($trustindex_pm_google->getCssFile());
|
36 |
+
}
|
37 |
+
header('Location: admin.php?page=' . sanitize_text_field($_GET['page']) . '&tab=troubleshooting');
|
38 |
+
exit;
|
39 |
+
}
|
40 |
$yes_icon = '<span class="dashicons dashicons-yes-alt"></span>';
|
41 |
$no_icon = '<span class="dashicons dashicons-dismiss"></span>';
|
42 |
+
$plugin_updated = ($trustindex_pm_google->get_plugin_current_version() <= "7.11");
|
43 |
$css_inline = get_option($trustindex_pm_google->get_option_name('load-css-inline'), 0);
|
44 |
+
$css = get_option($trustindex_pm_google->get_option_name('css-content'));
|
45 |
?>
|
46 |
<div class="ti-box">
|
47 |
<div class="ti-header"><?php echo TrustindexPlugin::___("Troubleshooting"); ?></div>
|
56 |
<?php echo TrustindexPlugin::___('Use automatic plugin update:') .' '. (in_array($plugin_slug, $auto_updates) ? $yes_icon : $no_icon); ?>
|
57 |
<?php if(!in_array($plugin_slug, $auto_updates)): ?>
|
58 |
<a href="?page=<?php echo sanitize_text_field($_GET['page']); ?>&tab=troubleshooting&auto_update"><?php echo TrustindexPlugin::___("Enable"); ?></a>
|
59 |
+
<div class="ti-notice notice-warning">
|
60 |
<p><?php echo TrustindexPlugin::___("You should enable it, to get new features and fixes automatically, right after they published!"); ?></p>
|
61 |
</div>
|
62 |
<?php endif; ?>
|
63 |
+
<br />
|
64 |
+
<?php echo TrustindexPlugin::___('CSS file:'); ?>
|
65 |
+
<?php
|
66 |
+
if(!$css)
|
67 |
+
{
|
68 |
+
echo $no_icon .' '. TrustindexPlugin::___("free widget has not been configured yet");
|
69 |
+
}
|
70 |
+
else if(is_file($trustindex_pm_google->getCssFile()))
|
71 |
+
{
|
72 |
+
$content = file_get_contents($trustindex_pm_google->getCssFile());
|
73 |
+
if($content === $css)
|
74 |
+
{
|
75 |
+
echo $yes_icon .' '. TrustindexPlugin::___("saved");
|
76 |
+
}
|
77 |
+
else
|
78 |
+
{
|
79 |
+
echo $no_icon .' '. TrustindexPlugin::___("corrupted");
|
80 |
+
echo '
|
81 |
+
<div class="ti-notice notice-warning">
|
82 |
+
<p>'. TrustindexPlugin::___("Delete the CSS file at <strong>%s</strong> or <a href='%s'>click here</a>.", [ $trustindex_pm_google->getCssFile(), '?page='. sanitize_text_field($_GET['page']) .'&tab=troubleshooting&delete_css' ]) .'</p>
|
83 |
+
</div>';
|
84 |
+
}
|
85 |
+
}
|
86 |
+
else
|
87 |
+
{
|
88 |
+
echo $no_icon .' '. TrustindexPlugin::___("not saved");
|
89 |
+
echo '
|
90 |
+
<div class="ti-notice notice-warning">
|
91 |
+
<p>'. TrustindexPlugin::___("Grant write permissions to upload folder <strong>(%s)</strong> and disable CSS internal loading if enabled already.", [ dirname($trustindex_pm_google->getCssFile()) ]) .'</p>
|
92 |
+
</div>';
|
93 |
+
}
|
94 |
+
?>
|
95 |
</li>
|
96 |
<li>
|
97 |
<?php echo TrustindexPlugin::___("If CSS file could not saved:"); ?>
|
190 |
WP Version: <?php echo esc_html($wp_version) ."\n"; ?>
|
191 |
Server Name: <?php echo esc_html($_SERVER['SERVER_NAME']) ."\n"; ?>
|
192 |
Cookie Domain: <?php $cookieDomain = parse_url(strtolower(get_bloginfo('wpurl'))); echo esc_html($cookieDomain['host']) ."\n"; ?>
|
193 |
+
CURL Library Present: <?php echo (function_exists('curl_init') ? "Yes" : "No") ."\n"; ?>
|
194 |
+
CSS path: <?php echo esc_html($trustindex_pm_google->getCssFile()) ."\n\n"; ?>
|
195 |
PHP Info: <?php echo "\n\t"; ?>
|
196 |
Version: <?php echo esc_html(phpversion()) ."\n\t"; ?>
|
197 |
Memory Usage: <?php echo round(memory_get_usage() / 1024 / 1024, 2) . "MB\n\t"; ?>
|
trustindex-plugin.class.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
/* GENERATED:
|
3 |
class TrustindexPlugin
|
4 |
{
|
5 |
private $plugin_file_path;
|
@@ -246,7 +246,8 @@ return [
|
|
246 |
'disable-font',
|
247 |
'show-logos',
|
248 |
'show-stars',
|
249 |
-
'load-css-inline'
|
|
|
250 |
];
|
251 |
}
|
252 |
public function get_platforms()
|
@@ -376,7 +377,7 @@ $chosed_platform_slug = $this->plugin_slugs[ $force_platform ];
|
|
376 |
$current_platform_slug = $this->plugin_slugs[ $this->shortname ];
|
377 |
$file_path = preg_replace('/\/[^\/]+\/trustindex-plugin\.class\.php/', "/$chosed_platform_slug/trustindex-plugin.class.php", $file_path);
|
378 |
}
|
379 |
-
$chosed_platform = new TrustindexPlugin($force_platform, $file_path, "do-not-care-7.
|
380 |
if(!$chosed_platform->is_noreg_linked() || !$chosed_platform->is_noreg_table_exists($force_platform))
|
381 |
{
|
382 |
return self::get_alertbox(
|
@@ -445,6 +446,14 @@ $params = [
|
|
445 |
'enable-font' => get_option($this->get_option_name('disable-font'), 0) ? false : true,
|
446 |
]
|
447 |
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
448 |
if($set_change)
|
449 |
{
|
450 |
$params['set_id'] = $set_id;
|
@@ -507,6 +516,12 @@ if ( !class_exists('TrustindexGutenbergPlugin') && function_exists( 'register_bl
|
|
507 |
require_once dirname( __FILE__ ) . '/static/block-editor/block-editor.php';
|
508 |
TrustindexGutenbergPlugin::instance();
|
509 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
510 |
}
|
511 |
public function getCssFile($return_only_file = false)
|
512 |
{
|
@@ -2364,6 +2379,7 @@ public static $widget_languages = [
|
|
2364 |
'fa' => 'فارسی',
|
2365 |
'gl' => 'Galego',
|
2366 |
'hy' => 'հայերեն',
|
|
|
2367 |
];
|
2368 |
public static $widget_dateformats = [ 'j. F, Y.', 'F j, Y.', 'Y.m.d.', 'Y-m-d', 'd/m/Y' ];
|
2369 |
private static $widget_rating_texts = array (
|
@@ -2751,6 +2767,14 @@ private static $widget_rating_texts = array (
|
|
2751 |
3 => 'լավ',
|
2752 |
4 => 'գերազանց',
|
2753 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2754 |
);
|
2755 |
private static $widget_recommendation_texts = array (
|
2756 |
'en' =>
|
@@ -2993,6 +3017,11 @@ private static $widget_recommendation_texts = array (
|
|
2993 |
'negative' => 'NOT_RECOMMEND_ICON-ը խորհուրդ չի տալիս',
|
2994 |
'positive' => 'RECOMMEND_ICON խորհուրդ է տալիս',
|
2995 |
),
|
|
|
|
|
|
|
|
|
|
|
2996 |
);
|
2997 |
private static $widget_verified_texts = array (
|
2998 |
'en' => 'Verified',
|
@@ -3043,6 +3072,7 @@ private static $widget_verified_texts = array (
|
|
3043 |
'fa' => 'تأیید شده',
|
3044 |
'gl' => 'Verificado',
|
3045 |
'hy' => 'Ստուգված',
|
|
|
3046 |
);
|
3047 |
private static $widget_month_names = array (
|
3048 |
'en' =>
|
@@ -3765,6 +3795,21 @@ private static $widget_month_names = array (
|
|
3765 |
10 => 'նոյեմբեր',
|
3766 |
11 => 'դեկտեմբեր',
|
3767 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3768 |
);
|
3769 |
private static $page_urls = array (
|
3770 |
'facebook' => 'https://www.facebook.com/pg/%page_id%',
|
@@ -3853,7 +3898,7 @@ return $html;
|
|
3853 |
public function get_default_no_rating_text($style_id, $set_id)
|
3854 |
{
|
3855 |
$value = in_array($style_id, [ 15, 19, 36, 38, 39, 44 ]) ? 1 : 0;
|
3856 |
-
if(self::$widget_styles[$set_id]['_vars']['dots'] === 'true')
|
3857 |
{
|
3858 |
$value = 1;
|
3859 |
}
|
1 |
<?php
|
2 |
+
/* GENERATED: 1643639992 */
|
3 |
class TrustindexPlugin
|
4 |
{
|
5 |
private $plugin_file_path;
|
246 |
'disable-font',
|
247 |
'show-logos',
|
248 |
'show-stars',
|
249 |
+
'load-css-inline',
|
250 |
+
'align'
|
251 |
];
|
252 |
}
|
253 |
public function get_platforms()
|
377 |
$current_platform_slug = $this->plugin_slugs[ $this->shortname ];
|
378 |
$file_path = preg_replace('/\/[^\/]+\/trustindex-plugin\.class\.php/', "/$chosed_platform_slug/trustindex-plugin.class.php", $file_path);
|
379 |
}
|
380 |
+
$chosed_platform = new TrustindexPlugin($force_platform, $file_path, "do-not-care-7.11", "do-not-care-Widgets for Google Reviews", "do-not-care-Google");
|
381 |
if(!$chosed_platform->is_noreg_linked() || !$chosed_platform->is_noreg_table_exists($force_platform))
|
382 |
{
|
383 |
return self::get_alertbox(
|
446 |
'enable-font' => get_option($this->get_option_name('disable-font'), 0) ? false : true,
|
447 |
]
|
448 |
];
|
449 |
+
if(in_array($style_id, [ 36, 37, 38, 39 ]))
|
450 |
+
{
|
451 |
+
$params['overrides']['content-align'] = get_option($this->get_option_name('align'), 'center');
|
452 |
+
}
|
453 |
+
else
|
454 |
+
{
|
455 |
+
$params['overrides']['text-align'] = get_option($this->get_option_name('align'), 'left');
|
456 |
+
}
|
457 |
if($set_change)
|
458 |
{
|
459 |
$params['set_id'] = $set_id;
|
516 |
require_once dirname( __FILE__ ) . '/static/block-editor/block-editor.php';
|
517 |
TrustindexGutenbergPlugin::instance();
|
518 |
}
|
519 |
+
$used_options = [];
|
520 |
+
foreach($this->get_option_names() as $opt_name)
|
521 |
+
{
|
522 |
+
$used_options []= $this->get_option_name($opt_name);
|
523 |
+
}
|
524 |
+
$wpdb->query('DELETE FROM '. $wpdb->options .' WHERE option_name LIKE "trustindex-'. $this->shortname .'-%" AND option_name NOT IN ("'. implode('", "', $used_options) .'")');
|
525 |
}
|
526 |
public function getCssFile($return_only_file = false)
|
527 |
{
|
2379 |
'fa' => 'فارسی',
|
2380 |
'gl' => 'Galego',
|
2381 |
'hy' => 'հայերեն',
|
2382 |
+
'ka' => 'ქართული',
|
2383 |
];
|
2384 |
public static $widget_dateformats = [ 'j. F, Y.', 'F j, Y.', 'Y.m.d.', 'Y-m-d', 'd/m/Y' ];
|
2385 |
private static $widget_rating_texts = array (
|
2767 |
3 => 'լավ',
|
2768 |
4 => 'գերազանց',
|
2769 |
),
|
2770 |
+
'ka' =>
|
2771 |
+
array (
|
2772 |
+
0 => 'ღარიბი',
|
2773 |
+
1 => 'საშუალოზე დაბლა',
|
2774 |
+
2 => 'საშუალო',
|
2775 |
+
3 => 'კარგი',
|
2776 |
+
4 => 'შესანიშნავი',
|
2777 |
+
),
|
2778 |
);
|
2779 |
private static $widget_recommendation_texts = array (
|
2780 |
'en' =>
|
3017 |
'negative' => 'NOT_RECOMMEND_ICON-ը խորհուրդ չի տալիս',
|
3018 |
'positive' => 'RECOMMEND_ICON խորհուրդ է տալիս',
|
3019 |
),
|
3020 |
+
'ka' =>
|
3021 |
+
array (
|
3022 |
+
'negative' => 'NOT_RECOMMEND_ICON არ გირჩევთ',
|
3023 |
+
'positive' => 'RECOMMEND_ICON გირჩევთ',
|
3024 |
+
),
|
3025 |
);
|
3026 |
private static $widget_verified_texts = array (
|
3027 |
'en' => 'Verified',
|
3072 |
'fa' => 'تأیید شده',
|
3073 |
'gl' => 'Verificado',
|
3074 |
'hy' => 'Ստուգված',
|
3075 |
+
'ka' => 'დამოწმებული',
|
3076 |
);
|
3077 |
private static $widget_month_names = array (
|
3078 |
'en' =>
|
3795 |
10 => 'նոյեմբեր',
|
3796 |
11 => 'դեկտեմբեր',
|
3797 |
),
|
3798 |
+
'ka' =>
|
3799 |
+
array (
|
3800 |
+
0 => 'იანვარი',
|
3801 |
+
1 => 'თებერვალი',
|
3802 |
+
2 => 'მარტი',
|
3803 |
+
3 => 'აპრილი',
|
3804 |
+
4 => 'მაისი',
|
3805 |
+
5 => 'ივნისი',
|
3806 |
+
6 => 'ივლისი',
|
3807 |
+
7 => 'აგვისტო',
|
3808 |
+
8 => 'სექტემბერი',
|
3809 |
+
9 => 'ოქტომბერი',
|
3810 |
+
10 => 'ნოემბერი',
|
3811 |
+
11 => 'დეკემბერი',
|
3812 |
+
),
|
3813 |
);
|
3814 |
private static $page_urls = array (
|
3815 |
'facebook' => 'https://www.facebook.com/pg/%page_id%',
|
3898 |
public function get_default_no_rating_text($style_id, $set_id)
|
3899 |
{
|
3900 |
$value = in_array($style_id, [ 15, 19, 36, 38, 39, 44 ]) ? 1 : 0;
|
3901 |
+
if($set_id && self::$widget_styles[$set_id]['_vars']['dots'] === 'true')
|
3902 |
{
|
3903 |
$value = 1;
|
3904 |
}
|
uninstall.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
require_once plugin_dir_path( __FILE__ ) . 'plugin-load.php';
|
3 |
-
$trustindex_pm_google = new TrustindexPlugin("google", __FILE__, "7.
|
4 |
$trustindex_pm_google->uninstall();
|
5 |
?>
|
1 |
<?php
|
2 |
require_once plugin_dir_path( __FILE__ ) . 'plugin-load.php';
|
3 |
+
$trustindex_pm_google = new TrustindexPlugin("google", __FILE__, "7.11", "Widgets for Google Reviews", "Google");
|
4 |
$trustindex_pm_google->uninstall();
|
5 |
?>
|
wp-reviews-plugin-for-google.php
CHANGED
@@ -3,13 +3,13 @@
|
|
3 |
Plugin Name: Widgets for Google Reviews
|
4 |
Plugin Title: Widgets for Google Reviews Plugin
|
5 |
Plugin URI: https://wordpress.org/plugins/wp-reviews-plugin-for-google/
|
6 |
-
Description: Embed Google reviews fast and easily into your WordPress site. Increase SEO, trust and sales using Google
|
7 |
Tags: google, google places reviews, reviews, widget, google business, review, testimonial, testimonials, slider, rating, google my business, customer review
|
8 |
Author: Trustindex.io <support@trustindex.io>
|
9 |
Author URI: https://www.trustindex.io/
|
10 |
Contributors: trustindex
|
11 |
License: GPLv2 or later
|
12 |
-
Version: 7.
|
13 |
Text Domain: wp-reviews-plugin-for-google
|
14 |
Domain Path: /languages/
|
15 |
Donate link: https://www.trustindex.io/prices/
|
@@ -25,7 +25,7 @@ $plugin_slug = $tmp[ count($tmp) - 2 ];
|
|
25 |
if(1)
|
26 |
{
|
27 |
require_once plugin_dir_path( __FILE__ ) . 'plugin-load.php';
|
28 |
-
$trustindex_pm_google = new TrustindexPlugin("google", __FILE__, "7.
|
29 |
}
|
30 |
register_activation_hook(__FILE__, array($trustindex_pm_google, 'activate'));
|
31 |
register_deactivation_hook(__FILE__, array($trustindex_pm_google, 'deactivate'));
|
@@ -39,13 +39,14 @@ add_action('widgets_init', array($trustindex_pm_google, 'register_widget'));
|
|
39 |
}
|
40 |
if(is_file($trustindex_pm_google->getCssFile()))
|
41 |
{
|
42 |
-
add_action('
|
43 |
global $trustindex_pm_google;
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
49 |
});
|
50 |
}
|
51 |
add_action('init', array($trustindex_pm_google, 'init_shortcode'));
|
3 |
Plugin Name: Widgets for Google Reviews
|
4 |
Plugin Title: Widgets for Google Reviews Plugin
|
5 |
Plugin URI: https://wordpress.org/plugins/wp-reviews-plugin-for-google/
|
6 |
+
Description: Embed Google reviews fast and easily into your WordPress site. Increase SEO, trust and sales using Google reviews.
|
7 |
Tags: google, google places reviews, reviews, widget, google business, review, testimonial, testimonials, slider, rating, google my business, customer review
|
8 |
Author: Trustindex.io <support@trustindex.io>
|
9 |
Author URI: https://www.trustindex.io/
|
10 |
Contributors: trustindex
|
11 |
License: GPLv2 or later
|
12 |
+
Version: 7.11
|
13 |
Text Domain: wp-reviews-plugin-for-google
|
14 |
Domain Path: /languages/
|
15 |
Donate link: https://www.trustindex.io/prices/
|
25 |
if(1)
|
26 |
{
|
27 |
require_once plugin_dir_path( __FILE__ ) . 'plugin-load.php';
|
28 |
+
$trustindex_pm_google = new TrustindexPlugin("google", __FILE__, "7.11", "Widgets for Google Reviews", "Google");
|
29 |
}
|
30 |
register_activation_hook(__FILE__, array($trustindex_pm_google, 'activate'));
|
31 |
register_deactivation_hook(__FILE__, array($trustindex_pm_google, 'deactivate'));
|
39 |
}
|
40 |
if(is_file($trustindex_pm_google->getCssFile()))
|
41 |
{
|
42 |
+
add_action('init', function() {
|
43 |
global $trustindex_pm_google;
|
44 |
+
$path = wp_upload_dir()['baseurl'] .'/'. $trustindex_pm_google->getCssFile(true);
|
45 |
+
if(is_ssl())
|
46 |
+
{
|
47 |
+
$path = str_replace('http://', 'https://', $path);
|
48 |
+
}
|
49 |
+
wp_register_style('ti-widget-css-google', $path, [], filemtime($trustindex_pm_google->getCssFile()));
|
50 |
});
|
51 |
}
|
52 |
add_action('init', array($trustindex_pm_google, 'init_shortcode'));
|