Plugin Directory

Changeset 3128069


Ignore:
Timestamp:
07/30/2024 11:09:48 AM (17 months ago)
Author:
truvisibility
Message:

Added GDPR support

Location:
truvisibility-all-in-one-marketing-suite/trunk
Files:
1 added
20 edited

Legend:

Unmodified
Added
Removed
  • truvisibility-all-in-one-marketing-suite/trunk/README.txt

    r3069416 r3128069  
    55License URI: http://www.gnu.org/licenses/gpl.html
    66Requires at least: 5.4
    7 Tested up to: 6.5
     7Tested up to: 6.6
    88Requires PHP: 7.2
    9 Stable tag: 1.0.1
     9Stable tag: 1.1.0
    1010
    1111The TruVISIBILITY Plugin integrates your website with their all-in-one Marketing Suite featuring a CRM, Email Automation, Forms, & Live Chat/Chatbots.
     
    136136== Changelog ==
    137137
     138= 1.1.0 =
     139* (added) GDPR support
     140
    138141= 1.0.1 =
    139142* (fixed) redirection to the admin panel
  • truvisibility-all-in-one-marketing-suite/trunk/admin/class-truvisibility-platform-admin.php

    r3069416 r3128069  
    110110    public function enqueue_scripts()
    111111    {
    112         wp_register_script(self::POPPER_JS, 'https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js', array(), TruVisibility_Platform_Config::PLUGIN_VERSION, true);
    113         wp_register_script(self::BOOTSTRAP_JS, 'https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js', array(), TruVisibility_Platform_Config::PLUGIN_VERSION, true);
    114         wp_register_script(self::ADMIN_JS, plugin_dir_url(__FILE__) . 'js/truvisibility-platform-admin.js', array('jquery'), TruVisibility_Platform_Config::PLUGIN_VERSION, true);
     112        wp_register_script(self::POPPER_JS, 'https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js', array('jquery'), TruVisibility_Platform_Config::PLUGIN_VERSION, true);
     113        wp_register_script(self::BOOTSTRAP_JS, 'https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js', array(self::POPPER_JS), TruVisibility_Platform_Config::PLUGIN_VERSION, true);
     114        wp_register_script(self::ADMIN_JS, plugin_dir_url(__FILE__) . 'js/truvisibility-platform-admin.js', array(self::BOOTSTRAP_JS), TruVisibility_Platform_Config::PLUGIN_VERSION, true);
    115115        if (is_admin()) {
    116116            wp_localize_script(self::ADMIN_JS, self::TRUVISIBILITY_CONFIG, $this->get_config());
     
    175175
    176176        return array(
    177             'pluginPath'  => TRUVISIBILITY_PLATFORM_PLUGIN_URL,
    178             'accessToken' => $access_token,
    179             'adminUrl'    => admin_url(),
    180             'rootUrl'     => home_url(),
    181             'title'       => $this->get_site_title(),
    182             'apiUrl'      => get_rest_url(),
    183             'isConnected' => $this->integration_state->is_plugin_integrated(),
    184             'apiNonce'    => wp_create_nonce('wp_rest'),
    185             'formsScript' => 'https://forms.' . TruVisibility_Platform_Config::$TvUmbrellaRoot . '/static/scripts/embed.js',
    186             'authLink'    => 'https://integrations.' . TruVisibility_Platform_Config::$TvUmbrellaRoot . '/auth/redirect?root=' . home_url() . '&vendor=wp-v2',
    187             'language'    => get_bloginfo("language"),
     177            'pluginPath'     => TRUVISIBILITY_PLATFORM_PLUGIN_URL,
     178            'accessToken'    => $access_token,
     179            'adminUrl'       => admin_url(),
     180            'rootUrl'        => home_url(),
     181            'title'          => $this->get_site_title(),
     182            'apiUrl'         => get_rest_url(),
     183            'isConnected'    => $this->integration_state->is_plugin_integrated(),
     184            'apiNonce'       => wp_create_nonce('wp_rest'),
     185            'formsScript'    => 'https://forms.' . TruVisibility_Platform_Config::$TvUmbrellaRoot . '/static/scripts/embed.js',
     186            'authLink'       => 'https://integrations.' . TruVisibility_Platform_Config::$TvUmbrellaRoot . '/auth/redirect?root=' . home_url() . '&vendor=wp-v2',
     187            'language'       => get_bloginfo("language"),
     188            'gdprEnabled'    => $this->integration_state->is_gdpr_enabled(),
     189            'gdprPrivacyUrl' => $this->integration_state->get_gdpr_privacy_url()
    188190        );
    189191    }
     
    229231        if ($current_user) {
    230232            TruVisibility_Platform_Admin::view('main', array(
    231                 'title' => $this->get_site_title(),
    232                 'user'  => $current_user,
    233                 'chats' => $this->get_chats_list(),
    234                 'forms' => $this->get_forms_list()));
     233                'title'          => $this->get_site_title(),
     234                'user'           => $current_user,
     235                'chats'          => $this->get_chats_list(),
     236                'forms'          => $this->get_forms_list(),
     237                'gdprEnabled'    => $this->integration_state->is_gdpr_enabled(),
     238                'gdprPrivacyUrl' => $this->integration_state->get_gdpr_privacy_url(),
     239            ));
    235240        } else {
    236241            TruVisibility_Platform_Admin::view('unauthorized', array());
     
    283288    }
    284289
     290    public function activation_redirect($plugin)
     291    {
     292        if (get_option(TruVisibility_Platform_Config::ACTIVATION_REDIRECT_OPTION, false)) {
     293            delete_option(TruVisibility_Platform_Config::ACTIVATION_REDIRECT_OPTION);
     294            wp_redirect(admin_url('admin.php?page=' . TruVisibility_Platform_Config::PLUGIN_NAME));
     295        }
     296    }
    285297}
  • truvisibility-all-in-one-marketing-suite/trunk/admin/css/truvisibility-platform-admin.min.css

    r3067294 r3128069  
    1 @import"internal.css";@import"truvisibility-platform-font.css";#wpbody,#wpbody-content,#wpcontent,#wpwrap,body,html{height:100% !important;background-color:rgba(0,0,0,0)}#wpbody-content,#wpcontent{padding:0 !important;position:relative}#wpfooter{display:none !important}.wp-toolbar:has(.just-connected-message){background:#fafbff}ul#adminmenu>li.current>a.current:after{border-right-color:#fafbff}.btn.btn-plugin-primary{display:inline-flex;align-items:center;padding:8px 24px 8px 24px;border-radius:24px;border:1px solid;font-size:16px;line-height:24px;height:40px}.trv-admin-panel{position:relative;display:table;height:100%;width:100%}.trv-header{height:56px;display:flex;flex-direction:row;flex:0 0 56px;align-items:center;justify-content:end;padding-left:15px;padding-right:15px;background:#fcfdff;box-shadow:0 4px 16px #e6efff;z-index:600;position:sticky;top:32px}@media screen and (max-width: 599px){.trv-header{top:0}}.trv-header .disconnect-link .icon{display:none}@media screen and (max-width: 599px){.trv-header .disconnect-link{margin-left:16px;padding:0;width:40px;height:40px;display:flex;justify-content:center;align-items:center}.trv-header .disconnect-link__text{display:none}.trv-header .disconnect-link .icon{display:initial}}main.trv-main{padding:40px 55px;transition:padding .5s ease-in-out;min-height:calc(100% - 120px);display:flex;flex-direction:column}@media screen and (max-width: 599px){main.trv-main{padding:20px 12px}}.signin-link{padding:8px 15px 8px 15px;font-size:18px;font-weight:600;line-height:24px;letter-spacing:0em;text-align:left;color:#202020;text-decoration:none;cursor:pointer}.signin-link:hover{color:#1399e7}.content{display:flex;flex-direction:column;max-width:none;align-items:center;margin:0 auto;padding-top:60px;transition:padding .5s ease-in-out;height:100%}@media screen and (max-width: 599px){.content{padding-top:0}}.content h1{font-size:32px;font-weight:700;line-height:40px;text-align:center;color:#202020;padding:0;margin:0 0 15px 0}.content h1 img{margin-right:16px;transition:margin-right .5s ease-in-out;vertical-align:middle}.content h1 .primary-title:after{content:" "}@media screen and (max-width: 599px){.content h1 img{margin-right:4px}.content h1 .primary-title{display:flex;align-items:center;justify-content:center;margin-bottom:16px}.content h1 .primary-title:after{content:"";display:none}}.subheader{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;row-gap:16px;-moz-column-gap:32px;column-gap:32px;padding:0;margin:0 0 32px 0}.subheader li{display:flex;flex-direction:row;align-items:center;line-height:26px;list-style-type:none;font-size:20px;font-weight:600;color:#202020}.subheader li:before{content:url(../../assets/images/list-marker.svg);margin-right:13px;height:26px;line-height:26px}.products-list{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;gap:16px;max-width:855px;margin-bottom:80px}.products-list{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;gap:16px;max-width:855px;margin-bottom:80px}.products-list__item{width:168px;height:168px;display:flex;flex-direction:column;justify-content:end;align-items:center;gap:9px;color:#3b507d}@media screen and (max-width: 599px){.products-list__item{width:156px}}.products-list__item:hover{color:#1399e7}.products-list__item:focus{outline:0;box-shadow:none}.products-list__item span{font-size:18px;font-weight:600;line-height:24px;flex:0 0 24px}.get-started{padding:16px 24px 16px 24px;border-radius:40px;border:none;background:#ff9a00;color:#fff;font-size:18px;font-weight:600;line-height:24px;letter-spacing:0em;text-align:center;cursor:pointer}.get-started:hover,.get-started:active,.get-started:focus{background-color:#f59700}.get-started:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}#trv-spinner{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;justify-content:center;flex-direction:column;align-items:center;opacity:.7;background:#fff;z-index:99999}#trv-spinner .spinner.global{display:none}#trv-spinner.global{opacity:1}#trv-spinner.global .spinner-border{display:none}#trv-spinner.global .spinner.global{display:flex}#trv-spinner,#trv-spinner .spinner{transition:opacity .7s ease-out}#trv-spinner.hiding{opacity:1;display:none}#trv-spinner.hiding .spinner{opacity:.7}.welcome-message{font-size:18px;font-weight:600;flex:1;transition:font-size .5s ease-in-out}@media screen and (max-width: 599px){.welcome-message{font-size:14px}}.content-products{display:flex;flex-direction:row;flex-wrap:wrap;align-items:start;align-content:start;gap:20px}.content-products product-tile{width:377px;flex:0 0 377px;transition:width .5s ease-in-out;border:1px solid #dbdbdb;border-radius:8px;height:200px;background:#fff;display:flex;flex-direction:column}.content-products product-tile header{display:flex;flex-direction:row;align-items:center;margin:0 0 16px 0;padding:16px 16px 0 16px}.content-products product-tile header img{height:48px;margin-right:8px}.content-products product-tile header h1{flex:1;font-size:24px;font-weight:700;padding:0;margin:0;color:#3b507d}.content-products product-tile main{padding:16px 16px 0 16px;font-size:14px;font-weight:500;line-height:20px;color:#7b828e;flex:1}.content-products product-tile connectable-menu .integration-menu-toggle{height:52px;width:100%;font-size:14px;font-weight:600;line-height:20px;color:#3b507d;display:flex;flex-direction:row;justify-content:center;align-items:center;border-radius:0 0 8px 8px}.content-products product-tile connectable-menu .integration-menu-toggle .icon{font-size:16px;color:#3b507d;margin-left:18px}.content-products product-tile connectable-menu .integration-menu-toggle:hover,.content-products product-tile connectable-menu .integration-menu-toggle:focus,.content-products product-tile connectable-menu .integration-menu-toggle:hover .icon,.content-products product-tile connectable-menu .integration-menu-toggle:focus .icon{color:#12a3f8;background:rgba(0,0,0,0)}.content-products product-tile connectable-menu .dropdown .dropdown-menu.connectable-dropdown{margin-top:4px !important;margin-left:-1px !important;width:100%;padding:3px 0}.content-products product-tile connectable-menu .dropdown.show .dropdown-menu{display:block}.content-products product-tile connectable-menu .integration-menu{margin:0;padding:0;max-height:250px;overflow:auto}.content-products product-tile connectable-menu .connectable-item{display:flex;flex-direction:row;align-items:center;height:50px;padding:0 12px 0 12px;margin-bottom:0}.content-products product-tile connectable-menu .connectable-item:hover{background:rgba(0,0,0,0)}.content-products product-tile connectable-menu .connectable-item.empty{color:#7b828e}.content-products product-tile connectable-menu .connectable-item__status{content:"";width:8px;height:8px;border-radius:4px;display:block;margin-right:12px;flex:0 0 8px}.content-products product-tile connectable-menu .connectable-item__status--active{background:#3ccd68}.content-products product-tile connectable-menu .connectable-item__status--disabled{background:#dbdbdb}.content-products product-tile connectable-menu .connectable-item__status--pending{background:#ff9a00}.content-products product-tile connectable-menu .connectable-item__name{flex:1 1 auto;font-size:16px;font-weight:500;line-height:24px}.content-products product-tile connectable-menu .connectable-item .btn.btn-icon{padding:8px;margin-left:7px}.content-products product-tile connectable-menu .connectable-item .btn.btn-icon .icon{font-size:16px}@media screen and (max-width: 599px){.content-products{flex-direction:column;flex-wrap:nowrap}.content-products product-tile{width:100%;flex:0 0 auto}}.access-denied{flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center}.access-denied h1{font-size:40px;transition:font-size .5s ease-in-out;font-weight:700;line-height:48px;text-align:center;margin-bottom:8px}@media screen and (max-width: 599px){.access-denied h1{font-size:32px}}.access-denied section{font-size:18px;font-weight:500;line-height:28px;text-align:center;margin-bottom:64px;transition:margin-bottom .5s ease-in-out}@media screen and (max-width: 599px){.access-denied section{margin-bottom:40px}}.access-denied img{max-width:318px;width:100%}.rotatable{transition:transform .5s ease-in-out}.integration-menu-toggle.show .rotatable{transform:rotate(180deg)}.btn-icon{position:relative}.content-products product-tile connectable-menu .connectable-item .btn.btn-icon .done .icon{font-size:12px;color:#fff}.done{position:absolute;left:0;right:0;top:0;bottom:0;display:flex;flex-direction:row;justify-content:center;align-items:center;display:none}.done.show{display:flex}.done__body{display:flex;flex-direction:row;justify-content:center;align-items:center;border-radius:50%;animation:doneEnter .5s cubic-bezier(0.895, 0.03, 0.685, 0.22) forwards}.done .icon{font-size:12px;opacity:1;transform:scale(0);color:#fff;animation:iconEnter .3s cubic-bezier(1, 0.008, 0.565, 1.65) .1s 1 forwards}@keyframes doneEnter{0%{width:75%;height:75%;opacity:.1}30%{width:100%;height:100%;background:#4ad173;opacity:.6}60%{width:100%;height:100%;background:#4ad173;opacity:.8}100%{width:100%;height:100%;background:#4ad173;opacity:1}}@keyframes iconEnter{from{opacity:0;transform:scale(0.3)}to{opacity:1;transform:scale(1)}}.trv-footer a{font-size:16px;font-weight:600;line-height:24px}footer.main-footer{padding:0 55px;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;align-items:center;row-gap:20px;-moz-column-gap:32px;column-gap:32px;margin-top:32px;margin-bottom:24px}footer.main-footer a{line-height:24px;font-size:16px;font-weight:600}.modal-dialog-no-min-height .modal-content,.modal-dialog-no-min-height .modal-body{min-height:0 !important}.just-connected-message{padding:40px 55px;transition:padding .5s ease-in-out;position:absolute;top:56px;bottom:0;left:0;right:0;z-index:500;background:#fafbff;display:none;flex-direction:column;align-items:center;justify-content:center}@media screen and (max-width: 599px){.just-connected-message{padding:32px 12px}}.just-connected-message__text{font-size:24px;font-weight:700;line-height:32px;max-width:843px;text-align:center;margin-top:40px}@keyframes slideDownAndUp{0%{transform:translateY(-100%);opacity:0}50%{transform:translateY(0%);opacity:1}100%{transform:translateY(-100%);opacity:0}}@keyframes slideUpAndDown{0%{transform:translateY(100%);opacity:0}50%{transform:translateY(0%);opacity:1}100%{transform:translateY(100%);opacity:0}}.just-connected-message .img-animation-target{animation:slideDownAndUp 3s ease forwards}.just-connected-message .text-animation-target{animation:slideUpAndDown 3s ease forwards}
     1@import"internal.css";@import"truvisibility-platform-font.css";#wpbody,#wpbody-content,#wpcontent,#wpwrap,body,html{height:100% !important;background-color:rgba(0,0,0,0)}#wpbody-content,#wpcontent{padding:0 !important;position:relative}#wpfooter{display:none !important}.wp-toolbar:has(.just-connected-message){background:#fafbff}ul#adminmenu>li.current>a.current:after{border-right-color:#fafbff}.btn.btn-plugin-primary{display:inline-flex;align-items:center;padding:8px 24px 8px 24px;border-radius:24px;border:1px solid;font-size:16px;line-height:24px;height:40px}.trv-admin-panel{position:relative;display:table !important;height:100%;width:100%}.trv-header{height:56px;display:flex;flex-direction:row;flex:0 0 56px;align-items:center;justify-content:end;padding-left:15px;padding-right:15px;background:#fcfdff;box-shadow:0 4px 16px #e6efff;z-index:600;position:sticky;top:32px}@media screen and (max-width: 599px){.trv-header{top:0}}.trv-header .disconnect-link .icon{display:none}@media screen and (max-width: 599px){.trv-header .disconnect-link{margin-left:16px;padding:0;width:40px;height:40px;display:flex;justify-content:center;align-items:center}.trv-header .disconnect-link__text{display:none}.trv-header .disconnect-link .icon{display:initial}}main.trv-main{padding:40px 55px;transition:padding .5s ease-in-out;min-height:calc(100% - 120px);display:flex;flex-direction:column}@media screen and (max-width: 599px){main.trv-main{padding:20px 12px}}.signin-link{padding:8px 15px 8px 15px;font-size:18px;font-weight:600;line-height:24px;letter-spacing:0em;text-align:left;color:#202020;text-decoration:none;cursor:pointer}.signin-link:hover{color:#1399e7}.content{display:flex;flex-direction:column;max-width:none;align-items:center;margin:0 auto;padding-top:60px;transition:padding .5s ease-in-out;height:100%}@media screen and (max-width: 599px){.content{padding-top:0}}.content h1{font-size:32px;font-weight:700;line-height:40px;text-align:center;color:#202020;padding:0;margin:0 0 15px 0}.content h1 img{margin-right:16px;transition:margin-right .5s ease-in-out;vertical-align:middle}.content h1 .primary-title:after{content:" "}@media screen and (max-width: 599px){.content h1 img{margin-right:4px}.content h1 .primary-title{display:flex;align-items:center;justify-content:center;margin-bottom:16px}.content h1 .primary-title:after{content:"";display:none}}.subheader{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;row-gap:16px;-moz-column-gap:32px;column-gap:32px;padding:0;margin:0 0 32px 0}.subheader li{display:flex;flex-direction:row;align-items:center;line-height:26px;list-style-type:none;font-size:20px;font-weight:600;color:#202020}.subheader li:before{content:url(../../assets/images/list-marker.svg);margin-right:13px;height:26px;line-height:26px}.products-list{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;gap:16px;max-width:855px;margin-bottom:80px}.products-list{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;gap:16px;max-width:855px;margin-bottom:80px}.products-list__item{width:168px;height:168px;display:flex;flex-direction:column;justify-content:end;align-items:center;gap:9px;color:#3b507d}@media screen and (max-width: 599px){.products-list__item{width:156px}}.products-list__item:hover{color:#1399e7}.products-list__item:focus{outline:0;box-shadow:none}.products-list__item span{font-size:18px;font-weight:600;line-height:24px;flex:0 0 24px}.get-started{padding:16px 24px 16px 24px;border-radius:40px;border:none;background:#ff9a00;color:#fff;font-size:18px;font-weight:600;line-height:24px;letter-spacing:0em;text-align:center;cursor:pointer}.get-started:hover,.get-started:active,.get-started:focus{background-color:#f59700}.get-started:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}#trv-spinner{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;justify-content:center;flex-direction:column;align-items:center;opacity:.7;background:#fff;z-index:99999}#trv-spinner .spinner.global{display:none}#trv-spinner.global{opacity:1}#trv-spinner.global .spinner-border{display:none}#trv-spinner.global .spinner.global{display:flex}#trv-spinner,#trv-spinner .spinner{transition:opacity .7s ease-out}#trv-spinner.hiding{opacity:1;display:none}#trv-spinner.hiding .spinner{opacity:.7}.welcome-message{font-size:18px;font-weight:600;flex:1;transition:font-size .5s ease-in-out}@media screen and (max-width: 599px){.welcome-message{font-size:14px}}.content-products{display:flex;flex-direction:row;flex-wrap:wrap;align-items:start;align-content:start;gap:20px}.content-products product-tile{width:377px;flex:0 0 377px;transition:width .5s ease-in-out;border:1px solid #dbdbdb;border-radius:8px;height:200px;background:#fff;display:flex;flex-direction:column}.content-products product-tile header{display:flex;flex-direction:row;align-items:center;margin:0 0 16px 0;padding:16px 16px 0 16px}.content-products product-tile header img{height:48px;margin-right:8px}.content-products product-tile header h1{flex:1;font-size:24px;font-weight:700;padding:0;margin:0;color:#3b507d}.content-products product-tile main{padding:16px 16px 0 16px;font-size:14px;font-weight:500;line-height:20px;color:#7b828e;flex:1}.content-products product-tile connectable-menu .integration-menu-toggle{height:52px;width:100%;font-size:14px;font-weight:600;line-height:20px;color:#3b507d;display:flex;flex-direction:row;justify-content:center;align-items:center;border-radius:0 0 8px 8px}.content-products product-tile connectable-menu .integration-menu-toggle .icon{font-size:16px;color:#3b507d;margin-left:18px}.content-products product-tile connectable-menu .integration-menu-toggle:hover,.content-products product-tile connectable-menu .integration-menu-toggle:focus,.content-products product-tile connectable-menu .integration-menu-toggle:hover .icon,.content-products product-tile connectable-menu .integration-menu-toggle:focus .icon{color:#12a3f8;background:rgba(0,0,0,0)}.content-products product-tile connectable-menu .dropdown .dropdown-menu.connectable-dropdown{margin-top:4px !important;margin-left:-1px !important;width:100%;padding:3px 0}.content-products product-tile connectable-menu .dropdown.show .dropdown-menu{display:block}.content-products product-tile connectable-menu .integration-menu{margin:0;padding:0;max-height:250px;overflow:auto}.content-products product-tile connectable-menu .connectable-item{display:flex;flex-direction:row;align-items:center;height:50px;padding:0 12px 0 12px;margin-bottom:0}.content-products product-tile connectable-menu .connectable-item:hover{background:rgba(0,0,0,0)}.content-products product-tile connectable-menu .connectable-item.empty{color:#7b828e}.content-products product-tile connectable-menu .connectable-item__status{content:"";width:8px;height:8px;border-radius:4px;display:block;margin-right:12px;flex:0 0 8px}.content-products product-tile connectable-menu .connectable-item__status--active{background:#3ccd68}.content-products product-tile connectable-menu .connectable-item__status--disabled{background:#dbdbdb}.content-products product-tile connectable-menu .connectable-item__status--pending{background:#ff9a00}.content-products product-tile connectable-menu .connectable-item__name{flex:1 1 auto;font-size:16px;font-weight:500;line-height:24px}.content-products product-tile connectable-menu .connectable-item .btn.btn-icon{padding:8px;margin-left:7px}.content-products product-tile connectable-menu .connectable-item .btn.btn-icon .icon{font-size:16px}@media screen and (max-width: 599px){.content-products{flex-direction:column;flex-wrap:nowrap}.content-products product-tile{width:100%;flex:0 0 auto}}.access-denied{flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center}.access-denied h1{font-size:40px;transition:font-size .5s ease-in-out;font-weight:700;line-height:48px;text-align:center;margin-bottom:8px}@media screen and (max-width: 599px){.access-denied h1{font-size:32px}}.access-denied section{font-size:18px;font-weight:500;line-height:28px;text-align:center;margin-bottom:64px;transition:margin-bottom .5s ease-in-out}@media screen and (max-width: 599px){.access-denied section{margin-bottom:40px}}.access-denied img{max-width:318px;width:100%}.rotatable{transition:transform .5s ease-in-out}.integration-menu-toggle.show .rotatable{transform:rotate(180deg)}.btn-icon{position:relative}.content-products product-tile connectable-menu .connectable-item .btn.btn-icon .done .icon{font-size:12px;color:#fff}.done{position:absolute;left:0;right:0;top:0;bottom:0;display:flex;flex-direction:row;justify-content:center;align-items:center;display:none}.done.show{display:flex}.done__body{display:flex;flex-direction:row;justify-content:center;align-items:center;border-radius:50%;animation:doneEnter .5s cubic-bezier(0.895, 0.03, 0.685, 0.22) forwards}.done .icon{font-size:12px;opacity:1;transform:scale(0);color:#fff;animation:iconEnter .3s cubic-bezier(1, 0.008, 0.565, 1.65) .1s 1 forwards}@keyframes doneEnter{0%{width:75%;height:75%;opacity:.1}30%{width:100%;height:100%;background:#4ad173;opacity:.6}60%{width:100%;height:100%;background:#4ad173;opacity:.8}100%{width:100%;height:100%;background:#4ad173;opacity:1}}@keyframes iconEnter{from{opacity:0;transform:scale(0.3)}to{opacity:1;transform:scale(1)}}.trv-footer a{font-size:16px;font-weight:600;line-height:24px}footer.main-footer{padding:0 55px;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;align-items:center;row-gap:20px;-moz-column-gap:32px;column-gap:32px;margin-top:32px;margin-bottom:24px}footer.main-footer a{line-height:24px;font-size:16px;font-weight:600}.modal-dialog-no-min-height .modal-content,.modal-dialog-no-min-height .modal-body{min-height:0 !important}.just-connected-message{padding:40px 55px;transition:padding .5s ease-in-out;position:absolute;top:56px;bottom:0;left:0;right:0;z-index:500;background:#fafbff;display:none;flex-direction:column;align-items:center;justify-content:center}@media screen and (max-width: 599px){.just-connected-message{padding:32px 12px}}.just-connected-message__text{font-size:24px;font-weight:700;line-height:32px;max-width:843px;text-align:center;margin-top:40px}@keyframes slideDownAndUp{0%{transform:translateY(-100%);opacity:0}50%{transform:translateY(0%);opacity:1}100%{transform:translateY(-100%);opacity:0}}@keyframes slideUpAndDown{0%{transform:translateY(100%);opacity:0}50%{transform:translateY(0%);opacity:1}100%{transform:translateY(100%);opacity:0}}.just-connected-message .img-animation-target{animation:slideDownAndUp 3s ease forwards}.just-connected-message .text-animation-target{animation:slideUpAndDown 3s ease forwards}.action-icon-wrapper{min-width:32px;min-height:32px;border-radius:50%;font-weight:600;display:flex;align-items:center;justify-content:center;color:#7b828e;cursor:pointer;margin-right:12px}.action-icon-wrapper:hover{background-color:#f2f5f7}.action-icon-wrapper .icon{font-size:24px}.tooltip.show{opacity:1}.tooltip .tooltip-arrow{display:none}.tooltip .tooltip-inner{padding:8px 12px;border-radius:4px;background-color:#fff;color:#202020;font-size:13px;box-shadow:0px 0px 2px rgba(0,0,0,.1),0px 4px 16px rgba(0,0,0,.2)}.btn:not(.btn-link).btn-save{padding:8px 25px;font-weight:700}.notification-panel{margin:0}.notification-panel .notification-panel-content .text a{font-weight:500}.form-group{margin-top:20px}input[type=checkbox].switchbox:checked::before,input[type=checkbox].switchbox.checked::before{transform:translate(15px, 0);left:3px;top:5px}.modal-dialog .modal-content .modal-header .close-btn{background-color:#f2f5f7;border-radius:50%;font-size:18px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:#202020;border:0;position:absolute;right:8px;top:8px}
  • truvisibility-all-in-one-marketing-suite/trunk/admin/css/truvisibility-platform-font.css

    r3067294 r3128069  
    11@font-face {
    22  font-family: 'truintegrations';
    3   src:  url('fonts/truintegrations.eot?93qa3g');
    4   src:  url('fonts/truintegrations.eot?93qa3g#iefix') format('embedded-opentype'),
    5     url('fonts/truintegrations.ttf?93qa3g') format('truetype'),
    6     url('fonts/truintegrations.woff?93qa3g') format('woff'),
    7     url('fonts/truintegrations.svg?93qa3g#truintegrations') format('svg');
     3  src:  url('fonts/truintegrations.eot?vdoffa');
     4  src:  url('fonts/truintegrations.eot?vdoffa#iefix') format('embedded-opentype'),
     5    url('fonts/truintegrations.ttf?vdoffa') format('truetype'),
     6    url('fonts/truintegrations.woff?vdoffa') format('woff'),
     7    url('fonts/truintegrations.svg?vdoffa#truintegrations') format('svg');
    88  font-weight: normal;
    99  font-style: normal;
     
    4141  content: "\e983";
    4242}
     43.icon-settings:before {
     44  content: "\e900";
     45}
     46.icon-info:before {
     47  content: "\e901";
     48}
     49.icon-close:before {
     50  content: "\e902";
     51}
  • truvisibility-all-in-one-marketing-suite/trunk/admin/js/truvisibility-platform-admin.js

    r3067294 r3128069  
    3737            }
    3838        }
    39     );
     39    ); 
    4040})(jQuery);
     41
     42jQuery(document).ready(function() {
     43    jQuery("body").tooltip({ selector: '[data-bs-toggle=tooltip]' });
     44});
    4145
    4246function redirectTo(url) {
     
    4953}
    5054
    51 function copyToClipboard(text) {
    52     var aux = document.createElement("div");
    53     aux.setAttribute("contentEditable", true);
    54     aux.innerHTML = text;
    55     aux.setAttribute("onfocus", "document.execCommand('selectAll',false,null)");
    56     document.body.appendChild(aux);
    57     aux.focus();
     55function copyToClipboard(value) {
     56    if (!navigator.clipboard) {
     57        this.fallbackCopy(value);
     58        return;
     59    }
     60
     61    navigator.clipboard.writeText(value).then(() => {
     62        // do nothing
     63    }, err => {
     64        this.fallbackCopy(value);
     65    });
     66}
     67
     68function fallbackCopy(value) {
     69    const textArea = document.createElement("textarea");
     70    textArea.innerHTML = value;
     71    textArea.style.position = "fixed";
     72    document.body.appendChild(textArea);
     73    textArea.focus();
     74    textArea.select();
    5875    document.execCommand("copy");
    59     document.body.removeChild(aux);
     76
     77    document.body.removeChild(textArea);
    6078}
    6179
     
    130148    jQuery("#trv-spinner").toggleClass("global", isGlobal);
    131149}
     150
     151function toggleGdpr(e) {
     152    document.getElementById('privacyInput').disabled = !e.target.checked;
     153    enableSaveGdpr();
     154}
     155
     156function saveGdprSettings() {
     157    setLoading(true, false);
     158   
     159    trv_config.gdprEnabled = jQuery('#chkGdprEnabled').prop('checked');
     160    trv_config.gdprPrivacyUrl = jQuery('#privacyInput').val();
     161
     162    closeModal('settings-modal');
     163    jQuery.ajax({
     164        url: trv_config.apiUrl + 'truvisibility/v1/save-gdpr-settings',
     165        method: 'POST',
     166        contentType: 'application/json; charset=utf-8',
     167        dataType: "json",
     168        data: JSON.stringify({
     169            'gdpr_enabled': trv_config.gdprEnabled,
     170            'gdpr_privacy_url': trv_config.gdprPrivacyUrl
     171        }),     
     172        beforeSend: function (xhr) {
     173            xhr.setRequestHeader('X-WP-Nonce', trv_config.apiNonce);
     174        }
     175    }).always(function() {
     176        setLoading(false, false);
     177    });
     178}
     179
     180function enableSaveGdpr() {
     181    jQuery('#saveGdprBtn').removeAttr('disabled');
     182}
     183
     184jQuery('#settings-modal').on('hidden.bs.modal', function (e) {
     185    jQuery('#chkGdprEnabled').prop('checked', trv_config.gdprEnabled);
     186    jQuery('#privacyInput').val(trv_config.gdprPrivacyUrl);
     187    jQuery('#saveGdprBtn').prop('disabled', 'disabled');
     188})
  • truvisibility-all-in-one-marketing-suite/trunk/admin/views/main.php

    r3067294 r3128069  
    1616?>
    1717
    18 <div class="trv-admin-panel">
     18<div class="trv-admin-panel" style="display: none;">
    1919  <?php TruVisibility_Platform_Admin::view( 'loading' ); ?>
    2020
     
    118118    </div> 
    119119  </div>
     120
     121  <!-- Modal -->
     122  <?php TruVisibility_Platform_Admin::view( 'settings-modal', 
     123            array(
     124                'gdprEnabled' => $gdprEnabled,
     125                'gdprPrivacyUrl' => $gdprPrivacyUrl
     126                ));
     127        ?>
    120128</div>
  • truvisibility-all-in-one-marketing-suite/trunk/admin/views/unauthorized.php

    r3067294 r3128069  
    1919?>
    2020
    21 <div class="trv-admin-panel">
     21<div class="trv-admin-panel" style="display: none;">
    2222    <?php TruVisibility_Platform_Admin::view( 'loading' ); ?>
    2323
  • truvisibility-all-in-one-marketing-suite/trunk/admin/views/user-info-header.php

    r3067294 r3128069  
    44  <?php esc_html_e('TruVISIBILITY Plugin connected to ','truvisibility-platform'); echo esc_html($user_name); ?>
    55</span>
    6 <a class="disconnect-link btn-plugin-primary btn btn-outline-primary text-nowrap text-truncate" data-bs-toggle="modal" data-bs-target="#disconnect-modal"><!--  onclick="openModal()"-->
     6
     7
     8<span data-bs-toggle="modal" data-bs-target="#settings-modal">
     9  <span class="action-icon-wrapper" title="<?php esc_html_e('Settings','truvisibility-platform'); ?>"
     10    data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-offset="0,5" data-bs-trigger="hover">
     11    <span class="icon icon-settings"></span>
     12  </span>
     13</span>
     14
     15<a class="disconnect-link btn-plugin-primary btn btn-outline-primary text-nowrap text-truncate" data-bs-toggle="modal" data-bs-target="#disconnect-modal">
    716  <span class="disconnect-link__text"><?php esc_html_e('Disconnect Plugin','truvisibility-platform'); ?></span>
    817  <span class="icon icon-unlink"></span>
  • truvisibility-all-in-one-marketing-suite/trunk/config/class-truvisibility-platform-config.php

    r3069420 r3128069  
    55    const PLUGIN_NAME = 'truvisibility-platform';
    66
    7     const PLUGIN_VERSION = '1.0.1';
     7    const PLUGIN_VERSION = '1.1.0';
    88
    99    const CLIENT_ACCESS_TOKEN_OPTION = 'truvisibility_platform_client_access_token';
     
    1212
    1313    const SERVER_ACCESS_TOKEN_OPTION = 'truvisibility_platform_server_access_token';
    14     const SERVER_REFRESH_TOKEN_OPTION = 'truvisibility_platform_server_refresh_token';
    15     const SERVER_ACCESS_TOKEN_EXPIRES_OPTION = 'truvisibility_platform_server_expires';   
     14    const SERVER_REFRESH_TOKEN_OPTION = 'truvisibility_platform_server_refresh_token';
     15    const SERVER_ACCESS_TOKEN_EXPIRES_OPTION = 'truvisibility_platform_server_expires';   
     16   
     17    const GDPR_ENABLED = 'truvisibility_platform_gdpr_enabled';
     18    const GDPR_PRIVACY_URL = 'truvisibility_platform_gdpr_privacy_url';
     19   
     20    const ACTIVATION_REDIRECT_OPTION = 'truvisibility_platform_activation_redirect';
    1621
    1722    public static $TvUmbrellaRoot         = 'truvisibility.com';
  • truvisibility-all-in-one-marketing-suite/trunk/includes/class-truvisibility-platform-activator.php

    r3069416 r3128069  
    2929
    3030        update_option(TruVisibility_Platform_Config::CLIENT_ACCESS_TOKEN_OPTION, md5(uniqid(wp_rand(), true)));
    31         wp_redirect(admin_url('admin.php?page=' . TruVisibility_Platform_Config::PLUGIN_NAME));
     31        add_option(TruVisibility_Platform_Config::ACTIVATION_REDIRECT_OPTION, true);
    3232    }
    3333
  • truvisibility-all-in-one-marketing-suite/trunk/includes/class-truvisibility-platform-deactivator.php

    r3069416 r3128069  
    3434
    3535        delete_option(TruVisibility_Platform_Config::CLIENT_ACCESS_TOKEN_OPTION);
     36        delete_option(TruVisibility_Platform_Config::ACTIVATION_REDIRECT_OPTION);
    3637    }
    3738
  • truvisibility-all-in-one-marketing-suite/trunk/includes/class-truvisibility-platform-integration-state.php

    r3067294 r3128069  
    9494    }
    9595
     96    /**
     97     * @return bool
     98     */
     99    public function is_gdpr_enabled()
     100    {
     101        return boolval(get_option(TruVisibility_Platform_Config::GDPR_ENABLED, false));
     102    }
     103
     104    /**
     105     * @return string|null
     106     */
     107    public function get_gdpr_privacy_url()
     108    {
     109        return get_option(TruVisibility_Platform_Config::GDPR_PRIVACY_URL, null);
     110    }
     111
    96112    public function save_auth($access_token, $refresh_token, $expires_in)
    97113    {
     
    136152        delete_option(TruVisibility_Platform_Config::SERVER_REFRESH_TOKEN_OPTION);
    137153        delete_option(TruVisibility_Platform_Config::SERVER_ACCESS_TOKEN_EXPIRES_OPTION);
     154        delete_option(TruVisibility_Platform_Config::GDPR_ENABLED);
     155        delete_option(TruVisibility_Platform_Config::GDPR_PRIVACY_URL);
     156    }
     157
     158    public function save_gdpr_settings($gdpr_enabled, $gdpr_privacy_url)
     159    {
     160        update_option(TruVisibility_Platform_Config::GDPR_ENABLED, boolval($gdpr_enabled));
     161        update_option(TruVisibility_Platform_Config::GDPR_PRIVACY_URL, $gdpr_privacy_url);
    138162    }
    139163
     
    225249    {
    226250        $this->api_client->update_server_access_token($this->get_server_access_token());
    227         return $this->api_client->get_current_user();
     251        $account_id = $this->get_account_id();
     252        $current_user = $this->api_client->get_current_user();
     253        if ($current_user && empty($account_id)) {
     254            $this->connect_account($current_user->account_id, $this->get_server_access_token());
     255        }
     256        return $current_user;
    228257    }
    229258
  • truvisibility-all-in-one-marketing-suite/trunk/includes/class-truvisibility-platform.php

    r3069416 r3128069  
    198198        $this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts');
    199199        $this->loader->add_action('admin_menu', $plugin_admin, 'register_admin_menu');
     200        $this->loader->add_action('admin_init', $plugin_admin, 'activation_redirect');
    200201        $this->loader->add_action('init', $plugin_admin, 'register_form_block');
    201202        $this->loader->add_action('enqueue_block_assets', $plugin_admin, 'register_block_assets');
  • truvisibility-all-in-one-marketing-suite/trunk/languages/truvisibility-platform-ru_RU-dfbff627e6c248bcb3b61d7d06da9ca9.json

    r3067294 r3128069  
    1 {"translation-revision-date":"2024-03-27 14:05+0300","generator":"WP-CLI\/2.8.1","source":"build\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"ru_RU","plural-forms":"nplurals=2; plural=(n != 1);"},"TruVISIBILITY":["TruVISIBILITY"],"Connect Plugin":["\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u041f\u043b\u0430\u0433\u0438\u043d"],"There are no forms created yet.":[""],"TruVISIBILITY Forms":["TruVISIBILITY \u0424\u043e\u0440\u043c\u044b"],"Select A Form...":["\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u043e\u0440\u043c\u0443..."],"Your TruVISIBILITY plugin isn\u2019t connected":["\u0412\u0430\u0448  TruVISIBILITY \u043f\u043b\u0430\u0433\u0438\u043d \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d"],"Please login to your account and connect your TruVISIBILITY plugin.":["\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u043e\u0439\u0434\u0438\u0442\u0435 \u0432 \u0441\u0432\u043e\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435 TruVISIBILITY \u043f\u043b\u0430\u0433\u0438\u043d."]}}}
     1{"translation-revision-date":"2024-04-15 12:35+0300","generator":"WP-CLI\/2.8.1","source":"build\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"ru_RU","plural-forms":"nplurals=2; plural=(n != 1);"},"TruVISIBILITY":["TruVISIBILITY"],"Connect Plugin":["\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u041f\u043b\u0430\u0433\u0438\u043d"],"There are no forms created yet.":["\u0424\u043e\u0440\u043c\u044b \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u044b"],"TruVISIBILITY Forms":["TruVISIBILITY \u0424\u043e\u0440\u043c\u044b"],"Select A Form...":["\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u043e\u0440\u043c\u0443..."],"Your TruVISIBILITY plugin isn\u2019t connected":["\u0412\u0430\u0448 \u043f\u043b\u0430\u0433\u0438\u043d TruVISIBILITY \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d"],"Please login to your account and connect your TruVISIBILITY plugin.":["\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u043e\u0439\u0434\u0438\u0442\u0435 \u0432 \u0441\u0432\u043e\u044e \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u043f\u043b\u0430\u0433\u0438\u043d TruVISIBILITY."]}}}
  • truvisibility-all-in-one-marketing-suite/trunk/languages/truvisibility-platform-ru_RU.po

    r3067294 r3128069  
    88"Content-Type: text/plain; charset=UTF-8\n"
    99"Content-Transfer-Encoding: 8bit\n"
    10 "POT-Creation-Date: 2024-03-27T11:59:35+01:00\n"
    11 "PO-Revision-Date: 2024-03-27 14:05+0300\n"
     10"POT-Creation-Date: 2024-04-15T11:26:17+02:00\n"
     11"PO-Revision-Date: 2024-04-15 12:35+0300\n"
    1212"Language: ru_RU\n"
    1313"X-Generator: Poedit 3.3.2\n"
     
    3333#: admin/class-truvisibility-platform-admin.php:124
    3434#: admin/views/loading.php:9
    35 #: admin/views/unauthorized.php:38
     35#: admin/views/unauthorized.php:34
    3636#: build/index.js:1
    3737msgid "TruVISIBILITY"
    3838msgstr "TruVISIBILITY"
    3939
    40 #: admin/views/main.php:36
     40#: admin/class-truvisibility-platform-admin.php:256
     41msgid "Embedded Widget"
     42msgstr "Встроенный виджет"
     43
     44#: admin/class-truvisibility-platform-admin.php:259
     45#: admin/class-truvisibility-platform-admin.php:282
     46msgid "Copy"
     47msgstr "Копировать"
     48
     49#: admin/views/main.php:32
    4150msgid "Chat"
    4251msgstr "Чат"
    4352
    44 #: admin/views/main.php:37
     53#: admin/views/main.php:33
    4554msgid "Add a chatbot or Live Chat."
    4655msgstr "Добавить чат-бота или чат в реальном времени."
    4756
    48 #: admin/views/main.php:39
     57#: admin/views/main.php:35
    4958msgid "Select chat widget to copy shortcode"
    5059msgstr "Выберите чат для копирования шорткода"
    5160
    52 #: admin/views/main.php:40
     61#: admin/views/main.php:36
    5362msgid "Create A Chat Widget"
    5463msgstr "Создайте чат-виджет"
    5564
    56 #: admin/views/main.php:47
    57 #: admin/views/unauthorized.php:103
     65#: admin/views/main.php:43
     66#: admin/views/unauthorized.php:99
    5867msgid "Forms"
    5968msgstr "Формы"
    6069
    61 #: admin/views/main.php:48
     70#: admin/views/main.php:44
    6271msgid "Utilize Forms on your website."
    6372msgstr "Используйте формы на вашем сайте."
    6473
    65 #: admin/views/main.php:50
     74#: admin/views/main.php:46
    6675msgid "Select form widget to copy shortcode"
    6776msgstr "Выберите форму для копирования шорткода"
    6877
    69 #: admin/views/main.php:51
     78#: admin/views/main.php:47
    7079msgid "Create a New Form"
    7180msgstr "Создайте форму"
    7281
    73 #: admin/views/main.php:58
    74 #: admin/views/unauthorized.php:78
     82#: admin/views/main.php:54
     83#: admin/views/unauthorized.php:74
    7584msgid "CRM"
    7685msgstr "CRM"
    7786
    78 #: admin/views/main.php:59
     87#: admin/views/main.php:55
    7988msgid "Manage your customer lists."
    8089msgstr "Управляйте вашими списками клиентов."
    8190
    82 #: admin/views/main.php:66
     91#: admin/views/main.php:62
    8392msgid "Messaging"
    8493msgstr "Маркетинг"
    8594
    86 #: admin/views/main.php:67
     95#: admin/views/main.php:63
    8796msgid "Send email messages to your customers."
    8897msgstr "Отправляйте письма своим покупателям."
    8998
    90 #: admin/views/main.php:74
     99#: admin/views/main.php:70
    91100msgid "Connection denied"
    92101msgstr "В подключении отказано"
    93102
    94 #: admin/views/main.php:77
     103#: admin/views/main.php:73
    95104msgid "Please contact your account administrator"
    96105msgstr "Пожалуйста, обратитесь к администратору аккаунта"
    97106
    98 #: admin/views/main.php:88
     107#: admin/views/main.php:84
    99108msgid " is now connected to the TruVISIBILITY All-In-One Digital Marketing Suite"
    100109msgstr " подключен к TruVISIBILITY"
    101110
    102 #: admin/views/main.php:97
     111#: admin/views/main.php:93
    103112msgid "Go To Your TruVISIBILITY Account"
    104113msgstr "В аккаунт TruVISIBILITY"
    105114
    106 #: admin/views/main.php:100
     115#: admin/views/main.php:96
    107116msgid "Go To TruVISIBILITY Support"
    108117msgstr "В Базу знаний"
    109118
    110 #: admin/views/main.php:111
     119#: admin/views/main.php:107
    111120msgid "Disconnect the TruVISIBILITY Plugin"
    112121msgstr "Отключить Плагин TruVISIBILITY"
    113122
    114 #: admin/views/main.php:115
     123#: admin/views/main.php:111
    115124msgid "By disconnecting the TruVISIBILITY plugin it will remove the connection between TruVISIBILITY and this WordPress website. The existing data held in your TruVISIBILITY account will remain available. New data will no longer be added to your TruVISIBILITY Account."
    116125msgstr "При отключении плагина соединение между TruVISIBILITY и WordPress-сайтом будет разорвано. Существующие данные в вашем аккаунте TruVISIBILITY сохранятся. Новые данные с этого сайта перестанут поступать в ваш аккаунт TruVISIBILITY."
    117126
    118 #: admin/views/main.php:118
     127#: admin/views/main.php:114
    119128msgid "Cancel"
    120129msgstr "Отменить"
    121130
    122 #: admin/views/main.php:119
     131#: admin/views/main.php:115
    123132msgid "Disconnect"
    124133msgstr "Отключить"
     
    128137msgstr "Управление"
    129138
     139#: admin/views/settings-modal.php:8
     140#: admin/views/user-info-header.php:9
     141msgid "Settings"
     142msgstr "Настройки"
     143
     144#: admin/views/settings-modal.php:21
     145msgid "You can read more about GDPR in our "
     146msgstr "Вы можете прочитать больше о GDPR в нашей "
     147
     148#: admin/views/settings-modal.php:23
     149msgid "Article."
     150msgstr "Статье"
     151
     152#: admin/views/settings-modal.php:33
     153msgid "GDPR"
     154msgstr "GDPR"
     155
     156#: admin/views/settings-modal.php:40
     157msgid "Privacy Policy URL"
     158msgstr "Privacy Policy URL"
     159
     160#: admin/views/settings-modal.php:45
     161msgid "Enter URL"
     162msgstr "Введите URL"
     163
     164#: admin/views/settings-modal.php:53
     165msgid "Save"
     166msgstr "Сохранить"
     167
    130168#: admin/views/signin-link-header.php:3
    131169msgid "Sign In"
    132170msgstr "Войти"
    133171
    134 #: admin/views/unauthorized.php:43
     172#: admin/views/unauthorized.php:39
    135173msgid "Digital Marketing Suite"
    136174msgstr "Инструменты для диджитал-маркетинга"
    137175
    138 #: admin/views/unauthorized.php:49
     176#: admin/views/unauthorized.php:45
    139177msgid "No Monthly Fees"
    140178msgstr "Без ежемесячных платежей"
    141179
    142 #: admin/views/unauthorized.php:52
     180#: admin/views/unauthorized.php:48
    143181msgid "No Credit Card Required"
    144182msgstr "Не нужно привязывать карту"
    145183
    146 #: admin/views/unauthorized.php:60
     184#: admin/views/unauthorized.php:56
    147185msgid "Sites/Blogs"
    148186msgstr "Сайты/Блоги"
    149187
    150 #: admin/views/unauthorized.php:66
     188#: admin/views/unauthorized.php:62
    151189msgid "Landing Pages"
    152190msgstr "Лендинги"
    153191
    154 #: admin/views/unauthorized.php:72
     192#: admin/views/unauthorized.php:68
    155193msgid "Email Automation"
    156194msgstr "Маркетинг"
    157195
    158 #: admin/views/unauthorized.php:84
     196#: admin/views/unauthorized.php:80
    159197msgid "Live Chat"
    160198msgstr "Чаты"
    161199
    162 #: admin/views/unauthorized.php:90
     200#: admin/views/unauthorized.php:86
    163201msgid "Chatbots"
    164202msgstr "Чат-боты"
    165203
    166 #: admin/views/unauthorized.php:96
     204#: admin/views/unauthorized.php:92
    167205msgid "Drive"
    168206msgstr "Диск"
    169207
    170 #: admin/views/unauthorized.php:108
     208#: admin/views/unauthorized.php:104
    171209#: build/index.js:1
    172210msgid "Connect Plugin"
     
    177215msgstr "TruVISIBILITY плагин подключен к "
    178216
    179 #: admin/views/user-info-header.php:7
     217#: admin/views/user-info-header.php:16
    180218msgid "Disconnect Plugin"
    181219msgstr "Отключить Плагин"
  • truvisibility-all-in-one-marketing-suite/trunk/languages/truvisibility-platform.pot

    r3067294 r3128069  
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2024-03-27T11:59:35+01:00\n"
     12"POT-Creation-Date: 2024-04-15T11:26:17+02:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.8.1\n"
     
    3434#: admin/class-truvisibility-platform-admin.php:124
    3535#: admin/views/loading.php:9
    36 #: admin/views/unauthorized.php:38
     36#: admin/views/unauthorized.php:34
    3737#: build/index.js:1
    3838msgid "TruVISIBILITY"
    3939msgstr ""
    4040
     41#: admin/class-truvisibility-platform-admin.php:256
     42msgid "Embedded Widget"
     43msgstr ""
     44
     45#: admin/class-truvisibility-platform-admin.php:259
     46#: admin/class-truvisibility-platform-admin.php:282
     47msgid "Copy"
     48msgstr ""
     49
     50#: admin/views/main.php:32
     51msgid "Chat"
     52msgstr ""
     53
     54#: admin/views/main.php:33
     55msgid "Add a chatbot or Live Chat."
     56msgstr ""
     57
     58#: admin/views/main.php:35
     59msgid "Select chat widget to copy shortcode"
     60msgstr ""
     61
    4162#: admin/views/main.php:36
    42 msgid "Chat"
    43 msgstr ""
    44 
    45 #: admin/views/main.php:37
    46 msgid "Add a chatbot or Live Chat."
    47 msgstr ""
    48 
    49 #: admin/views/main.php:39
    50 msgid "Select chat widget to copy shortcode"
    51 msgstr ""
    52 
    53 #: admin/views/main.php:40
    5463msgid "Create A Chat Widget"
    5564msgstr ""
    5665
     66#: admin/views/main.php:43
     67#: admin/views/unauthorized.php:99
     68msgid "Forms"
     69msgstr ""
     70
     71#: admin/views/main.php:44
     72msgid "Utilize Forms on your website."
     73msgstr ""
     74
     75#: admin/views/main.php:46
     76msgid "Select form widget to copy shortcode"
     77msgstr ""
     78
    5779#: admin/views/main.php:47
    58 #: admin/views/unauthorized.php:103
    59 msgid "Forms"
    60 msgstr ""
    61 
    62 #: admin/views/main.php:48
    63 msgid "Utilize Forms on your website."
    64 msgstr ""
    65 
    66 #: admin/views/main.php:50
    67 msgid "Select form widget to copy shortcode"
    68 msgstr ""
    69 
    70 #: admin/views/main.php:51
    7180msgid "Create a New Form"
    7281msgstr ""
    7382
    74 #: admin/views/main.php:58
    75 #: admin/views/unauthorized.php:78
     83#: admin/views/main.php:54
     84#: admin/views/unauthorized.php:74
    7685msgid "CRM"
    7786msgstr ""
    7887
    79 #: admin/views/main.php:59
     88#: admin/views/main.php:55
    8089msgid "Manage your customer lists."
    8190msgstr ""
    8291
    83 #: admin/views/main.php:66
     92#: admin/views/main.php:62
    8493msgid "Messaging"
    8594msgstr ""
    8695
    87 #: admin/views/main.php:67
     96#: admin/views/main.php:63
    8897msgid "Send email messages to your customers."
    8998msgstr ""
    9099
    91 #: admin/views/main.php:74
     100#: admin/views/main.php:70
    92101msgid "Connection denied"
    93102msgstr ""
    94103
    95 #: admin/views/main.php:77
     104#: admin/views/main.php:73
    96105msgid "Please contact your account administrator"
    97106msgstr ""
    98107
    99 #: admin/views/main.php:88
     108#: admin/views/main.php:84
    100109msgid " is now connected to the TruVISIBILITY All-In-One Digital Marketing Suite"
    101110msgstr ""
    102111
    103 #: admin/views/main.php:97
     112#: admin/views/main.php:93
    104113msgid "Go To Your TruVISIBILITY Account"
    105114msgstr ""
    106115
    107 #: admin/views/main.php:100
     116#: admin/views/main.php:96
    108117msgid "Go To TruVISIBILITY Support"
    109118msgstr ""
    110119
     120#: admin/views/main.php:107
     121msgid "Disconnect the TruVISIBILITY Plugin"
     122msgstr ""
     123
    111124#: admin/views/main.php:111
    112 msgid "Disconnect the TruVISIBILITY Plugin"
     125msgid "By disconnecting the TruVISIBILITY plugin it will remove the connection between TruVISIBILITY and this WordPress website. The existing data held in your TruVISIBILITY account will remain available. New data will no longer be added to your TruVISIBILITY Account."
     126msgstr ""
     127
     128#: admin/views/main.php:114
     129msgid "Cancel"
    113130msgstr ""
    114131
    115132#: admin/views/main.php:115
    116 msgid "By disconnecting the TruVISIBILITY plugin it will remove the connection between TruVISIBILITY and this WordPress website. The existing data held in your TruVISIBILITY account will remain available. New data will no longer be added to your TruVISIBILITY Account."
    117 msgstr ""
    118 
    119 #: admin/views/main.php:118
    120 msgid "Cancel"
    121 msgstr ""
    122 
    123 #: admin/views/main.php:119
    124133msgid "Disconnect"
    125134msgstr ""
     
    129138msgstr ""
    130139
     140#: admin/views/settings-modal.php:8
     141#: admin/views/user-info-header.php:9
     142msgid "Settings"
     143msgstr ""
     144
     145#: admin/views/settings-modal.php:21
     146msgid "You can read more about GDPR in our "
     147msgstr ""
     148
     149#: admin/views/settings-modal.php:23
     150msgid "Article."
     151msgstr ""
     152
     153#: admin/views/settings-modal.php:33
     154msgid "GDPR"
     155msgstr ""
     156
     157#: admin/views/settings-modal.php:40
     158msgid "Privacy Policy URL"
     159msgstr ""
     160
     161#: admin/views/settings-modal.php:45
     162msgid "Enter URL"
     163msgstr ""
     164
     165#: admin/views/settings-modal.php:53
     166msgid "Save"
     167msgstr ""
     168
    131169#: admin/views/signin-link-header.php:3
    132170msgid "Sign In"
    133171msgstr ""
    134172
    135 #: admin/views/unauthorized.php:43
     173#: admin/views/unauthorized.php:39
    136174msgid "Digital Marketing Suite"
    137175msgstr ""
    138176
    139 #: admin/views/unauthorized.php:49
     177#: admin/views/unauthorized.php:45
    140178msgid "No Monthly Fees"
    141179msgstr ""
    142180
    143 #: admin/views/unauthorized.php:52
     181#: admin/views/unauthorized.php:48
    144182msgid "No Credit Card Required"
    145183msgstr ""
    146184
    147 #: admin/views/unauthorized.php:60
     185#: admin/views/unauthorized.php:56
    148186msgid "Sites/Blogs"
    149187msgstr ""
    150188
    151 #: admin/views/unauthorized.php:66
     189#: admin/views/unauthorized.php:62
    152190msgid "Landing Pages"
    153191msgstr ""
    154192
    155 #: admin/views/unauthorized.php:72
     193#: admin/views/unauthorized.php:68
    156194msgid "Email Automation"
    157195msgstr ""
    158196
    159 #: admin/views/unauthorized.php:84
     197#: admin/views/unauthorized.php:80
    160198msgid "Live Chat"
    161199msgstr ""
    162200
    163 #: admin/views/unauthorized.php:90
     201#: admin/views/unauthorized.php:86
    164202msgid "Chatbots"
    165203msgstr ""
    166204
    167 #: admin/views/unauthorized.php:96
     205#: admin/views/unauthorized.php:92
    168206msgid "Drive"
    169207msgstr ""
    170208
    171 #: admin/views/unauthorized.php:108
     209#: admin/views/unauthorized.php:104
    172210#: build/index.js:1
    173211msgid "Connect Plugin"
     
    178216msgstr ""
    179217
    180 #: admin/views/user-info-header.php:7
     218#: admin/views/user-info-header.php:16
    181219msgid "Disconnect Plugin"
    182220msgstr ""
  • truvisibility-all-in-one-marketing-suite/trunk/public/utils/class-truvisibility-platform-shortcode-utils.php

    r3067294 r3128069  
    4444     *
    4545     * @param array $attrs Shortcode attributes.
    46      * 
     46     *
    4747     * https://chat.truVisibility.com/tracking.staging.js - javascript for chat operation
    48      * 
     48     *
    4949     */
    5050    private static function render_chat($attrs)
     
    7373                <script type="text/javascript">
    7474                    window.__tc = window.__tc || { };
    75                     window.__tc.channelId = "' . $id . '";
     75                    window.__tc.channelId = "' . $id . '";'
     76                    . self::gdpr_setting_for_chat() . '
    7677                    window.__tc.query = window.location.search;
    7778                    (function() {
     
    8485    }
    8586
     87    private static function gdpr_setting_for_chat()
     88    {
     89        $gdprEnabled = boolval(get_option(TruVisibility_Platform_Config::GDPR_ENABLED, false));
     90        if ($gdprEnabled) {
     91            $gdprPrivacyUrl = get_option(TruVisibility_Platform_Config::GDPR_PRIVACY_URL, "");
     92            return "
     93                    window.__tc.privacyPolicyUrl = '" . $gdprPrivacyUrl . "';";
     94        }
     95
     96        return "";
     97    }
     98
    8699    /**
    87100     * Render truvisibility form shortcodes
    88      * 
     101     *
    89102     * https://forms.truVisibility.com/static/scripts/embed.js - javascript for form operation
    90103     *
     
    108121        return '<div tru-forms-app-id="tfb-' . $id . '"></div>
    109122                <script src="https://forms.' . TruVisibility_Platform_Config::$TvUmbrellaRoot . '/static/scripts/embed.js" type="text/javascript"></script>
    110                 <script>TruForms.createApp("tfb-' . $id . '")</script>';
     123                <script>
     124                    window.__truForms = window.__truForms || {};
     125                    '
     126                    . self::gdpr_setting_for_form() .
     127                    '
     128                    TruForms.createApp("tfb-' . $id . '", window.__truForms.truFormsAppOptions);
     129                </script>';
     130    }
     131
     132    private static function gdpr_setting_for_form()
     133    {
     134        $gdprEnabled = boolval(get_option(TruVisibility_Platform_Config::GDPR_ENABLED, false));
     135        if ($gdprEnabled) {
     136            $gdprPrivacyUrl = get_option(TruVisibility_Platform_Config::GDPR_PRIVACY_URL, "");
     137            return "window.__truForms.truFormsAppOptions = {
     138                        gdprOptions: {
     139                            isGdprEnabled: true,
     140                            privacyPolicyUrl: '" . $gdprPrivacyUrl . "'
     141                        }
     142                    };";
     143        }
     144
     145        return "window.__truForms.truFormsAppOptions = {}";
    111146    }
    112147}
  • truvisibility-all-in-one-marketing-suite/trunk/services/class-truvisibility-platform-rest-api.php

    r3067294 r3128069  
    174174        )
    175175        );
     176
     177        register_rest_route('truvisibility/v1', '/get-gdpr-settings', array(
     178            'methods'             => 'GET',
     179            'permission_callback' => array($this, 'reset_auth_permissions'),
     180            'callback'            => array($this, 'get_gdpr_settings'),
     181        )
     182        );
     183
     184        register_rest_route('truvisibility/v1', '/save-gdpr-settings', array(
     185            'methods'             => 'POST',
     186            'permission_callback' => array($this, 'reset_auth_permissions'),
     187            'callback'            => array($this, 'save_gdpr_settings'),
     188        )
     189        );
    176190    }
    177191
     
    319333
    320334        $search_condition = "%" . $wpdb->esc_like($search) . "%";
    321        
    322         $ids      = $wpdb->get_results($wpdb->prepare("
     335
     336        $ids = $wpdb->get_results($wpdb->prepare("
    323337            SELECT posts.ID FROM $wpdb->posts as posts
    324338            LEFT JOIN $wpdb->term_relationships as term_relationships ON posts.ID = term_relationships.object_id
     
    409423    }
    410424
     425    public function save_gdpr_settings($request)
     426    {
     427        $this->integration_state->save_gdpr_settings($request->get_param('gdpr_enabled'), $request->get_param('gdpr_privacy_url'));
     428        wp_send_json_success(null, 200);
     429        die();
     430    }
     431
     432    public function get_gdpr_settings($request)
     433    {
     434        $return = array(
     435            'gdpr_enabled'    => $this->integration_state->is_gdpr_enabled(),
     436            'gdpr_privacy_url' => $this->integration_state->get_gdpr_privacy_url(),
     437        );
     438        wp_send_json_success($return);
     439        die();
     440    }
     441
    411442    public function reset_auth_permissions()
    412443    {
  • truvisibility-all-in-one-marketing-suite/trunk/truvisibility-platform.php

    r3069419 r3128069  
    1010 * Plugin Name:       TruVISIBILITY All-In-One Marketing Suite
    1111 * Description:       The TruVISIBILITY Plugin integrates your website with their all-in-one Marketing Suite featuring a CRM, Email Automation, Forms, & Live Chat/Chatbots.
    12  * Version:           1.0.1
     12 * Version:           1.1.0
    1313 * Author:            TruVisibility, LLC
    1414 * Author URI:        https://truvisibility.com
Note: See TracChangeset for help on using the changeset viewer.