Version Description
Download this release
Release Info
Developer | trustindex |
Plugin | Widgets for Google Reviews |
Version | 9.2 |
Comparing to | |
See all releases |
Code changes from version 9.1.1 to 9.2
- readme.txt +2 -2
- settings.php +93 -6
- static/js/admin-page-settings-common.js +1 -1
- static/js/admin-page-settings-connect.js +1 -1
- static/js/admin-page-settings.js +1 -1
- tabs/my_reviews.php +1 -1
- tabs/setup_no_reg.php +1 -1
- tabs/troubleshooting.php +1 -1
- trustindex-plugin.class.php +1 -1
- uninstall.php +1 -1
- wp-reviews-plugin-for-google.php +3 -3
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: 6.0
|
7 |
Requires PHP: 5.2
|
8 |
-
Stable tag: 9.
|
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,7 +14,7 @@ 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: 9.
|
18 |
|
19 |
Embed Google reviews fast and easily into your WordPress site. Increase SEO, trust and sales using Google reviews.
|
20 |
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 6.0
|
7 |
Requires PHP: 5.2
|
8 |
+
Stable tag: 9.2
|
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: 9.2
|
18 |
|
19 |
Embed Google reviews fast and easily into your WordPress site. Increase SEO, trust and sales using Google reviews.
|
20 |
|
settings.php
CHANGED
@@ -138,18 +138,105 @@ $proxy_check = $db_data;
|
|
138 |
?>
|
139 |
<div id="ti-assets-error" class="notice notice-warning" style="display: none; margin-left: 0; margin-right: 0; padding-bottom: 9px">
|
140 |
<p>
|
141 |
-
<?php echo TrustindexPlugin_google::___(
|
142 |
</p>
|
143 |
-
<a href="?page=<?php echo esc_attr($_GET['page']); ?>&tab=troubleshooting" class="button button-primary"><?php echo TrustindexPlugin_google::___("Troubleshooting") ;?></a>
|
144 |
</div>
|
145 |
<script type="text/javascript">
|
146 |
window.onload = function() {
|
147 |
-
let
|
148 |
-
let
|
149 |
-
|
150 |
{
|
151 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
}
|
|
|
153 |
};
|
154 |
</script>
|
155 |
<div id="trustindex-plugin-settings-page" class="ti-toggle-opacity">
|
138 |
?>
|
139 |
<div id="ti-assets-error" class="notice notice-warning" style="display: none; margin-left: 0; margin-right: 0; padding-bottom: 9px">
|
140 |
<p>
|
141 |
+
<?php echo TrustindexPlugin_google::___('For some reason, the <strong>CSS</strong> file required to run the plugin was not loaded.<br />One of your plugins is probably causing the problem.'); ?>
|
142 |
</p>
|
|
|
143 |
</div>
|
144 |
<script type="text/javascript">
|
145 |
window.onload = function() {
|
146 |
+
let not_loaded = [];
|
147 |
+
let loaded_count = 0;
|
148 |
+
let js_files = [
|
149 |
{
|
150 |
+
url: '<?php echo $trustindex_pm_google->get_plugin_file_url('static/js/admin-page-settings-connect.js'); ?>',
|
151 |
+
id: 'connect'
|
152 |
+
},
|
153 |
+
{
|
154 |
+
url: '<?php echo $trustindex_pm_google->get_plugin_file_url('static/js/admin-page-settings-common.js'); ?>',
|
155 |
+
id: 'common'
|
156 |
+
},
|
157 |
+
<?php if(in_array($trustindex_pm_google->shortname, [ 'google', 'facebook' ])): ?>
|
158 |
+
{
|
159 |
+
url: '<?php echo $trustindex_pm_google->get_plugin_file_url('static/js/admin-page-settings.js'); ?>',
|
160 |
+
id: 'unique'
|
161 |
+
}
|
162 |
+
<?php endif; ?>
|
163 |
+
];
|
164 |
+
let addElement = function(type, url, callback) {
|
165 |
+
let element = document.createElement(type);
|
166 |
+
if(type == 'script')
|
167 |
+
{
|
168 |
+
element.type = 'text/javascript';
|
169 |
+
element.src = url;
|
170 |
+
}
|
171 |
+
else
|
172 |
+
{
|
173 |
+
element.type = 'text/css';
|
174 |
+
element.rel = 'stylesheet';
|
175 |
+
element.href = url;
|
176 |
+
element.id = 'trustindex_settings_style_google-css';
|
177 |
+
}
|
178 |
+
document.head.appendChild(element);
|
179 |
+
element.addEventListener('load', function() { callback(true); });
|
180 |
+
element.addEventListener('error', function() { callback(false); });
|
181 |
+
};
|
182 |
+
let isCSSExists = function() {
|
183 |
+
let link = document.getElementById('trustindex_settings_style_google-css');
|
184 |
+
return link && Boolean(link.sheet);
|
185 |
+
};
|
186 |
+
let isJSExists = function(id) {
|
187 |
+
return typeof Trustindex_JS_loaded != 'undefined' && typeof Trustindex_JS_loaded[ id ] != 'undefined';
|
188 |
+
};
|
189 |
+
let process = function() {
|
190 |
+
if(loaded_count < js_files.length + 1)
|
191 |
+
{
|
192 |
+
return false;
|
193 |
+
}
|
194 |
+
if(not_loaded.length)
|
195 |
+
{
|
196 |
+
document.getElementById('trustindex-plugin-settings-page').remove();
|
197 |
+
let warning_box = document.getElementById('ti-assets-error');
|
198 |
+
if(warning_box)
|
199 |
+
{
|
200 |
+
warning_box.style.display = 'block';
|
201 |
+
warning_box.querySelector('p strong').innerHTML = not_loaded.join(', ');
|
202 |
+
}
|
203 |
+
}
|
204 |
+
}
|
205 |
+
if(!isCSSExists())
|
206 |
+
{
|
207 |
+
addElement('link', '<?php echo $trustindex_pm_google->get_plugin_file_url('static/css/admin-page-settings.css'); ?>', function(success) {
|
208 |
+
loaded_count++;
|
209 |
+
if(!success)
|
210 |
+
{
|
211 |
+
not_loaded.push('CSS');
|
212 |
+
}
|
213 |
+
process();
|
214 |
+
});
|
215 |
+
}
|
216 |
+
else
|
217 |
+
{
|
218 |
+
loaded_count++;
|
219 |
+
}
|
220 |
+
js_files.forEach(function(js) {
|
221 |
+
if(!isJSExists(js.id))
|
222 |
+
{
|
223 |
+
addElement('script', js.url, function(success) {
|
224 |
+
loaded_count++;
|
225 |
+
if(!success)
|
226 |
+
{
|
227 |
+
if(not_loaded.indexOf('JS') == -1)
|
228 |
+
{
|
229 |
+
not_loaded.push('JS');
|
230 |
+
}
|
231 |
+
}
|
232 |
+
process();
|
233 |
+
});
|
234 |
+
}
|
235 |
+
else
|
236 |
+
{
|
237 |
+
loaded_count++;
|
238 |
}
|
239 |
+
});
|
240 |
};
|
241 |
</script>
|
242 |
<div id="trustindex-plugin-settings-page" class="ti-toggle-opacity">
|
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), #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("#ti-loading").addClass("active");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")})}});jQuery(".ti-checkbox input[type=checkbox][onchange]").on("change",function(){jQuery("#ti-loading").addClass("active")})});function TI_manage_dots(a){let old_text=a.html();let loading_text=a.data("loading-text");let dots=[".","..","..."];let index=dots.length-1;a.data("old",old_text);a.html(loading_text+dots[index]);a.animationInterval=setInterval(function(){index++;if(index>=dots.length){index=0}a.html(loading_text+dots[index])},1000);a.restore=function(){a.html(old_text);clearInterval(a.animationInterval)}}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 |
+
if(typeof Trustindex_JS_loaded=="undefined"){var Trustindex_JS_loaded={}}Trustindex_JS_loaded.common=true;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("#ti-loading").addClass("active");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")})}});jQuery(".ti-checkbox input[type=checkbox][onchange]").on("change",function(){jQuery("#ti-loading").addClass("active")})});function TI_manage_dots(a){let old_text=a.html();let loading_text=a.data("loading-text");let dots=[".","..","..."];let index=dots.length-1;a.data("old",old_text);a.html(loading_text+dots[index]);a.animationInterval=setInterval(function(){index++;if(index>=dots.length){index=0}a.html(loading_text+dots[index])},1000);a.restore=function(){a.html(old_text);clearInterval(a.animationInterval)}}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){})};
|
static/js/admin-page-settings-connect.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var Trustindex_Connect=null;jQuery(document).ready(function(b){Trustindex_Connect={box:b("#trustindex-plugin-settings-page .autocomplete .results"),input:b("#trustindex-plugin-settings-page #page-link"),button:b("#trustindex-plugin-settings-page .btn-check"),form:b("#submit-form"),check:function(c){c.preventDefault();if(!Trustindex_Connect.regex){return false}let m=Trustindex_Connect.regex.exec(Trustindex_Connect.input.val().trim());if(!Trustindex_Connect.is_regex_valid(m)){Trustindex_Connect.box.html("<span>"+Trustindex_Connect.box.data("errortext")+"</span>");Trustindex_Connect.box.show();return false}let part1=m[1]||m[3]||"";let part2=m[2]||m[4]||"";let page_id=part1;if(part2){if(part1){page_id+=Trustindex_Connect.page_id_separator}page_id+=part2}let valid=true;if(Trustindex_Connect.form.data("platform")=="arukereso"){page_id=page_id.replace(/^com/,"bg")}else{if(Trustindex_Connect.form.data("platform")=="amazon"){valid=(!(page_id.indexOf("stores/")>-1||page_id.indexOf("account/")>-1||(page_id.indexOf("gp/")>-1&&page_id.indexOf("gp/product/")==-1)||page_id.search(/\-\/[^\/]{2}\/[^\/]{2}$/)>-1)&&page_id.indexOf("product-reviews/")==-1)}else{if(Trustindex_Connect.form.data("platform")=="tripadvisor"){let not_first_page=page_id.match(/\-or[\d]+\-/);if(not_first_page&¬_first_page[0]){page_id=page_id.replace(not_first_page[0],"-")}}}}if(page_id.trim()==""||!valid){Trustindex_Connect.box.html("<span>"+Trustindex_Connect.box.data("errortext")+"</span>");Trustindex_Connect.box.show();return false}Trustindex_Connect.box.hide();b("#ti-noreg-page-id").val(page_id);let page_details={id:page_id};let url=Trustindex_Connect.input.val().trim();let div=Trustindex_Connect.form.find(".ti-selected-source");Trustindex_Connect.form.find("#ti-noreg-page_details").val(JSON.stringify(page_details));div.find("img").attr("src","https://cdn.trustindex.io/assets/platform/Google/icon.png");div.find(".ti-source-info").html('<a target="_blank" href="'+url+'">'+url+"</a>");Trustindex_Connect.button.addClass("btn-disabled");div.fadeIn()},regex:null,is_regex_valid:function(c){if(!c){return false}for(let i=0;i<c.length;i++){if(c[i]===""){return false}}return true},page_id_separator:"|",async_request:function(c){let params=new URLSearchParams({type:"google",page_id:b("#ti-noreg-page-id").val().trim(),access_token:b("#ti-noreg-access-token").length?b("#ti-noreg-access-token").val():"",webhook_url:b("#ti-noreg-webhook-url").val(),email:b("#ti-noreg-email").val(),token:b("#ti-noreg-connect-token").val(),version:b("#ti-noreg-version").val()});b("#ti-connect-info").fadeIn();let ti_window=window.open("https://admin.trustindex.io/source/wordpressPageRequest?"+params.toString(),"trustindex","width=1000,height=1000,menubar=0");window.addEventListener("message",function(d){if(d.origin.startsWith("https://admin.trustindex.io/".replace(/\/$/,""))&&d.data.success){ti_window.close();b("#ti-connect-info").hide();c(b("#ti-noreg-connect-token").val(),d.data.request_id,typeof d.data.manual_download!="undefined"&&d.data.manual_download?1:0)}if(d.origin.startsWith("https://admin.trustindex.io/".replace(/\/$/,""))&&!d.data.success){ti_window.close();Trustindex_Connect.form.find(".ti-selected-source").hide();Trustindex_Connect.button.removeClass("btn-disabled");Trustindex_Connect.box.html("<span>"+Trustindex_Connect.box.data("errortext")+"</span>");Trustindex_Connect.box.show()}})}};if(Trustindex_Connect.button.length){Trustindex_Connect.button.click(Trustindex_Connect.check)}Trustindex_Connect.form.find(".btn-connect").on("click",function(c){c.preventDefault();let btn=b(this);btn.css("pointer-events","none");btn.addClass("btn-default").removeClass("btn-primary");btn.blur();TI_manage_dots(btn);Trustindex_Connect.button.css("pointer-events","none");Trustindex_Connect.async_request(function(d,f,e){b("#ti-noreg-review-download").val(d);b("#ti-noreg-review-request-id").val(f);b("#ti-noreg-manual-download").val(e);Trustindex_Connect.form.submit()})});b("#trustindex-plugin-settings-page .btn-refresh").click(function(c){let btn=jQuery(this);btn.css("pointer-events","none");btn.addClass("btn-default").removeClass("btn-primary");btn.blur();TI_manage_dots(btn);jQuery("#trustindex-plugin-settings-page .btn").css("pointer-events","none")});b(".btn-download-reviews").on("click",function(c){c.preventDefault();Trustindex_Connect.async_request(function(d,f,e){b.ajax({type:"POST",data:{review_download_request:d,review_download_request_id:f,manual_download:e}}).always(function(g){location.reload()})})});b("#review-manual-download").on("click",function(c){c.preventDefault();let btn=b(this);btn.blur().addClass("btn-disabled");TI_manage_dots(btn);b.ajax({url:location.search.replace(/&tab=[^&]+/,"&tab=setup_no_reg"),type:"POST",data:{command:"review-manual-download"},success:function(){location.reload()},error:function(){btn.restore();btn.addClass("show-tooltip")}})});var a=[];b("#ti-reg-email, #ti-reg-password").blur(function(){let email=jQuery("#ti-reg-email").val();if(jQuery.inArray(email,a)!=-1){jQuery("#txt-email-used").fadeIn();return false}jQuery.ajax({method:"POST",url:"https://admin.trustindex.io/api/userCheckEmail",data:{email:email,s:"wp"},dataType:"jsonp",success:function(c){if(c==-1){}else{if(c==0){jQuery("#txt-email-used").fadeOut()}else{let link=jQuery("#txt-email-used").find("a");link.html(link.html().replace("$email",email));jQuery("#txt-email-used").fadeIn();jQuery("#ti-reg-email").val("");a.push(email)}}}})});b("#form-reg").submit(function(c){return !jQuery("#txt-email-used").is(":visible")})});
|
1 |
+
if(typeof Trustindex_JS_loaded=="undefined"){var Trustindex_JS_loaded={}}Trustindex_JS_loaded.connect=true;var Trustindex_Connect=null;jQuery(document).ready(function(b){Trustindex_Connect={box:b("#trustindex-plugin-settings-page .autocomplete .results"),input:b("#trustindex-plugin-settings-page #page-link"),button:b("#trustindex-plugin-settings-page .btn-check"),form:b("#submit-form"),check:function(c){c.preventDefault();if(!Trustindex_Connect.regex){return false}let m=Trustindex_Connect.regex.exec(Trustindex_Connect.input.val().trim());if(!Trustindex_Connect.is_regex_valid(m)){Trustindex_Connect.box.html("<span>"+Trustindex_Connect.box.data("errortext")+"</span>");Trustindex_Connect.box.show();return false}let part1=m[1]||m[3]||"";let part2=m[2]||m[4]||"";let page_id=part1;if(part2){if(part1){page_id+=Trustindex_Connect.page_id_separator}page_id+=part2}let valid=true;if(Trustindex_Connect.form.data("platform")=="arukereso"){page_id=page_id.replace(/^com/,"bg")}else{if(Trustindex_Connect.form.data("platform")=="amazon"){valid=(!(page_id.indexOf("stores/")>-1||page_id.indexOf("account/")>-1||(page_id.indexOf("gp/")>-1&&page_id.indexOf("gp/product/")==-1)||page_id.search(/\-\/[^\/]{2}\/[^\/]{2}$/)>-1)&&page_id.indexOf("product-reviews/")==-1)}else{if(Trustindex_Connect.form.data("platform")=="tripadvisor"){let not_first_page=page_id.match(/\-or[\d]+\-/);if(not_first_page&¬_first_page[0]){page_id=page_id.replace(not_first_page[0],"-")}}}}if(page_id.trim()==""||!valid){Trustindex_Connect.box.html("<span>"+Trustindex_Connect.box.data("errortext")+"</span>");Trustindex_Connect.box.show();return false}Trustindex_Connect.box.hide();b("#ti-noreg-page-id").val(page_id);let page_details={id:page_id};let url=Trustindex_Connect.input.val().trim();let div=Trustindex_Connect.form.find(".ti-selected-source");Trustindex_Connect.form.find("#ti-noreg-page_details").val(JSON.stringify(page_details));div.find("img").attr("src","https://cdn.trustindex.io/assets/platform/Google/icon.png");div.find(".ti-source-info").html('<a target="_blank" href="'+url+'">'+url+"</a>");Trustindex_Connect.button.addClass("btn-disabled");div.fadeIn()},regex:null,is_regex_valid:function(c){if(!c){return false}for(let i=0;i<c.length;i++){if(c[i]===""){return false}}return true},page_id_separator:"|",async_request:function(c){let params=new URLSearchParams({type:"google",page_id:b("#ti-noreg-page-id").val().trim(),access_token:b("#ti-noreg-access-token").length?b("#ti-noreg-access-token").val():"",webhook_url:b("#ti-noreg-webhook-url").val(),email:b("#ti-noreg-email").val(),token:b("#ti-noreg-connect-token").val(),version:b("#ti-noreg-version").val()});b("#ti-connect-info").fadeIn();let ti_window=window.open("https://admin.trustindex.io/source/wordpressPageRequest?"+params.toString(),"trustindex","width=1000,height=1000,menubar=0");window.addEventListener("message",function(d){if(d.origin.startsWith("https://admin.trustindex.io/".replace(/\/$/,""))&&d.data.success){ti_window.close();b("#ti-connect-info").hide();c(b("#ti-noreg-connect-token").val(),d.data.request_id,typeof d.data.manual_download!="undefined"&&d.data.manual_download?1:0)}if(d.origin.startsWith("https://admin.trustindex.io/".replace(/\/$/,""))&&!d.data.success){ti_window.close();Trustindex_Connect.form.find(".ti-selected-source").hide();Trustindex_Connect.button.removeClass("btn-disabled");Trustindex_Connect.box.html("<span>"+Trustindex_Connect.box.data("errortext")+"</span>");Trustindex_Connect.box.show()}})}};if(Trustindex_Connect.button.length){Trustindex_Connect.button.click(Trustindex_Connect.check)}Trustindex_Connect.form.find(".btn-connect").on("click",function(c){c.preventDefault();let btn=b(this);btn.css("pointer-events","none");btn.addClass("btn-default").removeClass("btn-primary");btn.blur();TI_manage_dots(btn);Trustindex_Connect.button.css("pointer-events","none");Trustindex_Connect.async_request(function(d,f,e){b("#ti-noreg-review-download").val(d);b("#ti-noreg-review-request-id").val(f);b("#ti-noreg-manual-download").val(e);Trustindex_Connect.form.submit()})});b("#trustindex-plugin-settings-page .btn-refresh").click(function(c){let btn=jQuery(this);btn.css("pointer-events","none");btn.addClass("btn-default").removeClass("btn-primary");btn.blur();TI_manage_dots(btn);jQuery("#trustindex-plugin-settings-page .btn").css("pointer-events","none")});b(".btn-download-reviews").on("click",function(c){c.preventDefault();Trustindex_Connect.async_request(function(d,f,e){b.ajax({type:"POST",data:{review_download_request:d,review_download_request_id:f,manual_download:e}}).always(function(g){location.reload()})})});b("#review-manual-download").on("click",function(c){c.preventDefault();let btn=b(this);btn.blur().addClass("btn-disabled");TI_manage_dots(btn);b.ajax({url:location.search.replace(/&tab=[^&]+/,"&tab=setup_no_reg"),type:"POST",data:{command:"review-manual-download"},success:function(){location.reload()},error:function(){btn.restore();btn.addClass("show-tooltip")}})});var a=[];b("#ti-reg-email, #ti-reg-password").blur(function(){let email=jQuery("#ti-reg-email").val();if(jQuery.inArray(email,a)!=-1){jQuery("#txt-email-used").fadeIn();return false}jQuery.ajax({method:"POST",url:"https://admin.trustindex.io/api/userCheckEmail",data:{email:email,s:"wp"},dataType:"jsonp",success:function(c){if(c==-1){}else{if(c==0){jQuery("#txt-email-used").fadeOut()}else{let link=jQuery("#txt-email-used").find("a");link.html(link.html().replace("$email",email));jQuery("#txt-email-used").fadeIn();jQuery("#ti-reg-email").val("");a.push(email)}}}})});b("#form-reg").submit(function(c){return !jQuery("#txt-email-used").is(":visible")})});
|
static/js/admin-page-settings.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(a){a(".btn-connect-public").click(function(b){b.preventDefault();let button=a(this);let token=a("#ti-noreg-connect-token").val();let params=new URLSearchParams({type:"Google",referrer:"public",webhook_url:a("#ti-noreg-webhook-url").val(),email:a("#ti-noreg-email").val(),token:token,version:a("#ti-noreg-version").val()});let ti_window=window.open("https://admin.trustindex.io/source/edit2?"+params.toString(),"trustindex","width=1000,height=1000,menubar=0");window.addEventListener("message",function(c){if(c.origin.startsWith("https://admin.trustindex.io/".replace(/\/$/,""))&&c.data.id){ti_window.close();a("#ti-connect-info").hide();a("#ti-noreg-page_details").val(JSON.stringify(c.data));a("#ti-noreg-review-download").val(token);button.closest("form").submit()}});a("#ti-connect-info").fadeIn();let timer=setInterval(function(){if(ti_window.closed){a("#ti-connect-info").hide();clearInterval(timer)}},1000)})});
|
1 |
+
if(typeof Trustindex_JS_loaded=="undefined"){var Trustindex_JS_loaded={}}Trustindex_JS_loaded.unique=true;jQuery(document).ready(function(a){a(".btn-connect-public").click(function(b){b.preventDefault();let button=a(this);let token=a("#ti-noreg-connect-token").val();let params=new URLSearchParams({type:"Google",referrer:"public",webhook_url:a("#ti-noreg-webhook-url").val(),email:a("#ti-noreg-email").val(),token:token,version:a("#ti-noreg-version").val()});let ti_window=window.open("https://admin.trustindex.io/source/edit2?"+params.toString(),"trustindex","width=1000,height=1000,menubar=0");window.addEventListener("message",function(c){if(c.origin.startsWith("https://admin.trustindex.io/".replace(/\/$/,""))&&c.data.id){ti_window.close();a("#ti-connect-info").hide();a("#ti-noreg-page_details").val(JSON.stringify(c.data));a("#ti-noreg-review-download").val(token);button.closest("form").submit()}});a("#ti-connect-info").fadeIn();let timer=setInterval(function(){if(ti_window.closed){a("#ti-connect-info").hide();clearInterval(timer)}},1000)})});
|
tabs/my_reviews.php
CHANGED
@@ -122,7 +122,7 @@ $download_timestamp = get_option($trustindex_pm_google->get_option_name('downloa
|
|
122 |
<input type="hidden" id="ti-noreg-page-id" value="<?php echo esc_attr($page_details['id']); ?>" />
|
123 |
<input type="hidden" id="ti-noreg-webhook-url" value="<?php echo $trustindex_pm_google->get_webhook_url(); ?>" />
|
124 |
<input type="hidden" id="ti-noreg-email" value="<?php echo get_option('admin_email'); ?>" />
|
125 |
-
<input type="hidden" id="ti-noreg-version" value="9.
|
126 |
<?php if(isset($page_details['access_token'])): ?>
|
127 |
<input type="hidden" id="ti-noreg-access-token" value="<?php echo esc_attr($page_details['access_token']); ?>" />
|
128 |
<?php endif; ?>
|
122 |
<input type="hidden" id="ti-noreg-page-id" value="<?php echo esc_attr($page_details['id']); ?>" />
|
123 |
<input type="hidden" id="ti-noreg-webhook-url" value="<?php echo $trustindex_pm_google->get_webhook_url(); ?>" />
|
124 |
<input type="hidden" id="ti-noreg-email" value="<?php echo get_option('admin_email'); ?>" />
|
125 |
+
<input type="hidden" id="ti-noreg-version" value="9.2" />
|
126 |
<?php if(isset($page_details['access_token'])): ?>
|
127 |
<input type="hidden" id="ti-noreg-access-token" value="<?php echo esc_attr($page_details['access_token']); ?>" />
|
128 |
<?php endif; ?>
|
tabs/setup_no_reg.php
CHANGED
@@ -114,7 +114,7 @@ update_option($trustindex_pm_google->get_option_name('review-download-token'), $
|
|
114 |
<input type="hidden" id="ti-noreg-connect-token" name="ti-noreg-connect-token" value="<?php echo $review_download_token; ?>" />
|
115 |
<input type="hidden" id="ti-noreg-webhook-url" value="<?php echo $trustindex_pm_google->get_webhook_url(); ?>" />
|
116 |
<input type="hidden" id="ti-noreg-email" value="<?php echo get_option('admin_email'); ?>" />
|
117 |
-
<input type="hidden" id="ti-noreg-version" value="9.
|
118 |
<input type="hidden" id="ti-noreg-review-download" name="review_download" value="0" />
|
119 |
<input type="hidden" id="ti-noreg-review-request-id" name="review_request_id" value="" />
|
120 |
<input type="hidden" id="ti-noreg-manual-download" name="manual_download" value=0 />
|
114 |
<input type="hidden" id="ti-noreg-connect-token" name="ti-noreg-connect-token" value="<?php echo $review_download_token; ?>" />
|
115 |
<input type="hidden" id="ti-noreg-webhook-url" value="<?php echo $trustindex_pm_google->get_webhook_url(); ?>" />
|
116 |
<input type="hidden" id="ti-noreg-email" value="<?php echo get_option('admin_email'); ?>" />
|
117 |
+
<input type="hidden" id="ti-noreg-version" value="9.2" />
|
118 |
<input type="hidden" id="ti-noreg-review-download" name="review_download" value="0" />
|
119 |
<input type="hidden" id="ti-noreg-review-request-id" name="review_request_id" value="" />
|
120 |
<input type="hidden" id="ti-noreg-manual-download" name="manual_download" value=0 />
|
tabs/troubleshooting.php
CHANGED
@@ -39,7 +39,7 @@ 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() <= "9.
|
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 |
?>
|
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() <= "9.2");
|
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 |
?>
|
trustindex-plugin.class.php
CHANGED
@@ -474,7 +474,7 @@ $chosed_platform_slug = $this->plugin_slugs[ $force_platform ];
|
|
474 |
$current_platform_slug = $this->plugin_slugs[ $this->shortname ];
|
475 |
$file_path = preg_replace('/[^\/\\\\]+([\\\\\/]trustindex-plugin\.class\.php)/', $chosed_platform_slug . '$1', $file_path);
|
476 |
}
|
477 |
-
$chosed_platform = new self($force_platform, $file_path, "do-not-care-9.
|
478 |
if(!$chosed_platform->is_noreg_linked() || !$chosed_platform->is_noreg_table_exists($force_platform))
|
479 |
{
|
480 |
return self::get_alertbox(
|
474 |
$current_platform_slug = $this->plugin_slugs[ $this->shortname ];
|
475 |
$file_path = preg_replace('/[^\/\\\\]+([\\\\\/]trustindex-plugin\.class\.php)/', $chosed_platform_slug . '$1', $file_path);
|
476 |
}
|
477 |
+
$chosed_platform = new self($force_platform, $file_path, "do-not-care-9.2", "do-not-care-Widgets for Google Reviews", "do-not-care-Google");
|
478 |
if(!$chosed_platform->is_noreg_linked() || !$chosed_platform->is_noreg_table_exists($force_platform))
|
479 |
{
|
480 |
return self::get_alertbox(
|
uninstall.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
require_once plugin_dir_path( __FILE__ ) . 'trustindex-plugin.class.php';
|
3 |
-
$trustindex_pm_google = new TrustindexPlugin_google("google", __FILE__, "9.
|
4 |
$trustindex_pm_google->uninstall();
|
5 |
?>
|
1 |
<?php
|
2 |
require_once plugin_dir_path( __FILE__ ) . 'trustindex-plugin.class.php';
|
3 |
+
$trustindex_pm_google = new TrustindexPlugin_google("google", __FILE__, "9.2", "Widgets for Google Reviews", "Google");
|
4 |
$trustindex_pm_google->uninstall();
|
5 |
?>
|
wp-reviews-plugin-for-google.php
CHANGED
@@ -9,7 +9,7 @@ Author: Trustindex.io <support@trustindex.io>
|
|
9 |
Author URI: https://www.trustindex.io/
|
10 |
Contributors: trustindex
|
11 |
License: GPLv2 or later
|
12 |
-
Version: 9.
|
13 |
Text Domain: wp-reviews-plugin-for-google
|
14 |
Domain Path: /languages/
|
15 |
Donate link: https://www.trustindex.io/prices/
|
@@ -19,7 +19,7 @@ Copyright 2019 Trustindex Kft (email: support@trustindex.io)
|
|
19 |
*/
|
20 |
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
21 |
require_once plugin_dir_path( __FILE__ ) . 'trustindex-plugin.class.php';
|
22 |
-
$trustindex_pm_google = new TrustindexPlugin_google("google", __FILE__, "9.
|
23 |
register_activation_hook(__FILE__, array($trustindex_pm_google, 'activate'));
|
24 |
register_deactivation_hook(__FILE__, array($trustindex_pm_google, 'deactivate'));
|
25 |
add_action('admin_menu', array($trustindex_pm_google, 'add_setting_menu'), 10);
|
@@ -37,7 +37,7 @@ global $trustindex_pm_google;
|
|
37 |
if(!isset($trustindex_pm_google) || is_null($trustindex_pm_google))
|
38 |
{
|
39 |
require_once plugin_dir_path( __FILE__ ) . 'trustindex-plugin.class.php';
|
40 |
-
$trustindex_pm_google = new TrustindexPlugin_google("google", __FILE__, "9.
|
41 |
}
|
42 |
$path = wp_upload_dir()['baseurl'] .'/'. $trustindex_pm_google->getCssFile(true);
|
43 |
if(is_ssl())
|
9 |
Author URI: https://www.trustindex.io/
|
10 |
Contributors: trustindex
|
11 |
License: GPLv2 or later
|
12 |
+
Version: 9.2
|
13 |
Text Domain: wp-reviews-plugin-for-google
|
14 |
Domain Path: /languages/
|
15 |
Donate link: https://www.trustindex.io/prices/
|
19 |
*/
|
20 |
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
21 |
require_once plugin_dir_path( __FILE__ ) . 'trustindex-plugin.class.php';
|
22 |
+
$trustindex_pm_google = new TrustindexPlugin_google("google", __FILE__, "9.2", "Widgets for Google Reviews", "Google");
|
23 |
register_activation_hook(__FILE__, array($trustindex_pm_google, 'activate'));
|
24 |
register_deactivation_hook(__FILE__, array($trustindex_pm_google, 'deactivate'));
|
25 |
add_action('admin_menu', array($trustindex_pm_google, 'add_setting_menu'), 10);
|
37 |
if(!isset($trustindex_pm_google) || is_null($trustindex_pm_google))
|
38 |
{
|
39 |
require_once plugin_dir_path( __FILE__ ) . 'trustindex-plugin.class.php';
|
40 |
+
$trustindex_pm_google = new TrustindexPlugin_google("google", __FILE__, "9.2", "Widgets for Google Reviews", "Google");
|
41 |
}
|
42 |
$path = wp_upload_dir()['baseurl'] .'/'. $trustindex_pm_google->getCssFile(true);
|
43 |
if(is_ssl())
|