Version Description
- Security: check admin role in widget create function
- Improve: initial Google reviews connection
- Improve: redirect to a widget builder page after plugin's activation
- Some language fixes
Download this release
Release Info
Developer | richplugins |
Plugin | Google Reviews Widget |
Version | 2.2.3 |
Comparing to | |
See all releases |
Code changes from version 2.2.2 to 2.2.3
- assets/css/admin-main.css +1 -1
- assets/js/admin-main.js +4 -4
- assets/src/css/admin-main.css +20 -4
- assets/src/js/admin-builder.js +13 -7
- grw.php +2 -2
- includes/admin/class-admin-rev.php +4 -4
- includes/admin/class-admin-tophead.php +6 -1
- includes/class-activator.php +1 -0
- includes/class-builder-page.php +1 -2
- includes/class-feed-serializer.php +7 -0
- includes/class-plugin.php +10 -0
- languages/widget-google-reviews-cs_CZ.mo +0 -0
- languages/widget-google-reviews-cs_CZ.po +11 -8
- languages/widget-google-reviews-it_IT.mo +0 -0
- languages/widget-google-reviews-it_IT.po +10 -7
- readme.txt +7 -1
assets/css/admin-main.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.grw-admin #wpcontent{padding:0}.google-reviews_page_grw-builder #wpcontent,.grw-admin.google-reviews_page_grw-builder #wpcontent{padding-right:300px}.toplevel_page_grw .wp-menu-image img{width:18px}.grw-admin.edit-php #wpbody{color:#5d6f80;padding-left:20px;position:relative}.grw-admin.edit-php #wpbody .wp-header-end,.grw-admin.post-new-php #wpbody .wp-header-end,.grw-admin.post-php #wpbody .wp-header-end{margin-top:6px}.grw-admin .update-nag{margin:20px 0 0 20px}.grw-admin.edit-php .update-nag{margin:20px 20px 0 0}.grw-admin.edit-php .update-nag ~ .update-nag{margin-left:0}.grw-admin #wpbody #screen-meta-links{display:none}.grw-admin #screen-meta{background-color:#ecf0f1;border:0;margin:0}.grw-admin #screen-meta-links{position:absolute;top:0;right:0;z-index:1}.grw-tophead{-ms-flex-align:center;-webkit-align-items:center;-webkit-box-align:center;-webkit-box-sizing:border-box;align-items:center;background-color:#fff;border-bottom:1px solid #cfd9db;padding:15px 20px;box-sizing:border-box;overflow:hidden;position:relative;top:46px;width:100%}@media(min-width:601px){.grw-tophead{-ms-flex-align:stretch;-webkit-align-items:stretch;-webkit-box-align:stretch;align-items:stretch;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;top:0}}.grw-tophead img{width:32px;margin:0 4px 0 0;vertical-align:middle}.grw-tophead-title{padding:0;font-size:18px;font-weight:600;line-height:1.4em}.grw-page-title{font-size:23px;font-weight:400;margin:0;padding:20px 0 0 20px;line-height:29px}.grw-version{position:absolute;top:6px;right:16px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;display:inline-block;margin:12px 0 0;padding:6px 10px;font-size:12px;line-height:14px;color:#FFF;text-shadow:0 -1px 0 rgba(0,0,0,0.25);white-space:nowrap;vertical-align:baseline;background-color:#999}.grw-toolbar{padding:15px 20px;background-color:#fff;border-bottom:1px solid #cfd9db}@media(min-width:783px){.grw-toolbar{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}}.grw-toolbar-title{-webkit-box-flex:1;-ms-flex:1;flex:1;margin-bottom:0;margin-right:20px;min-width:0}.grw-toolbar-title-input{background-color:transparent!important;border:none!important;-webkit-box-shadow:none!important;box-shadow:none!important;width:100%}.grw-toolbar-title-input{font-size:18px;font-weight:400;line-height:1.4em;margin:0;padding:0}.grw-toolbar-control{display:-webkit-box;display:-ms-flexbox;display:flex}.grw-toolbar-control button{margin-left:20px!important}.grw-toolbar-control input[type="text"]{width:200px;height:34px;font-size:14px}.grw-toolbar-options label{display:block;padding:0 0 0 4px}.grw-admin .type-grw_collection .title.column-title{font-size:0}.grw-admin .type-grw_collection .title.column-title strong,.grw-admin .type-grw_collection .title.column-title .row-actions{line-height:1.5em}.grw-builder-workspace{display:block;position:relative;width:100%;overflow-y:hidden;box-sizing:border-box}.grw-builder-preview{font-size:14px;grid-area:preview;min-height:0;min-width:0;padding:20px;line-height:1.75}.grw-builder-options{box-sizing:border-box;position:fixed;top:32px;bottom:0;right:0;width:300px;overflow:hidden;transition:all .3s;z-index:1;overflow-y:auto;background:#fafafa}.wp-gr .wp-review-hidden{opacity:.5!important}.wp-gr .wp-review-hide{color:#fff!important;font-size:12px!important;font-weight:600!important;line-height:26px!important;text-decoration:none!important;text-transform:uppercase!important;padding:2px 8px!important;border-radius:3px!important;border-color:#0062cc!important;background-color:#427fbf!important}.wp-gr .wp-review-hide:hover{background-color:#1d62ab!important}.grw-overview-workspace{position:relative;font-size:14px;margin:20px}.grw-overview-places{position:absolute;top:-50px;right:0}.grw-card{margin:0;padding:0;color:#36476c;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;position:relative;background:#fff;border-radius:0}.grw-card-bordered{border:0;border-radius:10px}.grw-card-body{padding:20px}.grw-card-fh{max-height:500px;overflow-y:auto}.grw-card-header{font-size:15px;font-weight:600;padding:10px 20px;background-color:#f6f7fa}.grw-shadow{border-radius:10px;box-shadow:0 4px 4px rgb(54 71 108 / 15%)}.nav-tab.nav-tab-active{box-shadow:none;background:#fff;border-bottom-color:#fff}.grw-settings-workspace{font-size:14px;margin:20px;padding:20px;background:#fff}.grw-settings-workspace p{font-size:14px}.grw-settings-workspace .grw-alert{max-width:500px;word-wrap:break-word}.grw-warn{padding:10px;margin:20px 0 10px;font-size:15px;line-height:26px;font-weight:600;color:#000;border:1px solid #ccc;border-radius:3px;background-color:#ffeb3b}.grw-support-question{padding-bottom:10px}.grw-support-workspace{font-size:15px;line-height:22px;margin:20px;padding:20px;background:#fff}.grw-support-workspace p{font-size:15px}.grw-support-workspace #fig p{line-height:24px}.grw-support-workspace img{width:100%}.grw-support-workspace .subheader{color:#4b76b7;margin:40px 0 20px;text-decoration:underline}.grw-support-workspace .grw-flex-col>b:first-child,.grw-support-workspace .grw-flex-col3>b:first-child{padding:2px 8px;margin-right:4px;border-radius:50%;color:#fff;background:#36ad55;box-shadow:0 2px 5px 0 rgb(0 0 0 / 26%)}.box-img{padding:15px;margin:0 0 10px;box-shadow:0 2px 5px 0 rgba(0,0,0,.26)}#fig hr{border-top:1px solid #bbb;border-bottom:2px solid #eee}#fig .grw-flex-row{align-items:center!important;text-align:left;margin-bottom:40px}#fig .grw-flex-col,#fig .grw-flex-col3{padding:0 20px;line-height:24px}#fig .grw-flex-col:first-child,#fig .grw-flex-col3:first-child{padding-right:10px}#fig img{width:100%}#fig .subheader{color:#4b76b7;margin:40px 0 20px;text-decoration:underline}#fig .grw-flex-col>b:first-child,#fig .grw-flex-col3>b:first-child{padding:2px 8px;margin-right:4px;border-radius:50%;color:#fff;background:#36ad55;box-shadow:0 2px 5px 0 rgb(0 0 0 / 26%)}.grw-field,.grw-field *{box-sizing:border-box}.grw-field{padding:0 0 15px 0;margin-top:1em;margin-bottom:1em;border-bottom:1px dashed #ddd}@media(min-width:600px){.grw-field{display:flex;flex-wrap:wrap}.grw-field-label{flex:0 0 25%;padding-right:4%}.grw-field-option{flex:0 0 75%}}.grw-field input[type="text"]{margin:0;padding:5px 8px;border-radius:2px}.grw-field select{width:15em;margin-left:0}.grw-flex-row{display:flex;flex-flow:row wrap;width:100%}.grw-flex-col,.grw-flex-col2,.grw-flex-col3,.grw-flex-col4,.grw-flex-col6,.grw-flex-col7{width:100%;box-sizing:border-box}.grw-flex-col:first-child,.grw-flex-col3:first-child,.grw-flex-col6:first-child,.grw-flex-col3+.grw-flex-col3{padding-right:10px}@media(min-width:800px){.grw-flex-col{width:50%}.grw-flex-col2{width:25%}.grw-flex-col3{width:30%}.grw-flex-col4{width:40%}.grw-flex-col6{width:60%}.grw-flex-col7{width:70%}}.grw-alert{font-size:14px;line-height:1.846;border:0;color:#fff;padding:15px;border:1px solid transparent;border-radius:3px}.grw-alert-dismissable,.grw-alert-dismissible{padding-right:35px}.grw-alert-success{color:#fff;border-color:#d6e9c6;background-color:#4caf50}.grw-alert-warning{background-color:#a22525}.grw-alert a:not(.close),.grw-alert .alert-link{color:#fff;font-weight:bold}.grw-builder-platforms{position:relative;box-sizing:border-box}.grw-builder-top{padding:10px;color:#23282d;font-size:13px;font-weight:600;line-height:1.4em;cursor:pointer;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fafafa url('../img/button-down-black.svg') no-repeat right}.grw-builder-top:hover{border-color:#999;box-shadow:0 1px 2px rgba(0,0,0,.1)}.grw-builder-inside{border-top:0;padding:10px 10px 0;line-height:16px;background:#fff;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04)}.grw-builder-inside .grw-builder-option{margin:10px 0 0;position:relative}.grw-builder-inside .grw-builder-option:first-child{margin-top:0}.grw-builder-inside .grw-builder-option:last-child{margin-bottom:10px}.grw-builder-inside input[type="text"],.grw-builder-inside select,.grw-builder-inside button,.grw-builder-inside textarea{width:100%;clear:both;border-spacing:0}.grw-builder-inside pre{margin:0;color:#b73434;font-size:10px;line-height:16px;padding:4px;background:#fff;overflow:auto}.grw-builder-connect{margin:0 0 10px;padding:6px;color:#fff;border:0;cursor:pointer;text-align:center;background:#eee}.grw-builder-connect.grw-connect-google{font-weight:600;font-size:12px;text-transform:uppercase;background:#fa8e08}.grw-connect-google-inside{padding:0 1px}.grw-builder-connect.grw-connect-facebook{background:#3c5b9b}.grw-builder-connect.grw-connect-tripadvisor{background:#3eca77}.grw-builder-connect.grw-connect-yelp{margin-bottom:0;background:#d32323}.grw-builder-connect.grw-connect-google+div,.grw-builder-connect.grw-connect-yelp+div{margin-top:10px}.grw-connections{padding-bottom:10px}.grw-connection{cursor:move}.grw-connect-business{color:#333;text-align:left;margin:10px 0 0;border:1px solid #ccc;background:#fafafa url(../img/button-down-black.svg) no-repeat right}.grw-connect-business+div{padding:4px;border:1px solid #ccc;border-top:0}.grw-connect-select{display:none!important}.grw-platform-multiple .grw-connect-select{display:inline-block!important}.grw-connect-photo{width:24px;height:24px;margin-right:10px;border-radius:50%;border:1px solid #ccc;vertical-align:middle}.grw-connect-photo-change{margin-right:10px}.grw-connect-error{color:#e60909;font-size:13px}.grw-connection-checkbox{display:none;margin:10px 0 0 6px}.grw-platform-multiple .grw-connection-checkbox{display:block}.grw-quest{position:absolute;top:6px;right:3px;width:16px;cursor:pointer;font-size:12px;font-weight:bold;text-align:center;border:1px solid #ccc;border-radius:50px;background:#eee}.grw-quest.grw-quest-top{top:0}.grw-quest.grw-quest-top22{top:22px}.grw-quest:hover{border:1px solid #999}.grw-quest-help{display:none;margin:0 0 10px 0;padding:4px;font-size:13px;line-height:18px;background:#eee}.grw-well{padding:10px;margin:10px 0;border-radius:3px;border:1px solid #d9d9d9;background:#f1f1f1}#rating_temp{height:260px;font-size:12px;word-break:break-all}
|
1 |
+
.grw-admin #wpcontent{padding:0}.google-reviews_page_grw-builder #wpcontent,.grw-admin.google-reviews_page_grw-builder #wpcontent{padding-right:300px}.toplevel_page_grw .wp-menu-image img{width:18px}.grw-admin.edit-php #wpbody{color:#5d6f80;padding-left:20px;position:relative}.grw-admin.edit-php #wpbody .wp-header-end,.grw-admin.post-new-php #wpbody .wp-header-end,.grw-admin.post-php #wpbody .wp-header-end{margin-top:6px}.grw-admin .update-nag{margin:20px 0 0 20px}.grw-admin.edit-php .update-nag{margin:20px 20px 0 0}.grw-admin.edit-php .update-nag ~ .update-nag{margin-left:0}.grw-admin #wpbody #screen-meta-links{display:none}.grw-admin #screen-meta{background-color:#ecf0f1;border:0;margin:0}.grw-admin #screen-meta-links{position:absolute;top:0;right:0;z-index:1}.grw-tophead{-ms-flex-align:center;-webkit-align-items:center;-webkit-box-align:center;-webkit-box-sizing:border-box;align-items:center;background-color:#fff;border-bottom:1px solid #cfd9db;padding:15px 20px;box-sizing:border-box;overflow:hidden;position:relative;top:46px;width:100%}@media(min-width:601px){.grw-tophead{-ms-flex-align:stretch;-webkit-align-items:stretch;-webkit-box-align:stretch;align-items:stretch;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;top:0}}.grw-tophead img{width:32px;margin:0 4px 0 0;vertical-align:middle}.grw-tophead-title{padding:0;font-size:18px;font-weight:600;line-height:1.4em}.grw-page-title{font-size:23px;font-weight:400;margin:0;padding:20px 0 0 20px;line-height:29px}.grw-version{position:absolute;top:0;right:16px;text-align:center}.grw-version-free{display:inline-block;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:12px 0 3px;padding:4px 10px;font-size:12px;line-height:14px;color:#FFF;text-shadow:0 -1px 0 rgba(0,0,0,0.25);white-space:nowrap;vertical-align:baseline;background-color:#999}.grw-version-upgrade a{color:#4ea2e7;font-size:10px;font-weight:600;text-decoration:none;text-transform:uppercase}.grw-version-upgrade a:hover{color:#157cd1}.grw-toolbar{padding:15px 20px;background-color:#fff;border-bottom:1px solid #cfd9db}@media(min-width:783px){.grw-toolbar{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}}.grw-toolbar-title{-webkit-box-flex:1;-ms-flex:1;flex:1;margin-bottom:0;margin-right:20px;min-width:0}.grw-toolbar-title-input{background-color:transparent!important;border:none!important;-webkit-box-shadow:none!important;box-shadow:none!important;width:100%}.grw-toolbar-title-input{font-size:18px;font-weight:400;line-height:1.4em;margin:0;padding:0}.grw-toolbar-control{display:-webkit-box;display:-ms-flexbox;display:flex}.grw-toolbar-control button{margin-left:20px!important}.grw-toolbar-control input[type="text"]{width:200px;height:34px;font-size:14px}.grw-toolbar-options label{display:block;padding:0 0 0 4px}.grw-admin .type-grw_collection .title.column-title{font-size:0}.grw-admin .type-grw_collection .title.column-title strong,.grw-admin .type-grw_collection .title.column-title .row-actions{line-height:1.5em}.grw-builder-workspace{display:block;position:relative;width:100%;overflow-y:hidden;box-sizing:border-box}.grw-builder-preview{font-size:14px;grid-area:preview;min-height:0;min-width:0;padding:20px;line-height:1.75}.grw-builder-options{box-sizing:border-box;position:fixed;top:32px;bottom:0;right:0;width:300px;overflow:hidden;transition:all .3s;z-index:1;overflow-y:auto;background:#fafafa}.wp-gr .wp-review-hidden{opacity:.5!important}.wp-gr .wp-review-hide{color:#fff!important;font-size:12px!important;font-weight:600!important;line-height:26px!important;text-decoration:none!important;text-transform:uppercase!important;padding:2px 8px!important;border-radius:3px!important;border-color:#0062cc!important;background-color:#427fbf!important}.wp-gr .wp-review-hide:hover{background-color:#1d62ab!important}.grw-overview-workspace{position:relative;font-size:14px;margin:20px}.grw-overview-places{position:absolute;top:-50px;right:0}.grw-card{margin:0;padding:0;color:#36476c;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;position:relative;background:#fff;border-radius:0}.grw-card-bordered{border:0;border-radius:10px}.grw-card-body{padding:20px}.grw-card-fh{max-height:500px;overflow-y:auto}.grw-card-header{font-size:15px;font-weight:600;padding:10px 20px;background-color:#f6f7fa}.grw-shadow{border-radius:10px;box-shadow:0 4px 4px rgb(54 71 108 / 15%)}.nav-tab.nav-tab-active{box-shadow:none;background:#fff;border-bottom-color:#fff}.grw-settings-workspace{font-size:14px;margin:20px;padding:20px;background:#fff}.grw-settings-workspace p{font-size:14px}.grw-settings-workspace .grw-alert{max-width:500px;word-wrap:break-word}.grw-warn{padding:10px;margin:20px 0 10px;font-size:15px;line-height:26px;font-weight:600;color:#000;border:1px solid #ccc;border-radius:3px;background-color:#ffeb3b}.grw-support-question{padding-bottom:10px}.grw-support-workspace{font-size:15px;line-height:22px;margin:20px;padding:20px;background:#fff}.grw-support-workspace p{font-size:15px}.grw-support-workspace #fig p{line-height:24px}.grw-support-workspace img{width:100%}.grw-support-workspace .subheader{color:#4b76b7;margin:40px 0 20px;text-decoration:underline}.grw-support-workspace .grw-flex-col>b:first-child,.grw-support-workspace .grw-flex-col3>b:first-child{padding:2px 8px;margin-right:4px;border-radius:50%;color:#fff;background:#36ad55;box-shadow:0 2px 5px 0 rgb(0 0 0 / 26%)}.box-img{padding:15px;margin:0 0 10px;box-shadow:0 2px 5px 0 rgba(0,0,0,.26)}#fig hr{border-top:1px solid #bbb;border-bottom:2px solid #eee}#fig .grw-flex-row{align-items:center!important;text-align:left;margin-bottom:40px}#fig .grw-flex-col,#fig .grw-flex-col3{padding:0 20px;line-height:24px}#fig .grw-flex-col:first-child,#fig .grw-flex-col3:first-child{padding-right:10px}#fig img{width:100%}#fig .subheader{color:#4b76b7;margin:40px 0 20px;text-decoration:underline}#fig .grw-flex-col>b:first-child,#fig .grw-flex-col3>b:first-child{padding:2px 8px;margin-right:4px;border-radius:50%;color:#fff;background:#36ad55;box-shadow:0 2px 5px 0 rgb(0 0 0 / 26%)}.grw-field,.grw-field *{box-sizing:border-box}.grw-field{padding:0 0 15px 0;margin-top:1em;margin-bottom:1em;border-bottom:1px dashed #ddd}@media(min-width:600px){.grw-field{display:flex;flex-wrap:wrap}.grw-field-label{flex:0 0 25%;padding-right:4%}.grw-field-option{flex:0 0 75%}}.grw-field input[type="text"]{margin:0;padding:5px 8px;border-radius:2px}.grw-field select{width:15em;margin-left:0}.grw-flex-row{display:flex;flex-flow:row wrap;width:100%}.grw-flex-col,.grw-flex-col2,.grw-flex-col3,.grw-flex-col4,.grw-flex-col6,.grw-flex-col7{width:100%;box-sizing:border-box}.grw-flex-col:first-child,.grw-flex-col3:first-child,.grw-flex-col6:first-child,.grw-flex-col3+.grw-flex-col3{padding-right:10px}@media(min-width:800px){.grw-flex-col{width:50%}.grw-flex-col2{width:25%}.grw-flex-col3{width:30%}.grw-flex-col4{width:40%}.grw-flex-col6{width:60%}.grw-flex-col7{width:70%}}.grw-alert{font-size:14px;line-height:1.846;border:0;color:#fff;padding:15px;border:1px solid transparent;border-radius:3px}.grw-alert-dismissable,.grw-alert-dismissible{padding-right:35px}.grw-alert-success{color:#fff;border-color:#d6e9c6;background-color:#4caf50}.grw-alert-warning{background-color:#a22525}.grw-alert a:not(.close),.grw-alert .alert-link{color:#fff;font-weight:bold}.grw-builder-platforms{position:relative;box-sizing:border-box}.grw-builder-top{padding:10px;color:#23282d;font-size:13px;font-weight:600;line-height:1.4em;cursor:pointer;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fafafa url('../img/button-down-black.svg') no-repeat right}.grw-builder-top:hover{border-color:#999;box-shadow:0 1px 2px rgba(0,0,0,.1)}.grw-builder-inside{border-top:0;padding:10px 10px 0;line-height:16px;background:#fff;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04)}.grw-builder-inside .grw-builder-option{margin:10px 0 0;position:relative}.grw-builder-inside .grw-builder-option:first-child{margin-top:0}.grw-builder-inside .grw-builder-option:last-child{margin-bottom:10px}.grw-builder-inside input[type="text"],.grw-builder-inside select,.grw-builder-inside button,.grw-builder-inside textarea{width:100%;clear:both;border-spacing:0}.grw-builder-inside pre{margin:0;color:#b73434;font-size:10px;line-height:16px;padding:4px;background:#fff;overflow:auto}.grw-builder-connect{margin:0 0 10px;padding:6px;color:#fff;border:0;cursor:pointer;text-align:center;background:#eee}.grw-builder-connect.grw-connect-google{font-weight:600;font-size:12px;text-transform:uppercase;background:#fa8e08}.grw-connect-google-inside{padding:0 1px}.grw-builder-connect.grw-connect-facebook{background:#3c5b9b}.grw-builder-connect.grw-connect-tripadvisor{background:#3eca77}.grw-builder-connect.grw-connect-yelp{margin-bottom:0;background:#d32323}.grw-builder-connect.grw-connect-google+div,.grw-builder-connect.grw-connect-yelp+div{margin-top:10px}.grw-connections{padding-bottom:10px}.grw-connection{cursor:move}.grw-connect-business{color:#333;text-align:left;margin:10px 0 0;border:1px solid #ccc;background:#fafafa url(../img/button-down-black.svg) no-repeat right}.grw-connect-business+div{padding:4px;border:1px solid #ccc;border-top:0}.grw-connect-select{display:none!important}.grw-platform-multiple .grw-connect-select{display:inline-block!important}.grw-connect-photo{width:24px;height:24px;margin-right:10px;border-radius:50%;border:1px solid #ccc;vertical-align:middle}.grw-connect-photo-change{margin-right:10px}.grw-connect-error{color:#e60909;font-size:13px}.grw-connection-checkbox{display:none;margin:10px 0 0 6px}.grw-platform-multiple .grw-connection-checkbox{display:block}.grw-quest{position:absolute;top:6px;right:3px;width:16px;cursor:pointer;font-size:12px;font-weight:bold;text-align:center;border:1px solid #ccc;border-radius:50px;background:#eee}.grw-quest.grw-quest-top{top:0}.grw-quest.grw-quest-top22{top:22px}.grw-quest:hover{border:1px solid #999}.grw-quest-help{display:none;margin:0 0 10px 0;padding:4px;font-size:13px;line-height:18px;background:#eee}.grw-well{padding:10px;margin:10px 0;border-radius:3px;border:1px solid #d9d9d9;background:#f1f1f1}#rating_temp{height:260px;font-size:12px;word-break:break-all}
|
assets/js/admin-main.js
CHANGED
@@ -14,10 +14,10 @@ function grw_review(a){return'<div class="wp-google-review'+(""==a.hide?"":" wp-
|
|
14 |
a.id+'">'+(""==a.hide?"Hide":"Show")+" review</a></div></div>"}function grw_trimtext(a,c){if(c&&a&&a.length>c){var b=a.substring(0,c).indexOf(" ")+1;if(1>b||c-b>c/2)b=c;var d=c="";0<b&&(c=a.substring(0,b-1),d=a.substring(b-1,a.length));return c+(d?'<span>... </span><span class="wp-more">'+d+'</span><span class="wp-more-toggle">read more</span>':"")}return a}
|
15 |
var GRW_HTML_CONTENT='<div class="grw-builder-platforms grw-builder-inside"><div class="grw-toggle grw-builder-connect grw-connect-google">Connect Google</div><div class="grw-connect-google-inside" style="display:none"><div class="grw-builder-option"><input type="text" class="grw-connect-id" value="" placeholder="Place ID" /><span class="grw-quest grw-toggle" title="Click to help">?</span><div class="grw-quest-help">The standard way to find your Google Place ID is to go to <a href="https://developers.google.com/places/place-id" target="_blank">https://developers.google.com/places/place-id</a> and search for your company name.<br><br>But sometimes it may not work, in this case please see <a href="'+GRW_VARS.supportUrl+
|
16 |
'&grw_tab=fig#place_id" target="_blank">how to find any Google Place ID</a>.</div></div><div class="grw-builder-option"><select class="grw-connect-lang"><option value="" selected="selected">Choose language if required</option><option value="ar">Arabic</option><option value="bg">Bulgarian</option><option value="bn">Bengali</option><option value="ca">Catalan</option><option value="cs">Czech</option><option value="da">Danish</option><option value="de">German</option><option value="el">Greek</option><option value="en">English</option><option value="es">Spanish</option><option value="eu">Basque</option><option value="eu">Basque</option><option value="fa">Farsi</option><option value="fi">Finnish</option><option value="fil">Filipino</option><option value="fr">French</option><option value="gl">Galician</option><option value="gu">Gujarati</option><option value="hi">Hindi</option><option value="hr">Croatian</option><option value="hu">Hungarian</option><option value="id">Indonesian</option><option value="it">Italian</option><option value="iw">Hebrew</option><option value="ja">Japanese</option><option value="kn">Kannada</option><option value="ko">Korean</option><option value="lt">Lithuanian</option><option value="lv">Latvian</option><option value="ml">Malayalam</option><option value="mr">Marathi</option><option value="nl">Dutch</option><option value="no">Norwegian</option><option value="pl">Polish</option><option value="pt">Portuguese</option><option value="pt-BR">Portuguese (Brazil)</option><option value="pt-PT">Portuguese (Portugal)</option><option value="ro">Romanian</option><option value="ru">Russian</option><option value="sk">Slovak</option><option value="sl">Slovenian</option><option value="sr">Serbian</option><option value="sv">Swedish</option><option value="ta">Tamil</option><option value="te">Telugu</option><option value="th">Thai</option><option value="tl">Tagalog</option><option value="tr">Turkish</option><option value="uk">Ukrainian</option><option value="vi">Vietnamese</option><option value="zh">Chinese (Simplified)</option><option value="zh-Hant">Chinese (Traditional)</option></select></div><div class="grw-builder-option"><button class="grw-connect-btn">Connect Google</button><small class="grw-connect-error"></small></div></div><div class="grw-connections"></div></div><div class="grw-connect-options"><div class="grw-builder-inside"><div class="grw-builder-option">Layout<select id="view_mode" name="view_mode"><option value="slider" selected="selected">Slider</option><option value="list">List</option></select></div></div><div class="grw-builder-top grw-toggle">Common Options</div><div class="grw-builder-inside" style="display:none"><div class="grw-builder-option">Pagination<input type="text" name="pagination" value=""></div><div class="grw-builder-option">Maximum characters before \'read more\' link<input type="text" name="text_size" value=""></div><div class="grw-builder-option"><label><input type="checkbox" name="hide_based_on" value="">Hide \'Based on ... reviews\'</label></div><div class="grw-builder-option"><label><input type="checkbox" name="hide_writereview" value="">Hide \'review us on G\' button</label></div><div class="grw-builder-option"><label><input type="checkbox" name="header_hide_social" value="">Hide rating header, leave only reviews</label></div><div class="grw-builder-option"><label><input type="checkbox" name="hide_reviews" value="">Hide reviews, leave only rating header</label></div></div><div class="grw-builder-top grw-toggle">Slider Options</div><div class="grw-builder-inside" style="display:none"><div class="grw-builder-option">Speed in second<input type="text" name="slider_speed" value="" placeholder="Default: 5"></div><div class="grw-builder-option">Text height<input type="text" name="slider_text_height" value="" placeholder="Default: 100px"></div><div class="grw-builder-option"><label><input type="checkbox" name="slider_hide_border" value="">Hide background</label></div><div class="grw-builder-option"><label><input type="checkbox" name="slider_hide_prevnext" value="">Hide prev & next buttons</label></div><div class="grw-builder-option"><label><input type="checkbox" name="slider_hide_dots" value="">Hide dots</label></div></div><div class="grw-builder-top grw-toggle">Style Options</div><div class="grw-builder-inside" style="display:none"><div class="grw-builder-option">Container max-width<input type="text" name="max_width" value="" placeholder="for instance: 300px"></div><div class="grw-builder-option">Container max-height<input type="text" name="max_height" value="" placeholder="for instance: 500px"></div><div class="grw-builder-option"><label><input type="checkbox" name="centered" value="">Place by center (only if max-width is set)</label></div><div class="grw-builder-option"><label><input type="checkbox" name="dark_theme">Dark background</label></div></div><div class="grw-builder-top grw-toggle">Advance Options</div><div class="grw-builder-inside" style="display:none"><div class="grw-builder-option"><label><input type="checkbox" name="lazy_load_img" checked>Lazy load images</label></div><div class="grw-builder-option"><label><input type="checkbox" name="google_def_rev_link">Use default Google reviews link</label><span class="grw-quest grw-quest-top grw-toggle" title="Click to help">?</span><div class="grw-quest-help" style="display:none;">If the direct link to all reviews <b>https://search.google.com/local/reviews?placeid=<PLACE_ID></b> does not work with your Google place (leads to 404), please use this option to use the default reviews link to Google map.</div></div><div class="grw-builder-option"><label><input type="checkbox" name="open_link" checked>Open links in new Window</label></div><div class="grw-builder-option"><label><input type="checkbox" name="nofollow_link" checked>Use no follow links</label></div><div class="grw-builder-option">Reviewer avatar size<select name="reviewer_avatar_size"><option value="56" selected="selected">Small: 56px</option><option value="128">Medium: 128px</option><option value="256">Large: 256px</option></select></div><div class="grw-builder-option">Cache data<select name="cache"><option value="1">1 Hour</option><option value="3">3 Hours</option><option value="6">6 Hours</option><option value="12" selected="selected">12 Hours</option><option value="24">1 Day</option><option value="48">2 Days</option><option value="168">1 Week</option><option value="">Disable (NOT recommended)</option></select></div><div class="grw-builder-option">Reviews limit<input type="text" name="reviews_limit" value=""></div></div></div>';
|
17 |
-
function grw_builder_init(a,c){var b=document.querySelector(c.el);if(b){b.innerHTML=GRW_HTML_CONTENT;c.conns
|
18 |
-
b).unbind("click").click(function(){a(this).toggleClass("toggled");a(this).next().slideToggle()});a(".grw-toggle.grw-connect-google").click(function(){
|
19 |
-
function grw_feed_save_ajax(a){if(!window.grw_title.value)return window.grw_title.focus(),!1;window.grw_save.innerText="Auto save, wait";window.grw_save.disabled=!0;jQuery.post(ajaxurl,{post_id:window.grw_post_id.value,title:window.grw_title.value,content:document.getElementById("grw-builder-connection").value,action:"grw_feed_save_ajax"},function(a){for(var b=document.querySelectorAll(".wp-gr"),c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);window.grw_collection_preview.innerHTML=
|
20 |
-
return!1});window.grw_post_id.value||(a=document.querySelector(".wp-gr").getAttribute("data-id"),window.grw_post_id.value=a,window.location.href=window.location.href+"&grw_feed_id="+a);window.grw_save.innerText="Save & Refresh";window.grw_save.disabled=!1})}
|
21 |
function grw_feed_save(){if(!window.grw_title.value)return window.grw_title.focus(),!1;var a=document.getElementById("grw-builder-connection").value;if(a&&(a=JSON.parse(a))&&a.connections&&a.connections.length)return!0;alert("Please click 'CONNECT GOOGLE' and connect your Google reviews then save this widget");return!1}
|
22 |
function grw_review_hide(a){jQuery.post(GRW_VARS.handlerUrl+"&cf_action=grw_hide_review",{id:a.attr("data-id"),feed_id:jQuery('input[name="grw_feed[post_id]"]').val(),grw_wpnonce:jQuery("#grw_nonce").val()},function(c){var b=a.parent().parent();c.hide?(a.text("show review"),b.addClass("wp-review-hidden")):(a.text("hide review"),b.removeClass("wp-review-hidden"))},"json")}
|
23 |
function grw_connection(a,c,b,d){var e=c.querySelector(".grw-connect-btn");a(e).click(function(){var f=c.querySelector(".grw-connect-id");if(!f.value)return f.focus(),!1;f="yelp"==b?/.+\/biz\/(.*?)(\?|\/|$)/.exec(f.value)[1]:f.value;var h=c.querySelector(".grw-connect-lang").value;e.innerHTML="Please wait...";e.disabled=!0;grw_connect_ajax(a,c,{id:f,lang:h},b,d,1);return!1})}
|
14 |
a.id+'">'+(""==a.hide?"Hide":"Show")+" review</a></div></div>"}function grw_trimtext(a,c){if(c&&a&&a.length>c){var b=a.substring(0,c).indexOf(" ")+1;if(1>b||c-b>c/2)b=c;var d=c="";0<b&&(c=a.substring(0,b-1),d=a.substring(b-1,a.length));return c+(d?'<span>... </span><span class="wp-more">'+d+'</span><span class="wp-more-toggle">read more</span>':"")}return a}
|
15 |
var GRW_HTML_CONTENT='<div class="grw-builder-platforms grw-builder-inside"><div class="grw-toggle grw-builder-connect grw-connect-google">Connect Google</div><div class="grw-connect-google-inside" style="display:none"><div class="grw-builder-option"><input type="text" class="grw-connect-id" value="" placeholder="Place ID" /><span class="grw-quest grw-toggle" title="Click to help">?</span><div class="grw-quest-help">The standard way to find your Google Place ID is to go to <a href="https://developers.google.com/places/place-id" target="_blank">https://developers.google.com/places/place-id</a> and search for your company name.<br><br>But sometimes it may not work, in this case please see <a href="'+GRW_VARS.supportUrl+
|
16 |
'&grw_tab=fig#place_id" target="_blank">how to find any Google Place ID</a>.</div></div><div class="grw-builder-option"><select class="grw-connect-lang"><option value="" selected="selected">Choose language if required</option><option value="ar">Arabic</option><option value="bg">Bulgarian</option><option value="bn">Bengali</option><option value="ca">Catalan</option><option value="cs">Czech</option><option value="da">Danish</option><option value="de">German</option><option value="el">Greek</option><option value="en">English</option><option value="es">Spanish</option><option value="eu">Basque</option><option value="eu">Basque</option><option value="fa">Farsi</option><option value="fi">Finnish</option><option value="fil">Filipino</option><option value="fr">French</option><option value="gl">Galician</option><option value="gu">Gujarati</option><option value="hi">Hindi</option><option value="hr">Croatian</option><option value="hu">Hungarian</option><option value="id">Indonesian</option><option value="it">Italian</option><option value="iw">Hebrew</option><option value="ja">Japanese</option><option value="kn">Kannada</option><option value="ko">Korean</option><option value="lt">Lithuanian</option><option value="lv">Latvian</option><option value="ml">Malayalam</option><option value="mr">Marathi</option><option value="nl">Dutch</option><option value="no">Norwegian</option><option value="pl">Polish</option><option value="pt">Portuguese</option><option value="pt-BR">Portuguese (Brazil)</option><option value="pt-PT">Portuguese (Portugal)</option><option value="ro">Romanian</option><option value="ru">Russian</option><option value="sk">Slovak</option><option value="sl">Slovenian</option><option value="sr">Serbian</option><option value="sv">Swedish</option><option value="ta">Tamil</option><option value="te">Telugu</option><option value="th">Thai</option><option value="tl">Tagalog</option><option value="tr">Turkish</option><option value="uk">Ukrainian</option><option value="vi">Vietnamese</option><option value="zh">Chinese (Simplified)</option><option value="zh-Hant">Chinese (Traditional)</option></select></div><div class="grw-builder-option"><button class="grw-connect-btn">Connect Google</button><small class="grw-connect-error"></small></div></div><div class="grw-connections"></div></div><div class="grw-connect-options"><div class="grw-builder-inside"><div class="grw-builder-option">Layout<select id="view_mode" name="view_mode"><option value="slider" selected="selected">Slider</option><option value="list">List</option></select></div></div><div class="grw-builder-top grw-toggle">Common Options</div><div class="grw-builder-inside" style="display:none"><div class="grw-builder-option">Pagination<input type="text" name="pagination" value=""></div><div class="grw-builder-option">Maximum characters before \'read more\' link<input type="text" name="text_size" value=""></div><div class="grw-builder-option"><label><input type="checkbox" name="hide_based_on" value="">Hide \'Based on ... reviews\'</label></div><div class="grw-builder-option"><label><input type="checkbox" name="hide_writereview" value="">Hide \'review us on G\' button</label></div><div class="grw-builder-option"><label><input type="checkbox" name="header_hide_social" value="">Hide rating header, leave only reviews</label></div><div class="grw-builder-option"><label><input type="checkbox" name="hide_reviews" value="">Hide reviews, leave only rating header</label></div></div><div class="grw-builder-top grw-toggle">Slider Options</div><div class="grw-builder-inside" style="display:none"><div class="grw-builder-option">Speed in second<input type="text" name="slider_speed" value="" placeholder="Default: 5"></div><div class="grw-builder-option">Text height<input type="text" name="slider_text_height" value="" placeholder="Default: 100px"></div><div class="grw-builder-option"><label><input type="checkbox" name="slider_hide_border" value="">Hide background</label></div><div class="grw-builder-option"><label><input type="checkbox" name="slider_hide_prevnext" value="">Hide prev & next buttons</label></div><div class="grw-builder-option"><label><input type="checkbox" name="slider_hide_dots" value="">Hide dots</label></div></div><div class="grw-builder-top grw-toggle">Style Options</div><div class="grw-builder-inside" style="display:none"><div class="grw-builder-option">Container max-width<input type="text" name="max_width" value="" placeholder="for instance: 300px"></div><div class="grw-builder-option">Container max-height<input type="text" name="max_height" value="" placeholder="for instance: 500px"></div><div class="grw-builder-option"><label><input type="checkbox" name="centered" value="">Place by center (only if max-width is set)</label></div><div class="grw-builder-option"><label><input type="checkbox" name="dark_theme">Dark background</label></div></div><div class="grw-builder-top grw-toggle">Advance Options</div><div class="grw-builder-inside" style="display:none"><div class="grw-builder-option"><label><input type="checkbox" name="lazy_load_img" checked>Lazy load images</label></div><div class="grw-builder-option"><label><input type="checkbox" name="google_def_rev_link">Use default Google reviews link</label><span class="grw-quest grw-quest-top grw-toggle" title="Click to help">?</span><div class="grw-quest-help" style="display:none;">If the direct link to all reviews <b>https://search.google.com/local/reviews?placeid=<PLACE_ID></b> does not work with your Google place (leads to 404), please use this option to use the default reviews link to Google map.</div></div><div class="grw-builder-option"><label><input type="checkbox" name="open_link" checked>Open links in new Window</label></div><div class="grw-builder-option"><label><input type="checkbox" name="nofollow_link" checked>Use no follow links</label></div><div class="grw-builder-option">Reviewer avatar size<select name="reviewer_avatar_size"><option value="56" selected="selected">Small: 56px</option><option value="128">Medium: 128px</option><option value="256">Large: 256px</option></select></div><div class="grw-builder-option">Cache data<select name="cache"><option value="1">1 Hour</option><option value="3">3 Hours</option><option value="6">6 Hours</option><option value="12" selected="selected">12 Hours</option><option value="24">1 Day</option><option value="48">2 Days</option><option value="168">1 Week</option><option value="">Disable (NOT recommended)</option></select></div><div class="grw-builder-option">Reviews limit<input type="text" name="reviews_limit" value=""></div></div></div>';
|
17 |
+
function grw_builder_init(a,c){var b=document.querySelector(c.el);if(b){b.innerHTML=GRW_HTML_CONTENT;var d=b.querySelector(".grw-connect-google-inside"),e=b.querySelector(".grw-connect-id");c.conns?grw_deserialize_connections(a,b,c.conns,c.opts):(d.style="",e.focus());grw_connection(a,d,"google",c.authcode);a('.grw-connect-options input[type="text"],.grw-connect-options textarea').keyup(function(){grw_serialize_connections()});a('.grw-connect-options input[type="checkbox"],.grw-connect-options select').change(function(){grw_serialize_connections()});
|
18 |
+
a(".grw-toggle",b).unbind("click").click(function(){a(this).toggleClass("toggled");a(this).next().slideToggle()});a(".grw-toggle.grw-connect-google").click(function(){e.focus()});a(".grw-connections").sortable&&(a(".grw-connections").sortable({stop:function(a,b){grw_serialize_connections()}}),a(".grw-connections").disableSelection());a(".wp-review-hide").click(function(){grw_review_hide(a(this));return!1});a("#grw_save").click(function(){grw_feed_save_ajax();return!1})}}
|
19 |
+
function grw_feed_save_ajax(a){if(!window.grw_title.value)return window.grw_title.focus(),!1;window.grw_save.innerText="Auto save, wait";window.grw_save.disabled=!0;jQuery.post(ajaxurl,{post_id:window.grw_post_id.value,title:window.grw_title.value,content:document.getElementById("grw-builder-connection").value,action:"grw_feed_save_ajax",grw_nonce:jQuery("#grw_nonce").val()},function(a){for(var b=document.querySelectorAll(".wp-gr"),c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);window.grw_collection_preview.innerHTML=
|
20 |
+
a;jQuery(".wp-review-hide").unbind("click").click(function(){grw_review_hide(jQuery(this));return!1});window.grw_post_id.value||(a=document.querySelector(".wp-gr").getAttribute("data-id"),window.grw_post_id.value=a,window.location.href=window.location.href+"&grw_feed_id="+a);window.grw_save.innerText="Save & Refresh";window.grw_save.disabled=!1})}
|
21 |
function grw_feed_save(){if(!window.grw_title.value)return window.grw_title.focus(),!1;var a=document.getElementById("grw-builder-connection").value;if(a&&(a=JSON.parse(a))&&a.connections&&a.connections.length)return!0;alert("Please click 'CONNECT GOOGLE' and connect your Google reviews then save this widget");return!1}
|
22 |
function grw_review_hide(a){jQuery.post(GRW_VARS.handlerUrl+"&cf_action=grw_hide_review",{id:a.attr("data-id"),feed_id:jQuery('input[name="grw_feed[post_id]"]').val(),grw_wpnonce:jQuery("#grw_nonce").val()},function(c){var b=a.parent().parent();c.hide?(a.text("show review"),b.addClass("wp-review-hidden")):(a.text("hide review"),b.removeClass("wp-review-hidden"))},"json")}
|
23 |
function grw_connection(a,c,b,d){var e=c.querySelector(".grw-connect-btn");a(e).click(function(){var f=c.querySelector(".grw-connect-id");if(!f.value)return f.focus(),!1;f="yelp"==b?/.+\/biz\/(.*?)(\?|\/|$)/.exec(f.value)[1]:f.value;var h=c.querySelector(".grw-connect-lang").value;e.innerHTML="Please wait...";e.disabled=!0;grw_connect_ajax(a,c,{id:f,lang:h},b,d,1);return!1})}
|
assets/src/css/admin-main.css
CHANGED
@@ -107,14 +107,18 @@
|
|
107 |
|
108 |
.grw-version {
|
109 |
position: absolute;
|
110 |
-
top:
|
111 |
right: 16px;
|
|
|
|
|
|
|
|
|
|
|
112 |
-webkit-border-radius: 3px;
|
113 |
-moz-border-radius: 3px;
|
114 |
border-radius: 3px;
|
115 |
-
|
116 |
-
|
117 |
-
padding: 6px 10px;
|
118 |
font-size: 12px;
|
119 |
line-height: 14px;
|
120 |
color: #FFF;
|
@@ -124,6 +128,18 @@
|
|
124 |
background-color: #999;
|
125 |
}
|
126 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
/*-------------------------------- Builder page --------------------------------*/
|
128 |
.grw-toolbar {
|
129 |
padding: 15px 20px;
|
107 |
|
108 |
.grw-version {
|
109 |
position: absolute;
|
110 |
+
top: 0px;
|
111 |
right: 16px;
|
112 |
+
text-align: center;
|
113 |
+
}
|
114 |
+
|
115 |
+
.grw-version-free {
|
116 |
+
display: inline-block;
|
117 |
-webkit-border-radius: 3px;
|
118 |
-moz-border-radius: 3px;
|
119 |
border-radius: 3px;
|
120 |
+
margin: 12px 0 3px;
|
121 |
+
padding: 4px 10px;
|
|
|
122 |
font-size: 12px;
|
123 |
line-height: 14px;
|
124 |
color: #FFF;
|
128 |
background-color: #999;
|
129 |
}
|
130 |
|
131 |
+
.grw-version-upgrade a {
|
132 |
+
color: #4ea2e7;
|
133 |
+
font-size: 10px;
|
134 |
+
font-weight: 600;
|
135 |
+
text-decoration: none;
|
136 |
+
text-transform: uppercase;
|
137 |
+
}
|
138 |
+
|
139 |
+
.grw-version-upgrade a:hover {
|
140 |
+
color: #157cd1;
|
141 |
+
}
|
142 |
+
|
143 |
/*-------------------------------- Builder page --------------------------------*/
|
144 |
.grw-toolbar {
|
145 |
padding: 15px 20px;
|
assets/src/js/admin-builder.js
CHANGED
@@ -253,13 +253,18 @@ function grw_builder_init($, data) {
|
|
253 |
|
254 |
el.innerHTML = GRW_HTML_CONTENT;
|
255 |
|
|
|
|
|
|
|
256 |
if (data.conns) {
|
257 |
grw_deserialize_connections($, el, data.conns, data.opts);
|
|
|
|
|
|
|
258 |
}
|
259 |
|
260 |
// Google Connect
|
261 |
-
|
262 |
-
grw_connection($, platform_google_el, 'google', data.authcode);
|
263 |
|
264 |
$('.grw-connect-options input[type="text"],.grw-connect-options textarea').keyup(function() {
|
265 |
grw_serialize_connections();
|
@@ -274,7 +279,7 @@ function grw_builder_init($, data) {
|
|
274 |
});
|
275 |
|
276 |
$('.grw-toggle.grw-connect-google').click(function () {
|
277 |
-
|
278 |
});
|
279 |
|
280 |
if ($('.grw-connections').sortable) {
|
@@ -308,10 +313,11 @@ function grw_feed_save_ajax($) {
|
|
308 |
|
309 |
jQuery.post(ajaxurl, {
|
310 |
|
311 |
-
post_id
|
312 |
-
title
|
313 |
-
content
|
314 |
-
action
|
|
|
315 |
|
316 |
}, function(res) {
|
317 |
|
253 |
|
254 |
el.innerHTML = GRW_HTML_CONTENT;
|
255 |
|
256 |
+
var connect_google_el = el.querySelector('.grw-connect-google-inside'),
|
257 |
+
google_pid_el = el.querySelector('.grw-connect-id');
|
258 |
+
|
259 |
if (data.conns) {
|
260 |
grw_deserialize_connections($, el, data.conns, data.opts);
|
261 |
+
} else {
|
262 |
+
connect_google_el.style = '';
|
263 |
+
google_pid_el.focus();
|
264 |
}
|
265 |
|
266 |
// Google Connect
|
267 |
+
grw_connection($, connect_google_el, 'google', data.authcode);
|
|
|
268 |
|
269 |
$('.grw-connect-options input[type="text"],.grw-connect-options textarea').keyup(function() {
|
270 |
grw_serialize_connections();
|
279 |
});
|
280 |
|
281 |
$('.grw-toggle.grw-connect-google').click(function () {
|
282 |
+
google_pid_el.focus();
|
283 |
});
|
284 |
|
285 |
if ($('.grw-connections').sortable) {
|
313 |
|
314 |
jQuery.post(ajaxurl, {
|
315 |
|
316 |
+
post_id : window.grw_post_id.value,
|
317 |
+
title : window.grw_title.value,
|
318 |
+
content : document.getElementById('grw-builder-connection').value,
|
319 |
+
action : 'grw_feed_save_ajax',
|
320 |
+
grw_nonce : jQuery('#grw_nonce').val()
|
321 |
|
322 |
}, function(res) {
|
323 |
|
grw.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Plugin for Google Reviews
|
4 |
Plugin URI: https://richplugins.com/business-reviews-bundle-wordpress-plugin
|
5 |
Description: Instantly Google Places Reviews on your website to increase user confidence and SEO.
|
6 |
-
Version: 2.2.
|
7 |
Author: RichPlugins <support@richplugins.com>
|
8 |
Author URI: https://richplugins.com
|
9 |
Text Domain: widget-google-reviews
|
@@ -18,7 +18,7 @@ if (!defined('ABSPATH')) {
|
|
18 |
|
19 |
require(ABSPATH . 'wp-includes/version.php');
|
20 |
|
21 |
-
define('GRW_VERSION' , '2.2.
|
22 |
define('GRW_PLUGIN_FILE' , __FILE__);
|
23 |
define('GRW_PLUGIN_URL' , plugins_url(basename(plugin_dir_path(__FILE__ )), basename(__FILE__)));
|
24 |
define('GRW_ASSETS_URL' , GRW_PLUGIN_URL . '/assets/');
|
3 |
Plugin Name: Plugin for Google Reviews
|
4 |
Plugin URI: https://richplugins.com/business-reviews-bundle-wordpress-plugin
|
5 |
Description: Instantly Google Places Reviews on your website to increase user confidence and SEO.
|
6 |
+
Version: 2.2.3
|
7 |
Author: RichPlugins <support@richplugins.com>
|
8 |
Author URI: https://richplugins.com
|
9 |
Text Domain: widget-google-reviews
|
18 |
|
19 |
require(ABSPATH . 'wp-includes/version.php');
|
20 |
|
21 |
+
define('GRW_VERSION' , '2.2.3');
|
22 |
define('GRW_PLUGIN_FILE' , __FILE__);
|
23 |
define('GRW_PLUGIN_URL' , plugins_url(basename(plugin_dir_path(__FILE__ )), basename(__FILE__)));
|
24 |
define('GRW_ASSETS_URL' , GRW_PLUGIN_URL . '/assets/');
|
includes/admin/class-admin-rev.php
CHANGED
@@ -37,10 +37,10 @@ class Admin_Rev {
|
|
37 |
$url_later = esc_url(add_query_arg('grw_rev_notice', 'later', $url));
|
38 |
$url_never = esc_url(add_query_arg('grw_rev_notice', 'never', $url));
|
39 |
|
40 |
-
$notice = '<p style="font-weight:normal;">' .
|
41 |
-
'Hey, I am happy to see that you\'ve been using
|
42 |
-
'Could you
|
43 |
-
'
|
44 |
'</p>' .
|
45 |
'<p>' .
|
46 |
'<a href="https://wordpress.org/support/plugin/widget-google-reviews/reviews/#new-post" style="text-decoration:none;" target="_blank">' .
|
37 |
$url_later = esc_url(add_query_arg('grw_rev_notice', 'later', $url));
|
38 |
$url_never = esc_url(add_query_arg('grw_rev_notice', 'never', $url));
|
39 |
|
40 |
+
$notice = '<p style="font-weight:normal;font-size:15px;">' .
|
41 |
+
'Hey, I am happy to see that you\'ve been using <b>Plugin for Google Reviews</b> for a while now – that’s awesome!<br>' .
|
42 |
+
'Could you tell about your site and experience with the plugin in <a href="https://wordpress.org/support/plugin/widget-google-reviews/reviews/#new-post" style="color:#ffb900;line-height:90%;font-size:1.5em;letter-spacing:0.03em;position:relative;top:0.08em;text-decoration:none;" target="_blank">★★★★★</a> WordPress review?<br><br>' .
|
43 |
+
'--<br>Thanks!<br>Daniel K. founder of RichPlugins Ltd' .
|
44 |
'</p>' .
|
45 |
'<p>' .
|
46 |
'<a href="https://wordpress.org/support/plugin/widget-google-reviews/reviews/#new-post" style="text-decoration:none;" target="_blank">' .
|
includes/admin/class-admin-tophead.php
CHANGED
@@ -39,7 +39,12 @@ class Admin_Tophead {
|
|
39 |
<img src="<?php esc_attr_e(GRW_ASSETS_URL . 'img/logo.png') ?>" alt="logo">
|
40 |
Google Reviews
|
41 |
</div>
|
42 |
-
<
|
|
|
|
|
|
|
|
|
|
|
43 |
</div>
|
44 |
<?php
|
45 |
}
|
39 |
<img src="<?php esc_attr_e(GRW_ASSETS_URL . 'img/logo.png') ?>" alt="logo">
|
40 |
Google Reviews
|
41 |
</div>
|
42 |
+
<div class="grw-version">
|
43 |
+
<div class="grw-version-free">Free Version: <?php echo GRW_VERSION; ?></div>
|
44 |
+
<div class="grw-version-upgrade">
|
45 |
+
<a href="https://richplugins.com/business-reviews-bundle-wordpress-plugin" target="_blank">Upgrade to business</a>
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
</div>
|
49 |
<?php
|
50 |
}
|
includes/class-activator.php
CHANGED
@@ -23,6 +23,7 @@ class Activator {
|
|
23 |
'grw_auth_code',
|
24 |
'grw_debug_mode',
|
25 |
'grw_feed_ids',
|
|
|
26 |
);
|
27 |
}
|
28 |
|
23 |
'grw_auth_code',
|
24 |
'grw_debug_mode',
|
25 |
'grw_feed_ids',
|
26 |
+
'grw_do_activation',
|
27 |
);
|
28 |
}
|
29 |
|
includes/class-builder-page.php
CHANGED
@@ -40,8 +40,6 @@ class Builder_Page {
|
|
40 |
wp_enqueue_media();
|
41 |
}
|
42 |
|
43 |
-
wp_nonce_field('grw_wpnonce', 'grw_nonce');
|
44 |
-
|
45 |
$feed_id = '';
|
46 |
$feed_post_title = '';
|
47 |
$feed_content = '';
|
@@ -66,6 +64,7 @@ class Builder_Page {
|
|
66 |
?>
|
67 |
<div class="grw-builder">
|
68 |
<form method="post" action="<?php echo esc_url(admin_url('admin-post.php?action=' . Post_Types::FEED_POST_TYPE . '_save')); ?>">
|
|
|
69 |
<input type="hidden" id="grw_post_id" name="<?php echo Post_Types::FEED_POST_TYPE; ?>[post_id]" value="<?php echo esc_attr($feed_id); ?>">
|
70 |
<input type="hidden" id="grw_current_url" name="<?php echo Post_Types::FEED_POST_TYPE; ?>[current_url]" value="<?php echo home_url($_SERVER['REQUEST_URI']); ?>">
|
71 |
<div class="grw-builder-workspace">
|
40 |
wp_enqueue_media();
|
41 |
}
|
42 |
|
|
|
|
|
43 |
$feed_id = '';
|
44 |
$feed_post_title = '';
|
45 |
$feed_content = '';
|
64 |
?>
|
65 |
<div class="grw-builder">
|
66 |
<form method="post" action="<?php echo esc_url(admin_url('admin-post.php?action=' . Post_Types::FEED_POST_TYPE . '_save')); ?>">
|
67 |
+
<?php wp_nonce_field('grw_wpnonce', 'grw_nonce'); ?>
|
68 |
<input type="hidden" id="grw_post_id" name="<?php echo Post_Types::FEED_POST_TYPE; ?>[post_id]" value="<?php echo esc_attr($feed_id); ?>">
|
69 |
<input type="hidden" id="grw_current_url" name="<?php echo Post_Types::FEED_POST_TYPE; ?>[current_url]" value="<?php echo home_url($_SERVER['REQUEST_URI']); ?>">
|
70 |
<div class="grw-builder-workspace">
|
includes/class-feed-serializer.php
CHANGED
@@ -28,6 +28,13 @@ class Feed_Serializer {
|
|
28 |
}
|
29 |
|
30 |
public function save($post_id, $title, $content) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
$post_id = wp_insert_post(array(
|
32 |
'ID' => $post_id,
|
33 |
'post_title' => $title,
|
28 |
}
|
29 |
|
30 |
public function save($post_id, $title, $content) {
|
31 |
+
|
32 |
+
if (!current_user_can('manage_options')) {
|
33 |
+
die('The account you\'re logged in to doesn\'t have permission to access this page.');
|
34 |
+
}
|
35 |
+
|
36 |
+
check_admin_referer('grw_wpnonce', 'grw_nonce');
|
37 |
+
|
38 |
$post_id = wp_insert_post(array(
|
39 |
'ID' => $post_id,
|
40 |
'post_title' => $title,
|
includes/class-plugin.php
CHANGED
@@ -27,9 +27,17 @@ final class Plugin {
|
|
27 |
register_activation_hook(GRW_PLUGIN_FILE, array($this, 'activate'));
|
28 |
register_deactivation_hook(GRW_PLUGIN_FILE, array($this, 'deactivate'));
|
29 |
|
|
|
30 |
add_action('plugins_loaded', array($this, 'register_services'));
|
31 |
}
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
public function register_services() {
|
34 |
$this->init_language();
|
35 |
|
@@ -118,6 +126,8 @@ final class Plugin {
|
|
118 |
|
119 |
add_option('grw_is_multisite', $network_wide);
|
120 |
|
|
|
|
|
121 |
$activator = new Activator(new Database());
|
122 |
$activator->activate();
|
123 |
}
|
27 |
register_activation_hook(GRW_PLUGIN_FILE, array($this, 'activate'));
|
28 |
register_deactivation_hook(GRW_PLUGIN_FILE, array($this, 'deactivate'));
|
29 |
|
30 |
+
add_action('admin_init', array($this, 'admin_init'));
|
31 |
add_action('plugins_loaded', array($this, 'register_services'));
|
32 |
}
|
33 |
|
34 |
+
public function admin_init() {
|
35 |
+
if (get_option('grw_do_activation', false)) {
|
36 |
+
delete_option('grw_do_activation');
|
37 |
+
wp_safe_redirect(admin_url('admin.php?page=grw'));
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
public function register_services() {
|
42 |
$this->init_language();
|
43 |
|
126 |
|
127 |
add_option('grw_is_multisite', $network_wide);
|
128 |
|
129 |
+
add_option('grw_do_activation', true);
|
130 |
+
|
131 |
$activator = new Activator(new Database());
|
132 |
$activator->activate();
|
133 |
}
|
languages/widget-google-reviews-cs_CZ.mo
CHANGED
Binary file
|
languages/widget-google-reviews-cs_CZ.po
CHANGED
@@ -1,16 +1,16 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
-
"MIME-Version: 1.0\n"
|
4 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
5 |
-
"Content-Transfer-Encoding: 8bit\n"
|
6 |
-
"X-Generator: Poedit 2.2\n"
|
7 |
"Project-Id-Version: \n"
|
8 |
"POT-Creation-Date: \n"
|
9 |
"PO-Revision-Date: \n"
|
10 |
-
"Language-Team: \n"
|
11 |
"Last-Translator: \n"
|
12 |
-
"
|
13 |
"Language: cs_CZ\n"
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
msgid "Google Rating"
|
16 |
msgstr "Google hodnocení"
|
@@ -27,5 +27,8 @@ msgstr "celá recenze"
|
|
27 |
msgid "Next Reviews"
|
28 |
msgstr "Další recenze"
|
29 |
|
30 |
-
msgid "
|
31 |
-
msgstr "
|
|
|
|
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
|
|
|
|
|
|
|
|
3 |
"Project-Id-Version: \n"
|
4 |
"POT-Creation-Date: \n"
|
5 |
"PO-Revision-Date: \n"
|
|
|
6 |
"Last-Translator: \n"
|
7 |
+
"Language-Team: \n"
|
8 |
"Language: cs_CZ\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n>=2 && n<=4 ? 1 : 2);\n"
|
13 |
+
"X-Generator: Poedit 3.0.1\n"
|
14 |
|
15 |
msgid "Google Rating"
|
16 |
msgstr "Google hodnocení"
|
27 |
msgid "Next Reviews"
|
28 |
msgstr "Další recenze"
|
29 |
|
30 |
+
msgid "Based on %s reviews"
|
31 |
+
msgstr "Na základě %s recenzí"
|
32 |
+
|
33 |
+
msgid "review us on"
|
34 |
+
msgstr "ohodnoťte nás na"
|
languages/widget-google-reviews-it_IT.mo
CHANGED
Binary file
|
languages/widget-google-reviews-it_IT.po
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
-
"Language: it_IT\n"
|
4 |
-
"MIME-Version: 1.0\n"
|
5 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
6 |
-
"Content-Transfer-Encoding: 8bit\n"
|
7 |
-
"X-Generator: Poedit 1.8.11\n"
|
8 |
"Project-Id-Version: \n"
|
9 |
"POT-Creation-Date: \n"
|
10 |
"PO-Revision-Date: \n"
|
11 |
"Last-Translator: \n"
|
12 |
"Language-Team: \n"
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
msgid "Google Rating"
|
15 |
msgstr "Valutazione di Google"
|
@@ -26,5 +26,8 @@ msgstr "leggi di più"
|
|
26 |
msgid "Next Reviews"
|
27 |
msgstr "Altre recensioni"
|
28 |
|
29 |
-
msgid "
|
30 |
-
msgstr "
|
|
|
|
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
3 |
"Project-Id-Version: \n"
|
4 |
"POT-Creation-Date: \n"
|
5 |
"PO-Revision-Date: \n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
+
"Language: it_IT\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 3.0.1\n"
|
13 |
|
14 |
msgid "Google Rating"
|
15 |
msgstr "Valutazione di Google"
|
26 |
msgid "Next Reviews"
|
27 |
msgstr "Altre recensioni"
|
28 |
|
29 |
+
msgid "Based on %s reviews"
|
30 |
+
msgstr "Basato su %s recensioni"
|
31 |
+
|
32 |
+
msgid "review us on"
|
33 |
+
msgstr "votaci su"
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://richplugins.com/business-reviews-bundle-wordpress-plugin
|
|
4 |
Tags: google reviews, google, reviews, rating, widget, reviews plugin, google business, testimonial, testimonials, google places reviews, map reviews, google my business
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 6.1
|
7 |
-
Stable tag: 2.2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -98,6 +98,12 @@ To find out more about who we are and what we do, here are some useful links:
|
|
98 |
|
99 |
== Changelog ==
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
= 2.2.2 =
|
102 |
* New Overiew page
|
103 |
* Bugfix: slider lite resize
|
4 |
Tags: google reviews, google, reviews, rating, widget, reviews plugin, google business, testimonial, testimonials, google places reviews, map reviews, google my business
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 6.1
|
7 |
+
Stable tag: 2.2.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
98 |
|
99 |
== Changelog ==
|
100 |
|
101 |
+
= 2.2.3 =
|
102 |
+
* Security: check admin role in widget create function
|
103 |
+
* Improve: initial Google reviews connection
|
104 |
+
* Improve: redirect to a widget builder page after plugin's activation
|
105 |
+
* Some language fixes
|
106 |
+
|
107 |
= 2.2.2 =
|
108 |
* New Overiew page
|
109 |
* Bugfix: slider lite resize
|