Version Description
Download this release
Release Info
Developer | trustindex |
Plugin | Widgets for Google Reviews |
Version | 9.1 |
Comparing to | |
See all releases |
Code changes from version 8.3 to 9.1
- 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-kk.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 +3 -3
- settings.php +1 -1
- static/css/admin-page-settings.css +1 -1
- 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 +60 -16
- tabs/setup_no_reg.php +51 -10
- tabs/setup_no_reg_header.php +92 -50
- tabs/setup_no_reg_platform.php +1 -20
- tabs/setup_trustindex.php +1 -1
- tabs/troubleshooting.php +1 -1
- trustindex-plugin.class.php +100 -56
- uninstall.php +1 -1
- wp-reviews-plugin-for-google.php +60 -3
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
CHANGED
Binary file
|
languages/trustindex-kk.mo
CHANGED
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
@@ -3,9 +3,9 @@ Contributors: trustindex
|
|
3 |
Donate link: https://www.trustindex.io/prices/
|
4 |
Tags: google, google places reviews, reviews, widget, google business, review, testimonial, testimonials, slider, rating, google my business, customer review
|
5 |
Requires at least: 3.0.1
|
6 |
-
Tested up to:
|
7 |
Requires PHP: 5.2
|
8 |
-
Stable tag:
|
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:
|
18 |
|
19 |
Embed Google reviews fast and easily into your WordPress site. Increase SEO, trust and sales using Google reviews.
|
20 |
|
3 |
Donate link: https://www.trustindex.io/prices/
|
4 |
Tags: google, google places reviews, reviews, widget, google business, review, testimonial, testimonials, slider, rating, google my business, customer review
|
5 |
Requires at least: 3.0.1
|
6 |
+
Tested up to: 6.0
|
7 |
Requires PHP: 5.2
|
8 |
+
Stable tag: 9.1
|
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.1
|
18 |
|
19 |
Embed Google reviews fast and easily into your WordPress site. Increase SEO, trust and sales using Google reviews.
|
20 |
|
settings.php
CHANGED
@@ -146,7 +146,7 @@ $proxy_check = $db_data;
|
|
146 |
window.onload = function() {
|
147 |
let warning_box = document.getElementById("ti-assets-error");
|
148 |
let link = document.getElementById("trustindex_settings_style_google-css");
|
149 |
-
if(typeof
|
150 |
{
|
151 |
warning_box.style.display = "block";
|
152 |
}
|
146 |
window.onload = function() {
|
147 |
let warning_box = document.getElementById("ti-assets-error");
|
148 |
let link = document.getElementById("trustindex_settings_style_google-css");
|
149 |
+
if(typeof Trustindex_Connect == "undefined" || typeof TI_copyTextToClipboard == "undefined" || !link || !Boolean(link.sheet))
|
150 |
{
|
151 |
warning_box.style.display = "block";
|
152 |
}
|
static/css/admin-page-settings.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800&display=swap&subset=latin-ext');@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;900&display=swap');#trustindex-plugin-settings-page{max-width:1200px}#trustindex-plugin-settings-page.ti-toggle-opacity{opacity:0;transition:opacity 0.25s}#trustindex-plugin-settings-page h1{line-height:1.25em;color:#000;font-family:"Montserrat";font-weight:600;font-size:35px}#trustindex-plugin-settings-page h1 strong{font-weight:900}#trustindex-plugin-settings-page h1 img{height:23px}@media (max-width:767px){#trustindex-plugin-settings-page h1{font-size:21px}}#trustindex-plugin-settings-page h2{margin-top:40px;font-weight:700;font-size:16px;line-height:1.35em;font-family:'Open Sans', serif}#trustindex-plugin-settings-page h3{font-weight:700;font-size:20px;font-family:'Montserrat'}#trustindex-plugin-settings-page p{font-size:16px;font-family:'Open Sans', serif;font-weight:400;color:#5c666d}#trustindex-plugin-settings-page p.text-small{font-size:10px;margin:0}#trustindex-plugin-settings-page ol,#trustindex-plugin-settings-page ol li,#trustindex-plugin-settings-page ul,#trustindex-plugin-settings-page ul li{font-size:14px;font-family:'Open Sans', serif}#trustindex-plugin-settings-page li{margin-bottom:7px}#trustindex-plugin-settings-page strong{font-weight:700;color:#000}#trustindex-plugin-settings-page .ti-widget strong{color:inherit}#trustindex-plugin-settings-page .container_wrapper{display:table;width:100%;table-layout:fixed}#trustindex-plugin-settings-page .container_cell{display:table-cell;margin:0px;padding:10px;vertical-align:top}#trustindex-plugin-settings-page #container-main{width:100%}#trustindex-plugin-settings-page #container-sidebar{width:261px;padding:100px 0 0 19px}#trustindex-plugin-settings-page #container-sidebar .sticky{position:fixed;top:200px}#trustindex-plugin-settings-page .maxwidth{max-width:1240px}#trustindex-plugin-settings-page .zoomable-pic{max-width:200px;cursor:pointer}#trustindex-plugin-settings-page .ti-check{margin-bottom:40px;margin-left:15px}#trustindex-plugin-settings-page .ti-check li{position:relative;margin-left:20px;margin-bottom:10px !important}#trustindex-plugin-settings-page .ti-check li:before{content:"";width:16px;height:16px;display:block;top:1px;left:-30px;position:absolute;background:url(../img/check-icon.svg);background-size:contain}#trustindex-plugin-settings-page .ti-left-label{font-weight:bold;font-size:14px;display:inline-block;margin-right:20px;line-height:44px;width:200px;text-align:right;cursor:unset}#trustindex-plugin-settings-page .ti-left-label span{line-height:1.3;display:inline-block;vertical-align:middle;padding:0}#trustindex-plugin-settings-page .ti-box{background:#fff;padding:70px;border-radius:4px;-webkit-box-shadow:10px 10px 39px 0px rgba(0, 0, 0, 0 0.05);-moz-box-shadow:10px 10px 39px 0px rgba(0, 0, 0, 0.05);box-shadow:10px 10px 39px 0px rgba(0, 0, 0, 0.05)}#trustindex-plugin-settings-page .ti-box h1{margin-top:0px;font-weight:700;margin-bottom:20px}@media (min-width:768px){#trustindex-plugin-settings-page .ti-box h1{font-size:40px}}#trustindex-plugin-settings-page .ti-box h2{margin-top:0px;margin-bottom:40px}#trustindex-plugin-settings-page .ti-box .ti-col-6 h2{max-width:450px;line-height:1.6em}#trustindex-plugin-settings-page .ti-box hr{border:none;height:0px;border-top:1px solid #ddd;margin-bottom:22px}@media (max-width:1200px){#trustindex-plugin-settings-page .ti-box{padding:15px}#trustindex-plugin-settings-page .ti-box hr{margin-left:-15px;margin-right:-15px;margin-bottom:30px}}#trustindex-plugin-settings-page .ti-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;box-sizing:border-box}#trustindex-plugin-settings-page .ti-col-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:0 0 50%;box-sizing:border-box}@media (min-width:1200px){#trustindex-plugin-settings-page .ti-col-6:last-child{padding-left:100px}}#trustindex-plugin-settings-page .ti-col-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:0 0 100%}#trustindex-plugin-settings-page .ti-col-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}#trustindex-plugin-settings-page .ti-col{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}@media (max-width:1200px){#trustindex-plugin-settings-page .ti-col-6,#trustindex-plugin-settings-page .ti-col-auto,#trustindex-plugin-settings-page .ti-col{-ms-flex:0 0 100%;flex:0 0 100%;max-width:0 0 100%}}#trustindex-plugin-settings-page .rate-us .rate-us-wrapper{font-size:18px}@media (min-width:1200px){#trustindex-plugin-settings-page .rate-us .rate-us-wrapper{text-align:right}#trustindex-plugin-settings-page .rate-us .rate-us-wrapper p{margin-bottom:10px !important;font-size:20px !important;margin-top:0px !important}}#trustindex-plugin-settings-page .ti-my-reviews .ti-user-avatar{width:30px;margin-bottom:-2px;border-radius:50%}#trustindex-plugin-settings-page .ti-my-reviews .ti-star{display:inline-block;width:17px}#trustindex-plugin-settings-page .ti-my-reviews .morecontent a{outline:0 !important;box-shadow:none !important}#trustindex-plugin-settings-page .ti-tooltip{position:relative;pointer-events:auto !important}#trustindex-plugin-settings-page .ti-tooltip .ti-tooltip-message{color:#fff;background-color:#3B404B;padding:0px 6px;border-radius:4px;font-size:11px;line-height:20px;font-weight:500;display:inline-block;width:auto !important;height:auto !important;position:absolute;right:100%;top:0;margin-right:25px;white-space:nowrap;opacity:0;transition:all 0.3s ease-in-out}#trustindex-plugin-settings-page .ti-tooltip .ti-tooltip-message:before{width:0;height:0;border-style:solid;border-width:5px 0 5px 5px;border-color:transparent transparent transparent #3B404B;content:"";position:absolute;right:-5px;top:50%;margin-top:-5px}#trustindex-plugin-settings-page .ti-tooltip:hover .ti-tooltip-message{opacity:1;margin-right:10px}#trustindex-plugin-settings-page .text-center{text-align:center}#trustindex-plugin-settings-page .ti-notice{background:#fff;border:1px solid #c3c4c7;border-left-width:4px;box-shadow:0 1px 1px rgba(0, 0, 0, 0.04);margin:5px 15px 2px;padding:1px 12px}#trustindex-plugin-settings-page .ti-notice.notice-info{border-left-color:#72aee6}#trustindex-plugin-settings-page .ti-notice.notice-error{border-left-color:#d63638}#trustindex-plugin-settings-page .ti-notice.notice-warning{border-left-color:#dba617}#trustindex-plugin-settings-page .ti-notice.notice-success{border-left-color:#00a32a}#trustindex-plugin-settings-page .ti-notice.is-dismissible{position:relative;padding-right:38px}#trustindex-plugin-settings-page .form-group{display:block;overflow:hidden;margin-top:20px;position:relative}#trustindex-plugin-settings-page .form-control{width:100%;margin:0;padding:6px 15px;border-radius:0.25rem;border:2px solid #ddd;background-color:#efefef}#trustindex-plugin-settings-page .input-group{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;width:100%}#trustindex-plugin-settings-page .input-group>.form-control{position:relative;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;width:1%;margin-bottom:0}#trustindex-plugin-settings-page .input-group-prepend{margin-right:-1px}#trustindex-plugin-settings-page .input-group-append,#trustindex-plugin-settings-page .input-group-prepend{display:-webkit-box;display:-ms-flexbox;display:flex}#trustindex-plugin-settings-page .input-group-text{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:0.375rem 0.75rem;margin-bottom:0;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:0.25rem;border-top-right-radius:0;border-bottom-right-radius:0}#trustindex-plugin-settings-page .ti-checkbox{float:left;display:inline-block;margin-bottom:10px;margin-right:15px;white-space:nowrap;cursor:pointer;user-select:none}#trustindex-plugin-settings-page .ti-checkbox.row{margin-right:100%}#trustindex-plugin-settings-page .ti-checkbox.disabled{cursor:default}#trustindex-plugin-settings-page .ti-checkbox.disabled label{color:rgba(68, 68, 68, 0.5);cursor:default !important}#trustindex-plugin-settings-page .ti-checkbox input,#trustindex-plugin-settings-page .ti-checkbox label{pointer-events:none}#trustindex-plugin-settings-page .ti-checkbox input{position:relative;top:2px;margin-right:10px}#trustindex-plugin-settings-page .ti-checkbox label{font-size:14px !important}#trustindex-plugin-settings-page .ti-checkbox span{width:16px;height:16px;display:inline-block;margin-right:1px}#trustindex-plugin-settings-page .ti-select{display:block;max-width:calc(25rem - 30px);margin:0;padding:8px 15px;border-radius:0.25rem;border:2px solid #ddd;background-color:#efefef;font-size:14px;line-height:2;color:#32373c;position:relative;cursor:pointer;user-select:none}#trustindex-plugin-settings-page .ti-select:after{content:'\203A';position:absolute;top:50%;right:9px;font-size:26px;z-index:1;transform:translateY(-50%) rotate(90deg)}#trustindex-plugin-settings-page .ti-select ul{display:none;position:absolute;z-index:1;left:-1px;top:100%;width:100%;margin:0;padding:0;list-style-type:none;background-color:#efefef;border:1px solid #ddd;border-top:0;border-bottom-left-radius:0.25rem;border-bottom-right-radius:0.25rem}#trustindex-plugin-settings-page .ti-select ul li{display:block;margin:0 !important;padding:5px 10px;border-top:1px solid #ccc;cursor:pointer;line-height:1.4;transition:all 0.3s}#trustindex-plugin-settings-page .ti-select ul li:hover{background:rgba(30, 144, 255, 0.3)}#trustindex-plugin-settings-page .ti-select ul li.selected{background:rgba(30, 144, 255, 0.6);pointer-events:none}#trustindex-plugin-settings-page .ti-select ul li li *{pointer-events:none}#trustindex-plugin-settings-page .ti-select .ti-star{position:relative;top:3px;width:16px;height:16px;display:inline-block;margin-right:1px}#trustindex-plugin-settings-page .ti-select.active{border-radius:0;border-top-left-radius:0.25rem;border-top-right-radius:0.25rem}#trustindex-plugin-settings-page .ti-select.active ul{display:block}#trustindex-plugin-settings-page .ti-select.active:after{content:'\2039'}#trustindex-plugin-settings-page .ti-toggle-password{position:absolute;right:16px;bottom:15px;font-size:26px;cursor:pointer;z-index:1;opacity:0.7;transition:opacity 0.3s}#trustindex-plugin-settings-page .ti-toggle-password:hover{opacity:1}#trustindex-plugin-settings-page .btn{display:block;line-height:1.5;text-align:center;white-space:nowrap;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;padding:0.8rem 1.5rem;margin:20px auto 0px auto;width:fit-content;font-size:1.2rem;border-radius:0.25rem;-webkit-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;font-weight:bold;text-decoration:none;cursor:pointer}#trustindex-plugin-settings-page .btn:hover{color:#fff;opacity:0.9}#trustindex-plugin-settings-page .btn-primary{background-color:#ee7321 !important;border-color:#ee7321 !important;font-family:"Montserrat";font-weight:700;color:white}#trustindex-plugin-settings-page .btn-danger{background-color:#d9534f !important;border-color:#d9534f !important;color:white}#trustindex-plugin-settings-page .btn-text{display:inline-block;color:#fff;text-decoration:none;border-radius:4px;background:#2AA8D7;font-family:"Montserrat";padding:10px 15px;margin:3px;font-weight:700;outline:0 !important}#trustindex-plugin-settings-page .btn-text:hover{background-color:#2187ad}#trustindex-plugin-settings-page .btn-disabled{background:#bdbec2 !important;border-color:#bdbec2 !important}#trustindex-plugin-settings-page .autocomplete{display:block;position:relative}#trustindex-plugin-settings-page .autocomplete .input{display:inline-block;vertical-align:top;margin-right:5px;position:relative}#trustindex-plugin-settings-page .autocomplete .input input[type=text]:focus{background:#e3f2f9;border:2px solid #2AA8D7;outline:0;box-shadow:unset !important}#trustindex-plugin-settings-page .autocomplete .info-text{padding:0;padding-top:5px;opacity:0.5}#trustindex-plugin-settings-page .autocomplete .loading{position:absolute;right:8px;top:14px;width:18px;z-index:1;display:none}#trustindex-plugin-settings-page .autocomplete .btn-text{font-size:14px !important;padding:6px 15px;line-height:2;border:2px solid #2AA8D7;outline:0 !important;display:inline-block;vertical-align:top;margin:0}#trustindex-plugin-settings-page .autocomplete span{display:block;padding:10px}#trustindex-plugin-settings-page .autocomplete span.error{color:#e33244}#trustindex-plugin-settings-page .autocomplete .results{position:absolute;top:46px;z-index:1;width:calc(100% - 2px);padding:0;margin:0;border-radius:0.25rem;border:1px solid #ddd;background:#fff;display:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#trustindex-plugin-settings-page .autocomplete .results:after,#trustindex-plugin-settings-page .autocomplete .results:before{bottom:100%;left:32px;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}#trustindex-plugin-settings-page .autocomplete .results:after{border-color:rgba(255, 255, 255, 0);border-bottom-color:#fff;border-width:8px;margin-left:-8px}#trustindex-plugin-settings-page .autocomplete .results:before{border-color:rgba(221, 221, 221, 0);border-bottom-color:#ddd;border-width:9px;margin-left:-9px}#trustindex-plugin-settings-page .autocomplete .results ul{display:block;max-height:300px;overflow:auto;list-style-type:none;margin:0;padding:0}#trustindex-plugin-settings-page .autocomplete .results li{display:block;padding:5px 10px;margin:0;border-bottom:1px solid grey;cursor:pointer;transition:all 0.25s}#trustindex-plugin-settings-page .autocomplete .results li:last-of-type{border-bottom:0}#trustindex-plugin-settings-page .autocomplete .results li:hover{background:rgba(0, 100, 255, 0.1)}#trustindex-plugin-settings-page .autocomplete .results li svg{width:40px;height:40px;position:relative;top:3px;margin-right:10px;float:left}#trustindex-plugin-settings-page .autocomplete .results li img{width:44px;height:44px;margin-right:10px;float:left;border-radius:50%;box-shadow:0 0 2px black}#trustindex-plugin-settings-page .autocomplete .results li .title{margin:0;margin-bottom:5px;font-size:14px;color:#000;pointer-events:none}#trustindex-plugin-settings-page .autocomplete .results li .location{margin:0;font-size:12px;color:#888;pointer-events:none}#trustindex-plugin-settings-page .nav-tab-wrapper{margin-bottom:0;border:0;padding-right:100px;position:relative}#trustindex-plugin-settings-page .nav-tab{background-color:#f9f9f9;border:0;box-shadow:0 0 0px black !important;border-top:4px solid #f9f9f9;padding:12px 15px;margin-left:0;margin-right:0.35em}#trustindex-plugin-settings-page .nav-tab:last-child{margin-right:0}@media (max-width:1099px){#trustindex-plugin-settings-page .nav-tab{margin-bottom:0.35em}}#trustindex-plugin-settings-page .nav-tab-active{background-color:#fff !important;border-color:#2aa9d6}#trustindex-plugin-settings-page .nav-tab-right{position:absolute;right:0;bottom:0}#trustindex-plugin-settings-page .ti-free-steps{margin-top:0;background:#fff;font-size:14px;display:flex;justify-content:space-between;position:relative;padding:5px 0}#trustindex-plugin-settings-page .ti-free-steps li{list-style:none;padding:20px 0;display:inline-block;color:#afb2b8;margin-bottom:0;white-space:nowrap}#trustindex-plugin-settings-page .ti-free-steps li:first-child{padding-left:20px}#trustindex-plugin-settings-page .ti-free-steps li:last-child{padding-right:20px}#trustindex-plugin-settings-page .ti-free-steps li>span{display:inline-block;width:20px;height:20px;line-height:20px;text-align:center;background:#bdbec2;color:white;margin-right:7px;font-size:11px;border-radius:4px;font-weight:normal}#trustindex-plugin-settings-page .ti-free-steps li.current{font-weight:bold;pointer-events:none}#trustindex-plugin-settings-page .ti-free-steps li.active,#trustindex-plugin-settings-page .ti-free-steps li.done{color:black;cursor:pointer}#trustindex-plugin-settings-page .ti-free-steps li.active>span{background:#2aa8d8;box-shadow:0 0 3px #2aa8d8}#trustindex-plugin-settings-page .ti-free-steps li.done>span{background:#4db594;color:transparent;position:relative}#trustindex-plugin-settings-page .ti-free-steps li.done>span:after{content:'\2713';color:white;margin-left:-7px;font-weight:bold}#trustindex-plugin-settings-page .ti-free-steps .ti-free-arrow{position:relative;display:inline-block;padding:0;padding-top:25px}#trustindex-plugin-settings-page .ti-free-steps .ti-free-arrow:before,#trustindex-plugin-settings-page .ti-free-steps .ti-free-arrow:after{content:'';background:#d8d8d8;position:relative;width:11px;height:3px;display:block;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);border-radius:2px}#trustindex-plugin-settings-page .ti-free-steps .ti-free-arrow:after{-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);top:4px}@media (max-width:1240px){#trustindex-plugin-settings-page .ti-free-steps{flex-wrap:wrap}#trustindex-plugin-settings-page .ti-free-steps .ti-free-arrow:nth-child(4){width:100%;opacity:0;padding-top:0;margin-top:-6px}#trustindex-plugin-settings-page .ti-free-steps li:nth-child(3){padding-right:20px}#trustindex-plugin-settings-page .ti-free-steps li:nth-child(5){padding-left:20px}}@media (max-width:600px){#trustindex-plugin-settings-page .ti-free-steps .ti-free-arrow:nth-child(2),#trustindex-plugin-settings-page .ti-free-steps .ti-free-arrow:nth-child(6){width:100%;opacity:0;padding-top:0;margin-top:-6px}#trustindex-plugin-settings-page .ti-free-steps li:nth-child(1),#trustindex-plugin-settings-page .ti-free-steps li:nth-child(5){padding-right:20px}#trustindex-plugin-settings-page .ti-free-steps li:nth-child(3),#trustindex-plugin-settings-page .ti-free-steps li:nth-child(7){padding-left:20px;padding-right:0}#trustindex-plugin-settings-page .ti-free-steps .ti-free-arrow:nth-child(4){width:unset;opacity:unset;padding-top:25px;margin-top:unset}#trustindex-plugin-settings-page .ti-free-steps li:nth-child(5){padding-left:0}}#trustindex-plugin-settings-page .ti-free-title{font-size:25px !important;font-weight:bold !important;padding:0 20px;margin:25px 0 !important}#trustindex-plugin-settings-page .ti-free-subtitle{font-size:18px !important;font-weight:bold !important;padding:0 15px;margin-bottom:15px !important;margin-top:45px !important}#trustindex-plugin-settings-page .ti-back-icon{color:#5d6268;float:right;font-size:14px;font-weight:bold;position:relative;cursor:pointer;text-decoration:none;box-shadow:0 0 0px black !important;text-shadow:none !important}#trustindex-plugin-settings-page .ti-back-icon:before,#trustindex-plugin-settings-page .ti-back-icon:after{content:'';background:#d8d8d8;position:absolute;left:-18px;top:11px;width:9px;height:3px;display:block;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border-radius:2px}#trustindex-plugin-settings-page .ti-back-icon:after{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);margin-top:4px}#trustindex-plugin-settings-page .ti-box{background:white;padding:25px;border-radius:4px;margin-bottom:1em}#trustindex-plugin-settings-page .ti-box .btn-text{margin-left:0;font-size:13px}#trustindex-plugin-settings-page .ti-box>.ti-header{font-size:18px;font-weight:600;border-bottom:1px solid #e0e0e0;margin-bottom:20px;padding-bottom:10px;color:inherit}#trustindex-plugin-settings-page .ti-box>.ti-header span,#trustindex-plugin-settings-page .ti-box>.ti-header strong{color:inherit}#trustindex-plugin-settings-page .ti-box>.ti-header .btn-text{margin:0;padding:5px 15px;margin-top:-5px}#trustindex-plugin-settings-page .ti-box>.ti-footer{border-top:1px solid #e0e0e0;margin-top:20px;padding-top:20px}#trustindex-plugin-settings-page .ti-box .preview{float:unset;box-sizing:border-box}#trustindex-plugin-settings-page .ti-box img{max-width:100%}#trustindex-plugin-settings-page .ti-box.ti-notice-error{border-left:4px solid red;border-top-left-radius:0;border-bottom-left-radius:0}#trustindex-plugin-settings-page .ti-box.ti-notice-warning{border-left:4px solid #ffb900;border-top-left-radius:0;border-bottom-left-radius:0}#trustindex-plugin-settings-page .ti-preview-boxes-container{display:flex;flex-wrap:wrap;margin:0 -10px;box-sizing:border-box}#trustindex-plugin-settings-page .ti-preview-boxes-container .ti-full-width{flex:0 0 100%;max-width:100%;padding-left:10px;padding-right:10px;box-sizing:inherit;margin-bottom:20px}#trustindex-plugin-settings-page .ti-preview-boxes-container .ti-half-width{flex:0 0 50%;max-width:50%;padding-left:10px;padding-right:10px;margin-left:auto;margin-right:auto;box-sizing:inherit;margin-bottom:20px}#trustindex-plugin-settings-page .ti-preview-boxes-container .ti-preview-boxes{height:100%}#trustindex-plugin-settings-page .ti-header-layout-text{font-weight:normal;font-size:85%}#trustindex-plugin-settings-page .ti-pull-right{float:right}#trustindex-plugin-settings-page .ti-pull-right+.ti-pull-right{margin-right:20px}#trustindex-plugin-settings-page .ti-left-block,#trustindex-plugin-settings-page .ti-right-block{display:inline-block !important;float:left;vertical-align:top;width:calc(50% - 15px) !important;margin:0 !important}#trustindex-plugin-settings-page .ti-left-block .form-control,#trustindex-plugin-settings-page .ti-right-block .form-control{max-width:400px}#trustindex-plugin-settings-page .ti-right-block{float:right}#trustindex-plugin-settings-page .ti-input-row{margin-bottom:1.33em}#trustindex-plugin-settings-page .ti-input-row:last-child{margin:0}#trustindex-plugin-settings-page .ti-input-row label{display:block;font-size:15px;font-weight:600;font-family:inherit;cursor:unset;color:inherit;margin-bottom:0.5em}#trustindex-plugin-settings-page #ti-widget-options{margin-top:25px}#trustindex-plugin-settings-page .ti-preview-box{padding:10px 0}#trustindex-plugin-settings-page .code-shortcode{display:inline-block;padding:10px;border-radius:0.25rem;border:2px solid #dcdce4;background:#f1f1f1}#trustindex-plugin-settings-page .code-shortcode+a{position:relative;top:1px}#trustindex-plugin-settings-page .ti-seo-list{margin:20px 0;counter-reset:li;padding-left:35px}#trustindex-plugin-settings-page .ti-seo-list li{position:relative;list-style:none;margin:0;margin-bottom:25px;counter-increment:li}#trustindex-plugin-settings-page .ti-seo-list li:before{content:counter(li);position:absolute;left:-35px;top:0;display:inline-block;width:20px;height:20px;line-height:20px;text-align:center;background:#4db594;color:white;font-size:11px;border-radius:4px;font-weight:normal}#trustindex-plugin-settings-page .ti-filter-row{font-size:14px;display:block;padding:20px 25px;background:#f7f7f7;margin-bottom:10px;border-radius:4px}#trustindex-plugin-settings-page .ti-filter-row>label{margin-right:15px}#trustindex-plugin-settings-page .ti-filter-row .ti-checkbox{float:unset;width:auto;margin-bottom:0}#trustindex-plugin-settings-page .ti-filter-row .ti-checkbox input{margin-right:3px}#trustindex-plugin-settings-page .ti-source-box{display:block;border:1px solid #dddddf;box-shadow:2px 2px 5px rgba(0, 0, 0, 0.1);background:white;padding:15px;padding-right:175px;position:relative;border-radius:4px;margin-bottom:20px}#trustindex-plugin-settings-page .ti-source-box img{float:left;border-radius:50%;width:50px;height:50px;margin-right:10px;object-fit:cover;object-position:top}#trustindex-plugin-settings-page .ti-source-box .ti-source-info{display:inline-block;word-wrap:break-word;max-width:calc(100% - 70px)}#trustindex-plugin-settings-page .ti-source-box .btn-text{position:absolute;right:15px;top:50%;transform:translateY(-50%);margin:0;font-size:13px}#trustindex-plugin-settings-page .ti-selected-source{margin-top:15px;display:none}#trustindex-plugin-settings-page .ti-selected-source .ti-left-label{vertical-align:top;line-height:unset;padding-top:10px;float:left}#trustindex-plugin-settings-page .ti-selected-source .ti-source-box{display:inline-block;width:550px;margin-bottom:0;float:left}#trustindex-plugin-settings-page .ti-selected-source .ti-source-box+.ti-source-box{margin-left:220px;margin-top:20px}#trustindex-plugin-settings-page #ti-widget-options .ti-checkbox{margin-bottom:5px}#trustindex-plugin-settings-page .ti-highlight-content{display:block;margin-top:10px;padding:10px 20px;background:#eee;position:relative}#trustindex-plugin-settings-page .ti-highlight-content .selection-content{position:relative;z-index:1}#trustindex-plugin-settings-page .ti-highlight-content .raw-content{position:absolute;color:transparent;width:calc(100% - 40px);z-index:0}#trustindex-plugin-settings-page .ti-highlight-content .raw-content mark{color:transparent !important;background:#fbe049 !important}#trustindex-plugin-settings-page .ti-my-reviews mark.ti-highlight{padding:0 1px;background:#4682B4;color:white}#trustindex-plugin-settings-page .ti-prokontra-good svg,#trustindex-plugin-settings-page .ti-prokontra-bad svg{width:18px;height:18px;display:inline-block;vertical-align:sub;position:relative;top:-1px}#trustindex-plugin-settings-page .ti-prokontra-good svg{fill:#0ab21b}#trustindex-plugin-settings-page .ti-prokontra-bad svg{fill:#383838}#trustindex-plugin-settings-page .ti-prokontra-good:after,#trustindex-plugin-settings-page .ti-prokontra-bad:after{content:'\a0\b7\a0'}#trustindex-plugin-settings-page .ti-special-offer{width:40%;margin:10px 0}#trustindex-plugin-settings-page .ti-special-offer img{float:left;width:100px;border:0;margin-right:15px;margin-top:2px}#trustindex-plugin-settings-page .ti-special-offer p{font-size:14px}#trustindex-plugin-settings-page .ti-modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:5;display:none;overflow-x:hidden;overflow-y:auto;outline:0;background:rgba(0, 0, 0, 0.5)}#trustindex-plugin-settings-page .ti-modal .ti-modal-dialog{position:relative;width:auto;margin:30px auto;margin-top:50px;max-width:800px}#trustindex-plugin-settings-page .ti-modal .ti-modal-content{position:relative;display:flex;flex-direction:column;background-color:white;background-clip:padding-box;border:1px solid rgba(0, 0, 0, 0.2);border-radius:4px;outline:0}#trustindex-plugin-settings-page .ti-modal .ti-modal-header{display:flex;align-items:center;justify-content:space-between;padding:15px;border-bottom:1px solid #e0e0e0;font-size:18px;font-weight:600}#trustindex-plugin-settings-page .ti-modal .ti-modal-title{margin-bottom:0;line-height:1.5}#trustindex-plugin-settings-page .ti-modal .ti-modal-body{position:relative;flex:1 1 auto;padding:15px}#trustindex-plugin-settings-page .ti-modal .ti-modal-footer{display:flex;align-items:center;justify-content:flex-end;padding:15px;border-top:1px solid #e0e0e0}#trustindex-plugin-settings-page .ti-modal .ti-modal-footer>:not(:first-child){margin-left:0.25rem}#trustindex-plugin-settings-page .ti-modal .ti-modal-footer>:not(:last-child){margin-right:0.25rem}#trustindex-plugin-settings-page .troubleshooting-checklist{list-style:decimal;padding-left:25px}#trustindex-plugin-settings-page .troubleshooting-checklist .dashicons{position:relative;top:-1px;margin:0 3px}#trustindex-plugin-settings-page .troubleshooting-checklist .dashicons.dashicons-yes-alt{color:green}#trustindex-plugin-settings-page .troubleshooting-checklist .dashicons.dashicons-dismiss{color:red}#trustindex-plugin-settings-page .troubleshooting-checklist ul{list-style:disc !important;margin:15px 0 !important;padding-left:30px !important}#trustindex-plugin-settings-page .troubleshooting-checklist ul li:last-child{margin-bottom:0}#trustindex-plugin-settings-page .troubleshooting-checklist .ti-notice{margin:5px 15px 2px !important;margin-left:0 !important;padding-left:8px}#trustindex-plugin-settings-page .troubleshooting-checklist .ti-notice p{margin:0.1em 0;font-size:13px}#trustindex-plugin-settings-page .troubleshooting-checklist a{text-decoration:none}#trustindex-plugin-settings-page .ti-troubleshooting-info{width:calc(100% - 50px);height:200px;resize:none;outline:0 !important;box-shadow:none !important;border:1px solid #7e8993 !important;margin:0 25px}#trustindex-plugin-settings-page .ti-troubleshooting-info+.btn-text{margin-top:10px;margin-right:25px}#ti-loading{position:fixed;background:rgba(240, 240, 241, 0.9);left:0;top:0;width:100%;height:100%;display:none;opacity:0;transition:opacity 0.4s}#ti-loading.active{display:block;opacity:1}#ti-loading .ti-loading-effect{display:inline-block;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);width:80px;height:80px}#ti-loading .ti-loading-effect div{display:inline-block;position:absolute;left:8px;width:16px;background:#000;animation:ti-loading-effect 1.2s cubic-bezier(0, 0.5, 0.5, 1) infinite}#ti-loading .ti-loading-effect div:nth-child(1){left:8px;animation-delay:-0.24s}#ti-loading .ti-loading-effect div:nth-child(2){left:32px;animation-delay:-0.12s}#ti-loading .ti-loading-effect div:nth-child(3){left:56px;animation-delay:0}@keyframes ti-loading-effect{0%{top:8px;height:64px}50%,100%{top:24px;height:32px}}
|
1 |
+
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800&display=swap&subset=latin-ext');@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;900&display=swap');#trustindex-plugin-settings-page{max-width:1200px}#trustindex-plugin-settings-page.ti-toggle-opacity{opacity:0;transition:opacity 0.25s}#trustindex-plugin-settings-page h1{line-height:1.25em;color:#000;font-family:"Montserrat";font-weight:600;font-size:35px}#trustindex-plugin-settings-page h1 strong{font-weight:900}#trustindex-plugin-settings-page h1 img{height:23px}@media (max-width:767px){#trustindex-plugin-settings-page h1{font-size:21px}}#trustindex-plugin-settings-page h2{margin-top:40px;font-weight:700;font-size:16px;line-height:1.35em;font-family:'Open Sans', serif}#trustindex-plugin-settings-page h3{font-weight:700;font-size:20px;font-family:'Montserrat'}#trustindex-plugin-settings-page p{font-size:16px;font-family:'Open Sans', serif;font-weight:400;color:#5c666d}#trustindex-plugin-settings-page p.text-small{font-size:10px;margin:0}#trustindex-plugin-settings-page ol,#trustindex-plugin-settings-page ol li,#trustindex-plugin-settings-page ul,#trustindex-plugin-settings-page ul li{font-size:14px;font-family:'Open Sans', serif}#trustindex-plugin-settings-page li{margin-bottom:7px}#trustindex-plugin-settings-page strong{font-weight:700;color:#000}#trustindex-plugin-settings-page .ti-widget strong{color:inherit}#trustindex-plugin-settings-page .container_wrapper{display:table;width:100%;table-layout:fixed}#trustindex-plugin-settings-page .container_cell{display:table-cell;margin:0px;padding:10px;vertical-align:top}#trustindex-plugin-settings-page #container-main{width:100%}#trustindex-plugin-settings-page #container-sidebar{width:261px;padding:100px 0 0 19px}#trustindex-plugin-settings-page #container-sidebar .sticky{position:fixed;top:200px}#trustindex-plugin-settings-page .maxwidth{max-width:1240px}#trustindex-plugin-settings-page .zoomable-pic{max-width:200px;cursor:pointer}#trustindex-plugin-settings-page .ti-check{margin-bottom:40px;margin-left:15px}#trustindex-plugin-settings-page .ti-check li{position:relative;margin-left:20px;margin-bottom:10px !important}#trustindex-plugin-settings-page .ti-check li:before{content:"";width:16px;height:16px;display:block;top:1px;left:-30px;position:absolute;background:url(../img/check-icon.svg);background-size:contain}#trustindex-plugin-settings-page .ti-left-label{font-weight:bold;font-size:14px;display:inline-block;margin-right:20px;line-height:44px;width:200px;text-align:right;cursor:unset}#trustindex-plugin-settings-page .ti-left-label span{line-height:1.3;display:inline-block;vertical-align:middle;padding:0}#trustindex-plugin-settings-page .ti-box{background:#fff;padding:70px;border-radius:4px;-webkit-box-shadow:10px 10px 39px 0px rgba(0, 0, 0, 0 0.05);-moz-box-shadow:10px 10px 39px 0px rgba(0, 0, 0, 0.05);box-shadow:10px 10px 39px 0px rgba(0, 0, 0, 0.05)}#trustindex-plugin-settings-page .ti-box h1{margin-top:0px;font-weight:700;margin-bottom:20px}@media (min-width:768px){#trustindex-plugin-settings-page .ti-box h1{font-size:40px}}#trustindex-plugin-settings-page .ti-box h2{margin-top:0px;margin-bottom:40px}#trustindex-plugin-settings-page .ti-box .ti-col-6 h2{max-width:450px;line-height:1.6em}#trustindex-plugin-settings-page .ti-box hr{border:none;height:0px;border-top:1px solid #ddd;margin-bottom:22px}@media (max-width:1200px){#trustindex-plugin-settings-page .ti-box{padding:15px}#trustindex-plugin-settings-page .ti-box hr{margin-left:-15px;margin-right:-15px;margin-bottom:30px}}#trustindex-plugin-settings-page .ti-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;box-sizing:border-box}#trustindex-plugin-settings-page .ti-col-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:0 0 50%;box-sizing:border-box}@media (min-width:1200px){#trustindex-plugin-settings-page .ti-col-6:last-child{padding-left:100px}}#trustindex-plugin-settings-page .ti-col-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:0 0 100%}#trustindex-plugin-settings-page .ti-col-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}#trustindex-plugin-settings-page .ti-col{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}@media (max-width:1200px){#trustindex-plugin-settings-page .ti-col-6,#trustindex-plugin-settings-page .ti-col-auto,#trustindex-plugin-settings-page .ti-col{-ms-flex:0 0 100%;flex:0 0 100%;max-width:0 0 100%}}#trustindex-plugin-settings-page .rate-us .rate-us-wrapper{font-size:18px}@media (min-width:1200px){#trustindex-plugin-settings-page .rate-us .rate-us-wrapper{text-align:right}#trustindex-plugin-settings-page .rate-us .rate-us-wrapper p{margin-bottom:10px !important;font-size:20px !important;margin-top:0px !important}}#trustindex-plugin-settings-page .ti-my-reviews .ti-user-avatar{width:30px;margin-bottom:-2px;border-radius:50%}#trustindex-plugin-settings-page .ti-my-reviews .ti-star{display:inline-block;width:17px}#trustindex-plugin-settings-page .ti-my-reviews .morecontent a{outline:0 !important;box-shadow:none !important}#trustindex-plugin-settings-page .ti-tooltip{position:relative;pointer-events:auto !important}#trustindex-plugin-settings-page .ti-tooltip .ti-tooltip-message{color:#fff;background-color:#3B404B;padding:0px 6px;border-radius:4px;font-size:11px;line-height:20px;font-weight:500;display:inline-block;width:auto !important;height:auto !important;position:absolute;right:100%;top:0;margin-right:25px;white-space:nowrap;opacity:0;transition:all 0.3s ease-in-out}#trustindex-plugin-settings-page .ti-tooltip .ti-tooltip-message:before{width:0;height:0;border-style:solid;border-width:5px 0 5px 5px;border-color:transparent transparent transparent #3B404B;content:"";position:absolute;right:-5px;top:50%;margin-top:-5px}#trustindex-plugin-settings-page .ti-tooltip:hover .ti-tooltip-message{opacity:1;margin-right:10px}#trustindex-plugin-settings-page .ti-tooltip#review-manual-download.btn-disabled{pointer-events:none !important}#trustindex-plugin-settings-page .ti-tooltip#review-manual-download .ti-tooltip-message{right:initial;margin-right:0;margin-left:25px;left:100%;top:3px}#trustindex-plugin-settings-page .ti-tooltip#review-manual-download .ti-tooltip-message:before{right:initial;left:-5px;border-width:5px 5px 5px 0;border-color:transparent #3B404B transparent transparent}#trustindex-plugin-settings-page .ti-tooltip#review-manual-download:hover .ti-tooltip-message{opacity:0;margin-right:initial}#trustindex-plugin-settings-page .ti-tooltip#review-manual-download.show-tooltip .ti-tooltip-message{opacity:1 !important;margin-left:10px}#trustindex-plugin-settings-page .text-center{text-align:center}#trustindex-plugin-settings-page .ti-notice{background:#fff;border:1px solid #c3c4c7;border-left-width:4px;box-shadow:0 1px 1px rgba(0, 0, 0, 0.04);margin:5px 15px 2px;padding:1px 12px}#trustindex-plugin-settings-page .ti-notice.notice-info{border-left-color:#72aee6}#trustindex-plugin-settings-page .ti-notice.notice-error{border-left-color:#d63638}#trustindex-plugin-settings-page .ti-notice.notice-warning{border-left-color:#dba617}#trustindex-plugin-settings-page .ti-notice.notice-success{border-left-color:#00a32a}#trustindex-plugin-settings-page .ti-notice.is-dismissible{position:relative;padding-right:38px}#trustindex-plugin-settings-page .form-group{display:block;overflow:hidden;margin-top:20px;position:relative}#trustindex-plugin-settings-page .form-control{width:100%;margin:0;padding:6px 15px;border-radius:0.25rem;border:2px solid #ddd;background-color:#efefef}#trustindex-plugin-settings-page .input-group{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;width:100%}#trustindex-plugin-settings-page .input-group>.form-control{position:relative;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;width:1%;margin-bottom:0}#trustindex-plugin-settings-page .input-group-prepend{margin-right:-1px}#trustindex-plugin-settings-page .input-group-append,#trustindex-plugin-settings-page .input-group-prepend{display:-webkit-box;display:-ms-flexbox;display:flex}#trustindex-plugin-settings-page .input-group-text{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:0.375rem 0.75rem;margin-bottom:0;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:0.25rem;border-top-right-radius:0;border-bottom-right-radius:0}#trustindex-plugin-settings-page .ti-checkbox{float:left;display:inline-block;margin-bottom:10px;margin-right:15px;white-space:nowrap;cursor:pointer;user-select:none}#trustindex-plugin-settings-page .ti-checkbox.row{margin-right:100%}#trustindex-plugin-settings-page .ti-checkbox.disabled{cursor:default}#trustindex-plugin-settings-page .ti-checkbox.disabled label{color:rgba(68, 68, 68, 0.5);cursor:default !important}#trustindex-plugin-settings-page .ti-checkbox input,#trustindex-plugin-settings-page .ti-checkbox label{pointer-events:none}#trustindex-plugin-settings-page .ti-checkbox input{position:relative;top:2px;margin-right:10px}#trustindex-plugin-settings-page .ti-checkbox label{font-size:14px !important}#trustindex-plugin-settings-page .ti-checkbox span{width:16px;height:16px;display:inline-block;margin-right:1px}#trustindex-plugin-settings-page .ti-select{display:block;max-width:calc(25rem - 30px);margin:0;padding:8px 15px;border-radius:0.25rem;border:2px solid #ddd;background-color:#efefef;font-size:14px;line-height:2;color:#32373c;position:relative;cursor:pointer;user-select:none}#trustindex-plugin-settings-page .ti-select:after{content:'\203A';position:absolute;top:50%;right:9px;font-size:26px;z-index:1;transform:translateY(-50%) rotate(90deg)}#trustindex-plugin-settings-page .ti-select ul{display:none;position:absolute;z-index:1;left:-1px;top:100%;width:100%;margin:0;padding:0;list-style-type:none;background-color:#efefef;border:1px solid #ddd;border-top:0;border-bottom-left-radius:0.25rem;border-bottom-right-radius:0.25rem}#trustindex-plugin-settings-page .ti-select ul li{display:block;margin:0 !important;padding:5px 10px;border-top:1px solid #ccc;cursor:pointer;line-height:1.4;transition:all 0.3s}#trustindex-plugin-settings-page .ti-select ul li:hover{background:rgba(30, 144, 255, 0.3)}#trustindex-plugin-settings-page .ti-select ul li.selected{background:rgba(30, 144, 255, 0.6);pointer-events:none}#trustindex-plugin-settings-page .ti-select ul li li *{pointer-events:none}#trustindex-plugin-settings-page .ti-select .ti-star{position:relative;top:3px;width:16px;height:16px;display:inline-block;margin-right:1px}#trustindex-plugin-settings-page .ti-select.active{border-radius:0;border-top-left-radius:0.25rem;border-top-right-radius:0.25rem}#trustindex-plugin-settings-page .ti-select.active ul{display:block}#trustindex-plugin-settings-page .ti-select.active:after{content:'\2039'}#trustindex-plugin-settings-page .ti-toggle-password{position:absolute;right:16px;bottom:15px;font-size:26px;cursor:pointer;z-index:1;opacity:0.7;transition:opacity 0.3s}#trustindex-plugin-settings-page .ti-toggle-password:hover{opacity:1}#trustindex-plugin-settings-page .btn{display:block;line-height:1.5;text-align:center;white-space:nowrap;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;padding:0.8rem 1.5rem;margin:20px auto 0px auto;width:fit-content;font-size:1.2rem;border-radius:0.25rem;-webkit-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;font-weight:bold;text-decoration:none;cursor:pointer}#trustindex-plugin-settings-page .btn:hover{color:#fff;opacity:0.9}#trustindex-plugin-settings-page .btn-primary{background-color:#ee7321 !important;border-color:#ee7321 !important;font-family:"Montserrat";font-weight:700;color:white}#trustindex-plugin-settings-page .btn-danger{background-color:#d9534f !important;border-color:#d9534f !important;color:white}#trustindex-plugin-settings-page .btn-text{display:inline-block;color:#fff;text-decoration:none;border-radius:4px;background:#2AA8D7;font-family:"Montserrat";padding:10px 15px;margin:3px;font-weight:700;outline:0 !important}#trustindex-plugin-settings-page .btn-text:hover{background-color:#2187ad}#trustindex-plugin-settings-page .btn-disabled{background:#bdbec2 !important;border-color:#bdbec2 !important}#trustindex-plugin-settings-page .autocomplete{display:block;position:relative}#trustindex-plugin-settings-page .autocomplete .input{display:inline-block;vertical-align:top;margin-right:5px;position:relative;min-width:55%}#trustindex-plugin-settings-page .autocomplete .input input[type=text]:focus{background:#e3f2f9;border:2px solid #2AA8D7;outline:0;box-shadow:unset !important}#trustindex-plugin-settings-page .autocomplete .info-text{padding:0;padding-top:5px;opacity:0.5}#trustindex-plugin-settings-page .autocomplete .loading{position:absolute;right:8px;top:14px;width:18px;z-index:1;display:none}#trustindex-plugin-settings-page .autocomplete .btn-text{font-size:14px !important;padding:6px 15px;line-height:2;border:2px solid #2AA8D7;outline:0 !important;display:inline-block;vertical-align:top;margin:0}#trustindex-plugin-settings-page .autocomplete span{display:block;padding:10px}#trustindex-plugin-settings-page .autocomplete span.error{color:#e33244}#trustindex-plugin-settings-page .autocomplete .results{position:absolute;top:46px;z-index:1;width:calc(100% - 2px);padding:0;margin:0;border-radius:0.25rem;border:1px solid #ddd;background:#fff;display:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#trustindex-plugin-settings-page .autocomplete .results:after,#trustindex-plugin-settings-page .autocomplete .results:before{bottom:100%;left:32px;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}#trustindex-plugin-settings-page .autocomplete .results:after{border-color:rgba(255, 255, 255, 0);border-bottom-color:#fff;border-width:8px;margin-left:-8px}#trustindex-plugin-settings-page .autocomplete .results:before{border-color:rgba(221, 221, 221, 0);border-bottom-color:#ddd;border-width:9px;margin-left:-9px}#trustindex-plugin-settings-page .autocomplete .results ul{display:block;max-height:300px;overflow:auto;list-style-type:none;margin:0;padding:0}#trustindex-plugin-settings-page .autocomplete .results li{display:block;padding:5px 10px;margin:0;border-bottom:1px solid grey;cursor:pointer;transition:all 0.25s}#trustindex-plugin-settings-page .autocomplete .results li:last-of-type{border-bottom:0}#trustindex-plugin-settings-page .autocomplete .results li:hover{background:rgba(0, 100, 255, 0.1)}#trustindex-plugin-settings-page .autocomplete .results li svg{width:40px;height:40px;position:relative;top:3px;margin-right:10px;float:left}#trustindex-plugin-settings-page .autocomplete .results li img{width:44px;height:44px;margin-right:10px;float:left;border-radius:50%;box-shadow:0 0 2px black}#trustindex-plugin-settings-page .autocomplete .results li .title{margin:0;margin-bottom:5px;font-size:14px;color:#000;pointer-events:none}#trustindex-plugin-settings-page .autocomplete .results li .location{margin:0;font-size:12px;color:#888;pointer-events:none}#trustindex-plugin-settings-page .nav-tab-wrapper{margin-bottom:0;border:0;padding-right:100px;position:relative}#trustindex-plugin-settings-page .nav-tab{background-color:#f9f9f9;border:0;box-shadow:0 0 0px black !important;border-top:4px solid #f9f9f9;padding:12px 15px;margin-left:0;margin-right:0.35em}#trustindex-plugin-settings-page .nav-tab:last-child{margin-right:0}@media (max-width:1099px){#trustindex-plugin-settings-page .nav-tab{margin-bottom:0.35em}}#trustindex-plugin-settings-page .nav-tab-active{background-color:#fff !important;border-color:#2aa9d6}#trustindex-plugin-settings-page .nav-tab-right{position:absolute;right:0;bottom:0}#trustindex-plugin-settings-page .ti-free-steps{margin-top:0;background:#fff;font-size:14px;display:flex;justify-content:space-between;position:relative;padding:5px 0}#trustindex-plugin-settings-page .ti-free-steps li{list-style:none;padding:20px 0;display:inline-block;color:#afb2b8;margin-bottom:0;white-space:nowrap}#trustindex-plugin-settings-page .ti-free-steps li:first-child{padding-left:20px}#trustindex-plugin-settings-page .ti-free-steps li:last-child{padding-right:20px}#trustindex-plugin-settings-page .ti-free-steps li>span{display:inline-block;width:20px;height:20px;line-height:20px;text-align:center;background:#bdbec2;color:white;margin-right:7px;font-size:11px;border-radius:4px;font-weight:normal}#trustindex-plugin-settings-page .ti-free-steps li.current{font-weight:bold;pointer-events:none}#trustindex-plugin-settings-page .ti-free-steps li.active,#trustindex-plugin-settings-page .ti-free-steps li.done{color:black;cursor:pointer}#trustindex-plugin-settings-page .ti-free-steps li.active>span{background:#2aa8d8;box-shadow:0 0 3px #2aa8d8}#trustindex-plugin-settings-page .ti-free-steps li.done>span{background:#4db594;color:transparent;position:relative}#trustindex-plugin-settings-page .ti-free-steps li.done>span:after{content:'\2713';color:white;margin-left:-7px;font-weight:bold}#trustindex-plugin-settings-page .ti-free-steps .ti-free-arrow{position:relative;display:inline-block;padding:0;padding-top:25px}#trustindex-plugin-settings-page .ti-free-steps .ti-free-arrow:before,#trustindex-plugin-settings-page .ti-free-steps .ti-free-arrow:after{content:'';background:#d8d8d8;position:relative;width:11px;height:3px;display:block;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);border-radius:2px}#trustindex-plugin-settings-page .ti-free-steps .ti-free-arrow:after{-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);top:4px}@media (max-width:1240px){#trustindex-plugin-settings-page .ti-free-steps{flex-wrap:wrap}#trustindex-plugin-settings-page .ti-free-steps .ti-free-arrow:nth-child(4){width:100%;opacity:0;padding-top:0;margin-top:-6px}#trustindex-plugin-settings-page .ti-free-steps li:nth-child(3){padding-right:20px}#trustindex-plugin-settings-page .ti-free-steps li:nth-child(5){padding-left:20px}}@media (max-width:600px){#trustindex-plugin-settings-page .ti-free-steps .ti-free-arrow:nth-child(2),#trustindex-plugin-settings-page .ti-free-steps .ti-free-arrow:nth-child(6){width:100%;opacity:0;padding-top:0;margin-top:-6px}#trustindex-plugin-settings-page .ti-free-steps li:nth-child(1),#trustindex-plugin-settings-page .ti-free-steps li:nth-child(5){padding-right:20px}#trustindex-plugin-settings-page .ti-free-steps li:nth-child(3),#trustindex-plugin-settings-page .ti-free-steps li:nth-child(7){padding-left:20px;padding-right:0}#trustindex-plugin-settings-page .ti-free-steps .ti-free-arrow:nth-child(4){width:unset;opacity:unset;padding-top:25px;margin-top:unset}#trustindex-plugin-settings-page .ti-free-steps li:nth-child(5){padding-left:0}}#trustindex-plugin-settings-page .ti-free-title{font-size:25px !important;font-weight:bold !important;padding:0 20px;margin:25px 0 !important}#trustindex-plugin-settings-page .ti-free-subtitle{font-size:18px !important;font-weight:bold !important;padding:0 15px;margin-bottom:15px !important;margin-top:45px !important}#trustindex-plugin-settings-page .ti-back-icon{color:#5d6268;float:right;font-size:14px;font-weight:bold;position:relative;cursor:pointer;text-decoration:none;box-shadow:0 0 0px black !important;text-shadow:none !important}#trustindex-plugin-settings-page .ti-back-icon:before,#trustindex-plugin-settings-page .ti-back-icon:after{content:'';background:#d8d8d8;position:absolute;left:-18px;top:11px;width:9px;height:3px;display:block;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border-radius:2px}#trustindex-plugin-settings-page .ti-back-icon:after{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);margin-top:4px}#trustindex-plugin-settings-page .ti-box{background:white;padding:25px;border-radius:4px;margin-bottom:1em}#trustindex-plugin-settings-page .ti-box .btn-text{margin-left:0;font-size:13px}#trustindex-plugin-settings-page .ti-box>.ti-header{font-size:18px;font-weight:600;border-bottom:1px solid #e0e0e0;margin-bottom:20px;padding-bottom:10px;color:inherit}#trustindex-plugin-settings-page .ti-box>.ti-header span,#trustindex-plugin-settings-page .ti-box>.ti-header strong{color:inherit}#trustindex-plugin-settings-page .ti-box>.ti-header .btn-text{margin:0;padding:5px 15px;margin-top:-5px}#trustindex-plugin-settings-page .ti-box>.ti-footer{border-top:1px solid #e0e0e0;margin-top:20px;padding-top:20px}#trustindex-plugin-settings-page .ti-box .preview{float:unset;box-sizing:border-box}#trustindex-plugin-settings-page .ti-box img{max-width:100%}#trustindex-plugin-settings-page .ti-box.ti-notice-error{border-left:4px solid red;border-top-left-radius:0;border-bottom-left-radius:0}#trustindex-plugin-settings-page .ti-box.ti-notice-warning{border-left:4px solid #ffb900;border-top-left-radius:0;border-bottom-left-radius:0}#trustindex-plugin-settings-page .ti-preview-boxes-container{display:flex;flex-wrap:wrap;margin:0 -10px;box-sizing:border-box}#trustindex-plugin-settings-page .ti-preview-boxes-container .ti-full-width{flex:0 0 100%;max-width:100%;padding-left:10px;padding-right:10px;box-sizing:inherit;margin-bottom:20px}#trustindex-plugin-settings-page .ti-preview-boxes-container .ti-half-width{flex:0 0 50%;max-width:50%;padding-left:10px;padding-right:10px;margin-left:auto;margin-right:auto;box-sizing:inherit;margin-bottom:20px}#trustindex-plugin-settings-page .ti-preview-boxes-container .ti-preview-boxes{height:100%}#trustindex-plugin-settings-page .ti-header-layout-text{font-weight:normal;font-size:85%}#trustindex-plugin-settings-page .ti-pull-right{float:right}#trustindex-plugin-settings-page .ti-pull-right+.ti-pull-right{margin-right:20px}#trustindex-plugin-settings-page .ti-left-block,#trustindex-plugin-settings-page .ti-right-block{display:inline-block !important;float:left;vertical-align:top;width:calc(50% - 15px) !important;margin:0 !important}#trustindex-plugin-settings-page .ti-left-block .form-control,#trustindex-plugin-settings-page .ti-right-block .form-control{max-width:400px}#trustindex-plugin-settings-page .ti-right-block{float:right}#trustindex-plugin-settings-page .ti-input-row{margin-bottom:1.33em}#trustindex-plugin-settings-page .ti-input-row:last-child{margin:0}#trustindex-plugin-settings-page .ti-input-row label{display:block;font-size:15px;font-weight:600;font-family:inherit;cursor:unset;color:inherit;margin-bottom:0.5em}#trustindex-plugin-settings-page #ti-widget-options{margin-top:25px}#trustindex-plugin-settings-page .ti-preview-box{padding:10px 0}#trustindex-plugin-settings-page .code-shortcode{display:inline-block;padding:10px;border-radius:0.25rem;border:2px solid #dcdce4;background:#f1f1f1}#trustindex-plugin-settings-page .code-shortcode+a{position:relative;top:1px}#trustindex-plugin-settings-page .ti-seo-list{margin:20px 0;counter-reset:li;padding-left:35px}#trustindex-plugin-settings-page .ti-seo-list li{position:relative;list-style:none;margin:0;margin-bottom:25px;counter-increment:li}#trustindex-plugin-settings-page .ti-seo-list li:before{content:counter(li);position:absolute;left:-35px;top:0;display:inline-block;width:20px;height:20px;line-height:20px;text-align:center;background:#4db594;color:white;font-size:11px;border-radius:4px;font-weight:normal}#trustindex-plugin-settings-page .ti-filter-row{font-size:14px;display:block;padding:20px 25px;background:#f7f7f7;margin-bottom:10px;border-radius:4px}#trustindex-plugin-settings-page .ti-filter-row>label{margin-right:15px}#trustindex-plugin-settings-page .ti-filter-row .ti-checkbox{float:unset;width:auto;margin-bottom:0}#trustindex-plugin-settings-page .ti-filter-row .ti-checkbox input{margin-right:3px}#trustindex-plugin-settings-page .ti-source-box{display:block;border:1px solid #dddddf;box-shadow:2px 2px 5px rgba(0, 0, 0, 0.1);background:white;padding:15px;padding-right:175px;position:relative;border-radius:4px;margin-bottom:20px}#trustindex-plugin-settings-page .ti-source-box img{float:left;width:30px;height:30px;margin-right:10px;margin-top:4px;object-fit:cover;object-position:top}#trustindex-plugin-settings-page .ti-source-box .ti-source-info{display:inline-block;word-wrap:break-word;max-width:calc(100% - 70px)}#trustindex-plugin-settings-page .ti-source-box .ti-source-info a:only-child{display:block;margin:10px 0}#trustindex-plugin-settings-page .ti-source-box .btn-text{position:absolute;right:15px;top:50%;transform:translateY(-50%);margin:0;font-size:13px}#trustindex-plugin-settings-page .ti-selected-source{margin-top:15px;display:none}#trustindex-plugin-settings-page .ti-selected-source .ti-left-label{vertical-align:top;line-height:unset;padding-top:10px;float:left}#trustindex-plugin-settings-page .ti-selected-source .ti-source-box{display:inline-block;width:550px;margin-bottom:0;float:left}#trustindex-plugin-settings-page .ti-selected-source .ti-source-box+.ti-source-box{margin-left:220px;margin-top:20px}#trustindex-plugin-settings-page #ti-widget-options .ti-checkbox{margin-bottom:5px}#trustindex-plugin-settings-page .ti-highlight-content{display:block;margin-top:10px;padding:10px 20px;background:#eee;position:relative}#trustindex-plugin-settings-page .ti-highlight-content .selection-content{position:relative;z-index:1}#trustindex-plugin-settings-page .ti-highlight-content .raw-content{position:absolute;color:transparent;width:calc(100% - 40px);z-index:0}#trustindex-plugin-settings-page .ti-highlight-content .raw-content mark{color:transparent !important;background:#fbe049 !important}#trustindex-plugin-settings-page .ti-my-reviews mark.ti-highlight{padding:0 1px;background:#4682B4;color:white}#trustindex-plugin-settings-page .ti-prokontra-good svg,#trustindex-plugin-settings-page .ti-prokontra-bad svg{width:18px;height:18px;display:inline-block;vertical-align:sub;position:relative;top:-1px}#trustindex-plugin-settings-page .ti-prokontra-good svg{fill:#0ab21b}#trustindex-plugin-settings-page .ti-prokontra-bad svg{fill:#383838}#trustindex-plugin-settings-page .ti-prokontra-good:after,#trustindex-plugin-settings-page .ti-prokontra-bad:after{content:'\a0\b7\a0'}#trustindex-plugin-settings-page .ti-special-offer{width:40%;margin:10px 0}#trustindex-plugin-settings-page .ti-special-offer img{float:left;width:100px;border:0;margin-right:15px;margin-top:2px}#trustindex-plugin-settings-page .ti-special-offer p{font-size:14px}#trustindex-plugin-settings-page .ti-modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:5;display:none;overflow-x:hidden;overflow-y:auto;outline:0;background:rgba(0, 0, 0, 0.5)}#trustindex-plugin-settings-page .ti-modal .ti-modal-dialog{position:relative;width:auto;margin:30px auto;margin-top:50px;max-width:800px}#trustindex-plugin-settings-page .ti-modal .ti-modal-content{position:relative;display:flex;flex-direction:column;background-color:white;background-clip:padding-box;border:1px solid rgba(0, 0, 0, 0.2);border-radius:4px;outline:0}#trustindex-plugin-settings-page .ti-modal .ti-modal-header{display:flex;align-items:center;justify-content:space-between;padding:15px;border-bottom:1px solid #e0e0e0;font-size:18px;font-weight:600}#trustindex-plugin-settings-page .ti-modal .ti-modal-title{margin-bottom:0;line-height:1.5}#trustindex-plugin-settings-page .ti-modal .ti-modal-body{position:relative;flex:1 1 auto;padding:15px}#trustindex-plugin-settings-page .ti-modal .ti-modal-footer{display:flex;align-items:center;justify-content:flex-end;padding:15px;border-top:1px solid #e0e0e0}#trustindex-plugin-settings-page .ti-modal .ti-modal-footer>:not(:first-child){margin-left:0.25rem}#trustindex-plugin-settings-page .ti-modal .ti-modal-footer>:not(:last-child){margin-right:0.25rem}#trustindex-plugin-settings-page .troubleshooting-checklist{list-style:decimal;padding-left:25px}#trustindex-plugin-settings-page .troubleshooting-checklist .dashicons{position:relative;top:-1px;margin:0 3px}#trustindex-plugin-settings-page .troubleshooting-checklist .dashicons.dashicons-yes-alt{color:green}#trustindex-plugin-settings-page .troubleshooting-checklist .dashicons.dashicons-dismiss{color:red}#trustindex-plugin-settings-page .troubleshooting-checklist ul{list-style:disc !important;margin:15px 0 !important;padding-left:30px !important}#trustindex-plugin-settings-page .troubleshooting-checklist ul li:last-child{margin-bottom:0}#trustindex-plugin-settings-page .troubleshooting-checklist .ti-notice{margin:5px 15px 2px !important;margin-left:0 !important;padding-left:8px}#trustindex-plugin-settings-page .troubleshooting-checklist .ti-notice p{margin:0.1em 0;font-size:13px}#trustindex-plugin-settings-page .troubleshooting-checklist a{text-decoration:none}#trustindex-plugin-settings-page .ti-troubleshooting-info{width:calc(100% - 50px);height:200px;resize:none;outline:0 !important;box-shadow:none !important;border:1px solid #7e8993 !important;margin:0 25px}#trustindex-plugin-settings-page .ti-troubleshooting-info+.btn-text{margin-top:10px;margin-right:25px}#ti-loading{position:fixed;background:rgba(240, 240, 241, 0.9);left:0;top:0;width:100%;height:100%;display:none;opacity:0;transition:opacity 0.4s}#ti-loading.active{display:block;opacity:1}#ti-loading .ti-loading-effect{display:inline-block;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);width:80px;height:80px}#ti-loading .ti-loading-effect div{display:inline-block;position:absolute;left:8px;width:16px;background:#000;animation:ti-loading-effect 1.2s cubic-bezier(0, 0.5, 0.5, 1) infinite}#ti-loading .ti-loading-effect div:nth-child(1){left:8px;animation-delay:-0.24s}#ti-loading .ti-loading-effect div:nth-child(2){left:32px;animation-delay:-0.12s}#ti-loading .ti-loading-effect div:nth-child(3){left:56px;animation-delay:0}@keyframes ti-loading-effect{0%{top:8px;height:64px}50%,100%{top:24px;height:32px}}
|
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 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("#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 |
-
jQuery.fn.delayKeyup=function(e,b){var d=0;var c=jQuery(this);var a=c.val();c.on("input",function(f){if(a!=c.val()){a=c.val();clearTimeout(d);d=setTimeout(e,b)}});return jQuery(this)};var Trustindex_Autocomplete=null;jQuery(document).ready(function(){Trustindex_Autocomplete={box:jQuery("#trustindex-plugin-settings-page .autocomplete .results"),load:jQuery("#trustindex-plugin-settings-page .autocomplete .loading"),input:jQuery("#trustindex-plugin-settings-page .autocomplete input.name"),button:jQuery("#trustindex-plugin-settings-page .btn-search"),svg:{Hotels:'<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M810.666667 298.666667h-341.333334v298.666666H128V213.333333H42.666667v640h85.333333v-128h768v128h85.333333v-384a170.666667 170.666667 0 0 0-170.666666-170.666666M298.666667 554.666667a128 128 0 0 0 128-128 128 128 0 0 0-128-128 128 128 0 0 0-128 128 128 128 0 0 0 128 128z" fill="" /></svg>',Restaurants:'<svg id="Layer_1" version="1.1" viewBox="0 0 30 30" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M23,19l-3.328-3.232C19.239,15.273,19,14.637,19,13.98V12c0-4.945,3.157-9.535,3.157-9.535L23,2.999V19z"/><circle cx="23" cy="3" r="1"/><path d="M24,3h-2l-1,10v13.5c0,0.828,0.672,1.5,1.5,1.5h0c0.828,0,1.5-0.672,1.5-1.5V3z"/><path d="M13.087,2.445C13.037,2.186,12.811,2,12.548,2C12.245,2,12,2.245,12,2.548v5.807C12,8.711,11.711,9,11.355,9 c-0.329,0-0.605-0.247-0.641-0.574l-0.66-5.939C10.023,2.21,9.789,2,9.509,2H9.5H9.491C9.211,2,8.977,2.21,8.946,2.488l-0.66,5.939 C8.25,8.753,7.974,9,7.645,9C7.289,9,7,8.711,7,8.355V2.548C7,2.245,6.755,2,6.452,2C6.189,2,5.963,2.186,5.913,2.445 C5.671,3.713,5,7.362,5,9c0,4,3,5,3,5v12.5C8,27.328,8.672,28,9.5,28s1.5-0.672,1.5-1.5V14c0,0,3-1,3-5 C14,7.362,13.329,3.713,13.087,2.445z"/></svg>',Attractions:'<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M533.333333 128.810667l43.008 0.149333c23.573333 0.085333 42.666667 19.413333 42.666667 42.816V213.333333H405.653333c0.298667-14.357333 0.106667-42.346667 0.106667-42.346666a42.197333 42.197333 0 0 1 42.56-42.496L490.666667 128.64V64a21.333333 21.333333 0 0 1 42.666666 0v64.810667zM726.677333 661.333333c85.482667 174.272 190.698667 277.333333 190.698667 277.333334H662.186667c-65.450667-148.181333-236.032-149.056-299.029334 0H105.088s105.173333-99.925333 191.146667-277.333334H234.666667a21.333333 21.333333 0 0 1 0-42.666666h554.666666a21.333333 21.333333 0 0 1 0 42.666666h-62.634666z m-103.872-362.666666c9.237333 102.464 34.346667 195.690667 66.304 277.333333H333.333333a1074.709333 1074.709333 0 0 0 66.986667-277.333333H362.666667a21.333333 21.333333 0 0 1 0-42.666667h298.666666a21.333333 21.333333 0 0 1 0 42.666667h-38.506666z" fill="#3D3D3D" /></svg>',LodgingBusiness:'<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M810.666667 298.666667h-341.333334v298.666666H128V213.333333H42.666667v640h85.333333v-128h768v128h85.333333v-384a170.666667 170.666667 0 0 0-170.666666-170.666666M298.666667 554.666667a128 128 0 0 0 128-128 128 128 0 0 0-128-128 128 128 0 0 0-128 128 128 128 0 0 0 128 128z" fill="" /></svg>'},searching:false,cache:[],search:function(b){let query_term=Trustindex_Autocomplete.input.val();if(query_term.length<4){Trustindex_Autocomplete.box.html("<span>"+Trustindex_Autocomplete.box.data("tooshorttext")+"</span>");Trustindex_Autocomplete.box.show();return false}if(Trustindex_Autocomplete.input.data("url")===undefined&&(query_term.substr(0,4)=="www."||query_term.substr(0,7)=="http://"||query_term.substr(0,8)=="https://")){Trustindex_Autocomplete.box.html("<span>This is an URL. "+Trustindex_Autocomplete.input.attr("placeholder")+"</span>");Trustindex_Autocomplete.box.show();return false}else{if(Trustindex_Autocomplete.input.data("url")===true&&(query_term.substr(0,4)=="www."||query_term.substr(0,7)=="http://"||query_term.substr(0,8)=="https://")&&Trustindex_Autocomplete.checkRegex&&!Trustindex_Autocomplete.checkRegex.test(query_term)){Trustindex_Autocomplete.box.html("<span>"+Trustindex_Autocomplete.box.data("url-errortext")+"</span>");Trustindex_Autocomplete.box.show();return false}}if(Trustindex_Autocomplete.searching){return false}Trustindex_Autocomplete.box.hide();Trustindex_Autocomplete.load.show();Trustindex_Autocomplete.searching=true;let cache_term=query_term.trim();if(Trustindex_Autocomplete.cache[cache_term]!==undefined){setTimeout(function(){Trustindex_Autocomplete.showResults(Trustindex_Autocomplete.cache[cache_term])},400);return}jQuery.ajax({method:"POST",url:"https://admin.trustindex.io/api/searchPage",data:{q:query_term,platform:b},dataType:"jsonp",success:function(c){Trustindex_Autocomplete.cache[cache_term]=c;Trustindex_Autocomplete.showResults(c)}})},showResults:function(b){Trustindex_Autocomplete.load.hide();Trustindex_Autocomplete.searching=false;if(b.success&&b.result&&b.result.length){let html="";b.result.forEach(function(c){html+='<li class="result" data-page-id="'+c.page_id+'" data-name="'+c.name+'" data-type="'+c.type+'" data-url="'+c.url+'" data-address="'+c.address+'" data-avatar-url="'+(c.avatar_url||"")+'">'+(Trustindex_Autocomplete.svg[c.type]||"")+'<p class="title">'+c.name+'</p><p class="location">'+(c.address||c.url)+"</p></li>"});Trustindex_Autocomplete.box.html("<ul>"+html+"</ul>");Trustindex_Autocomplete.box.show()}else{if(b.success){Trustindex_Autocomplete.box.html("<span>"+Trustindex_Autocomplete.box.data("noresultstext")+"</span>");Trustindex_Autocomplete.box.show()}else{Trustindex_Autocomplete.box.html('<span class="error">'+Trustindex_Autocomplete.box.data("errortext")+"</span>");Trustindex_Autocomplete.box.show()}}},showResult:function(b,c){Trustindex_Autocomplete.load.hide();Trustindex_Autocomplete.searching=false;if(typeof c=="undefined"){c="errortext"}if(b.success&&b.result){let page_details={id:b.result.page_id,name:b.result.name,address:b.result.address,avatar_url:b.result.avatar_url};let form=jQuery("#submit-form");let div=form.find(".ti-selected-source");form.find("#ti-noreg-page_details").val(JSON.stringify(page_details));div.find("img").attr("src",page_details.avatar_url);div.find("#label-noreg-page_name").html(page_details.name);if(page_details.address){div.find("#label-noreg-address").html(page_details.address+"<br />")}div.find("#label-noreg-url").html("<a target='_blank' href='"+b.result.url+"'>"+b.result.url+"</a>");jQuery("#trustindex-plugin-settings-page .btn-check").addClass("btn-disabled");div.fadeIn()}else{Trustindex_Autocomplete.box.html('<span class="error">'+Trustindex_Autocomplete.box.data(c)+"</span>");Trustindex_Autocomplete.box.show()}},check:function(){let input=jQuery("#trustindex-plugin-settings-page #page-link");if(!Trustindex_Autocomplete.checkRegex){return false}let m=Trustindex_Autocomplete.checkRegex.exec(input.val());if(!Trustindex_Autocomplete.checkRegexValid(m)){Trustindex_Autocomplete.box.html("<span>"+Trustindex_Autocomplete.box.data("errortext")+"</span>");Trustindex_Autocomplete.box.show();return false}if(Trustindex_Autocomplete.searching){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_Autocomplete.pageIdSeparator}page_id+=part2}if(page_id.trim()==""){Trustindex_Autocomplete.box.html("<span>"+Trustindex_Autocomplete.box.data("errortext")+"</span>");Trustindex_Autocomplete.box.show();return false}Trustindex_Autocomplete.box.hide();Trustindex_Autocomplete.load.show();Trustindex_Autocomplete.searching=true;let cache_term=page_id;if(Trustindex_Autocomplete.cache[cache_term]!==undefined){setTimeout(function(){Trustindex_Autocomplete.showResult(Trustindex_Autocomplete.cache[cache_term])},400);return}jQuery.ajax({method:"POST",url:"https://admin.trustindex.io/api/getPageDetails",data:{platform:jQuery("#submit-form").data("platform"),page_id:page_id},dataType:"jsonp",success:function(b){Trustindex_Autocomplete.cache[cache_term]=b;Trustindex_Autocomplete.showResult(b)}})},checkRegex:null,checkRegexValid:function(b){if(!b){return false}for(let i=0;i<b.length;i++){if(b[i]===""){return false}}return true},pageIdSeparator:"|"};if(Trustindex_Autocomplete.input.length){Trustindex_Autocomplete.input.delayKeyup(function(){Trustindex_Autocomplete.button.click()},650)}if(Trustindex_Autocomplete.button.length){Trustindex_Autocomplete.button.click(function(b){b.preventDefault();Trustindex_Autocomplete.search(Trustindex_Autocomplete.button.closest("form").data("platform"))})}jQuery(document).on("click","#trustindex-plugin-settings-page .autocomplete .results li[data-page-id]",function(){let selected_element=jQuery(this);let form=selected_element.closest("form");let div=form.find(".ti-selected-source");let page_details={id:selected_element.data("page-id"),name:selected_element.data("name"),address:selected_element.data("address"),avatar_url:selected_element.data("avatar-url")};form.find("#ti-noreg-page_details").val(JSON.stringify(page_details));if(page_details.avatar_url){div.find("img").attr("src",page_details.avatar_url).show()}else{div.find("img").hide()}div.find("#label-noreg-page_name").html(selected_element.data("name"));div.find("#label-noreg-url").html("<a target='_blank' href='"+selected_element.data("url")+"'>"+selected_element.data("url")+"</a>");if(selected_element.data("address")){div.find("#label-noreg-address").html(selected_element.data("address")+"<br />")}Trustindex_Autocomplete.box.hide();div.fadeIn();Trustindex_Autocomplete.button.addClass("btn-default").removeClass("btn-primary")});jQuery("#trustindex-plugin-settings-page form:not([data-platform='facebook']) .btn-connect").click(function(b){let btn=jQuery(this);btn.css("pointer-events","none");btn.addClass("btn-default").removeClass("btn-primary");btn.blur();TI_manage_dots(btn);Trustindex_Autocomplete.button.css("pointer-events","none");jQuery("#trustindex-plugin-settings-page .btn-check").css("pointer-events","none")});jQuery("#trustindex-plugin-settings-page .btn-refresh").click(function(b){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")});jQuery("#trustindex-plugin-settings-page .btn-check").click(function(b){b.preventDefault();Trustindex_Autocomplete.check()});var a=[];jQuery("#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(b){if(b==-1){}else{if(b==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)}}}})});jQuery("#form-reg").submit(function(b){return !jQuery("#txt-email-used").is(":visible")})});
|
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("gp/")>-1&&page_id.indexOf("gp/product/")==-1)||page_id.search(/\-\/[^\/]{2}\/[^\/]{2}$/)>-1)&&page_id.indexOf("product-reviews/")==-1)}}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(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(){
|
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)})});
|
tabs/my_reviews.php
CHANGED
@@ -1,14 +1,5 @@
|
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
3 |
-
if(isset($_COOKIE['ti-success']))
|
4 |
-
{
|
5 |
-
$ti_success = sanitize_text_field($_COOKIE['ti-success']);
|
6 |
-
setcookie('ti-success', '', time() - 60, "/");
|
7 |
-
if($ti_success == 'reviews-loaded')
|
8 |
-
{
|
9 |
-
update_option( $trustindex_pm_google->get_option_name('download-timestamp') , time() + (86400 * 2), false);
|
10 |
-
}
|
11 |
-
}
|
12 |
if(isset($_POST['save-highlight']))
|
13 |
{
|
14 |
check_admin_referer( 'save-noreg_'.$trustindex_pm_google->get_plugin_slug(), '_wpnonce_highlight_save' );
|
@@ -38,11 +29,24 @@ $wpdb->query("UPDATE `". $trustindex_pm_google->get_noreg_tablename() ."` SET hi
|
|
38 |
}
|
39 |
exit;
|
40 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
$reviews = [];
|
42 |
if($trustindex_pm_google->is_noreg_linked() && $trustindex_pm_google->is_noreg_table_exists())
|
43 |
{
|
44 |
$reviews = $wpdb->get_results('SELECT * FROM '. $trustindex_pm_google->get_noreg_tablename() .' ORDER BY date DESC');
|
45 |
}
|
|
|
|
|
46 |
function trustindex_plugin_write_rating_stars($score)
|
47 |
{
|
48 |
global $trustindex_pm_google;
|
@@ -105,18 +109,32 @@ $download_timestamp = get_option($trustindex_pm_google->get_option_name('downloa
|
|
105 |
<?php endif; ?>
|
106 |
<div class="ti-box">
|
107 |
<div class="ti-header"><?php echo TrustindexPlugin_google::___("My Reviews"); ?></div>
|
108 |
-
<?php if($download_timestamp < time()): ?>
|
109 |
-
<div class="tablenav top" style="margin-bottom:
|
110 |
<div class="alignleft actions">
|
111 |
<a href="?page=<?php echo esc_attr($_GET['page']); ?>&tab=setup_no_reg&refresh&my_reviews" class="btn-text btn-refresh btn-download-reviews" style="margin-left: 0" data-loading-text="<?php echo TrustindexPlugin_google::___("Loading") ;?>" data-delay=10><?php echo TrustindexPlugin_google::___("Download new reviews") ;?></a>
|
112 |
</div>
|
113 |
</div>
|
114 |
-
|
115 |
-
|
116 |
-
<div class="ti-notice notice-success is-dismissible" style="margin: 0 0 15px 0">
|
117 |
-
<p><?php echo TrustindexPlugin_google::___("New reviews loaded!"); ?></p>
|
118 |
-
<button type="button" class="notice-dismiss"></button>
|
119 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
<?php endif; ?>
|
121 |
<?php if(!$trustindex_pm_google->is_trustindex_connected() && $download_timestamp < time()): ?>
|
122 |
<div class="ti-notice notice-error" style="margin: 0 0 15px 0">
|
@@ -125,10 +143,36 @@ $download_timestamp = get_option($trustindex_pm_google->get_option_name('downloa
|
|
125 |
</p>
|
126 |
</div>
|
127 |
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
<?php if(!count($reviews)): ?>
|
|
|
129 |
<div class="ti-notice notice-warning" style="margin-left: 0">
|
130 |
<p><?php echo TrustindexPlugin_google::___("You had no reviews at the time of last review downloading."); ?></p>
|
131 |
</div>
|
|
|
132 |
<?php else: ?>
|
133 |
<table class="wp-list-table widefat fixed striped table-view-list ti-my-reviews ti-widget">
|
134 |
<thead>
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
if(isset($_POST['save-highlight']))
|
4 |
{
|
5 |
check_admin_referer( 'save-noreg_'.$trustindex_pm_google->get_plugin_slug(), '_wpnonce_highlight_save' );
|
29 |
}
|
30 |
exit;
|
31 |
}
|
32 |
+
if(isset($_POST['review_download_request']))
|
33 |
+
{
|
34 |
+
delete_option($trustindex_pm_google->get_option_name('review-download-token'));
|
35 |
+
update_option($trustindex_pm_google->get_option_name('review-download-inprogress'), sanitize_text_field($_POST['review_download_request']), false);
|
36 |
+
update_option($trustindex_pm_google->get_option_name('review-manual-download'), intval($_POST['manual_download']), false);
|
37 |
+
if(isset($_POST['review_download_request_id']))
|
38 |
+
{
|
39 |
+
update_option($trustindex_pm_google->get_option_name('review-download-request-id'), sanitize_text_field($_POST['review_download_request_id']), false);
|
40 |
+
}
|
41 |
+
exit;
|
42 |
+
}
|
43 |
$reviews = [];
|
44 |
if($trustindex_pm_google->is_noreg_linked() && $trustindex_pm_google->is_noreg_table_exists())
|
45 |
{
|
46 |
$reviews = $wpdb->get_results('SELECT * FROM '. $trustindex_pm_google->get_noreg_tablename() .' ORDER BY date DESC');
|
47 |
}
|
48 |
+
$is_review_download_in_progress = $trustindex_pm_google->is_review_download_in_progress();
|
49 |
+
$review_download_request_id = get_option($trustindex_pm_google->get_option_name('review-download-request-id'));
|
50 |
function trustindex_plugin_write_rating_stars($score)
|
51 |
{
|
52 |
global $trustindex_pm_google;
|
109 |
<?php endif; ?>
|
110 |
<div class="ti-box">
|
111 |
<div class="ti-header"><?php echo TrustindexPlugin_google::___("My Reviews"); ?></div>
|
112 |
+
<?php if(!$is_review_download_in_progress && $download_timestamp < time()): ?>
|
113 |
+
<div class="tablenav top" style="margin-bottom: 26px">
|
114 |
<div class="alignleft actions">
|
115 |
<a href="?page=<?php echo esc_attr($_GET['page']); ?>&tab=setup_no_reg&refresh&my_reviews" class="btn-text btn-refresh btn-download-reviews" style="margin-left: 0" data-loading-text="<?php echo TrustindexPlugin_google::___("Loading") ;?>" data-delay=10><?php echo TrustindexPlugin_google::___("Download new reviews") ;?></a>
|
116 |
</div>
|
117 |
</div>
|
118 |
+
<div class="ti-notice notice-info" style="margin: 15px 0; display: none" id="ti-connect-info">
|
119 |
+
<p><?php echo TrustindexPlugin_google::___("A popup window should be appear! Please, go to there and continue the steps! (If there is no popup window, you can check the the browser's popup blocker)"); ?></p>
|
|
|
|
|
|
|
120 |
</div>
|
121 |
+
<?php $page_details = get_option( $trustindex_pm_google->get_option_name('page-details') ); ?>
|
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.1" />
|
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; ?>
|
129 |
+
<?php
|
130 |
+
$review_download_token = get_option($trustindex_pm_google->get_option_name('review-download-token'));
|
131 |
+
if(!$review_download_token)
|
132 |
+
{
|
133 |
+
$review_download_token = wp_create_nonce('ti-noreg-connect-token');
|
134 |
+
update_option($trustindex_pm_google->get_option_name('review-download-token'), $review_download_token, false);
|
135 |
+
}
|
136 |
+
?>
|
137 |
+
<input type="hidden" id="ti-noreg-connect-token" name="ti-noreg-connect-token" value="<?php echo $review_download_token; ?>" />
|
138 |
<?php endif; ?>
|
139 |
<?php if(!$trustindex_pm_google->is_trustindex_connected() && $download_timestamp < time()): ?>
|
140 |
<div class="ti-notice notice-error" style="margin: 0 0 15px 0">
|
143 |
</p>
|
144 |
</div>
|
145 |
<?php endif; ?>
|
146 |
+
<?php if($is_review_download_in_progress === 'error'): ?>
|
147 |
+
<div class="ti-notice notice-error" style="margin: 0 0 15px 0">
|
148 |
+
<p>
|
149 |
+
<?php echo TrustindexPlugin_google::___('While downloading the reviews, we noticed that your connected page is not found.<br />If it really exists, please contact us to resolve the issue or try connect it again.'); ?><br />
|
150 |
+
</p>
|
151 |
+
</div>
|
152 |
+
<?php elseif($is_review_download_in_progress): ?>
|
153 |
+
<div class="ti-notice notice-warning" style="margin: 0 0 15px 0">
|
154 |
+
<p>
|
155 |
+
<?php echo TrustindexPlugin_google::___('Your reviews are being downloaded in the background. This should not take more than a few minutes.'); ?>
|
156 |
+
<?php if(!count($reviews)): ?>
|
157 |
+
<br />
|
158 |
+
<?php echo TrustindexPlugin_google::___('In the meantime, you can setup your widget with a few example reviews.'); ?>
|
159 |
+
<?php endif; ?>
|
160 |
+
<?php if($trustindex_pm_google->is_review_manual_download()): ?>
|
161 |
+
<br />
|
162 |
+
<a href="#" id="review-manual-download" class="button button-primary ti-tooltip" style="margin-top: 10px" data-loading-text="<?php echo TrustindexPlugin_google::___("Loading") ;?>">
|
163 |
+
<?php echo TrustindexPlugin_google::___("Manual download") ;?>
|
164 |
+
<span class="ti-tooltip-message"><?php echo TrustindexPlugin_google::___('Please wait a little while, we are not done downloading your reviews.'); ?></span>
|
165 |
+
</a>
|
166 |
+
<?php endif; ?>
|
167 |
+
</p>
|
168 |
+
</div>
|
169 |
+
<?php endif; ?>
|
170 |
<?php if(!count($reviews)): ?>
|
171 |
+
<?php if(!$is_review_download_in_progress): ?>
|
172 |
<div class="ti-notice notice-warning" style="margin-left: 0">
|
173 |
<p><?php echo TrustindexPlugin_google::___("You had no reviews at the time of last review downloading."); ?></p>
|
174 |
</div>
|
175 |
+
<?php endif; ?>
|
176 |
<?php else: ?>
|
177 |
<table class="wp-list-table widefat fixed striped table-view-list ti-my-reviews ti-widget">
|
178 |
<thead>
|
tabs/setup_no_reg.php
CHANGED
@@ -32,6 +32,30 @@
|
|
32 |
</p>
|
33 |
</div>
|
34 |
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
<?php if(TrustindexPlugin_google::is_amp_active() && !get_option($trustindex_pm_google->get_option_name('amp-hidden-notification'), 0)): ?>
|
36 |
<div class="ti-notice notice-warning is-dismissible" style="margin: 0 0 15px 0">
|
37 |
<p>
|
@@ -56,8 +80,10 @@
|
|
56 |
<img src="<?php echo esc_url($page_details['avatar_url']); ?>" />
|
57 |
<?php endif; ?>
|
58 |
<div class="ti-source-info">
|
|
|
59 |
<strong><?php echo esc_html($page_details['name']); ?></strong><br />
|
60 |
-
<?php
|
|
|
61 |
<?php echo esc_html($page_details['address']); ?><br />
|
62 |
<?php endif; ?>
|
63 |
<a href="<?php echo esc_url($trustindex_pm_google->getPageUrl()); ?>" target="_blank"><?php echo esc_url($trustindex_pm_google->getPageUrl()); ?></a>
|
@@ -77,6 +103,22 @@ required="required"
|
|
77 |
id="ti-noreg-page_details"
|
78 |
value=""
|
79 |
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
<div class="autocomplete">
|
81 |
<?php include( plugin_dir_path(__FILE__ ) . "setup_no_reg_platform.php" ); ?>
|
82 |
</div>
|
@@ -84,15 +126,14 @@ value=""
|
|
84 |
<label class="ti-left-label"><?php echo TrustindexPlugin_google::___("Source"); ?>:</label>
|
85 |
<div class="ti-source-box ti-original-source-box">
|
86 |
<img />
|
87 |
-
<div class="ti-source-info">
|
88 |
-
<strong id="label-noreg-page_name"></strong><br />
|
89 |
-
<span id="label-noreg-address"></span>
|
90 |
-
<span id="label-noreg-url"></span>
|
91 |
-
</div>
|
92 |
<button class="btn btn-text btn-connect" data-loading-text="<?php echo TrustindexPlugin_google::___("Loading") ;?>"><?php echo TrustindexPlugin_google::___("Connect") ;?></button>
|
93 |
</div>
|
94 |
<div class="clear"></div>
|
95 |
</div>
|
|
|
|
|
|
|
96 |
</form>
|
97 |
</div>
|
98 |
<?php endif; ?>
|
@@ -103,7 +144,7 @@ value=""
|
|
103 |
2. <?php echo TrustindexPlugin_google::___('Select Layout'); ?>
|
104 |
<a href="?page=<?php echo esc_attr($_GET['page']); ?>&tab=setup_no_reg&step=1" class="ti-back-icon"><?php echo TrustindexPlugin_google::___('Back'); ?></a>
|
105 |
</h1>
|
106 |
-
<?php if(!count($reviews)): ?>
|
107 |
<div class="ti-notice notice-warning" style="margin: 0 0 15px 0">
|
108 |
<p>
|
109 |
<?php echo TrustindexPlugin_google::___('There are no reviews on your %s platform.', [ 'Google' ]); ?>
|
@@ -154,7 +195,7 @@ $class_name = 'ti-half-width';
|
|
154 |
3. <?php echo TrustindexPlugin_google::___('Select Style'); ?>
|
155 |
<a href="?page=<?php echo esc_attr($_GET['page']); ?>&tab=setup_no_reg&step=2" class="ti-back-icon"><?php echo TrustindexPlugin_google::___('Back'); ?></a>
|
156 |
</h1>
|
157 |
-
<?php if(!count($reviews)): ?>
|
158 |
<div class="ti-notice notice-warning" style="margin: 0 0 15px 0">
|
159 |
<p>
|
160 |
<?php echo TrustindexPlugin_google::___('There are no reviews on your %s platform.', [ 'Google' ]); ?>
|
@@ -196,7 +237,7 @@ $widget_has_reviews = !in_array($widget_type, [ 'button', 'badge' ]) || in_array
|
|
196 |
4. <?php echo TrustindexPlugin_google::___('Set up widget'); ?>
|
197 |
<a href="?page=<?php echo esc_attr($_GET['page']); ?>&tab=setup_no_reg&step=3" class="ti-back-icon"><?php echo TrustindexPlugin_google::___('Back'); ?></a>
|
198 |
</h1>
|
199 |
-
<?php if(!count($reviews)): ?>
|
200 |
<div class="ti-notice notice-warning" style="margin: 0 0 15px 0">
|
201 |
<p>
|
202 |
<?php echo TrustindexPlugin_google::___('There are no reviews on your %s platform.', [ 'Google' ]); ?>
|
@@ -360,7 +401,7 @@ $widget_has_reviews = !in_array($widget_type, [ 'button', 'badge' ]) || in_array
|
|
360 |
5. <?php echo TrustindexPlugin_google::___('Insert code'); ?>
|
361 |
<a href="?page=<?php echo esc_attr($_GET['page']); ?>&tab=setup_no_reg&step=4" class="ti-back-icon"><?php echo TrustindexPlugin_google::___('Back'); ?></a>
|
362 |
</h1>
|
363 |
-
<?php if(!count($reviews)): ?>
|
364 |
<div class="ti-notice notice-warning" style="margin: 0 0 15px 0">
|
365 |
<p>
|
366 |
<?php echo TrustindexPlugin_google::___('There are no reviews on your %s platform.', [ 'Google' ]); ?>
|
32 |
</p>
|
33 |
</div>
|
34 |
<?php endif; ?>
|
35 |
+
<?php if($is_review_download_in_progress === 'error'): ?>
|
36 |
+
<div class="ti-notice notice-error" style="margin: 0 0 15px 0">
|
37 |
+
<p>
|
38 |
+
<?php echo TrustindexPlugin_google::___('While downloading the reviews, we noticed that your connected page is not found.<br />If it really exists, please contact us to resolve the issue or try connect it again.'); ?><br />
|
39 |
+
</p>
|
40 |
+
</div>
|
41 |
+
<?php elseif($is_review_download_in_progress): ?>
|
42 |
+
<div class="ti-notice notice-warning" style="margin: 0 0 15px 0">
|
43 |
+
<p>
|
44 |
+
<?php echo TrustindexPlugin_google::___('Your reviews are downloading in the background. This can take up to a few hours depending on the load and platform'); ?>
|
45 |
+
<?php if(!count($reviews)): ?>
|
46 |
+
<br />
|
47 |
+
<?php echo TrustindexPlugin_google::___('In the meantime, you can setup your widget with a few example reviews.'); ?>
|
48 |
+
<?php endif; ?>
|
49 |
+
<?php if($trustindex_pm_google->is_review_manual_download()): ?>
|
50 |
+
<br />
|
51 |
+
<a href="#" id="review-manual-download" class="button button-primary ti-tooltip" style="margin-top: 10px" data-loading-text="<?php echo TrustindexPlugin_google::___("Loading") ;?>">
|
52 |
+
<?php echo TrustindexPlugin_google::___("Manual download") ;?>
|
53 |
+
<span class="ti-tooltip-message"><?php echo TrustindexPlugin_google::___('Your reviews are downloading in the background. This can take up to a few hours depending on the load and platform'); ?></span>
|
54 |
+
</a>
|
55 |
+
<?php endif; ?>
|
56 |
+
</p>
|
57 |
+
</div>
|
58 |
+
<?php endif; ?>
|
59 |
<?php if(TrustindexPlugin_google::is_amp_active() && !get_option($trustindex_pm_google->get_option_name('amp-hidden-notification'), 0)): ?>
|
60 |
<div class="ti-notice notice-warning is-dismissible" style="margin: 0 0 15px 0">
|
61 |
<p>
|
80 |
<img src="<?php echo esc_url($page_details['avatar_url']); ?>" />
|
81 |
<?php endif; ?>
|
82 |
<div class="ti-source-info">
|
83 |
+
<?php if(isset($page_details['name'])): ?>
|
84 |
<strong><?php echo esc_html($page_details['name']); ?></strong><br />
|
85 |
+
<?php endif; ?>
|
86 |
+
<?php if(isset($page_details['address']) && $page_details['address']): ?>
|
87 |
<?php echo esc_html($page_details['address']); ?><br />
|
88 |
<?php endif; ?>
|
89 |
<a href="<?php echo esc_url($trustindex_pm_google->getPageUrl()); ?>" target="_blank"><?php echo esc_url($trustindex_pm_google->getPageUrl()); ?></a>
|
103 |
id="ti-noreg-page_details"
|
104 |
value=""
|
105 |
/>
|
106 |
+
<?php
|
107 |
+
$review_download_token = get_option($trustindex_pm_google->get_option_name('review-download-token'));
|
108 |
+
if(!$review_download_token)
|
109 |
+
{
|
110 |
+
$review_download_token = wp_create_nonce('ti-noreg-connect-token');
|
111 |
+
update_option($trustindex_pm_google->get_option_name('review-download-token'), $review_download_token, false);
|
112 |
+
}
|
113 |
+
?>
|
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.1" />
|
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 />
|
121 |
+
<input type="hidden" id="ti-noreg-page-id" value="" />
|
122 |
<div class="autocomplete">
|
123 |
<?php include( plugin_dir_path(__FILE__ ) . "setup_no_reg_platform.php" ); ?>
|
124 |
</div>
|
126 |
<label class="ti-left-label"><?php echo TrustindexPlugin_google::___("Source"); ?>:</label>
|
127 |
<div class="ti-source-box ti-original-source-box">
|
128 |
<img />
|
129 |
+
<div class="ti-source-info"></div>
|
|
|
|
|
|
|
|
|
130 |
<button class="btn btn-text btn-connect" data-loading-text="<?php echo TrustindexPlugin_google::___("Loading") ;?>"><?php echo TrustindexPlugin_google::___("Connect") ;?></button>
|
131 |
</div>
|
132 |
<div class="clear"></div>
|
133 |
</div>
|
134 |
+
<div class="ti-notice notice-warning" style="margin: 20px 0; margin-bottom: 0; display: none" id="ti-connect-info">
|
135 |
+
<p><?php echo TrustindexPlugin_google::___("A popup window should be appear! Please, go to there and continue the steps! (If there is no popup window, you can check the the browser's popup blocker)"); ?></p>
|
136 |
+
</div>
|
137 |
</form>
|
138 |
</div>
|
139 |
<?php endif; ?>
|
144 |
2. <?php echo TrustindexPlugin_google::___('Select Layout'); ?>
|
145 |
<a href="?page=<?php echo esc_attr($_GET['page']); ?>&tab=setup_no_reg&step=1" class="ti-back-icon"><?php echo TrustindexPlugin_google::___('Back'); ?></a>
|
146 |
</h1>
|
147 |
+
<?php if(!count($reviews) && !$is_review_download_in_progress): ?>
|
148 |
<div class="ti-notice notice-warning" style="margin: 0 0 15px 0">
|
149 |
<p>
|
150 |
<?php echo TrustindexPlugin_google::___('There are no reviews on your %s platform.', [ 'Google' ]); ?>
|
195 |
3. <?php echo TrustindexPlugin_google::___('Select Style'); ?>
|
196 |
<a href="?page=<?php echo esc_attr($_GET['page']); ?>&tab=setup_no_reg&step=2" class="ti-back-icon"><?php echo TrustindexPlugin_google::___('Back'); ?></a>
|
197 |
</h1>
|
198 |
+
<?php if(!count($reviews) && !$is_review_download_in_progress): ?>
|
199 |
<div class="ti-notice notice-warning" style="margin: 0 0 15px 0">
|
200 |
<p>
|
201 |
<?php echo TrustindexPlugin_google::___('There are no reviews on your %s platform.', [ 'Google' ]); ?>
|
237 |
4. <?php echo TrustindexPlugin_google::___('Set up widget'); ?>
|
238 |
<a href="?page=<?php echo esc_attr($_GET['page']); ?>&tab=setup_no_reg&step=3" class="ti-back-icon"><?php echo TrustindexPlugin_google::___('Back'); ?></a>
|
239 |
</h1>
|
240 |
+
<?php if(!count($reviews) && !$is_review_download_in_progress): ?>
|
241 |
<div class="ti-notice notice-warning" style="margin: 0 0 15px 0">
|
242 |
<p>
|
243 |
<?php echo TrustindexPlugin_google::___('There are no reviews on your %s platform.', [ 'Google' ]); ?>
|
401 |
5. <?php echo TrustindexPlugin_google::___('Insert code'); ?>
|
402 |
<a href="?page=<?php echo esc_attr($_GET['page']); ?>&tab=setup_no_reg&step=4" class="ti-back-icon"><?php echo TrustindexPlugin_google::___('Back'); ?></a>
|
403 |
</h1>
|
404 |
+
<?php if(!count($reviews) && !$is_review_download_in_progress): ?>
|
405 |
<div class="ti-notice notice-warning" style="margin: 0 0 15px 0">
|
406 |
<p>
|
407 |
<?php echo TrustindexPlugin_google::___('There are no reviews on your %s platform.', [ 'Google' ]); ?>
|
tabs/setup_no_reg_header.php
CHANGED
@@ -11,7 +11,8 @@ $ti_command_list = [
|
|
11 |
'save-dateformat',
|
12 |
'save-options',
|
13 |
'save-align',
|
14 |
-
'save-amp-notice-hide'
|
|
|
15 |
];
|
16 |
if(!in_array($ti_command, $ti_command_list))
|
17 |
{
|
@@ -36,7 +37,7 @@ echo '
|
|
36 |
</div>';
|
37 |
exit;
|
38 |
}
|
39 |
-
function trustindex_plugin_connect_page($page_details = null, $default_settings = true)
|
40 |
{
|
41 |
global $trustindex_pm_google;
|
42 |
global $wpdb;
|
@@ -63,29 +64,49 @@ date DATE,
|
|
63 |
PRIMARY KEY (id)
|
64 |
);");
|
65 |
trustindex_database_create_check();
|
66 |
-
if (!isset($page_details['rating_number']) || !isset($page_details['avatar_url']) || empty($page_details['avatar_url']))
|
67 |
-
{
|
68 |
-
$response = $trustindex_pm_google->download_noreg_details($page_details);
|
69 |
-
if ($response['success'])
|
70 |
-
{
|
71 |
-
if(!isset($page_details['rating_number'])) $page_details['rating_number'] = $response['result']['reviews']['count'];
|
72 |
-
if(!isset($page_details['rating_score'])) $page_details['rating_score'] = $response['result']['reviews']['score'];
|
73 |
-
if(!isset($page_details['avatar_url']) || empty($page_details['avatar_url'])) $page_details['avatar_url'] = $response['result']['avatar_url'];
|
74 |
-
}
|
75 |
-
}
|
76 |
$reviews = null;
|
77 |
if(isset($page_details['reviews']))
|
78 |
{
|
79 |
$reviews = $page_details['reviews'];
|
80 |
unset($page_details['reviews']);
|
81 |
}
|
82 |
-
|
83 |
-
$
|
84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
{
|
86 |
-
$
|
87 |
-
$reviews = $reviews['success'] ? $reviews['result'] : [];
|
88 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
foreach($reviews as $row)
|
90 |
{
|
91 |
$date = isset($row['created_at']) ? $row['created_at'] : (isset($row['date']) ? $row['date'] : '');
|
@@ -97,6 +118,14 @@ $wpdb->insert($dbtable, [
|
|
97 |
'date' => substr($date, 0, 10)
|
98 |
]);
|
99 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
if($default_settings)
|
101 |
{
|
102 |
$lang = strtolower(substr(get_locale(), 0, 2));
|
@@ -116,6 +145,11 @@ function trustindex_plugin_disconnect_page($settings_delete = true)
|
|
116 |
{
|
117 |
global $trustindex_pm_google;
|
118 |
global $wpdb;
|
|
|
|
|
|
|
|
|
|
|
119 |
delete_option( $trustindex_pm_google->get_option_name('page-details') );
|
120 |
delete_option( $trustindex_pm_google->get_option_name('review-content') );
|
121 |
delete_option( $trustindex_pm_google->get_option_name('css-content') );
|
@@ -179,8 +213,9 @@ if($ti_command == 'save-page')
|
|
179 |
check_admin_referer( 'save-noreg_'.$trustindex_pm_google->get_plugin_slug(), '_wpnonce_save' );
|
180 |
$page_details = isset($_POST['page_details']) ? wp_kses_post($_POST['page_details']) : null;
|
181 |
$page_details = json_decode(stripcslashes($page_details), true);
|
|
|
182 |
|
183 |
-
trustindex_plugin_connect_page($page_details);
|
184 |
header('Location: admin.php?page=' . sanitize_text_field($_GET['page']) .'&tab=setup_no_reg');
|
185 |
exit;
|
186 |
}
|
@@ -304,6 +339,43 @@ elseif($ti_command == 'save-amp-notice-hide')
|
|
304 |
update_option( $trustindex_pm_google->get_option_name('amp-hidden-notification'), 1, false );
|
305 |
exit;
|
306 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
307 |
$reviews = [];
|
308 |
$only_ratings_default = false;
|
309 |
if($trustindex_pm_google->is_noreg_linked())
|
@@ -319,6 +391,8 @@ $reviews_with_text++;
|
|
319 |
}
|
320 |
$only_ratings_default = $reviews_with_text >= 3;
|
321 |
}
|
|
|
|
|
322 |
$style_id = get_option( $trustindex_pm_google->get_option_name('style-id') );
|
323 |
$scss_set = get_option( $trustindex_pm_google->get_option_name('scss-set') );
|
324 |
$lang = get_option( $trustindex_pm_google->get_option_name('lang'), 'en');
|
@@ -335,38 +409,6 @@ $scss_set_tmp = $scss_set ? $scss_set : 'light-background';
|
|
335 |
$show_reviewers_photo = get_option( $trustindex_pm_google->get_option_name('show-reviewers-photo'), TrustindexPlugin_google::$widget_styles[$scss_set_tmp]['reviewer-photo'] ? 1 : 0 );
|
336 |
$show_logos = get_option( $trustindex_pm_google->get_option_name('show-logos'), TrustindexPlugin_google::$widget_styles[$scss_set_tmp]['hide-logos'] ? 0 : 1 );
|
337 |
$show_stars = get_option( $trustindex_pm_google->get_option_name('show-stars'), TrustindexPlugin_google::$widget_styles[$scss_set_tmp]['hide-stars'] ? 0 : 1 );
|
338 |
-
$need_to_refresh = false;
|
339 |
-
if($trustindex_pm_google->is_noreg_linked() && $trustindex_pm_google->is_ten_scale_rating_platform())
|
340 |
-
{
|
341 |
-
$fields = $wpdb->get_results('SHOW FIELDS FROM `'. $trustindex_pm_google->get_noreg_tablename() .'` WHERE Field = "rating"');
|
342 |
-
if($fields && isset($fields[0]) && isset($fields[0]->Type))
|
343 |
-
{
|
344 |
-
if($fields[0]->Type == 'tinyint(1)')
|
345 |
-
{
|
346 |
-
$wpdb->query('ALTER TABLE `'. $trustindex_pm_google->get_noreg_tablename() .'` CHANGE `rating` `rating` DECIMAL(3,1) NULL DEFAULT NULL');
|
347 |
-
$need_to_refresh = true;
|
348 |
-
}
|
349 |
-
}
|
350 |
-
}
|
351 |
-
if(isset($_GET['refresh']) || $need_to_refresh)
|
352 |
-
{
|
353 |
-
$page_details = get_option( $trustindex_pm_google->get_option_name('page-details') );
|
354 |
-
$tmp = $trustindex_pm_google->download_noreg_details($page_details);
|
355 |
-
if($tmp['success'])
|
356 |
-
{
|
357 |
-
$page_details['rating_number'] = $tmp['result']['reviews']['count'];
|
358 |
-
$page_details['rating_score'] = $tmp['result']['reviews']['score'];
|
359 |
-
$page_details['avatar_url'] = $tmp['result']['avatar_url'];
|
360 |
-
}
|
361 |
-
trustindex_plugin_disconnect_page(false);
|
362 |
-
trustindex_plugin_connect_page($page_details, false);
|
363 |
-
if(isset($_GET['my_reviews']))
|
364 |
-
{
|
365 |
-
setcookie('ti-success', 'reviews-loaded', time() + 60, "/");
|
366 |
-
}
|
367 |
-
header('Location: admin.php?page=' . sanitize_text_field($_GET['page']) . (isset($_GET['my_reviews']) ? '&tab=my_reviews' : '&tab=setup_no_reg'));
|
368 |
-
exit;
|
369 |
-
}
|
370 |
if(isset($_GET['recreate']))
|
371 |
{
|
372 |
$trustindex_pm_google->uninstall();
|
11 |
'save-dateformat',
|
12 |
'save-options',
|
13 |
'save-align',
|
14 |
+
'save-amp-notice-hide',
|
15 |
+
'review-manual-download'
|
16 |
];
|
17 |
if(!in_array($ti_command, $ti_command_list))
|
18 |
{
|
37 |
</div>';
|
38 |
exit;
|
39 |
}
|
40 |
+
function trustindex_plugin_connect_page($page_details = null, $default_settings = true, $review_download = false)
|
41 |
{
|
42 |
global $trustindex_pm_google;
|
43 |
global $wpdb;
|
64 |
PRIMARY KEY (id)
|
65 |
);");
|
66 |
trustindex_database_create_check();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
$reviews = null;
|
68 |
if(isset($page_details['reviews']))
|
69 |
{
|
70 |
$reviews = $page_details['reviews'];
|
71 |
unset($page_details['reviews']);
|
72 |
}
|
73 |
+
$request_id = null;
|
74 |
+
if(isset($page_details['request_id']))
|
75 |
+
{
|
76 |
+
$request_id = $page_details['request_id'];
|
77 |
+
unset($page_details['request_id']);
|
78 |
+
}
|
79 |
+
else if(isset($_REQUEST['review_request_id']))
|
80 |
+
{
|
81 |
+
$request_id = $_REQUEST['review_request_id'];
|
82 |
+
}
|
83 |
+
if($request_id)
|
84 |
+
{
|
85 |
+
update_option($trustindex_pm_google->get_option_name('review-download-request-id'), $request_id, false);
|
86 |
+
}
|
87 |
+
$manual_download = 0;
|
88 |
+
if(isset($page_details['manual_download']))
|
89 |
+
{
|
90 |
+
$manual_download = intval($page_details['manual_download']);
|
91 |
+
unset($page_details['manual_download']);
|
92 |
+
}
|
93 |
+
else if(isset($_REQUEST['manual_download']))
|
94 |
{
|
95 |
+
$manual_download = intval($_REQUEST['manual_download']);
|
|
|
96 |
}
|
97 |
+
delete_option($trustindex_pm_google->get_option_name('review-download-token'));
|
98 |
+
if($review_download)
|
99 |
+
{
|
100 |
+
update_option($trustindex_pm_google->get_option_name('review-download-inprogress'), $review_download, false);
|
101 |
+
update_option($trustindex_pm_google->get_option_name('review-manual-download'), $manual_download, false);
|
102 |
+
}
|
103 |
+
else
|
104 |
+
{
|
105 |
+
delete_option($trustindex_pm_google->get_option_name('review-download-inprogress'));
|
106 |
+
delete_option($trustindex_pm_google->get_option_name('review-manual-download'));
|
107 |
+
}
|
108 |
+
if(is_array($reviews))
|
109 |
+
{
|
110 |
foreach($reviews as $row)
|
111 |
{
|
112 |
$date = isset($row['created_at']) ? $row['created_at'] : (isset($row['date']) ? $row['date'] : '');
|
118 |
'date' => substr($date, 0, 10)
|
119 |
]);
|
120 |
}
|
121 |
+
if($trustindex_pm_google->shortname == 'facebook' || count($reviews) == $page_details['rating_number'])
|
122 |
+
{
|
123 |
+
update_option($trustindex_pm_google->get_option_name('download-timestamp'), time() + (86400 * 10), false);
|
124 |
+
delete_option($trustindex_pm_google->get_option_name('review-download-inprogress'));
|
125 |
+
}
|
126 |
+
}
|
127 |
+
update_option( $trustindex_pm_google->get_option_name('page-details') , $page_details, false );
|
128 |
+
$GLOBALS['wp_object_cache']->delete( $trustindex_pm_google->get_option_name('page-details'), 'options' );
|
129 |
if($default_settings)
|
130 |
{
|
131 |
$lang = strtolower(substr(get_locale(), 0, 2));
|
145 |
{
|
146 |
global $trustindex_pm_google;
|
147 |
global $wpdb;
|
148 |
+
$page_details = get_option( $trustindex_pm_google->get_option_name('page-details') );
|
149 |
+
$trustindex_pm_google->delete_async_request();
|
150 |
+
delete_option( $trustindex_pm_google->get_option_name('review-download-inprogress') );
|
151 |
+
delete_option( $trustindex_pm_google->get_option_name('review-download-request-id') );
|
152 |
+
delete_option( $trustindex_pm_google->get_option_name('review-manual-download') );
|
153 |
delete_option( $trustindex_pm_google->get_option_name('page-details') );
|
154 |
delete_option( $trustindex_pm_google->get_option_name('review-content') );
|
155 |
delete_option( $trustindex_pm_google->get_option_name('css-content') );
|
213 |
check_admin_referer( 'save-noreg_'.$trustindex_pm_google->get_plugin_slug(), '_wpnonce_save' );
|
214 |
$page_details = isset($_POST['page_details']) ? wp_kses_post($_POST['page_details']) : null;
|
215 |
$page_details = json_decode(stripcslashes($page_details), true);
|
216 |
+
$review_download = isset($_POST['review_download']) ? sanitize_text_field($_POST['review_download']) : 0;
|
217 |
|
218 |
+
trustindex_plugin_connect_page($page_details, true, $review_download);
|
219 |
header('Location: admin.php?page=' . sanitize_text_field($_GET['page']) .'&tab=setup_no_reg');
|
220 |
exit;
|
221 |
}
|
339 |
update_option( $trustindex_pm_google->get_option_name('amp-hidden-notification'), 1, false );
|
340 |
exit;
|
341 |
}
|
342 |
+
elseif($ti_command == 'review-manual-download')
|
343 |
+
{
|
344 |
+
$response = wp_remote_post('https://admin.trustindex.io/source/wordpressPageRequest', [
|
345 |
+
'body' => [ 'id' => get_option($trustindex_pm_google->get_option_name('review-download-request-id')) ],
|
346 |
+
'timeout' => '30',
|
347 |
+
'redirection' => '5',
|
348 |
+
'blocking' => true
|
349 |
+
]);
|
350 |
+
if(is_wp_error($response))
|
351 |
+
{
|
352 |
+
$wp_query->set_404();
|
353 |
+
status_header(404);
|
354 |
+
}
|
355 |
+
else
|
356 |
+
{
|
357 |
+
$json = json_decode(wp_remote_retrieve_body($response), true);
|
358 |
+
if(isset($json['error']) && $json['error'])
|
359 |
+
{
|
360 |
+
update_option($trustindex_pm_google->get_option_name('review-download-inprogress'), 'error', false);
|
361 |
+
}
|
362 |
+
else if(isset($json['details']))
|
363 |
+
{
|
364 |
+
$trustindex_pm_google->save_details($json['details']);
|
365 |
+
$trustindex_pm_google->save_reviews(isset($json['reviews']) ? $json['reviews'] : []);
|
366 |
+
delete_option($trustindex_pm_google->get_option_name('review-download-token'));
|
367 |
+
delete_option($trustindex_pm_google->get_option_name('review-download-inprogress'));
|
368 |
+
delete_option($trustindex_pm_google->get_option_name('review-manual-download'));
|
369 |
+
update_option($trustindex_pm_google->get_option_name('download-timestamp'), time() + (86400 * 10), false);
|
370 |
+
}
|
371 |
+
else
|
372 |
+
{
|
373 |
+
$wp_query->set_404();
|
374 |
+
status_header(404);
|
375 |
+
}
|
376 |
+
}
|
377 |
+
exit;
|
378 |
+
}
|
379 |
$reviews = [];
|
380 |
$only_ratings_default = false;
|
381 |
if($trustindex_pm_google->is_noreg_linked())
|
391 |
}
|
392 |
$only_ratings_default = $reviews_with_text >= 3;
|
393 |
}
|
394 |
+
$is_review_download_in_progress = $trustindex_pm_google->is_review_download_in_progress();
|
395 |
+
$review_download_request_id = get_option( $trustindex_pm_google->get_option_name('review-download-request-id') );
|
396 |
$style_id = get_option( $trustindex_pm_google->get_option_name('style-id') );
|
397 |
$scss_set = get_option( $trustindex_pm_google->get_option_name('scss-set') );
|
398 |
$lang = get_option( $trustindex_pm_google->get_option_name('lang'), 'en');
|
409 |
$show_reviewers_photo = get_option( $trustindex_pm_google->get_option_name('show-reviewers-photo'), TrustindexPlugin_google::$widget_styles[$scss_set_tmp]['reviewer-photo'] ? 1 : 0 );
|
410 |
$show_logos = get_option( $trustindex_pm_google->get_option_name('show-logos'), TrustindexPlugin_google::$widget_styles[$scss_set_tmp]['hide-logos'] ? 0 : 1 );
|
411 |
$show_stars = get_option( $trustindex_pm_google->get_option_name('show-stars'), TrustindexPlugin_google::$widget_styles[$scss_set_tmp]['hide-stars'] ? 0 : 1 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
412 |
if(isset($_GET['recreate']))
|
413 |
{
|
414 |
$trustindex_pm_google->uninstall();
|
tabs/setup_no_reg_platform.php
CHANGED
@@ -1,20 +1 @@
|
|
1 |
-
<
|
2 |
-
<div class="input">
|
3 |
-
<input class="form-control"
|
4 |
-
placeholder="<?php echo TrustindexPlugin_google::___("e.g.:") . ' ' . esc_attr($example); ?>"
|
5 |
-
id="page-link"
|
6 |
-
type="text" required="required"
|
7 |
-
/>
|
8 |
-
<span class="info-text">
|
9 |
-
<?php echo TrustindexPlugin_google::___("Google Search or Google Maps URL where you can see your business profile."); ?>
|
10 |
-
<?php echo TrustindexPlugin_google::___("For example: <a href='%s' target='_blank'>illustration</a>, <a href='%s' target='_blank'>illustration</a>", [ 'https://cdn.trustindex.io/' . 'assets/img/trustindex-google-search-1.jpg', 'https://cdn.trustindex.io/' . 'assets/img/trustindex-google-search-2.jpg' ]); ?>
|
11 |
-
<br />
|
12 |
-
<strong><?php echo TrustindexPlugin_google::___('Or enter the Place ID if you want to be sure.'); ?></strong> <a href="https://developers.google.com/maps/documentation/javascript/examples/places-placeid-finder" target="_blank"><?php echo TrustindexPlugin_google::___('You can find it here after typing the address in the search bar on the map.'); ?></a>
|
13 |
-
</span>
|
14 |
-
<img class="loading" src="<?php echo admin_url('images/loading.gif'); ?>" />
|
15 |
-
<div class="results"
|
16 |
-
data-errortext="<?php echo TrustindexPlugin_google::___("Please add your Place ID again: this is not a valid %s page.", [ "Google" ]); ?>"
|
17 |
-
data-errortext-search="<?php echo TrustindexPlugin_google::___("Please give us that URL where you can see your business profile in Google Search or in Google Maps!"); ?>"
|
18 |
-
></div>
|
19 |
-
</div>
|
20 |
-
<button class="btn btn-text btn-check"><?php echo TrustindexPlugin_google::___("Check") ;?></button>
|
1 |
+
<button class="btn btn-text btn-connect-public"><?php echo TrustindexPlugin_google::___("Connect") ;?></button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tabs/setup_trustindex.php
CHANGED
@@ -8,7 +8,7 @@ wp_enqueue_script('trustindex-js', 'https://cdn.trustindex.io/loader.js', [], fa
|
|
8 |
<div class="ti-col-6">
|
9 |
<h1><?php echo TrustindexPlugin_google::___('Skyrocket Your Sales with Customer Reviews'); ?></h1>
|
10 |
<h2>
|
11 |
-
<?php echo TrustindexPlugin_google::___('%
|
12 |
<?php echo TrustindexPlugin_google::___('Increase SEO, trust and sales using customer reviews.'); ?>
|
13 |
</h2>
|
14 |
<h3><?php echo TrustindexPlugin_google::___('Top Features'); ?></h3>
|
8 |
<div class="ti-col-6">
|
9 |
<h1><?php echo TrustindexPlugin_google::___('Skyrocket Your Sales with Customer Reviews'); ?></h1>
|
10 |
<h2>
|
11 |
+
<?php echo TrustindexPlugin_google::___('%s+ WordPress websites use Trustindex to embed reviews fast and easily.', [ '100.000' ]); ?><br />
|
12 |
<?php echo TrustindexPlugin_google::___('Increase SEO, trust and sales using customer reviews.'); ?>
|
13 |
</h2>
|
14 |
<h3><?php echo TrustindexPlugin_google::___('Top Features'); ?></h3>
|
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() <= "
|
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.1");
|
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
@@ -18,6 +18,96 @@ public function getShortName()
|
|
18 |
{
|
19 |
return $this->shortname;
|
20 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
|
23 |
public function get_plugin_dir()
|
@@ -65,6 +155,7 @@ public function output_buffer()
|
|
65 |
|
66 |
public function uninstall()
|
67 |
{
|
|
|
68 |
foreach ($this->get_option_names() as $opt_name)
|
69 |
{
|
70 |
delete_option($this->get_option_name($opt_name));
|
@@ -249,7 +340,11 @@ return [
|
|
249 |
'show-stars',
|
250 |
'load-css-inline',
|
251 |
'align',
|
252 |
-
'amp-hidden-notification'
|
|
|
|
|
|
|
|
|
253 |
];
|
254 |
}
|
255 |
public function get_platforms()
|
@@ -379,7 +474,7 @@ $chosed_platform_slug = $this->plugin_slugs[ $force_platform ];
|
|
379 |
$current_platform_slug = $this->plugin_slugs[ $this->shortname ];
|
380 |
$file_path = preg_replace('/[^\/\\\\]+([\\\\\/]trustindex-plugin\.class\.php)/', $chosed_platform_slug . '$1', $file_path);
|
381 |
}
|
382 |
-
$chosed_platform = new self($force_platform, $file_path, "do-not-care-
|
383 |
if(!$chosed_platform->is_noreg_linked() || !$chosed_platform->is_noreg_table_exists($force_platform))
|
384 |
{
|
385 |
return self::get_alertbox(
|
@@ -513,7 +608,7 @@ $this->noreg_save_css(true);
|
|
513 |
}
|
514 |
$this->handleCssFile();
|
515 |
$this->loadI18N();
|
516 |
-
if ( !class_exists('TrustindexGutenbergPlugin') && function_exists( 'register_block_type' ) )
|
517 |
{
|
518 |
require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'static' . DIRECTORY_SEPARATOR . 'block-editor' . DIRECTORY_SEPARATOR . 'block-editor.php';
|
519 |
TrustindexGutenbergPlugin::instance();
|
@@ -4589,57 +4684,6 @@ $i++;
|
|
4589 |
}
|
4590 |
return $reviews;
|
4591 |
}
|
4592 |
-
public function download_noreg_reviews($page_details, $force_platform = null)
|
4593 |
-
{
|
4594 |
-
$force_platform = $force_platform ? $force_platform : $this->getShortName();
|
4595 |
-
$url = "https://admin.trustindex.io/" . "api/getPromoReviews?platform=".$force_platform."&page_id=" . $page_details['id'];
|
4596 |
-
if($force_platform == 'facebook')
|
4597 |
-
{
|
4598 |
-
$url .= '&access_token='. $page_details['access_token'];
|
4599 |
-
}
|
4600 |
-
if(!isset($page_details['id']) && !trim($page_details['id']))
|
4601 |
-
{
|
4602 |
-
return [ 'success' => false ];
|
4603 |
-
}
|
4604 |
-
$server_output = $this->post_request($url, [
|
4605 |
-
'body' => [ 'wp_info' => $this->get_wp_details() ],
|
4606 |
-
'timeout' => '30',
|
4607 |
-
'redirection' => '5',
|
4608 |
-
'blocking' => true
|
4609 |
-
]);
|
4610 |
-
if($server_output[0] !== '[' && $server_output[0] !== '{')
|
4611 |
-
{
|
4612 |
-
$server_output = substr($server_output, strpos($server_output, '('));
|
4613 |
-
$server_output = trim($server_output,'();');
|
4614 |
-
}
|
4615 |
-
$server_output = json_decode($server_output, true);
|
4616 |
-
return $server_output;
|
4617 |
-
}
|
4618 |
-
public function download_noreg_details($page_details, $force_platform = null)
|
4619 |
-
{
|
4620 |
-
if(!isset($page_details['id']) || empty(trim($page_details['id'])))
|
4621 |
-
{
|
4622 |
-
return null;
|
4623 |
-
}
|
4624 |
-
$force_platform = $force_platform ? $force_platform : $this->getShortName();
|
4625 |
-
$url = "https://admin.trustindex.io/" . "api/getPageDetails?platform=".$force_platform."&page_id=" . $page_details['id'];
|
4626 |
-
if($force_platform == "facebook")
|
4627 |
-
{
|
4628 |
-
$url .= "&access_token=". $page_details['access_token'];
|
4629 |
-
}
|
4630 |
-
$server_output = $this->post_request($url, [
|
4631 |
-
'timeout' => '20',
|
4632 |
-
'redirection' => '5',
|
4633 |
-
'blocking' => true
|
4634 |
-
]);
|
4635 |
-
if($server_output[0] !== '[' && $server_output[0] !== '{')
|
4636 |
-
{
|
4637 |
-
$server_output = substr($server_output, strpos($server_output, '('));
|
4638 |
-
$server_output = trim($server_output,'();');
|
4639 |
-
}
|
4640 |
-
$server_output = json_decode($server_output, true);
|
4641 |
-
return $server_output;
|
4642 |
-
}
|
4643 |
public function get_plugin_current_version()
|
4644 |
{
|
4645 |
add_action('http_api_curl', function( $handle ){
|
@@ -4656,7 +4700,7 @@ return $json['version'];
|
|
4656 |
}
|
4657 |
|
4658 |
|
4659 |
-
|
4660 |
{
|
4661 |
$response = wp_remote_post($url, $args);
|
4662 |
if(is_wp_error($response))
|
@@ -4814,7 +4858,7 @@ if(file_exists($this->get_plugin_dir() . 'static' . DIRECTORY_SEPARATOR . 'js' .
|
|
4814 |
{
|
4815 |
wp_enqueue_script('trustindex_settings_script_connect_'. $this->shortname, $this->get_plugin_file_url('static/js/admin-page-settings-connect.js'));
|
4816 |
}
|
4817 |
-
if(file_exists($this->get_plugin_dir() . 'static' . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'admin-page-settings.js'))
|
4818 |
{
|
4819 |
wp_enqueue_script('trustindex_settings_script_'. $this->shortname, $this->get_plugin_file_url('static/js/admin-page-settings.js') );
|
4820 |
}
|
18 |
{
|
19 |
return $this->shortname;
|
20 |
}
|
21 |
+
public function get_webhook_action()
|
22 |
+
{
|
23 |
+
return 'trustindex_reviews_hook_' . $this->shortname;
|
24 |
+
}
|
25 |
+
public function get_webhook_url()
|
26 |
+
{
|
27 |
+
return admin_url('admin-ajax.php') . '?action='. $this->get_webhook_action();
|
28 |
+
}
|
29 |
+
public function is_review_download_in_progress()
|
30 |
+
{
|
31 |
+
return get_option($this->get_option_name('review-download-inprogress'), 0);
|
32 |
+
}
|
33 |
+
public function is_review_manual_download()
|
34 |
+
{
|
35 |
+
return get_option($this->get_option_name('review-manual-download'), 0);
|
36 |
+
}
|
37 |
+
public function delete_async_request()
|
38 |
+
{
|
39 |
+
$request_id = get_option($this->get_option_name('review-download-request-id'));
|
40 |
+
if(!$request_id)
|
41 |
+
{
|
42 |
+
return false;
|
43 |
+
}
|
44 |
+
wp_remote_post('https://admin.trustindex.io/source/wordpressPageRequest', [
|
45 |
+
'body' => [
|
46 |
+
'is_delete' => 1,
|
47 |
+
'id' => $request_id
|
48 |
+
],
|
49 |
+
'timeout' => '30',
|
50 |
+
'redirection' => '5',
|
51 |
+
'blocking' => true
|
52 |
+
]);
|
53 |
+
return true;
|
54 |
+
}
|
55 |
+
public function save_details($tmp)
|
56 |
+
{
|
57 |
+
$details = [
|
58 |
+
'id' => isset($tmp['page_id']) ? $tmp['page_id'] : $tmp['id'],
|
59 |
+
'name' => isset($tmp['name']) ? sanitize_text_field(stripslashes($tmp['name'])) : "",
|
60 |
+
'address' => isset($tmp['address']) ? sanitize_text_field(stripslashes($tmp['address'])) : "",
|
61 |
+
'avatar_url' => isset($tmp['avatar_url']) ? sanitize_text_field(stripslashes($tmp['avatar_url'])) : "",
|
62 |
+
'rating_number' => isset($tmp['reviews']['count']) ? intval($tmp['reviews']['count']) : 0,
|
63 |
+
'rating_score' => isset($tmp['reviews']['score']) ? floatval($tmp['reviews']['score']) : 0,
|
64 |
+
];
|
65 |
+
if(isset($tmp['access_token']))
|
66 |
+
{
|
67 |
+
$details['access_token'] = sanitize_text_field(stripslashes($tmp['access_token']));
|
68 |
+
}
|
69 |
+
update_option($this->get_option_name('page-details'), $details, false);
|
70 |
+
}
|
71 |
+
public function save_reviews($tmp)
|
72 |
+
{
|
73 |
+
global $wpdb;
|
74 |
+
$dbtable = $this->get_noreg_tablename();
|
75 |
+
$wpdb->query("TRUNCATE $dbtable;");
|
76 |
+
foreach($tmp as $i => $review)
|
77 |
+
{
|
78 |
+
foreach($review as $key => $value)
|
79 |
+
{
|
80 |
+
if(is_array($value))
|
81 |
+
{
|
82 |
+
if($key == 'reviewer')
|
83 |
+
{
|
84 |
+
$review[ $key ] = array_map(function($v) {
|
85 |
+
return $v ? sanitize_text_field(stripslashes($v)) : $v;
|
86 |
+
}, $value);
|
87 |
+
}
|
88 |
+
else
|
89 |
+
{
|
90 |
+
unset($review[ $key ]);
|
91 |
+
}
|
92 |
+
}
|
93 |
+
else if($key == 'text')
|
94 |
+
{
|
95 |
+
$review[ $key ] = $value ? wp_kses_post(stripslashes($value)) : $value;
|
96 |
+
}
|
97 |
+
else
|
98 |
+
{
|
99 |
+
$review[ $key ] = $value ? sanitize_text_field(stripslashes($value)) : $value;
|
100 |
+
}
|
101 |
+
}
|
102 |
+
$wpdb->insert($dbtable, [
|
103 |
+
'user' => $review['reviewer']['name'],
|
104 |
+
'user_photo' => $review['reviewer']['avatar_url'],
|
105 |
+
'text' => $review['text'],
|
106 |
+
'rating' => $review['rating'] ? $review['rating'] : 5,
|
107 |
+
'date' => substr($review['created_at'], 0, 10)
|
108 |
+
]);
|
109 |
+
}
|
110 |
+
}
|
111 |
|
112 |
|
113 |
public function get_plugin_dir()
|
155 |
|
156 |
public function uninstall()
|
157 |
{
|
158 |
+
$this->delete_async_request();
|
159 |
foreach ($this->get_option_names() as $opt_name)
|
160 |
{
|
161 |
delete_option($this->get_option_name($opt_name));
|
340 |
'show-stars',
|
341 |
'load-css-inline',
|
342 |
'align',
|
343 |
+
'amp-hidden-notification',
|
344 |
+
'review-download-token',
|
345 |
+
'review-download-inprogress',
|
346 |
+
'review-download-request-id',
|
347 |
+
'review-manual-download',
|
348 |
];
|
349 |
}
|
350 |
public function get_platforms()
|
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.1", "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(
|
608 |
}
|
609 |
$this->handleCssFile();
|
610 |
$this->loadI18N();
|
611 |
+
if ( !class_exists('TrustindexGutenbergPlugin') && function_exists( 'register_block_type' ) && !WP_Block_Type_Registry::get_instance()->is_registered( 'trustindex/block-selector' ))
|
612 |
{
|
613 |
require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'static' . DIRECTORY_SEPARATOR . 'block-editor' . DIRECTORY_SEPARATOR . 'block-editor.php';
|
614 |
TrustindexGutenbergPlugin::instance();
|
4684 |
}
|
4685 |
return $reviews;
|
4686 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4687 |
public function get_plugin_current_version()
|
4688 |
{
|
4689 |
add_action('http_api_curl', function( $handle ){
|
4700 |
}
|
4701 |
|
4702 |
|
4703 |
+
public function post_request($url, $args)
|
4704 |
{
|
4705 |
$response = wp_remote_post($url, $args);
|
4706 |
if(is_wp_error($response))
|
4858 |
{
|
4859 |
wp_enqueue_script('trustindex_settings_script_connect_'. $this->shortname, $this->get_plugin_file_url('static/js/admin-page-settings-connect.js'));
|
4860 |
}
|
4861 |
+
if(in_array($this->shortname, [ 'google', 'facebook' ]) && file_exists($this->get_plugin_dir() . 'static' . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'admin-page-settings.js'))
|
4862 |
{
|
4863 |
wp_enqueue_script('trustindex_settings_script_'. $this->shortname, $this->get_plugin_file_url('static/js/admin-page-settings.js') );
|
4864 |
}
|
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__, "
|
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.1", "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:
|
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__, "
|
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__, "
|
41 |
}
|
42 |
$path = wp_upload_dir()['baseurl'] .'/'. $trustindex_pm_google->getCssFile(true);
|
43 |
if(is_ssl())
|
@@ -126,4 +126,61 @@ return;
|
|
126 |
add_action('admin_notices', 'ti_woocommerce_notice');
|
127 |
}
|
128 |
add_action('plugins_loaded', array($trustindex_pm_google, 'plugin_loaded'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
?>
|
9 |
Author URI: https://www.trustindex.io/
|
10 |
Contributors: trustindex
|
11 |
License: GPLv2 or later
|
12 |
+
Version: 9.1
|
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.1", "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.1", "Widgets for Google Reviews", "Google");
|
41 |
}
|
42 |
$path = wp_upload_dir()['baseurl'] .'/'. $trustindex_pm_google->getCssFile(true);
|
43 |
if(is_ssl())
|
126 |
add_action('admin_notices', 'ti_woocommerce_notice');
|
127 |
}
|
128 |
add_action('plugins_loaded', array($trustindex_pm_google, 'plugin_loaded'));
|
129 |
+
add_action('wp_ajax_nopriv_'. $trustindex_pm_google->get_webhook_action(), $trustindex_pm_google->get_webhook_action());
|
130 |
+
add_action('wp_ajax_'. $trustindex_pm_google->get_webhook_action(), $trustindex_pm_google->get_webhook_action());
|
131 |
+
function trustindex_reviews_hook_google() {
|
132 |
+
global $trustindex_pm_google;
|
133 |
+
global $wpdb;
|
134 |
+
$token = isset($_REQUEST['token']) ? sanitize_text_field($_REQUEST['token']) : "";
|
135 |
+
if(isset($_REQUEST['test']) && $token == get_option($trustindex_pm_google->get_option_name('review-download-token')))
|
136 |
+
{
|
137 |
+
echo $token;
|
138 |
+
exit;
|
139 |
+
}
|
140 |
+
$our_token = $trustindex_pm_google->is_review_download_in_progress();
|
141 |
+
if(
|
142 |
+
!$token
|
143 |
+
|| !$trustindex_pm_google->is_noreg_linked()
|
144 |
+
|| !$trustindex_pm_google->is_noreg_table_exists()
|
145 |
+
|| $our_token != $token
|
146 |
+
) {
|
147 |
+
global $wp_query;
|
148 |
+
$wp_query->set_404();
|
149 |
+
status_header(404);
|
150 |
+
exit;
|
151 |
+
}
|
152 |
+
$name = 'Unknown source';
|
153 |
+
if(isset($_REQUEST['error']) && $_REQUEST['error'])
|
154 |
+
{
|
155 |
+
update_option($trustindex_pm_google->get_option_name('review-download-inprogress'), 'error', false);
|
156 |
+
}
|
157 |
+
else
|
158 |
+
{
|
159 |
+
if(isset($_REQUEST['details']))
|
160 |
+
{
|
161 |
+
$name = sanitize_text_field($_REQUEST['details']['name']);
|
162 |
+
$trustindex_pm_google->save_details($_REQUEST['details']);
|
163 |
+
$trustindex_pm_google->save_reviews(isset($_REQUEST['reviews']) ? $_REQUEST['reviews'] : []);
|
164 |
+
}
|
165 |
+
delete_option($trustindex_pm_google->get_option_name('review-download-inprogress'));
|
166 |
+
delete_option($trustindex_pm_google->get_option_name('review-manual-download'));
|
167 |
+
}
|
168 |
+
update_option($trustindex_pm_google->get_option_name('download-timestamp'), time() + (86400 * 10), false);
|
169 |
+
try
|
170 |
+
{
|
171 |
+
$subject = 'Google reviews downloaded';
|
172 |
+
$message = "
|
173 |
+
Hello,<br /><br />
|
174 |
+
Your request to download the reviews of ". $name ." (Google page) has been successfully completed and the Trustindex plugin has received the result.<br /><br />
|
175 |
+
What's next?<br />
|
176 |
+
1. Check the widget in the plugin and change the settings if needed <br />
|
177 |
+
2. Put the widget's shortcode into your pages to increase trust in your visitors <br />
|
178 |
+
3. You may want to try the paid features (multiple platforms at once, multiple layouts, filters, automatic review updates, auto collect new reviews, ...) <br />";
|
179 |
+
$headers = [ 'Content-Type: text/html; charset=UTF-8' ];
|
180 |
+
wp_mail(get_option('admin_email'), $subject, $message, $headers, [ '' ]);
|
181 |
+
}
|
182 |
+
catch(Exception $e) { }
|
183 |
+
echo $our_token;
|
184 |
+
exit;
|
185 |
+
}
|
186 |
?>
|