Version Description
(21 Aug 2019) =
- Major Feature: Option to add schema fields value from give dropdown meta list inside Modify Schema Output section #192
- Bug Fixed: Error log cluttered with php warning regarding count() #434
- Bug Fixed: Debug error #439
- Bug Fixed: Php json_encode function does not encode other languages characters, replace it with wp_json_encode #433
- Bug Fixed: CSS border-box rule causing issues #420
- Bug Fixed: Setup link of default image doesn't take it anywhere #429
- Bug Fixed: Conflict with Gutenberg and Merlin. Fatal error: Uncaught Error: Call to a member function is_block_editor() on null #413
Download this release
Release Info
Developer | magazine3 |
Plugin | Schema & Structured Data for WP & AMP |
Version | 1.9.1 |
Comparing to | |
See all releases |
Code changes from version 1.9 to 1.9.1
- admin_section/add-schema/add_new.php +4 -0
- admin_section/common-function.php +4 -1
- admin_section/css/jquery.rateyo.min.css +38 -38
- admin_section/css/main-style.css +3 -2
- admin_section/css/main-style.min.css +1173 -1
- admin_section/js/jquery.rateyo.min.js +3 -3
- admin_section/js/main-script.min.js +1784 -1
- admin_section/plugin-installer/install.php +5 -0
- admin_section/settings.php +16 -2
- admin_section/structure_admin.php +13 -9
- core/array-list/local-sub-business.php +132 -0
- core/array-list/meta_list.php +57 -0
- core/array-list/plugins.php +69 -0
- core/array-list/schemas.php +63 -0
- output/compatibility.php +133 -0
- output/function.php +7 -129
- output/output.php +5 -3
- output/service.php +1085 -87
- readme.txt +11 -1
- reviews/reviews_admin.php +329 -329
- reviews/reviews_service.php +542 -542
- structured-data-for-wp.php +5 -4
- view/paywall.php +65 -14
- view/post_specific.php +23 -214
- view/schema_type.php +7 -70
admin_section/add-schema/add_new.php
CHANGED
@@ -179,6 +179,10 @@ $saswp_add_data_type_config = array(
|
|
179 |
}
|
180 |
function saswp_add_new_header() {
|
181 |
|
|
|
|
|
|
|
|
|
182 |
global $saswp_installer_config;
|
183 |
|
184 |
// Get the current step.
|
179 |
}
|
180 |
function saswp_add_new_header() {
|
181 |
|
182 |
+
if( is_null ( get_current_screen() )) {
|
183 |
+
set_current_screen('Merlin');
|
184 |
+
}
|
185 |
+
|
186 |
global $saswp_installer_config;
|
187 |
|
188 |
// Get the current step.
|
admin_section/common-function.php
CHANGED
@@ -1986,7 +1986,7 @@ if ( ! defined('ABSPATH') ) exit;
|
|
1986 |
$author_details = array();
|
1987 |
|
1988 |
$author_id = get_the_author_meta('ID');
|
1989 |
-
$author_name
|
1990 |
$author_desc = get_the_author_meta( 'user_description' );
|
1991 |
|
1992 |
if(!$author_name && is_object($post)){
|
@@ -2085,6 +2085,9 @@ function saswp_check_plugin_active_status($pname){
|
|
2085 |
'free' => 'dw-question-answer/dw-question-answer.php',
|
2086 |
'pro' => 'dw-question-answer-pro/dw-question-answer.php',
|
2087 |
),
|
|
|
|
|
|
|
2088 |
|
2089 |
);
|
2090 |
|
1986 |
$author_details = array();
|
1987 |
|
1988 |
$author_id = get_the_author_meta('ID');
|
1989 |
+
$author_name = get_the_author();
|
1990 |
$author_desc = get_the_author_meta( 'user_description' );
|
1991 |
|
1992 |
if(!$author_name && is_object($post)){
|
2085 |
'free' => 'dw-question-answer/dw-question-answer.php',
|
2086 |
'pro' => 'dw-question-answer-pro/dw-question-answer.php',
|
2087 |
),
|
2088 |
+
'smart_crawl' => array(
|
2089 |
+
'free' => 'smartcrawl-seo/wpmu-dev-seo.php',
|
2090 |
+
),
|
2091 |
|
2092 |
);
|
2093 |
|
admin_section/css/jquery.rateyo.min.css
CHANGED
@@ -1,39 +1,39 @@
|
|
1 |
-
.jq-ry-container {
|
2 |
-
position: relative;
|
3 |
-
padding: 0 5px;
|
4 |
-
line-height: 0;
|
5 |
-
display: block;
|
6 |
-
cursor: pointer;
|
7 |
-
-webkit-box-sizing: content-box;
|
8 |
-
-moz-box-sizing: content-box;
|
9 |
-
box-sizing: content-box;
|
10 |
-
direction: ltr;
|
11 |
-
}
|
12 |
-
.jq-ry-container[readonly="readonly"] {
|
13 |
-
cursor: default;
|
14 |
-
}
|
15 |
-
.jq-ry-container > .jq-ry-group-wrapper {
|
16 |
-
position: relative;
|
17 |
-
width: 100%;
|
18 |
-
}
|
19 |
-
.jq-ry-container > .jq-ry-group-wrapper > .jq-ry-group {
|
20 |
-
position: relative;
|
21 |
-
line-height: 0;
|
22 |
-
z-index: 10;
|
23 |
-
white-space: nowrap;
|
24 |
-
}
|
25 |
-
.jq-ry-container > .jq-ry-group-wrapper > .jq-ry-group > svg {
|
26 |
-
display: inline-block;
|
27 |
-
}
|
28 |
-
.jq-ry-container > .jq-ry-group-wrapper > .jq-ry-group.jq-ry-normal-group {
|
29 |
-
width: 100%;
|
30 |
-
}
|
31 |
-
.jq-ry-container > .jq-ry-group-wrapper > .jq-ry-group.jq-ry-rated-group {
|
32 |
-
width: 0;
|
33 |
-
z-index: 11;
|
34 |
-
position: absolute;
|
35 |
-
top: 0;
|
36 |
-
left: 0;
|
37 |
-
overflow: hidden;
|
38 |
-
}
|
39 |
/*# sourceMappingURL=min/jquery.rateyo.min.css.map */
|
1 |
+
.jq-ry-container {
|
2 |
+
position: relative;
|
3 |
+
padding: 0 5px;
|
4 |
+
line-height: 0;
|
5 |
+
display: block;
|
6 |
+
cursor: pointer;
|
7 |
+
-webkit-box-sizing: content-box;
|
8 |
+
-moz-box-sizing: content-box;
|
9 |
+
box-sizing: content-box;
|
10 |
+
direction: ltr;
|
11 |
+
}
|
12 |
+
.jq-ry-container[readonly="readonly"] {
|
13 |
+
cursor: default;
|
14 |
+
}
|
15 |
+
.jq-ry-container > .jq-ry-group-wrapper {
|
16 |
+
position: relative;
|
17 |
+
width: 100%;
|
18 |
+
}
|
19 |
+
.jq-ry-container > .jq-ry-group-wrapper > .jq-ry-group {
|
20 |
+
position: relative;
|
21 |
+
line-height: 0;
|
22 |
+
z-index: 10;
|
23 |
+
white-space: nowrap;
|
24 |
+
}
|
25 |
+
.jq-ry-container > .jq-ry-group-wrapper > .jq-ry-group > svg {
|
26 |
+
display: inline-block;
|
27 |
+
}
|
28 |
+
.jq-ry-container > .jq-ry-group-wrapper > .jq-ry-group.jq-ry-normal-group {
|
29 |
+
width: 100%;
|
30 |
+
}
|
31 |
+
.jq-ry-container > .jq-ry-group-wrapper > .jq-ry-group.jq-ry-rated-group {
|
32 |
+
width: 0;
|
33 |
+
z-index: 11;
|
34 |
+
position: absolute;
|
35 |
+
top: 0;
|
36 |
+
left: 0;
|
37 |
+
overflow: hidden;
|
38 |
+
}
|
39 |
/*# sourceMappingURL=min/jquery.rateyo.min.css.map */
|
admin_section/css/main-style.css
CHANGED
@@ -943,7 +943,7 @@ Google review module ends here
|
|
943 |
border: 1px solid #d8d8d8;
|
944 |
display: inline-block;
|
945 |
margin-top: 10px;
|
946 |
-
width:
|
947 |
}
|
948 |
.saswp-upgrade-pro h2{
|
949 |
font-size: 20px;
|
@@ -1050,6 +1050,7 @@ Google review module ends here
|
|
1050 |
}
|
1051 |
|
1052 |
/*** Review Module section ***/
|
|
|
1053 |
*, *:before, *:after{
|
1054 |
box-sizing:border-box;
|
1055 |
}
|
@@ -1165,4 +1166,4 @@ Google review module ends here
|
|
1165 |
color: #fff;
|
1166 |
font-weight: 600;
|
1167 |
font-size: 18px;
|
1168 |
-
}
|
943 |
border: 1px solid #d8d8d8;
|
944 |
display: inline-block;
|
945 |
margin-top: 10px;
|
946 |
+
width: 100%;
|
947 |
}
|
948 |
.saswp-upgrade-pro h2{
|
949 |
font-size: 20px;
|
1050 |
}
|
1051 |
|
1052 |
/*** Review Module section ***/
|
1053 |
+
|
1054 |
*, *:before, *:after{
|
1055 |
box-sizing:border-box;
|
1056 |
}
|
1166 |
color: #fff;
|
1167 |
font-weight: 600;
|
1168 |
font-size: 18px;
|
1169 |
+
}
|
admin_section/css/main-style.min.css
CHANGED
@@ -1 +1,1173 @@
|
|
1 |
-
.saswp_warning{color:#ef6c00!important}.saswp_hide{display:none}.saswp-general table th{width:auto;font-weight:600;padding:0}.saswp-general table{margin-top:0}.saswp-general table td{padding:5px}.saswp-knowledge table th{width:auto;padding:0}.saswp-knowledge table{margin-top:0}.saswp-knowledge table td{padding:5px}.saswp-schema table th{width:auto;padding:0}.saswp-schema table{margin-top:0}.saswp-schema table td{padding:5px}.saswp-amp table th{width:auto;padding:0}.saswp-amp table{margin-top:0}.saswp-amp table td{padding:5px}.saswp-help table th{width:auto;padding:0}.saswp-support table th{width:auto;padding:0}.saswp-review table th{width:auto;padding:0}.saswp-help table{margin-top:0}.saswp-help table td{padding:5px}.saswp-settings-list{display:inline-block;width:100%}.saswp-settings-list li{padding-left:0}.saswp-settings-list li div label{font-weight:600}.saswp-general h2{margin-bottom:0}.saswp-knowledge h2{margin-bottom:0}.saswp-schema h2{margin-bottom:0}.saswp-help h2{margin-bottom:0}.saswp-settings-form p.submit{margin-top:0}.saswp_qanda_p{font-weight:500}.saswp-display-none{display:none!important}.saswp-placement-groups{border:1px solid #e5e5e5}.saswp-query-success{color:#060}.saswp-query-error{color:#bf3322}.saswp-tools table th{width:auto;padding:0}.saswp-tools table{margin-top:0}.saswp-tools table td{padding:5px}.saswp-tools-field-title strong{padding-right:130px}.saswp-tools .saswp-tooltip{width:230px}.saswp-tools .saswp-knowledge-label{float:left}.saswp-error{color:red!important}.saswp-tooltip{position:relative;display:inline-block}.saswp-tooltip .saswp-tooltiptext{visibility:hidden;width:200px;background-color:#000;color:#fff;text-align:center;border-radius:6px;padding:5px 0;position:absolute;z-index:1;bottom:100%;left:50%;margin-left:-25px}.saswp-tooltiptext::after{content:"";position:absolute;top:100%;left:10%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#000 transparent transparent transparent}.saswp-knowledge-base .saswp-knowledge-label{width:200px;float:left;clear:both}.saswp-knowledge-base .saswp-knowledge-field{width:75%;float:right}.saswp-social-fileds ul{display:grid;grid-template-columns:26.5% 1fr}.saswp-social-fileds li{display:flex}.saswp-social-fileds .saswp-knowledge-field{width:100%;margin-left:10px}.saswp-social-fileds .saswp-knowledge-field input{float:right;margin:inherit}.saswp-schema-type-fields .saswp-knowledge-label{width:200px;float:left;clear:both}.saswp-schema-type-fields .saswp-knowledge-field{width:75%;float:right}.saswp-settings-first-div{width:70%}.saswp-settings-container{display:inline-flex;width:100%}.saswp-settings-second-div{float:right;position:relative;top:20px;margin-right:30px;margin-top:37px}.saswp-feedback-panel{height:200px;width:280px;background:#fff;position:relative}.saswp-start-quck-setup{position:relative;float:inherit;top:7px;left:15px}.saswp-feedback-panel ul{list-style-type:circle;list-style:decimal;padding-left:30px;font-size:15px}.saswp-feedback-panel a{text-decoration:none}.saswp-feedback-panel h2{text-align:center;padding-top:18px}.saswp-social-sharing-buttons{text-align:center;padding-top:20px}.saswp-facebook-share{background:#3b5998;box-shadow:0 0 0 #1b95e0!important;color:#fff!important;line-height:20px!important;height:21px!important;border-radius:3px;margin-right:5px}.saswp-social-sharing-buttons a{text-align:center;padding:8px}.twitter-share-button{background:#1b95e0!important;box-shadow:0 0 0 #1b95e0!important;color:#fff!important;line-height:20px!important;height:21px!important;border-radius:3px;margin-left:5px}.saswp-placement-button{padding:3px 10px;color:#0d0d0d;font-size:14px;border:1px solid #aaa;border-radius:2px;background:linear-gradient(#ededed,#fff)}.saswp-placement-table td{padding:5px 10px!important}.saswp-archive-div .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-archive-div .saswp-knowledge-label{float:left;clear:both}.saswp-amp .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-amp .saswp-knowledge-label{float:left;clear:both}.saswp-review .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-review .saswp-knowledge-label{float:left;clear:both}.saswp-compativility-div .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-compativility-div .saswp-knowledge-label{float:left;clear:both}.saswp-compativility-div li{display:inline-flex}.saswp-seller-div .saswp-knowledge-label{float:left;clear:both}.saswp-seller-div .saswp-knowledge-field{float:left;width:70%}.saswp-post-specific-tab-wrapper{display:inline-block;width:25%;vertical-align:top;box-sizing:border-box;padding-right:10px}.saswp-post-specific-container{display:inline-block;width:calc(75% - 1px);border-left:1px solid #eee}.saswp-post-specific-wrapper{padding:10px}.saswp-tab a.selected{background-color:#ccc}.saswp-tab-links{display:block;background-color:inherit;color:#000;padding:6px 10px;outline:0;text-align:left;cursor:pointer;transition:.3s;font-size:15px;width:130px;overflow:hidden;margin-right:10px}.saswp-star-rating{cursor:pointer}.saswp-post-specific-wrapper select{width:100%}.saswp-review-tables{width:100%}.saswp-over-all-raring{float:right}.saswp-review-pros-and-cons{position:relative;clear:both}.saswp-review-pros-and-cons>div:first{padding-left:10px}.saswp-review-pros-and-cons>div{width:49%;display:inline-block}.saswp-review-pros-and-cons>div:nth-child(2){padding-left:12px}.saswp-wp-ediot-desc{margin-bottom:-23px;display:block}.saswp-review-description{margin-top:40px;padding-top:10px;border-top:1px solid #eee}.saswp-review-pros-and-cons{margin-top:40px;padding-top:10px;border-top:1px solid #eee}.saspw-review-item-list{margin-top:20px;border-top:1px solid #eee}.saswp-review-item-list-table{padding-bottom:10px}#sasw-review input[type=text]{width:180px}#sasw-review input[type=number]{width:180px}#saswp-review-item-enable{width:10px}.saswp-enable-review-on-post{padding-bottom:10px}.saswp-enable-review-on-post label{font-weight:500}.saswp-compatibility table th{width:auto;padding:0}.saswp-compatibility .saswp-knowledge-label{float:left;clear:both}.saswp-tools .saswp-knowledge-label{float:left;clear:both}.saswp-tools .saswp-knowledge-field{float:right;width:69%;padding-bottom:10px}.saswp_kg_logo,.saswp_person_fields{background-color:#fff!important}.saswp_image_thumbnail{padding-top:5px;display:inline-block}.saswp-compatibility .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-job-posting-note,.saswp-schem-type-note{color:#d2691e}.saswp-custom-fields-name{border:1px solid #aaa;border-radius:4px}.saswp-option-table-class p{margin:auto;font-style:italic;color:#666}.saswp-switch{position:relative;display:inline-block;width:40px;height:22px;border:20px}.saswp-switch input{opacity:0;width:0;height:0}.saswp-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#5a6783;transition:.4s;border-radius:20px}.saswp-slider:before{position:absolute;content:"";height:15px;width:15px;left:4px;bottom:4px;background-color:#fff;transition:.4s;border-radius:20px}input:checked+.saswp-slider{background-color:#61bd3b;border-radius:30px}input:focus+.saswp-slider{box-shadow:0 0 1px #2196f3}input:checked+.saswp-slider:before{transform:translateX(15px)}.saswp-slider.saswp-round{border-radius:34px}.saswp-slider.saswp-round:before{border-radius:50%}.saswp-tab-nav li{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;border-bottom:1px solid #eee}.saswp-tab-nav .selected{background-color:#ccc}.saswp-single-post-restore .saswp-switch{height:28px}.saswp-single-post-restore .saswp-slider:before{height:20px}.saswp-wdi-rate-stars{display:inline-block;color:#ffb900;position:relative;top:3px}.saswp-wdi-rate-stars svg{fill:#ffb900}.saswp-wdi-rate-stars svg:hover{fill:#ffb900}.saswp-wdi-rate-stars svg:hover~svg{fill:none}.option-table-class{width:100%}.option-table-class tr td{padding:10px 10px 10px 10px}.option-table-class tr>td{width:30%}.option-table-class tr td:last-child{width:60%}.saswp-option-table-class input[type=text],.saswp-option-table-class select{width:100%}.saswp-paywall-table-class input[type=text],.saswp-paywall-table-class select{width:100%}.saswp-custom-fields-table select{width:100%}.saswp-email_schema table th{width:auto;padding:0}.saswp-email_schema .saswp-knowledge-label{float:left;clear:both}.saswp-email_schema .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-add-on-plugin label{margin-top:10px}.saswp-add-on-plugin span{width:250px;display:inline-block}.saswp-knowledge-label label[for=saswp_search_box_schema_checkbox]{padding-left:10px}.saswp-knowledge-label label[for=saswp-woocommerce-booking-checkbox]{padding-left:10px}.saswp-knowledge-label label[for=saswp-woocommerce-membership-checkbox]{padding-left:10px}.saswp-global-selected{color:#000;font-weight:500}#saswp-global-tabs a{cursor:pointer}#saswp-global-tabs{padding-left:5px}#saswp-tools-tabs a{cursor:pointer}#saswp-review-tabs a{cursor:pointer}#saswp-tools-tabs{padding-left:5px}.saswp-need-help{padding-left:60px}.saswp-heading{display:inline-flex;align-items:baseline}.saswp-heading h2{margin-bottom:0}.saswp-view-docs a{margin-right:5px!important;margin-top:10px!important}.saswp-tabs .nav-tab{margin-left:4px}.saswp-panel{padding:7px 18px;background-color:#fff;box-shadow:0 0 20px 1px #d2cccc}.saswp-g-review-header{margin-top:50px}.saswp-g-review-body{display:inline-grid;grid-template-columns:1fr 300px;grid-gap:30px;margin-top:30px}.saswp-channel-list{margin-right:15px}.saswp-input-fields{display:inline-flex;align-items:center;margin-bottom:8px;width:100%}.saswp-input-fields label{width:130px}.saswp-input-fields select{width:100%}.saswp-panel h3{font-size:20px;line-height:1.4;color:#222;text-align:center;margin:10px 0 20px 0}.saswp-input-fields a.button-primary{margin-top:10px}.saswp-glg-review-body{display:grid;grid-template-columns:100px 1fr;grid-gap:20px;background:#fff;padding:20px;box-shadow:0 0 20px 1px #d2cccc;margin-bottom:30px}.saswp-g-plus{float:right;font-size:15px}.saswp-rtng{padding-left:5px;font-size:14px}.saswp-pt-dt{font-size:12px;color:#999;font-weight:600;margin-top:5px;display:inline-block}.saswp-str{display:inline-block;width:100%;vertical-align:middle}.saswp-athr{font-size:15px;line-height:1.4;color:#000;font-weight:700;display:inline-block;vertical-align:middle}.saswp-str-rtng .saswp-rvw-str{display:inline-block;vertical-align:middle;padding-left:10px;width:auto}.saswp-rv-cnt p{font-size:16px;line-height:1.6;color:#000;margin:10px 0 0 0}.saswp-rv-img img{max-width:100px;border-radius:100%}.saswp-premium_features table th,.saswp-services table th{width:auto;padding:0}.saswp-features-blocks{display:inline-grid;grid-template-columns:1fr 1fr;grid-gap:20px}.saswp-features-blocks li{background:#fff;padding:25px;border:1px solid #d8d8d8}.saswp-features-blocks li a{text-decoration:none}.saswp-ele-ic{border-radius:256px;display:inline-block;padding:8px 10px 8px 10px;width:70px;margin-right:20px;float:left}.saswp-ele-ic img{width:100%}.saswp-ele-1{background:#96588a}.saswp-ele-2{background:#00a97e}.saswp-ele-3{background:#cacaca}.saswp-ele-4{background:#9c56cc}.saswp-ele-tlt h3{margin:0;font-size:18px;line-height:1.4}.saswp-ele-tlt p{margin-top:10px}.saswp-sts-btn{box-sizing:border-box;height:52px;margin-top:20px;padding:6px 15px;border:1px solid #e5e5e5;border-radius:3px;display:flex;align-items:center;justify-content:space-between}.saswp-d-btn{background:#d2150a;padding:6px 18px;border-radius:30px;font-size:14px;color:#fff}.form-wrap .saswp-sts-txt{font-size:16px;color:#000}.saswp-sts-txt span{color:#bebfc0;padding-left:5px}.saswp_review_platform .saswp-g-plus{float:left}.saswp-pc-wrap{background-color:#004f74;padding:15px 15px 15px 30px;color:#fff;display:inline-flex;width:100%;flex-wrap:wrap;margin-bottom:20px}.saswp-pc-wrap .saswp-lst span{font-size:18px;font-weight:500;margin-bottom:10px;display:inline-block;line-height:1.3}.saswp-pc-wrap .saswp-lst{flex:1 0 42%}.saswp-pc-wrap .saswp-lst ul{margin:0}.saswp-pc-wrap .saswp-lst p{list-style-type:none;font-size:15px;font-weight:lighter;line-height:1.2;margin-bottom:10px;position:relative;padding-left:20px;color:#eee}.saswp-pc-wrap .saswp-lst p:before{content:'';position:absolute;width:8px;height:8px;background-color:#ccc;left:0;top:6px;border-radius:10px}.sgl .saswp-rvw{width:100%;margin-bottom:34px;font-size:13px;border-bottom:1px solid #ededed}.saswp-rvw-hd span,.saswp-rvw-sm span{background-color:#222;color:#fff;display:inline-block;font-size:15px}.saswp-rvw-hd span{line-height:1.4;padding:8px 12px 6px;margin:26px 0}.saswp-rvw td{padding:7px 14px}.saswp-rvw td,.sgl table td{border:1px solid #ededed}.saswp-rvw tbody{width:100%}.saswp-rvw-sm span{padding:8px 12px 6px;margin-bottom:13px;position:relative;line-height:1.2}.saswp-rvw-fs{line-height:1.5;font-size:48px;font-weight:600;margin-bottom:5px}.saswp-rvw-ov .ovs{font-size:11px;font-weight:600}.sgl .saswp-rvw tr td{background:#fff;width:100%}.sgl .saswp-rvw tr:hover td{background-color:#fcfcfc}.saswp-rvw .saswp-rvw-sm{padding:21px 14px}.str-ic{font-size:18px;line-height:1.2}.saswp-rvw-str{display:inline-flex;width:100%}.saswp-rvw-str .df-clr,.saswp-rvw-str .half-str,.saswp-rvw-str .str-ic{display:inline-block;width:20px;height:16px;background-repeat:no-repeat}.saswp-rvw-ov{text-align:center}.saswp-rvw-str .half-str{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNNDgyLjIwNywxODYuOTczbC0xNTkuNjk5LTMzLjcwNUwyNDEuMTA0LDExLjgwM2wtODEuNDA0LDE0MS40NjVMMCwxODYuOTczbDEwOS4zODgsMTIxLjEzNEw5Mi4wOTQsNDcwLjQwNGwxNDkuMDEtNjYuNiAgbDE0OS4wMSw2Ni42bC0xNy4yOTQtMTYyLjI5Nkw0ODIuMjA3LDE4Ni45NzN6IE0yNDEuMTA0LDM3MC45NDNWNzEuOTUzbDYyLjA5LDEwNy45TDQyNSwyMDUuNTYxbC04My40MzMsOTIuMzkzbDEzLjE5MSwxMjMuNzg4ICBMMjQxLjEwNCwzNzAuOTQzeiIgZmlsbD0iI2ZmZDcwMCIvPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K)}.saswp-rvw-str .str-ic{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiNmZmQ3MDAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-rvw-str .df-clr{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiM2MzVlNjMiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-g-review-header{margin-top:50px}.saswp-g-review-body{display:inline-grid;grid-template-columns:1fr 300px;grid-gap:30px;margin-top:30px;width:100%}.saswp-channel-list{margin-right:15px}.saswp-input-fields{display:inline-flex;align-items:center;margin-bottom:8px;width:100%}.saswp-input-fields label{width:130px}.saswp-panel h3{font-size:20px;line-height:1.4;color:#222;text-align:center;margin:10px 0 20px 0}.saswp-input-fields a.button-primary{margin-top:10px}.saswp-glg-review-body{display:grid;grid-template-columns:100px 1fr;grid-gap:20px;background:#fff;padding:20px;box-shadow:0 0 20px 1px #d2cccc;margin-bottom:30px}.saswp-g-plus{float:right;font-size:15px;width:20px;height:20px}.saswp-g-plus img{width:100%}.saswp-rtng{padding-left:5px;font-size:14px}.saswp-pt-dt{font-size:12px;color:#999;font-weight:600;margin-top:5px;display:inline-block}.saswp-athr{font-size:15px;line-height:1.4;color:#000;font-weight:700}.saswp-rv-cnt p{font-size:16px;line-height:1.6;color:#000;margin:10px 0 0 0}.saswp-rv-img img{max-width:100px}.saswp-g-review-header div{margin-top:10px}.saswp-upgrade-pro{background:#fff;padding:25px;border:1px solid #d8d8d8;display:inline-block;margin-top:10px;width:81%}.saswp-upgrade-pro h2{font-size:20px;margin:0;color:#23282d;font-weight:600;text-align:center}.saswp-upgrade-pro ul{margin:25px 0 20px 0;display:inline-block}.saswp-upgrade-pro ul li{position:relative;padding-left:30px;font-size:14px;line-height:1.4;margin-bottom:10px}.saswp-upgrade-pro ul li:before{content:"";background-image:url(../images/check.png);background-repeat:no-repeat;background-size:20px;width:20px;height:20px;position:absolute;left:2px;top:2px}.saswp-upgrade-pro a{background:#d2150a;padding:10px 0;display:block;text-align:center;color:#fff;text-decoration:none;font-size:16px;font-weight:600;letter-spacing:1px;border-radius:5px}.saswp_image_prev{max-width:200px;max-height:200px;float:left;padding-left:2px}.saswp_prev_close{position:relative;width:30px;height:30px;top:12px;font-size:20px;top:-5px;text-decoration:none}.saswp-add-custom-schema-div{margin-top:10px;border-top:1px solid #eee;padding-top:5px}.saswp-nav-menu-list label{padding-left:10px}.saswp-faq-question-table-div,.saswp-how-to-step-table-div,.saswp-how-to-supply-table-div,.saswp-how-to-tool-table-div,.saswp-mc-cause-table-div,.saswp-mc-risk_factor-table-div,.saswp-mc-symptom-table-div,.saswp-trip-itinerary-table-div,.saswp-tvseries-actor-table-div,.saswp-tvseries-season-table-div{border:1px solid #aaa;margin-top:5px;margin-bottom:5px}.saswp-table-close{float:right;cursor:pointer}.saswp-table-create-onajax table td,.saswp-table-create-onajax table th{padding:5px}.saswp-table-create-onajax select{width:98%}.saswp-g-reviews-settings-table input{width:100%}.saswp_rv_module_pro_notice{border:1px solid #d8d8d8;background:#fff}*,:after,:before{box-sizing:border-box}.saswp-settings-list .saswp-rev-mod{width:100%;display:inline-block;margin-top:20px}.saswp-rev-mod .saswp-knowledge-label{width:100%;display:inline-block;padding:10px 16px;font-weight:600;font-size:16px;color:#333;background:#f9f9f9;border:1px solid #d8d8d8;border-bottom:none}.saswp-rev-mod .saswp-knowledge-field{width:100%;display:inline-block}.saswp-rev-mod .saswp_rv_module_pro_notice{padding:20px}.saswp_cmpny_lst{width:100%;display:inline-block;margin-top:30px}.saswp_rv_module_pro_notice ul{margin:15px 0 20px 0;width:100%;display:inline-grid;grid-template-columns:1fr 1fr 1fr;grid-gap:20px;border-bottom:1px solid #eee;padding-bottom:20px}.saswp_rv_module_pro_notice ul li{position:relative;font-size:15px;line-height:1.5;color:#444;margin:0}.saswp_rv_module_pro_notice ul li span{padding-left:3px}.saswp_rv_module_pro_notice h2{text-align:center;font-size:31px}.saswp_rv_module_pro_notice .saswp_desc{text-align:center;font-size:18px;font-style:normal;color:#000}.saswp_rv_module_pro_notice .saswp_desc a{font-style:italic}.saswp_rv_module_pro_notice .saswp_lst{color:grey;font-family:georgia;font-style:italic;font-style:italic;font-size:15px;font-weight:600}.saswp_rv_module_pro_notice .saswp_avlbl{color:#2a902e;font-family:georgia;font-style:italic;font-size:15px;font-weight:600}.saswp_rv_module_pro_notice ul li img{width:20px;height:20px;position:relative;top:4px}.saswp-rev-btn{width:100%;display:inline-block;margin-top:20px;text-align:center}.saswp-rev-btn span{display:block;font-size:13px;margin-bottom:15px}.saswp-rev-btn a{padding:12px 18px;display:inline-block;text-decoration:none;border-radius:5px;background:#0085ba;color:#fff;font-weight:600;font-size:18px}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
To change this license header, choose License Headers in Project Properties.
|
3 |
+
To change this template file, choose Tools | Templates
|
4 |
+
and open the template in the editor.
|
5 |
+
*/
|
6 |
+
/*
|
7 |
+
Created on : Jul 27, 2018, 5:36:26 PM
|
8 |
+
Author : Magazine3
|
9 |
+
*/
|
10 |
+
.saswp_warning{
|
11 |
+
color: #ef6c00 !important;
|
12 |
+
}
|
13 |
+
|
14 |
+
.saswp_hide{
|
15 |
+
display: none;
|
16 |
+
}
|
17 |
+
.saswp-general table th{
|
18 |
+
width: auto;
|
19 |
+
font-weight: 600;
|
20 |
+
padding: 0px;
|
21 |
+
}
|
22 |
+
.saswp-general table{
|
23 |
+
margin-top: 0px;
|
24 |
+
}
|
25 |
+
.saswp-general table td{
|
26 |
+
padding: 5px;
|
27 |
+
}
|
28 |
+
.saswp-knowledge table th{
|
29 |
+
width: auto;
|
30 |
+
padding: 0px;
|
31 |
+
}
|
32 |
+
.saswp-knowledge table{
|
33 |
+
margin-top: 0px;
|
34 |
+
}
|
35 |
+
.saswp-knowledge table td{
|
36 |
+
padding: 5px;
|
37 |
+
}
|
38 |
+
.saswp-schema table th{
|
39 |
+
width: auto;
|
40 |
+
padding: 0px;
|
41 |
+
}
|
42 |
+
.saswp-schema table{
|
43 |
+
margin-top: 0px;
|
44 |
+
}
|
45 |
+
.saswp-schema table td{
|
46 |
+
padding: 5px;
|
47 |
+
}
|
48 |
+
.saswp-amp table th{
|
49 |
+
width: auto;
|
50 |
+
padding: 0px;
|
51 |
+
}
|
52 |
+
.saswp-amp table{
|
53 |
+
margin-top: 0px;
|
54 |
+
}
|
55 |
+
.saswp-amp table td{
|
56 |
+
padding: 5px;
|
57 |
+
}
|
58 |
+
.saswp-help table th{
|
59 |
+
width: auto;
|
60 |
+
padding: 0px;
|
61 |
+
}
|
62 |
+
.saswp-support table th{
|
63 |
+
width: auto;
|
64 |
+
padding: 0px;
|
65 |
+
}
|
66 |
+
.saswp-review table th{
|
67 |
+
width: auto;
|
68 |
+
padding: 0px;
|
69 |
+
}
|
70 |
+
.saswp-help table{
|
71 |
+
margin-top: 0px;
|
72 |
+
}
|
73 |
+
.saswp-help table td{
|
74 |
+
padding: 5px;
|
75 |
+
}
|
76 |
+
.saswp-settings-list{
|
77 |
+
display:inline-block;
|
78 |
+
width:100%
|
79 |
+
}
|
80 |
+
.saswp-settings-list li{
|
81 |
+
padding-left:0px;
|
82 |
+
}
|
83 |
+
.saswp-settings-list li div label{
|
84 |
+
font-weight: 600;
|
85 |
+
}
|
86 |
+
.saswp-general h2{
|
87 |
+
margin-bottom: 0px;
|
88 |
+
}
|
89 |
+
.saswp-knowledge h2{
|
90 |
+
margin-bottom: 0px;
|
91 |
+
}
|
92 |
+
.saswp-schema h2{
|
93 |
+
margin-bottom: 0px;
|
94 |
+
}
|
95 |
+
.saswp-help h2{
|
96 |
+
margin-bottom: 0px;
|
97 |
+
}
|
98 |
+
.saswp-settings-form p.submit{
|
99 |
+
margin-top:0px;
|
100 |
+
}
|
101 |
+
.saswp_qanda_p{
|
102 |
+
font-weight: 500;
|
103 |
+
}
|
104 |
+
.saswp-display-none{
|
105 |
+
display: none !important;
|
106 |
+
}
|
107 |
+
.saswp-placement-groups{
|
108 |
+
border: 1px solid #e5e5e5;
|
109 |
+
}
|
110 |
+
.saswp-query-success{
|
111 |
+
color: #006600;
|
112 |
+
}
|
113 |
+
.saswp-query-error{
|
114 |
+
color: #bf3322;
|
115 |
+
}
|
116 |
+
.saswp-tools table th{
|
117 |
+
width: auto;
|
118 |
+
padding: 0px;
|
119 |
+
}
|
120 |
+
.saswp-tools table{
|
121 |
+
margin-top: 0px;
|
122 |
+
}
|
123 |
+
.saswp-tools table td{
|
124 |
+
padding: 5px;
|
125 |
+
}
|
126 |
+
.saswp-tools-field-title strong{
|
127 |
+
padding-right: 130px;
|
128 |
+
}
|
129 |
+
.saswp-tools .saswp-tooltip{
|
130 |
+
width: 230px;
|
131 |
+
}
|
132 |
+
.saswp-tools .saswp-knowledge-label {
|
133 |
+
float: left;
|
134 |
+
}
|
135 |
+
.saswp-error{
|
136 |
+
color: #ff0000 !important;
|
137 |
+
}
|
138 |
+
/*
|
139 |
+
Tooltip css starts here
|
140 |
+
|
141 |
+
*/
|
142 |
+
.saswp-tooltip {
|
143 |
+
position: relative;
|
144 |
+
display: inline-block;
|
145 |
+
}
|
146 |
+
.saswp-tooltip .saswp-tooltiptext {
|
147 |
+
visibility: hidden;
|
148 |
+
width: 200px;
|
149 |
+
background-color: black;
|
150 |
+
color: #fff;
|
151 |
+
text-align: center;
|
152 |
+
border-radius: 6px;
|
153 |
+
padding: 5px 0;
|
154 |
+
|
155 |
+
/* Position the tooltip */
|
156 |
+
position: absolute;
|
157 |
+
z-index: 1;
|
158 |
+
bottom: 100%;
|
159 |
+
left: 50%;
|
160 |
+
margin-left: -25px;
|
161 |
+
}
|
162 |
+
/*.saswp-tooltip:hover .saswp-tooltiptext {
|
163 |
+
visibility: visible;
|
164 |
+
}*/
|
165 |
+
|
166 |
+
.saswp-tooltiptext::after {
|
167 |
+
content: "";
|
168 |
+
position: absolute;
|
169 |
+
top: 100%;
|
170 |
+
left: 10%;
|
171 |
+
margin-left: -5px;
|
172 |
+
border-width: 5px;
|
173 |
+
border-style: solid;
|
174 |
+
border-color: black transparent transparent transparent;
|
175 |
+
}
|
176 |
+
|
177 |
+
/*
|
178 |
+
Tooltip css ends here
|
179 |
+
|
180 |
+
*/
|
181 |
+
.saswp-knowledge-base .saswp-knowledge-label{
|
182 |
+
width:200px;
|
183 |
+
float:left;
|
184 |
+
clear: both;
|
185 |
+
|
186 |
+
}
|
187 |
+
.saswp-knowledge-base .saswp-knowledge-field{
|
188 |
+
width:75%;
|
189 |
+
float:right;
|
190 |
+
}
|
191 |
+
|
192 |
+
.saswp-social-fileds ul{
|
193 |
+
display: grid;
|
194 |
+
grid-template-columns: 26.5% 1fr;
|
195 |
+
}
|
196 |
+
.saswp-social-fileds li{
|
197 |
+
display: flex;
|
198 |
+
}
|
199 |
+
.saswp-social-fileds .saswp-knowledge-field{
|
200 |
+
width: 100%;
|
201 |
+
margin-left: 10px;
|
202 |
+
}
|
203 |
+
.saswp-social-fileds .saswp-knowledge-field input{
|
204 |
+
float: right;
|
205 |
+
margin: inherit;
|
206 |
+
}
|
207 |
+
.saswp-schema-type-fields .saswp-knowledge-label{
|
208 |
+
width:200px;
|
209 |
+
float:left;
|
210 |
+
clear: both;
|
211 |
+
}
|
212 |
+
.saswp-schema-type-fields .saswp-knowledge-field{
|
213 |
+
width:75%;
|
214 |
+
float:right;
|
215 |
+
}
|
216 |
+
.saswp-settings-first-div{
|
217 |
+
width: 70%;
|
218 |
+
}
|
219 |
+
.saswp-settings-container{
|
220 |
+
display: inline-flex;
|
221 |
+
width: 100%;
|
222 |
+
}
|
223 |
+
.saswp-settings-second-div{
|
224 |
+
float: right;
|
225 |
+
position: relative;
|
226 |
+
top: 20px;
|
227 |
+
margin-right: 30px;
|
228 |
+
margin-top: 37px;
|
229 |
+
}
|
230 |
+
.saswp-feedback-panel{
|
231 |
+
height: 200px;
|
232 |
+
width: 280px;
|
233 |
+
background: #ffffff;
|
234 |
+
position: relative;
|
235 |
+
|
236 |
+
}
|
237 |
+
.saswp-start-quck-setup{
|
238 |
+
position: relative;
|
239 |
+
float: inherit;
|
240 |
+
top: 7px;
|
241 |
+
left:15px;
|
242 |
+
}
|
243 |
+
.saswp-feedback-panel ul{
|
244 |
+
list-style-type: circle;
|
245 |
+
list-style:decimal;
|
246 |
+
padding-left: 30px;
|
247 |
+
font-size: 15px;
|
248 |
+
|
249 |
+
}
|
250 |
+
.saswp-feedback-panel a{
|
251 |
+
text-decoration: none;
|
252 |
+
|
253 |
+
}
|
254 |
+
.saswp-feedback-panel h2{
|
255 |
+
text-align: center;
|
256 |
+
padding-top: 18px;
|
257 |
+
|
258 |
+
}
|
259 |
+
.saswp-social-sharing-buttons {
|
260 |
+
text-align: center;
|
261 |
+
padding-top: 20px;
|
262 |
+
|
263 |
+
|
264 |
+
}
|
265 |
+
.saswp-facebook-share{
|
266 |
+
background: #3B5998;
|
267 |
+
box-shadow: 0 0px 0 #1b95e0 !important;
|
268 |
+
color: #fff !important;
|
269 |
+
line-height: 20px !important;
|
270 |
+
height: 21px !important;
|
271 |
+
border-radius: 3px;
|
272 |
+
margin-right: 5px;
|
273 |
+
}
|
274 |
+
.saswp-social-sharing-buttons a{
|
275 |
+
text-align: center;
|
276 |
+
padding: 8px;
|
277 |
+
|
278 |
+
|
279 |
+
}
|
280 |
+
.twitter-share-button{
|
281 |
+
background: #1b95e0 !important;
|
282 |
+
box-shadow: 0 0px 0 #1b95e0 !important;
|
283 |
+
color:#fff !important;
|
284 |
+
line-height: 20px !important;
|
285 |
+
height: 21px !important;
|
286 |
+
border-radius: 3px;
|
287 |
+
margin-left: 5px;
|
288 |
+
|
289 |
+
}
|
290 |
+
.saswp-placement-button{
|
291 |
+
padding: 3px 10px;
|
292 |
+
color: #0d0d0d;
|
293 |
+
font-size: 14px;
|
294 |
+
border: 1px solid #aaa;
|
295 |
+
border-radius: 2px;
|
296 |
+
background: linear-gradient(#ededed, #ffffff);
|
297 |
+
}
|
298 |
+
.saswp-placement-table td {
|
299 |
+
padding: 5px 10px !important;
|
300 |
+
}
|
301 |
+
.saswp-archive-div .saswp-knowledge-field{
|
302 |
+
float: right;
|
303 |
+
width: 75%;
|
304 |
+
padding-bottom: 10px;
|
305 |
+
}
|
306 |
+
.saswp-archive-div .saswp-knowledge-label{
|
307 |
+
float:left;
|
308 |
+
clear: both;
|
309 |
+
}
|
310 |
+
|
311 |
+
.saswp-amp .saswp-knowledge-field{
|
312 |
+
float: right;
|
313 |
+
width: 75%;
|
314 |
+
padding-bottom: 10px;
|
315 |
+
}
|
316 |
+
.saswp-amp .saswp-knowledge-label{
|
317 |
+
float:left;
|
318 |
+
clear: both;
|
319 |
+
}
|
320 |
+
|
321 |
+
.saswp-review .saswp-knowledge-field{
|
322 |
+
float: right;
|
323 |
+
width: 75%;
|
324 |
+
padding-bottom: 10px;
|
325 |
+
}
|
326 |
+
.saswp-review .saswp-knowledge-label{
|
327 |
+
float:left;
|
328 |
+
clear: both;
|
329 |
+
}
|
330 |
+
|
331 |
+
.saswp-compativility-div .saswp-knowledge-field{
|
332 |
+
float: right;
|
333 |
+
width: 75%;
|
334 |
+
padding-bottom: 10px;
|
335 |
+
}
|
336 |
+
.saswp-compativility-div .saswp-knowledge-label{
|
337 |
+
float:left;
|
338 |
+
clear: both;
|
339 |
+
}
|
340 |
+
.saswp-compativility-div li {
|
341 |
+
display: inline-flex;
|
342 |
+
}
|
343 |
+
.saswp-seller-div .saswp-knowledge-label{
|
344 |
+
float: left;
|
345 |
+
|
346 |
+
clear: both;
|
347 |
+
}
|
348 |
+
.saswp-seller-div .saswp-knowledge-field{
|
349 |
+
float: left;
|
350 |
+
width: 70%;
|
351 |
+
}
|
352 |
+
.saswp-post-specific-tab-wrapper{
|
353 |
+
display: inline-block;
|
354 |
+
width: 25%;
|
355 |
+
vertical-align: top;
|
356 |
+
box-sizing: border-box;
|
357 |
+
padding-right:10px;
|
358 |
+
}
|
359 |
+
.saswp-post-specific-container{
|
360 |
+
display: inline-block;
|
361 |
+
width: calc(75% - 1px );
|
362 |
+
border-left: 1px solid #eee;
|
363 |
+
}
|
364 |
+
.saswp-post-specific-wrapper{
|
365 |
+
padding: 10px;
|
366 |
+
}
|
367 |
+
.saswp-tab a.selected {
|
368 |
+
background-color: #ccc;
|
369 |
+
}
|
370 |
+
.saswp-tab-links{
|
371 |
+
display: block;
|
372 |
+
background-color: inherit;
|
373 |
+
color: black;
|
374 |
+
padding: 6px 10px;
|
375 |
+
outline: none;
|
376 |
+
text-align: left;
|
377 |
+
cursor: pointer;
|
378 |
+
transition: 0.3s;
|
379 |
+
font-size: 15px;
|
380 |
+
width: 130px;
|
381 |
+
overflow: hidden;
|
382 |
+
margin-right: 10px;
|
383 |
+
}
|
384 |
+
.saswp-star-rating{
|
385 |
+
cursor: pointer;
|
386 |
+
}
|
387 |
+
.saswp-post-specific-wrapper select{
|
388 |
+
width: 100%;
|
389 |
+
}
|
390 |
+
.saswp-review-tables{
|
391 |
+
width: 100%;
|
392 |
+
}
|
393 |
+
.saswp-over-all-raring{
|
394 |
+
float: right;
|
395 |
+
}
|
396 |
+
|
397 |
+
.saswp-review-pros-and-cons{
|
398 |
+
position: relative;
|
399 |
+
clear:both;
|
400 |
+
}
|
401 |
+
.saswp-review-pros-and-cons > div:first{
|
402 |
+
padding-left: 10px;
|
403 |
+
}
|
404 |
+
.saswp-review-pros-and-cons > div{
|
405 |
+
width: 49%;
|
406 |
+
display: inline-block;
|
407 |
+
}
|
408 |
+
.saswp-review-pros-and-cons > div:nth-child(2){
|
409 |
+
padding-left: 12px;
|
410 |
+
}
|
411 |
+
.saswp-wp-ediot-desc{
|
412 |
+
margin-bottom: -23px;
|
413 |
+
display: block;
|
414 |
+
}
|
415 |
+
.saswp-review-description{
|
416 |
+
margin-top: 40px;
|
417 |
+
padding-top: 10px;
|
418 |
+
border-top: 1px solid #eee;
|
419 |
+
}
|
420 |
+
.saswp-review-pros-and-cons{
|
421 |
+
margin-top: 40px;
|
422 |
+
padding-top: 10px;
|
423 |
+
border-top: 1px solid #eee;
|
424 |
+
}
|
425 |
+
.saspw-review-item-list{
|
426 |
+
margin-top: 20px;
|
427 |
+
border-top: 1px solid #eee;
|
428 |
+
}
|
429 |
+
.saswp-review-item-list-table{
|
430 |
+
padding-bottom: 10px;
|
431 |
+
}
|
432 |
+
#sasw-review input[type=text] {
|
433 |
+
width: 180px;
|
434 |
+
}
|
435 |
+
#sasw-review input[type=number] {
|
436 |
+
width: 180px;
|
437 |
+
}
|
438 |
+
#saswp-review-item-enable{
|
439 |
+
width: 10px;
|
440 |
+
}
|
441 |
+
.saswp-enable-review-on-post{
|
442 |
+
padding-bottom: 10px;
|
443 |
+
}
|
444 |
+
.saswp-enable-review-on-post label{
|
445 |
+
font-weight: 500;
|
446 |
+
}
|
447 |
+
/*
|
448 |
+
Compatibility tab css starts here
|
449 |
+
*/
|
450 |
+
.saswp-compatibility table th{
|
451 |
+
width: auto;
|
452 |
+
padding: 0px;
|
453 |
+
}
|
454 |
+
.saswp-compatibility .saswp-knowledge-label {
|
455 |
+
float: left;
|
456 |
+
clear: both;
|
457 |
+
}
|
458 |
+
.saswp-tools .saswp-knowledge-label {
|
459 |
+
float: left;
|
460 |
+
clear: both;
|
461 |
+
}
|
462 |
+
.saswp-tools .saswp-knowledge-field {
|
463 |
+
float: right;
|
464 |
+
width: 69%;
|
465 |
+
padding-bottom: 10px;
|
466 |
+
}
|
467 |
+
.saswp_kg_logo, .saswp_person_fields{
|
468 |
+
background-color: #fff !important;
|
469 |
+
}
|
470 |
+
.saswp_image_thumbnail{
|
471 |
+
padding-top: 5px;
|
472 |
+
display: inline-block;
|
473 |
+
}
|
474 |
+
.saswp-compatibility .saswp-knowledge-field {
|
475 |
+
float: right;
|
476 |
+
width: 75%;
|
477 |
+
padding-bottom: 10px;
|
478 |
+
}
|
479 |
+
.saswp-schem-type-note, .saswp-job-posting-note{
|
480 |
+
color: chocolate;
|
481 |
+
}
|
482 |
+
.saswp-custom-fields-name{
|
483 |
+
border: 1px solid #aaa;
|
484 |
+
border-radius: 4px;
|
485 |
+
}
|
486 |
+
/*
|
487 |
+
Compatibility tab css ends
|
488 |
+
*/
|
489 |
+
.saswp-option-table-class p{
|
490 |
+
margin: auto;
|
491 |
+
font-style: italic;
|
492 |
+
color: #666;
|
493 |
+
}
|
494 |
+
/*
|
495 |
+
On/Off Buttons starts here
|
496 |
+
*/
|
497 |
+
.saswp-switch {
|
498 |
+
position: relative;
|
499 |
+
display: inline-block;
|
500 |
+
width: 40px;
|
501 |
+
height: 22px;
|
502 |
+
border: 20px;
|
503 |
+
}
|
504 |
+
|
505 |
+
.saswp-switch input {
|
506 |
+
opacity: 0;
|
507 |
+
width: 0;
|
508 |
+
height: 0;
|
509 |
+
}
|
510 |
+
|
511 |
+
.saswp-slider {
|
512 |
+
position: absolute;
|
513 |
+
cursor: pointer;
|
514 |
+
top: 0;
|
515 |
+
left: 0;
|
516 |
+
right: 0;
|
517 |
+
bottom: 0;
|
518 |
+
background-color: #5a6783;
|
519 |
+
transition: .4s;
|
520 |
+
border-radius: 20px;
|
521 |
+
}
|
522 |
+
|
523 |
+
.saswp-slider:before {
|
524 |
+
position: absolute;
|
525 |
+
content: "";
|
526 |
+
height: 15px;
|
527 |
+
width: 15px;
|
528 |
+
left: 4px;
|
529 |
+
bottom: 4px;
|
530 |
+
background-color: white;
|
531 |
+
transition: .4s;
|
532 |
+
border-radius: 20px;
|
533 |
+
}
|
534 |
+
|
535 |
+
input:checked + .saswp-slider {
|
536 |
+
background-color: #61bd3b;
|
537 |
+
border-radius: 30px;
|
538 |
+
}
|
539 |
+
|
540 |
+
input:focus + .saswp-slider {
|
541 |
+
box-shadow: 0 0 1px #2196F3;
|
542 |
+
}
|
543 |
+
|
544 |
+
input:checked + .saswp-slider:before {
|
545 |
+
|
546 |
+
transform: translateX(15px);
|
547 |
+
}
|
548 |
+
|
549 |
+
/* Rounded sliders */
|
550 |
+
.saswp-slider.saswp-round {
|
551 |
+
border-radius: 34px;
|
552 |
+
}
|
553 |
+
|
554 |
+
.saswp-slider.saswp-round:before {
|
555 |
+
border-radius: 50%;
|
556 |
+
}
|
557 |
+
|
558 |
+
.saswp-tab-nav li{
|
559 |
+
display: flex;
|
560 |
+
align-items: center;
|
561 |
+
justify-content: space-between;
|
562 |
+
margin-bottom:10px;
|
563 |
+
border-bottom: 1px solid #eee;
|
564 |
+
}
|
565 |
+
|
566 |
+
.saswp-tab-nav .selected{
|
567 |
+
background-color: #ccc;
|
568 |
+
}
|
569 |
+
.saswp-single-post-restore .saswp-switch{
|
570 |
+
height: 28px;
|
571 |
+
}
|
572 |
+
.saswp-single-post-restore .saswp-slider:before{
|
573 |
+
height: 20px;
|
574 |
+
}
|
575 |
+
/*
|
576 |
+
On/Off Buttons ends here
|
577 |
+
*/
|
578 |
+
.saswp-wdi-rate-stars{display:inline-block;color:#ffb900;position:relative;top:3px;}
|
579 |
+
.saswp-wdi-rate-stars svg{fill:#ffb900;}
|
580 |
+
.saswp-wdi-rate-stars svg:hover{fill:#ffb900}
|
581 |
+
.saswp-wdi-rate-stars svg:hover ~ svg{fill:none;}
|
582 |
+
|
583 |
+
.option-table-class {width:100%;}
|
584 |
+
.option-table-class tr td {padding: 10px 10px 10px 10px ;}
|
585 |
+
.option-table-class tr > td{width: 30%;}
|
586 |
+
.option-table-class tr td:last-child{width: 60%;}
|
587 |
+
|
588 |
+
.saswp-custom-fields-table{
|
589 |
+
width: 100%;
|
590 |
+
}
|
591 |
+
.saswp-custom-fields-table input{
|
592 |
+
width: 100%;
|
593 |
+
}
|
594 |
+
.saswp-custom-fields-table tr td {padding: 10px 10px 10px 10px ;}
|
595 |
+
.saswp-custom-fields-table td{
|
596 |
+
width: 30%;
|
597 |
+
}
|
598 |
+
|
599 |
+
.saswp-option-table-class input[type="text"], .saswp-option-table-class select{
|
600 |
+
width:100%;
|
601 |
+
}
|
602 |
+
.saswp-paywall-table-class input[type="text"], .saswp-paywall-table-class select{
|
603 |
+
width:100%;
|
604 |
+
}
|
605 |
+
|
606 |
+
/*
|
607 |
+
Compatibility tab css starts here
|
608 |
+
*/
|
609 |
+
.saswp-email_schema table th{
|
610 |
+
width: auto;
|
611 |
+
padding: 0px;
|
612 |
+
}
|
613 |
+
.saswp-email_schema .saswp-knowledge-label {
|
614 |
+
float: left;
|
615 |
+
clear: both;
|
616 |
+
}
|
617 |
+
.saswp-email_schema .saswp-knowledge-field {
|
618 |
+
float: right;
|
619 |
+
width: 75%;
|
620 |
+
padding-bottom: 10px;
|
621 |
+
}
|
622 |
+
/*
|
623 |
+
Compatibility tab css ends
|
624 |
+
*/
|
625 |
+
.saswp-add-on-plugin label{
|
626 |
+
margin-top: 10px;
|
627 |
+
}
|
628 |
+
.saswp-add-on-plugin span{
|
629 |
+
width: 250px;
|
630 |
+
display: inline-block;
|
631 |
+
}
|
632 |
+
.saswp-knowledge-label label[for="saswp_search_box_schema_checkbox"] {
|
633 |
+
padding-left: 10px;
|
634 |
+
}
|
635 |
+
|
636 |
+
.saswp-knowledge-label label[for="saswp-woocommerce-booking-checkbox"] {
|
637 |
+
padding-left: 10px;
|
638 |
+
}
|
639 |
+
|
640 |
+
.saswp-knowledge-label label[for="saswp-woocommerce-membership-checkbox"] {
|
641 |
+
padding-left: 10px;
|
642 |
+
}
|
643 |
+
|
644 |
+
.saswp-global-selected{
|
645 |
+
color: #000000;
|
646 |
+
font-weight: 500;
|
647 |
+
}
|
648 |
+
#saswp-global-tabs a{
|
649 |
+
cursor: pointer;
|
650 |
+
}
|
651 |
+
#saswp-global-tabs{
|
652 |
+
padding-left: 5px;
|
653 |
+
}
|
654 |
+
#saswp-tools-tabs a{
|
655 |
+
cursor: pointer;
|
656 |
+
}
|
657 |
+
#saswp-review-tabs a{
|
658 |
+
cursor: pointer;
|
659 |
+
}
|
660 |
+
#saswp-tools-tabs{
|
661 |
+
padding-left: 5px;
|
662 |
+
}
|
663 |
+
.saswp-need-help {
|
664 |
+
padding-left: 60px;
|
665 |
+
}
|
666 |
+
.saswp-heading{
|
667 |
+
display: inline-flex;
|
668 |
+
align-items: baseline;
|
669 |
+
}
|
670 |
+
.saswp-heading h2{
|
671 |
+
margin-bottom: 0px;
|
672 |
+
}
|
673 |
+
.saswp-view-docs a{
|
674 |
+
margin-right: 5px !important;
|
675 |
+
margin-top: 10px !important;
|
676 |
+
}
|
677 |
+
.saswp-tabs .nav-tab{
|
678 |
+
margin-left: 4px;
|
679 |
+
}
|
680 |
+
|
681 |
+
/*
|
682 |
+
Google review module starts here
|
683 |
+
*/
|
684 |
+
.saswp-panel {
|
685 |
+
padding: 7px 18px;
|
686 |
+
background-color: white;
|
687 |
+
box-shadow: 0px 0px 20px 1px #d2cccc;
|
688 |
+
}
|
689 |
+
|
690 |
+
/*** Review Design CSS ****/
|
691 |
+
.saswp-g-review-header{
|
692 |
+
margin-top: 50px;
|
693 |
+
}
|
694 |
+
.saswp-g-review-body{
|
695 |
+
display:inline-grid;
|
696 |
+
grid-template-columns: 1fr 300px;
|
697 |
+
grid-gap:30px;
|
698 |
+
margin-top:30px;
|
699 |
+
}
|
700 |
+
.saswp-review-list{}
|
701 |
+
.saswp-channel-list{
|
702 |
+
margin-right: 15px;
|
703 |
+
}
|
704 |
+
.saswp-input-fields{
|
705 |
+
display: inline-flex;
|
706 |
+
align-items: center;
|
707 |
+
margin-bottom: 8px;
|
708 |
+
width: 100%;
|
709 |
+
}
|
710 |
+
.saswp-input-fields label{
|
711 |
+
width: 130px;
|
712 |
+
}
|
713 |
+
.saswp-input-fields select{
|
714 |
+
width:100%;
|
715 |
+
}
|
716 |
+
.saswp-panel h3{
|
717 |
+
font-size: 20px;
|
718 |
+
line-height: 1.4;
|
719 |
+
color: #222;
|
720 |
+
text-align: center;
|
721 |
+
margin: 10px 0px 20px 0px;
|
722 |
+
}
|
723 |
+
.saswp-input-fields a.button-primary{
|
724 |
+
margin-top:10px;
|
725 |
+
}
|
726 |
+
.saswp-glg-review-body{
|
727 |
+
display: grid;
|
728 |
+
grid-template-columns: 100px 1fr;
|
729 |
+
grid-gap: 20px;
|
730 |
+
background: #fff;
|
731 |
+
padding: 20px;
|
732 |
+
box-shadow: 0px 0px 20px 1px #d2cccc;
|
733 |
+
margin-bottom: 30px;
|
734 |
+
}
|
735 |
+
.saswp-g-plus{
|
736 |
+
float: right;
|
737 |
+
font-size: 15px;
|
738 |
+
}
|
739 |
+
.saswp-rtng{
|
740 |
+
padding-left: 5px;
|
741 |
+
font-size: 14px;
|
742 |
+
}
|
743 |
+
.saswp-pt-dt {
|
744 |
+
font-size: 12px;
|
745 |
+
color: #999;
|
746 |
+
font-weight: 600;
|
747 |
+
margin-top: 5px;
|
748 |
+
display: inline-block;
|
749 |
+
}
|
750 |
+
.saswp-str{
|
751 |
+
display: inline-block;
|
752 |
+
width: 100%;
|
753 |
+
vertical-align: middle;
|
754 |
+
}
|
755 |
+
.saswp-athr{
|
756 |
+
font-size: 15px;
|
757 |
+
line-height: 1.4;
|
758 |
+
color: #000;
|
759 |
+
font-weight: bold;
|
760 |
+
display: inline-block;
|
761 |
+
vertical-align: middle;
|
762 |
+
}
|
763 |
+
.saswp-str-rtng .saswp-rvw-str{
|
764 |
+
display: inline-block;
|
765 |
+
vertical-align: middle;
|
766 |
+
padding-left: 10px;
|
767 |
+
width: auto;
|
768 |
+
}
|
769 |
+
.saswp-rv-cnt p{
|
770 |
+
font-size: 16px;
|
771 |
+
line-height: 1.6;
|
772 |
+
color: #000;
|
773 |
+
margin: 10px 0px 0px 0px;
|
774 |
+
}
|
775 |
+
.saswp-rv-img img{
|
776 |
+
max-width:100px;
|
777 |
+
border-radius: 100%;
|
778 |
+
}
|
779 |
+
/*
|
780 |
+
Google review module ends here
|
781 |
+
*/
|
782 |
+
|
783 |
+
/** Premium Feature CSS **/
|
784 |
+
.saswp-premium_features table th, .saswp-services table th{
|
785 |
+
width: auto;
|
786 |
+
padding: 0px;
|
787 |
+
}
|
788 |
+
.saswp-features-blocks{
|
789 |
+
display: inline-grid;
|
790 |
+
grid-template-columns: 1fr 1fr;
|
791 |
+
grid-gap: 20px;
|
792 |
+
}
|
793 |
+
.saswp-features-blocks li{
|
794 |
+
background:#fff;
|
795 |
+
padding: 25px;
|
796 |
+
border: 1px solid #d8d8d8;
|
797 |
+
}
|
798 |
+
.saswp-features-blocks li a{
|
799 |
+
text-decoration: none;
|
800 |
+
}
|
801 |
+
.saswp-ele-ic{
|
802 |
+
border-radius: 256px;
|
803 |
+
display: inline-block;
|
804 |
+
padding:8px 10px 8px 10px;
|
805 |
+
width: 70px;
|
806 |
+
margin-right: 20px;
|
807 |
+
float: left;
|
808 |
+
}
|
809 |
+
.saswp-ele-ic img{
|
810 |
+
width:100%;
|
811 |
+
}
|
812 |
+
.saswp-ele-1{
|
813 |
+
background: #96588a;
|
814 |
+
}
|
815 |
+
.saswp-ele-2{
|
816 |
+
background: #00a97e;
|
817 |
+
}
|
818 |
+
.saswp-ele-3{
|
819 |
+
background: #cacaca;
|
820 |
+
}.saswp-ele-4{
|
821 |
+
background: #9c56cc;
|
822 |
+
}
|
823 |
+
.saswp-ele-tlt h3{
|
824 |
+
margin:0;
|
825 |
+
font-size: 18px;
|
826 |
+
line-height: 1.4;
|
827 |
+
}
|
828 |
+
.saswp-ele-tlt p{
|
829 |
+
margin-top:10px;
|
830 |
+
}
|
831 |
+
.saswp-sts-btn{
|
832 |
+
box-sizing: border-box;
|
833 |
+
height: 52px;
|
834 |
+
margin-top: 20px;
|
835 |
+
padding: 6px 15px;
|
836 |
+
border: 1px solid #e5e5e5;
|
837 |
+
border-radius: 3px;
|
838 |
+
display: flex;
|
839 |
+
align-items: center;
|
840 |
+
justify-content: space-between;
|
841 |
+
}
|
842 |
+
.saswp-d-btn{
|
843 |
+
background: #d2150a;
|
844 |
+
padding: 6px 18px;
|
845 |
+
border-radius: 30px;
|
846 |
+
font-size: 14px;
|
847 |
+
color: #fff;
|
848 |
+
}
|
849 |
+
.form-wrap .saswp-sts-txt{
|
850 |
+
font-size: 16px;
|
851 |
+
color:#000;
|
852 |
+
}
|
853 |
+
.saswp-sts-txt span{
|
854 |
+
color:#bebfc0;
|
855 |
+
padding-left:5px;
|
856 |
+
}
|
857 |
+
|
858 |
+
/** star rating Feature CSS **/
|
859 |
+
.saswp_review_platform .saswp-g-plus{
|
860 |
+
float: left;
|
861 |
+
}
|
862 |
+
.saswp-pc-wrap{background-color:#004f74;padding:15px 15px 15px 30px;color:#fff;display:inline-flex;width:100%;flex-wrap:wrap;margin-bottom:20px}.saswp-pc-wrap .saswp-lst span{font-size:18px;font-weight:500;margin-bottom:10px;display:inline-block;line-height:1.3}.saswp-pc-wrap .saswp-lst{flex:1 0 42%}.saswp-pc-wrap .saswp-lst ul{margin:0}.saswp-pc-wrap .saswp-lst p{list-style-type:none;font-size:15px;font-weight:lighter;line-height:1.2;margin-bottom:10px;position:relative;padding-left:20px;color:#eee}.saswp-pc-wrap .saswp-lst p:before{content:'';position:absolute;width:8px;height:8px;background-color:#ccc;left:0;top:6px;border-radius:10px}.sgl .saswp-rvw{width:100%;margin-bottom:34px;font-size:13px;border-bottom:1px solid #ededed}.saswp-rvw-hd span,.saswp-rvw-sm span{background-color:#222;color:#fff;display:inline-block;font-size:15px}.saswp-rvw-hd span{line-height:1.4;padding:8px 12px 6px;margin:26px 0}.saswp-rvw td{padding:7px 14px}.saswp-rvw td,.sgl table td{border:1px solid #ededed}.saswp-rvw tbody{width:100%}.saswp-rvw-sm span{padding:8px 12px 6px;margin-bottom:13px;position:relative;line-height:1.2}.saswp-rvw-fs{line-height:1.5;font-size:48px;font-weight:600;margin-bottom:5px}.saswp-rvw-ov .ovs{font-size:11px;font-weight:600}.sgl .saswp-rvw tr td{background:#fff;width:100%}.sgl .saswp-rvw tr:hover td{background-color:#fcfcfc}.saswp-rvw .saswp-rvw-sm{padding:21px 14px}
|
863 |
+
.str-ic{font-size:18px;line-height:1.2}.saswp-rvw-str{display:inline-flex;width:100%}.saswp-rvw-str .df-clr,.saswp-rvw-str .half-str,.saswp-rvw-str .str-ic{display:inline-block;width:20px;height:16px;background-repeat:no-repeat}.saswp-rvw-ov{text-align:center}.saswp-rvw-str .half-str{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNNDgyLjIwNywxODYuOTczbC0xNTkuNjk5LTMzLjcwNUwyNDEuMTA0LDExLjgwM2wtODEuNDA0LDE0MS40NjVMMCwxODYuOTczbDEwOS4zODgsMTIxLjEzNEw5Mi4wOTQsNDcwLjQwNGwxNDkuMDEtNjYuNiAgbDE0OS4wMSw2Ni42bC0xNy4yOTQtMTYyLjI5Nkw0ODIuMjA3LDE4Ni45NzN6IE0yNDEuMTA0LDM3MC45NDNWNzEuOTUzbDYyLjA5LDEwNy45TDQyNSwyMDUuNTYxbC04My40MzMsOTIuMzkzbDEzLjE5MSwxMjMuNzg4ICBMMjQxLjEwNCwzNzAuOTQzeiIgZmlsbD0iI2ZmZDcwMCIvPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K)}.saswp-rvw-str .str-ic{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiNmZmQ3MDAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-rvw-str .df-clr{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiM2MzVlNjMiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}
|
864 |
+
/*** Review Design CSS ****/
|
865 |
+
.saswp-g-review-header{
|
866 |
+
margin-top: 50px;
|
867 |
+
}
|
868 |
+
.saswp-g-review-body{
|
869 |
+
display:inline-grid;
|
870 |
+
grid-template-columns: 1fr 300px;
|
871 |
+
grid-gap:30px;
|
872 |
+
margin-top:30px;
|
873 |
+
width:100%;
|
874 |
+
}
|
875 |
+
.saswp-review-list{}
|
876 |
+
.saswp-channel-list{
|
877 |
+
margin-right: 15px;
|
878 |
+
}
|
879 |
+
.saswp-input-fields{
|
880 |
+
display: inline-flex;
|
881 |
+
align-items: center;
|
882 |
+
margin-bottom: 8px;
|
883 |
+
width: 100%;
|
884 |
+
}
|
885 |
+
.saswp-input-fields label{
|
886 |
+
width: 130px;
|
887 |
+
}
|
888 |
+
.saswp-panel h3{
|
889 |
+
font-size: 20px;
|
890 |
+
line-height: 1.4;
|
891 |
+
color: #222;
|
892 |
+
text-align: center;
|
893 |
+
margin: 10px 0px 20px 0px;
|
894 |
+
}
|
895 |
+
.saswp-input-fields a.button-primary{
|
896 |
+
margin-top:10px;
|
897 |
+
}
|
898 |
+
.saswp-glg-review-body{
|
899 |
+
display: grid;
|
900 |
+
grid-template-columns: 100px 1fr;
|
901 |
+
grid-gap: 20px;
|
902 |
+
background: #fff;
|
903 |
+
padding: 20px;
|
904 |
+
box-shadow: 0px 0px 20px 1px #d2cccc;
|
905 |
+
margin-bottom: 30px;
|
906 |
+
}
|
907 |
+
.saswp-g-plus{
|
908 |
+
float: right;
|
909 |
+
font-size: 15px;
|
910 |
+
width: 20px;
|
911 |
+
height: 20px;
|
912 |
+
}
|
913 |
+
.saswp-g-plus img{
|
914 |
+
max-width:100%;
|
915 |
+
}
|
916 |
+
.saswp-rtng{
|
917 |
+
padding-left: 5px;
|
918 |
+
font-size: 14px;
|
919 |
+
}
|
920 |
+
.saswp-pt-dt {
|
921 |
+
font-size: 12px;
|
922 |
+
color: #999;
|
923 |
+
font-weight: 600;
|
924 |
+
margin-top: 5px;
|
925 |
+
display: inline-block;
|
926 |
+
}
|
927 |
+
.saswp-athr{
|
928 |
+
font-size: 15px;
|
929 |
+
line-height: 1.4;
|
930 |
+
color: #000;
|
931 |
+
font-weight: bold;
|
932 |
+
}
|
933 |
+
.saswp-rv-cnt p{
|
934 |
+
font-size: 16px;
|
935 |
+
line-height: 1.6;
|
936 |
+
color: #000;
|
937 |
+
margin: 10px 0px 0px 0px;
|
938 |
+
}
|
939 |
+
.saswp-rv-img img{
|
940 |
+
max-width:100px;
|
941 |
+
}
|
942 |
+
.saswp-g-review-header div{
|
943 |
+
margin-top:10px;
|
944 |
+
}
|
945 |
+
|
946 |
+
/*** Upgrade Pro CSS ***/
|
947 |
+
.saswp-upgrade-pro{
|
948 |
+
background: #fff;
|
949 |
+
padding: 25px;
|
950 |
+
border: 1px solid #d8d8d8;
|
951 |
+
display: inline-block;
|
952 |
+
margin-top: 10px;
|
953 |
+
width: 81%;
|
954 |
+
}
|
955 |
+
.saswp-upgrade-pro h2{
|
956 |
+
font-size: 20px;
|
957 |
+
margin: 0;
|
958 |
+
color: #23282d;
|
959 |
+
font-weight: 600;
|
960 |
+
text-align: center;
|
961 |
+
}
|
962 |
+
.saswp-upgrade-pro ul{
|
963 |
+
margin: 25px 0px 20px 0px;
|
964 |
+
display: inline-block;
|
965 |
+
}
|
966 |
+
.saswp-upgrade-pro ul li{
|
967 |
+
position: relative;
|
968 |
+
padding-left: 30px;
|
969 |
+
font-size: 14px;
|
970 |
+
line-height: 1.4;
|
971 |
+
margin-bottom: 10px;
|
972 |
+
}
|
973 |
+
.saswp-upgrade-pro ul li:before {
|
974 |
+
content: "";
|
975 |
+
background-image: url(../images/check.png);
|
976 |
+
background-repeat: no-repeat;
|
977 |
+
background-size: 20px;
|
978 |
+
width: 20px;
|
979 |
+
height: 20px;
|
980 |
+
position: absolute;
|
981 |
+
left: 2px;
|
982 |
+
top: 2px;
|
983 |
+
}
|
984 |
+
.saswp-upgrade-pro a{
|
985 |
+
background: #d2150a;
|
986 |
+
padding: 10px 0px;
|
987 |
+
display: block;
|
988 |
+
text-align: center;
|
989 |
+
color: #fff;
|
990 |
+
text-decoration: none;
|
991 |
+
font-size: 16px;
|
992 |
+
font-weight: 600;
|
993 |
+
letter-spacing: 1px;
|
994 |
+
border-radius: 5px;
|
995 |
+
}
|
996 |
+
.saswp_image_prev{
|
997 |
+
max-width: 200px;
|
998 |
+
max-height: 200px;
|
999 |
+
float: left;
|
1000 |
+
padding-left:2px;
|
1001 |
+
}
|
1002 |
+
.saswp_prev_close {
|
1003 |
+
position: relative;
|
1004 |
+
width:30px;
|
1005 |
+
height:30px;
|
1006 |
+
top: 12px;
|
1007 |
+
font-size: 20px;
|
1008 |
+
top: -5px;
|
1009 |
+
text-decoration:none;
|
1010 |
+
}
|
1011 |
+
.saswp-add-custom-schema-div{
|
1012 |
+
margin-top: 10px;
|
1013 |
+
border-top: 1px solid #eee;
|
1014 |
+
padding-top: 5px;
|
1015 |
+
}
|
1016 |
+
|
1017 |
+
.saswp-nav-menu-list label{
|
1018 |
+
padding-left: 10px;
|
1019 |
+
}
|
1020 |
+
/*** How to schema css starts here ***/
|
1021 |
+
|
1022 |
+
.saswp-how-to-supply-table-div,
|
1023 |
+
.saswp-how-to-tool-table-div,
|
1024 |
+
.saswp-how-to-step-table-div,
|
1025 |
+
.saswp-tvseries-actor-table-div,
|
1026 |
+
.saswp-tvseries-season-table-div,
|
1027 |
+
.saswp-mc-symptom-table-div,
|
1028 |
+
.saswp-mc-risk_factor-table-div,
|
1029 |
+
.saswp-trip-itinerary-table-div,
|
1030 |
+
.saswp-faq-question-table-div,
|
1031 |
+
.saswp-mc-cause-table-div
|
1032 |
+
{
|
1033 |
+
border: 1px solid #aaa;
|
1034 |
+
margin-top: 5px;
|
1035 |
+
margin-bottom: 5px;
|
1036 |
+
|
1037 |
+
}
|
1038 |
+
.saswp-table-close{
|
1039 |
+
float: right;
|
1040 |
+
cursor: pointer;
|
1041 |
+
}
|
1042 |
+
.saswp-table-create-onajax table th, .saswp-table-create-onajax table td{
|
1043 |
+
padding: 5px;
|
1044 |
+
}
|
1045 |
+
.saswp-table-create-onajax select{
|
1046 |
+
width: 98%;
|
1047 |
+
}
|
1048 |
+
|
1049 |
+
/*** How to schema css ends here ***/
|
1050 |
+
|
1051 |
+
.saswp-g-reviews-settings-table input{
|
1052 |
+
width: 100%;
|
1053 |
+
}
|
1054 |
+
.saswp_rv_module_pro_notice{
|
1055 |
+
border: 1px solid #d8d8d8;
|
1056 |
+
background: #fff;
|
1057 |
+
}
|
1058 |
+
|
1059 |
+
/*** Review Module section ***/
|
1060 |
+
|
1061 |
+
.saswp-settings-list .saswp-rev-mod{
|
1062 |
+
width: 100%;
|
1063 |
+
display: inline-block;
|
1064 |
+
margin-top: 20px;
|
1065 |
+
}
|
1066 |
+
.saswp-rev-mod .saswp-knowledge-label{
|
1067 |
+
width: 100%;
|
1068 |
+
display: inline-block;
|
1069 |
+
padding: 10px 16px;
|
1070 |
+
font-weight: 600;
|
1071 |
+
font-size: 16px;
|
1072 |
+
color: #333;
|
1073 |
+
background: #f9f9f9;
|
1074 |
+
border: 1px solid #d8d8d8;
|
1075 |
+
border-bottom: none;
|
1076 |
+
}
|
1077 |
+
.saswp-rev-mod .saswp-knowledge-field{
|
1078 |
+
width:100%;
|
1079 |
+
display: inline-block;
|
1080 |
+
}
|
1081 |
+
.saswp-rev-mod .saswp_rv_module_pro_notice{
|
1082 |
+
padding:20px;
|
1083 |
+
}
|
1084 |
+
.saswp_cmpny_lst{
|
1085 |
+
width:100%;
|
1086 |
+
display: inline-block;
|
1087 |
+
margin-top:30px;
|
1088 |
+
}
|
1089 |
+
.saswp_rv_module_pro_notice ul{
|
1090 |
+
margin: 15px 0px 20px 0px;
|
1091 |
+
width: 100%;
|
1092 |
+
display: inline-grid;
|
1093 |
+
grid-template-columns: 1fr 1fr 1fr;
|
1094 |
+
grid-gap: 20px;
|
1095 |
+
border-bottom: 1px solid #eee;
|
1096 |
+
padding-bottom: 20px;
|
1097 |
+
}
|
1098 |
+
.saswp_rv_module_pro_notice ul li{
|
1099 |
+
position: relative;
|
1100 |
+
font-size: 15px;
|
1101 |
+
line-height: 1.5;
|
1102 |
+
color: #444;
|
1103 |
+
margin: 0;
|
1104 |
+
}
|
1105 |
+
.saswp_rv_module_pro_notice ul li span{
|
1106 |
+
padding-left:3px;
|
1107 |
+
}
|
1108 |
+
/*.saswp_rv_module_pro_notice ul li.check-img:before{
|
1109 |
+
content: "";
|
1110 |
+
background-image: url(../images/check.png);
|
1111 |
+
background-repeat: no-repeat;
|
1112 |
+
background-size: 16px;
|
1113 |
+
width: 16px;
|
1114 |
+
height: 16px;
|
1115 |
+
position: absolute;
|
1116 |
+
left: 2px;
|
1117 |
+
top: 6px;
|
1118 |
+
}*/
|
1119 |
+
.saswp_rv_module_pro_notice h2{
|
1120 |
+
text-align: center;
|
1121 |
+
font-size: 31px;
|
1122 |
+
}
|
1123 |
+
.saswp_rv_module_pro_notice .saswp_desc{
|
1124 |
+
text-align: center;
|
1125 |
+
font-size: 18px;
|
1126 |
+
font-style: normal;
|
1127 |
+
color: #000;
|
1128 |
+
}
|
1129 |
+
.saswp_rv_module_pro_notice .saswp_desc a{
|
1130 |
+
font-style: italic;
|
1131 |
+
}
|
1132 |
+
.saswp_rv_module_pro_notice .saswp_lst{
|
1133 |
+
color: #808080;
|
1134 |
+
font-family: georgia;
|
1135 |
+
font-style: italic;
|
1136 |
+
font-style: italic;
|
1137 |
+
font-size: 15px;
|
1138 |
+
font-weight: 600;
|
1139 |
+
}
|
1140 |
+
.saswp_rv_module_pro_notice .saswp_avlbl{
|
1141 |
+
color: #2a902e;
|
1142 |
+
font-family: georgia;
|
1143 |
+
font-style: italic;
|
1144 |
+
font-size: 15px;
|
1145 |
+
font-weight: 600;
|
1146 |
+
}
|
1147 |
+
.saswp_rv_module_pro_notice ul li img{
|
1148 |
+
width:20px;
|
1149 |
+
height:20px;
|
1150 |
+
position: relative;
|
1151 |
+
top: 4px;
|
1152 |
+
}
|
1153 |
+
.saswp-rev-btn{
|
1154 |
+
width:100%;
|
1155 |
+
display: inline-block;
|
1156 |
+
margin-top:20px;
|
1157 |
+
text-align: center;
|
1158 |
+
}
|
1159 |
+
.saswp-rev-btn span{
|
1160 |
+
display: block;
|
1161 |
+
font-size: 13px;
|
1162 |
+
margin-bottom: 15px;
|
1163 |
+
}
|
1164 |
+
.saswp-rev-btn a{
|
1165 |
+
padding: 12px 18px;
|
1166 |
+
display: inline-block;
|
1167 |
+
text-decoration: none;
|
1168 |
+
border-radius: 5px;
|
1169 |
+
background: #0085ba;
|
1170 |
+
color: #fff;
|
1171 |
+
font-weight: 600;
|
1172 |
+
font-size: 18px;
|
1173 |
+
}
|
admin_section/js/jquery.rateyo.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
/*rateyo V2.3.4, A simple and flexible star rating plugin
|
2 |
-
prashanth pamidi (https://github.com/prrashi)*/
|
3 |
-
!function(N){"use strict";var Q='<?xml version="1.0" encoding="utf-8"?><svg version="1.1"xmlns="http://www.w3.org/2000/svg"viewBox="0 12.705 512 486.59"x="0px" y="0px"xml:space="preserve"><polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "/></svg>',n={starWidth:"32px",normalFill:"gray",ratedFill:"#f39c12",numStars:5,maxValue:5,precision:1,rating:0,fullStar:!1,halfStar:!1,readOnly:!1,spacing:"0px",rtl:!1,multiColor:null,onInit:null,onChange:null,onSet:null,starSvg:null},X={startColor:"#c0392b",endColor:"#f1c40f"};function $(t,r,e){return t===r?t=r:t===e&&(t=e),t}function D(t){return void 0!==t}var e=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,G=function(t){if(!e.test(t))return null;var r=e.exec(t);return{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)}};function H(t,r,e){var n=e/100*(r-t);return 1===(n=Math.round(t+n).toString(16)).length&&(n="0"+n),n}function J(i,d){this.node=i.get(0);var e=this;i.empty().addClass("jq-ry-container");var g,n,m,h,v,t,r=N("<div/>").addClass("jq-ry-group-wrapper").appendTo(i),y=N("<div/>").addClass("jq-ry-normal-group").addClass("jq-ry-group").appendTo(r),a=N("<div/>").addClass("jq-ry-rated-group").addClass("jq-ry-group").appendTo(r),w=0,o=d.rating,l=!1;function s(t){D(t)||(t=d.rating);var r=(o=t)/g,e=r*m;1<r&&(e+=(Math.ceil(r)-1)*v),k(d.ratedFill),(e=d.rtl?100-e:e)<0?e=0:100<e&&(e=100),a.css("width",e+"%")}function c(){t=n*d.numStars+h*(d.numStars-1),m=n/t*100,v=h/t*100,i.width(t),s()}function u(t){var r=d.starWidth=t;return n=window.parseFloat(d.starWidth.replace("px","")),y.find("svg").attr({width:d.starWidth,height:r}),a.find("svg").attr({width:d.starWidth,height:r}),c(),i}function p(t){return d.spacing=t,h=parseFloat(d.spacing.replace("px","")),y.find("svg:not(:first-child)").css({"margin-left":t}),a.find("svg:not(:first-child)").css({"margin-left":t}),c(),i}function f(t){return d.normalFill=t,(d.rtl?a:y).find("svg").attr({fill:d.normalFill}),i}var b=d.ratedFill;function k(t){if(d.multiColor){var r=(o-w)/d.maxValue*100,e=d.multiColor||{};t=function(t,r,e){if(!t||!r)return null;e=D(e)?e:0,t=G(t),r=G(r);var n=H(t.r,r.r,e),a=H(t.b,r.b,e);return"#"+n+H(t.g,r.g,e)+a}(e.startColor||X.startColor,e.endColor||X.endColor,r)}else b=t;return d.ratedFill=t,(d.rtl?y:a).find("svg").attr({fill:d.ratedFill}),i}function x(t){t=!!t,d.rtl=t,f(d.normalFill),s()}function S(t){k((d.multiColor=t)||b)}function C(t){d.numStars=t,g=d.maxValue/d.numStars,y.empty(),a.empty();for(var r=0;r<d.numStars;r++)y.append(N(d.starSvg||Q)),a.append(N(d.starSvg||Q));return u(d.starWidth),f(d.normalFill),p(d.spacing),s(),i}function F(t){return d.maxValue=t,g=d.maxValue/d.numStars,d.rating>t&&E(t),s(),i}function j(t){return d.precision=t,E(d.rating),i}function q(t){return d.halfStar=t,i}function z(t){return d.fullStar=t,i}function I(t){var r,e,n,a,i,o=y.offset().left,l=o+y.width(),s=d.maxValue,c=t.pageX,u=0;if(c<o)u=w;else if(l<c)u=s;else{var p=(c-o)/(l-o);if(0<h)for(var f=p*=100;0<f;)m<f?(u+=g,f-=m+v):(u+=f/m*g,f=0);else u=p*d.maxValue;e=(r=u)%g,n=g/2,a=d.halfStar,((i=d.fullStar)||a)&&(i||a&&n<e?r+=g-e:(r-=e,0<e&&(r+=n))),u=r}return d.rtl&&(u=s-u),parseFloat(u)}function V(t){return d.readOnly=t,i.attr("readonly",!0),L(),t||(i.removeAttr("readonly"),i.on("mousemove",M).on("mouseenter",M).on("mouseleave",T).on("click",R).on("rateyo.init",Y).on("rateyo.change",_).on("rateyo.set",B)),i}function E(t){var r=t,e=d.maxValue;return"string"==typeof r&&("%"===r[r.length-1]&&(r=r.substr(0,r.length-1),F(e=100)),r=parseFloat(r)),function(t,r,e){if(!(r<=t&&t<=e))throw Error("Invalid Rating, expected value between "+r+" and "+e)}(r,w,e),r=parseFloat(r.toFixed(d.precision)),$(parseFloat(r),w,e),d.rating=r,s(),l&&i.trigger("rateyo.set",{rating:r}),i}function W(t){return d.onInit=t,i}function A(t){return d.onSet=t,i}function O(t){return d.onChange=t,i}function M(t){var r=I(t).toFixed(d.precision),e=d.maxValue;s(r=$(parseFloat(r),w,e)),i.trigger("rateyo.change",{rating:r})}function T(){var t,r;(r=!1,t=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(r=!0),r)||(s(),i.trigger("rateyo.change",{rating:d.rating}))}function R(t){var r=I(t).toFixed(d.precision);r=parseFloat(r),e.rating(r)}function Y(t,r){d.onInit&&"function"==typeof d.onInit&&d.onInit.apply(this,[r.rating,e])}function _(t,r){d.onChange&&"function"==typeof d.onChange&&d.onChange.apply(this,[r.rating,e])}function B(t,r){d.onSet&&"function"==typeof d.onSet&&d.onSet.apply(this,[r.rating,e])}function L(){i.off("mousemove",M).off("mouseenter",M).off("mouseleave",T).off("click",R).off("rateyo.init",Y).off("rateyo.change",_).off("rateyo.set",B)}this.rating=function(t){return D(t)?(E(t),i):d.rating},this.destroy=function(){var n,a;return d.readOnly||L(),J.prototype.collection=(n=i.get(0),a=this.collection,N.each(a,function(t){if(n===this.node){var r=a.slice(0,t),e=a.slice(t+1,a.length);return a=r.concat(e),!1}}),a),i.removeClass("jq-ry-container").children().remove(),i},this.method=function(t){if(!t)throw Error("Method name not specified!");if(!D(this[t]))throw Error("Method "+t+" doesn't exist!");var r=Array.prototype.slice.apply(arguments,[]).slice(1);return this[t].apply(this,r)},this.option=function(t,r){if(!D(t))return d;var e;switch(t){case"starWidth":e=u;break;case"numStars":e=C;break;case"normalFill":e=f;break;case"ratedFill":e=k;break;case"multiColor":e=S;break;case"maxValue":e=F;break;case"precision":e=j;break;case"rating":e=E;break;case"halfStar":e=q;break;case"fullStar":e=z;break;case"readOnly":e=V;break;case"spacing":e=p;break;case"rtl":e=x;break;case"onInit":e=W;break;case"onSet":e=A;break;case"onChange":e=O;break;default:throw Error("No such option as "+t)}return D(r)?e(r):d[t]},C(d.numStars),V(d.readOnly),d.rtl&&x(d.rtl),this.collection.push(this),this.rating(d.rating,!0),l=!0,i.trigger("rateyo.init",{rating:d.rating})}function c(t,r){var e;return N.each(r,function(){if(t===this.node)return e=this,!1}),e}J.prototype.collection=[],window.RateYo=J,N.fn.rateYo=function(){return function(e){var i=J.prototype.collection,t=N(this);if(0===t.length)return t;var r=Array.prototype.slice.apply(arguments,[]);if(0===r.length)e=r[0]={};else{if(1!==r.length||"object"!=typeof r[0]){if(1<=r.length&&"string"==typeof r[0]){var o=r[0],l=r.slice(1),s=[];return N.each(t,function(t,r){var e=c(r,i);if(!e)throw Error("Trying to set options before even initialization");var n=e[o];if(!n)throw Error("Method "+o+" does not exist!");var a=n.apply(e,l);s.push(a)}),s=1===s.length?s[0]:s}throw Error("Invalid Arguments")}e=r[0]}return e=N.extend({},n,e),N.each(t,function(){var t=c(this,i);if(t)return t;var r=N(this),n={},a=N.extend({},e);return N.each(r.data(),function(t,r){if(0===t.indexOf("rateyo")){var e=t.replace(/^rateyo/,"");e=e[0].toLowerCase()+e.slice(1),n[e]=r,delete a[e]}}),new J(N(this),N.extend({},n,a))})}.apply(this,Array.prototype.slice.apply(arguments,[]))}}(window.jQuery);
|
4 |
//# sourceMappingURL=jquery.rateyo.min.js.map
|
1 |
+
/*rateyo V2.3.4, A simple and flexible star rating plugin
|
2 |
+
prashanth pamidi (https://github.com/prrashi)*/
|
3 |
+
!function(N){"use strict";var Q='<?xml version="1.0" encoding="utf-8"?><svg version="1.1"xmlns="http://www.w3.org/2000/svg"viewBox="0 12.705 512 486.59"x="0px" y="0px"xml:space="preserve"><polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "/></svg>',n={starWidth:"32px",normalFill:"gray",ratedFill:"#f39c12",numStars:5,maxValue:5,precision:1,rating:0,fullStar:!1,halfStar:!1,readOnly:!1,spacing:"0px",rtl:!1,multiColor:null,onInit:null,onChange:null,onSet:null,starSvg:null},X={startColor:"#c0392b",endColor:"#f1c40f"};function $(t,r,e){return t===r?t=r:t===e&&(t=e),t}function D(t){return void 0!==t}var e=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,G=function(t){if(!e.test(t))return null;var r=e.exec(t);return{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)}};function H(t,r,e){var n=e/100*(r-t);return 1===(n=Math.round(t+n).toString(16)).length&&(n="0"+n),n}function J(i,d){this.node=i.get(0);var e=this;i.empty().addClass("jq-ry-container");var g,n,m,h,v,t,r=N("<div/>").addClass("jq-ry-group-wrapper").appendTo(i),y=N("<div/>").addClass("jq-ry-normal-group").addClass("jq-ry-group").appendTo(r),a=N("<div/>").addClass("jq-ry-rated-group").addClass("jq-ry-group").appendTo(r),w=0,o=d.rating,l=!1;function s(t){D(t)||(t=d.rating);var r=(o=t)/g,e=r*m;1<r&&(e+=(Math.ceil(r)-1)*v),k(d.ratedFill),(e=d.rtl?100-e:e)<0?e=0:100<e&&(e=100),a.css("width",e+"%")}function c(){t=n*d.numStars+h*(d.numStars-1),m=n/t*100,v=h/t*100,i.width(t),s()}function u(t){var r=d.starWidth=t;return n=window.parseFloat(d.starWidth.replace("px","")),y.find("svg").attr({width:d.starWidth,height:r}),a.find("svg").attr({width:d.starWidth,height:r}),c(),i}function p(t){return d.spacing=t,h=parseFloat(d.spacing.replace("px","")),y.find("svg:not(:first-child)").css({"margin-left":t}),a.find("svg:not(:first-child)").css({"margin-left":t}),c(),i}function f(t){return d.normalFill=t,(d.rtl?a:y).find("svg").attr({fill:d.normalFill}),i}var b=d.ratedFill;function k(t){if(d.multiColor){var r=(o-w)/d.maxValue*100,e=d.multiColor||{};t=function(t,r,e){if(!t||!r)return null;e=D(e)?e:0,t=G(t),r=G(r);var n=H(t.r,r.r,e),a=H(t.b,r.b,e);return"#"+n+H(t.g,r.g,e)+a}(e.startColor||X.startColor,e.endColor||X.endColor,r)}else b=t;return d.ratedFill=t,(d.rtl?y:a).find("svg").attr({fill:d.ratedFill}),i}function x(t){t=!!t,d.rtl=t,f(d.normalFill),s()}function S(t){k((d.multiColor=t)||b)}function C(t){d.numStars=t,g=d.maxValue/d.numStars,y.empty(),a.empty();for(var r=0;r<d.numStars;r++)y.append(N(d.starSvg||Q)),a.append(N(d.starSvg||Q));return u(d.starWidth),f(d.normalFill),p(d.spacing),s(),i}function F(t){return d.maxValue=t,g=d.maxValue/d.numStars,d.rating>t&&E(t),s(),i}function j(t){return d.precision=t,E(d.rating),i}function q(t){return d.halfStar=t,i}function z(t){return d.fullStar=t,i}function I(t){var r,e,n,a,i,o=y.offset().left,l=o+y.width(),s=d.maxValue,c=t.pageX,u=0;if(c<o)u=w;else if(l<c)u=s;else{var p=(c-o)/(l-o);if(0<h)for(var f=p*=100;0<f;)m<f?(u+=g,f-=m+v):(u+=f/m*g,f=0);else u=p*d.maxValue;e=(r=u)%g,n=g/2,a=d.halfStar,((i=d.fullStar)||a)&&(i||a&&n<e?r+=g-e:(r-=e,0<e&&(r+=n))),u=r}return d.rtl&&(u=s-u),parseFloat(u)}function V(t){return d.readOnly=t,i.attr("readonly",!0),L(),t||(i.removeAttr("readonly"),i.on("mousemove",M).on("mouseenter",M).on("mouseleave",T).on("click",R).on("rateyo.init",Y).on("rateyo.change",_).on("rateyo.set",B)),i}function E(t){var r=t,e=d.maxValue;return"string"==typeof r&&("%"===r[r.length-1]&&(r=r.substr(0,r.length-1),F(e=100)),r=parseFloat(r)),function(t,r,e){if(!(r<=t&&t<=e))throw Error("Invalid Rating, expected value between "+r+" and "+e)}(r,w,e),r=parseFloat(r.toFixed(d.precision)),$(parseFloat(r),w,e),d.rating=r,s(),l&&i.trigger("rateyo.set",{rating:r}),i}function W(t){return d.onInit=t,i}function A(t){return d.onSet=t,i}function O(t){return d.onChange=t,i}function M(t){var r=I(t).toFixed(d.precision),e=d.maxValue;s(r=$(parseFloat(r),w,e)),i.trigger("rateyo.change",{rating:r})}function T(){var t,r;(r=!1,t=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(r=!0),r)||(s(),i.trigger("rateyo.change",{rating:d.rating}))}function R(t){var r=I(t).toFixed(d.precision);r=parseFloat(r),e.rating(r)}function Y(t,r){d.onInit&&"function"==typeof d.onInit&&d.onInit.apply(this,[r.rating,e])}function _(t,r){d.onChange&&"function"==typeof d.onChange&&d.onChange.apply(this,[r.rating,e])}function B(t,r){d.onSet&&"function"==typeof d.onSet&&d.onSet.apply(this,[r.rating,e])}function L(){i.off("mousemove",M).off("mouseenter",M).off("mouseleave",T).off("click",R).off("rateyo.init",Y).off("rateyo.change",_).off("rateyo.set",B)}this.rating=function(t){return D(t)?(E(t),i):d.rating},this.destroy=function(){var n,a;return d.readOnly||L(),J.prototype.collection=(n=i.get(0),a=this.collection,N.each(a,function(t){if(n===this.node){var r=a.slice(0,t),e=a.slice(t+1,a.length);return a=r.concat(e),!1}}),a),i.removeClass("jq-ry-container").children().remove(),i},this.method=function(t){if(!t)throw Error("Method name not specified!");if(!D(this[t]))throw Error("Method "+t+" doesn't exist!");var r=Array.prototype.slice.apply(arguments,[]).slice(1);return this[t].apply(this,r)},this.option=function(t,r){if(!D(t))return d;var e;switch(t){case"starWidth":e=u;break;case"numStars":e=C;break;case"normalFill":e=f;break;case"ratedFill":e=k;break;case"multiColor":e=S;break;case"maxValue":e=F;break;case"precision":e=j;break;case"rating":e=E;break;case"halfStar":e=q;break;case"fullStar":e=z;break;case"readOnly":e=V;break;case"spacing":e=p;break;case"rtl":e=x;break;case"onInit":e=W;break;case"onSet":e=A;break;case"onChange":e=O;break;default:throw Error("No such option as "+t)}return D(r)?e(r):d[t]},C(d.numStars),V(d.readOnly),d.rtl&&x(d.rtl),this.collection.push(this),this.rating(d.rating,!0),l=!0,i.trigger("rateyo.init",{rating:d.rating})}function c(t,r){var e;return N.each(r,function(){if(t===this.node)return e=this,!1}),e}J.prototype.collection=[],window.RateYo=J,N.fn.rateYo=function(){return function(e){var i=J.prototype.collection,t=N(this);if(0===t.length)return t;var r=Array.prototype.slice.apply(arguments,[]);if(0===r.length)e=r[0]={};else{if(1!==r.length||"object"!=typeof r[0]){if(1<=r.length&&"string"==typeof r[0]){var o=r[0],l=r.slice(1),s=[];return N.each(t,function(t,r){var e=c(r,i);if(!e)throw Error("Trying to set options before even initialization");var n=e[o];if(!n)throw Error("Method "+o+" does not exist!");var a=n.apply(e,l);s.push(a)}),s=1===s.length?s[0]:s}throw Error("Invalid Arguments")}e=r[0]}return e=N.extend({},n,e),N.each(t,function(){var t=c(this,i);if(t)return t;var r=N(this),n={},a=N.extend({},e);return N.each(r.data(),function(t,r){if(0===t.indexOf("rateyo")){var e=t.replace(/^rateyo/,"");e=e[0].toLowerCase()+e.slice(1),n[e]=r,delete a[e]}}),new J(N(this),N.extend({},n,a))})}.apply(this,Array.prototype.slice.apply(arguments,[]))}}(window.jQuery);
|
4 |
//# sourceMappingURL=jquery.rateyo.min.js.map
|
admin_section/js/main-script.min.js
CHANGED
@@ -1 +1,1784 @@
|
|
1 |
-
function getParameterByName(e,s){s||(s=window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var a=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(s);return a?a[2]?decodeURIComponent(a[2].replace(/\+/g," ")):"":null}function saswp_schema_datepicker(){jQuery(".saswp-datepicker-picker").datepicker({dateFormat:"yy-mm-dd",minDate:0})}var saswp_meta_fields=[];function saswp_get_post_specific_schema_fields(e,s,a,t,i){if(saswp_meta_fields[i]){var o=saswp_fields_html_generator(e,t,i,a,saswp_meta_fields[i]);o&&($(".saswp-"+a+'-section[data-id="'+t+'"]').append(o),saswp_schema_datepicker())}else $.get(ajaxurl,{action:"saswp_get_schema_dynamic_fields_ajax",meta_name:s,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){saswp_meta_fields[i]=s,console.log(saswp_meta_fields);var o=saswp_fields_html_generator(e,t,i,a,s);o&&($(".saswp-"+a+'-section[data-id="'+t+'"]').append(o),saswp_schema_datepicker())},"json")}function saswp_fields_html_generator(e,s,a,t,i){var o="";return o+='<div class="saswp-'+t+'-table-div" data-id="'+e+'"><a class="saswp-table-close">X</a><table class="form-table saswp-'+t+'-table">',$.each(i,function(t,i){var n="";switch("saswp_tvseries_season_published_date"==i.name&&(n="saswp-datepicker-picker"),i.type){case"text":o+="<tr><th>"+i.label+'</th><td><input class="'+n+'" style="width:100%" type="text" id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']"></td></tr>';break;case"textarea":o+="<tr><th>"+i.label+'</th><td><textarea style="width: 100%" id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']" rows="5"></textarea></td></tr>';break;case"select":var c="";$.each(i.options,function(e,s){c+='<option value="'+e+'">'+s+"</option>"}),o+="<tr><th>"+i.label+'</th><td><select id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']">'+c+"</select></td></tr>";break;case"media":o+="<tr><th>"+i.label+'</th><td><fieldset><input style="width:80%" type="text" id="'+i.name+"_"+e+"_"+s+'" name="'+i.name+"_"+e+"_"+s+'"><input type="hidden" data-id="'+i.name+"_"+e+"_"+s+'_id" name="'+a+s+"["+e+"]["+i.name+'_id]" id="'+i.name+"_"+e+"_"+s+'_id"><input data-id="media" style="width: 19%" class="button" id="'+i.name+"_"+e+"_"+s+'_button" name="'+i.name+"_"+e+"_"+s+'_button" type="button" value="Upload"><div class="saswp_image_div_'+i.name+"_"+e+"_"+s+'"></div></fieldset></td></tr>'}}),o+="</table></div>"}jQuery(document).ready(function(e){if(saswp_localize_data.do_tour){var s,a="<h3>Thanks for using Structured Data!</h3>";a+="<p>Do you want the latest on <b>Structured Data update</b> before others and some best resources on monetization in a single email? - Free just for users of Structured Data!</p>",a+='<style type="text/css">',a+=".wp-pointer-buttons{ padding:0; overflow: hidden; }",a+=".wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none}\t#afw_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }",a+="</style>",a+='<div id="afw_mc_embed_signup">',a+='<form action="//app.mailerlite.com/webforms/submit/o1s7u3" data-id="258182" data-code="o1s7u3" method="POST" target="_blank">',a+='<div id="afw_mc_embed_signup_scroll">',a+='<div class="afw-mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">',a+='<input type="text" name="fields[name]" class="form-control" placeholder="Name" hidden value="'+saswp_localize_data.current_user_name+'" style="display:none">',a+='<input type="text" value="'+saswp_localize_data.current_user_email+'" name="fields[email]" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">',a+='<input type="text" name="fields[company]" class="form-control" placeholder="Website" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="'+saswp_localize_data.get_home_url+'">',a+='<input type="hidden" name="ml-submit" value="1" />',a+="</div>",a+='<div id="mce-responses">',a+='<div class="response" id="mce-error-response" style="display:none"></div>',a+='<div class="response" id="mce-success-response" style="display:none"></div>',a+="</div>",a+='<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a631df13442f19caede5a5baf_c9a71edce6" tabindex="-1" value=""></div>',a+='<input type="submit" value="Subscribe" name="subscribe" id="pointer-close" class="button mc-newsletter-sent" style=" background: #0085ba; border-color: #006799; padding: 0px 16px; text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799; height: 30px; margin-top: 1px; color: #fff; box-shadow: 0 1px 0 #006799;">',a+="</div>",a+="</form>";var t={content:a+="</div>",position:{edge:"top",align:"left"}};s=function(){e(saswp_localize_data.displayID).pointer(t).pointer("open"),saswp_localize_data.button2&&(jQuery("#pointer-close").after('<a id="pointer-primary" class="button-primary">'+saswp_localize_data.button2+"</a>"),jQuery("#pointer-primary").click(function(){saswp_localize_data.function_name}),jQuery("#pointer-close").click(function(){e.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer222",action:"dismiss-wp-pointer"})}))},(t=e.extend(t,{buttons:function(e,s){return button=jQuery('<a id="pointer-close" class="button-secondary">'+saswp_localize_data.button1+"</a>"),button_2=jQuery("#pointer-close.button"),button.bind("click.pointer",function(){s.element.pointer("close")}),button_2.on("click",function(){s.element.pointer("close")}),button},close:function(){e.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer222",action:"dismiss-wp-pointer"})},show:function(e,s){s.pointer.css({left:"170px",top:"160px"})}})).position&&t.position.defer_loading?e(window).bind("load.wp-pointers",s):s()}function i(s,a){var t=a.replace("-checkbox",""),i=e("#"+t).next("p").text();s.is(":checked")&&""!==i?e("#"+t).next("p").removeClass("saswp_hide"):1==e("#"+t).next("p").attr("data-id")?e("#"+t).next("p").text("This feature is only available in pro version"):e("#"+t).next("p").addClass("saswp_hide")}function o(){e(".saswp-item-reviewed").change(function(s){s.preventDefault();var a="";if(e("select#schema_type option:selected").val()&&(a=e("select#schema_type option:selected").val()),e(".saswp-tab-links.selected").attr("saswp-schema-type")&&(a=e(".saswp-tab-links.selected").attr("saswp-schema-type")),"Review"===a){var t=e(this),i=e(this).val(),o=saswp_localize_data.post_id,n=e(t).attr("data-id"),c=e(t).attr("post-specific");e.get(ajaxurl,{action:"saswp_get_item_reviewed_fields",schema_id:n,post_specific:c,item:i,post_id:o,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){e(t).parent().parent().nextAll().remove(".saswp-review-tr"),e(t).parent().parent().after(s)})}}).change()}function n(){"saswp"!=saswp_localize_data.post_type&&"saswp"!=saswp_localize_data.page_now||"saswp_page_structured_data_options"==saswp_localize_data.page_now||e(".saswp-custom-fields-select2").select2({ajax:{type:"POST",url:ajaxurl,dataType:"json",delay:250,data:function(e){return{saswp_security_nonce:saswp_localize_data.saswp_security_nonce,q:e.term,action:"saswp_get_custom_meta_fields"}},processResults:function(e){return{results:e}},cache:!0},minimumInputLength:2})}function c(){var s="";e("select#schema_type option:selected").val()&&(s=e("select#schema_type option:selected").val()),e(".saswp-tab-links.selected").attr("saswp-schema-type")&&(s=e(".saswp-tab-links.selected").attr("saswp-schema-type")),s&&e(".saswp-enable-rating-review-"+s.toLowerCase()).change(function(){e(this).is(":checked")?e(this).parent().parent().siblings(".saswp-rating-review-"+s.toLowerCase()).show():e(this).parent().parent().siblings(".saswp-rating-review-"+s.toLowerCase()).hide()}).change()}e(".saswp-tabs a").click(function(s){var a=e(this).attr("href"),t=getParameterByName("tab",a);return t||(t="general"),e(this).siblings().removeClass("nav-tab-active"),e(this).addClass("nav-tab-active"),e(".form-wrap").find(".saswp-"+t).siblings().hide(),e(".form-wrap .saswp-"+t).show(),window.history.pushState("","",a),!1}),e(".saswp-schame-type-select").change(function(){e(".saswp-custom-fields-table").html("");var s=e(this).val();e(".saswp-option-table-class tr").each(function(s,a){s>0&&(e(this).hide(),e(this).find("select").attr("disabled",!0))}),"TechArticle"==s||"Article"==s||"Blogposting"==s||"NewsArticle"==s||"WebPage"==s?e(".saswp-enable-speakable").parent().parent().show():e(".saswp-enable-speakable").parent().parent().hide(),"local_business"==s&&(e(".saswp-option-table-class tr").eq(1).show(),e(".saswp-business-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1),e(".select-post-type").val("show_globally").trigger("change")),"Service"==s&&(e(".saswp-service-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Review"==s&&(e(".saswp-review-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1),o()),"Product"==s&&(e(".saswp-product-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==s&&(e(".saswp-event-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"AudioObject"==s&&e(".saswp-audio-text-field-tr").show(),"SoftwareApplication"==s&&e(".saswp-softwareapplication-text-field-tr").show(),e(".saswp-schem-type-note").addClass("saswp_hide"),"qanda"==s&&e(".saswp-schem-type-note").removeClass("saswp_hide"),e(".saswp-job-posting-note").addClass("saswp_hide"),c()}),e("#saswp_business_type").change(function(){var s=e(this).val(),a=e(".saswp-schame-type-select").val();e(".saswp-option-table-class tr").each(function(s,a){s>1&&(e(this).hide(),e(this).find("select").attr("disabled",!0))}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?e(".saswp-enable-speakable").parent().parent().show():e(".saswp-enable-speakable").parent().parent().hide(),"local_business"==a&&(e(".saswp-"+s+"-tr").show(),e(".saswp-business-text-field-tr").show(),e(".saswp-"+s+"-tr").find("select").attr("disabled",!1)),"Service"==a&&(e(".saswp-service-text-field-tr").show(),e(".saswp-service-text-field-tr").find("select").attr("disabled",!1)),"Product"==a&&(e(".saswp-product-text-field-tr").show(),e(".saswp-product-text-field-tr").find("select").attr("disabled",!1)),"AudioObject"==a&&e(".saswp-audio-text-field-tr").show(),"SoftwareApplication"==a&&e(".saswp-softwareapplication-text-field-tr").show(),"Review"==a&&(e(".saswp-review-text-field-tr").show(),e(".saswp-review-text-field-tr").find("select").attr("disabled",!1)),"Event"==a&&(e(".saswp-event-text-field-tr").show(),e(".saswp-event-text-field-tr").find("select").attr("disabled",!1)),c()}).change(),e(".saswp-checkbox").change(function(){var s=e(this).attr("id"),a=e(this);switch(s){case"saswp-for-wordpress-checkbox":e(this).is(":checked")?e("#saswp-for-wordpress").val(1):e("#saswp-for-wordpress").val(0);break;case"saswp-facebook-enable-checkbox":e(this).is(":checked")?(e("#saswp-facebook-enable").val(1),e("#sd_facebook").show()):(e("#saswp-facebook-enable").val(0),e("#sd_facebook").hide());break;case"saswp-twitter-enable-checkbox":e(this).is(":checked")?(e("#saswp-twitter-enable").val(1),e("#sd_twitter").show()):(e("#saswp-twitter-enable").val(0),e("#sd_twitter").hide());break;case"saswp-google-plus-enable-checkbox":e(this).is(":checked")?(e("#saswp-google-plus-enable").val(1),e("#sd_google_plus").show()):(e("#saswp-google-plus-enable").val(0),e("#sd_google_plus").hide());break;case"saswp-instagram-enable-checkbox":e(this).is(":checked")?(e("#saswp-instagram-enable").val(1),e("#sd_instagram").show()):(e("#saswp-instagram-enable").val(0),e("#sd_instagram").hide());break;case"saswp-youtube-enable-checkbox":e(this).is(":checked")?(e("#sd_youtube").show(),e("#saswp-youtube-enable").val(1)):(e("#saswp-youtube-enable").val(0),e("#sd_youtube").hide());break;case"saswp-linkedin-enable-checkbox":e(this).is(":checked")?(e("#saswp-linkedin-enable").val(1),e("#sd_linkedin").show()):(e("#saswp-linkedin-enable").val(0),e("#sd_linkedin").hide());break;case"saswp-pinterest-enable-checkbox":e(this).is(":checked")?(e("#saswp-pinterest-enable").val(1),e("#sd_pinterest").show()):(e("#saswp-pinterest-enable").val(0),e("#sd_pinterest").hide());break;case"saswp-soundcloud-enable-checkbox":e(this).is(":checked")?(e("#saswp-soundcloud-enable").val(1),e("#sd_soundcloud").show()):(e("#saswp-soundcloud-enable").val(0),e("#sd_soundcloud").hide());break;case"saswp-tumblr-enable-checkbox":e(this).is(":checked")?(e("#saswp-tumblr-enable").val(1),e("#sd_tumblr").show()):(e("#saswp-tumblr-enable").val(0),e("#sd_tumblr").hide());break;case"saswp-for-amp-checkbox":e(this).is(":checked")?e("#saswp-for-amp").val(1):e("#saswp-for-amp").val(0);break;case"saswp_kb_contact_1_checkbox":e(this).is(":checked")?(e("#saswp_kb_contact_1").val(1),e("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").removeClass("saswp-display-none")):(e("#saswp_kb_contact_1").val(0),e("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").addClass("saswp-display-none"));break;case"saswp-logo-dimensions-check":e(this).is(":checked")?(e("#saswp-logo-dimensions").val(1),e("#saswp-logo-width, #saswp-logo-height").parent().parent("li").show()):(e("#saswp-logo-dimensions").val(0),e("#saswp-logo-width, #saswp-logo-height").parent().parent("li").hide());break;case"saswp_archive_schema_checkbox":e(this).is(":checked")?(e("#saswp_archive_schema").val(1),e(".saswp_archive_schema_type_class").parent().parent().show()):(e("#saswp_archive_schema").val(0),e(".saswp_archive_schema_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":e(this).is(":checked")?(e("#saswp_website_schema").val(1),e("#saswp_search_box_schema").parent().parent().show()):(e("#saswp_website_schema").val(0),e("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":e(this).is(":checked")?e("#saswp_search_box_schema").val(1):e("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_schema_checkbox":e(this).is(":checked")?e("#saswp_breadcrumb_schema").val(1):e("#saswp_breadcrumb_schema").val(0);break;case"saswp_comments_schema_checkbox":e(this).is(":checked")?e("#saswp_comments_schema").val(1):e("#saswp_comments_schema").val(0);break;case"saswp-compativility-checkbox":e(this).is(":checked")?e("#saswp-flexmlx-compativility").val(1):e("#saswp-flexmlx-compativility").val(0);break;case"saswp-review-module-checkbox":e(this).is(":checked")?e("#saswp-review-module").val(1):e("#saswp-review-module").val(0);break;case"saswp-kk-star-raring-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-kk-star-raring").val(1):e("#saswp-kk-star-raring").val(0);break;case"saswp-woocommerce-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-woocommerce").val(1):e("#saswp-woocommerce").val(0);break;case"saswp-extra-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-extra").val(1):e("#saswp-extra").val(0);break;case"saswp-dw-question-answer-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-dw-question-answer").val(1):e("#saswp-dw-question-answer").val(0);break;case"saswp-wp-job-manager-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-wp-job-manager").val(1):e("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-yoast").val(1):e("#saswp-yoast").val(0);break;case"saswp-rankmath-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-rankmath").val(1):e("#saswp-rankmath").val(0);break;case"saswp-tagyeem-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-tagyeem").val(1):e("#saswp-tagyeem").val(0);break;case"saswp-the-events-calendar-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-the-events-calendar").val(1):e("#saswp-the-events-calendar").val(0);break;case"saswp-woocommerce-booking-checkbox":i(a,s),e(this).is(":checked")?(e("#saswp-woocommerce-booking").val(1),e("#saswp-woocommerce-booking-main").val(1)):(e("#saswp-woocommerce-booking").val(0),e("#saswp-woocommerce-booking-main").val(0));break;case"saswp-woocommerce-booking-main-checkbox":i(a,s),e(this).is(":checked")?(e("#saswp-woocommerce-booking-main").val(1),e("#saswp-woocommerce-booking").val(1)):(e("#saswp-woocommerce-booking-main").val(0),e("#saswp-woocommerce-booking").val(0));break;case"saswp-woocommerce-membership-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-woocommerce-membership").val(1):e("#saswp-woocommerce-membership").val(0);break;case"saswp-defragment-checkbox":e(this).is(":checked")?e("#saswp-defragment").val(1):e("#saswp-defragment").val(0);break;case"saswp-cooked-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-cooked").val(1):e("#saswp-cooked").val(0);break;case"saswp-flexmlx-compativility-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-flexmlx-compativility").val(1):e("#saswp-flexmlx-compativility").val(0);break;case"saswp-google-review-checkbox":e(this).is(":checked")?(e("#saswp-google-review").val(1),e("#saswp-google-rv-free-checkbox").length?(e("#saswp-google-review-free").parent().parent().show(),e("#saswp-google-rv-free-checkbox").is(":checked")?e("#saswp_google_place_api_key").parent().parent().show():e("#saswp_google_place_api_key").parent().parent().hide()):e("#saswp_google_place_api_key").parent().parent().show(),e(".saswp-g-reviews-settings-table").parent().parent().parent().show()):(e("#saswp-google-review").val(0),e("#saswp_google_place_api_key").parent().parent().hide(),e(".saswp-g-reviews-settings-table").parent().parent().parent().hide(),e("#saswp-google-rv-free-checkbox").length&&e("#saswp-google-review-free").parent().parent().hide());break;case"saswp-google-rv-free-checkbox":e("#saswp-google-review-checkbox").is(":checked")&&e(this).is(":checked")?(e("#saswp-google-review-free").val(1),e("#saswp_google_place_api_key").parent().parent().show()):(e("#saswp-google-review-free").val(0),e("#saswp_google_place_api_key").parent().parent().hide());break;case"saswp-markup-footer-checkbox":e(this).is(":checked")?e("#saswp-markup-footer").val(1):e("#saswp-markup-footer").val(0);break;case"saswp-pretty-print-checkbox":e(this).is(":checked")?e("#saswp-pretty-print").val(1):e("#saswp-pretty-print").val(0);break;case"saswp-wppostratings-raring-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-wppostratings-raring").val(1):e("#saswp-wppostratings-raring").val(0);break;case"saswp-bbpress-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-bbpress").val(1):e("#saswp-bbpress").val(0);break;case"saswp-microdata-cleanup-checkbox":e(this).is(":checked")?e("#saswp-microdata-cleanup").val(1):e("#saswp-microdata-cleanup").val(0)}}).change(),e("#saswp_kb_type").change(function(){var s=e(this).val();e(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass("saswp_hide"),e(".saswp_kg_logo").parent().parent().parent().addClass("saswp_hide"),e("#sd-person-image").parent().parent().parent().addClass("saswp_hide"),"Organization"==s&&(e(".saswp_org_fields").parent().parent().removeClass("saswp_hide"),e(".saswp_person_fields").parent().parent().addClass("saswp_hide"),e(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),e("#sd-person-image").parent().parent().parent().addClass("saswp_hide")),"Person"==s&&(e(".saswp_org_fields").parent().parent().addClass("saswp_hide"),e(".saswp_person_fields").parent().parent().removeClass("saswp_hide"),e(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),e("#sd-person-image").parent().parent().parent().removeClass("saswp_hide"))}).change(),e(document).on("click","input[data-id=media]",function(s){s.preventDefault();var a=e(this),t=a.attr("id").replace("_button",""),i=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1,library:{type:"image"}}).on("select",function(){var s=i.state().get("selection").first().toJSON();e("#"+t).val(s.url),e("input[data-id='"+t+"_id']").val(s.id),e("input[data-id='"+t+"_height']").val(s.height),e("input[data-id='"+t+"_width']").val(s.width),e("input[data-id='"+t+"_thumbnail']").val(s.url),"sd_default_image_button"===a.attr("id")&&(e("#sd_default_image_width").val(s.width),e("#sd_default_image_height").val(s.height));var o="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&s.height<1200&&(o='<p class="saswp_warning">Image size is smaller than recommended size</p>'),e(".saswp_image_div_"+t).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+s.url+'"/><a data-id="'+t+'" href="#" class="saswp_prev_close">X</a></div>'+o)}).open()}),e(document).on("click",".saswp_prev_close",function(s){s.preventDefault();var a=e(this).attr("data-id");console.log(a),e(this).parent().remove(),e("#"+a).val(""),e("input[data-id='"+a+"_id']").val(""),e("input[data-id='"+a+"_height']").val(""),e("input[data-id='"+a+"_width']").val(""),e("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(e("#sd_default_image_width").val(""),e("#sd_default_image_height").val(""))}),e(document).on("change",".saswp-schema-type-toggle",function(s){var a=e(this).attr("data-schema-id"),t=e(this).attr("data-post-id");if(e(this).is(":checked"))var i=1;else i=0;e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_enable_disable_schema_on_post",status:i,schema_id:a,post_id:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){},error:function(e){console.log(e)}})}),e(document).on("click",".saswp-reset-data",function(s){s.preventDefault(),1==confirm("Are you sure?")&&e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){setTimeout(function(){location.reload()},1e3)},error:function(e){console.log(e)}})}),e(document).on("click",".saswp_license_activation",function(s){s.preventDefault();var a=e(this);a.addClass("updating-message");var t=e(this).attr("license-status"),i=e(this).attr("add-on"),o=e("#"+i+"_addon_license_key").val();t&&i&&o?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:o,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){e("#"+i+"_addon_license_key_status").val(s.status),"active"==s.status?(e(".saswp-"+i+"-dashicons").addClass("dashicons-yes"),e(".saswp-"+i+"-dashicons").removeClass("dashicons-no-alt"),e(".saswp-"+i+"-dashicons").css("color","green"),e(".saswp_license_activation[add-on='"+i+"']").attr("license-status","inactive"),e(".saswp_license_activation[add-on='"+i+"']").text("Deactivate"),e(".saswp_license_status_msg[add-on='"+i+"']").text("Activated"),e(".saswp_license_status_msg[add-on='"+i+"']").css("color","green"),e(".saswp_license_status_msg[add-on='"+i+"']").text(s.message)):(e(".saswp-"+i+"-dashicons").addClass("dashicons-no-alt"),e(".saswp-"+i+"-dashicons").removeClass("dashicons-yes"),e(".saswp-"+i+"-dashicons").css("color","red"),e(".saswp_license_activation[add-on='"+i+"']").attr("license-status","active"),e(".saswp_license_activation[add-on='"+i+"']").text("Activate"),e(".saswp_license_status_msg[add-on='"+i+"']").css("color","red"),e(".saswp_license_status_msg[add-on='"+i+"']").text(s.message)),a.removeClass("updating-message")},error:function(e){console.log(e)}}):(alert("Please enter value license key"),a.removeClass("updating-message"))}),e(".saswp-send-query").on("click",function(s){s.preventDefault();var a=e("#saswp_query_message").val();""!=e.trim(a)?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_send_query_message",message:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(e(".saswp-query-success").show(),e(".saswp-query-error").hide()):(console.log("dd"),e(".saswp-query-success").hide(),e(".saswp-query-error").show())},error:function(e){console.log(e)}}):alert("Please enter the message")}),e(".saswp-import-plugins").on("click",function(s){s.preventDefault();var a=e(this);a.addClass("updating-message");var t=e(this).attr("data-id");e.get(ajaxurl,{action:"saswp_import_plugin_data",plugin_name:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){"t"==s.status?(e(a).parent().find(".saswp-imported-message").text(s.message),e(a).parent().find(".saswp-imported-message").removeClass("saswp-error"),setTimeout(function(){location.reload()},2e3)):(e(a).parent().find(".saswp-imported-message").addClass("saswp-error"),e(a).parent().find(".saswp-imported-message").text(s.message)),a.removeClass("updating-message")},"json")}),e(".saswp-feedback-no-thanks").on("click",function(s){s.preventDefault(),e.get(ajaxurl,{action:"saswp_feeback_no_thanks"},function(s){"t"==s.status&&e(".saswp-feedback-notice").hide()},"json")}),e(".saswp-feedback-remindme").on("click",function(s){s.preventDefault(),e.get(ajaxurl,{action:"saswp_feeback_remindme"},function(s){"t"==s.status&&e(".saswp-feedback-notice").hide()},"json")}),e(document).on("change",".saswp-local-business-type-select",function(s){s.preventDefault();var a=e(this),t=e(this).val();e.get(ajaxurl,{action:"saswp_get_sub_business_ajax",business_type:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){if("t"==s.status){e(".saswp-local-business-name-select").parents("tr").remove();var t=a.parents(".saswp-post-specific-wrapper").attr("data-id"),i='<tr><th><label for="saswp_business_name_'+t+'">Sub Business Type</label></th>';i+='<td><select class="saswp-local-business-name-select" id="saswp_business_name_'+t+'" name="saswp_business_name_'+t+'">',e.each(s.result,function(e,s){i+='<option value="'+e+'">'+s+"</option>"}),i+="</select></td>",i+="</tr>",a.parents(".form-table tr:first").after(i)}else e(".saswp-local-business-name-select").parents("tr").remove()},"json")}),o(),e(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),e(document).on("click",".saswp-add-custom-schema",function(s){s.preventDefault(),e(".saswp-add-custom-schema-field").removeClass("saswp_hide"),e(this).hide()}),e(document).on("click",".saswp-delete-custom-schema",function(s){s.preventDefault(),e("#saswp_custom_schema_field").val(""),e(".saswp-add-custom-schema-field").addClass("saswp_hide"),e(".saswp-add-custom-schema").show()}),e(".saswp-modify_schema_post_enable").on("click",function(s){var a=e(this);a.addClass("updating-message"),s.preventDefault(),e.get(ajaxurl,{action:"saswp_modify_schema_post_enable",post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){a.remove(),e(".saswp-add-custom-schema-div").remove(),e("#post_specific .inside").append(s),a.removeClass("updating-message"),e(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),saswp_schema_datepicker(),c(),o()})}),saswp_schema_datepicker(),e(".saswp-reviews-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"}),e(document).on("click",".saswp-add-more-item",function(s){s.preventDefault();var a=e(".saswp-review-item-list-table tr").length;console.log(a);e(".saswp-review-item-list-table").append('<tr class="saswp-review-item-tr"><td>Review Item Feature</td><td><input type="text" name="saswp-review-item-feature[]"></td><td>Rating</td><td><input step="0.1" min="0" max="5" type="number" name="saswp-review-item-star-rating[]"></td><td><a type="button" class="saswp-remove-review-item button">x</a></td></tr>')}),e(document).on("click",".saswp-remove-review-item",function(s){s.preventDefault(),e(this).parent().parent("tr").remove()}),e(document).on("focusout",".saswp-review-item-tr input[type=number]",function(s){s.preventDefault();var a=0,t=e(".saswp-review-item-tr input[type=number]").length;e(".saswp-review-item-tr input[type=number]").each(function(s,t){""==e(t).val()?a+=parseFloat(0):a+=parseFloat(e(t).val())});var i=a/t;e("#saswp-review-item-over-all").val(i)}),e("#saswp-review-location").change(function(){var s=e(this).val();e(".saswp-review-shortcode").addClass("saswp_hide"),3==s&&e(".saswp-review-shortcode").removeClass("saswp_hide")}).change(),e("#saswp-review-item-enable").change(function(){e(this).is(":checked")?e(".saswp-review-fields").show():e(".saswp-review-fields").hide()}).change(),e(document).on("click",".saswp-restore-post-schema",function(s){s.preventDefault();var a=e(this);if(a.addClass("updating-message"),e(".saswp-post-specific-schema-ids").val())var t=JSON.parse(e(".saswp-post-specific-schema-ids").val());e.post(ajaxurl,{action:"saswp_restore_schema",schema_ids:t,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status?setTimeout(function(){location.reload()},1e3):(alert(e.msg),setTimeout(function(){location.reload()},1e3)),a.removeClass("updating-message")},"json")}),e(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(s){s.preventDefault();var a=e(this).attr("data-id");e(".saswp-post-specific-wrapper").hide(),e("#"+a).show(),e("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),e("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),e(this).addClass("selected"),e(this).parent().addClass("selected"),c()}),e("#saswp-global-tabs a:first").addClass("saswp-global-selected"),e(".saswp-global-container").hide(),e(".saswp-global-container:first").show(),e("#saswp-global-tabs a").click(function(){var s=e(this).attr("data-id");e(this).hasClass("saswp-global-selected")||(e("#saswp-global-tabs a").removeClass("saswp-global-selected"),e(this).addClass("saswp-global-selected"),e(".saswp-global-container").hide(),e("#"+s).show())}),e("#saswp-tools-tabs a:first").addClass("saswp-global-selected"),e(".saswp-tools-container").hide(),e(".saswp-tools-container:first").show(),e("#saswp-tools-tabs a").click(function(){var s=e(this).attr("data-id");e(this).hasClass("saswp-global-selected")||(e("#saswp-tools-tabs a").removeClass("saswp-global-selected"),e(this).addClass("saswp-global-selected"),e(".saswp-tools-container").hide(),e("#"+s).show())}),e("#saswp-review-tabs a:first").addClass("saswp-global-selected"),e(".saswp-review-container").hide(),e(".saswp-review-container:first").show(),e("#saswp-review-tabs a").click(function(){var s=e(this).attr("data-id");e(this).hasClass("saswp-global-selected")||(e("#saswp-review-tabs a").removeClass("saswp-global-selected"),e(this).addClass("saswp-global-selected"),e(".saswp-review-container").hide(),e("#"+s).show())}),e('a[href="'+saswp_localize_data.new_url_selector+'"]').attr("href",saswp_localize_data.new_url_href),e("#saswp_enable_custom_field").change(function(){e(this).is(":checked")?e(".saswp-custom-fields-div").show():e(".saswp-custom-fields-div").hide()}),e(document).on("change",".saswp-custom-fields-name",function(){e(this).parent().parent("tr").find("td:eq(1)").html("");var s="";s+='<select class="saswp-custom-fields-select2" name="saswp_custom_fields['+e(this).val()+']">',s+="</select>",e(this).parent().parent("tr").find("td:eq(1)").html(s),n()}),e(document).on("click",".saswp-skip-button",function(s){s.preventDefault(),e(this).parent().parent().hide(),e.post(ajaxurl,{action:"saswp_skip_wizard",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){},"json")}),e(document).on("click",".saswp_add_schema_fields_on_fly",function(s){s.preventDefault();var a=e(this).attr("data-id"),t=e(this).attr("fields_type"),i=e(this).attr("div_type"),o=e(".saswp-"+i+"-table-div").length,n=e(".saswp-"+i+"-table-div:nth-child("+o+")").attr("data-id");(n=++n)||(n=0),saswp_get_post_specific_schema_fields(n,t,i,a,t+"_")}),e(document).on("click",".saswp-table-close",function(){e(this).parent().remove()}),e(document).on("click",".saswp-add-custom-fields",function(){var s=e("select#schema_type option:selected").val(),a=e("#post_ID").val();""!=s&&e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:a,schema_type:s,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){if(0!=s.length){var a=0,t="",i="<tr>";i+="<td>",i+='<select class="saswp-custom-fields-name">',e.each(s,function(e,s){0==a&&(t=e),i+='<option value="'+e+'">'+s+"</option>",a++}),i+="</select>",i+="</td>",i+="<td>",i+='<select class="saswp-custom-fields-select2" name="saswp_custom_fields['+t+']">',i+="</select>",i+="</td>",i+="</tr>",e(".saswp-custom-fields-table").append(i),n()}},error:function(e){console.log(e)}})}),n(),c(),e('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),e(document).on("click",".saswp_coonect_google_place",function(){var s=e("#saswp_google_place_id").val(),a=e("#saswp_language_list").val(),t=e("#saswp_googel_api").val();""!=s&&e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:s,language:a,google_api:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){console.log(e.status)},error:function(e){console.log(e)}})}),"saswp"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>"),"undefined"!=typeof saswp_reviews_data&&e(".saswp-rating-div").rateYo({rating:saswp_reviews_data.rating_val,halfStar:!0,readOnly:saswp_reviews_data.readonly,onSet:function(s,a){e(this).next().val(s),console.log(s)}}),e(document).on("click",".saswp-add-g-location-btn",function(s){var a="";a=e("#saswp_google_place_api_key").length?'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="5" step="5" placeholder="5" disabled="disabled">':'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="10" step="10" placeholder="10">',s.preventDefault();var t="";(t+='<tr><td style="width:12%;"><strong>Place Id</strong></td><td style="width:20%;"><input class="saswp-g-location-field" name="sd_data[saswp_reviews_location_name][]" type="text" value=""></td><td style="width:10%;"><strong>Reviews</strong></td><td style="width:10%;">'+a+'</td><td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">Fetch</a></td><td style="width:10%;"><a type="button" class="saswp-remove-review-item button">x</a></td><td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td></tr>')&&e(".saswp-g-reviews-settings-table").append(t)}),e(document).on("click",".saswp-fetch-g-reviews",function(){var s=e(this),a="free";s.addClass("updating-message");var t=e(this).parent().parent().find(".saswp-g-location-field").val(),i=e(this).parent().parent().find(".saswp-g-blocks-field").val(),o=e("#saswp_google_place_api_key").val(),n=e("#reviews_addon_license_key").val(),c=e("#reviews_addon_license_key_status").val();if("premium"==(a=e("#saswp_google_place_api_key").length?"free":"premium")){if(!(i>0))return alert("Blocks value is zero"),s.removeClass("updating-message"),!1;if(0!=i%10)return s.parent().parent().find(".saswp-rv-fetched-msg").text("Reviews count should be in step of 10"),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),s.removeClass("updating-message"),!1}""!=t&&(n||o)?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:c,reviews_api:n,location:t,blocks:i,g_api:o,premium_status:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s.parent().parent().find(".saswp-rv-fetched-msg").text("Success"),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(s.parent().parent().find(".saswp-rv-fetched-msg").text(e.message),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),s.removeClass("updating-message")},error:function(e){console.log(e)}}):(""==t&&alert("Please enter place id"),""==o&&alert("Please enter api key"),""==n&&alert("Please enter reviews api key"),s.removeClass("updating-message"))}),e("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var s=e(this);s.parent().find(".saswp-phone-validation").remove();var a=e(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(a)?s.parent().find(".saswp-phone-validation").remove():s.after('<span style="color:red;" class="saswp-phone-validation">Invalid Phone Number</span>')})});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var saswp_meta_list = [];
|
2 |
+
var saswp_meta_fields = [];
|
3 |
+
var saswp_meta_list_fields = null;
|
4 |
+
|
5 |
+
function getParameterByName(name, url) {
|
6 |
+
if (!url){
|
7 |
+
url = window.location.href;
|
8 |
+
}
|
9 |
+
name = name.replace(/[\[\]]/g, "\\$&");
|
10 |
+
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
|
11 |
+
results = regex.exec(url);
|
12 |
+
if (!results) return null;
|
13 |
+
if (!results[2]) return "";
|
14 |
+
return decodeURIComponent(results[2].replace(/\+/g, " "));
|
15 |
+
}
|
16 |
+
|
17 |
+
function saswp_schema_datepicker(){
|
18 |
+
|
19 |
+
jQuery('.saswp-datepicker-picker').datepicker({
|
20 |
+
dateFormat: "yy-mm-dd",
|
21 |
+
minDate: 0
|
22 |
+
});
|
23 |
+
|
24 |
+
}
|
25 |
+
|
26 |
+
|
27 |
+
function saswp_meta_list_html(response, fields, field_name, id){
|
28 |
+
|
29 |
+
var re_html = '';
|
30 |
+
re_html += '<select class="saswp-custom-meta-list" name="saswp_meta_list_val['+field_name+']">';
|
31 |
+
$.each(response, function(key,value){
|
32 |
+
|
33 |
+
re_html += '<optgroup label="'+value['label']+'">';
|
34 |
+
|
35 |
+
$.each(value['meta-list'], function(key, value){
|
36 |
+
re_html += '<option value="'+key+'">'+value+'</option>';
|
37 |
+
});
|
38 |
+
re_html += '</optgroup>';
|
39 |
+
|
40 |
+
});
|
41 |
+
re_html += '</select>';
|
42 |
+
|
43 |
+
if(fields){
|
44 |
+
var html = '<tr>';
|
45 |
+
html += '<td>';
|
46 |
+
html += '<select class="saswp-custom-fields-name">';
|
47 |
+
$.each(fields, function(key,value){
|
48 |
+
html += '<option value="'+key+'">'+value+'</option>';
|
49 |
+
});
|
50 |
+
html += '</select>';
|
51 |
+
html += '</td>';
|
52 |
+
html += '<td>';
|
53 |
+
html += re_html;
|
54 |
+
html += '</td>';
|
55 |
+
html += '</tr>';
|
56 |
+
$(".saswp-custom-fields-table").append(html);
|
57 |
+
|
58 |
+
}else{
|
59 |
+
$(id).html(re_html);
|
60 |
+
}
|
61 |
+
|
62 |
+
}
|
63 |
+
|
64 |
+
|
65 |
+
|
66 |
+
|
67 |
+
function saswp_get_meta_list(type, fields, id, fields_name){
|
68 |
+
if (!saswp_meta_list[type]) {
|
69 |
+
|
70 |
+
$.get(ajaxurl,
|
71 |
+
{ action:"saswp_get_meta_list", saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
72 |
+
function(response){
|
73 |
+
saswp_meta_list[type] = response[type];
|
74 |
+
saswp_meta_list_html(saswp_meta_list[type], fields, fields_name, id);
|
75 |
+
|
76 |
+
},'json');
|
77 |
+
|
78 |
+
}else{
|
79 |
+
saswp_meta_list_html(saswp_meta_list[type], fields, fields_name, id);
|
80 |
+
}
|
81 |
+
|
82 |
+
}
|
83 |
+
|
84 |
+
function saswp_get_post_specific_schema_fields(index, meta_name, div_type, schema_id, fields_type){
|
85 |
+
|
86 |
+
if (!saswp_meta_fields[fields_type]) {
|
87 |
+
|
88 |
+
$.get(ajaxurl,
|
89 |
+
{ action:"saswp_get_schema_dynamic_fields_ajax",meta_name:meta_name, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
90 |
+
function(response){
|
91 |
+
saswp_meta_fields[fields_type] = response;
|
92 |
+
console.log(saswp_meta_fields);
|
93 |
+
var html = saswp_fields_html_generator(index, schema_id, fields_type, div_type, response);
|
94 |
+
|
95 |
+
if(html){
|
96 |
+
$('.saswp-'+div_type+'-section[data-id="'+schema_id+'"]').append(html);
|
97 |
+
saswp_schema_datepicker();
|
98 |
+
}
|
99 |
+
|
100 |
+
},'json');
|
101 |
+
|
102 |
+
}else{
|
103 |
+
|
104 |
+
var html = saswp_fields_html_generator(index, schema_id, fields_type, div_type, saswp_meta_fields[fields_type]);
|
105 |
+
|
106 |
+
if(html){
|
107 |
+
$('.saswp-'+div_type+'-section[data-id="'+schema_id+'"]').append(html);
|
108 |
+
saswp_schema_datepicker();
|
109 |
+
}
|
110 |
+
|
111 |
+
}
|
112 |
+
|
113 |
+
|
114 |
+
}
|
115 |
+
|
116 |
+
function saswp_fields_html_generator(index, schema_id, fields_type, div_type, schema_fields){
|
117 |
+
|
118 |
+
var html = '';
|
119 |
+
|
120 |
+
html += '<div class="saswp-'+div_type+'-table-div" data-id="'+index+'">'
|
121 |
+
+ '<a class="saswp-table-close">X</a>'
|
122 |
+
+ '<table class="form-table saswp-'+div_type+'-table">'
|
123 |
+
|
124 |
+
$.each(schema_fields, function(eachindex, element){
|
125 |
+
|
126 |
+
var meta_class = "";
|
127 |
+
if(element.name == 'saswp_tvseries_season_published_date'){
|
128 |
+
meta_class = "saswp-datepicker-picker";
|
129 |
+
}
|
130 |
+
|
131 |
+
switch(element.type) {
|
132 |
+
|
133 |
+
case "text":
|
134 |
+
|
135 |
+
html += '<tr>'
|
136 |
+
+ '<th>'+element.label+'</th><td><input class="'+meta_class+'" style="width:100%" type="text" id="'+element.name+'_'+index+'_'+schema_id+'" name="'+fields_type+schema_id+'['+index+']['+element.name+']"></td>'
|
137 |
+
+ '</tr>';
|
138 |
+
|
139 |
+
break;
|
140 |
+
|
141 |
+
case "textarea":
|
142 |
+
|
143 |
+
html += '<tr>'
|
144 |
+
+ '<th>'+element.label+'</th><td><textarea style="width: 100%" id="'+element.name+'_'+index+'_'+schema_id+'" name="'+fields_type+schema_id+'['+index+']['+element.name+']" rows="5"></textarea></td>'
|
145 |
+
+ '</tr>';
|
146 |
+
|
147 |
+
break;
|
148 |
+
case "select":
|
149 |
+
|
150 |
+
var options_html = "";
|
151 |
+
$.each(element.options, function(opt_index, opt_element){
|
152 |
+
options_html += '<option value="'+opt_index+'">'+opt_element+'</option>';
|
153 |
+
});
|
154 |
+
|
155 |
+
html += '<tr>'
|
156 |
+
+ '<th>'+element.label+'</th>'
|
157 |
+
+ '<td>'
|
158 |
+
|
159 |
+
+ '<select id="'+element.name+'_'+index+'_'+schema_id+'" name="'+fields_type+schema_id+'['+index+']['+element.name+']">'
|
160 |
+
+ options_html
|
161 |
+
+ '</select>'
|
162 |
+
|
163 |
+
+ '</td>'
|
164 |
+
+ '</tr>';
|
165 |
+
|
166 |
+
break;
|
167 |
+
|
168 |
+
case "media":
|
169 |
+
|
170 |
+
html += '<tr>'
|
171 |
+
+ '<th>'+element.label+'</th>'
|
172 |
+
+ '<td>'
|
173 |
+
+ '<fieldset>'
|
174 |
+
+ '<input style="width:80%" type="text" id="'+element.name+'_'+index+'_'+schema_id+'" name="'+element.name+'_'+index+'_'+schema_id+'">'
|
175 |
+
+ '<input type="hidden" data-id="'+element.name+'_'+index+'_'+schema_id+'_id" name="'+fields_type+schema_id+'['+index+']['+element.name+'_id]" id="'+element.name+'_'+index+'_'+schema_id+'_id">'
|
176 |
+
+ '<input data-id="media" style="width: 19%" class="button" id="'+element.name+'_'+index+'_'+schema_id+'_button" name="'+element.name+'_'+index+'_'+schema_id+'_button" type="button" value="Upload">'
|
177 |
+
+ '<div class="saswp_image_div_'+element.name+'_'+index+'_'+schema_id+'">'
|
178 |
+
+ '</div>'
|
179 |
+
+ '</fieldset>'
|
180 |
+
+ '</td>'
|
181 |
+
+ '</tr>';
|
182 |
+
|
183 |
+
break;
|
184 |
+
default:
|
185 |
+
// code block
|
186 |
+
}
|
187 |
+
|
188 |
+
});
|
189 |
+
html += '</table>'
|
190 |
+
+ '</div>';
|
191 |
+
|
192 |
+
return html;
|
193 |
+
|
194 |
+
}
|
195 |
+
|
196 |
+
jQuery(document).ready(function($){
|
197 |
+
|
198 |
+
/* Newletters js starts here */
|
199 |
+
|
200 |
+
if(saswp_localize_data.do_tour){
|
201 |
+
|
202 |
+
var content = '<h3>Thanks for using Structured Data!</h3>';
|
203 |
+
content += '<p>Do you want the latest on <b>Structured Data update</b> before others and some best resources on monetization in a single email? - Free just for users of Structured Data!</p>';
|
204 |
+
content += '<style type="text/css">';
|
205 |
+
content += '.wp-pointer-buttons{ padding:0; overflow: hidden; }';
|
206 |
+
content += '.wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none} #afw_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }';
|
207 |
+
content += '</style>';
|
208 |
+
content += '<div id="afw_mc_embed_signup">';
|
209 |
+
content += '<form action="//app.mailerlite.com/webforms/submit/o1s7u3" data-id="258182" data-code="o1s7u3" method="POST" target="_blank">';
|
210 |
+
content += '<div id="afw_mc_embed_signup_scroll">';
|
211 |
+
content += '<div class="afw-mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">';
|
212 |
+
content += '<input type="text" name="fields[name]" class="form-control" placeholder="Name" hidden value="'+saswp_localize_data.current_user_name+'" style="display:none">';
|
213 |
+
content += '<input type="text" value="'+saswp_localize_data.current_user_email+'" name="fields[email]" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">';
|
214 |
+
content += '<input type="text" name="fields[company]" class="form-control" placeholder="Website" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="'+saswp_localize_data.get_home_url+'">';
|
215 |
+
content += '<input type="hidden" name="ml-submit" value="1" />';
|
216 |
+
content += '</div>';
|
217 |
+
content += '<div id="mce-responses">';
|
218 |
+
content += '<div class="response" id="mce-error-response" style="display:none"></div>';
|
219 |
+
content += '<div class="response" id="mce-success-response" style="display:none"></div>';
|
220 |
+
content += '</div>';
|
221 |
+
content += '<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a631df13442f19caede5a5baf_c9a71edce6" tabindex="-1" value=""></div>';
|
222 |
+
content += '<input type="submit" value="Subscribe" name="subscribe" id="pointer-close" class="button mc-newsletter-sent" style=" background: #0085ba; border-color: #006799; padding: 0px 16px; text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799; height: 30px; margin-top: 1px; color: #fff; box-shadow: 0 1px 0 #006799;">';
|
223 |
+
content += '</div>';
|
224 |
+
content += '</form>';
|
225 |
+
content += '</div>';
|
226 |
+
|
227 |
+
var setup;
|
228 |
+
var wp_pointers_tour_opts = {
|
229 |
+
content:content,
|
230 |
+
position:{
|
231 |
+
edge:"top",
|
232 |
+
align:"left"
|
233 |
+
}
|
234 |
+
};
|
235 |
+
|
236 |
+
wp_pointers_tour_opts = $.extend (wp_pointers_tour_opts, {
|
237 |
+
buttons: function (event, t) {
|
238 |
+
button= jQuery ('<a id="pointer-close" class="button-secondary">' + saswp_localize_data.button1 + '</a>');
|
239 |
+
button_2= jQuery ('#pointer-close.button');
|
240 |
+
button.bind ('click.pointer', function () {
|
241 |
+
t.element.pointer ('close');
|
242 |
+
});
|
243 |
+
button_2.on('click', function() {
|
244 |
+
t.element.pointer ('close');
|
245 |
+
} );
|
246 |
+
return button;
|
247 |
+
},
|
248 |
+
close: function () {
|
249 |
+
$.post (saswp_localize_data.ajax_url, {
|
250 |
+
pointer: 'saswp_subscribe_pointer222',
|
251 |
+
action: 'dismiss-wp-pointer'
|
252 |
+
});
|
253 |
+
},
|
254 |
+
show: function(event, t){
|
255 |
+
t.pointer.css({'left':'170px', 'top':'160px'});
|
256 |
+
}
|
257 |
+
});
|
258 |
+
setup = function () {
|
259 |
+
$(saswp_localize_data.displayID).pointer(wp_pointers_tour_opts).pointer('open');
|
260 |
+
if (saswp_localize_data.button2) {
|
261 |
+
jQuery ('#pointer-close').after ('<a id="pointer-primary" class="button-primary">' + saswp_localize_data.button2+ '</a>');
|
262 |
+
jQuery ('#pointer-primary').click (function () {
|
263 |
+
saswp_localize_data.function_name;
|
264 |
+
});
|
265 |
+
jQuery ('#pointer-close').click (function () {
|
266 |
+
$.post (saswp_localize_data.ajax_url, {
|
267 |
+
pointer: 'saswp_subscribe_pointer222',
|
268 |
+
action: 'dismiss-wp-pointer'
|
269 |
+
});
|
270 |
+
});
|
271 |
+
}
|
272 |
+
};
|
273 |
+
if (wp_pointers_tour_opts.position && wp_pointers_tour_opts.position.defer_loading) {
|
274 |
+
$(window).bind('load.wp-pointers', setup);
|
275 |
+
}
|
276 |
+
else {
|
277 |
+
setup ();
|
278 |
+
}
|
279 |
+
|
280 |
+
}
|
281 |
+
|
282 |
+
/* Newletters js ends here */
|
283 |
+
|
284 |
+
|
285 |
+
$(".saswp-tabs a").click(function(e){
|
286 |
+
var href = $(this).attr('href');
|
287 |
+
var currentTab = getParameterByName('tab',href);
|
288 |
+
if(!currentTab){
|
289 |
+
currentTab = "general";
|
290 |
+
}
|
291 |
+
$(this).siblings().removeClass("nav-tab-active");
|
292 |
+
$(this).addClass("nav-tab-active");
|
293 |
+
$(".form-wrap").find(".saswp-"+currentTab).siblings().hide();
|
294 |
+
$(".form-wrap .saswp-"+currentTab).show();
|
295 |
+
window.history.pushState("", "", href);
|
296 |
+
return false;
|
297 |
+
});
|
298 |
+
|
299 |
+
$(".saswp-schame-type-select").change(function(){
|
300 |
+
$(".saswp-custom-fields-table").html('');
|
301 |
+
var schematype = $ (this).val();
|
302 |
+
|
303 |
+
$(".saswp-option-table-class tr").each(function(index,value){
|
304 |
+
if(index>0){
|
305 |
+
$(this).hide();
|
306 |
+
$(this).find('select').attr('disabled', true);
|
307 |
+
}
|
308 |
+
});
|
309 |
+
if(schematype == 'TechArticle' || schematype == 'Article' || schematype == 'Blogposting' || schematype == 'NewsArticle' || schematype == 'WebPage'){
|
310 |
+
|
311 |
+
$(".saswp-enable-speakable").parent().parent().show();
|
312 |
+
}else{
|
313 |
+
$(".saswp-enable-speakable").parent().parent().hide();
|
314 |
+
}
|
315 |
+
|
316 |
+
if(schematype == 'local_business'){
|
317 |
+
$(".saswp-option-table-class tr").eq(1).show();
|
318 |
+
$(".saswp-business-text-field-tr").show();
|
319 |
+
$(".saswp-option-table-class tr").find('select').attr('disabled', false);
|
320 |
+
// $("#saswp_dayofweek").attr('disabled', false);
|
321 |
+
$('.select-post-type').val('show_globally').trigger('change');
|
322 |
+
}
|
323 |
+
if(schematype == 'Service'){
|
324 |
+
$(".saswp-service-text-field-tr").show();
|
325 |
+
$(".saswp-option-table-class tr").find('select').attr('disabled', false);
|
326 |
+
}
|
327 |
+
if(schematype == 'Review'){
|
328 |
+
$(".saswp-review-text-field-tr").show();
|
329 |
+
$(".saswp-option-table-class tr").find('select').attr('disabled', false);
|
330 |
+
saswp_item_reviewed_call();
|
331 |
+
}
|
332 |
+
if(schematype == 'Product'){
|
333 |
+
$(".saswp-product-text-field-tr").show();
|
334 |
+
$(".saswp-option-table-class tr").find('select').attr('disabled', false);
|
335 |
+
}
|
336 |
+
if(schematype == 'Event'){
|
337 |
+
$(".saswp-event-text-field-tr").show();
|
338 |
+
$(".saswp-option-table-class tr").find('select').attr('disabled', false);
|
339 |
+
}
|
340 |
+
if(schematype == 'AudioObject'){
|
341 |
+
$(".saswp-audio-text-field-tr").show();
|
342 |
+
}
|
343 |
+
if(schematype == 'SoftwareApplication'){
|
344 |
+
$(".saswp-softwareapplication-text-field-tr").show();
|
345 |
+
}
|
346 |
+
|
347 |
+
$(".saswp-schem-type-note").addClass('saswp_hide');
|
348 |
+
if(schematype == 'qanda'){
|
349 |
+
$(".saswp-schem-type-note").removeClass('saswp_hide');
|
350 |
+
}
|
351 |
+
|
352 |
+
$(".saswp-job-posting-note").addClass('saswp_hide');
|
353 |
+
|
354 |
+
// if(schematype == 'JobPosting'){
|
355 |
+
// $(".saswp-job-posting-note").removeClass('saswp_hide');
|
356 |
+
// }
|
357 |
+
|
358 |
+
saswp_enable_rating_review();
|
359 |
+
});
|
360 |
+
|
361 |
+
$("#saswp_business_type").change(function(){
|
362 |
+
var businesstype = $ (this).val();
|
363 |
+
var schematype = $(".saswp-schame-type-select").val();
|
364 |
+
|
365 |
+
$(".saswp-option-table-class tr").each(function(index,value){
|
366 |
+
if(index>1){
|
367 |
+
$(this).hide();
|
368 |
+
$(this).find('select').attr('disabled', true);
|
369 |
+
}
|
370 |
+
});
|
371 |
+
|
372 |
+
if(schematype == 'TechArticle' || schematype == 'Article' || schematype == 'Blogposting' || schematype == 'NewsArticle' || schematype == 'WebPage'){
|
373 |
+
|
374 |
+
$(".saswp-enable-speakable").parent().parent().show();
|
375 |
+
}else{
|
376 |
+
$(".saswp-enable-speakable").parent().parent().hide();
|
377 |
+
}
|
378 |
+
|
379 |
+
if(schematype == 'local_business'){
|
380 |
+
$(".saswp-"+businesstype+'-tr').show();
|
381 |
+
$(".saswp-business-text-field-tr").show();
|
382 |
+
$(".saswp-"+businesstype+'-tr').find('select').attr('disabled', false);
|
383 |
+
// $("#saswp_dayofweek").attr('disabled', false);
|
384 |
+
}
|
385 |
+
if(schematype == 'Service'){
|
386 |
+
$(".saswp-service-text-field-tr").show();
|
387 |
+
$(".saswp-service-text-field-tr").find('select').attr('disabled', false);
|
388 |
+
}
|
389 |
+
if(schematype == 'Product'){
|
390 |
+
$(".saswp-product-text-field-tr").show();
|
391 |
+
$(".saswp-product-text-field-tr").find('select').attr('disabled', false);
|
392 |
+
}
|
393 |
+
if(schematype == 'AudioObject'){
|
394 |
+
$(".saswp-audio-text-field-tr").show();
|
395 |
+
}
|
396 |
+
if(schematype == 'SoftwareApplication'){
|
397 |
+
$(".saswp-softwareapplication-text-field-tr").show();
|
398 |
+
}
|
399 |
+
|
400 |
+
if(schematype == 'Review'){
|
401 |
+
$(".saswp-review-text-field-tr").show();
|
402 |
+
$(".saswp-review-text-field-tr").find('select').attr('disabled', false);
|
403 |
+
}
|
404 |
+
if(schematype == 'Event'){
|
405 |
+
$(".saswp-event-text-field-tr").show();
|
406 |
+
$(".saswp-event-text-field-tr").find('select').attr('disabled', false);
|
407 |
+
}
|
408 |
+
saswp_enable_rating_review();
|
409 |
+
}).change();
|
410 |
+
|
411 |
+
|
412 |
+
//Settings page jquery starts here
|
413 |
+
|
414 |
+
|
415 |
+
function saswp_compatibliy_notes(current, id){
|
416 |
+
|
417 |
+
var plugin_name = id.replace('-checkbox','');
|
418 |
+
var text = $("#"+plugin_name).next('p').text();
|
419 |
+
|
420 |
+
if (current.is(':checked') && text !=='') {
|
421 |
+
$("#"+plugin_name).next('p').removeClass('saswp_hide');
|
422 |
+
}else{
|
423 |
+
|
424 |
+
if($("#"+plugin_name).next('p').attr('data-id') == 1){
|
425 |
+
$("#"+plugin_name).next('p').text('This feature is only available in pro version');
|
426 |
+
}else{
|
427 |
+
$("#"+plugin_name).next('p').addClass('saswp_hide');
|
428 |
+
}
|
429 |
+
}
|
430 |
+
|
431 |
+
}
|
432 |
+
|
433 |
+
|
434 |
+
$(".saswp-checkbox").change(function(){
|
435 |
+
|
436 |
+
var id = $(this).attr("id");
|
437 |
+
var current = $(this);
|
438 |
+
|
439 |
+
|
440 |
+
switch(id){
|
441 |
+
|
442 |
+
case 'saswp-smart-crawl-checkbox':
|
443 |
+
|
444 |
+
if ($(this).is(':checked')) {
|
445 |
+
$("#saswp-smart-crawl").val(1);
|
446 |
+
}else{
|
447 |
+
$("#saswp-smart-crawl").val(0);
|
448 |
+
}
|
449 |
+
break;
|
450 |
+
|
451 |
+
case 'saswp-for-wordpress-checkbox':
|
452 |
+
|
453 |
+
if ($(this).is(':checked')) {
|
454 |
+
$("#saswp-for-wordpress").val(1);
|
455 |
+
}else{
|
456 |
+
$("#saswp-for-wordpress").val(0);
|
457 |
+
}
|
458 |
+
break;
|
459 |
+
case 'saswp-facebook-enable-checkbox':
|
460 |
+
|
461 |
+
if ($(this).is(':checked')) {
|
462 |
+
$("#saswp-facebook-enable").val(1);
|
463 |
+
$("#sd_facebook").show();
|
464 |
+
}else{
|
465 |
+
$("#saswp-facebook-enable").val(0);
|
466 |
+
$("#sd_facebook").hide();
|
467 |
+
}
|
468 |
+
break;
|
469 |
+
case 'saswp-twitter-enable-checkbox':
|
470 |
+
|
471 |
+
if ($(this).is(':checked')) {
|
472 |
+
$("#saswp-twitter-enable").val(1);
|
473 |
+
$("#sd_twitter").show();
|
474 |
+
}else{
|
475 |
+
$("#saswp-twitter-enable").val(0);
|
476 |
+
$("#sd_twitter").hide();
|
477 |
+
}
|
478 |
+
break;
|
479 |
+
case 'saswp-google-plus-enable-checkbox':
|
480 |
+
|
481 |
+
if ($(this).is(':checked')) {
|
482 |
+
$("#saswp-google-plus-enable").val(1);
|
483 |
+
$("#sd_google_plus").show();
|
484 |
+
}else{
|
485 |
+
$("#saswp-google-plus-enable").val(0);
|
486 |
+
$("#sd_google_plus").hide();
|
487 |
+
}
|
488 |
+
break;
|
489 |
+
case 'saswp-instagram-enable-checkbox':
|
490 |
+
|
491 |
+
if ($(this).is(':checked')) {
|
492 |
+
$("#saswp-instagram-enable").val(1);
|
493 |
+
$("#sd_instagram").show();
|
494 |
+
}else{
|
495 |
+
$("#saswp-instagram-enable").val(0);
|
496 |
+
$("#sd_instagram").hide();
|
497 |
+
}
|
498 |
+
break;
|
499 |
+
case 'saswp-youtube-enable-checkbox':
|
500 |
+
|
501 |
+
if ($(this).is(':checked')) {
|
502 |
+
$("#sd_youtube").show();
|
503 |
+
$("#saswp-youtube-enable").val(1);
|
504 |
+
}else{
|
505 |
+
$("#saswp-youtube-enable").val(0);
|
506 |
+
$("#sd_youtube").hide();
|
507 |
+
}
|
508 |
+
break;
|
509 |
+
case 'saswp-linkedin-enable-checkbox':
|
510 |
+
|
511 |
+
if ($(this).is(':checked')) {
|
512 |
+
$("#saswp-linkedin-enable").val(1);
|
513 |
+
$("#sd_linkedin").show();
|
514 |
+
}else{
|
515 |
+
$("#saswp-linkedin-enable").val(0);
|
516 |
+
$("#sd_linkedin").hide();
|
517 |
+
}
|
518 |
+
break;
|
519 |
+
case 'saswp-pinterest-enable-checkbox':
|
520 |
+
|
521 |
+
if ($(this).is(':checked')) {
|
522 |
+
$("#saswp-pinterest-enable").val(1);
|
523 |
+
$("#sd_pinterest").show();
|
524 |
+
}else{
|
525 |
+
$("#saswp-pinterest-enable").val(0);
|
526 |
+
$("#sd_pinterest").hide();
|
527 |
+
}
|
528 |
+
break;
|
529 |
+
case 'saswp-soundcloud-enable-checkbox':
|
530 |
+
|
531 |
+
if ($(this).is(':checked')) {
|
532 |
+
$("#saswp-soundcloud-enable").val(1);
|
533 |
+
$("#sd_soundcloud").show();
|
534 |
+
}else{
|
535 |
+
$("#saswp-soundcloud-enable").val(0);
|
536 |
+
$("#sd_soundcloud").hide();
|
537 |
+
}
|
538 |
+
break;
|
539 |
+
case 'saswp-tumblr-enable-checkbox':
|
540 |
+
|
541 |
+
if ($(this).is(':checked')) {
|
542 |
+
$("#saswp-tumblr-enable").val(1);
|
543 |
+
$("#sd_tumblr").show();
|
544 |
+
}else{
|
545 |
+
$("#saswp-tumblr-enable").val(0);
|
546 |
+
$("#sd_tumblr").hide();
|
547 |
+
}
|
548 |
+
break;
|
549 |
+
case 'saswp-for-amp-checkbox':
|
550 |
+
|
551 |
+
if ($(this).is(':checked')) {
|
552 |
+
$("#saswp-for-amp").val(1);
|
553 |
+
}else{
|
554 |
+
$("#saswp-for-amp").val(0);
|
555 |
+
}
|
556 |
+
break;
|
557 |
+
case 'saswp_kb_contact_1_checkbox':
|
558 |
+
|
559 |
+
if ($(this).is(':checked')) {
|
560 |
+
$("#saswp_kb_contact_1").val(1);
|
561 |
+
$("#saswp_kb_telephone, #saswp_contact_type").parent().parent('li').removeClass("saswp-display-none");
|
562 |
+
}else{
|
563 |
+
$("#saswp_kb_contact_1").val(0);
|
564 |
+
$("#saswp_kb_telephone, #saswp_contact_type").parent().parent('li').addClass("saswp-display-none");
|
565 |
+
}
|
566 |
+
break;
|
567 |
+
case 'saswp-logo-dimensions-check':
|
568 |
+
|
569 |
+
if ($(this).is(':checked')) {
|
570 |
+
$("#saswp-logo-dimensions").val(1);
|
571 |
+
$("#saswp-logo-width, #saswp-logo-height").parent().parent('li').show();
|
572 |
+
}else{
|
573 |
+
$("#saswp-logo-dimensions").val(0);
|
574 |
+
$("#saswp-logo-width, #saswp-logo-height").parent().parent('li').hide();
|
575 |
+
}
|
576 |
+
break;
|
577 |
+
case 'saswp_archive_schema_checkbox':
|
578 |
+
|
579 |
+
if ($(this).is(':checked')) {
|
580 |
+
$("#saswp_archive_schema").val(1);
|
581 |
+
$(".saswp_archive_schema_type_class").parent().parent().show();
|
582 |
+
}else{
|
583 |
+
$("#saswp_archive_schema").val(0);
|
584 |
+
$(".saswp_archive_schema_type_class").parent().parent().hide();
|
585 |
+
}
|
586 |
+
break;
|
587 |
+
|
588 |
+
case 'saswp_website_schema_checkbox':
|
589 |
+
|
590 |
+
if ($(this).is(':checked')) {
|
591 |
+
$("#saswp_website_schema").val(1);
|
592 |
+
$("#saswp_search_box_schema").parent().parent().show();
|
593 |
+
}else{
|
594 |
+
$("#saswp_website_schema").val(0);
|
595 |
+
$("#saswp_search_box_schema").parent().parent().hide();
|
596 |
+
}
|
597 |
+
break;
|
598 |
+
|
599 |
+
case 'saswp_search_box_schema_checkbox':
|
600 |
+
|
601 |
+
if ($(this).is(':checked')) {
|
602 |
+
$("#saswp_search_box_schema").val(1);
|
603 |
+
}else{
|
604 |
+
$("#saswp_search_box_schema").val(0);
|
605 |
+
}
|
606 |
+
break;
|
607 |
+
|
608 |
+
case 'saswp_breadcrumb_schema_checkbox':
|
609 |
+
|
610 |
+
if ($(this).is(':checked')) {
|
611 |
+
$("#saswp_breadcrumb_schema").val(1);
|
612 |
+
}else{
|
613 |
+
$("#saswp_breadcrumb_schema").val(0);
|
614 |
+
}
|
615 |
+
break;
|
616 |
+
|
617 |
+
case 'saswp_comments_schema_checkbox':
|
618 |
+
|
619 |
+
if ($(this).is(':checked')) {
|
620 |
+
$("#saswp_comments_schema").val(1);
|
621 |
+
}else{
|
622 |
+
$("#saswp_comments_schema").val(0);
|
623 |
+
}
|
624 |
+
break;
|
625 |
+
|
626 |
+
case 'saswp-compativility-checkbox':
|
627 |
+
|
628 |
+
if ($(this).is(':checked')) {
|
629 |
+
$("#saswp-flexmlx-compativility").val(1);
|
630 |
+
}else{
|
631 |
+
$("#saswp-flexmlx-compativility").val(0);
|
632 |
+
}
|
633 |
+
break;
|
634 |
+
|
635 |
+
case 'saswp-review-module-checkbox':
|
636 |
+
|
637 |
+
if ($(this).is(':checked')) {
|
638 |
+
$("#saswp-review-module").val(1);
|
639 |
+
}else{
|
640 |
+
$("#saswp-review-module").val(0);
|
641 |
+
}
|
642 |
+
break;
|
643 |
+
|
644 |
+
case 'saswp-kk-star-raring-checkbox':
|
645 |
+
|
646 |
+
saswp_compatibliy_notes(current, id);
|
647 |
+
if ($(this).is(':checked')) {
|
648 |
+
$("#saswp-kk-star-raring").val(1);
|
649 |
+
}else{
|
650 |
+
$("#saswp-kk-star-raring").val(0);
|
651 |
+
}
|
652 |
+
break;
|
653 |
+
case 'saswp-woocommerce-checkbox':
|
654 |
+
saswp_compatibliy_notes(current, id);
|
655 |
+
if ($(this).is(':checked')) {
|
656 |
+
$("#saswp-woocommerce").val(1);
|
657 |
+
}else{
|
658 |
+
$("#saswp-woocommerce").val(0);
|
659 |
+
}
|
660 |
+
break;
|
661 |
+
|
662 |
+
case 'saswp-extra-checkbox':
|
663 |
+
saswp_compatibliy_notes(current, id);
|
664 |
+
if ($(this).is(':checked')) {
|
665 |
+
$("#saswp-extra").val(1);
|
666 |
+
}else{
|
667 |
+
$("#saswp-extra").val(0);
|
668 |
+
}
|
669 |
+
break;
|
670 |
+
|
671 |
+
case 'saswp-dw-question-answer-checkbox':
|
672 |
+
saswp_compatibliy_notes(current, id);
|
673 |
+
if ($(this).is(':checked')) {
|
674 |
+
$("#saswp-dw-question-answer").val(1);
|
675 |
+
}else{
|
676 |
+
$("#saswp-dw-question-answer").val(0);
|
677 |
+
}
|
678 |
+
break;
|
679 |
+
|
680 |
+
case 'saswp-wp-job-manager-checkbox':
|
681 |
+
saswp_compatibliy_notes(current, id);
|
682 |
+
if ($(this).is(':checked')) {
|
683 |
+
$("#saswp-wp-job-manager").val(1);
|
684 |
+
}else{
|
685 |
+
$("#saswp-wp-job-manager").val(0);
|
686 |
+
}
|
687 |
+
break;
|
688 |
+
|
689 |
+
case 'saswp-yoast-checkbox':
|
690 |
+
saswp_compatibliy_notes(current, id);
|
691 |
+
if ($(this).is(':checked')) {
|
692 |
+
$("#saswp-yoast").val(1);
|
693 |
+
}else{
|
694 |
+
$("#saswp-yoast").val(0);
|
695 |
+
}
|
696 |
+
break;
|
697 |
+
|
698 |
+
case 'saswp-rankmath-checkbox':
|
699 |
+
saswp_compatibliy_notes(current, id);
|
700 |
+
if ($(this).is(':checked')) {
|
701 |
+
$("#saswp-rankmath").val(1);
|
702 |
+
}else{
|
703 |
+
$("#saswp-rankmath").val(0);
|
704 |
+
}
|
705 |
+
break;
|
706 |
+
|
707 |
+
case 'saswp-tagyeem-checkbox':
|
708 |
+
saswp_compatibliy_notes(current, id);
|
709 |
+
if ($(this).is(':checked')) {
|
710 |
+
$("#saswp-tagyeem").val(1);
|
711 |
+
}else{
|
712 |
+
$("#saswp-tagyeem").val(0);
|
713 |
+
}
|
714 |
+
break;
|
715 |
+
|
716 |
+
case 'saswp-the-events-calendar-checkbox':
|
717 |
+
saswp_compatibliy_notes(current, id);
|
718 |
+
if ($(this).is(':checked')) {
|
719 |
+
$("#saswp-the-events-calendar").val(1);
|
720 |
+
}else{
|
721 |
+
$("#saswp-the-events-calendar").val(0);
|
722 |
+
}
|
723 |
+
break;
|
724 |
+
|
725 |
+
|
726 |
+
case 'saswp-woocommerce-booking-checkbox':
|
727 |
+
saswp_compatibliy_notes(current, id);
|
728 |
+
if ($(this).is(':checked')) {
|
729 |
+
$("#saswp-woocommerce-booking").val(1);
|
730 |
+
$("#saswp-woocommerce-booking-main").val(1);
|
731 |
+
}else{
|
732 |
+
$("#saswp-woocommerce-booking").val(0);
|
733 |
+
$("#saswp-woocommerce-booking-main").val(0);
|
734 |
+
}
|
735 |
+
break;
|
736 |
+
|
737 |
+
case 'saswp-woocommerce-booking-main-checkbox':
|
738 |
+
saswp_compatibliy_notes(current, id);
|
739 |
+
if ($(this).is(':checked')) {
|
740 |
+
$("#saswp-woocommerce-booking-main").val(1);
|
741 |
+
$("#saswp-woocommerce-booking").val(1);
|
742 |
+
}else{
|
743 |
+
$("#saswp-woocommerce-booking-main").val(0);
|
744 |
+
$("#saswp-woocommerce-booking").val(0);
|
745 |
+
}
|
746 |
+
break;
|
747 |
+
|
748 |
+
case 'saswp-woocommerce-membership-checkbox':
|
749 |
+
saswp_compatibliy_notes(current, id);
|
750 |
+
if ($(this).is(':checked')) {
|
751 |
+
$("#saswp-woocommerce-membership").val(1);
|
752 |
+
}else{
|
753 |
+
$("#saswp-woocommerce-membership").val(0);
|
754 |
+
}
|
755 |
+
break;
|
756 |
+
|
757 |
+
case 'saswp-defragment-checkbox':
|
758 |
+
|
759 |
+
if ($(this).is(':checked')) {
|
760 |
+
$("#saswp-defragment").val(1);
|
761 |
+
}else{
|
762 |
+
$("#saswp-defragment").val(0);
|
763 |
+
}
|
764 |
+
break;
|
765 |
+
|
766 |
+
case 'saswp-cooked-checkbox':
|
767 |
+
saswp_compatibliy_notes(current, id);
|
768 |
+
if ($(this).is(':checked')) {
|
769 |
+
$("#saswp-cooked").val(1);
|
770 |
+
}else{
|
771 |
+
$("#saswp-cooked").val(0);
|
772 |
+
}
|
773 |
+
break;
|
774 |
+
|
775 |
+
case 'saswp-flexmlx-compativility-checkbox':
|
776 |
+
saswp_compatibliy_notes(current, id);
|
777 |
+
if ($(this).is(':checked')) {
|
778 |
+
$("#saswp-flexmlx-compativility").val(1);
|
779 |
+
}else{
|
780 |
+
$("#saswp-flexmlx-compativility").val(0);
|
781 |
+
}
|
782 |
+
break;
|
783 |
+
|
784 |
+
case 'saswp-google-review-checkbox':
|
785 |
+
|
786 |
+
if ($(this).is(':checked')) {
|
787 |
+
|
788 |
+
$("#saswp-google-review").val(1);
|
789 |
+
|
790 |
+
if($("#saswp-google-rv-free-checkbox").length){
|
791 |
+
|
792 |
+
$("#saswp-google-review-free").parent().parent().show();
|
793 |
+
|
794 |
+
if($("#saswp-google-rv-free-checkbox").is(":checked")){
|
795 |
+
$("#saswp_google_place_api_key").parent().parent().show();
|
796 |
+
}else{
|
797 |
+
$("#saswp_google_place_api_key").parent().parent().hide();
|
798 |
+
}
|
799 |
+
}else{
|
800 |
+
$("#saswp_google_place_api_key").parent().parent().show();
|
801 |
+
}
|
802 |
+
$(".saswp-g-reviews-settings-table").parent().parent().parent().show();
|
803 |
+
|
804 |
+
}else{
|
805 |
+
|
806 |
+
$("#saswp-google-review").val(0);
|
807 |
+
$("#saswp_google_place_api_key").parent().parent().hide();
|
808 |
+
$(".saswp-g-reviews-settings-table").parent().parent().parent().hide();
|
809 |
+
|
810 |
+
if($("#saswp-google-rv-free-checkbox").length){
|
811 |
+
$("#saswp-google-review-free").parent().parent().hide();
|
812 |
+
|
813 |
+
}
|
814 |
+
|
815 |
+
|
816 |
+
|
817 |
+
|
818 |
+
|
819 |
+
}
|
820 |
+
break;
|
821 |
+
|
822 |
+
case 'saswp-google-rv-free-checkbox':
|
823 |
+
|
824 |
+
if($("#saswp-google-review-checkbox").is(":checked")){
|
825 |
+
if ($(this).is(':checked')) {
|
826 |
+
$("#saswp-google-review-free").val(1);
|
827 |
+
$("#saswp_google_place_api_key").parent().parent().show();
|
828 |
+
}else{
|
829 |
+
$("#saswp-google-review-free").val(0);
|
830 |
+
$("#saswp_google_place_api_key").parent().parent().hide();
|
831 |
+
}
|
832 |
+
|
833 |
+
}else{
|
834 |
+
$("#saswp-google-review-free").val(0);
|
835 |
+
$("#saswp_google_place_api_key").parent().parent().hide();
|
836 |
+
}
|
837 |
+
|
838 |
+
|
839 |
+
break;
|
840 |
+
|
841 |
+
|
842 |
+
case 'saswp-markup-footer-checkbox':
|
843 |
+
|
844 |
+
if ($(this).is(':checked')) {
|
845 |
+
$("#saswp-markup-footer").val(1);
|
846 |
+
}else{
|
847 |
+
$("#saswp-markup-footer").val(0);
|
848 |
+
}
|
849 |
+
break;
|
850 |
+
|
851 |
+
case 'saswp-pretty-print-checkbox':
|
852 |
+
|
853 |
+
if ($(this).is(':checked')) {
|
854 |
+
$("#saswp-pretty-print").val(1);
|
855 |
+
}else{
|
856 |
+
$("#saswp-pretty-print").val(0);
|
857 |
+
}
|
858 |
+
break;
|
859 |
+
|
860 |
+
case 'saswp-wppostratings-raring-checkbox':
|
861 |
+
saswp_compatibliy_notes(current, id);
|
862 |
+
if ($(this).is(':checked')) {
|
863 |
+
$("#saswp-wppostratings-raring").val(1);
|
864 |
+
}else{
|
865 |
+
$("#saswp-wppostratings-raring").val(0);
|
866 |
+
}
|
867 |
+
break;
|
868 |
+
|
869 |
+
case 'saswp-bbpress-checkbox':
|
870 |
+
saswp_compatibliy_notes(current, id);
|
871 |
+
if ($(this).is(':checked')) {
|
872 |
+
$("#saswp-bbpress").val(1);
|
873 |
+
}else{
|
874 |
+
$("#saswp-bbpress").val(0);
|
875 |
+
}
|
876 |
+
break;
|
877 |
+
|
878 |
+
case 'saswp-microdata-cleanup-checkbox':
|
879 |
+
|
880 |
+
if ($(this).is(':checked')) {
|
881 |
+
$("#saswp-microdata-cleanup").val(1);
|
882 |
+
}else{
|
883 |
+
$("#saswp-microdata-cleanup").val(0);
|
884 |
+
}
|
885 |
+
break;
|
886 |
+
|
887 |
+
|
888 |
+
default:
|
889 |
+
break;
|
890 |
+
}
|
891 |
+
|
892 |
+
}).change();
|
893 |
+
|
894 |
+
$("#saswp_kb_type").change(function(){
|
895 |
+
|
896 |
+
var datatype = $(this).val();
|
897 |
+
|
898 |
+
$(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass('saswp_hide');
|
899 |
+
$(".saswp_kg_logo").parent().parent().parent().addClass('saswp_hide');
|
900 |
+
$("#sd-person-image").parent().parent().parent().addClass('saswp_hide');
|
901 |
+
|
902 |
+
|
903 |
+
if(datatype == 'Organization'){
|
904 |
+
|
905 |
+
$(".saswp_org_fields").parent().parent().removeClass('saswp_hide');
|
906 |
+
$(".saswp_person_fields").parent().parent().addClass('saswp_hide');
|
907 |
+
$(".saswp_kg_logo").parent().parent().parent().removeClass('saswp_hide');
|
908 |
+
$("#sd-person-image").parent().parent().parent().addClass('saswp_hide');
|
909 |
+
}
|
910 |
+
if(datatype == 'Person'){
|
911 |
+
|
912 |
+
$(".saswp_org_fields").parent().parent().addClass('saswp_hide');
|
913 |
+
$(".saswp_person_fields").parent().parent().removeClass('saswp_hide');
|
914 |
+
$(".saswp_kg_logo").parent().parent().parent().removeClass('saswp_hide');
|
915 |
+
$("#sd-person-image").parent().parent().parent().removeClass('saswp_hide');
|
916 |
+
}
|
917 |
+
|
918 |
+
}).change();
|
919 |
+
|
920 |
+
$(document).on("click", "input[data-id=media]" ,function(e) { // Application Icon upload
|
921 |
+
e.preventDefault();
|
922 |
+
var current = $(this);
|
923 |
+
var button = current;
|
924 |
+
var id = button.attr('id').replace('_button', '');
|
925 |
+
var saswpMediaUploader = wp.media({
|
926 |
+
title: "Application Icon",
|
927 |
+
button: {
|
928 |
+
text: "Select Icon"
|
929 |
+
},
|
930 |
+
multiple: false, // Set this to true to allow multiple files to be selected
|
931 |
+
library:{type : 'image'}
|
932 |
+
})
|
933 |
+
.on("select", function() {
|
934 |
+
var attachment = saswpMediaUploader.state().get('selection').first().toJSON();
|
935 |
+
|
936 |
+
$("#"+id).val(attachment.url);
|
937 |
+
$("input[data-id='"+id+"_id']").val(attachment.id);
|
938 |
+
$("input[data-id='"+id+"_height']").val(attachment.height);
|
939 |
+
$("input[data-id='"+id+"_width']").val(attachment.width);
|
940 |
+
$("input[data-id='"+id+"_thumbnail']").val(attachment.url);
|
941 |
+
|
942 |
+
if(current.attr('id') === 'sd_default_image_button'){
|
943 |
+
|
944 |
+
$("#sd_default_image_width").val(attachment.width);
|
945 |
+
$("#sd_default_image_height").val(attachment.height);
|
946 |
+
|
947 |
+
}
|
948 |
+
var smaller_img_notice = '';
|
949 |
+
if("saswp_image_div_"+id == 'saswp_image_div_sd_default_image' && attachment.height < 1200){
|
950 |
+
smaller_img_notice = '<p class="saswp_warning">Image size is smaller than recommended size</p>';
|
951 |
+
}
|
952 |
+
|
953 |
+
$(".saswp_image_div_"+id).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+attachment.url+'"/><a data-id="'+id+'" href="#" class="saswp_prev_close">X</a></div>'+smaller_img_notice);
|
954 |
+
|
955 |
+
})
|
956 |
+
.open();
|
957 |
+
});
|
958 |
+
|
959 |
+
$(document).on("click", ".saswp_prev_close", function(e){
|
960 |
+
e.preventDefault();
|
961 |
+
|
962 |
+
var id = $(this).attr('data-id');
|
963 |
+
console.log(id);
|
964 |
+
$(this).parent().remove();
|
965 |
+
$("#"+id).val('');
|
966 |
+
$("input[data-id='"+id+"_id']").val('');
|
967 |
+
$("input[data-id='"+id+"_height']").val('');
|
968 |
+
$("input[data-id='"+id+"_width']").val('');
|
969 |
+
$("input[data-id='"+id+"_thumbnail']").val('');
|
970 |
+
|
971 |
+
if(id === 'sd_default_image'){
|
972 |
+
|
973 |
+
$("#sd_default_image_width").val('');
|
974 |
+
$("#sd_default_image_height").val('');
|
975 |
+
|
976 |
+
}
|
977 |
+
|
978 |
+
|
979 |
+
});
|
980 |
+
|
981 |
+
//Settings page jquery ends here
|
982 |
+
|
983 |
+
|
984 |
+
$(document).on("change",".saswp-schema-type-toggle", function(e){
|
985 |
+
var schema_id = $(this).attr("data-schema-id");
|
986 |
+
var post_id = $(this).attr("data-post-id");
|
987 |
+
if($(this).is(':checked')){
|
988 |
+
var status = 1;
|
989 |
+
}else{
|
990 |
+
var status = 0;
|
991 |
+
}
|
992 |
+
$.ajax({
|
993 |
+
type: "POST",
|
994 |
+
url:ajaxurl,
|
995 |
+
dataType: "json",
|
996 |
+
data:{action:"saswp_enable_disable_schema_on_post",status:status, schema_id:schema_id, post_id:post_id, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
997 |
+
success:function(response){
|
998 |
+
},
|
999 |
+
error: function(response){
|
1000 |
+
console.log(response);
|
1001 |
+
}
|
1002 |
+
});
|
1003 |
+
|
1004 |
+
});
|
1005 |
+
|
1006 |
+
|
1007 |
+
$(document).on("click",".saswp-reset-data", function(e){
|
1008 |
+
e.preventDefault();
|
1009 |
+
|
1010 |
+
var saswp_confirm = confirm("Are you sure?");
|
1011 |
+
|
1012 |
+
if(saswp_confirm == true){
|
1013 |
+
|
1014 |
+
$.ajax({
|
1015 |
+
type: "POST",
|
1016 |
+
url:ajaxurl,
|
1017 |
+
dataType: "json",
|
1018 |
+
data:{action:"saswp_reset_all_settings", saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1019 |
+
success:function(response){
|
1020 |
+
setTimeout(function(){ location.reload(); }, 1000);
|
1021 |
+
},
|
1022 |
+
error: function(response){
|
1023 |
+
console.log(response);
|
1024 |
+
}
|
1025 |
+
});
|
1026 |
+
|
1027 |
+
}
|
1028 |
+
|
1029 |
+
|
1030 |
+
});
|
1031 |
+
|
1032 |
+
//Licensing jquery starts here
|
1033 |
+
$(document).on("click",".saswp_license_activation", function(e){
|
1034 |
+
e.preventDefault();
|
1035 |
+
var current = $(this);
|
1036 |
+
current.addClass('updating-message');
|
1037 |
+
var license_status = $(this).attr('license-status');
|
1038 |
+
var add_on = $(this).attr('add-on');
|
1039 |
+
var license_key = $("#"+add_on+"_addon_license_key").val();
|
1040 |
+
|
1041 |
+
if(license_status && add_on && license_key){
|
1042 |
+
|
1043 |
+
$.ajax({
|
1044 |
+
type: "POST",
|
1045 |
+
url:ajaxurl,
|
1046 |
+
dataType: "json",
|
1047 |
+
data:{action:"saswp_license_status_check",license_key:license_key,license_status:license_status, add_on:add_on, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1048 |
+
success:function(response){
|
1049 |
+
|
1050 |
+
$("#"+add_on+"_addon_license_key_status").val(response['status']);
|
1051 |
+
|
1052 |
+
if(response['status'] =='active'){
|
1053 |
+
$(".saswp-"+add_on+"-dashicons").addClass('dashicons-yes');
|
1054 |
+
$(".saswp-"+add_on+"-dashicons").removeClass('dashicons-no-alt');
|
1055 |
+
$(".saswp-"+add_on+"-dashicons").css("color", "green");
|
1056 |
+
|
1057 |
+
$(".saswp_license_activation[add-on='" + add_on + "']").attr("license-status", "inactive");
|
1058 |
+
$(".saswp_license_activation[add-on='" + add_on + "']").text("Deactivate");
|
1059 |
+
|
1060 |
+
$(".saswp_license_status_msg[add-on='" + add_on + "']").text('Activated');
|
1061 |
+
|
1062 |
+
$(".saswp_license_status_msg[add-on='" + add_on + "']").css("color", "green");
|
1063 |
+
$(".saswp_license_status_msg[add-on='" + add_on + "']").text(response['message']);
|
1064 |
+
|
1065 |
+
}else{
|
1066 |
+
|
1067 |
+
$(".saswp-"+add_on+"-dashicons").addClass('dashicons-no-alt');
|
1068 |
+
$(".saswp-"+add_on+"-dashicons").removeClass('dashicons-yes');
|
1069 |
+
$(".saswp-"+add_on+"-dashicons").css("color", "red");
|
1070 |
+
|
1071 |
+
$(".saswp_license_activation[add-on='" + add_on + "']").attr("license-status", "active");
|
1072 |
+
$(".saswp_license_activation[add-on='" + add_on + "']").text("Activate");
|
1073 |
+
|
1074 |
+
$(".saswp_license_status_msg[add-on='" + add_on + "']").css("color", "red");
|
1075 |
+
$(".saswp_license_status_msg[add-on='" + add_on + "']").text(response['message']);
|
1076 |
+
}
|
1077 |
+
current.removeClass('updating-message');
|
1078 |
+
},
|
1079 |
+
error: function(response){
|
1080 |
+
console.log(response);
|
1081 |
+
}
|
1082 |
+
});
|
1083 |
+
|
1084 |
+
}else{
|
1085 |
+
alert('Please enter value license key');
|
1086 |
+
current.removeClass('updating-message');
|
1087 |
+
}
|
1088 |
+
|
1089 |
+
});
|
1090 |
+
//Licensing jquery ends here
|
1091 |
+
//query form send starts here
|
1092 |
+
|
1093 |
+
$(".saswp-send-query").on("click", function(e){
|
1094 |
+
e.preventDefault();
|
1095 |
+
var message = $("#saswp_query_message").val();
|
1096 |
+
if($.trim(message) !=''){
|
1097 |
+
$.ajax({
|
1098 |
+
type: "POST",
|
1099 |
+
url:ajaxurl,
|
1100 |
+
dataType: "json",
|
1101 |
+
data:{action:"saswp_send_query_message", message:message, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1102 |
+
success:function(response){
|
1103 |
+
if(response['status'] =='t'){
|
1104 |
+
$(".saswp-query-success").show();
|
1105 |
+
$(".saswp-query-error").hide();
|
1106 |
+
}else{
|
1107 |
+
console.log('dd');
|
1108 |
+
$(".saswp-query-success").hide();
|
1109 |
+
$(".saswp-query-error").show();
|
1110 |
+
}
|
1111 |
+
},
|
1112 |
+
error: function(response){
|
1113 |
+
console.log(response);
|
1114 |
+
}
|
1115 |
+
});
|
1116 |
+
}else{
|
1117 |
+
alert('Please enter the message');
|
1118 |
+
}
|
1119 |
+
|
1120 |
+
});
|
1121 |
+
|
1122 |
+
//Importer from schema plugin starts here
|
1123 |
+
|
1124 |
+
$(".saswp-import-plugins").on("click", function(e){
|
1125 |
+
e.preventDefault();
|
1126 |
+
var current_selection = $(this);
|
1127 |
+
current_selection.addClass('updating-message');
|
1128 |
+
var plugin_name = $(this).attr('data-id');
|
1129 |
+
$.get(ajaxurl,
|
1130 |
+
{ action:"saswp_import_plugin_data", plugin_name:plugin_name, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1131 |
+
function(response){
|
1132 |
+
if(response['status'] =='t'){
|
1133 |
+
$(current_selection).parent().find(".saswp-imported-message").text(response['message']);
|
1134 |
+
$(current_selection).parent().find(".saswp-imported-message").removeClass('saswp-error');
|
1135 |
+
setTimeout(function(){ location.reload(); }, 2000);
|
1136 |
+
}else{
|
1137 |
+
$(current_selection).parent().find(".saswp-imported-message").addClass('saswp-error');
|
1138 |
+
$(current_selection).parent().find(".saswp-imported-message").text(response['message']);
|
1139 |
+
}
|
1140 |
+
current_selection.removeClass('updating-message');
|
1141 |
+
},'json');
|
1142 |
+
});
|
1143 |
+
|
1144 |
+
|
1145 |
+
$(".saswp-feedback-no-thanks").on("click", function(e){
|
1146 |
+
e.preventDefault();
|
1147 |
+
$.get(ajaxurl,
|
1148 |
+
{ action:"saswp_feeback_no_thanks"},
|
1149 |
+
function(response){
|
1150 |
+
if(response['status'] =='t'){
|
1151 |
+
$(".saswp-feedback-notice").hide();
|
1152 |
+
}
|
1153 |
+
},'json');
|
1154 |
+
});
|
1155 |
+
|
1156 |
+
$(".saswp-feedback-remindme").on("click", function(e){
|
1157 |
+
e.preventDefault();
|
1158 |
+
$.get(ajaxurl,
|
1159 |
+
{ action:"saswp_feeback_remindme"},
|
1160 |
+
function(response){
|
1161 |
+
if(response['status'] =='t'){
|
1162 |
+
$(".saswp-feedback-notice").hide();
|
1163 |
+
}
|
1164 |
+
},'json');
|
1165 |
+
});
|
1166 |
+
|
1167 |
+
$(document).on("change",'.saswp-local-business-type-select', function(e){
|
1168 |
+
e.preventDefault();
|
1169 |
+
var current = $(this);
|
1170 |
+
var business_type = $(this).val();
|
1171 |
+
$.get(ajaxurl,
|
1172 |
+
{ action:"saswp_get_sub_business_ajax", business_type:business_type, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1173 |
+
function(response){
|
1174 |
+
|
1175 |
+
if(response['status'] =='t'){
|
1176 |
+
$(".saswp-local-business-name-select").parents('tr').remove();
|
1177 |
+
var schema_id = current.parents('.saswp-post-specific-wrapper').attr('data-id');
|
1178 |
+
var html ='<tr><th><label for="saswp_business_name_'+schema_id+'">Sub Business Type</label></th>';
|
1179 |
+
html +='<td><select class="saswp-local-business-name-select" id="saswp_business_name_'+schema_id+'" name="saswp_business_name_'+schema_id+'">';
|
1180 |
+
$.each(response['result'], function(index, element){
|
1181 |
+
html +='<option value="'+index+'">'+element+'</option>';
|
1182 |
+
});
|
1183 |
+
html +='</select></td>';
|
1184 |
+
html +='</tr>';
|
1185 |
+
current.parents('.form-table tr:first').after(html);
|
1186 |
+
}else{
|
1187 |
+
$(".saswp-local-business-name-select").parents('tr').remove();
|
1188 |
+
}
|
1189 |
+
},'json');
|
1190 |
+
});
|
1191 |
+
|
1192 |
+
|
1193 |
+
function saswp_item_reviewed_call(){
|
1194 |
+
|
1195 |
+
$(".saswp-item-reviewed").change(function(e){
|
1196 |
+
e.preventDefault();
|
1197 |
+
var schema_type ="";
|
1198 |
+
|
1199 |
+
if($('select#schema_type option:selected').val()){
|
1200 |
+
schema_type = $('select#schema_type option:selected').val();
|
1201 |
+
}
|
1202 |
+
if($(".saswp-tab-links.selected").attr('saswp-schema-type')){
|
1203 |
+
schema_type = $(".saswp-tab-links.selected").attr('saswp-schema-type');
|
1204 |
+
}
|
1205 |
+
|
1206 |
+
if(schema_type === 'Review'){
|
1207 |
+
|
1208 |
+
var current = $(this);
|
1209 |
+
var item = $(this).val();
|
1210 |
+
var post_id = saswp_localize_data.post_id;
|
1211 |
+
var schema_id = $(current).attr('data-id');
|
1212 |
+
var post_specific = $(current).attr('post-specific');
|
1213 |
+
$.get(ajaxurl,
|
1214 |
+
{ action:"saswp_get_item_reviewed_fields",schema_id:schema_id, post_specific:post_specific ,item:item, post_id:post_id, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1215 |
+
function(response){
|
1216 |
+
|
1217 |
+
$(current).parent().parent().nextAll().remove(".saswp-review-tr");
|
1218 |
+
$(current).parent().parent().after(response);
|
1219 |
+
|
1220 |
+
});
|
1221 |
+
|
1222 |
+
}
|
1223 |
+
|
1224 |
+
|
1225 |
+
}).change();
|
1226 |
+
|
1227 |
+
}
|
1228 |
+
saswp_item_reviewed_call();
|
1229 |
+
|
1230 |
+
function saswpAddTimepicker(){
|
1231 |
+
$('.saswp-local-schema-time-picker').timepicker({ 'timeFormat': 'H:i:s'});
|
1232 |
+
}
|
1233 |
+
$('.saswp-local-schema-time-picker').timepicker({ 'timeFormat': 'H:i:s'});
|
1234 |
+
|
1235 |
+
$(document).on("click",".saswp-add-custom-schema", function(e){
|
1236 |
+
|
1237 |
+
e.preventDefault();
|
1238 |
+
|
1239 |
+
$(".saswp-add-custom-schema-field").removeClass('saswp_hide');
|
1240 |
+
$(this).hide();
|
1241 |
+
|
1242 |
+
});
|
1243 |
+
|
1244 |
+
$(document).on("click", ".saswp-delete-custom-schema", function(e){
|
1245 |
+
|
1246 |
+
e.preventDefault();
|
1247 |
+
|
1248 |
+
$("#saswp_custom_schema_field").val('');
|
1249 |
+
$(".saswp-add-custom-schema-field").addClass('saswp_hide');
|
1250 |
+
$(".saswp-add-custom-schema").show();
|
1251 |
+
|
1252 |
+
});
|
1253 |
+
|
1254 |
+
$(".saswp-modify_schema_post_enable").on("click", function(e){
|
1255 |
+
var current = $(this);
|
1256 |
+
current.addClass('updating-message');
|
1257 |
+
e.preventDefault();
|
1258 |
+
$.get(ajaxurl,
|
1259 |
+
{ action:"saswp_modify_schema_post_enable", post_id: saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1260 |
+
function(response){
|
1261 |
+
current.remove();
|
1262 |
+
$(".saswp-add-custom-schema-div").remove();
|
1263 |
+
$("#post_specific .inside").append(response);
|
1264 |
+
current.removeClass('updating-message');
|
1265 |
+
saswpAddTimepicker();
|
1266 |
+
saswp_schema_datepicker();
|
1267 |
+
saswp_enable_rating_review();
|
1268 |
+
saswp_item_reviewed_call();
|
1269 |
+
});
|
1270 |
+
|
1271 |
+
});
|
1272 |
+
saswp_schema_datepicker();
|
1273 |
+
|
1274 |
+
saswp_reviews_datepicker();
|
1275 |
+
function saswp_reviews_datepicker(){
|
1276 |
+
|
1277 |
+
$('.saswp-reviews-datepicker-picker').datepicker({
|
1278 |
+
dateFormat: "yy-mm-dd"
|
1279 |
+
});
|
1280 |
+
}
|
1281 |
+
|
1282 |
+
//Review js starts here
|
1283 |
+
|
1284 |
+
$(document).on("click", ".saswp-add-more-item",function(e){
|
1285 |
+
e.preventDefault();
|
1286 |
+
var rows = $('.saswp-review-item-list-table tr').length;
|
1287 |
+
console.log(rows);
|
1288 |
+
var html = '<tr class="saswp-review-item-tr">';
|
1289 |
+
html += '<td>Review Item Feature</td>';
|
1290 |
+
html += '<td><input type="text" name="saswp-review-item-feature[]"></td>';
|
1291 |
+
html += '<td>Rating</td>';
|
1292 |
+
html += '<td><input step="0.1" min="0" max="5" type="number" name="saswp-review-item-star-rating[]"></td>';
|
1293 |
+
html += '<td><a type="button" class="saswp-remove-review-item button">x</a></td>';
|
1294 |
+
html += '</tr>';
|
1295 |
+
$(".saswp-review-item-list-table").append(html);
|
1296 |
+
|
1297 |
+
});
|
1298 |
+
|
1299 |
+
$(document).on("click", ".saswp-remove-review-item", function(e){
|
1300 |
+
e.preventDefault();
|
1301 |
+
$(this).parent().parent('tr').remove();
|
1302 |
+
});
|
1303 |
+
|
1304 |
+
$(document).on("focusout", ".saswp-review-item-tr input[type=number]", function(e){
|
1305 |
+
e.preventDefault();
|
1306 |
+
var total_rating = 0;
|
1307 |
+
var element_count = $(".saswp-review-item-tr input[type=number]").length;
|
1308 |
+
$(".saswp-review-item-tr input[type=number]").each(function(index, element){
|
1309 |
+
if($(element).val() ==''){
|
1310 |
+
total_rating += parseFloat(0);
|
1311 |
+
}else{
|
1312 |
+
total_rating += parseFloat($(element).val());
|
1313 |
+
}
|
1314 |
+
|
1315 |
+
});
|
1316 |
+
var over_all_rating = total_rating / element_count;
|
1317 |
+
$("#saswp-review-item-over-all").val(over_all_rating);
|
1318 |
+
});
|
1319 |
+
|
1320 |
+
$("#saswp-review-location").change(function(){
|
1321 |
+
var location = $(this).val();
|
1322 |
+
$(".saswp-review-shortcode").addClass('saswp_hide');
|
1323 |
+
if(location == 3){
|
1324 |
+
$(".saswp-review-shortcode").removeClass('saswp_hide');
|
1325 |
+
}
|
1326 |
+
}).change();
|
1327 |
+
|
1328 |
+
$("#saswp-review-item-enable").change(function(){
|
1329 |
+
if ($(this).is(':checked')) {
|
1330 |
+
$(".saswp-review-fields").show();
|
1331 |
+
}else{
|
1332 |
+
$(".saswp-review-fields").hide();
|
1333 |
+
}
|
1334 |
+
}).change();
|
1335 |
+
|
1336 |
+
$(document).on("click", ".saswp-restore-post-schema", function(e){
|
1337 |
+
e.preventDefault();
|
1338 |
+
var current = $(this);
|
1339 |
+
current.addClass('updating-message');
|
1340 |
+
|
1341 |
+
if($(".saswp-post-specific-schema-ids").val()){
|
1342 |
+
var schema_ids = JSON.parse($(".saswp-post-specific-schema-ids").val());
|
1343 |
+
}
|
1344 |
+
|
1345 |
+
$.post(ajaxurl,
|
1346 |
+
{ action:"saswp_restore_schema", schema_ids:schema_ids,post_id: saswp_localize_data.post_id, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1347 |
+
function(response){
|
1348 |
+
if(response['status'] =='t'){
|
1349 |
+
setTimeout(function(){ location.reload(); }, 1000);
|
1350 |
+
}else{
|
1351 |
+
alert(response['msg']);
|
1352 |
+
setTimeout(function(){ location.reload(); }, 1000);
|
1353 |
+
}
|
1354 |
+
current.removeClass('updating-message');
|
1355 |
+
},'json');
|
1356 |
+
});
|
1357 |
+
|
1358 |
+
//Review js ends here
|
1359 |
+
|
1360 |
+
$(document).on("click","div.saswp-tab ul.saswp-tab-nav a", function(e){
|
1361 |
+
e.preventDefault();
|
1362 |
+
var attr = $(this).attr('data-id');
|
1363 |
+
$(".saswp-post-specific-wrapper").hide();
|
1364 |
+
$("#"+attr).show();
|
1365 |
+
$('div.saswp-tab ul.saswp-tab-nav a').removeClass('selected');
|
1366 |
+
$('div.saswp-tab ul.saswp-tab-nav li').removeClass('selected');
|
1367 |
+
$(this).addClass('selected');
|
1368 |
+
$(this).parent().addClass('selected');
|
1369 |
+
saswp_enable_rating_review();
|
1370 |
+
});
|
1371 |
+
|
1372 |
+
|
1373 |
+
$('#saswp-global-tabs a:first').addClass('saswp-global-selected');
|
1374 |
+
$('.saswp-global-container').hide();
|
1375 |
+
|
1376 |
+
var hash = window.location.hash;
|
1377 |
+
|
1378 |
+
if(hash == '#saswp-default-container'){
|
1379 |
+
$('.saswp-global-container:eq(2)').show();
|
1380 |
+
}else{
|
1381 |
+
$('.saswp-global-container:first').show();
|
1382 |
+
}
|
1383 |
+
|
1384 |
+
|
1385 |
+
|
1386 |
+
$('#saswp-global-tabs a').click(function(){
|
1387 |
+
var t = $(this).attr('data-id');
|
1388 |
+
|
1389 |
+
if(!$(this).hasClass('saswp-global-selected')){
|
1390 |
+
$('#saswp-global-tabs a').removeClass('saswp-global-selected');
|
1391 |
+
$(this).addClass('saswp-global-selected');
|
1392 |
+
|
1393 |
+
$('.saswp-global-container').hide();
|
1394 |
+
$('#'+t).show();
|
1395 |
+
}
|
1396 |
+
});
|
1397 |
+
|
1398 |
+
|
1399 |
+
$('#saswp-tools-tabs a:first').addClass('saswp-global-selected');
|
1400 |
+
$('.saswp-tools-container').hide();
|
1401 |
+
$('.saswp-tools-container:first').show();
|
1402 |
+
|
1403 |
+
$('#saswp-tools-tabs a').click(function(){
|
1404 |
+
var t = $(this).attr('data-id');
|
1405 |
+
|
1406 |
+
if(!$(this).hasClass('saswp-global-selected')){
|
1407 |
+
$('#saswp-tools-tabs a').removeClass('saswp-global-selected');
|
1408 |
+
$(this).addClass('saswp-global-selected');
|
1409 |
+
|
1410 |
+
$('.saswp-tools-container').hide();
|
1411 |
+
$('#'+t).show();
|
1412 |
+
}
|
1413 |
+
});
|
1414 |
+
|
1415 |
+
|
1416 |
+
$('#saswp-review-tabs a:first').addClass('saswp-global-selected');
|
1417 |
+
$('.saswp-review-container').hide();
|
1418 |
+
$('.saswp-review-container:first').show();
|
1419 |
+
|
1420 |
+
$('#saswp-review-tabs a').click(function(){
|
1421 |
+
var t = $(this).attr('data-id');
|
1422 |
+
|
1423 |
+
if(!$(this).hasClass('saswp-global-selected')){
|
1424 |
+
$('#saswp-review-tabs a').removeClass('saswp-global-selected');
|
1425 |
+
$(this).addClass('saswp-global-selected');
|
1426 |
+
|
1427 |
+
$('.saswp-review-container').hide();
|
1428 |
+
$('#'+t).show();
|
1429 |
+
}
|
1430 |
+
});
|
1431 |
+
|
1432 |
+
|
1433 |
+
//Importer from schema plugin ends here
|
1434 |
+
|
1435 |
+
//custom fields modify schema starts here
|
1436 |
+
|
1437 |
+
//Changing the url of add new schema type
|
1438 |
+
$('a[href="'+saswp_localize_data.new_url_selector+'"]').attr( 'href', saswp_localize_data.new_url_href);
|
1439 |
+
|
1440 |
+
|
1441 |
+
$("#saswp_enable_custom_field").change(function(){
|
1442 |
+
if ($(this).is(':checked')) {
|
1443 |
+
$(".saswp-custom-fields-div").show();
|
1444 |
+
}else{
|
1445 |
+
$(".saswp-custom-fields-div").hide();
|
1446 |
+
}
|
1447 |
+
});
|
1448 |
+
|
1449 |
+
$(document).on('change','.saswp-custom-fields-name',function(){
|
1450 |
+
|
1451 |
+
var type = 'text';
|
1452 |
+
var fields_name = $(this).val();
|
1453 |
+
var str2 = "image";
|
1454 |
+
if(fields_name.indexOf(str2) != -1){
|
1455 |
+
type = 'image';
|
1456 |
+
}
|
1457 |
+
|
1458 |
+
var id = $(this).parent().parent('tr').find("td:eq(1)");
|
1459 |
+
saswp_get_meta_list(type, null, id, fields_name);
|
1460 |
+
$(this).parent().parent('tr').find("td:gt(1)").remove();
|
1461 |
+
});
|
1462 |
+
|
1463 |
+
$(document).on("click", '.saswp-skip-button', function(e){
|
1464 |
+
e.preventDefault();
|
1465 |
+
$(this).parent().parent().hide();
|
1466 |
+
|
1467 |
+
$.post(ajaxurl,
|
1468 |
+
{ action:"saswp_skip_wizard", saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1469 |
+
function(response){
|
1470 |
+
|
1471 |
+
},'json');
|
1472 |
+
|
1473 |
+
});
|
1474 |
+
|
1475 |
+
$(document).on("click", ".saswp_add_schema_fields_on_fly", function(e){
|
1476 |
+
e.preventDefault();
|
1477 |
+
|
1478 |
+
var schema_id = $(this).attr('data-id');
|
1479 |
+
var fields_type = $(this).attr('fields_type');
|
1480 |
+
var div_type = $(this).attr('div_type');
|
1481 |
+
|
1482 |
+
var count = $(".saswp-"+div_type+"-table-div").length;
|
1483 |
+
var index = $( ".saswp-"+div_type+"-table-div:nth-child("+count+")" ).attr('data-id');
|
1484 |
+
index = ++index;
|
1485 |
+
|
1486 |
+
if(!index){
|
1487 |
+
index = 0;
|
1488 |
+
}
|
1489 |
+
|
1490 |
+
saswp_get_post_specific_schema_fields(index, fields_type, div_type, schema_id, fields_type+'_');
|
1491 |
+
|
1492 |
+
});
|
1493 |
+
|
1494 |
+
$(document).on("click", ".saswp-table-close", function(){
|
1495 |
+
$(this).parent().remove();
|
1496 |
+
});
|
1497 |
+
|
1498 |
+
//How to schema js ends here
|
1499 |
+
|
1500 |
+
|
1501 |
+
$(document).on("change",".saswp-custom-meta-list", function(){
|
1502 |
+
|
1503 |
+
var meta_val = $(this).val();
|
1504 |
+
var field_name = $(this).parent().parent('tr').find(".saswp-custom-fields-name").val();
|
1505 |
+
var html = '';
|
1506 |
+
if(meta_val == 'manual_text'){
|
1507 |
+
html = '<td><input type="text" name="saswp_fixed_text['+field_name+']"></td>';
|
1508 |
+
}
|
1509 |
+
|
1510 |
+
if(meta_val == 'custom_field'){
|
1511 |
+
html += '<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+field_name+']">';
|
1512 |
+
html += '</select></td>';
|
1513 |
+
|
1514 |
+
}
|
1515 |
+
$(this).parent().parent('tr').find("td:gt(1)").remove();
|
1516 |
+
$(this).parent().parent('tr').append(html);
|
1517 |
+
saswpCustomSelect2();
|
1518 |
+
|
1519 |
+
});
|
1520 |
+
|
1521 |
+
$(document).on("click", '.saswp-add-custom-fields', function(){
|
1522 |
+
var schema_type = $('select#schema_type option:selected').val();
|
1523 |
+
var post_id = $('#post_ID').val();
|
1524 |
+
if(schema_type !=''){
|
1525 |
+
|
1526 |
+
if(!saswp_meta_list_fields){
|
1527 |
+
|
1528 |
+
$.ajax({
|
1529 |
+
type: "POST",
|
1530 |
+
url:ajaxurl,
|
1531 |
+
dataType: "json",
|
1532 |
+
data:{action:"saswp_get_schema_type_fields",post_id:post_id, schema_type:schema_type, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1533 |
+
success:function(response){
|
1534 |
+
saswp_meta_list_fields = response;
|
1535 |
+
saswp_get_meta_list('text', saswp_meta_list_fields, null, null);
|
1536 |
+
|
1537 |
+
},
|
1538 |
+
error: function(response){
|
1539 |
+
console.log(response);
|
1540 |
+
}
|
1541 |
+
});
|
1542 |
+
|
1543 |
+
|
1544 |
+
}else{
|
1545 |
+
saswp_get_meta_list('text', saswp_meta_list_fields, null, null);
|
1546 |
+
}
|
1547 |
+
|
1548 |
+
}
|
1549 |
+
});
|
1550 |
+
saswpCustomSelect2();
|
1551 |
+
function saswpCustomSelect2(){
|
1552 |
+
if((saswp_localize_data.post_type == 'saswp' || saswp_localize_data.page_now =='saswp') && saswp_localize_data.page_now !='saswp_page_structured_data_options'){
|
1553 |
+
|
1554 |
+
$('.saswp-custom-fields-select2').select2({
|
1555 |
+
ajax: {
|
1556 |
+
type: "POST",
|
1557 |
+
url: ajaxurl, // AJAX URL is predefined in WordPress admin
|
1558 |
+
dataType: 'json',
|
1559 |
+
delay: 250, // delay in ms while typing when to perform a AJAX search
|
1560 |
+
data: function (params) {
|
1561 |
+
return {
|
1562 |
+
saswp_security_nonce: saswp_localize_data.saswp_security_nonce,
|
1563 |
+
q: params.term, // search query
|
1564 |
+
action: 'saswp_get_custom_meta_fields' // AJAX action for admin-ajax.php
|
1565 |
+
};
|
1566 |
+
},
|
1567 |
+
processResults: function( data ) {
|
1568 |
+
return {
|
1569 |
+
results: data
|
1570 |
+
};
|
1571 |
+
},
|
1572 |
+
cache: true
|
1573 |
+
},
|
1574 |
+
minimumInputLength: 2 // the minimum of symbols to input before perform a search
|
1575 |
+
});
|
1576 |
+
|
1577 |
+
}
|
1578 |
+
|
1579 |
+
}
|
1580 |
+
|
1581 |
+
function saswp_enable_rating_review(){
|
1582 |
+
var schema_type ="";
|
1583 |
+
if($('select#schema_type option:selected').val()){
|
1584 |
+
schema_type = $('select#schema_type option:selected').val();
|
1585 |
+
}
|
1586 |
+
if($(".saswp-tab-links.selected").attr('saswp-schema-type')){
|
1587 |
+
schema_type = $(".saswp-tab-links.selected").attr('saswp-schema-type');
|
1588 |
+
}
|
1589 |
+
|
1590 |
+
if(schema_type){
|
1591 |
+
$(".saswp-enable-rating-review-"+schema_type.toLowerCase()).change(function(){
|
1592 |
+
|
1593 |
+
if($(this).is(':checked')){
|
1594 |
+
$(this).parent().parent().siblings('.saswp-rating-review-'+schema_type.toLowerCase()).show();
|
1595 |
+
}else{
|
1596 |
+
$(this).parent().parent().siblings('.saswp-rating-review-'+schema_type.toLowerCase()).hide();
|
1597 |
+
}
|
1598 |
+
|
1599 |
+
}).change();
|
1600 |
+
}
|
1601 |
+
|
1602 |
+
}
|
1603 |
+
saswp_enable_rating_review();
|
1604 |
+
|
1605 |
+
//custom fields modify schema ends here
|
1606 |
+
|
1607 |
+
|
1608 |
+
//Google review js starts here
|
1609 |
+
|
1610 |
+
$('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr( 'href', saswp_localize_data.collection_post_add_new_url);
|
1611 |
+
|
1612 |
+
|
1613 |
+
|
1614 |
+
$(document).on("click", '.saswp_coonect_google_place', function(){
|
1615 |
+
|
1616 |
+
var place_id = $("#saswp_google_place_id").val();
|
1617 |
+
var language = $("#saswp_language_list").val();
|
1618 |
+
var google_api = $("#saswp_googel_api").val();
|
1619 |
+
|
1620 |
+
if(place_id !=''){
|
1621 |
+
$.ajax({
|
1622 |
+
type: "POST",
|
1623 |
+
url:ajaxurl,
|
1624 |
+
dataType: "json",
|
1625 |
+
data:{action:"saswp_connect_google_place",place_id:place_id, language:language, google_api:google_api, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1626 |
+
success:function(response){
|
1627 |
+
console.log(response['status']);
|
1628 |
+
},
|
1629 |
+
error: function(response){
|
1630 |
+
console.log(response);
|
1631 |
+
}
|
1632 |
+
});
|
1633 |
+
}
|
1634 |
+
});
|
1635 |
+
|
1636 |
+
//google review js ends here
|
1637 |
+
|
1638 |
+
//Adding settings button beside add schema type button on schema type list page
|
1639 |
+
|
1640 |
+
if ('saswp' == saswp_localize_data.post_type && saswp_localize_data.page_now == 'edit.php') {
|
1641 |
+
|
1642 |
+
jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>");
|
1643 |
+
|
1644 |
+
}
|
1645 |
+
|
1646 |
+
//star rating stars here
|
1647 |
+
if(typeof(saswp_reviews_data) !== 'undefined'){
|
1648 |
+
|
1649 |
+
$(".saswp-rating-div").rateYo({
|
1650 |
+
|
1651 |
+
rating: saswp_reviews_data.rating_val,
|
1652 |
+
halfStar: true,
|
1653 |
+
//normalFill: "#ffd700",
|
1654 |
+
readOnly: saswp_reviews_data.readonly,
|
1655 |
+
onSet: function (rating, rateYoInstance) {
|
1656 |
+
$(this).next().val(rating);
|
1657 |
+
console.log(rating);
|
1658 |
+
}
|
1659 |
+
|
1660 |
+
});
|
1661 |
+
|
1662 |
+
}
|
1663 |
+
$(document).on("click", ".saswp-add-g-location-btn", function(e){
|
1664 |
+
|
1665 |
+
var blocks_field = '';
|
1666 |
+
|
1667 |
+
if($("#saswp_google_place_api_key").length){
|
1668 |
+
|
1669 |
+
blocks_field = '<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="5" step="5" placeholder="5" disabled="disabled">';
|
1670 |
+
}else{
|
1671 |
+
blocks_field = '<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="10" step="10" placeholder="10">';
|
1672 |
+
}
|
1673 |
+
|
1674 |
+
e.preventDefault();
|
1675 |
+
var html = '';
|
1676 |
+
html += '<tr>'
|
1677 |
+
+ '<td style="width:12%;"><strong>Place Id</strong></td>'
|
1678 |
+
+ '<td style="width:20%;"><input class="saswp-g-location-field" name="sd_data[saswp_reviews_location_name][]" type="text" value=""></td>'
|
1679 |
+
+ '<td style="width:10%;"><strong>Reviews</strong></td>'
|
1680 |
+
+ '<td style="width:10%;">'+blocks_field+'</td>'
|
1681 |
+
+ '<td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">Fetch</a></td>'
|
1682 |
+
+ '<td style="width:10%;"><a type="button" class="saswp-remove-review-item button">x</a></td>'
|
1683 |
+
+ '<td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td>'
|
1684 |
+
+ '</tr>';
|
1685 |
+
if(html){
|
1686 |
+
$(".saswp-g-reviews-settings-table").append(html);
|
1687 |
+
}
|
1688 |
+
|
1689 |
+
});
|
1690 |
+
|
1691 |
+
$(document).on("click", '.saswp-fetch-g-reviews', function(){
|
1692 |
+
|
1693 |
+
var current = $(this);
|
1694 |
+
var premium_status = 'free';
|
1695 |
+
current.addClass('updating-message');
|
1696 |
+
|
1697 |
+
var location = $(this).parent().parent().find('.saswp-g-location-field').val();
|
1698 |
+
var blocks = $(this).parent().parent().find('.saswp-g-blocks-field').val();
|
1699 |
+
var g_api = $("#saswp_google_place_api_key").val();
|
1700 |
+
var reviews_api = $("#reviews_addon_license_key").val();
|
1701 |
+
var reviews_api_status = $("#reviews_addon_license_key_status").val();
|
1702 |
+
|
1703 |
+
if($("#saswp_google_place_api_key").length){
|
1704 |
+
premium_status = 'free';
|
1705 |
+
}else{
|
1706 |
+
premium_status = 'premium';
|
1707 |
+
}
|
1708 |
+
|
1709 |
+
if(premium_status == 'premium'){
|
1710 |
+
|
1711 |
+
if(blocks > 0){
|
1712 |
+
|
1713 |
+
var blocks_remainder = blocks % 10;
|
1714 |
+
|
1715 |
+
if(blocks_remainder != 0){
|
1716 |
+
|
1717 |
+
current.parent().parent().find('.saswp-rv-fetched-msg').text('Reviews count should be in step of 10');
|
1718 |
+
current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "#988f1b");
|
1719 |
+
current.removeClass('updating-message');
|
1720 |
+
return false;
|
1721 |
+
|
1722 |
+
}
|
1723 |
+
|
1724 |
+
}else{
|
1725 |
+
alert('Blocks value is zero');
|
1726 |
+
current.removeClass('updating-message');
|
1727 |
+
return false;
|
1728 |
+
}
|
1729 |
+
|
1730 |
+
}
|
1731 |
+
|
1732 |
+
if(location !='' && (reviews_api || g_api)){
|
1733 |
+
$.ajax({
|
1734 |
+
type: "POST",
|
1735 |
+
url:ajaxurl,
|
1736 |
+
dataType: "json",
|
1737 |
+
data:{action:"saswp_fetch_google_reviews",reviews_api_status:reviews_api_status, reviews_api:reviews_api,location:location,blocks:blocks,g_api:g_api,premium_status:premium_status, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1738 |
+
success:function(response){
|
1739 |
+
if(response['status'] =='t'){
|
1740 |
+
current.parent().parent().find('.saswp-rv-fetched-msg').text('Success');
|
1741 |
+
current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "green");
|
1742 |
+
}else{
|
1743 |
+
current.parent().parent().find('.saswp-rv-fetched-msg').text(response['message']);
|
1744 |
+
current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "#988f1b");
|
1745 |
+
}
|
1746 |
+
current.removeClass('updating-message');
|
1747 |
+
},
|
1748 |
+
error: function(response){
|
1749 |
+
console.log(response);
|
1750 |
+
}
|
1751 |
+
});
|
1752 |
+
}else{
|
1753 |
+
if(location ==''){
|
1754 |
+
alert('Please enter place id');
|
1755 |
+
}
|
1756 |
+
if(g_api ==''){
|
1757 |
+
alert('Please enter api key');
|
1758 |
+
}
|
1759 |
+
if(reviews_api ==''){
|
1760 |
+
alert('Please enter reviews api key');
|
1761 |
+
}
|
1762 |
+
current.removeClass('updating-message');
|
1763 |
+
}
|
1764 |
+
});
|
1765 |
+
|
1766 |
+
//rating ends here
|
1767 |
+
|
1768 |
+
$("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){
|
1769 |
+
var current = $(this);
|
1770 |
+
|
1771 |
+
current.parent().find('.saswp-phone-validation').remove();
|
1772 |
+
|
1773 |
+
var pnumber = $(this).val();
|
1774 |
+
var p_regex = /^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/;
|
1775 |
+
|
1776 |
+
if(!p_regex.test(pnumber)){
|
1777 |
+
current.after('<span style="color:red;" class="saswp-phone-validation">Invalid Phone Number</span>');
|
1778 |
+
}else{
|
1779 |
+
current.parent().find('.saswp-phone-validation').remove();
|
1780 |
+
}
|
1781 |
+
|
1782 |
+
});
|
1783 |
+
|
1784 |
+
});
|
admin_section/plugin-installer/install.php
CHANGED
@@ -508,6 +508,11 @@
|
|
508 |
}
|
509 |
|
510 |
function saswp_install_header() {
|
|
|
|
|
|
|
|
|
|
|
511 |
global $saswp_installer_config;
|
512 |
|
513 |
// Get the current step.
|
508 |
}
|
509 |
|
510 |
function saswp_install_header() {
|
511 |
+
|
512 |
+
if( is_null ( get_current_screen() )) {
|
513 |
+
set_current_screen('Merlin');
|
514 |
+
}
|
515 |
+
|
516 |
global $saswp_installer_config;
|
517 |
|
518 |
// Get the current step.
|
admin_section/settings.php
CHANGED
@@ -1394,7 +1394,7 @@ function saswp_review_page_callback(){
|
|
1394 |
'label' => 'Google place API Key',
|
1395 |
'id' => 'saswp_google_place_api_key',
|
1396 |
'name' => 'sd_data[saswp_google_place_api_key]',
|
1397 |
-
'note' => '<a target="_blank" href="https://
|
1398 |
'class' => '',
|
1399 |
'type' => 'text',
|
1400 |
),
|
@@ -1513,6 +1513,18 @@ function saswp_compatibility_page_callback(){
|
|
1513 |
'name' => 'sd_data[saswp-tagyeem]',
|
1514 |
)
|
1515 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1516 |
|
1517 |
$the_events_calendar = array(
|
1518 |
'label' => 'The Events Calendar',
|
@@ -1719,6 +1731,7 @@ function saswp_compatibility_page_callback(){
|
|
1719 |
$dwquestiton,
|
1720 |
//$wpjobmanager,
|
1721 |
$yoast,
|
|
|
1722 |
$rankmath
|
1723 |
|
1724 |
);
|
@@ -1921,7 +1934,8 @@ function saswp_get_field_note($pname){
|
|
1921 |
'the_events_calendar' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/the-events-calendar/">The Events Calendar</a>',
|
1922 |
'yoast_seo' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wordpress-seo/">Yoast SEO</a>',
|
1923 |
'rank_math' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/seo-by-rank-math/">WordPress SEO Plugin – Rank Math</a>',
|
1924 |
-
'dw_qna' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/dw-question-answer/">DW Question Answer</a>'
|
|
|
1925 |
);
|
1926 |
|
1927 |
if(!saswp_check_plugin_active_status($pname)){
|
1394 |
'label' => 'Google place API Key',
|
1395 |
'id' => 'saswp_google_place_api_key',
|
1396 |
'name' => 'sd_data[saswp_google_place_api_key]',
|
1397 |
+
'note' => '<a target="_blank" href="https://console.developers.google.com/apis/library">Get place API Key</a> Note : Google allows only 5 reviews per location',
|
1398 |
'class' => '',
|
1399 |
'type' => 'text',
|
1400 |
),
|
1513 |
'name' => 'sd_data[saswp-tagyeem]',
|
1514 |
)
|
1515 |
);
|
1516 |
+
$smart_crawl = array(
|
1517 |
+
'label' => 'SmartCrawl Seo',
|
1518 |
+
'id' => 'saswp-smart-crawl-checkbox',
|
1519 |
+
'name' => 'saswp-smart-crawl-checkbox',
|
1520 |
+
'type' => 'checkbox',
|
1521 |
+
'class' => 'checkbox saswp-checkbox',
|
1522 |
+
'note' => saswp_get_field_note('smart_crawl'),
|
1523 |
+
'hidden' => array(
|
1524 |
+
'id' => 'saswp-smart-crawl',
|
1525 |
+
'name' => 'sd_data[saswp-smart-crawl]',
|
1526 |
+
)
|
1527 |
+
);
|
1528 |
|
1529 |
$the_events_calendar = array(
|
1530 |
'label' => 'The Events Calendar',
|
1731 |
$dwquestiton,
|
1732 |
//$wpjobmanager,
|
1733 |
$yoast,
|
1734 |
+
$smart_crawl,
|
1735 |
$rankmath
|
1736 |
|
1737 |
);
|
1934 |
'the_events_calendar' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/the-events-calendar/">The Events Calendar</a>',
|
1935 |
'yoast_seo' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wordpress-seo/">Yoast SEO</a>',
|
1936 |
'rank_math' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/seo-by-rank-math/">WordPress SEO Plugin – Rank Math</a>',
|
1937 |
+
'dw_qna' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/dw-question-answer/">DW Question Answer</a>',
|
1938 |
+
'smart_crawl' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/smartcrawl-seo/">SmartCrawl Seo</a>'
|
1939 |
);
|
1940 |
|
1941 |
if(!saswp_check_plugin_active_status($pname)){
|
admin_section/structure_admin.php
CHANGED
@@ -1541,19 +1541,23 @@ function saswp_upgrade_function( $upgrader_object, $options ) {
|
|
1541 |
$current_plugin_path_name = SASWP_PLUGIN_BASENAME;
|
1542 |
|
1543 |
if ($options['action'] == 'update' && $options['type'] == 'plugin' ){
|
1544 |
-
|
1545 |
-
|
|
|
|
|
1546 |
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
|
|
|
|
1553 |
}
|
|
|
1554 |
}
|
1555 |
|
1556 |
-
|
1557 |
function saswp_review_module_upgradation(){
|
1558 |
|
1559 |
$upgrade_option = get_option('saswp_google_upgrade');
|
1541 |
$current_plugin_path_name = SASWP_PLUGIN_BASENAME;
|
1542 |
|
1543 |
if ($options['action'] == 'update' && $options['type'] == 'plugin' ){
|
1544 |
+
|
1545 |
+
if(is_array($options) && array_key_exists('plugins', $options)){
|
1546 |
+
|
1547 |
+
foreach($options['plugins'] as $each_plugin){
|
1548 |
|
1549 |
+
if ($each_plugin==$current_plugin_path_name){
|
1550 |
+
|
1551 |
+
saswp_review_module_upgradation();
|
1552 |
+
|
1553 |
+
}
|
1554 |
+
}
|
1555 |
+
}
|
1556 |
+
|
1557 |
}
|
1558 |
+
|
1559 |
}
|
1560 |
|
|
|
1561 |
function saswp_review_module_upgradation(){
|
1562 |
|
1563 |
$upgrade_option = get_option('saswp_google_upgrade');
|
core/array-list/local-sub-business.php
ADDED
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
return array(
|
3 |
+
'automotivebusiness' => array(
|
4 |
+
'' => 'Select Sub Business Type ( optional )',
|
5 |
+
'autobodyshop' => 'Auto Body Shop',
|
6 |
+
'autodealer' => 'Auto Dealer',
|
7 |
+
'autopartsstore' => 'Auto Parts Store',
|
8 |
+
'autorental' => 'Auto Rental',
|
9 |
+
'autorepair' => 'Auto Repair',
|
10 |
+
'autowash' => 'Auto Wash',
|
11 |
+
'gasstation' => 'Gas Station',
|
12 |
+
'motorcycledealer' => 'Motorcycle Dealer',
|
13 |
+
'motorcyclerepair' => 'Motorcycle Repair'
|
14 |
+
),
|
15 |
+
'emergencyservice' => array(
|
16 |
+
'' => 'Select Sub Business Type ( optional )',
|
17 |
+
'firestation' => 'Fire Station',
|
18 |
+
'hospital' => 'Hospital',
|
19 |
+
'policestation' => 'Police Station',
|
20 |
+
),
|
21 |
+
'entertainmentbusiness' => array(
|
22 |
+
'' => 'Select Sub Business Type ( optional )',
|
23 |
+
'adultentertainment' => 'Adult Entertainment',
|
24 |
+
'amusementpark' => 'Amusement Park',
|
25 |
+
'artgallery' => 'Art Gallery',
|
26 |
+
'casino' => 'Casino',
|
27 |
+
'comedyclub' => 'Comedy Club',
|
28 |
+
'movietheater' => 'Movie Theater',
|
29 |
+
'nightclub' => 'Night Club',
|
30 |
+
|
31 |
+
),
|
32 |
+
'financialservice' => array(
|
33 |
+
'' => 'Select Sub Business Type ( optional )',
|
34 |
+
'accountingservice' => 'Accounting Service',
|
35 |
+
'automatedteller' => 'Automated Teller',
|
36 |
+
'bankorcredit_union' => 'Bank Or Credit Union',
|
37 |
+
'insuranceagency' => 'Insurance Agency',
|
38 |
+
|
39 |
+
),
|
40 |
+
'foodestablishment' => array(
|
41 |
+
'' => 'Select Sub Business Type ( optional )',
|
42 |
+
'bakery' => 'Bakery',
|
43 |
+
'barorpub' => 'Bar Or Pub',
|
44 |
+
'brewery' => 'Brewery',
|
45 |
+
'cafeorcoffee_shop' => 'Cafe Or Coffee Shop',
|
46 |
+
'fastfoodrestaurant' => 'Fast Food Restaurant',
|
47 |
+
'icecreamshop' => 'Ice Cream Shop',
|
48 |
+
'restaurant' => 'Restaurant',
|
49 |
+
'winery' => 'Winery',
|
50 |
+
|
51 |
+
),
|
52 |
+
'healthandbeautybusiness' => array(
|
53 |
+
'' => 'Select Sub Business Type ( optional )',
|
54 |
+
'beautysalon' => 'Beauty Salon',
|
55 |
+
'dayspa' => 'DaySpa',
|
56 |
+
'hairsalon' => 'Hair Salon',
|
57 |
+
'healthclub' => 'Health Club',
|
58 |
+
'nailsalon' => 'Nail Salon',
|
59 |
+
'tattooparlor' => 'Tattoo Parlor',
|
60 |
+
),
|
61 |
+
'homeandconstructionbusiness' => array(
|
62 |
+
'' => 'Select Sub Business Type ( optional )',
|
63 |
+
'electrician' => 'Electrician',
|
64 |
+
'generalcontractor' => 'General Contractor',
|
65 |
+
'hvacbusiness' => 'HVAC Business',
|
66 |
+
'locksmith' => 'Locksmith',
|
67 |
+
'movingcompany' => 'Moving Company',
|
68 |
+
'plumber' => 'Plumber',
|
69 |
+
'roofingcontractor' => 'Roofing Contractor',
|
70 |
+
'housepainter' => 'House Painter',
|
71 |
+
),
|
72 |
+
'legalservice' => array(
|
73 |
+
'' => 'Select Sub Business Type ( optional )',
|
74 |
+
'attorney' => 'Attorney',
|
75 |
+
'notary' => 'Notary',
|
76 |
+
),
|
77 |
+
'lodgingbusiness' => array(
|
78 |
+
'' => 'Select Sub Business Type ( optional )',
|
79 |
+
'bedandbreakfast' => 'Bed And Breakfast',
|
80 |
+
'campground' => 'Campground',
|
81 |
+
'hostel' => 'Hostel',
|
82 |
+
'hotel' => 'Hotel',
|
83 |
+
'motel' => 'Motel',
|
84 |
+
'resort' => 'Resort',
|
85 |
+
),
|
86 |
+
'sportsactivitylocation' => array(
|
87 |
+
'' => 'Select Sub Business Type ( optional )',
|
88 |
+
'bowlingalley' => 'Bowling Alley',
|
89 |
+
'exercisegym' => 'Exercise Gym',
|
90 |
+
'golfcourse' => 'Golf Course',
|
91 |
+
'healthclub' => 'Health Club',
|
92 |
+
'publicswimming_pool' => 'Public Swimming Pool',
|
93 |
+
'skiresort' => 'Ski Resort',
|
94 |
+
'sportsclub' => 'Sports Club',
|
95 |
+
'stadiumorarena' => 'Stadium Or Arena',
|
96 |
+
'tenniscomplex' => 'Tennis Complex'
|
97 |
+
),
|
98 |
+
'store' => array(
|
99 |
+
'' => 'Select Sub Business Type ( optional )',
|
100 |
+
'autopartsstore' => 'Auto Parts Store',
|
101 |
+
'bikestore' => 'Bike Store',
|
102 |
+
'bookstore' => 'Book Store',
|
103 |
+
'clothingstore' => 'Clothing Store',
|
104 |
+
'computerstore' => 'Computer Store',
|
105 |
+
'conveniencestore' => 'Convenience Store',
|
106 |
+
'departmentstore' => 'Department Store',
|
107 |
+
'electronicsstore' => 'Electronics Store',
|
108 |
+
'florist' => 'Florist',
|
109 |
+
'furniturestore' => 'Furniture Store',
|
110 |
+
'gardenstore' => 'Garden Store',
|
111 |
+
'grocerystore' => 'Grocery Store',
|
112 |
+
'hardwarestore' => 'Hardware Store',
|
113 |
+
'hobbyshop' => 'Hobby Shop',
|
114 |
+
'homegoodsstore' => 'HomeGoods Store',
|
115 |
+
'jewelrystore' => 'Jewelry Store',
|
116 |
+
'liquorstore' => 'Liquor Store',
|
117 |
+
'mensclothingstore' => 'Mens Clothing Store',
|
118 |
+
'mobilephonestore' => 'Mobile Phone Store',
|
119 |
+
'movierentalstore' => 'Movie Rental Store',
|
120 |
+
'musicstore' => 'Music Store',
|
121 |
+
'officeequipmentstore' => 'Office Equipment Store',
|
122 |
+
'outletstore' => 'Outlet Store',
|
123 |
+
'pawnshop' => 'Pawn Shop',
|
124 |
+
'petstore' => 'Pet Store',
|
125 |
+
'shoestore' => 'Shoe Store',
|
126 |
+
'sportinggoodsstore' => 'Sporting Goods Store',
|
127 |
+
'tireshop' => 'Tire Shop',
|
128 |
+
'toystore' => 'Toy Store',
|
129 |
+
'wholesalestore' => 'Wholesale Store'
|
130 |
+
)
|
131 |
+
);
|
132 |
+
|
core/array-list/meta_list.php
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
return array(
|
3 |
+
'text' => array(
|
4 |
+
array(
|
5 |
+
'label' => __( 'Single Element', 'wp-schema-pro' ),
|
6 |
+
'meta-list' => array(
|
7 |
+
'blogname' => __( 'Site Title', 'wp-schema-pro' ),
|
8 |
+
'blogdescription' => __( 'Tagline', 'wp-schema-pro' ),
|
9 |
+
'site_url' => __( 'Site URL', 'wp-schema-pro' ),
|
10 |
+
'post_title' => __( 'Title', 'wp-schema-pro' ),
|
11 |
+
'post_content' => __( 'Content', 'wp-schema-pro' ),
|
12 |
+
'post_excerpt' => __( 'Excerpt', 'wp-schema-pro' ),
|
13 |
+
'post_permalink' => __( 'Permalink', 'wp-schema-pro' ),
|
14 |
+
'author_name' => __( 'Author name', 'wp-schema-pro' ),
|
15 |
+
'author_first_name' => __( 'Author first name', 'wp-schema-pro' ),
|
16 |
+
'author_last_name' => __( 'Author last name', 'wp-schema-pro' ),
|
17 |
+
'post_date' => __( 'Publish Date', 'wp-schema-pro' ),
|
18 |
+
'post_modified' => __( 'Last Modify Date', 'wp-schema-pro' ),
|
19 |
+
),
|
20 |
+
),
|
21 |
+
array(
|
22 |
+
'label' => __( 'Manual Field', 'wp-schema-pro' ),
|
23 |
+
'meta-list' => array(
|
24 |
+
'manual_text' => __( 'Manual Text', 'wp-schema-pro' ),
|
25 |
+
),
|
26 |
+
),
|
27 |
+
array(
|
28 |
+
'label' => __( 'Custom Field', 'wp-schema-pro' ),
|
29 |
+
'meta-list' => array(
|
30 |
+
'custom_field' => __( 'Custom Field', 'wp-schema-pro' ),
|
31 |
+
),
|
32 |
+
),
|
33 |
+
),
|
34 |
+
'image' => array(
|
35 |
+
|
36 |
+
array(
|
37 |
+
'label' => __( 'Single Element', 'wp-schema-pro' ),
|
38 |
+
'meta-list' => array(
|
39 |
+
'featured_img' => __( 'Featured image', 'wp-schema-pro' ),
|
40 |
+
'author_image' => __( 'Author image', 'wp-schema-pro' ),
|
41 |
+
'site_logo' => __( 'Logo', 'wp-schema-pro' ),
|
42 |
+
),
|
43 |
+
),
|
44 |
+
array(
|
45 |
+
'label' => __( 'Manual field', 'wp-schema-pro' ),
|
46 |
+
'meta-list' => array(
|
47 |
+
'manual_text' => __( 'Manual Image URL', 'wp-schema-pro' ),
|
48 |
+
),
|
49 |
+
),
|
50 |
+
array(
|
51 |
+
'label' => __( 'Custom Field', 'wp-schema-pro' ),
|
52 |
+
'meta-list' => array(
|
53 |
+
'custom_field' => __( 'Custom Field', 'wp-schema-pro' ),
|
54 |
+
),
|
55 |
+
),
|
56 |
+
),
|
57 |
+
);
|
core/array-list/plugins.php
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
return array(
|
3 |
+
|
4 |
+
array(
|
5 |
+
'key' => 'kk_star_ratings',
|
6 |
+
'name' => 'kk Star Ratings',
|
7 |
+
'path_free' => 'kk-star-ratings/index.php',
|
8 |
+
'status_key' => 'saswp-kk-star-raring',
|
9 |
+
),
|
10 |
+
array(
|
11 |
+
'key' => 'wp_post_ratings',
|
12 |
+
'name' => 'WP-PostRatings',
|
13 |
+
'path_free' => 'wp-postratings/wp-postratings.php',
|
14 |
+
'status_key' => 'saswp-wppostratings-raring',
|
15 |
+
),
|
16 |
+
array(
|
17 |
+
'key' => 'bb_press',
|
18 |
+
'name' => 'bbPress',
|
19 |
+
'path_free' => 'bbpress/bbpress.php',
|
20 |
+
'status_key' => 'saswp-bbpress',
|
21 |
+
),
|
22 |
+
array(
|
23 |
+
'key' => 'woocommerce',
|
24 |
+
'name' => 'Woocommerce',
|
25 |
+
'path_free' => 'woocommerce/woocommerce.php',
|
26 |
+
'status_key' => 'saswp-woocommerce',
|
27 |
+
),
|
28 |
+
array(
|
29 |
+
'key' => 'cooked',
|
30 |
+
'name' => 'Cooked',
|
31 |
+
'path_free' => 'cooked/cooked.php',
|
32 |
+
'path_pro' => 'cooked-pro/cooked-pro.php',
|
33 |
+
'status_key' => 'saswp-cooked',
|
34 |
+
),
|
35 |
+
array(
|
36 |
+
'key' => 'the_events_calendar',
|
37 |
+
'name' => 'The Events Calendar',
|
38 |
+
'path_free' => 'the-events-calendar/the-events-calendar.php',
|
39 |
+
'status_key' => 'saswp-the-events-calendar',
|
40 |
+
),
|
41 |
+
array(
|
42 |
+
'key' => 'dw_qna',
|
43 |
+
'name' => 'DW Question Answer',
|
44 |
+
'path_free' => 'dw-question-answer/dw-question-answer.php',
|
45 |
+
'path_pro' => 'dw-question-answer-pro/dw-question-answer.php',
|
46 |
+
'status_key' => 'saswp-dw-question-answer',
|
47 |
+
),
|
48 |
+
array(
|
49 |
+
'key' => 'yoast_seo',
|
50 |
+
'name' => 'Yoast Seo',
|
51 |
+
'path_free' => 'wordpress-seo/wp-seo.php',
|
52 |
+
'path_pro' => 'wordpress-seo-premium/wp-seo-premium.php',
|
53 |
+
'status_key' => 'saswp-yoast',
|
54 |
+
),
|
55 |
+
array(
|
56 |
+
'key' => 'rank_math',
|
57 |
+
'name' => 'Rank Math',
|
58 |
+
'path_free' => 'seo-by-rank-math/rank-math.php',
|
59 |
+
'path_pro' => 'seo-by-rank-math-premium/rank-math-premium.php',
|
60 |
+
'status_key' => 'saswp-rankmath',
|
61 |
+
),
|
62 |
+
array(
|
63 |
+
'key' => 'smart_crawl',
|
64 |
+
'name' => 'SmartCrawl Seo',
|
65 |
+
'path_free' => 'smartcrawl-seo/wpmu-dev-seo.php',
|
66 |
+
'status_key' => 'saswp-smart-crawl',
|
67 |
+
),
|
68 |
+
|
69 |
+
);
|
core/array-list/schemas.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
return array(
|
3 |
+
|
4 |
+
'Accommodation' => array(
|
5 |
+
'Apartment' => 'Apartment',
|
6 |
+
'House' => 'House',
|
7 |
+
'SingleFamilyResidence' => 'SingleFamilyResidence',
|
8 |
+
),
|
9 |
+
'CreativeWork' => array(
|
10 |
+
'Article' => 'Article',
|
11 |
+
'Blogposting' => 'Blogposting',
|
12 |
+
'Course' => 'Course',
|
13 |
+
'DiscussionForumPosting' => 'DiscussionForumPosting',
|
14 |
+
'FAQ' => 'FAQ',
|
15 |
+
'HowTo' => 'HowTo',
|
16 |
+
'NewsArticle' => 'NewsArticle',
|
17 |
+
'qanda' => 'Q&A',
|
18 |
+
'Review' => 'Review',
|
19 |
+
'Recipe' => 'Recipe',
|
20 |
+
'TVSeries' => 'TVSeries',
|
21 |
+
'SoftwareApplication' => 'SoftwareApplication',
|
22 |
+
'TechArticle' => 'TechArticle',
|
23 |
+
'WebPage' => 'WebPage'
|
24 |
+
),
|
25 |
+
'Event' => array(
|
26 |
+
'Event' => 'Event',
|
27 |
+
),
|
28 |
+
'Game' => array(
|
29 |
+
'VideoGame' => 'VideoGame'
|
30 |
+
),
|
31 |
+
'Intangible' => array(
|
32 |
+
'JobPosting' => 'JobPosting',
|
33 |
+
'Service' => 'Service',
|
34 |
+
'Trip' => 'Trip',
|
35 |
+
|
36 |
+
),
|
37 |
+
'Media' => array(
|
38 |
+
'AudioObject' => 'AudioObject',
|
39 |
+
'VideoObject' => 'VideoObject'
|
40 |
+
),
|
41 |
+
'Medical' => array(
|
42 |
+
'MedicalCondition' => 'MedicalCondition',
|
43 |
+
),
|
44 |
+
'Organization' => array(
|
45 |
+
'local_business' => 'Local Business',
|
46 |
+
),
|
47 |
+
'Product' => array(
|
48 |
+
'Product' => 'Product',
|
49 |
+
),
|
50 |
+
'Place' => array(
|
51 |
+
'TouristAttraction' => 'TouristAttraction',
|
52 |
+
'TouristDestination' => 'TouristDestination',
|
53 |
+
'LandmarksOrHistoricalBuildings' => 'LandmarksOrHistoricalBuildings',
|
54 |
+
),
|
55 |
+
'PlaceOfWorship' => array(
|
56 |
+
'HinduTemple' => 'HinduTemple',
|
57 |
+
'Church' => 'Church',
|
58 |
+
'Mosque' => 'Mosque',
|
59 |
+
),
|
60 |
+
'Thing' => array(
|
61 |
+
'Person' => 'Person',
|
62 |
+
)
|
63 |
+
);
|
output/compatibility.php
ADDED
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
3 |
+
|
4 |
+
class saswp_output_compatibility{
|
5 |
+
|
6 |
+
public $_plugins_list = array();
|
7 |
+
|
8 |
+
public function __construct() {
|
9 |
+
|
10 |
+
$mappings_file = SASWP_DIR_NAME . '/core/array-list/plugins.php';
|
11 |
+
|
12 |
+
if ( file_exists( $mappings_file ) ) {
|
13 |
+
$this->_plugins_list = include $mappings_file;
|
14 |
+
}
|
15 |
+
|
16 |
+
}
|
17 |
+
|
18 |
+
public function saswp_service_compatibility_hooks(){
|
19 |
+
|
20 |
+
add_action( 'init', array($this, 'saswp_override_schema_markup'));
|
21 |
+
add_filter( 'amp_init', array($this, 'saswp_override_schema_markup'));
|
22 |
+
|
23 |
+
}
|
24 |
+
|
25 |
+
public function saswp_override_schema_markup(){
|
26 |
+
|
27 |
+
global $sd_data;
|
28 |
+
|
29 |
+
if(!empty($this->_plugins_list)){
|
30 |
+
|
31 |
+
foreach ($this->_plugins_list as $plugins){
|
32 |
+
|
33 |
+
if(isset($sd_data[$plugins['status_key']]) && $sd_data[$plugins['status_key']] == 1){
|
34 |
+
|
35 |
+
if(is_plugin_active($plugins['path_free']) || (isset($plugins['path_pro']) && is_plugin_active($plugins['path_pro']))){
|
36 |
+
|
37 |
+
$func_name = 'saswp_'.$plugins['key'].'_override';
|
38 |
+
|
39 |
+
if(method_exists($this, $func_name) && saswp_global_option()){
|
40 |
+
call_user_func(array($this, $func_name));
|
41 |
+
}
|
42 |
+
|
43 |
+
}
|
44 |
+
|
45 |
+
}
|
46 |
+
|
47 |
+
}
|
48 |
+
|
49 |
+
}
|
50 |
+
|
51 |
+
|
52 |
+
}
|
53 |
+
|
54 |
+
public function saswp_wp_post_ratings_override(){
|
55 |
+
|
56 |
+
add_filter('wp_postratings_schema_itemtype', '__return_false');
|
57 |
+
add_filter('wp_postratings_google_structured_data', '__return_false');
|
58 |
+
|
59 |
+
}
|
60 |
+
|
61 |
+
public function saswp_rank_math_override(){
|
62 |
+
add_action( 'rank_math/json_ld', array($this, 'saswp_remove_rank_math_schema'),99 );
|
63 |
+
}
|
64 |
+
|
65 |
+
public function saswp_yoast_seo_override(){
|
66 |
+
add_filter('wpseo_json_ld_output', '__return_false');
|
67 |
+
$this->saswp_remove_yoast_product_schema();
|
68 |
+
}
|
69 |
+
|
70 |
+
public function saswp_smart_crawl_override(){
|
71 |
+
add_filter('wds-schema-data', '__return_false');
|
72 |
+
}
|
73 |
+
public function saswp_woocommerce_override(){
|
74 |
+
|
75 |
+
if(class_exists('WooCommerce')){
|
76 |
+
|
77 |
+
remove_action( 'wp_footer', array( WC()->structured_data, 'output_structured_data' ), 10 ); // This removes structured data from all frontend pages
|
78 |
+
remove_action( 'woocommerce_email_order_details', array( WC()->structured_data, 'output_email_structured_data' ), 30 ); // This removes structured data from all Emails sent by WooCommerce
|
79 |
+
|
80 |
+
}
|
81 |
+
|
82 |
+
}
|
83 |
+
|
84 |
+
public function saswp_remove_yoast_product_schema(){
|
85 |
+
|
86 |
+
global $wp_filter;
|
87 |
+
|
88 |
+
if(isset($wp_filter['wp_footer'])){
|
89 |
+
|
90 |
+
$callbacks = $wp_filter['wp_footer']->callbacks;
|
91 |
+
|
92 |
+
if(is_array($callbacks)){
|
93 |
+
|
94 |
+
foreach($callbacks as $key=>$actions){
|
95 |
+
|
96 |
+
if(is_array($actions)){
|
97 |
+
|
98 |
+
foreach ($actions as $actualKey => $priorities){
|
99 |
+
|
100 |
+
if(is_array($priorities['function'])){
|
101 |
+
|
102 |
+
if(is_object($priorities['function'][0])){
|
103 |
+
|
104 |
+
if ($priorities['function'][0] instanceof WPSEO_WooCommerce_Schema && $priorities['function'][1] == 'output_schema_footer') {
|
105 |
+
unset($wp_filter['wp_footer']->callbacks[$key][$actualKey]);
|
106 |
+
}
|
107 |
+
|
108 |
+
}
|
109 |
+
|
110 |
+
}
|
111 |
+
|
112 |
+
}
|
113 |
+
|
114 |
+
}
|
115 |
+
|
116 |
+
}
|
117 |
+
|
118 |
+
}
|
119 |
+
|
120 |
+
|
121 |
+
}
|
122 |
+
|
123 |
+
}
|
124 |
+
|
125 |
+
public function saswp_remove_rank_math_schema($entry){
|
126 |
+
return array();
|
127 |
+
}
|
128 |
+
}
|
129 |
+
|
130 |
+
if(class_exists('saswp_output_compatibility')){
|
131 |
+
$obj_compatibility = new saswp_output_compatibility();
|
132 |
+
$obj_compatibility->saswp_service_compatibility_hooks();
|
133 |
+
}
|
output/function.php
CHANGED
@@ -26,19 +26,11 @@ function saswp_schema_markup_hook_on_init() {
|
|
26 |
}else{
|
27 |
add_action('wp_head', 'saswp_schema_markup_output');
|
28 |
add_action( 'amp_post_template_head' , 'saswp_schema_markup_output' );
|
29 |
-
}
|
30 |
-
saswp_remove_yoast_product_schema();
|
31 |
remove_action( 'amp_post_template_head', 'amp_post_template_add_schemaorg_metadata',99,1);
|
32 |
remove_action( 'amp_post_template_footer', 'amp_post_template_add_schemaorg_metadata',99,1);
|
33 |
remove_action('wp_footer', 'orbital_markup_site');
|
34 |
add_action('cooked_amp_head', 'saswp_schema_markup_output');
|
35 |
-
|
36 |
-
if(isset($sd_data['saswp-wppostratings-raring']) && $sd_data['saswp-wppostratings-raring'] == 1){
|
37 |
-
|
38 |
-
add_filter('wp_postratings_schema_itemtype', '__return_false');
|
39 |
-
add_filter('wp_postratings_google_structured_data', '__return_false');
|
40 |
-
|
41 |
-
}
|
42 |
|
43 |
if(isset($sd_data['saswp-microdata-cleanup']) && $sd_data['saswp-microdata-cleanup'] == 1){
|
44 |
ob_start("saswp_remove_microdata");
|
@@ -719,120 +711,6 @@ function saswp_list_items_generator(){
|
|
719 |
return $breadcrumbslist;
|
720 |
}
|
721 |
|
722 |
-
|
723 |
-
/**
|
724 |
-
* Remove the default WooCommerce 3 JSON/LD structured data
|
725 |
-
* @global type $sd_data
|
726 |
-
*/
|
727 |
-
function saswp_remove_woocommerce_default_structured_data() {
|
728 |
-
|
729 |
-
global $sd_data;
|
730 |
-
|
731 |
-
if(isset($sd_data['saswp-woocommerce']) && $sd_data['saswp-woocommerce'] == 1 && class_exists('WooCommerce')){
|
732 |
-
|
733 |
-
remove_action( 'wp_footer', array( WC()->structured_data, 'output_structured_data' ), 10 ); // This removes structured data from all frontend pages
|
734 |
-
remove_action( 'woocommerce_email_order_details', array( WC()->structured_data, 'output_email_structured_data' ), 30 ); // This removes structured data from all Emails sent by WooCommerce
|
735 |
-
|
736 |
-
|
737 |
-
}
|
738 |
-
|
739 |
-
}
|
740 |
-
|
741 |
-
add_action( 'init', 'saswp_remove_woocommerce_default_structured_data' );
|
742 |
-
|
743 |
-
/**
|
744 |
-
* Here, We are removing all the schema generated by yoast plugin.
|
745 |
-
* @param array $data
|
746 |
-
* @return array
|
747 |
-
*/
|
748 |
-
function saswp_remove_yoast_product_schema(){
|
749 |
-
|
750 |
-
global $sd_data;
|
751 |
-
global $wp_filter;
|
752 |
-
|
753 |
-
if(saswp_global_option() && saswp_remove_warnings($sd_data, 'saswp-yoast', 'saswp_string') == 1){
|
754 |
-
|
755 |
-
if(isset($wp_filter['wp_footer'])){
|
756 |
-
|
757 |
-
$callbacks = $wp_filter['wp_footer']->callbacks;
|
758 |
-
|
759 |
-
if(is_array($callbacks)){
|
760 |
-
|
761 |
-
foreach($callbacks as $key=>$actions){
|
762 |
-
|
763 |
-
if(is_array($actions)){
|
764 |
-
|
765 |
-
foreach ($actions as $actualKey => $priorities){
|
766 |
-
|
767 |
-
if(is_array($priorities['function'])){
|
768 |
-
|
769 |
-
if(is_object($priorities['function'][0])){
|
770 |
-
|
771 |
-
if ($priorities['function'][0] instanceof WPSEO_WooCommerce_Schema && $priorities['function'][1] == 'output_schema_footer') {
|
772 |
-
unset($wp_filter['wp_footer']->callbacks[$key][$actualKey]);
|
773 |
-
}
|
774 |
-
|
775 |
-
}
|
776 |
-
|
777 |
-
}
|
778 |
-
|
779 |
-
}
|
780 |
-
|
781 |
-
}
|
782 |
-
|
783 |
-
}
|
784 |
-
|
785 |
-
}
|
786 |
-
|
787 |
-
|
788 |
-
}
|
789 |
-
|
790 |
-
}
|
791 |
-
|
792 |
-
}
|
793 |
-
|
794 |
-
function saswp_remove_yoast_schema($data){
|
795 |
-
|
796 |
-
global $sd_data;
|
797 |
-
|
798 |
-
if(saswp_global_option() && saswp_remove_warnings($sd_data, 'saswp-yoast', 'saswp_string') == 1){
|
799 |
-
|
800 |
-
$data = array();
|
801 |
-
return $data;
|
802 |
-
|
803 |
-
}else{
|
804 |
-
|
805 |
-
return $data;
|
806 |
-
}
|
807 |
-
|
808 |
-
}
|
809 |
-
|
810 |
-
add_filter('wpseo_json_ld_output', 'saswp_remove_yoast_schema', 10, 1);
|
811 |
-
|
812 |
-
|
813 |
-
/**
|
814 |
-
* @since 1.8.6
|
815 |
-
* Here, We are removing json_ld schema generated by seo-by-rank-math.
|
816 |
-
* @param array $entry
|
817 |
-
* @return array
|
818 |
-
*/
|
819 |
-
function saswp_remove_rank_math_schema($entry){
|
820 |
-
|
821 |
-
global $sd_data;
|
822 |
-
|
823 |
-
if(saswp_global_option() && saswp_remove_warnings($sd_data, 'saswp-rankmath', 'saswp_string') == 1){
|
824 |
-
|
825 |
-
$entry = array();
|
826 |
-
return $entry;
|
827 |
-
|
828 |
-
}else{
|
829 |
-
return $entry;
|
830 |
-
}
|
831 |
-
|
832 |
-
}
|
833 |
-
|
834 |
-
add_action( 'rank_math/json_ld', 'saswp_remove_rank_math_schema',99 );
|
835 |
-
|
836 |
/**
|
837 |
* Function to format json output
|
838 |
* @global type $sd_data
|
@@ -844,9 +722,9 @@ function saswp_json_print_format($output_array){
|
|
844 |
global $sd_data;
|
845 |
|
846 |
if(isset($sd_data['saswp-pretty-print']) && $sd_data['saswp-pretty-print'] == 1){
|
847 |
-
return
|
848 |
}else{
|
849 |
-
return
|
850 |
}
|
851 |
|
852 |
}
|
@@ -861,10 +739,10 @@ function saswp_remove_microdata($content){
|
|
861 |
|
862 |
if(saswp_global_option()){
|
863 |
|
864 |
-
$content = preg_replace("/itemscope itemtype=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
|
865 |
-
$content = preg_replace("/itemscope=(\"?)itemscope(\"?) itemtype=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
|
866 |
-
$content = preg_replace("/itemscope=(\"?)itemprop(\"?) itemType=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
|
867 |
-
$content = preg_replace("/itemscope itemprop=\"(.*?)\" itemType=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
|
868 |
$content = preg_replace("/vcard/", "", $content);
|
869 |
$content = preg_replace("/hentry/", "", $content);
|
870 |
}
|
26 |
}else{
|
27 |
add_action('wp_head', 'saswp_schema_markup_output');
|
28 |
add_action( 'amp_post_template_head' , 'saswp_schema_markup_output' );
|
29 |
+
}
|
|
|
30 |
remove_action( 'amp_post_template_head', 'amp_post_template_add_schemaorg_metadata',99,1);
|
31 |
remove_action( 'amp_post_template_footer', 'amp_post_template_add_schemaorg_metadata',99,1);
|
32 |
remove_action('wp_footer', 'orbital_markup_site');
|
33 |
add_action('cooked_amp_head', 'saswp_schema_markup_output');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
if(isset($sd_data['saswp-microdata-cleanup']) && $sd_data['saswp-microdata-cleanup'] == 1){
|
36 |
ob_start("saswp_remove_microdata");
|
711 |
return $breadcrumbslist;
|
712 |
}
|
713 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
714 |
/**
|
715 |
* Function to format json output
|
716 |
* @global type $sd_data
|
722 |
global $sd_data;
|
723 |
|
724 |
if(isset($sd_data['saswp-pretty-print']) && $sd_data['saswp-pretty-print'] == 1){
|
725 |
+
return wp_json_encode($output_array, JSON_PRETTY_PRINT);
|
726 |
}else{
|
727 |
+
return wp_json_encode($output_array);
|
728 |
}
|
729 |
|
730 |
}
|
739 |
|
740 |
if(saswp_global_option()){
|
741 |
|
742 |
+
$content = preg_replace("/itemscope itemtype=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
|
743 |
+
$content = preg_replace("/itemscope=(\"?)itemscope(\"?) itemtype=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
|
744 |
+
$content = preg_replace("/itemscope=(\"?)itemprop(\"?) itemType=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
|
745 |
+
$content = preg_replace("/itemscope itemprop=\"(.*?)\" itemType=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
|
746 |
$content = preg_replace("/vcard/", "", $content);
|
747 |
$content = preg_replace("/hentry/", "", $content);
|
748 |
}
|
output/output.php
CHANGED
@@ -3478,7 +3478,7 @@ function saswp_post_specific_schema_output() {
|
|
3478 |
$business_sub_name = '';
|
3479 |
$business_type = saswp_remove_warnings($all_post_meta, 'saswp_business_type_'.$schema_id, 'saswp_array');
|
3480 |
$post_specific_obj = new saswp_post_specific();
|
3481 |
-
$check_business_type = $post_specific_obj->
|
3482 |
|
3483 |
if(!empty($check_business_type)){
|
3484 |
|
@@ -3709,11 +3709,13 @@ function saswp_kb_website_output(){
|
|
3709 |
if($site_url && $site_name){
|
3710 |
|
3711 |
$input = array(
|
3712 |
-
'@context'
|
3713 |
'@type' => 'WebSite',
|
3714 |
'@id' => $site_url.'#website',
|
|
|
|
|
|
|
3715 |
'url' => $site_url,
|
3716 |
-
'name' => $site_name,
|
3717 |
);
|
3718 |
|
3719 |
if(isset($sd_data['saswp_search_box_schema']) && $sd_data['saswp_search_box_schema'] == 1 || !isset($sd_data['saswp_search_box_schema'])){
|
3478 |
$business_sub_name = '';
|
3479 |
$business_type = saswp_remove_warnings($all_post_meta, 'saswp_business_type_'.$schema_id, 'saswp_array');
|
3480 |
$post_specific_obj = new saswp_post_specific();
|
3481 |
+
$check_business_type = $post_specific_obj->_local_sub_business[$business_type];
|
3482 |
|
3483 |
if(!empty($check_business_type)){
|
3484 |
|
3709 |
if($site_url && $site_name){
|
3710 |
|
3711 |
$input = array(
|
3712 |
+
'@context' => 'http://schema.org',
|
3713 |
'@type' => 'WebSite',
|
3714 |
'@id' => $site_url.'#website',
|
3715 |
+
'headline' => $site_name,
|
3716 |
+
'name' => $site_name,
|
3717 |
+
'description' => get_bloginfo('description'),
|
3718 |
'url' => $site_url,
|
|
|
3719 |
);
|
3720 |
|
3721 |
if(isset($sd_data['saswp_search_box_schema']) && $sd_data['saswp_search_box_schema'] == 1 || !isset($sd_data['saswp_search_box_schema'])){
|
output/service.php
CHANGED
@@ -11,6 +11,22 @@
|
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
12 |
|
13 |
Class saswp_output_service{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
/**
|
15 |
* List of hooks used in current class
|
16 |
*/
|
@@ -19,36 +35,219 @@ Class saswp_output_service{
|
|
19 |
add_action( 'wp_ajax_saswp_get_custom_meta_fields', array($this, 'saswp_get_custom_meta_fields'));
|
20 |
add_action( 'wp_ajax_saswp_get_schema_type_fields', array($this, 'saswp_get_schema_type_fields'));
|
21 |
|
|
|
|
|
22 |
}
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
/**
|
25 |
* This function replaces the value of schema's fields with the selected custom meta field
|
26 |
* @param type $input1
|
27 |
* @param type $schema_post_id
|
28 |
* @return type array
|
29 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
public function saswp_replace_with_custom_fields_value($input1, $schema_post_id){
|
31 |
|
32 |
global $post;
|
33 |
|
34 |
-
$custom_fields = esc_sql ( get_post_meta($schema_post_id, '
|
35 |
-
|
36 |
if(!empty($custom_fields)){
|
37 |
|
38 |
$schema_type = get_post_meta( $schema_post_id, 'schema_type', true);
|
39 |
|
40 |
foreach ($custom_fields as $key => $field){
|
41 |
|
42 |
-
if(is_object($post)){
|
43 |
-
|
44 |
-
$custom_fields[$key] = get_post_meta($post->ID, $field, true);
|
45 |
-
|
46 |
}
|
47 |
|
48 |
}
|
49 |
|
50 |
switch ($schema_type) {
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
case 'local_business':
|
53 |
|
54 |
if(isset($custom_fields['saswp_business_type'])){
|
@@ -59,11 +258,13 @@ Class saswp_output_service{
|
|
59 |
}
|
60 |
if(isset($custom_fields['local_business_name'])){
|
61 |
$input1['name'] = $custom_fields['local_business_name'];
|
62 |
-
}
|
63 |
-
|
64 |
if(isset($custom_fields['local_business_name_url'])){
|
65 |
$input1['url'] = $custom_fields['local_business_name_url'];
|
66 |
}
|
|
|
|
|
|
|
67 |
if(isset($custom_fields['local_business_description'])){
|
68 |
$input1['description'] = $custom_fields['local_business_description'];
|
69 |
}
|
@@ -297,40 +498,7 @@ Class saswp_output_service{
|
|
297 |
}
|
298 |
|
299 |
break;
|
300 |
-
|
301 |
-
case 'Article':
|
302 |
-
|
303 |
-
if(isset($custom_fields['saswp_article_main_entity_of_page'])){
|
304 |
-
$input1['mainEntityOfPage'] = $custom_fields['saswp_article_main_entity_of_page'];
|
305 |
-
}
|
306 |
-
if(isset($custom_fields['saswp_article_image'])){
|
307 |
-
$input1['image'] = $custom_fields['saswp_article_image'];
|
308 |
-
}
|
309 |
-
if(isset($custom_fields['saswp_article_headline'])){
|
310 |
-
$input1['headline'] = $custom_fields['saswp_article_headline'];
|
311 |
-
}
|
312 |
-
|
313 |
-
if(isset($custom_fields['saswp_article_description'])){
|
314 |
-
$input1['description'] = $custom_fields['saswp_article_description'];
|
315 |
-
}
|
316 |
-
if(isset($custom_fields['saswp_article_date_published'])){
|
317 |
-
$input1['datePublished'] = $custom_fields['saswp_article_date_published'];
|
318 |
-
}
|
319 |
-
if(isset($custom_fields['saswp_article_date_modified'])){
|
320 |
-
$input1['dateModified'] = $custom_fields['saswp_article_date_modified'];
|
321 |
-
}
|
322 |
-
|
323 |
-
if(isset($custom_fields['saswp_article_author_name'])){
|
324 |
-
$input1['author']['name'] = $custom_fields['saswp_article_author_name'];
|
325 |
-
}
|
326 |
-
if(isset($custom_fields['saswp_article_organization_name'])){
|
327 |
-
$input1['Publisher']['name'] = $custom_fields['saswp_article_organization_name'];
|
328 |
-
}
|
329 |
-
if(isset($custom_fields['saswp_article_organization_logo'])){
|
330 |
-
$input1['Publisher']['logo']['url'] = $custom_fields['saswp_article_organization_logo'];
|
331 |
-
}
|
332 |
-
break;
|
333 |
-
|
334 |
case 'Event':
|
335 |
|
336 |
if(isset($custom_fields['saswp_event_schema_name'])){
|
@@ -395,6 +563,18 @@ Class saswp_output_service{
|
|
395 |
if(isset($custom_fields['saswp_tech_article_image'])){
|
396 |
$input1['image'] = $custom_fields['saswp_tech_article_image'];
|
397 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
398 |
if(isset($custom_fields['saswp_tech_article_headline'])){
|
399 |
$input1['headline'] = $custom_fields['saswp_tech_article_headline'];
|
400 |
}
|
@@ -795,7 +975,558 @@ Class saswp_output_service{
|
|
795 |
}
|
796 |
|
797 |
break;
|
798 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
799 |
default:
|
800 |
break;
|
801 |
}
|
@@ -820,9 +1551,7 @@ Class saswp_output_service{
|
|
820 |
$schema_type = isset( $_POST['schema_type'] ) ? sanitize_text_field( $_POST['schema_type'] ) : '';
|
821 |
$meta_fields = $this->saswp_get_all_schema_type_fields($schema_type);
|
822 |
|
823 |
-
wp_send_json( $meta_fields );
|
824 |
-
|
825 |
-
wp_die();
|
826 |
}
|
827 |
|
828 |
/**
|
@@ -1211,23 +1940,16 @@ Class saswp_output_service{
|
|
1211 |
}
|
1212 |
return $qa_page;
|
1213 |
}
|
1214 |
-
|
1215 |
/**
|
1216 |
* This function returns all the schema field's key by schema type or id
|
1217 |
* @param type $schema_type
|
1218 |
* @param type $id
|
1219 |
* @return string
|
1220 |
*/
|
1221 |
-
public function saswp_get_all_schema_type_fields($schema_type
|
1222 |
-
|
1223 |
-
$meta_field = array();
|
1224 |
-
|
1225 |
-
if($schema_type == ''){
|
1226 |
-
|
1227 |
-
$schema_type = get_post_meta( $id, 'schema_type', true);
|
1228 |
-
|
1229 |
-
}
|
1230 |
|
|
|
1231 |
switch ($schema_type) {
|
1232 |
|
1233 |
case 'local_business':
|
@@ -1250,7 +1972,15 @@ Class saswp_output_service{
|
|
1250 |
'saswp_dayofweek' => 'Operation Days',
|
1251 |
'local_price_range' => 'Price Range',
|
1252 |
'local_hasmap' => 'HasMap',
|
1253 |
-
'local_menu' => 'Memu',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1254 |
);
|
1255 |
break;
|
1256 |
|
@@ -1260,6 +1990,10 @@ Class saswp_output_service{
|
|
1260 |
|
1261 |
'saswp_blogposting_main_entity_of_page' => 'Main Entity Of Page',
|
1262 |
'saswp_blogposting_headline' => 'Headline',
|
|
|
|
|
|
|
|
|
1263 |
'saswp_blogposting_description' => 'Description',
|
1264 |
'saswp_blogposting_name' => 'Name',
|
1265 |
'saswp_blogposting_url' => 'URL',
|
@@ -1305,7 +2039,7 @@ Class saswp_output_service{
|
|
1305 |
'saswp_webpage_description' => 'Description',
|
1306 |
'saswp_webpage_main_entity_of_page' => 'Main Entity Of Page',
|
1307 |
'saswp_webpage_image' => 'Image',
|
1308 |
-
'saswp_webpage_headline' => 'Headline',
|
1309 |
'saswp_webpage_date_published' => 'Date Published',
|
1310 |
'saswp_webpage_date_modified' => 'Date Modified',
|
1311 |
'saswp_webpage_author_name' => 'Author Name',
|
@@ -1319,8 +2053,12 @@ Class saswp_output_service{
|
|
1319 |
|
1320 |
$meta_field = array(
|
1321 |
'saswp_article_main_entity_of_page' => 'Main Entity Of Page',
|
|
|
1322 |
'saswp_article_image' => 'Image',
|
1323 |
-
'saswp_article_headline' => 'Headline',
|
|
|
|
|
|
|
1324 |
'saswp_article_description' => 'Description',
|
1325 |
'saswp_article_date_published' => 'Date Published',
|
1326 |
'saswp_article_date_modified' => 'Date Modified',
|
@@ -1332,18 +2070,23 @@ Class saswp_output_service{
|
|
1332 |
break;
|
1333 |
|
1334 |
case 'TechArticle':
|
1335 |
-
|
1336 |
-
|
1337 |
'saswp_tech_article_main_entity_of_page' => 'Main Entity Of Page',
|
|
|
1338 |
'saswp_tech_article_image' => 'Image',
|
1339 |
-
'saswp_tech_article_headline' => 'Headline',
|
|
|
|
|
|
|
1340 |
'saswp_tech_article_description' => 'Description',
|
1341 |
'saswp_tech_article_date_published' => 'Date Published',
|
1342 |
'saswp_tech_article_date_modified' => 'Date Modified',
|
1343 |
'saswp_tech_article_author_name' => 'Author Name',
|
1344 |
'saswp_tech_article_organization_name' => 'Organization Name',
|
1345 |
-
'saswp_tech_article_organization_logo' => 'Organization Logo',
|
1346 |
-
|
|
|
1347 |
break;
|
1348 |
|
1349 |
case 'Course':
|
@@ -1355,7 +2098,11 @@ Class saswp_output_service{
|
|
1355 |
'saswp_course_date_published' => 'Date Published',
|
1356 |
'saswp_course_date_modified' => 'Date Modified',
|
1357 |
'saswp_course_provider_name' => 'Provider Name',
|
1358 |
-
'
|
|
|
|
|
|
|
|
|
1359 |
);
|
1360 |
break;
|
1361 |
|
@@ -1372,6 +2119,23 @@ Class saswp_output_service{
|
|
1372 |
|
1373 |
break;
|
1374 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1375 |
case 'Recipe':
|
1376 |
|
1377 |
$meta_field = array(
|
@@ -1408,25 +2172,140 @@ Class saswp_output_service{
|
|
1408 |
|
1409 |
case 'Product':
|
1410 |
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1430 |
break;
|
1431 |
|
1432 |
case 'Service':
|
@@ -1570,10 +2449,129 @@ Class saswp_output_service{
|
|
1570 |
|
1571 |
);
|
1572 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1573 |
|
1574 |
default:
|
1575 |
break;
|
1576 |
-
}
|
1577 |
return $meta_field;
|
1578 |
}
|
1579 |
|
@@ -1837,7 +2835,7 @@ Class saswp_output_service{
|
|
1837 |
|
1838 |
//Get All the images available on post
|
1839 |
|
1840 |
-
$content = get_the_content();
|
1841 |
|
1842 |
if($content){
|
1843 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
12 |
|
13 |
Class saswp_output_service{
|
14 |
+
|
15 |
+
private $_meta_list = null;
|
16 |
+
|
17 |
+
|
18 |
+
public function __construct() {
|
19 |
+
|
20 |
+
if($this->_meta_list == null){
|
21 |
+
|
22 |
+
$mappings_file = SASWP_DIR_NAME . '/core/array-list/meta_list.php';
|
23 |
+
|
24 |
+
if ( file_exists( $mappings_file ) ) {
|
25 |
+
$this->_meta_list = include $mappings_file;
|
26 |
+
}
|
27 |
+
}
|
28 |
+
|
29 |
+
}
|
30 |
/**
|
31 |
* List of hooks used in current class
|
32 |
*/
|
35 |
add_action( 'wp_ajax_saswp_get_custom_meta_fields', array($this, 'saswp_get_custom_meta_fields'));
|
36 |
add_action( 'wp_ajax_saswp_get_schema_type_fields', array($this, 'saswp_get_schema_type_fields'));
|
37 |
|
38 |
+
add_action( 'wp_ajax_saswp_get_meta_list', array($this, 'saswp_get_meta_list'));
|
39 |
+
|
40 |
}
|
41 |
+
|
42 |
+
|
43 |
+
public function saswp_get_meta_list(){
|
44 |
+
|
45 |
+
if ( ! isset( $_GET['saswp_security_nonce'] ) ){
|
46 |
+
return;
|
47 |
+
}
|
48 |
+
if ( !wp_verify_nonce( $_GET['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
|
49 |
+
return;
|
50 |
+
}
|
51 |
+
|
52 |
+
$response = array();
|
53 |
+
$mappings_file = SASWP_DIR_NAME . '/core/array-list/meta_list.php';
|
54 |
+
|
55 |
+
if ( file_exists( $mappings_file ) ) {
|
56 |
+
$response = include $mappings_file;
|
57 |
+
}
|
58 |
+
|
59 |
+
wp_send_json( $response);
|
60 |
+
|
61 |
+
}
|
62 |
/**
|
63 |
* This function replaces the value of schema's fields with the selected custom meta field
|
64 |
* @param type $input1
|
65 |
* @param type $schema_post_id
|
66 |
* @return type array
|
67 |
*/
|
68 |
+
|
69 |
+
public function saswp_get_meta_list_value($key, $field, $schema_post_id){
|
70 |
+
|
71 |
+
$fixed_text = esc_sql ( get_post_meta($schema_post_id, 'saswp_fixed_text', true) );
|
72 |
+
$cus_field = esc_sql ( get_post_meta($schema_post_id, 'saswp_custom_meta_field', true) );
|
73 |
+
|
74 |
+
$response = null;
|
75 |
+
|
76 |
+
switch ($field) {
|
77 |
+
case 'blogname':
|
78 |
+
$response = get_bloginfo();
|
79 |
+
break;
|
80 |
+
case 'blogdescription':
|
81 |
+
$response = get_bloginfo('description');
|
82 |
+
break;
|
83 |
+
case 'site_url':
|
84 |
+
$response = get_site_url();
|
85 |
+
break;
|
86 |
+
case 'post_title':
|
87 |
+
$response = saswp_get_the_title();
|
88 |
+
break;
|
89 |
+
case 'post_content':
|
90 |
+
$response = saswp_get_the_content();
|
91 |
+
break;
|
92 |
+
case 'post_excerpt':
|
93 |
+
$response = saswp_get_the_excerpt();
|
94 |
+
break;
|
95 |
+
case 'post_permalink':
|
96 |
+
$response = get_permalink();
|
97 |
+
break;
|
98 |
+
case 'author_name':
|
99 |
+
$response = get_the_author_meta('first_name').' '.get_the_author_meta('last_name');
|
100 |
+
break;
|
101 |
+
case 'author_first_name':
|
102 |
+
$response = get_the_author_meta('first_name');
|
103 |
+
break;
|
104 |
+
case 'author_last_name':
|
105 |
+
$response = get_the_author_meta('last_name');
|
106 |
+
break;
|
107 |
+
case 'post_date':
|
108 |
+
$response = get_the_date("Y-m-d\TH:i:s\Z");
|
109 |
+
break;
|
110 |
+
case 'post_modified':
|
111 |
+
$response = get_the_modified_date("Y-m-d\TH:i:s\Z");
|
112 |
+
break;
|
113 |
+
case 'manual_text':
|
114 |
+
|
115 |
+
if(isset($fixed_text[$key])){
|
116 |
+
|
117 |
+
if (strpos($fixed_text[$key], 'http') !== false) {
|
118 |
+
|
119 |
+
$image_details = @getimagesize($fixed_text[$key]);
|
120 |
+
|
121 |
+
if(is_array($image_details)){
|
122 |
+
$response['@type'] = 'ImageObject';
|
123 |
+
$response['url'] = $fixed_text[$key];
|
124 |
+
$response['width'] = $image_details[0];
|
125 |
+
$response['height'] = $image_details[1];
|
126 |
+
}
|
127 |
+
|
128 |
+
}else{
|
129 |
+
$response = $fixed_text[$key];
|
130 |
+
}
|
131 |
+
|
132 |
+
}
|
133 |
+
|
134 |
+
break;
|
135 |
+
case 'custom_field':
|
136 |
+
$response = esc_sql ( get_post_meta($schema_post_id, $cus_field[$key], true) );
|
137 |
+
break;
|
138 |
+
case 'featured_img':
|
139 |
+
$image_id = get_post_thumbnail_id();
|
140 |
+
$image_details = wp_get_attachment_image_src($image_id, 'full');
|
141 |
+
$response['@type'] = 'ImageObject';
|
142 |
+
$response['url'] = $image_details[0];
|
143 |
+
$response['width'] = $image_details[1];
|
144 |
+
$response['height'] = $image_details[2];
|
145 |
+
|
146 |
+
break;
|
147 |
+
case 'author_image':
|
148 |
+
$author_id = get_the_author_meta('ID');
|
149 |
+
$author_image = get_avatar_data($author_id);
|
150 |
+
$response['@type'] = 'ImageObject';
|
151 |
+
$response['url'] = $author_image['url'];
|
152 |
+
$response['width'] = $author_image['height'];
|
153 |
+
$response['height'] = $author_image['width'];
|
154 |
+
|
155 |
+
break;
|
156 |
+
case 'site_logo':
|
157 |
+
|
158 |
+
$sizes = array(
|
159 |
+
'width' => 600,
|
160 |
+
'height' => 60,
|
161 |
+
'crop' => false,
|
162 |
+
);
|
163 |
+
|
164 |
+
$custom_logo_id = get_theme_mod( 'custom_logo' );
|
165 |
+
|
166 |
+
if($custom_logo_id){
|
167 |
+
|
168 |
+
$custom_logo = wp_get_attachment_image_src( $custom_logo_id, $sizes);
|
169 |
+
|
170 |
+
}
|
171 |
+
|
172 |
+
if(isset($custom_logo) && is_array($custom_logo)){
|
173 |
+
|
174 |
+
$response['@type'] = 'ImageObject';
|
175 |
+
$response['url'] = array_key_exists(0, $custom_logo)? $custom_logo[0]:'';
|
176 |
+
$response['width'] = array_key_exists(2, $custom_logo)? $custom_logo[2]:'';
|
177 |
+
$response['height'] = array_key_exists(1, $custom_logo)? $custom_logo[1]:'';
|
178 |
+
|
179 |
+
}
|
180 |
+
|
181 |
+
default:
|
182 |
+
break;
|
183 |
+
}
|
184 |
+
|
185 |
+
return $response;
|
186 |
+
|
187 |
+
}
|
188 |
public function saswp_replace_with_custom_fields_value($input1, $schema_post_id){
|
189 |
|
190 |
global $post;
|
191 |
|
192 |
+
$custom_fields = esc_sql ( get_post_meta($schema_post_id, 'saswp_meta_list_val', true) );
|
193 |
+
|
194 |
if(!empty($custom_fields)){
|
195 |
|
196 |
$schema_type = get_post_meta( $schema_post_id, 'schema_type', true);
|
197 |
|
198 |
foreach ($custom_fields as $key => $field){
|
199 |
|
200 |
+
if(is_object($post)){
|
201 |
+
$custom_fields[$key] = $this->saswp_get_meta_list_value($key, $field, $schema_post_id);
|
|
|
|
|
202 |
}
|
203 |
|
204 |
}
|
205 |
|
206 |
switch ($schema_type) {
|
207 |
|
208 |
+
case 'Article':
|
209 |
+
|
210 |
+
if(isset($custom_fields['saswp_article_main_entity_of_page'])){
|
211 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_article_main_entity_of_page'];
|
212 |
+
}
|
213 |
+
if(isset($custom_fields['saswp_article_image'])){
|
214 |
+
$input1['image'] = $custom_fields['saswp_article_image'];
|
215 |
+
}
|
216 |
+
if(isset($custom_fields['saswp_article_url'])){
|
217 |
+
$input1['url'] = $custom_fields['saswp_article_url'];
|
218 |
+
}
|
219 |
+
if(isset($custom_fields['saswp_article_body'])){
|
220 |
+
$input1['articleBody'] = $custom_fields['saswp_article_body'];
|
221 |
+
}
|
222 |
+
if(isset($custom_fields['saswp_article_keywords'])){
|
223 |
+
$input1['keywords'] = $custom_fields['saswp_article_keywords'];
|
224 |
+
}
|
225 |
+
if(isset($custom_fields['saswp_article_section'])){
|
226 |
+
$input1['articleSection'] = $custom_fields['saswp_article_section'];
|
227 |
+
}
|
228 |
+
if(isset($custom_fields['saswp_article_headline'])){
|
229 |
+
$input1['headline'] = $custom_fields['saswp_article_headline'];
|
230 |
+
}
|
231 |
+
if(isset($custom_fields['saswp_article_description'])){
|
232 |
+
$input1['description'] = $custom_fields['saswp_article_description'];
|
233 |
+
}
|
234 |
+
if(isset($custom_fields['saswp_article_date_published'])){
|
235 |
+
$input1['datePublished'] = $custom_fields['saswp_article_date_published'];
|
236 |
+
}
|
237 |
+
if(isset($custom_fields['saswp_article_date_modified'])){
|
238 |
+
$input1['dateModified'] = $custom_fields['saswp_article_date_modified'];
|
239 |
+
}
|
240 |
+
if(isset($custom_fields['saswp_article_author_name'])){
|
241 |
+
$input1['author']['name'] = $custom_fields['saswp_article_author_name'];
|
242 |
+
}
|
243 |
+
if(isset($custom_fields['saswp_article_organization_name'])){
|
244 |
+
$input1['Publisher']['name'] = $custom_fields['saswp_article_organization_name'];
|
245 |
+
}
|
246 |
+
if(isset($custom_fields['saswp_article_organization_logo'])){
|
247 |
+
$input1['Publisher']['logo']['url'] = $custom_fields['saswp_article_organization_logo'];
|
248 |
+
}
|
249 |
+
break;
|
250 |
+
|
251 |
case 'local_business':
|
252 |
|
253 |
if(isset($custom_fields['saswp_business_type'])){
|
258 |
}
|
259 |
if(isset($custom_fields['local_business_name'])){
|
260 |
$input1['name'] = $custom_fields['local_business_name'];
|
261 |
+
}
|
|
|
262 |
if(isset($custom_fields['local_business_name_url'])){
|
263 |
$input1['url'] = $custom_fields['local_business_name_url'];
|
264 |
}
|
265 |
+
if(isset($custom_fields['local_business_logo'])){
|
266 |
+
$input1['image'] = $custom_fields['local_business_logo'];
|
267 |
+
}
|
268 |
if(isset($custom_fields['local_business_description'])){
|
269 |
$input1['description'] = $custom_fields['local_business_description'];
|
270 |
}
|
498 |
}
|
499 |
|
500 |
break;
|
501 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
502 |
case 'Event':
|
503 |
|
504 |
if(isset($custom_fields['saswp_event_schema_name'])){
|
563 |
if(isset($custom_fields['saswp_tech_article_image'])){
|
564 |
$input1['image'] = $custom_fields['saswp_tech_article_image'];
|
565 |
}
|
566 |
+
if(isset($custom_fields['saswp_tech_article_url'])){
|
567 |
+
$input1['url'] = $custom_fields['saswp_tech_article_url'];
|
568 |
+
}
|
569 |
+
if(isset($custom_fields['saswp_tech_article_body'])){
|
570 |
+
$input1['articleBody'] = $custom_fields['saswp_tech_article_body'];
|
571 |
+
}
|
572 |
+
if(isset($custom_fields['saswp_tech_article_keywords'])){
|
573 |
+
$input1['keywords'] = $custom_fields['saswp_tech_article_keywords'];
|
574 |
+
}
|
575 |
+
if(isset($custom_fields['saswp_tech_article_section'])){
|
576 |
+
$input1['articleSection'] = $custom_fields['saswp_tech_article_section'];
|
577 |
+
}
|
578 |
if(isset($custom_fields['saswp_tech_article_headline'])){
|
579 |
$input1['headline'] = $custom_fields['saswp_tech_article_headline'];
|
580 |
}
|
975 |
}
|
976 |
|
977 |
break;
|
978 |
+
|
979 |
+
case 'TVSeries':
|
980 |
+
|
981 |
+
if(isset($custom_fields['saswp_tvseries_schema_name'])){
|
982 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_tvseries_schema_name'];
|
983 |
+
}
|
984 |
+
if(isset($custom_fields['saswp_tvseries_schema_description'])){
|
985 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_tvseries_schema_description'];
|
986 |
+
}
|
987 |
+
if(isset($custom_fields['saswp_tvseries_schema_image'])){
|
988 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_tvseries_schema_image'];
|
989 |
+
}
|
990 |
+
if(isset($custom_fields['saswp_tvseries_schema_author_name'])){
|
991 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_tvseries_schema_author_name'];
|
992 |
+
}
|
993 |
+
|
994 |
+
break;
|
995 |
+
|
996 |
+
case 'TouristAttraction':
|
997 |
+
|
998 |
+
if(isset($custom_fields['saswp_ta_schema_name'])){
|
999 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_ta_schema_name'];
|
1000 |
+
}
|
1001 |
+
if(isset($custom_fields['saswp_ta_schema_description'])){
|
1002 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_ta_schema_description'];
|
1003 |
+
}
|
1004 |
+
if(isset($custom_fields['saswp_ta_schema_image'])){
|
1005 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_ta_schema_image'];
|
1006 |
+
}
|
1007 |
+
if(isset($custom_fields['saswp_ta_schema_url'])){
|
1008 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_ta_schema_url'];
|
1009 |
+
}
|
1010 |
+
if(isset($custom_fields['saswp_ta_schema_is_acceesible_free'])){
|
1011 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_ta_schema_is_acceesible_free'];
|
1012 |
+
}
|
1013 |
+
if(isset($custom_fields['saswp_ta_schema_locality'])){
|
1014 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_ta_schema_locality'];
|
1015 |
+
}
|
1016 |
+
if(isset($custom_fields['saswp_ta_schema_region'])){
|
1017 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_ta_schema_region'];
|
1018 |
+
}
|
1019 |
+
if(isset($custom_fields['saswp_ta_schema_country'])){
|
1020 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_ta_schema_country'];
|
1021 |
+
}
|
1022 |
+
if(isset($custom_fields['saswp_ta_schema_postal_code'])){
|
1023 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_ta_schema_postal_code'];
|
1024 |
+
}
|
1025 |
+
|
1026 |
+
break;
|
1027 |
+
|
1028 |
+
case 'FAQ':
|
1029 |
+
|
1030 |
+
break;
|
1031 |
+
|
1032 |
+
case 'TouristDestination':
|
1033 |
+
|
1034 |
+
if(isset($custom_fields['saswp_td_schema_name'])){
|
1035 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_td_schema_name'];
|
1036 |
+
}
|
1037 |
+
if(isset($custom_fields['saswp_td_schema_description'])){
|
1038 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_td_schema_description'];
|
1039 |
+
}
|
1040 |
+
if(isset($custom_fields['saswp_td_schema_image'])){
|
1041 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_td_schema_image'];
|
1042 |
+
}
|
1043 |
+
if(isset($custom_fields['saswp_td_schema_url'])){
|
1044 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_td_schema_url'];
|
1045 |
+
}
|
1046 |
+
if(isset($custom_fields['saswp_td_schema_locality'])){
|
1047 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_td_schema_locality'];
|
1048 |
+
}
|
1049 |
+
if(isset($custom_fields['saswp_td_schema_region'])){
|
1050 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_td_schema_region'];
|
1051 |
+
}
|
1052 |
+
if(isset($custom_fields['saswp_td_schema_country'])){
|
1053 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_td_schema_country'];
|
1054 |
+
}
|
1055 |
+
if(isset($custom_fields['saswp_td_schema_postal_code'])){
|
1056 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_td_schema_postal_code'];
|
1057 |
+
}
|
1058 |
+
|
1059 |
+
break;
|
1060 |
+
|
1061 |
+
case 'LandmarksOrHistoricalBuildings':
|
1062 |
+
|
1063 |
+
if(isset($custom_fields['saswp_lorh_schema_name'])){
|
1064 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_lorh_schema_name'];
|
1065 |
+
}
|
1066 |
+
if(isset($custom_fields['saswp_lorh_schema_description'])){
|
1067 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_lorh_schema_description'];
|
1068 |
+
}
|
1069 |
+
if(isset($custom_fields['saswp_lorh_schema_image'])){
|
1070 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_lorh_schema_image'];
|
1071 |
+
}
|
1072 |
+
if(isset($custom_fields['saswp_lorh_schema_url'])){
|
1073 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_lorh_schema_url'];
|
1074 |
+
}
|
1075 |
+
if(isset($custom_fields['saswp_lorh_schema_hasmap'])){
|
1076 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_lorh_schema_hasmap'];
|
1077 |
+
}
|
1078 |
+
if(isset($custom_fields['saswp_lorh_schema_is_acceesible_free'])){
|
1079 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_lorh_schema_is_acceesible_free'];
|
1080 |
+
}
|
1081 |
+
if(isset($custom_fields['saswp_lorh_schema_maximum_a_capacity'])){
|
1082 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_lorh_schema_maximum_a_capacity'];
|
1083 |
+
}
|
1084 |
+
if(isset($custom_fields['saswp_lorh_schema_locality'])){
|
1085 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_lorh_schema_locality'];
|
1086 |
+
}
|
1087 |
+
if(isset($custom_fields['saswp_lorh_schema_region'])){
|
1088 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_lorh_schema_region'];
|
1089 |
+
}
|
1090 |
+
if(isset($custom_fields['saswp_lorh_schema_country'])){
|
1091 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_lorh_schema_country'];
|
1092 |
+
}
|
1093 |
+
if(isset($custom_fields['saswp_lorh_schema_postal_code'])){
|
1094 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_lorh_schema_postal_code'];
|
1095 |
+
}
|
1096 |
+
|
1097 |
+
break;
|
1098 |
+
|
1099 |
+
case 'HinduTemple':
|
1100 |
+
|
1101 |
+
if(isset($custom_fields['saswp_hindutemple_schema_name'])){
|
1102 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_hindutemple_schema_name'];
|
1103 |
+
}
|
1104 |
+
if(isset($custom_fields['saswp_hindutemple_schema_description'])){
|
1105 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_hindutemple_schema_description'];
|
1106 |
+
}
|
1107 |
+
if(isset($custom_fields['saswp_hindutemple_schema_image'])){
|
1108 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_hindutemple_schema_image'];
|
1109 |
+
}
|
1110 |
+
if(isset($custom_fields['saswp_hindutemple_schema_url'])){
|
1111 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_hindutemple_schema_url'];
|
1112 |
+
}
|
1113 |
+
if(isset($custom_fields['saswp_hindutemple_schema_hasmap'])){
|
1114 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_hindutemple_schema_hasmap'];
|
1115 |
+
}
|
1116 |
+
if(isset($custom_fields['saswp_hindutemple_schema_is_accesible_free'])){
|
1117 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_hindutemple_schema_is_accesible_free'];
|
1118 |
+
}
|
1119 |
+
if(isset($custom_fields['saswp_hindutemple_schema_maximum_a_capacity'])){
|
1120 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_hindutemple_schema_maximum_a_capacity'];
|
1121 |
+
}
|
1122 |
+
if(isset($custom_fields['saswp_hindutemple_schema_locality'])){
|
1123 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_hindutemple_schema_locality'];
|
1124 |
+
}
|
1125 |
+
if(isset($custom_fields['saswp_hindutemple_schema_region'])){
|
1126 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_hindutemple_schema_region'];
|
1127 |
+
}
|
1128 |
+
if(isset($custom_fields['saswp_hindutemple_schema_country'])){
|
1129 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_hindutemple_schema_country'];
|
1130 |
+
}
|
1131 |
+
if(isset($custom_fields['saswp_hindutemple_schema_postal_code'])){
|
1132 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_hindutemple_schema_postal_code'];
|
1133 |
+
}
|
1134 |
+
|
1135 |
+
break;
|
1136 |
+
|
1137 |
+
case 'Church':
|
1138 |
+
|
1139 |
+
if(isset($custom_fields['saswp_church_schema_name'])){
|
1140 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_church_schema_name'];
|
1141 |
+
}
|
1142 |
+
if(isset($custom_fields['saswp_church_schema_description'])){
|
1143 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_church_schema_description'];
|
1144 |
+
}
|
1145 |
+
if(isset($custom_fields['saswp_church_schema_image'])){
|
1146 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_church_schema_image'];
|
1147 |
+
}
|
1148 |
+
if(isset($custom_fields['saswp_church_schema_url'])){
|
1149 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_church_schema_url'];
|
1150 |
+
}
|
1151 |
+
if(isset($custom_fields['saswp_church_schema_hasmap'])){
|
1152 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_church_schema_hasmap'];
|
1153 |
+
}
|
1154 |
+
if(isset($custom_fields['saswp_church_schema_is_accesible_free'])){
|
1155 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_church_schema_is_accesible_free'];
|
1156 |
+
}
|
1157 |
+
if(isset($custom_fields['saswp_church_schema_maximum_a_capacity'])){
|
1158 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_church_schema_maximum_a_capacity'];
|
1159 |
+
}
|
1160 |
+
if(isset($custom_fields['saswp_church_schema_locality'])){
|
1161 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_church_schema_locality'];
|
1162 |
+
}
|
1163 |
+
if(isset($custom_fields['saswp_church_schema_region'])){
|
1164 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_church_schema_region'];
|
1165 |
+
}
|
1166 |
+
if(isset($custom_fields['saswp_church_schema_country'])){
|
1167 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_church_schema_country'];
|
1168 |
+
}
|
1169 |
+
if(isset($custom_fields['saswp_church_schema_postal_code'])){
|
1170 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_church_schema_postal_code'];
|
1171 |
+
}
|
1172 |
+
|
1173 |
+
break;
|
1174 |
+
|
1175 |
+
case 'Mosque':
|
1176 |
+
|
1177 |
+
if(isset($custom_fields['saswp_mosque_schema_name'])){
|
1178 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_mosque_schema_name'];
|
1179 |
+
}
|
1180 |
+
if(isset($custom_fields['saswp_mosque_schema_description'])){
|
1181 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_mosque_schema_description'];
|
1182 |
+
}
|
1183 |
+
if(isset($custom_fields['saswp_mosque_schema_image'])){
|
1184 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_mosque_schema_image'];
|
1185 |
+
}
|
1186 |
+
if(isset($custom_fields['saswp_mosque_schema_url'])){
|
1187 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_mosque_schema_url'];
|
1188 |
+
}
|
1189 |
+
if(isset($custom_fields['saswp_mosque_schema_hasmap'])){
|
1190 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_mosque_schema_hasmap'];
|
1191 |
+
}
|
1192 |
+
if(isset($custom_fields['saswp_mosque_schema_is_accesible_free'])){
|
1193 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_mosque_schema_is_accesible_free'];
|
1194 |
+
}
|
1195 |
+
if(isset($custom_fields['saswp_mosque_schema_maximum_a_capacity'])){
|
1196 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_mosque_schema_maximum_a_capacity'];
|
1197 |
+
}
|
1198 |
+
if(isset($custom_fields['saswp_mosque_schema_locality'])){
|
1199 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_mosque_schema_locality'];
|
1200 |
+
}
|
1201 |
+
if(isset($custom_fields['saswp_mosque_schema_region'])){
|
1202 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_mosque_schema_region'];
|
1203 |
+
}
|
1204 |
+
if(isset($custom_fields['saswp_mosque_schema_country'])){
|
1205 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_mosque_schema_country'];
|
1206 |
+
}
|
1207 |
+
if(isset($custom_fields['saswp_mosque_schema_postal_code'])){
|
1208 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_mosque_schema_postal_code'];
|
1209 |
+
}
|
1210 |
+
|
1211 |
+
break;
|
1212 |
+
|
1213 |
+
case 'Person':
|
1214 |
+
|
1215 |
+
if(isset($custom_fields['saswp_person_schema_name'])){
|
1216 |
+
$input1['name'] = $custom_fields['saswp_person_schema_name'];
|
1217 |
+
}
|
1218 |
+
if(isset($custom_fields['saswp_person_schema_description'])){
|
1219 |
+
$input1['description'] = $custom_fields['saswp_person_schema_description'];
|
1220 |
+
}
|
1221 |
+
if(isset($custom_fields['saswp_person_schema_url'])){
|
1222 |
+
$input1['url'] = $custom_fields['saswp_person_schema_url'];
|
1223 |
+
}
|
1224 |
+
if(isset($custom_fields['saswp_person_schema_street_address'])){
|
1225 |
+
$input1['address']['streetAddress'] = $custom_fields['saswp_person_schema_street_address'];
|
1226 |
+
}
|
1227 |
+
if(isset($custom_fields['saswp_person_schema_locality'])){
|
1228 |
+
$input1['address']['addressLocality'] = $custom_fields['saswp_person_schema_locality'];
|
1229 |
+
}
|
1230 |
+
if(isset($custom_fields['saswp_person_schema_region'])){
|
1231 |
+
$input1['address']['addressRegion'] = $custom_fields['saswp_person_schema_region'];
|
1232 |
+
}
|
1233 |
+
if(isset($custom_fields['saswp_person_schema_postal_code'])){
|
1234 |
+
$input1['address']['PostalCode'] = $custom_fields['saswp_person_schema_postal_code'];
|
1235 |
+
}
|
1236 |
+
if(isset($custom_fields['saswp_person_schema_country'])){
|
1237 |
+
$input1['address']['addressCountry'] = $custom_fields['saswp_person_schema_country'];
|
1238 |
+
}
|
1239 |
+
if(isset($custom_fields['saswp_person_schema_email'])){
|
1240 |
+
$input1['email'] = $custom_fields['saswp_person_schema_email'];
|
1241 |
+
}
|
1242 |
+
if(isset($custom_fields['saswp_person_schema_telephone'])){
|
1243 |
+
$input1['telephone'] = $custom_fields['saswp_person_schema_telephone'];
|
1244 |
+
}
|
1245 |
+
if(isset($custom_fields['saswp_person_schema_gender'])){
|
1246 |
+
$input1['gender'] = $custom_fields['saswp_person_schema_gender'];
|
1247 |
+
}
|
1248 |
+
if(isset($custom_fields['saswp_person_schema_date_of_birth'])){
|
1249 |
+
$input1['birthDate'] = $custom_fields['saswp_person_schema_date_of_birth'];
|
1250 |
+
}
|
1251 |
+
|
1252 |
+
if(isset($custom_fields['saswp_person_schema_nationality'])){
|
1253 |
+
$input1['nationality'] = $custom_fields['saswp_person_schema_nationality'];
|
1254 |
+
}
|
1255 |
+
if(isset($custom_fields['saswp_person_schema_image'])){
|
1256 |
+
$input1['image'] = $custom_fields['saswp_person_schema_image'];
|
1257 |
+
}
|
1258 |
+
if(isset($custom_fields['saswp_person_schema_job_title'])){
|
1259 |
+
$input1['jobTitle'] = $custom_fields['saswp_person_schema_job_title'];
|
1260 |
+
}
|
1261 |
+
|
1262 |
+
break;
|
1263 |
+
|
1264 |
+
case 'Apartment':
|
1265 |
+
|
1266 |
+
if(isset($custom_fields['saswp_apartment_schema_name'])){
|
1267 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_apartment_schema_name'];
|
1268 |
+
}
|
1269 |
+
if(isset($custom_fields['saswp_apartment_schema_url'])){
|
1270 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_apartment_schema_url'];
|
1271 |
+
}
|
1272 |
+
if(isset($custom_fields['saswp_apartment_schema_image'])){
|
1273 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_apartment_schema_image'];
|
1274 |
+
}
|
1275 |
+
if(isset($custom_fields['saswp_apartment_schema_description'])){
|
1276 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_apartment_schema_description'];
|
1277 |
+
}
|
1278 |
+
if(isset($custom_fields['saswp_apartment_schema_numberofrooms'])){
|
1279 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_apartment_schema_numberofrooms'];
|
1280 |
+
}
|
1281 |
+
if(isset($custom_fields['saswp_apartment_schema_country'])){
|
1282 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_apartment_schema_country'];
|
1283 |
+
}
|
1284 |
+
if(isset($custom_fields['saswp_apartment_schema_locality'])){
|
1285 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_apartment_schema_locality'];
|
1286 |
+
}
|
1287 |
+
if(isset($custom_fields['saswp_apartment_schema_region'])){
|
1288 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_apartment_schema_region'];
|
1289 |
+
}
|
1290 |
+
if(isset($custom_fields['saswp_apartment_schema_postalcode'])){
|
1291 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_apartment_schema_postalcode'];
|
1292 |
+
}
|
1293 |
+
if(isset($custom_fields['saswp_apartment_schema_telephone'])){
|
1294 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_apartment_schema_telephone'];
|
1295 |
+
}
|
1296 |
+
|
1297 |
+
break;
|
1298 |
+
|
1299 |
+
case 'House':
|
1300 |
+
|
1301 |
+
if(isset($custom_fields['saswp_house_schema_name'])){
|
1302 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_house_schema_name'];
|
1303 |
+
}
|
1304 |
+
if(isset($custom_fields['saswp_house_schema_url'])){
|
1305 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_house_schema_url'];
|
1306 |
+
}
|
1307 |
+
if(isset($custom_fields['saswp_house_schema_image'])){
|
1308 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_house_schema_image'];
|
1309 |
+
}
|
1310 |
+
if(isset($custom_fields['saswp_house_schema_description'])){
|
1311 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_house_schema_description'];
|
1312 |
+
}
|
1313 |
+
if(isset($custom_fields['saswp_house_schema_pets_allowed'])){
|
1314 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_house_schema_pets_allowed'];
|
1315 |
+
}
|
1316 |
+
if(isset($custom_fields['saswp_house_schema_country'])){
|
1317 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_house_schema_country'];
|
1318 |
+
}
|
1319 |
+
if(isset($custom_fields['saswp_house_schema_locality'])){
|
1320 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_house_schema_locality'];
|
1321 |
+
}
|
1322 |
+
if(isset($custom_fields['saswp_house_schema_region'])){
|
1323 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_house_schema_region'];
|
1324 |
+
}
|
1325 |
+
if(isset($custom_fields['saswp_house_schema_postalcode'])){
|
1326 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_house_schema_postalcode'];
|
1327 |
+
}
|
1328 |
+
if(isset($custom_fields['saswp_house_schema_telephone'])){
|
1329 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_house_schema_telephone'];
|
1330 |
+
}
|
1331 |
+
|
1332 |
+
break;
|
1333 |
+
|
1334 |
+
case 'SingleFamilyResidence':
|
1335 |
+
|
1336 |
+
if(isset($custom_fields['saswp_sfr_schema_name'])){
|
1337 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_sfr_schema_name'];
|
1338 |
+
}
|
1339 |
+
if(isset($custom_fields['saswp_sfr_schema_url'])){
|
1340 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_sfr_schema_url'];
|
1341 |
+
}
|
1342 |
+
if(isset($custom_fields['saswp_sfr_schema_image'])){
|
1343 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_sfr_schema_image'];
|
1344 |
+
}
|
1345 |
+
if(isset($custom_fields['saswp_sfr_schema_description'])){
|
1346 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_sfr_schema_description'];
|
1347 |
+
}
|
1348 |
+
if(isset($custom_fields['saswp_sfr_schema_numberofrooms'])){
|
1349 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_sfr_schema_numberofrooms'];
|
1350 |
+
}
|
1351 |
+
if(isset($custom_fields['saswp_sfr_schema_pets_allowed'])){
|
1352 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_sfr_schema_pets_allowed'];
|
1353 |
+
}
|
1354 |
+
if(isset($custom_fields['saswp_sfr_schema_country'])){
|
1355 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_sfr_schema_country'];
|
1356 |
+
}
|
1357 |
+
if(isset($custom_fields['saswp_sfr_schema_locality'])){
|
1358 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_sfr_schema_locality'];
|
1359 |
+
}
|
1360 |
+
if(isset($custom_fields['saswp_sfr_schema_region'])){
|
1361 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_sfr_schema_region'];
|
1362 |
+
}
|
1363 |
+
if(isset($custom_fields['saswp_sfr_schema_postalcode'])){
|
1364 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_sfr_schema_postalcode'];
|
1365 |
+
}
|
1366 |
+
if(isset($custom_fields['saswp_sfr_schema_telephone'])){
|
1367 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_sfr_schema_telephone'];
|
1368 |
+
}
|
1369 |
+
|
1370 |
+
break;
|
1371 |
+
|
1372 |
+
case 'VideoGame':
|
1373 |
+
|
1374 |
+
if(isset($custom_fields['saswp_vg_schema_name'])){
|
1375 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_name'];
|
1376 |
+
}
|
1377 |
+
if(isset($custom_fields['saswp_vg_schema_url'])){
|
1378 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_url'];
|
1379 |
+
}
|
1380 |
+
if(isset($custom_fields['saswp_vg_schema_image'])){
|
1381 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_image'];
|
1382 |
+
}
|
1383 |
+
if(isset($custom_fields['saswp_vg_schema_description'])){
|
1384 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_description'];
|
1385 |
+
}
|
1386 |
+
if(isset($custom_fields['saswp_vg_schema_operating_system'])){
|
1387 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_operating_system'];
|
1388 |
+
}
|
1389 |
+
if(isset($custom_fields['saswp_vg_schema_application_category'])){
|
1390 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_application_category'];
|
1391 |
+
}
|
1392 |
+
if(isset($custom_fields['saswp_vg_schema_author_name'])){
|
1393 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_author_name'];
|
1394 |
+
}
|
1395 |
+
if(isset($custom_fields['saswp_vg_schema_price'])){
|
1396 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_price'];
|
1397 |
+
}
|
1398 |
+
if(isset($custom_fields['saswp_vg_schema_price_currency'])){
|
1399 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_price_currency'];
|
1400 |
+
}
|
1401 |
+
if(isset($custom_fields['saswp_vg_schema_price_availability'])){
|
1402 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_price_availability'];
|
1403 |
+
}
|
1404 |
+
if(isset($custom_fields['saswp_vg_schema_publisher'])){
|
1405 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_publisher'];
|
1406 |
+
}
|
1407 |
+
if(isset($custom_fields['saswp_vg_schema_genre'])){
|
1408 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_genre'];
|
1409 |
+
}
|
1410 |
+
if(isset($custom_fields['saswp_vg_schema_processor_requirements'])){
|
1411 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_processor_requirements'];
|
1412 |
+
}
|
1413 |
+
if(isset($custom_fields['saswp_vg_schema_memory_requirements'])){
|
1414 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_memory_requirements'];
|
1415 |
+
}
|
1416 |
+
if(isset($custom_fields['saswp_vg_schema_storage_requirements'])){
|
1417 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_storage_requirements'];
|
1418 |
+
}
|
1419 |
+
if(isset($custom_fields['saswp_vg_schema_game_platform'])){
|
1420 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_game_platform'];
|
1421 |
+
}
|
1422 |
+
if(isset($custom_fields['saswp_vg_schema_cheat_code'])){
|
1423 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_vg_schema_cheat_code'];
|
1424 |
+
}
|
1425 |
+
|
1426 |
+
break;
|
1427 |
+
|
1428 |
+
case 'JobPosting':
|
1429 |
+
|
1430 |
+
if(isset($custom_fields['saswp_jobposting_schema_title'])){
|
1431 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_title'];
|
1432 |
+
}
|
1433 |
+
if(isset($custom_fields['saswp_jobposting_schema_description'])){
|
1434 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_description'];
|
1435 |
+
}
|
1436 |
+
if(isset($custom_fields['saswp_jobposting_schema_url'])){
|
1437 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_url'];
|
1438 |
+
}
|
1439 |
+
if(isset($custom_fields['saswp_jobposting_schema_dateposted'])){
|
1440 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_dateposted'];
|
1441 |
+
}
|
1442 |
+
if(isset($custom_fields['saswp_jobposting_schema_validthrough'])){
|
1443 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_validthrough'];
|
1444 |
+
}
|
1445 |
+
if(isset($custom_fields['saswp_jobposting_schema_employment_type'])){
|
1446 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_employment_type'];
|
1447 |
+
}
|
1448 |
+
if(isset($custom_fields['saswp_jobposting_schema_ho_name'])){
|
1449 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_ho_name'];
|
1450 |
+
}
|
1451 |
+
if(isset($custom_fields['saswp_jobposting_schema_ho_url'])){
|
1452 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_ho_url'];
|
1453 |
+
}
|
1454 |
+
if(isset($custom_fields['saswp_jobposting_schema_ho_logo'])){
|
1455 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_ho_logo'];
|
1456 |
+
}
|
1457 |
+
if(isset($custom_fields['saswp_jobposting_schema_street_address'])){
|
1458 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_street_address'];
|
1459 |
+
}
|
1460 |
+
if(isset($custom_fields['saswp_jobposting_schema_locality'])){
|
1461 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_locality'];
|
1462 |
+
}
|
1463 |
+
if(isset($custom_fields['saswp_jobposting_schema_region'])){
|
1464 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_region'];
|
1465 |
+
}
|
1466 |
+
if(isset($custom_fields['saswp_jobposting_schema_postalcode'])){
|
1467 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_postalcode'];
|
1468 |
+
}
|
1469 |
+
if(isset($custom_fields['saswp_jobposting_schema_country'])){
|
1470 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_country'];
|
1471 |
+
}
|
1472 |
+
if(isset($custom_fields['saswp_jobposting_schema_bs_currency'])){
|
1473 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_bs_currency'];
|
1474 |
+
}
|
1475 |
+
if(isset($custom_fields['saswp_jobposting_schema_bs_value'])){
|
1476 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_bs_value'];
|
1477 |
+
}
|
1478 |
+
if(isset($custom_fields['saswp_jobposting_schema_bs_unittext'])){
|
1479 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_jobposting_schema_bs_unittext'];
|
1480 |
+
}
|
1481 |
+
|
1482 |
+
break;
|
1483 |
+
|
1484 |
+
case 'Trip':
|
1485 |
+
|
1486 |
+
if(isset($custom_fields['saswp_trip_schema_name'])){
|
1487 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_trip_schema_name'];
|
1488 |
+
}
|
1489 |
+
if(isset($custom_fields['saswp_trip_schema_description'])){
|
1490 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_trip_schema_description'];
|
1491 |
+
}
|
1492 |
+
if(isset($custom_fields['saswp_trip_schema_url'])){
|
1493 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_trip_schema_url'];
|
1494 |
+
}
|
1495 |
+
if(isset($custom_fields['saswp_trip_schema_image'])){
|
1496 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_trip_schema_image'];
|
1497 |
+
}
|
1498 |
+
|
1499 |
+
break;
|
1500 |
+
|
1501 |
+
case 'MedicalCondition':
|
1502 |
+
|
1503 |
+
if(isset($custom_fields['saswp_mc_schema_name'])){
|
1504 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_mc_schema_name'];
|
1505 |
+
}
|
1506 |
+
if(isset($custom_fields['saswp_mc_schema_alternate_name'])){
|
1507 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_mc_schema_alternate_name'];
|
1508 |
+
}
|
1509 |
+
if(isset($custom_fields['saswp_mc_schema_description'])){
|
1510 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_mc_schema_description'];
|
1511 |
+
}
|
1512 |
+
if(isset($custom_fields['saswp_mc_schema_image'])){
|
1513 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_mc_schema_image'];
|
1514 |
+
}
|
1515 |
+
if(isset($custom_fields['saswp_mc_schema_anatomy_name'])){
|
1516 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_mc_schema_anatomy_name'];
|
1517 |
+
}
|
1518 |
+
if(isset($custom_fields['saswp_mc_schema_medical_code'])){
|
1519 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_mc_schema_medical_code'];
|
1520 |
+
}
|
1521 |
+
if(isset($custom_fields['saswp_mc_schema_coding_system'])){
|
1522 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_mc_schema_coding_system'];
|
1523 |
+
}
|
1524 |
+
if(isset($custom_fields['saswp_mc_schema_diagnosis_name'])){
|
1525 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_mc_schema_diagnosis_name'];
|
1526 |
+
}
|
1527 |
+
|
1528 |
+
break;
|
1529 |
+
|
1530 |
default:
|
1531 |
break;
|
1532 |
}
|
1551 |
$schema_type = isset( $_POST['schema_type'] ) ? sanitize_text_field( $_POST['schema_type'] ) : '';
|
1552 |
$meta_fields = $this->saswp_get_all_schema_type_fields($schema_type);
|
1553 |
|
1554 |
+
wp_send_json( $meta_fields );
|
|
|
|
|
1555 |
}
|
1556 |
|
1557 |
/**
|
1940 |
}
|
1941 |
return $qa_page;
|
1942 |
}
|
1943 |
+
|
1944 |
/**
|
1945 |
* This function returns all the schema field's key by schema type or id
|
1946 |
* @param type $schema_type
|
1947 |
* @param type $id
|
1948 |
* @return string
|
1949 |
*/
|
1950 |
+
public function saswp_get_all_schema_type_fields($schema_type){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1951 |
|
1952 |
+
$meta_field = array();
|
1953 |
switch ($schema_type) {
|
1954 |
|
1955 |
case 'local_business':
|
1972 |
'saswp_dayofweek' => 'Operation Days',
|
1973 |
'local_price_range' => 'Price Range',
|
1974 |
'local_hasmap' => 'HasMap',
|
1975 |
+
'local_menu' => 'Memu',
|
1976 |
+
'local_facebook' => 'Facebook',
|
1977 |
+
'local_twitter' => 'Twitter',
|
1978 |
+
'local_instagram' => 'Instagram',
|
1979 |
+
'local_pinterest' => 'Pinterest',
|
1980 |
+
'local_linkedin' => 'LinkedIn',
|
1981 |
+
'local_soundcloud' => 'SoundCloud',
|
1982 |
+
'local_tumblr' => 'Tumblr',
|
1983 |
+
'local_youtube' => 'Youtube',
|
1984 |
);
|
1985 |
break;
|
1986 |
|
1990 |
|
1991 |
'saswp_blogposting_main_entity_of_page' => 'Main Entity Of Page',
|
1992 |
'saswp_blogposting_headline' => 'Headline',
|
1993 |
+
'saswp_blogposting_url' => 'URL',
|
1994 |
+
'saswp_blogposting_keywords' => 'Tags',
|
1995 |
+
'saswp_blogposting_section' => 'Section',
|
1996 |
+
'saswp_blogposting_body' => 'Body',
|
1997 |
'saswp_blogposting_description' => 'Description',
|
1998 |
'saswp_blogposting_name' => 'Name',
|
1999 |
'saswp_blogposting_url' => 'URL',
|
2039 |
'saswp_webpage_description' => 'Description',
|
2040 |
'saswp_webpage_main_entity_of_page' => 'Main Entity Of Page',
|
2041 |
'saswp_webpage_image' => 'Image',
|
2042 |
+
'saswp_webpage_headline' => 'Headline',
|
2043 |
'saswp_webpage_date_published' => 'Date Published',
|
2044 |
'saswp_webpage_date_modified' => 'Date Modified',
|
2045 |
'saswp_webpage_author_name' => 'Author Name',
|
2053 |
|
2054 |
$meta_field = array(
|
2055 |
'saswp_article_main_entity_of_page' => 'Main Entity Of Page',
|
2056 |
+
'saswp_article_url' => 'URL',
|
2057 |
'saswp_article_image' => 'Image',
|
2058 |
+
'saswp_article_headline' => 'Headline',
|
2059 |
+
'saswp_article_body' => 'Body',
|
2060 |
+
'saswp_article_keywords' => 'Tags',
|
2061 |
+
'saswp_article_section' => 'Section',
|
2062 |
'saswp_article_description' => 'Description',
|
2063 |
'saswp_article_date_published' => 'Date Published',
|
2064 |
'saswp_article_date_modified' => 'Date Modified',
|
2070 |
break;
|
2071 |
|
2072 |
case 'TechArticle':
|
2073 |
+
|
2074 |
+
$meta_field = array(
|
2075 |
'saswp_tech_article_main_entity_of_page' => 'Main Entity Of Page',
|
2076 |
+
'saswp_tech_article_url' => 'URL',
|
2077 |
'saswp_tech_article_image' => 'Image',
|
2078 |
+
'saswp_tech_article_headline' => 'Headline',
|
2079 |
+
'saswp_tech_article_body' => 'Body',
|
2080 |
+
'saswp_tech_article_keywords' => 'Tags',
|
2081 |
+
'saswp_tech_article_section' => 'Section',
|
2082 |
'saswp_tech_article_description' => 'Description',
|
2083 |
'saswp_tech_article_date_published' => 'Date Published',
|
2084 |
'saswp_tech_article_date_modified' => 'Date Modified',
|
2085 |
'saswp_tech_article_author_name' => 'Author Name',
|
2086 |
'saswp_tech_article_organization_name' => 'Organization Name',
|
2087 |
+
'saswp_tech_article_organization_logo' => 'Organization Logo',
|
2088 |
+
|
2089 |
+
);
|
2090 |
break;
|
2091 |
|
2092 |
case 'Course':
|
2098 |
'saswp_course_date_published' => 'Date Published',
|
2099 |
'saswp_course_date_modified' => 'Date Modified',
|
2100 |
'saswp_course_provider_name' => 'Provider Name',
|
2101 |
+
'saswp_course_facebook' => 'Provider Facebook',
|
2102 |
+
'saswp_course_twitter' => 'Provider Twitter',
|
2103 |
+
'saswp_course_instagram' => 'Provider Instagram',
|
2104 |
+
'saswp_course_linkedIn' => 'Provider LinkedIn',
|
2105 |
+
'saswp_course_youtube' => 'Provider Youtube',
|
2106 |
);
|
2107 |
break;
|
2108 |
|
2119 |
|
2120 |
break;
|
2121 |
|
2122 |
+
case 'TVSeries':
|
2123 |
+
|
2124 |
+
$meta_field = array(
|
2125 |
+
'saswp_tvseries_schema_name' => 'Name',
|
2126 |
+
'saswp_tvseries_schema_description' => 'Description',
|
2127 |
+
'saswp_tvseries_schema_image' => 'Image',
|
2128 |
+
'saswp_tvseries_schema_author_name' => 'Author Name'
|
2129 |
+
);
|
2130 |
+
|
2131 |
+
break;
|
2132 |
+
|
2133 |
+
case 'FAQ':
|
2134 |
+
|
2135 |
+
$meta_field = array();
|
2136 |
+
|
2137 |
+
break;
|
2138 |
+
|
2139 |
case 'Recipe':
|
2140 |
|
2141 |
$meta_field = array(
|
2172 |
|
2173 |
case 'Product':
|
2174 |
|
2175 |
+
$meta_field = array(
|
2176 |
+
'saswp_product_schema_name' => 'Name',
|
2177 |
+
'saswp_product_schema_description' => 'Description',
|
2178 |
+
'saswp_product_schema_image' => 'Image',
|
2179 |
+
'saswp_product_schema_brand_name' => 'Brand Name',
|
2180 |
+
'saswp_product_schema_price' => 'Price',
|
2181 |
+
'saswp_product_schema_priceValidUntil' => 'Price Valid Until',
|
2182 |
+
'saswp_product_schema_currency' => 'Currency',
|
2183 |
+
'saswp_product_schema_availability' => 'Availability',
|
2184 |
+
'saswp_product_schema_condition' => 'Product Condition',
|
2185 |
+
'saswp_product_schema_sku' => 'SKU',
|
2186 |
+
'saswp_product_schema_mpn' => 'MPN',
|
2187 |
+
'saswp_product_schema_isbn' => 'ISBN',
|
2188 |
+
'saswp_product_schema_gtin8' => 'GTIN 8',
|
2189 |
+
);
|
2190 |
+
break;
|
2191 |
+
|
2192 |
+
case 'TouristAttraction':
|
2193 |
+
|
2194 |
+
$meta_field = array(
|
2195 |
+
'saswp_ta_schema_name' => 'Name',
|
2196 |
+
'saswp_ta_schema_description' => 'Description',
|
2197 |
+
'saswp_ta_schema_image' => 'Image',
|
2198 |
+
'saswp_ta_schema_url' => 'URL',
|
2199 |
+
'saswp_ta_schema_is_acceesible_free' => 'Is Accessible For Free',
|
2200 |
+
'saswp_ta_schema_locality' => 'Address Locality',
|
2201 |
+
'saswp_ta_schema_region' => 'Address Region',
|
2202 |
+
'saswp_ta_schema_country' => 'Address Country',
|
2203 |
+
'saswp_ta_schema_postal_code' => 'Address PostalCode'
|
2204 |
+
);
|
2205 |
+
break;
|
2206 |
+
|
2207 |
+
case 'TouristDestination':
|
2208 |
+
|
2209 |
+
$meta_field = array(
|
2210 |
+
'saswp_td_schema_name' => 'Name',
|
2211 |
+
'saswp_td_schema_description' => 'Description',
|
2212 |
+
'saswp_td_schema_image' => 'Image',
|
2213 |
+
'saswp_td_schema_url' => 'URL',
|
2214 |
+
'saswp_td_schema_locality' => 'Address Locality',
|
2215 |
+
'saswp_td_schema_region' => 'Address Region',
|
2216 |
+
'saswp_td_schema_country' => 'Address Country',
|
2217 |
+
'saswp_td_schema_postal_code' => 'Address PostalCode'
|
2218 |
+
);
|
2219 |
+
break;
|
2220 |
+
|
2221 |
+
case 'LandmarksOrHistoricalBuildings':
|
2222 |
+
|
2223 |
+
$meta_field = array(
|
2224 |
+
'saswp_lorh_schema_name' => 'Name',
|
2225 |
+
'saswp_lorh_schema_description' => 'Description',
|
2226 |
+
'saswp_lorh_schema_image' => 'Image',
|
2227 |
+
'saswp_lorh_schema_url' => 'URL',
|
2228 |
+
'saswp_lorh_schema_hasmap' => 'Has Map',
|
2229 |
+
'saswp_lorh_schema_is_acceesible_free' => 'Is Accessible For Free',
|
2230 |
+
'saswp_lorh_schema_maximum_a_capacity' => 'Maximum Attendee Capacity',
|
2231 |
+
'saswp_lorh_schema_locality' => 'Address Locality',
|
2232 |
+
'saswp_lorh_schema_region' => 'Address Region',
|
2233 |
+
'saswp_lorh_schema_country' => 'Address Country',
|
2234 |
+
'saswp_lorh_schema_postal_code' => 'Address PostalCode'
|
2235 |
+
);
|
2236 |
+
break;
|
2237 |
+
|
2238 |
+
case 'HinduTemple':
|
2239 |
+
|
2240 |
+
$meta_field = array(
|
2241 |
+
'saswp_hindutemple_schema_name' => 'Name',
|
2242 |
+
'saswp_hindutemple_schema_description' => 'Description',
|
2243 |
+
'saswp_hindutemple_schema_image' => 'Image',
|
2244 |
+
'saswp_hindutemple_schema_url' => 'URL',
|
2245 |
+
'saswp_hindutemple_schema_hasmap' => 'Has Map',
|
2246 |
+
'saswp_hindutemple_schema_is_accesible_free' => 'Is Accessible For Free',
|
2247 |
+
'saswp_hindutemple_schema_maximum_a_capacity' => 'Maximum Attendee Capacity',
|
2248 |
+
'saswp_hindutemple_schema_locality' => 'Address Locality',
|
2249 |
+
'saswp_hindutemple_schema_region' => 'Address Region',
|
2250 |
+
'saswp_hindutemple_schema_country' => 'Address Country',
|
2251 |
+
'saswp_hindutemple_schema_postal_code' => 'Address PostalCode'
|
2252 |
+
);
|
2253 |
+
break;
|
2254 |
+
|
2255 |
+
case 'Church':
|
2256 |
+
|
2257 |
+
$meta_field = array(
|
2258 |
+
'saswp_church_schema_name' => 'Name',
|
2259 |
+
'saswp_church_schema_description' => 'Description',
|
2260 |
+
'saswp_church_schema_image' => 'Image',
|
2261 |
+
'saswp_church_schema_url' => 'URL',
|
2262 |
+
'saswp_church_schema_hasmap' => 'Has Map',
|
2263 |
+
'saswp_church_schema_is_accesible_free' => 'Is Accessible For Free',
|
2264 |
+
'saswp_church_schema_maximum_a_capacity' => 'Maximum Attendee Capacity',
|
2265 |
+
'saswp_church_schema_locality' => 'Address Locality',
|
2266 |
+
'saswp_church_schema_region' => 'Address Region',
|
2267 |
+
'saswp_church_schema_country' => 'Address Country',
|
2268 |
+
'saswp_church_schema_postal_code' => 'Address PostalCode'
|
2269 |
+
);
|
2270 |
+
break;
|
2271 |
+
|
2272 |
+
case 'Mosque':
|
2273 |
+
|
2274 |
+
$meta_field = array(
|
2275 |
+
'saswp_mosque_schema_name' => 'Name',
|
2276 |
+
'saswp_mosque_schema_description' => 'Description',
|
2277 |
+
'saswp_mosque_schema_image' => 'Image',
|
2278 |
+
'saswp_mosque_schema_url' => 'URL',
|
2279 |
+
'saswp_mosque_schema_hasmap' => 'Has Map',
|
2280 |
+
'saswp_mosque_schema_is_accesible_free' => 'Is Accessible For Free',
|
2281 |
+
'saswp_mosque_schema_maximum_a_capacity' => 'Maximum Attendee Capacity',
|
2282 |
+
'saswp_mosque_schema_locality' => 'Address Locality',
|
2283 |
+
'saswp_mosque_schema_region' => 'Address Region',
|
2284 |
+
'saswp_mosque_schema_country' => 'Address Country',
|
2285 |
+
'saswp_mosque_schema_postal_code' => 'Address PostalCode'
|
2286 |
+
);
|
2287 |
+
break;
|
2288 |
+
|
2289 |
+
case 'Person':
|
2290 |
+
|
2291 |
+
$meta_field = array(
|
2292 |
+
'saswp_person_schema_name' => 'Name',
|
2293 |
+
'saswp_person_schema_description' => 'Description',
|
2294 |
+
'saswp_person_schema_url' => 'URL',
|
2295 |
+
'saswp_person_schema_street_address' => 'Street Address',
|
2296 |
+
'saswp_person_schema_locality' => 'Locality',
|
2297 |
+
'saswp_person_schema_region' => 'Region',
|
2298 |
+
'saswp_person_schema_postal_code' => 'Postal Code',
|
2299 |
+
'saswp_person_schema_country' => 'Country',
|
2300 |
+
'saswp_person_schema_email' => 'Email',
|
2301 |
+
'saswp_person_schema_telephone' => 'Telephone',
|
2302 |
+
'saswp_person_schema_gender' => 'Gender',
|
2303 |
+
'saswp_person_schema_date_of_birth' => 'Date Of Birth',
|
2304 |
+
'saswp_person_schema_member_of' => 'Member Of',
|
2305 |
+
'saswp_person_schema_nationality' => 'Nationality',
|
2306 |
+
'saswp_person_schema_image' => 'Image',
|
2307 |
+
'saswp_person_schema_job_title' => 'Job Title'
|
2308 |
+
);
|
2309 |
break;
|
2310 |
|
2311 |
case 'Service':
|
2449 |
|
2450 |
);
|
2451 |
break;
|
2452 |
+
|
2453 |
+
case 'Apartment':
|
2454 |
+
$meta_field = array(
|
2455 |
+
|
2456 |
+
'saswp_apartment_schema_name' => 'Name',
|
2457 |
+
'saswp_apartment_schema_url' => 'URL',
|
2458 |
+
'saswp_apartment_schema_image' => 'Image',
|
2459 |
+
'saswp_apartment_schema_description' => 'Description',
|
2460 |
+
'saswp_apartment_schema_numberofrooms' => 'Number of Rooms',
|
2461 |
+
'saswp_apartment_schema_country' => 'Country',
|
2462 |
+
'saswp_apartment_schema_locality' => 'Locality',
|
2463 |
+
'saswp_apartment_schema_region' => 'Region',
|
2464 |
+
'saswp_apartment_schema_postalcode' => 'PostalCode',
|
2465 |
+
'saswp_apartment_schema_telephone' => 'Telephone'
|
2466 |
+
);
|
2467 |
+
break;
|
2468 |
+
|
2469 |
+
case 'House':
|
2470 |
+
$meta_field = array(
|
2471 |
+
|
2472 |
+
'saswp_house_schema_name' => 'Name',
|
2473 |
+
'saswp_house_schema_url' => 'URL',
|
2474 |
+
'saswp_house_schema_image' => 'Image',
|
2475 |
+
'saswp_house_schema_description' => 'Description',
|
2476 |
+
'saswp_house_schema_pets_allowed' => 'Pets Allowed',
|
2477 |
+
'saswp_house_schema_country' => 'Country',
|
2478 |
+
'saswp_house_schema_locality' => 'Locality',
|
2479 |
+
'saswp_house_schema_region' => 'Region',
|
2480 |
+
'saswp_house_schema_postalcode' => 'PostalCode',
|
2481 |
+
'saswp_house_schema_telephone' => 'Telephone'
|
2482 |
+
);
|
2483 |
+
break;
|
2484 |
+
|
2485 |
+
case 'SingleFamilyResidence':
|
2486 |
+
|
2487 |
+
$meta_field = array(
|
2488 |
+
'saswp_sfr_schema_name' => 'Name',
|
2489 |
+
'saswp_sfr_schema_url' => 'URL',
|
2490 |
+
'saswp_sfr_schema_image' => 'Image',
|
2491 |
+
'saswp_sfr_schema_description' => 'Description',
|
2492 |
+
'saswp_sfr_schema_numberofrooms' => 'Number Of Rooms',
|
2493 |
+
'saswp_sfr_schema_pets_allowed' => 'Pets Allowed',
|
2494 |
+
'saswp_sfr_schema_country' => 'Country',
|
2495 |
+
'saswp_sfr_schema_locality' => 'Locality',
|
2496 |
+
'saswp_sfr_schema_region' => 'Region',
|
2497 |
+
'saswp_sfr_schema_postalcode' => 'PostalCode',
|
2498 |
+
'saswp_sfr_schema_telephone' => 'Telephone'
|
2499 |
+
);
|
2500 |
+
break;
|
2501 |
+
|
2502 |
+
case 'VideoGame':
|
2503 |
+
|
2504 |
+
$meta_field = array(
|
2505 |
+
'saswp_vg_schema_name' => 'Name',
|
2506 |
+
'saswp_vg_schema_url' => 'URL',
|
2507 |
+
'saswp_vg_schema_image' => 'Image',
|
2508 |
+
'saswp_vg_schema_description' => 'Description',
|
2509 |
+
'saswp_vg_schema_operating_system' => 'Operating System',
|
2510 |
+
'saswp_vg_schema_application_category' => 'Application Category',
|
2511 |
+
'saswp_vg_schema_author_name' => 'Author Name',
|
2512 |
+
'saswp_vg_schema_price' => 'Price',
|
2513 |
+
'saswp_vg_schema_price_currency' => 'Price Currency',
|
2514 |
+
'saswp_vg_schema_price_availability' => 'Availability',
|
2515 |
+
'saswp_vg_schema_publisher' => 'Publisher',
|
2516 |
+
'saswp_vg_schema_genre' => 'Genre',
|
2517 |
+
'saswp_vg_schema_processor_requirements' => 'Processor Requirements',
|
2518 |
+
'saswp_vg_schema_memory_requirements' => 'Memory Requirements',
|
2519 |
+
'saswp_vg_schema_storage_requirements' => 'Storage Requirements',
|
2520 |
+
'saswp_vg_schema_game_platform' => 'Game Platform',
|
2521 |
+
'saswp_vg_schema_cheat_code' => 'Cheat Code'
|
2522 |
+
);
|
2523 |
+
break;
|
2524 |
+
|
2525 |
+
case 'JobPosting':
|
2526 |
+
|
2527 |
+
$meta_field = array(
|
2528 |
+
'saswp_jobposting_schema_title' => 'Title',
|
2529 |
+
'saswp_jobposting_schema_description' => 'Description',
|
2530 |
+
'saswp_jobposting_schema_url' => 'URL',
|
2531 |
+
'saswp_jobposting_schema_dateposted' => 'Date Posted',
|
2532 |
+
'saswp_jobposting_schema_validthrough' => 'Valid Through',
|
2533 |
+
'saswp_jobposting_schema_employment_type' => 'Employment Type',
|
2534 |
+
'saswp_jobposting_schema_ho_name' => 'Hiring Organization Name',
|
2535 |
+
'saswp_jobposting_schema_ho_url' => 'Hiring Organization URL',
|
2536 |
+
'saswp_jobposting_schema_ho_logo' => 'Hiring Organization Logo',
|
2537 |
+
'saswp_jobposting_schema_street_address' => 'Street Address',
|
2538 |
+
'saswp_jobposting_schema_locality' => 'Address Locality',
|
2539 |
+
'saswp_jobposting_schema_region' => 'Address Region',
|
2540 |
+
'saswp_jobposting_schema_postalcode' => 'Address Postal Code',
|
2541 |
+
'saswp_jobposting_schema_country' => 'Address Country',
|
2542 |
+
'saswp_jobposting_schema_bs_currency' => 'Base Salary Currency',
|
2543 |
+
'saswp_jobposting_schema_bs_value' => 'Base Salary Value',
|
2544 |
+
'saswp_jobposting_schema_bs_unittext' => 'Base Salary Unit Text'
|
2545 |
+
);
|
2546 |
+
break;
|
2547 |
+
|
2548 |
+
case 'Trip':
|
2549 |
+
|
2550 |
+
$meta_field = array(
|
2551 |
+
'saswp_trip_schema_name' => 'Name',
|
2552 |
+
'saswp_trip_schema_description' => 'Description',
|
2553 |
+
'saswp_trip_schema_url' => 'URL',
|
2554 |
+
'saswp_trip_schema_image' => 'Image'
|
2555 |
+
);
|
2556 |
+
break;
|
2557 |
+
|
2558 |
+
case 'MedicalCondition':
|
2559 |
+
|
2560 |
+
$meta_field = array(
|
2561 |
+
'saswp_mc_schema_name' => 'Name',
|
2562 |
+
'saswp_mc_schema_alternate_name' => 'Alternate Name',
|
2563 |
+
'saswp_mc_schema_description' => 'Description',
|
2564 |
+
'saswp_mc_schema_image' => 'Image',
|
2565 |
+
'saswp_mc_schema_anatomy_name' => 'Associated Anatomy Name',
|
2566 |
+
'saswp_mc_schema_medical_code' => 'Medical Code',
|
2567 |
+
'saswp_mc_schema_coding_system' => 'Coding System',
|
2568 |
+
'saswp_mc_schema_diagnosis_name' => 'Diagnosis Name'
|
2569 |
+
);
|
2570 |
+
break;
|
2571 |
|
2572 |
default:
|
2573 |
break;
|
2574 |
+
}
|
2575 |
return $meta_field;
|
2576 |
}
|
2577 |
|
2835 |
|
2836 |
//Get All the images available on post
|
2837 |
|
2838 |
+
$content = @get_the_content();
|
2839 |
|
2840 |
if($content){
|
2841 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: magazine3
|
|
3 |
Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.2
|
6 |
-
Stable tag: 1.9
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -110,6 +110,16 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
|
|
110 |
|
111 |
== Changelog ==
|
112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
= 1.9 (03 Aug 2019) =
|
114 |
|
115 |
* Major Feature: Reviews Module :- Allow users to manually add reviews from more than 80+ platforms and show it on the website with schema markup #325
|
3 |
Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.2
|
6 |
+
Stable tag: 1.9.1
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
110 |
|
111 |
== Changelog ==
|
112 |
|
113 |
+
= 1.9.1 (21 Aug 2019) =
|
114 |
+
|
115 |
+
* Major Feature: Option to add schema fields value from give dropdown meta list inside Modify Schema Output section #192
|
116 |
+
* Bug Fixed: Error log cluttered with php warning regarding count() #434
|
117 |
+
* Bug Fixed: Debug error #439
|
118 |
+
* Bug Fixed: Php json_encode function does not encode other languages characters, replace it with wp_json_encode #433
|
119 |
+
* Bug Fixed: CSS border-box rule causing issues #420
|
120 |
+
* Bug Fixed: Setup link of default image doesn't take it anywhere #429
|
121 |
+
* Bug Fixed: Conflict with Gutenberg and Merlin. Fatal error: Uncaught Error: Call to a member function is_block_editor() on null #413
|
122 |
+
|
123 |
= 1.9 (03 Aug 2019) =
|
124 |
|
125 |
* Major Feature: Reviews Module :- Allow users to manually add reviews from more than 80+ platforms and show it on the website with schema markup #325
|
reviews/reviews_admin.php
CHANGED
@@ -1,329 +1,329 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Post Specific Class
|
4 |
-
*
|
5 |
-
* @author Magazine3
|
6 |
-
* @category Admin
|
7 |
-
* @path reviews/reviews_admin
|
8 |
-
* @version 1.9
|
9 |
-
*/
|
10 |
-
|
11 |
-
// Exit if accessed directly.
|
12 |
-
if ( ! defined( 'ABSPATH' ) ) exit;
|
13 |
-
|
14 |
-
class saswp_reviews_admin {
|
15 |
-
|
16 |
-
private $screen = array(
|
17 |
-
'saswp_reviews'
|
18 |
-
);
|
19 |
-
private $meta_fields = array(
|
20 |
-
array(
|
21 |
-
'label' => 'Reviewer Image',
|
22 |
-
'id' => 'saswp_reviewer_image',
|
23 |
-
'type' => 'media',
|
24 |
-
),
|
25 |
-
array(
|
26 |
-
'label' => 'Reviewer Name',
|
27 |
-
'id' => 'saswp_reviewer_name',
|
28 |
-
'type' => 'text',
|
29 |
-
),
|
30 |
-
array(
|
31 |
-
'label' => 'Rating',
|
32 |
-
'id' => 'saswp_review_rating',
|
33 |
-
'type' => 'star',
|
34 |
-
),
|
35 |
-
array(
|
36 |
-
'label' => 'Review Date',
|
37 |
-
'id' => 'saswp_review_date',
|
38 |
-
'type' => 'text',
|
39 |
-
),
|
40 |
-
array(
|
41 |
-
'label' => 'Review Text',
|
42 |
-
'id' => 'saswp_review_text',
|
43 |
-
'type' => 'textarea',
|
44 |
-
),
|
45 |
-
array(
|
46 |
-
'label' => 'Review Link',
|
47 |
-
'id' => 'saswp_review_link',
|
48 |
-
'type' => 'text',
|
49 |
-
),
|
50 |
-
array(
|
51 |
-
'label' => 'Review Platform',
|
52 |
-
'id' => 'saswp_review_platform',
|
53 |
-
'type' => 'select',
|
54 |
-
|
55 |
-
),
|
56 |
-
|
57 |
-
);
|
58 |
-
|
59 |
-
public function __construct() {
|
60 |
-
|
61 |
-
add_action( 'add_meta_boxes', array( $this, 'saswp_add_meta_boxes' ) );
|
62 |
-
add_action( 'save_post', array( $this, 'saswp_save_fields' ) );
|
63 |
-
add_action( 'admin_init', array( $this, 'saswp_removing_reviews_wysiwig' ) );
|
64 |
-
|
65 |
-
}
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Function to disable default wordpress editor
|
69 |
-
* @since version 1.9
|
70 |
-
*/
|
71 |
-
public function saswp_removing_reviews_wysiwig(){
|
72 |
-
|
73 |
-
remove_post_type_support( 'saswp_reviews', 'editor');
|
74 |
-
|
75 |
-
}
|
76 |
-
|
77 |
-
/**
|
78 |
-
* Function to add review_content metabox
|
79 |
-
* @since version 1.9
|
80 |
-
*/
|
81 |
-
public function saswp_add_meta_boxes() {
|
82 |
-
|
83 |
-
foreach ( $this->screen as $single_screen ) {
|
84 |
-
add_meta_box(
|
85 |
-
'review_content',
|
86 |
-
esc_html__( 'Review Content', 'schema-and-structured-data-for-wp' ),
|
87 |
-
array( $this, 'saswp_meta_box_callback' ),
|
88 |
-
$single_screen,
|
89 |
-
'normal',
|
90 |
-
'high'
|
91 |
-
);
|
92 |
-
}
|
93 |
-
|
94 |
-
}
|
95 |
-
|
96 |
-
public function saswp_meta_box_callback( $post ) {
|
97 |
-
|
98 |
-
wp_nonce_field( 'saswp_reviews_data', 'saswp_reviews_nonce' );
|
99 |
-
$this->saswp_field_generator( $post );
|
100 |
-
|
101 |
-
}
|
102 |
-
|
103 |
-
/**
|
104 |
-
* Function to generate html elements based on passed array as a parameter
|
105 |
-
* @param type $post
|
106 |
-
* @since version 1.9
|
107 |
-
*/
|
108 |
-
public function saswp_field_generator( $post ) {
|
109 |
-
|
110 |
-
$this->meta_fields[6]['options'] = saswp_get_terms_as_array();
|
111 |
-
|
112 |
-
$output = '';
|
113 |
-
foreach ( $this->meta_fields as $meta_field ) {
|
114 |
-
|
115 |
-
$attributes = $label = '';
|
116 |
-
|
117 |
-
if(isset($meta_field['label'])){
|
118 |
-
$label = $meta_field['label'];
|
119 |
-
}
|
120 |
-
$label = '<label for="' . $meta_field['id'] . '">' . esc_html__( $label, 'schema-and-structured-data-for-wp' ) . '</label>';
|
121 |
-
$meta_value = get_post_meta( $post->ID, $meta_field['id'], true );
|
122 |
-
|
123 |
-
if ( empty( $meta_value ) ) {
|
124 |
-
$meta_value = isset($meta_field['default']);
|
125 |
-
|
126 |
-
}
|
127 |
-
|
128 |
-
if(isset($meta_field['attributes'])){
|
129 |
-
|
130 |
-
if(array_key_exists('provider_type', $meta_field['attributes'])){
|
131 |
-
|
132 |
-
$provider_type = $meta_field['attributes']['provider_type'];
|
133 |
-
|
134 |
-
}
|
135 |
-
|
136 |
-
|
137 |
-
}
|
138 |
-
|
139 |
-
switch ( $meta_field['type'] ) {
|
140 |
-
|
141 |
-
case 'select':
|
142 |
-
|
143 |
-
$input = sprintf(
|
144 |
-
'<select class="afw_select" id="%s" name="%s" %s>',
|
145 |
-
esc_attr($meta_field['id']),
|
146 |
-
esc_attr($meta_field['id']),
|
147 |
-
$attributes
|
148 |
-
);
|
149 |
-
foreach ( $meta_field['options'] as $key => $value ) {
|
150 |
-
|
151 |
-
$input .= sprintf(
|
152 |
-
'<option %s value="%s">%s</option>',
|
153 |
-
$meta_value == $key ? 'selected' : '',
|
154 |
-
$key,
|
155 |
-
esc_html__($value, 'schema-and-structured-data-for-wp')
|
156 |
-
);
|
157 |
-
}
|
158 |
-
$input .= '</select>';
|
159 |
-
|
160 |
-
break;
|
161 |
-
case 'textarea':
|
162 |
-
$input = sprintf(
|
163 |
-
'<textarea class="afw_textarea" id="%s" name="%s" rows="5">%s</textarea>',
|
164 |
-
esc_attr($meta_field['id']),
|
165 |
-
esc_attr($meta_field['id']),
|
166 |
-
$meta_value
|
167 |
-
);
|
168 |
-
break;
|
169 |
-
|
170 |
-
case 'checkbox':
|
171 |
-
$input = sprintf(
|
172 |
-
'<input %s id="%s" name="%s" type="checkbox" value="1">',
|
173 |
-
$meta_value === '1' ? 'checked' : '',
|
174 |
-
esc_attr($meta_field['id']),
|
175 |
-
esc_attr($meta_field['id'])
|
176 |
-
);
|
177 |
-
break;
|
178 |
-
case 'media':
|
179 |
-
$media_value = array();
|
180 |
-
$media_key = $meta_field['id'].'_detail';
|
181 |
-
|
182 |
-
$media_value_meta = get_post_meta( $post->ID, $media_key, true );
|
183 |
-
|
184 |
-
if(!empty($media_value_meta)){
|
185 |
-
$media_value = $media_value_meta;
|
186 |
-
}
|
187 |
-
|
188 |
-
$media_height = '';
|
189 |
-
$media_width = '';
|
190 |
-
$media_thumbnail = '';
|
191 |
-
|
192 |
-
if(isset($media_value['thumbnail'])){
|
193 |
-
$media_thumbnail =$media_value['thumbnail'];
|
194 |
-
}
|
195 |
-
if(isset($media_value['height'])){
|
196 |
-
$media_height =$media_value['height'];
|
197 |
-
}
|
198 |
-
if(isset($media_value['width'])){
|
199 |
-
$media_width =$media_value['width'];
|
200 |
-
}
|
201 |
-
|
202 |
-
$image_pre = '';
|
203 |
-
if($media_thumbnail){
|
204 |
-
|
205 |
-
$image_pre = '<div class="saswp_image_thumbnail">
|
206 |
-
<img class="saswp_image_prev" src="'.esc_attr($media_thumbnail).'" />
|
207 |
-
<a data-id="'.esc_attr($meta_field['id']).'" href="#" class="saswp_prev_close">X</a>
|
208 |
-
</div>';
|
209 |
-
|
210 |
-
}
|
211 |
-
$input = sprintf(
|
212 |
-
'<fieldset><input style="width: 80%%" id="%s" name="%s" type="text" value="%s">'
|
213 |
-
. '<input data-id="media" style="width: 19%%" class="button" id="%s_button" name="%s_button" type="button" value="Upload" />'
|
214 |
-
. '<input type="hidden" data-id="'.esc_attr($meta_field['id']).'_height" class="upload-height" name="'.esc_attr($meta_field['id']).'_height" id="'.esc_attr($meta_field['id']).'_height" value="'.esc_attr($media_height).'">'
|
215 |
-
. '<input type="hidden" data-id="'.esc_attr($meta_field['id']).'_width" class="upload-width" name="'.esc_attr($meta_field['id']).'_width" id="'.esc_attr($meta_field['id']).'_width" value="'.esc_attr($media_width).'">'
|
216 |
-
. '<input type="hidden" data-id="'.esc_attr($meta_field['id']).'_thumbnail" class="upload-thumbnail" name="'.esc_attr($meta_field['id']).'_thumbnail" id="'.esc_attr($meta_field['id']).'_thumbnail" value="'.esc_attr($media_thumbnail).'">'
|
217 |
-
. '<div class="saswp_image_div_'.esc_attr($meta_field['id']).'">'
|
218 |
-
. $image_pre
|
219 |
-
. '</div>'
|
220 |
-
.'</fieldset>',
|
221 |
-
$meta_field['id'],
|
222 |
-
$meta_field['id'],
|
223 |
-
$media_thumbnail,
|
224 |
-
$meta_field['id'],
|
225 |
-
$meta_field['id']
|
226 |
-
);
|
227 |
-
break;
|
228 |
-
case 'star':
|
229 |
-
|
230 |
-
$input = sprintf(
|
231 |
-
'<div class="saswp-rating-div"></div>'
|
232 |
-
. '<input id="%s" name="%s" type="hidden" value="%s">',
|
233 |
-
esc_attr($meta_field['id']),
|
234 |
-
esc_attr($meta_field['id']),
|
235 |
-
esc_attr($meta_value),
|
236 |
-
$attributes
|
237 |
-
);
|
238 |
-
|
239 |
-
break;
|
240 |
-
default:
|
241 |
-
$class = '';
|
242 |
-
if (strpos($meta_field['id'], 'saswp_review_date') !== false ){
|
243 |
-
|
244 |
-
$class='saswp-reviews-datepicker-picker';
|
245 |
-
|
246 |
-
}
|
247 |
-
|
248 |
-
$input = sprintf(
|
249 |
-
'<input class="%s" %s id="%s" name="%s" type="%s" value="%s" %s>',
|
250 |
-
$class,
|
251 |
-
$meta_field['type'] !== 'color' ? '' : '',
|
252 |
-
esc_attr($meta_field['id']),
|
253 |
-
esc_attr($meta_field['id']),
|
254 |
-
esc_attr($meta_field['type']),
|
255 |
-
esc_attr($meta_value),
|
256 |
-
$attributes
|
257 |
-
);
|
258 |
-
|
259 |
-
|
260 |
-
}
|
261 |
-
|
262 |
-
$output .= '<tr><th>'.$label.'</th><td>'.$input.'</td></tr>';
|
263 |
-
}
|
264 |
-
|
265 |
-
$allowed_html = saswp_expanded_allowed_tags();
|
266 |
-
echo '<table class="form-table saswp-ad-type-table"><tbody>' . wp_kses($output, $allowed_html) . '</tbody></table>';
|
267 |
-
}
|
268 |
-
|
269 |
-
/**
|
270 |
-
* Function to save current metabox elements value into database
|
271 |
-
* @param type $post_id
|
272 |
-
* @return type
|
273 |
-
* @since version 1.9
|
274 |
-
*/
|
275 |
-
public function saswp_save_fields( $post_id ) {
|
276 |
-
|
277 |
-
if ( ! isset( $_POST['saswp_reviews_nonce'] ) )
|
278 |
-
return $post_id;
|
279 |
-
if ( !wp_verify_nonce( $_POST['saswp_reviews_nonce'], 'saswp_reviews_data' ) )
|
280 |
-
return $post_id;
|
281 |
-
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
|
282 |
-
return $post_id;
|
283 |
-
if ( !current_user_can( 'manage_options' ) )
|
284 |
-
return $post_id;
|
285 |
-
|
286 |
-
$post_meta = array();
|
287 |
-
$post_meta = (array) $_POST; // Sanitized below before saving
|
288 |
-
|
289 |
-
$this->meta_fields[6]['options'] = saswp_get_terms_as_array();
|
290 |
-
|
291 |
-
foreach ( $this->meta_fields as $meta_field ) {
|
292 |
-
|
293 |
-
if ( isset( $post_meta[ $meta_field['id'] ] ) ) {
|
294 |
-
switch ( $meta_field['type'] ) {
|
295 |
-
case 'text':
|
296 |
-
$post_meta[ $meta_field['id'] ] = sanitize_text_field( $post_meta[ $meta_field['id'] ] );
|
297 |
-
break;
|
298 |
-
case 'textarea':
|
299 |
-
$post_meta[ $meta_field['id'] ] = esc_html( $post_meta[ $meta_field['id'] ] );
|
300 |
-
break;
|
301 |
-
case 'media':
|
302 |
-
$media_key = $meta_field['id'].'_detail';
|
303 |
-
$media_height = sanitize_text_field( $post_meta[ $meta_field['id'].'_height' ] );
|
304 |
-
$media_width = sanitize_text_field( $post_meta[ $meta_field['id'].'_width' ] );
|
305 |
-
$media_thumbnail = sanitize_text_field( $post_meta[ $meta_field['id'].'_thumbnail' ] );
|
306 |
-
|
307 |
-
$media_detail = array(
|
308 |
-
'height' => $media_height,
|
309 |
-
'width' => $media_width,
|
310 |
-
'thumbnail' => $media_thumbnail,
|
311 |
-
);
|
312 |
-
|
313 |
-
update_post_meta( $post_id, $media_key, $media_detail);
|
314 |
-
break;
|
315 |
-
default:
|
316 |
-
$post_meta[ $meta_field['id'] ] = sanitize_text_field( $post_meta[ $meta_field['id'] ] );
|
317 |
-
}
|
318 |
-
update_post_meta( $post_id, $meta_field['id'], $post_meta[ $meta_field['id'] ] );
|
319 |
-
|
320 |
-
} else if ( $meta_field['type'] === 'checkbox' ) {
|
321 |
-
update_post_meta( $post_id, $meta_field['id'], '0' );
|
322 |
-
}
|
323 |
-
}
|
324 |
-
|
325 |
-
}
|
326 |
-
}
|
327 |
-
if (class_exists('saswp_reviews_admin')) {
|
328 |
-
new saswp_reviews_admin;
|
329 |
-
};
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Post Specific Class
|
4 |
+
*
|
5 |
+
* @author Magazine3
|
6 |
+
* @category Admin
|
7 |
+
* @path reviews/reviews_admin
|
8 |
+
* @version 1.9
|
9 |
+
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
13 |
+
|
14 |
+
class saswp_reviews_admin {
|
15 |
+
|
16 |
+
private $screen = array(
|
17 |
+
'saswp_reviews'
|
18 |
+
);
|
19 |
+
private $meta_fields = array(
|
20 |
+
array(
|
21 |
+
'label' => 'Reviewer Image',
|
22 |
+
'id' => 'saswp_reviewer_image',
|
23 |
+
'type' => 'media',
|
24 |
+
),
|
25 |
+
array(
|
26 |
+
'label' => 'Reviewer Name',
|
27 |
+
'id' => 'saswp_reviewer_name',
|
28 |
+
'type' => 'text',
|
29 |
+
),
|
30 |
+
array(
|
31 |
+
'label' => 'Rating',
|
32 |
+
'id' => 'saswp_review_rating',
|
33 |
+
'type' => 'star',
|
34 |
+
),
|
35 |
+
array(
|
36 |
+
'label' => 'Review Date',
|
37 |
+
'id' => 'saswp_review_date',
|
38 |
+
'type' => 'text',
|
39 |
+
),
|
40 |
+
array(
|
41 |
+
'label' => 'Review Text',
|
42 |
+
'id' => 'saswp_review_text',
|
43 |
+
'type' => 'textarea',
|
44 |
+
),
|
45 |
+
array(
|
46 |
+
'label' => 'Review Link',
|
47 |
+
'id' => 'saswp_review_link',
|
48 |
+
'type' => 'text',
|
49 |
+
),
|
50 |
+
array(
|
51 |
+
'label' => 'Review Platform',
|
52 |
+
'id' => 'saswp_review_platform',
|
53 |
+
'type' => 'select',
|
54 |
+
|
55 |
+
),
|
56 |
+
|
57 |
+
);
|
58 |
+
|
59 |
+
public function __construct() {
|
60 |
+
|
61 |
+
add_action( 'add_meta_boxes', array( $this, 'saswp_add_meta_boxes' ) );
|
62 |
+
add_action( 'save_post', array( $this, 'saswp_save_fields' ) );
|
63 |
+
add_action( 'admin_init', array( $this, 'saswp_removing_reviews_wysiwig' ) );
|
64 |
+
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Function to disable default wordpress editor
|
69 |
+
* @since version 1.9
|
70 |
+
*/
|
71 |
+
public function saswp_removing_reviews_wysiwig(){
|
72 |
+
|
73 |
+
remove_post_type_support( 'saswp_reviews', 'editor');
|
74 |
+
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Function to add review_content metabox
|
79 |
+
* @since version 1.9
|
80 |
+
*/
|
81 |
+
public function saswp_add_meta_boxes() {
|
82 |
+
|
83 |
+
foreach ( $this->screen as $single_screen ) {
|
84 |
+
add_meta_box(
|
85 |
+
'review_content',
|
86 |
+
esc_html__( 'Review Content', 'schema-and-structured-data-for-wp' ),
|
87 |
+
array( $this, 'saswp_meta_box_callback' ),
|
88 |
+
$single_screen,
|
89 |
+
'normal',
|
90 |
+
'high'
|
91 |
+
);
|
92 |
+
}
|
93 |
+
|
94 |
+
}
|
95 |
+
|
96 |
+
public function saswp_meta_box_callback( $post ) {
|
97 |
+
|
98 |
+
wp_nonce_field( 'saswp_reviews_data', 'saswp_reviews_nonce' );
|
99 |
+
$this->saswp_field_generator( $post );
|
100 |
+
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Function to generate html elements based on passed array as a parameter
|
105 |
+
* @param type $post
|
106 |
+
* @since version 1.9
|
107 |
+
*/
|
108 |
+
public function saswp_field_generator( $post ) {
|
109 |
+
|
110 |
+
$this->meta_fields[6]['options'] = saswp_get_terms_as_array();
|
111 |
+
|
112 |
+
$output = '';
|
113 |
+
foreach ( $this->meta_fields as $meta_field ) {
|
114 |
+
|
115 |
+
$attributes = $label = '';
|
116 |
+
|
117 |
+
if(isset($meta_field['label'])){
|
118 |
+
$label = $meta_field['label'];
|
119 |
+
}
|
120 |
+
$label = '<label for="' . $meta_field['id'] . '">' . esc_html__( $label, 'schema-and-structured-data-for-wp' ) . '</label>';
|
121 |
+
$meta_value = get_post_meta( $post->ID, $meta_field['id'], true );
|
122 |
+
|
123 |
+
if ( empty( $meta_value ) ) {
|
124 |
+
$meta_value = isset($meta_field['default']);
|
125 |
+
|
126 |
+
}
|
127 |
+
|
128 |
+
if(isset($meta_field['attributes'])){
|
129 |
+
|
130 |
+
if(array_key_exists('provider_type', $meta_field['attributes'])){
|
131 |
+
|
132 |
+
$provider_type = $meta_field['attributes']['provider_type'];
|
133 |
+
|
134 |
+
}
|
135 |
+
|
136 |
+
|
137 |
+
}
|
138 |
+
|
139 |
+
switch ( $meta_field['type'] ) {
|
140 |
+
|
141 |
+
case 'select':
|
142 |
+
|
143 |
+
$input = sprintf(
|
144 |
+
'<select class="afw_select" id="%s" name="%s" %s>',
|
145 |
+
esc_attr($meta_field['id']),
|
146 |
+
esc_attr($meta_field['id']),
|
147 |
+
$attributes
|
148 |
+
);
|
149 |
+
foreach ( $meta_field['options'] as $key => $value ) {
|
150 |
+
|
151 |
+
$input .= sprintf(
|
152 |
+
'<option %s value="%s">%s</option>',
|
153 |
+
$meta_value == $key ? 'selected' : '',
|
154 |
+
$key,
|
155 |
+
esc_html__($value, 'schema-and-structured-data-for-wp')
|
156 |
+
);
|
157 |
+
}
|
158 |
+
$input .= '</select>';
|
159 |
+
|
160 |
+
break;
|
161 |
+
case 'textarea':
|
162 |
+
$input = sprintf(
|
163 |
+
'<textarea class="afw_textarea" id="%s" name="%s" rows="5">%s</textarea>',
|
164 |
+
esc_attr($meta_field['id']),
|
165 |
+
esc_attr($meta_field['id']),
|
166 |
+
$meta_value
|
167 |
+
);
|
168 |
+
break;
|
169 |
+
|
170 |
+
case 'checkbox':
|
171 |
+
$input = sprintf(
|
172 |
+
'<input %s id="%s" name="%s" type="checkbox" value="1">',
|
173 |
+
$meta_value === '1' ? 'checked' : '',
|
174 |
+
esc_attr($meta_field['id']),
|
175 |
+
esc_attr($meta_field['id'])
|
176 |
+
);
|
177 |
+
break;
|
178 |
+
case 'media':
|
179 |
+
$media_value = array();
|
180 |
+
$media_key = $meta_field['id'].'_detail';
|
181 |
+
|
182 |
+
$media_value_meta = get_post_meta( $post->ID, $media_key, true );
|
183 |
+
|
184 |
+
if(!empty($media_value_meta)){
|
185 |
+
$media_value = $media_value_meta;
|
186 |
+
}
|
187 |
+
|
188 |
+
$media_height = '';
|
189 |
+
$media_width = '';
|
190 |
+
$media_thumbnail = '';
|
191 |
+
|
192 |
+
if(isset($media_value['thumbnail'])){
|
193 |
+
$media_thumbnail =$media_value['thumbnail'];
|
194 |
+
}
|
195 |
+
if(isset($media_value['height'])){
|
196 |
+
$media_height =$media_value['height'];
|
197 |
+
}
|
198 |
+
if(isset($media_value['width'])){
|
199 |
+
$media_width =$media_value['width'];
|
200 |
+
}
|
201 |
+
|
202 |
+
$image_pre = '';
|
203 |
+
if($media_thumbnail){
|
204 |
+
|
205 |
+
$image_pre = '<div class="saswp_image_thumbnail">
|
206 |
+
<img class="saswp_image_prev" src="'.esc_attr($media_thumbnail).'" />
|
207 |
+
<a data-id="'.esc_attr($meta_field['id']).'" href="#" class="saswp_prev_close">X</a>
|
208 |
+
</div>';
|
209 |
+
|
210 |
+
}
|
211 |
+
$input = sprintf(
|
212 |
+
'<fieldset><input style="width: 80%%" id="%s" name="%s" type="text" value="%s">'
|
213 |
+
. '<input data-id="media" style="width: 19%%" class="button" id="%s_button" name="%s_button" type="button" value="Upload" />'
|
214 |
+
. '<input type="hidden" data-id="'.esc_attr($meta_field['id']).'_height" class="upload-height" name="'.esc_attr($meta_field['id']).'_height" id="'.esc_attr($meta_field['id']).'_height" value="'.esc_attr($media_height).'">'
|
215 |
+
. '<input type="hidden" data-id="'.esc_attr($meta_field['id']).'_width" class="upload-width" name="'.esc_attr($meta_field['id']).'_width" id="'.esc_attr($meta_field['id']).'_width" value="'.esc_attr($media_width).'">'
|
216 |
+
. '<input type="hidden" data-id="'.esc_attr($meta_field['id']).'_thumbnail" class="upload-thumbnail" name="'.esc_attr($meta_field['id']).'_thumbnail" id="'.esc_attr($meta_field['id']).'_thumbnail" value="'.esc_attr($media_thumbnail).'">'
|
217 |
+
. '<div class="saswp_image_div_'.esc_attr($meta_field['id']).'">'
|
218 |
+
. $image_pre
|
219 |
+
. '</div>'
|
220 |
+
.'</fieldset>',
|
221 |
+
$meta_field['id'],
|
222 |
+
$meta_field['id'],
|
223 |
+
$media_thumbnail,
|
224 |
+
$meta_field['id'],
|
225 |
+
$meta_field['id']
|
226 |
+
);
|
227 |
+
break;
|
228 |
+
case 'star':
|
229 |
+
|
230 |
+
$input = sprintf(
|
231 |
+
'<div class="saswp-rating-div"></div>'
|
232 |
+
. '<input id="%s" name="%s" type="hidden" value="%s">',
|
233 |
+
esc_attr($meta_field['id']),
|
234 |
+
esc_attr($meta_field['id']),
|
235 |
+
esc_attr($meta_value),
|
236 |
+
$attributes
|
237 |
+
);
|
238 |
+
|
239 |
+
break;
|
240 |
+
default:
|
241 |
+
$class = '';
|
242 |
+
if (strpos($meta_field['id'], 'saswp_review_date') !== false ){
|
243 |
+
|
244 |
+
$class='saswp-reviews-datepicker-picker';
|
245 |
+
|
246 |
+
}
|
247 |
+
|
248 |
+
$input = sprintf(
|
249 |
+
'<input class="%s" %s id="%s" name="%s" type="%s" value="%s" %s>',
|
250 |
+
$class,
|
251 |
+
$meta_field['type'] !== 'color' ? '' : '',
|
252 |
+
esc_attr($meta_field['id']),
|
253 |
+
esc_attr($meta_field['id']),
|
254 |
+
esc_attr($meta_field['type']),
|
255 |
+
esc_attr($meta_value),
|
256 |
+
$attributes
|
257 |
+
);
|
258 |
+
|
259 |
+
|
260 |
+
}
|
261 |
+
|
262 |
+
$output .= '<tr><th>'.$label.'</th><td>'.$input.'</td></tr>';
|
263 |
+
}
|
264 |
+
|
265 |
+
$allowed_html = saswp_expanded_allowed_tags();
|
266 |
+
echo '<table class="form-table saswp-ad-type-table"><tbody>' . wp_kses($output, $allowed_html) . '</tbody></table>';
|
267 |
+
}
|
268 |
+
|
269 |
+
/**
|
270 |
+
* Function to save current metabox elements value into database
|
271 |
+
* @param type $post_id
|
272 |
+
* @return type
|
273 |
+
* @since version 1.9
|
274 |
+
*/
|
275 |
+
public function saswp_save_fields( $post_id ) {
|
276 |
+
|
277 |
+
if ( ! isset( $_POST['saswp_reviews_nonce'] ) )
|
278 |
+
return $post_id;
|
279 |
+
if ( !wp_verify_nonce( $_POST['saswp_reviews_nonce'], 'saswp_reviews_data' ) )
|
280 |
+
return $post_id;
|
281 |
+
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
|
282 |
+
return $post_id;
|
283 |
+
if ( !current_user_can( 'manage_options' ) )
|
284 |
+
return $post_id;
|
285 |
+
|
286 |
+
$post_meta = array();
|
287 |
+
$post_meta = (array) $_POST; // Sanitized below before saving
|
288 |
+
|
289 |
+
$this->meta_fields[6]['options'] = saswp_get_terms_as_array();
|
290 |
+
|
291 |
+
foreach ( $this->meta_fields as $meta_field ) {
|
292 |
+
|
293 |
+
if ( isset( $post_meta[ $meta_field['id'] ] ) ) {
|
294 |
+
switch ( $meta_field['type'] ) {
|
295 |
+
case 'text':
|
296 |
+
$post_meta[ $meta_field['id'] ] = sanitize_text_field( $post_meta[ $meta_field['id'] ] );
|
297 |
+
break;
|
298 |
+
case 'textarea':
|
299 |
+
$post_meta[ $meta_field['id'] ] = esc_html( $post_meta[ $meta_field['id'] ] );
|
300 |
+
break;
|
301 |
+
case 'media':
|
302 |
+
$media_key = $meta_field['id'].'_detail';
|
303 |
+
$media_height = sanitize_text_field( $post_meta[ $meta_field['id'].'_height' ] );
|
304 |
+
$media_width = sanitize_text_field( $post_meta[ $meta_field['id'].'_width' ] );
|
305 |
+
$media_thumbnail = sanitize_text_field( $post_meta[ $meta_field['id'].'_thumbnail' ] );
|
306 |
+
|
307 |
+
$media_detail = array(
|
308 |
+
'height' => $media_height,
|
309 |
+
'width' => $media_width,
|
310 |
+
'thumbnail' => $media_thumbnail,
|
311 |
+
);
|
312 |
+
|
313 |
+
update_post_meta( $post_id, $media_key, $media_detail);
|
314 |
+
break;
|
315 |
+
default:
|
316 |
+
$post_meta[ $meta_field['id'] ] = sanitize_text_field( $post_meta[ $meta_field['id'] ] );
|
317 |
+
}
|
318 |
+
update_post_meta( $post_id, $meta_field['id'], $post_meta[ $meta_field['id'] ] );
|
319 |
+
|
320 |
+
} else if ( $meta_field['type'] === 'checkbox' ) {
|
321 |
+
update_post_meta( $post_id, $meta_field['id'], '0' );
|
322 |
+
}
|
323 |
+
}
|
324 |
+
|
325 |
+
}
|
326 |
+
}
|
327 |
+
if (class_exists('saswp_reviews_admin')) {
|
328 |
+
new saswp_reviews_admin;
|
329 |
+
};
|
reviews/reviews_service.php
CHANGED
@@ -1,543 +1,543 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Newsletter class
|
4 |
-
*
|
5 |
-
* @author Magazine3
|
6 |
-
* @category Admin
|
7 |
-
* @path reviews/reviews_service
|
8 |
-
* @Version 1.9
|
9 |
-
*/
|
10 |
-
|
11 |
-
// Exit if accessed directly.
|
12 |
-
if ( ! defined( 'ABSPATH' ) ) exit;
|
13 |
-
|
14 |
-
class saswp_reviews_service {
|
15 |
-
|
16 |
-
/**
|
17 |
-
* List of hooks used in this context
|
18 |
-
*/
|
19 |
-
public function saswp_service_hooks(){
|
20 |
-
add_action( 'wp_ajax_saswp_fetch_google_reviews', array($this,'saswp_fetch_google_reviews'));
|
21 |
-
add_shortcode( 'saswp-reviews', array($this, 'saswp_reviews_shortcode' ));
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Function to get reviews schema markup
|
26 |
-
* @global type $sd_data
|
27 |
-
* @return string
|
28 |
-
*/
|
29 |
-
public function saswp_get_reviews_schema_markup($reviews){
|
30 |
-
|
31 |
-
global $sd_data;
|
32 |
-
|
33 |
-
$sumofrating = 0;
|
34 |
-
$avg_rating = 1;
|
35 |
-
|
36 |
-
if($reviews){
|
37 |
-
|
38 |
-
foreach($reviews as $rv){
|
39 |
-
$sumofrating += $rv['saswp_review_rating'];
|
40 |
-
}
|
41 |
-
|
42 |
-
if($sumofrating> 0){
|
43 |
-
$avg_rating = $sumofrating / count($reviews);
|
44 |
-
}
|
45 |
-
|
46 |
-
}
|
47 |
-
|
48 |
-
$html = '';
|
49 |
-
$date = get_the_date("Y-m-d\TH:i:s\Z");
|
50 |
-
$modified_date = get_the_modified_date("Y-m-d\TH:i:s\Z");
|
51 |
-
|
52 |
-
$input1 = array(
|
53 |
-
'@context' => 'http://schema.org',
|
54 |
-
'@type' => 'Review',
|
55 |
-
'dateCreated' => esc_html($date),
|
56 |
-
'datePublished' => esc_html($date),
|
57 |
-
'dateModified' => esc_html($modified_date),
|
58 |
-
'headline' => saswp_get_the_title(),
|
59 |
-
'name' => saswp_get_the_title(),
|
60 |
-
'url' => get_permalink(),
|
61 |
-
'description' => saswp_get_the_excerpt(),
|
62 |
-
'copyrightYear' => get_the_time( 'Y' ),
|
63 |
-
'author' => saswp_get_author_details()
|
64 |
-
);
|
65 |
-
|
66 |
-
$input1['itemReviewed'] = array(
|
67 |
-
'@type' => 'Thing',
|
68 |
-
'name' => saswp_get_the_title(),
|
69 |
-
);
|
70 |
-
|
71 |
-
$input1['reviewRating'] = array(
|
72 |
-
'@type' => 'Rating',
|
73 |
-
'worstRating' => 1,
|
74 |
-
'bestRating' => 5,
|
75 |
-
'ratingValue' => esc_attr($avg_rating),
|
76 |
-
);
|
77 |
-
|
78 |
-
if(!empty($input1)){
|
79 |
-
|
80 |
-
$html .= "\n";
|
81 |
-
$html .= '<!-- Schema & Structured Data For Reviews v'.esc_attr(SASWP_VERSION).' - -->';
|
82 |
-
$html .= "\n";
|
83 |
-
$html .= '<script type="application/ld+json" class="saswp-reviews-markup">';
|
84 |
-
$html .= "\n";
|
85 |
-
$html .= saswp_json_print_format($input1);
|
86 |
-
$html .= "\n";
|
87 |
-
$html .= '</script>';
|
88 |
-
$html .= "\n\n";
|
89 |
-
|
90 |
-
}
|
91 |
-
|
92 |
-
return $html;
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* Function to generate reviews html
|
97 |
-
* @param type $reviews
|
98 |
-
* @return string
|
99 |
-
*/
|
100 |
-
public function saswp_reviews_html_markup($reviews){
|
101 |
-
|
102 |
-
$output = '';
|
103 |
-
if($reviews){
|
104 |
-
|
105 |
-
foreach ($reviews as $review){
|
106 |
-
|
107 |
-
$review_rating = $review['saswp_review_rating'];
|
108 |
-
|
109 |
-
$starating = saswp_get_rating_html_by_value($review_rating);
|
110 |
-
|
111 |
-
$term = get_term( $review['saswp_review_platform'], 'platform' );
|
112 |
-
$term_slug = '';
|
113 |
-
|
114 |
-
if(is_object($term)){
|
115 |
-
$term_slug = $term->slug;
|
116 |
-
}
|
117 |
-
if($term_slug == ''){
|
118 |
-
$term_slug = 'google';
|
119 |
-
}
|
120 |
-
|
121 |
-
$output.= '<div class="saswp-g-review-panel">
|
122 |
-
<div class="saswp-glg-review-body">
|
123 |
-
<div class="saswp-rv-img">
|
124 |
-
<img src="'.esc_url($review['saswp_reviewer_image']).'" alt="'.$review['saswp_reviewer_name'].'">
|
125 |
-
</div>
|
126 |
-
<div class="saswp-rv-cnt">
|
127 |
-
<div class="saswp-str-rtng">
|
128 |
-
<div class="saswp-str">
|
129 |
-
<span class="saswp-athr">'.$review['saswp_reviewer_name'].'</span>
|
130 |
-
'.$starating.'
|
131 |
-
</div>
|
132 |
-
<span class="saswp-g-plus">
|
133 |
-
<a href="#"><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/'.esc_attr($term_slug).'-img.png'.'"></a>
|
134 |
-
</span>
|
135 |
-
</div>
|
136 |
-
<p>'.substr($review['saswp_review_text'],0,300).'</p>
|
137 |
-
</div>
|
138 |
-
</div>
|
139 |
-
</div>';
|
140 |
-
|
141 |
-
}
|
142 |
-
|
143 |
-
wp_enqueue_style( 'saswp-style', SASWP_PLUGIN_URL . 'admin_section/css/saswp-style.min.css', false , SASWP_VERSION );
|
144 |
-
|
145 |
-
}
|
146 |
-
return $output;
|
147 |
-
|
148 |
-
}
|
149 |
-
|
150 |
-
public function saswp_fetch_google_reviews(){
|
151 |
-
|
152 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
153 |
-
return;
|
154 |
-
}
|
155 |
-
|
156 |
-
if ( ! isset( $_POST['saswp_security_nonce'] ) ){
|
157 |
-
return;
|
158 |
-
}
|
159 |
-
|
160 |
-
if ( !wp_verify_nonce( $_POST['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
|
161 |
-
return;
|
162 |
-
}
|
163 |
-
|
164 |
-
global $sd_data;
|
165 |
-
|
166 |
-
$location = $blocks = $premium_status = $g_api = $reviews_api = $reviews_api_status = '';
|
167 |
-
|
168 |
-
if(isset($_POST['reviews_api'])){
|
169 |
-
$reviews_api = sanitize_text_field($_POST['reviews_api']);
|
170 |
-
}
|
171 |
-
|
172 |
-
if(isset($_POST['reviews_api_status'])){
|
173 |
-
$reviews_api_status = sanitize_text_field($_POST['reviews_api_status']);
|
174 |
-
}
|
175 |
-
|
176 |
-
if(isset($_POST['location'])){
|
177 |
-
$location = sanitize_text_field($_POST['location']);
|
178 |
-
}
|
179 |
-
|
180 |
-
if(isset($_POST['g_api'])){
|
181 |
-
$g_api = sanitize_text_field($_POST['g_api']);
|
182 |
-
}
|
183 |
-
|
184 |
-
if(isset($_POST['premium_status'])){
|
185 |
-
$premium_status = sanitize_text_field($_POST['premium_status']);
|
186 |
-
}
|
187 |
-
|
188 |
-
if(isset($_POST['blocks'])){
|
189 |
-
$blocks = intval($_POST['blocks']);
|
190 |
-
}
|
191 |
-
|
192 |
-
if($location){
|
193 |
-
|
194 |
-
if(isset($sd_data['saswp_reviews_location_name'])){
|
195 |
-
|
196 |
-
if(!in_array($location, $sd_data['saswp_reviews_location_name'])){
|
197 |
-
array_push($sd_data['saswp_reviews_location_name'], $location);
|
198 |
-
}
|
199 |
-
|
200 |
-
}else{
|
201 |
-
$sd_data['saswp_reviews_location_name'] = array($location);
|
202 |
-
|
203 |
-
}
|
204 |
-
|
205 |
-
if(isset($sd_data['saswp_reviews_location_blocks'])){
|
206 |
-
|
207 |
-
if(!in_array($blocks, $sd_data['saswp_reviews_location_blocks'])){
|
208 |
-
array_push($sd_data['saswp_reviews_location_blocks'], $blocks);
|
209 |
-
}
|
210 |
-
|
211 |
-
}else{
|
212 |
-
|
213 |
-
$sd_data['saswp_reviews_location_blocks'] = array($blocks);
|
214 |
-
|
215 |
-
}
|
216 |
-
|
217 |
-
$sd_data['saswp-google-review'] = 1;
|
218 |
-
$sd_data['saswp_google_place_api_key'] = $g_api;
|
219 |
-
update_option('sd_data', $sd_data);
|
220 |
-
|
221 |
-
$result = null;
|
222 |
-
$user_id = get_option('reviews_addon_user_id');
|
223 |
-
|
224 |
-
if($reviews_api){
|
225 |
-
|
226 |
-
if($premium_status == 'premium'){
|
227 |
-
|
228 |
-
if($reviews_api_status == 'active'){
|
229 |
-
|
230 |
-
if($user_id){
|
231 |
-
|
232 |
-
if(function_exists('saswp_get_paid_reviews_data')){
|
233 |
-
|
234 |
-
$result = saswp_get_paid_reviews_data($location, $reviews_api, $user_id, $blocks);
|
235 |
-
|
236 |
-
if($result['status'] && is_numeric($result['message'])){
|
237 |
-
|
238 |
-
$rv_limits = get_option('reviews_addon_reviews_limits');
|
239 |
-
|
240 |
-
$result['message'] = 'Reviews fetched : '. $rv_limits - $result['message']. ', Remains Limit : '.$result['message'];
|
241 |
-
|
242 |
-
update_option('reviews_addon_reviews_limits', intval($result['message']));
|
243 |
-
}
|
244 |
-
|
245 |
-
}else{
|
246 |
-
$result['status'] = false;
|
247 |
-
$result['message'] = esc_html__( 'Reviews for schema plugin is not activated', 'schema-and-structured-data-for-wp' );
|
248 |
-
}
|
249 |
-
|
250 |
-
}else{
|
251 |
-
$result['status'] = false;
|
252 |
-
$result['message'] = esc_html__( 'User is not register', 'schema-and-structured-data-for-wp' );
|
253 |
-
}
|
254 |
-
|
255 |
-
}else{
|
256 |
-
$result['status'] = false;
|
257 |
-
$result['message'] = esc_html__( 'License key is not active', 'schema-and-structured-data-for-wp' );
|
258 |
-
}
|
259 |
-
|
260 |
-
|
261 |
-
}else{
|
262 |
-
|
263 |
-
if($g_api){
|
264 |
-
|
265 |
-
$result = $this->saswp_get_free_reviews_data($location, $g_api);
|
266 |
-
|
267 |
-
}
|
268 |
-
|
269 |
-
}
|
270 |
-
|
271 |
-
}else{
|
272 |
-
|
273 |
-
if($g_api){
|
274 |
-
|
275 |
-
$result = $this->saswp_get_free_reviews_data($location, $g_api);
|
276 |
-
}
|
277 |
-
|
278 |
-
}
|
279 |
-
|
280 |
-
echo json_encode($result);
|
281 |
-
|
282 |
-
}else{
|
283 |
-
|
284 |
-
echo json_encode(array('status' => false, 'message' => esc_html__( 'Place id is empty', 'schema-and-structured-data-for-wp' )));
|
285 |
-
|
286 |
-
}
|
287 |
-
|
288 |
-
wp_die();
|
289 |
-
|
290 |
-
}
|
291 |
-
|
292 |
-
/**
|
293 |
-
* Function to show value using shortcode "saswp-reviews"
|
294 |
-
* @param type $attr
|
295 |
-
* @return type
|
296 |
-
*/
|
297 |
-
public function saswp_reviews_front_output($attr){
|
298 |
-
|
299 |
-
|
300 |
-
$arg = array();
|
301 |
-
$arg['post_type'] = 'saswp_reviews';
|
302 |
-
$arg['posts_per_page'] = -1;
|
303 |
-
$arg['post_status'] = 'publish';
|
304 |
-
|
305 |
-
if(isset($attr['id'])){
|
306 |
-
$arg['attachment_id'] = $attr['id'];
|
307 |
-
}
|
308 |
-
if(isset($attr['title'])){
|
309 |
-
$arg['title'] = $attr['title'];
|
310 |
-
}
|
311 |
-
if(isset($attr['count'])){
|
312 |
-
$arg['posts_per_page'] = $attr['count'];
|
313 |
-
}
|
314 |
-
|
315 |
-
$meta_query = array();
|
316 |
-
|
317 |
-
if(isset($attr['rating'])){
|
318 |
-
$meta_query[] = array(
|
319 |
-
'key' => 'saswp_review_rating',
|
320 |
-
'value' => $attr['rating'],
|
321 |
-
'compare' => '='
|
322 |
-
);
|
323 |
-
}
|
324 |
-
if(isset($attr['platform'])){
|
325 |
-
$term = get_term_by( 'slug', $attr['platform'], 'platform' );
|
326 |
-
|
327 |
-
$meta_query[] = array(
|
328 |
-
'key' => 'saswp_review_platform',
|
329 |
-
'value' => $term->term_id,
|
330 |
-
'compare' => '='
|
331 |
-
);
|
332 |
-
}
|
333 |
-
|
334 |
-
$meta_query_args = array(
|
335 |
-
array(
|
336 |
-
'relation' => 'AND',
|
337 |
-
$meta_query
|
338 |
-
)
|
339 |
-
);
|
340 |
-
|
341 |
-
$arg['meta_query'] = $meta_query_args;
|
342 |
-
|
343 |
-
$posts_list = get_posts($arg);
|
344 |
-
|
345 |
-
$reviews = array();
|
346 |
-
|
347 |
-
$post_meta = array(
|
348 |
-
'saswp_reviewer_image',
|
349 |
-
'saswp_reviewer_name',
|
350 |
-
'saswp_review_rating',
|
351 |
-
'saswp_review_date',
|
352 |
-
'saswp_review_text',
|
353 |
-
'saswp_review_link',
|
354 |
-
'saswp_review_platform',
|
355 |
-
);
|
356 |
-
|
357 |
-
if($posts_list){
|
358 |
-
|
359 |
-
foreach($posts_list as $post){
|
360 |
-
|
361 |
-
$review_data = array();
|
362 |
-
$post_id = $post->ID;
|
363 |
-
|
364 |
-
foreach($post_meta as $meta_key){
|
365 |
-
|
366 |
-
$review_data[$meta_key] = get_post_meta($post_id, $meta_key, true );
|
367 |
-
|
368 |
-
}
|
369 |
-
$reviews[] = $review_data;
|
370 |
-
}
|
371 |
-
}
|
372 |
-
$output = $schema_markup = '';
|
373 |
-
|
374 |
-
if($reviews){
|
375 |
-
|
376 |
-
$output = $this->saswp_reviews_html_markup($reviews);
|
377 |
-
|
378 |
-
if(saswp_global_option()){
|
379 |
-
|
380 |
-
$schema_markup = $this->saswp_get_reviews_schema_markup($reviews);
|
381 |
-
|
382 |
-
if($schema_markup){
|
383 |
-
$output = $output.$schema_markup;
|
384 |
-
|
385 |
-
}
|
386 |
-
|
387 |
-
}
|
388 |
-
|
389 |
-
}
|
390 |
-
|
391 |
-
return $output;
|
392 |
-
|
393 |
-
}
|
394 |
-
|
395 |
-
public function saswp_reviews_shortcode($attr){
|
396 |
-
|
397 |
-
$response = $this->saswp_reviews_front_output($attr);
|
398 |
-
|
399 |
-
return $response;
|
400 |
-
|
401 |
-
}
|
402 |
-
|
403 |
-
public function saswp_save_free_reviews_data($result, $place_id) {
|
404 |
-
|
405 |
-
$place_saved = array();
|
406 |
-
$reviews_saved = array();
|
407 |
-
|
408 |
-
if (isset($result['place_id']) && $result['place_id'] != '') {
|
409 |
-
|
410 |
-
$user_id = get_current_user_id();
|
411 |
-
$postarr = array(
|
412 |
-
'post_author' => $user_id,
|
413 |
-
'post_title' => $result['name'],
|
414 |
-
'post_status' => 'publish',
|
415 |
-
'post_name' => $result['name'],
|
416 |
-
'post_type' => 'saswp_rvs_location',
|
417 |
-
|
418 |
-
);
|
419 |
-
|
420 |
-
$post_id = wp_insert_post( $postarr );
|
421 |
-
$place_saved[] = $post_id;
|
422 |
-
$review_meta = array(
|
423 |
-
'saswp_rvs_loc_id' => $result['place_id'],
|
424 |
-
'saswp_rvs_loc_review_count' => $result['user_ratings_total'],
|
425 |
-
'saswp_rvs_loc_avg_rating' => $result['rating'],
|
426 |
-
'saswp_rvs_loc_icon' => $result['icon'],
|
427 |
-
'saswp_rvs_loc_address' => $result['formatted_address'],
|
428 |
-
);
|
429 |
-
|
430 |
-
if($post_id && !empty($review_meta) && is_array($review_meta)){
|
431 |
-
|
432 |
-
foreach ($review_meta as $key => $val){
|
433 |
-
update_post_meta($post_id, $key, $val);
|
434 |
-
}
|
435 |
-
|
436 |
-
}
|
437 |
-
|
438 |
-
}
|
439 |
-
|
440 |
-
|
441 |
-
if (isset($result['reviews'])) {
|
442 |
-
|
443 |
-
$reviews = $result['reviews'];
|
444 |
-
|
445 |
-
foreach ($reviews as $review) {
|
446 |
-
|
447 |
-
$user_id = get_current_user_id();
|
448 |
-
$postarr = array(
|
449 |
-
'post_author' => $user_id,
|
450 |
-
'post_title' => $review['author_name'],
|
451 |
-
'post_status' => 'publish',
|
452 |
-
'post_name' => 'Default Review',
|
453 |
-
'post_type' => 'saswp_reviews',
|
454 |
-
|
455 |
-
);
|
456 |
-
|
457 |
-
$post_id = wp_insert_post( $postarr );
|
458 |
-
$reviews_saved[] = $post_id;
|
459 |
-
$term = get_term_by( 'slug','google', 'platform' );
|
460 |
-
|
461 |
-
$media_detail = array();
|
462 |
-
|
463 |
-
if(isset($review['profile_photo_url'])){
|
464 |
-
|
465 |
-
$image_details = saswp_get_attachment_details(array($review['profile_photo_url']));
|
466 |
-
|
467 |
-
$media_detail = array(
|
468 |
-
'width' => $image_details[0][0],
|
469 |
-
'height' => $image_details[0][1],
|
470 |
-
'thumbnail' => $review['profile_photo_url'],
|
471 |
-
);
|
472 |
-
|
473 |
-
}
|
474 |
-
|
475 |
-
$review_meta = array(
|
476 |
-
'saswp_review_platform' => $term->term_id,
|
477 |
-
'saswp_review_location_id' => $place_id,
|
478 |
-
'saswp_review_time' => $review['time'],
|
479 |
-
'saswp_review_rating' => $review['rating'],
|
480 |
-
'saswp_review_text' => $review['text'],
|
481 |
-
'saswp_reviewer_lang' => $review['language'],
|
482 |
-
'saswp_reviewer_name' => $review['author_name'],
|
483 |
-
'saswp_review_link' => isset($review['author_url']) ? $review['author_url'] : null,
|
484 |
-
'saswp_reviewer_image' => isset($review['profile_photo_url']) ? $review['profile_photo_url'] : null,
|
485 |
-
'saswp_reviewer_image_detail' => $media_detail
|
486 |
-
);
|
487 |
-
|
488 |
-
if($post_id && !empty($review_meta) && is_array($review_meta)){
|
489 |
-
|
490 |
-
foreach ($review_meta as $key => $val){
|
491 |
-
update_post_meta($post_id, $key, $val);
|
492 |
-
}
|
493 |
-
|
494 |
-
}
|
495 |
-
|
496 |
-
}
|
497 |
-
}
|
498 |
-
|
499 |
-
if(!empty($place_saved) || !empty($reviews_saved)){
|
500 |
-
return true;
|
501 |
-
}else{
|
502 |
-
return false;
|
503 |
-
}
|
504 |
-
|
505 |
-
}
|
506 |
-
|
507 |
-
public function saswp_get_free_reviews_data($place_id, $g_api){
|
508 |
-
|
509 |
-
$result = @wp_remote_get('https://maps.googleapis.com/maps/api/place/details/json?placeid='.trim($place_id).'&key='.trim($g_api));
|
510 |
-
|
511 |
-
if(isset($result['body'])){
|
512 |
-
|
513 |
-
$result = json_decode($result['body'],true);
|
514 |
-
|
515 |
-
if($result['result']){
|
516 |
-
|
517 |
-
$response = $this->saswp_save_free_reviews_data($result['result'], $place_id);
|
518 |
-
|
519 |
-
if($response){
|
520 |
-
return array('status' => true, 'message' => esc_html__( 'Fetched Successfully', 'schema-and-structured-data-for-wp' ));
|
521 |
-
}else{
|
522 |
-
return array('status' => false, 'message' => esc_html__( 'Not fetched', 'schema-and-structured-data-for-wp' ));
|
523 |
-
}
|
524 |
-
|
525 |
-
}else{
|
526 |
-
if($result['error_message']){
|
527 |
-
return array('status' => false, 'message' => $result['error_message']);
|
528 |
-
}else{
|
529 |
-
return array('status' => false, 'message' => esc_html__( 'Something went wrong', 'schema-and-structured-data-for-wp' ));
|
530 |
-
}
|
531 |
-
}
|
532 |
-
|
533 |
-
}else{
|
534 |
-
return null;
|
535 |
-
}
|
536 |
-
|
537 |
-
}
|
538 |
-
|
539 |
-
}
|
540 |
-
|
541 |
-
$saswp_service_obj = new saswp_reviews_service();
|
542 |
-
$saswp_service_obj->saswp_service_hooks();
|
543 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Newsletter class
|
4 |
+
*
|
5 |
+
* @author Magazine3
|
6 |
+
* @category Admin
|
7 |
+
* @path reviews/reviews_service
|
8 |
+
* @Version 1.9
|
9 |
+
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
13 |
+
|
14 |
+
class saswp_reviews_service {
|
15 |
+
|
16 |
+
/**
|
17 |
+
* List of hooks used in this context
|
18 |
+
*/
|
19 |
+
public function saswp_service_hooks(){
|
20 |
+
add_action( 'wp_ajax_saswp_fetch_google_reviews', array($this,'saswp_fetch_google_reviews'));
|
21 |
+
add_shortcode( 'saswp-reviews', array($this, 'saswp_reviews_shortcode' ));
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Function to get reviews schema markup
|
26 |
+
* @global type $sd_data
|
27 |
+
* @return string
|
28 |
+
*/
|
29 |
+
public function saswp_get_reviews_schema_markup($reviews){
|
30 |
+
|
31 |
+
global $sd_data;
|
32 |
+
|
33 |
+
$sumofrating = 0;
|
34 |
+
$avg_rating = 1;
|
35 |
+
|
36 |
+
if($reviews){
|
37 |
+
|
38 |
+
foreach($reviews as $rv){
|
39 |
+
$sumofrating += $rv['saswp_review_rating'];
|
40 |
+
}
|
41 |
+
|
42 |
+
if($sumofrating> 0){
|
43 |
+
$avg_rating = $sumofrating / count($reviews);
|
44 |
+
}
|
45 |
+
|
46 |
+
}
|
47 |
+
|
48 |
+
$html = '';
|
49 |
+
$date = get_the_date("Y-m-d\TH:i:s\Z");
|
50 |
+
$modified_date = get_the_modified_date("Y-m-d\TH:i:s\Z");
|
51 |
+
|
52 |
+
$input1 = array(
|
53 |
+
'@context' => 'http://schema.org',
|
54 |
+
'@type' => 'Review',
|
55 |
+
'dateCreated' => esc_html($date),
|
56 |
+
'datePublished' => esc_html($date),
|
57 |
+
'dateModified' => esc_html($modified_date),
|
58 |
+
'headline' => saswp_get_the_title(),
|
59 |
+
'name' => saswp_get_the_title(),
|
60 |
+
'url' => get_permalink(),
|
61 |
+
'description' => saswp_get_the_excerpt(),
|
62 |
+
'copyrightYear' => get_the_time( 'Y' ),
|
63 |
+
'author' => saswp_get_author_details()
|
64 |
+
);
|
65 |
+
|
66 |
+
$input1['itemReviewed'] = array(
|
67 |
+
'@type' => 'Thing',
|
68 |
+
'name' => saswp_get_the_title(),
|
69 |
+
);
|
70 |
+
|
71 |
+
$input1['reviewRating'] = array(
|
72 |
+
'@type' => 'Rating',
|
73 |
+
'worstRating' => 1,
|
74 |
+
'bestRating' => 5,
|
75 |
+
'ratingValue' => esc_attr($avg_rating),
|
76 |
+
);
|
77 |
+
|
78 |
+
if(!empty($input1)){
|
79 |
+
|
80 |
+
$html .= "\n";
|
81 |
+
$html .= '<!-- Schema & Structured Data For Reviews v'.esc_attr(SASWP_VERSION).' - -->';
|
82 |
+
$html .= "\n";
|
83 |
+
$html .= '<script type="application/ld+json" class="saswp-reviews-markup">';
|
84 |
+
$html .= "\n";
|
85 |
+
$html .= saswp_json_print_format($input1);
|
86 |
+
$html .= "\n";
|
87 |
+
$html .= '</script>';
|
88 |
+
$html .= "\n\n";
|
89 |
+
|
90 |
+
}
|
91 |
+
|
92 |
+
return $html;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Function to generate reviews html
|
97 |
+
* @param type $reviews
|
98 |
+
* @return string
|
99 |
+
*/
|
100 |
+
public function saswp_reviews_html_markup($reviews){
|
101 |
+
|
102 |
+
$output = '';
|
103 |
+
if($reviews){
|
104 |
+
|
105 |
+
foreach ($reviews as $review){
|
106 |
+
|
107 |
+
$review_rating = $review['saswp_review_rating'];
|
108 |
+
|
109 |
+
$starating = saswp_get_rating_html_by_value($review_rating);
|
110 |
+
|
111 |
+
$term = get_term( $review['saswp_review_platform'], 'platform' );
|
112 |
+
$term_slug = '';
|
113 |
+
|
114 |
+
if(is_object($term)){
|
115 |
+
$term_slug = $term->slug;
|
116 |
+
}
|
117 |
+
if($term_slug == ''){
|
118 |
+
$term_slug = 'google';
|
119 |
+
}
|
120 |
+
|
121 |
+
$output.= '<div class="saswp-g-review-panel">
|
122 |
+
<div class="saswp-glg-review-body">
|
123 |
+
<div class="saswp-rv-img">
|
124 |
+
<img src="'.esc_url($review['saswp_reviewer_image']).'" alt="'.$review['saswp_reviewer_name'].'">
|
125 |
+
</div>
|
126 |
+
<div class="saswp-rv-cnt">
|
127 |
+
<div class="saswp-str-rtng">
|
128 |
+
<div class="saswp-str">
|
129 |
+
<span class="saswp-athr">'.$review['saswp_reviewer_name'].'</span>
|
130 |
+
'.$starating.'
|
131 |
+
</div>
|
132 |
+
<span class="saswp-g-plus">
|
133 |
+
<a href="#"><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/'.esc_attr($term_slug).'-img.png'.'"></a>
|
134 |
+
</span>
|
135 |
+
</div>
|
136 |
+
<p>'.substr($review['saswp_review_text'],0,300).'</p>
|
137 |
+
</div>
|
138 |
+
</div>
|
139 |
+
</div>';
|
140 |
+
|
141 |
+
}
|
142 |
+
|
143 |
+
wp_enqueue_style( 'saswp-style', SASWP_PLUGIN_URL . 'admin_section/css/saswp-style.min.css', false , SASWP_VERSION );
|
144 |
+
|
145 |
+
}
|
146 |
+
return $output;
|
147 |
+
|
148 |
+
}
|
149 |
+
|
150 |
+
public function saswp_fetch_google_reviews(){
|
151 |
+
|
152 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
153 |
+
return;
|
154 |
+
}
|
155 |
+
|
156 |
+
if ( ! isset( $_POST['saswp_security_nonce'] ) ){
|
157 |
+
return;
|
158 |
+
}
|
159 |
+
|
160 |
+
if ( !wp_verify_nonce( $_POST['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
|
161 |
+
return;
|
162 |
+
}
|
163 |
+
|
164 |
+
global $sd_data;
|
165 |
+
|
166 |
+
$location = $blocks = $premium_status = $g_api = $reviews_api = $reviews_api_status = '';
|
167 |
+
|
168 |
+
if(isset($_POST['reviews_api'])){
|
169 |
+
$reviews_api = sanitize_text_field($_POST['reviews_api']);
|
170 |
+
}
|
171 |
+
|
172 |
+
if(isset($_POST['reviews_api_status'])){
|
173 |
+
$reviews_api_status = sanitize_text_field($_POST['reviews_api_status']);
|
174 |
+
}
|
175 |
+
|
176 |
+
if(isset($_POST['location'])){
|
177 |
+
$location = sanitize_text_field($_POST['location']);
|
178 |
+
}
|
179 |
+
|
180 |
+
if(isset($_POST['g_api'])){
|
181 |
+
$g_api = sanitize_text_field($_POST['g_api']);
|
182 |
+
}
|
183 |
+
|
184 |
+
if(isset($_POST['premium_status'])){
|
185 |
+
$premium_status = sanitize_text_field($_POST['premium_status']);
|
186 |
+
}
|
187 |
+
|
188 |
+
if(isset($_POST['blocks'])){
|
189 |
+
$blocks = intval($_POST['blocks']);
|
190 |
+
}
|
191 |
+
|
192 |
+
if($location){
|
193 |
+
|
194 |
+
if(isset($sd_data['saswp_reviews_location_name'])){
|
195 |
+
|
196 |
+
if(!in_array($location, $sd_data['saswp_reviews_location_name'])){
|
197 |
+
array_push($sd_data['saswp_reviews_location_name'], $location);
|
198 |
+
}
|
199 |
+
|
200 |
+
}else{
|
201 |
+
$sd_data['saswp_reviews_location_name'] = array($location);
|
202 |
+
|
203 |
+
}
|
204 |
+
|
205 |
+
if(isset($sd_data['saswp_reviews_location_blocks'])){
|
206 |
+
|
207 |
+
if(!in_array($blocks, $sd_data['saswp_reviews_location_blocks'])){
|
208 |
+
array_push($sd_data['saswp_reviews_location_blocks'], $blocks);
|
209 |
+
}
|
210 |
+
|
211 |
+
}else{
|
212 |
+
|
213 |
+
$sd_data['saswp_reviews_location_blocks'] = array($blocks);
|
214 |
+
|
215 |
+
}
|
216 |
+
|
217 |
+
$sd_data['saswp-google-review'] = 1;
|
218 |
+
$sd_data['saswp_google_place_api_key'] = $g_api;
|
219 |
+
update_option('sd_data', $sd_data);
|
220 |
+
|
221 |
+
$result = null;
|
222 |
+
$user_id = get_option('reviews_addon_user_id');
|
223 |
+
|
224 |
+
if($reviews_api){
|
225 |
+
|
226 |
+
if($premium_status == 'premium'){
|
227 |
+
|
228 |
+
if($reviews_api_status == 'active'){
|
229 |
+
|
230 |
+
if($user_id){
|
231 |
+
|
232 |
+
if(function_exists('saswp_get_paid_reviews_data')){
|
233 |
+
|
234 |
+
$result = saswp_get_paid_reviews_data($location, $reviews_api, $user_id, $blocks);
|
235 |
+
|
236 |
+
if($result['status'] && is_numeric($result['message'])){
|
237 |
+
|
238 |
+
$rv_limits = get_option('reviews_addon_reviews_limits');
|
239 |
+
|
240 |
+
$result['message'] = 'Reviews fetched : '. $rv_limits - $result['message']. ', Remains Limit : '.$result['message'];
|
241 |
+
|
242 |
+
update_option('reviews_addon_reviews_limits', intval($result['message']));
|
243 |
+
}
|
244 |
+
|
245 |
+
}else{
|
246 |
+
$result['status'] = false;
|
247 |
+
$result['message'] = esc_html__( 'Reviews for schema plugin is not activated', 'schema-and-structured-data-for-wp' );
|
248 |
+
}
|
249 |
+
|
250 |
+
}else{
|
251 |
+
$result['status'] = false;
|
252 |
+
$result['message'] = esc_html__( 'User is not register', 'schema-and-structured-data-for-wp' );
|
253 |
+
}
|
254 |
+
|
255 |
+
}else{
|
256 |
+
$result['status'] = false;
|
257 |
+
$result['message'] = esc_html__( 'License key is not active', 'schema-and-structured-data-for-wp' );
|
258 |
+
}
|
259 |
+
|
260 |
+
|
261 |
+
}else{
|
262 |
+
|
263 |
+
if($g_api){
|
264 |
+
|
265 |
+
$result = $this->saswp_get_free_reviews_data($location, $g_api);
|
266 |
+
|
267 |
+
}
|
268 |
+
|
269 |
+
}
|
270 |
+
|
271 |
+
}else{
|
272 |
+
|
273 |
+
if($g_api){
|
274 |
+
|
275 |
+
$result = $this->saswp_get_free_reviews_data($location, $g_api);
|
276 |
+
}
|
277 |
+
|
278 |
+
}
|
279 |
+
|
280 |
+
echo json_encode($result);
|
281 |
+
|
282 |
+
}else{
|
283 |
+
|
284 |
+
echo json_encode(array('status' => false, 'message' => esc_html__( 'Place id is empty', 'schema-and-structured-data-for-wp' )));
|
285 |
+
|
286 |
+
}
|
287 |
+
|
288 |
+
wp_die();
|
289 |
+
|
290 |
+
}
|
291 |
+
|
292 |
+
/**
|
293 |
+
* Function to show value using shortcode "saswp-reviews"
|
294 |
+
* @param type $attr
|
295 |
+
* @return type
|
296 |
+
*/
|
297 |
+
public function saswp_reviews_front_output($attr){
|
298 |
+
|
299 |
+
|
300 |
+
$arg = array();
|
301 |
+
$arg['post_type'] = 'saswp_reviews';
|
302 |
+
$arg['posts_per_page'] = -1;
|
303 |
+
$arg['post_status'] = 'publish';
|
304 |
+
|
305 |
+
if(isset($attr['id'])){
|
306 |
+
$arg['attachment_id'] = $attr['id'];
|
307 |
+
}
|
308 |
+
if(isset($attr['title'])){
|
309 |
+
$arg['title'] = $attr['title'];
|
310 |
+
}
|
311 |
+
if(isset($attr['count'])){
|
312 |
+
$arg['posts_per_page'] = $attr['count'];
|
313 |
+
}
|
314 |
+
|
315 |
+
$meta_query = array();
|
316 |
+
|
317 |
+
if(isset($attr['rating'])){
|
318 |
+
$meta_query[] = array(
|
319 |
+
'key' => 'saswp_review_rating',
|
320 |
+
'value' => $attr['rating'],
|
321 |
+
'compare' => '='
|
322 |
+
);
|
323 |
+
}
|
324 |
+
if(isset($attr['platform'])){
|
325 |
+
$term = get_term_by( 'slug', $attr['platform'], 'platform' );
|
326 |
+
|
327 |
+
$meta_query[] = array(
|
328 |
+
'key' => 'saswp_review_platform',
|
329 |
+
'value' => $term->term_id,
|
330 |
+
'compare' => '='
|
331 |
+
);
|
332 |
+
}
|
333 |
+
|
334 |
+
$meta_query_args = array(
|
335 |
+
array(
|
336 |
+
'relation' => 'AND',
|
337 |
+
$meta_query
|
338 |
+
)
|
339 |
+
);
|
340 |
+
|
341 |
+
$arg['meta_query'] = $meta_query_args;
|
342 |
+
|
343 |
+
$posts_list = get_posts($arg);
|
344 |
+
|
345 |
+
$reviews = array();
|
346 |
+
|
347 |
+
$post_meta = array(
|
348 |
+
'saswp_reviewer_image',
|
349 |
+
'saswp_reviewer_name',
|
350 |
+
'saswp_review_rating',
|
351 |
+
'saswp_review_date',
|
352 |
+
'saswp_review_text',
|
353 |
+
'saswp_review_link',
|
354 |
+
'saswp_review_platform',
|
355 |
+
);
|
356 |
+
|
357 |
+
if($posts_list){
|
358 |
+
|
359 |
+
foreach($posts_list as $post){
|
360 |
+
|
361 |
+
$review_data = array();
|
362 |
+
$post_id = $post->ID;
|
363 |
+
|
364 |
+
foreach($post_meta as $meta_key){
|
365 |
+
|
366 |
+
$review_data[$meta_key] = get_post_meta($post_id, $meta_key, true );
|
367 |
+
|
368 |
+
}
|
369 |
+
$reviews[] = $review_data;
|
370 |
+
}
|
371 |
+
}
|
372 |
+
$output = $schema_markup = '';
|
373 |
+
|
374 |
+
if($reviews){
|
375 |
+
|
376 |
+
$output = $this->saswp_reviews_html_markup($reviews);
|
377 |
+
|
378 |
+
if(saswp_global_option()){
|
379 |
+
|
380 |
+
$schema_markup = $this->saswp_get_reviews_schema_markup($reviews);
|
381 |
+
|
382 |
+
if($schema_markup){
|
383 |
+
$output = $output.$schema_markup;
|
384 |
+
|
385 |
+
}
|
386 |
+
|
387 |
+
}
|
388 |
+
|
389 |
+
}
|
390 |
+
|
391 |
+
return $output;
|
392 |
+
|
393 |
+
}
|
394 |
+
|
395 |
+
public function saswp_reviews_shortcode($attr){
|
396 |
+
|
397 |
+
$response = $this->saswp_reviews_front_output($attr);
|
398 |
+
|
399 |
+
return $response;
|
400 |
+
|
401 |
+
}
|
402 |
+
|
403 |
+
public function saswp_save_free_reviews_data($result, $place_id) {
|
404 |
+
|
405 |
+
$place_saved = array();
|
406 |
+
$reviews_saved = array();
|
407 |
+
|
408 |
+
if (isset($result['place_id']) && $result['place_id'] != '') {
|
409 |
+
|
410 |
+
$user_id = get_current_user_id();
|
411 |
+
$postarr = array(
|
412 |
+
'post_author' => $user_id,
|
413 |
+
'post_title' => $result['name'],
|
414 |
+
'post_status' => 'publish',
|
415 |
+
'post_name' => $result['name'],
|
416 |
+
'post_type' => 'saswp_rvs_location',
|
417 |
+
|
418 |
+
);
|
419 |
+
|
420 |
+
$post_id = wp_insert_post( $postarr );
|
421 |
+
$place_saved[] = $post_id;
|
422 |
+
$review_meta = array(
|
423 |
+
'saswp_rvs_loc_id' => $result['place_id'],
|
424 |
+
'saswp_rvs_loc_review_count' => $result['user_ratings_total'],
|
425 |
+
'saswp_rvs_loc_avg_rating' => $result['rating'],
|
426 |
+
'saswp_rvs_loc_icon' => $result['icon'],
|
427 |
+
'saswp_rvs_loc_address' => $result['formatted_address'],
|
428 |
+
);
|
429 |
+
|
430 |
+
if($post_id && !empty($review_meta) && is_array($review_meta)){
|
431 |
+
|
432 |
+
foreach ($review_meta as $key => $val){
|
433 |
+
update_post_meta($post_id, $key, $val);
|
434 |
+
}
|
435 |
+
|
436 |
+
}
|
437 |
+
|
438 |
+
}
|
439 |
+
|
440 |
+
|
441 |
+
if (isset($result['reviews'])) {
|
442 |
+
|
443 |
+
$reviews = $result['reviews'];
|
444 |
+
|
445 |
+
foreach ($reviews as $review) {
|
446 |
+
|
447 |
+
$user_id = get_current_user_id();
|
448 |
+
$postarr = array(
|
449 |
+
'post_author' => $user_id,
|
450 |
+
'post_title' => $review['author_name'],
|
451 |
+
'post_status' => 'publish',
|
452 |
+
'post_name' => 'Default Review',
|
453 |
+
'post_type' => 'saswp_reviews',
|
454 |
+
|
455 |
+
);
|
456 |
+
|
457 |
+
$post_id = wp_insert_post( $postarr );
|
458 |
+
$reviews_saved[] = $post_id;
|
459 |
+
$term = get_term_by( 'slug','google', 'platform' );
|
460 |
+
|
461 |
+
$media_detail = array();
|
462 |
+
|
463 |
+
if(isset($review['profile_photo_url'])){
|
464 |
+
|
465 |
+
$image_details = saswp_get_attachment_details(array($review['profile_photo_url']));
|
466 |
+
|
467 |
+
$media_detail = array(
|
468 |
+
'width' => $image_details[0][0],
|
469 |
+
'height' => $image_details[0][1],
|
470 |
+
'thumbnail' => $review['profile_photo_url'],
|
471 |
+
);
|
472 |
+
|
473 |
+
}
|
474 |
+
|
475 |
+
$review_meta = array(
|
476 |
+
'saswp_review_platform' => $term->term_id,
|
477 |
+
'saswp_review_location_id' => $place_id,
|
478 |
+
'saswp_review_time' => $review['time'],
|
479 |
+
'saswp_review_rating' => $review['rating'],
|
480 |
+
'saswp_review_text' => $review['text'],
|
481 |
+
'saswp_reviewer_lang' => $review['language'],
|
482 |
+
'saswp_reviewer_name' => $review['author_name'],
|
483 |
+
'saswp_review_link' => isset($review['author_url']) ? $review['author_url'] : null,
|
484 |
+
'saswp_reviewer_image' => isset($review['profile_photo_url']) ? $review['profile_photo_url'] : null,
|
485 |
+
'saswp_reviewer_image_detail' => $media_detail
|
486 |
+
);
|
487 |
+
|
488 |
+
if($post_id && !empty($review_meta) && is_array($review_meta)){
|
489 |
+
|
490 |
+
foreach ($review_meta as $key => $val){
|
491 |
+
update_post_meta($post_id, $key, $val);
|
492 |
+
}
|
493 |
+
|
494 |
+
}
|
495 |
+
|
496 |
+
}
|
497 |
+
}
|
498 |
+
|
499 |
+
if(!empty($place_saved) || !empty($reviews_saved)){
|
500 |
+
return true;
|
501 |
+
}else{
|
502 |
+
return false;
|
503 |
+
}
|
504 |
+
|
505 |
+
}
|
506 |
+
|
507 |
+
public function saswp_get_free_reviews_data($place_id, $g_api){
|
508 |
+
|
509 |
+
$result = @wp_remote_get('https://maps.googleapis.com/maps/api/place/details/json?placeid='.trim($place_id).'&key='.trim($g_api));
|
510 |
+
|
511 |
+
if(isset($result['body'])){
|
512 |
+
|
513 |
+
$result = json_decode($result['body'],true);
|
514 |
+
|
515 |
+
if($result['result']){
|
516 |
+
|
517 |
+
$response = $this->saswp_save_free_reviews_data($result['result'], $place_id);
|
518 |
+
|
519 |
+
if($response){
|
520 |
+
return array('status' => true, 'message' => esc_html__( 'Fetched Successfully', 'schema-and-structured-data-for-wp' ));
|
521 |
+
}else{
|
522 |
+
return array('status' => false, 'message' => esc_html__( 'Not fetched', 'schema-and-structured-data-for-wp' ));
|
523 |
+
}
|
524 |
+
|
525 |
+
}else{
|
526 |
+
if($result['error_message']){
|
527 |
+
return array('status' => false, 'message' => $result['error_message']);
|
528 |
+
}else{
|
529 |
+
return array('status' => false, 'message' => esc_html__( 'Something went wrong', 'schema-and-structured-data-for-wp' ));
|
530 |
+
}
|
531 |
+
}
|
532 |
+
|
533 |
+
}else{
|
534 |
+
return null;
|
535 |
+
}
|
536 |
+
|
537 |
+
}
|
538 |
+
|
539 |
+
}
|
540 |
+
|
541 |
+
$saswp_service_obj = new saswp_reviews_service();
|
542 |
+
$saswp_service_obj->saswp_service_hooks();
|
543 |
?>
|
structured-data-for-wp.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Schema & Structured Data for WP
|
4 |
Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
|
5 |
-
Version: 1.9
|
6 |
Text Domain: schema-and-structured-data-for-wp
|
7 |
Domain Path: /languages
|
8 |
Author: Magazine3
|
@@ -13,7 +13,7 @@ License: GPL2
|
|
13 |
// Exit if accessed directly.
|
14 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
15 |
|
16 |
-
define('SASWP_VERSION', '1.9');
|
17 |
define('SASWP_DIR_NAME_FILE', __FILE__ );
|
18 |
define('SASWP_DIR_NAME', dirname( __FILE__ ));
|
19 |
define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
|
@@ -72,6 +72,7 @@ require_once SASWP_DIR_NAME.'/view/post_specific.php';
|
|
72 |
require_once SASWP_DIR_NAME.'/view/review.php';
|
73 |
require_once SASWP_DIR_NAME.'/output/review-output.php';
|
74 |
require_once SASWP_DIR_NAME.'/output/service.php';
|
|
|
75 |
//Loading Reviews files
|
76 |
require_once SASWP_DIR_NAME.'/reviews/reviews_admin.php';
|
77 |
require_once SASWP_DIR_NAME.'/reviews/reviews_setup.php';
|
@@ -143,8 +144,8 @@ function saswp_admin_notice(){
|
|
143 |
?>
|
144 |
<div class="updated notice is-dismissible message notice notice-alt saswp-feedback-notice">
|
145 |
<p>
|
146 |
-
<span><?php echo esc_html__('You have not
|
147 |
-
<a href="<?php echo esc_url( admin_url( 'admin.php?page=structured_data_options&tab=general' ) ); ?>"> <?php echo esc_html__('Please Setup', 'schema-and-structured-data-for-wp') ?></a>
|
148 |
</p>
|
149 |
</div>
|
150 |
|
2 |
/*
|
3 |
Plugin Name: Schema & Structured Data for WP
|
4 |
Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
|
5 |
+
Version: 1.9.1
|
6 |
Text Domain: schema-and-structured-data-for-wp
|
7 |
Domain Path: /languages
|
8 |
Author: Magazine3
|
13 |
// Exit if accessed directly.
|
14 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
15 |
|
16 |
+
define('SASWP_VERSION', '1.9.1');
|
17 |
define('SASWP_DIR_NAME_FILE', __FILE__ );
|
18 |
define('SASWP_DIR_NAME', dirname( __FILE__ ));
|
19 |
define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
|
72 |
require_once SASWP_DIR_NAME.'/view/review.php';
|
73 |
require_once SASWP_DIR_NAME.'/output/review-output.php';
|
74 |
require_once SASWP_DIR_NAME.'/output/service.php';
|
75 |
+
require_once SASWP_DIR_NAME.'/output/compatibility.php';
|
76 |
//Loading Reviews files
|
77 |
require_once SASWP_DIR_NAME.'/reviews/reviews_admin.php';
|
78 |
require_once SASWP_DIR_NAME.'/reviews/reviews_setup.php';
|
144 |
?>
|
145 |
<div class="updated notice is-dismissible message notice notice-alt saswp-feedback-notice">
|
146 |
<p>
|
147 |
+
<span><?php echo esc_html__('You have not set up default image in Schema & Structured Data For WP.', 'schema-and-structured-data-for-wp') ?> </span>
|
148 |
+
<a href="<?php echo esc_url( admin_url( 'admin.php?page=structured_data_options&tab=general#saswp-default-container' ) ); ?>"> <?php echo esc_html__('Please Setup', 'schema-and-structured-data-for-wp') ?></a>
|
149 |
</p>
|
150 |
</div>
|
151 |
|
view/paywall.php
CHANGED
@@ -42,7 +42,10 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
42 |
wp_nonce_field( 'saswp_schema_options_nonce', 'saswp_schema_options_nonce' );
|
43 |
|
44 |
$schema_options = esc_sql ( get_post_meta($post->ID, 'schema_options', true) );
|
45 |
-
|
|
|
|
|
|
|
46 |
|
47 |
?>
|
48 |
|
@@ -81,21 +84,21 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
81 |
<tr><td><label><?php echo esc_html__( 'Modify Schema Output', 'schema-and-structured-data-for-wp' ) ?></label></td><td><input type="checkbox" id="saswp_enable_custom_field" name="saswp_enable_custom_field" value="1" <?php if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field']==1){echo 'checked'; }?>></td></tr>
|
82 |
</table>
|
83 |
<div class="saswp-custom-fields-div" <?php if(!isset($schema_options['enable_custom_field']) || $schema_options['enable_custom_field'] ==0){echo 'style="display:none;"'; }?>>
|
84 |
-
<table class="
|
85 |
|
86 |
<?php
|
87 |
|
88 |
-
if(!empty($
|
89 |
|
90 |
$schema_type = esc_sql ( get_post_meta($post->ID, 'schema_type', true) );
|
91 |
|
92 |
$service = new saswp_output_service();
|
93 |
$meta_fields = $service->saswp_get_all_schema_type_fields($schema_type);
|
94 |
|
95 |
-
foreach($
|
96 |
|
97 |
$option = '';
|
98 |
-
echo '<tr>';
|
99 |
echo '<td><select class="saswp-custom-fields-name">';
|
100 |
|
101 |
foreach ($meta_fields as $key =>$val){
|
@@ -112,13 +115,54 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
112 |
|
113 |
}
|
114 |
|
115 |
-
echo $option;
|
116 |
-
echo '</select></td>';
|
117 |
|
118 |
-
echo
|
119 |
-
echo '
|
120 |
-
echo '</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
echo '</tr>';
|
123 |
|
124 |
}
|
@@ -159,9 +203,13 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
159 |
if ( isset( $_POST['paywall_class_name'] ) )
|
160 |
$paywall_class_name = sanitize_text_field($_POST['paywall_class_name']);
|
161 |
if ( isset( $_POST['saswp_enable_custom_field'] ) )
|
162 |
-
$enable_custom_field = sanitize_text_field($_POST['saswp_enable_custom_field']);
|
163 |
-
if ( isset( $_POST['
|
164 |
-
|
|
|
|
|
|
|
|
|
165 |
|
166 |
$saswp_schema_options = array(
|
167 |
'isAccessibleForFree' => $isAccessibleForFree,
|
@@ -171,7 +219,10 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
171 |
);
|
172 |
|
173 |
update_post_meta( $post_id, 'schema_options', $saswp_schema_options);
|
174 |
-
|
|
|
|
|
|
|
175 |
|
176 |
|
177 |
}
|
42 |
wp_nonce_field( 'saswp_schema_options_nonce', 'saswp_schema_options_nonce' );
|
43 |
|
44 |
$schema_options = esc_sql ( get_post_meta($post->ID, 'schema_options', true) );
|
45 |
+
|
46 |
+
$meta_list = esc_sql ( get_post_meta($post->ID, 'saswp_meta_list_val', true) );
|
47 |
+
$fixed_text = esc_sql ( get_post_meta($post->ID, 'saswp_fixed_text', true) );
|
48 |
+
$cus_field = esc_sql ( get_post_meta($post->ID, 'saswp_custom_meta_field', true) );
|
49 |
|
50 |
?>
|
51 |
|
84 |
<tr><td><label><?php echo esc_html__( 'Modify Schema Output', 'schema-and-structured-data-for-wp' ) ?></label></td><td><input type="checkbox" id="saswp_enable_custom_field" name="saswp_enable_custom_field" value="1" <?php if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field']==1){echo 'checked'; }?>></td></tr>
|
85 |
</table>
|
86 |
<div class="saswp-custom-fields-div" <?php if(!isset($schema_options['enable_custom_field']) || $schema_options['enable_custom_field'] ==0){echo 'style="display:none;"'; }?>>
|
87 |
+
<table class="saswp-custom-fields-table">
|
88 |
|
89 |
<?php
|
90 |
|
91 |
+
if(!empty($meta_list)){
|
92 |
|
93 |
$schema_type = esc_sql ( get_post_meta($post->ID, 'schema_type', true) );
|
94 |
|
95 |
$service = new saswp_output_service();
|
96 |
$meta_fields = $service->saswp_get_all_schema_type_fields($schema_type);
|
97 |
|
98 |
+
foreach($meta_list as $fieldkey => $fieldval){
|
99 |
|
100 |
$option = '';
|
101 |
+
echo '<tr>';
|
102 |
echo '<td><select class="saswp-custom-fields-name">';
|
103 |
|
104 |
foreach ($meta_fields as $key =>$val){
|
115 |
|
116 |
}
|
117 |
|
|
|
|
|
118 |
|
119 |
+
echo $option;
|
120 |
+
echo '</select>';
|
121 |
+
echo '</td>';
|
122 |
+
|
123 |
+
$list_html = '';
|
124 |
+
$meta_list_fields = include(SASWP_DIR_NAME . '/core/array-list/meta_list.php');
|
125 |
+
|
126 |
+
$meta_list_arr = $meta_list_fields['text'];
|
127 |
+
|
128 |
+
if (strpos($fieldkey, 'image') !== false) {
|
129 |
+
$meta_list_arr = $meta_list_fields['image'];
|
130 |
+
}
|
131 |
+
|
132 |
+
foreach($meta_list_arr as $list){
|
133 |
|
134 |
+
$list_html.= '<optgroup label="'.$list['label'].'">';
|
135 |
+
|
136 |
+
foreach ($list['meta-list'] as $key => $val){
|
137 |
+
|
138 |
+
if( $fieldval == $key){
|
139 |
+
$list_html.= '<option value="'.esc_attr($key).'" selected>'.esc_html($val).'</option>';
|
140 |
+
}else{
|
141 |
+
$list_html.= '<option value="'.esc_attr($key).'">'.esc_html($val).'</option>';
|
142 |
+
}
|
143 |
+
|
144 |
+
}
|
145 |
+
|
146 |
+
$list_html.= '</optgroup>';
|
147 |
+
|
148 |
+
}
|
149 |
+
echo '<td>';
|
150 |
+
echo '<select class="saswp-custom-meta-list" name="saswp_meta_list_val['.$fieldkey.']">';
|
151 |
+
echo $list_html;
|
152 |
+
echo '</select>';
|
153 |
+
echo '</td>';
|
154 |
+
|
155 |
+
|
156 |
+
if($fieldval == 'manual_text'){
|
157 |
+
echo '<td><input type="text" name="saswp_fixed_text['.esc_attr($fieldkey).']" value="'.esc_html($fixed_text[$fieldkey]).'"></td>';
|
158 |
+
}
|
159 |
+
|
160 |
+
if($fieldval == 'custom_field'){
|
161 |
+
echo '<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['.esc_attr($fieldkey).']">';
|
162 |
+
echo '<option value="'.esc_attr($cus_field[$fieldkey]).'">'.preg_replace( '/^_/', '', esc_html( str_replace( '_', ' ', $cus_field[$fieldkey] ) ) ).'</option>';
|
163 |
+
echo '</select></td>';
|
164 |
+
}
|
165 |
+
|
166 |
echo '</tr>';
|
167 |
|
168 |
}
|
203 |
if ( isset( $_POST['paywall_class_name'] ) )
|
204 |
$paywall_class_name = sanitize_text_field($_POST['paywall_class_name']);
|
205 |
if ( isset( $_POST['saswp_enable_custom_field'] ) )
|
206 |
+
$enable_custom_field = sanitize_text_field($_POST['saswp_enable_custom_field']);
|
207 |
+
if ( isset( $_POST['saswp_meta_list_val'] ) )
|
208 |
+
$meta_list = array_map ('sanitize_text_field', $_POST['saswp_meta_list_val']);
|
209 |
+
if ( isset( $_POST['saswp_fixed_text'] ) )
|
210 |
+
$fixed_text = array_map ('sanitize_text_field', $_POST['saswp_fixed_text']);
|
211 |
+
if ( isset( $_POST['saswp_custom_meta_field'] ) )
|
212 |
+
$cus_meta_field = array_map ('sanitize_text_field', $_POST['saswp_custom_meta_field']);
|
213 |
|
214 |
$saswp_schema_options = array(
|
215 |
'isAccessibleForFree' => $isAccessibleForFree,
|
219 |
);
|
220 |
|
221 |
update_post_meta( $post_id, 'schema_options', $saswp_schema_options);
|
222 |
+
|
223 |
+
update_post_meta( $post_id, 'saswp_meta_list_val', $meta_list);
|
224 |
+
update_post_meta( $post_id, 'saswp_fixed_text', $fixed_text);
|
225 |
+
update_post_meta( $post_id, 'saswp_custom_meta_field', $cus_meta_field);
|
226 |
|
227 |
|
228 |
}
|
view/post_specific.php
CHANGED
@@ -18,7 +18,8 @@ class saswp_post_specific {
|
|
18 |
protected $all_schema = null;
|
19 |
protected $options_response = array();
|
20 |
protected $modify_schema_post_enable = false;
|
21 |
-
|
|
|
22 |
private $schema_type_element = array(
|
23 |
'FAQ' => array(
|
24 |
'faq-question' => 'faq_question',
|
@@ -43,6 +44,17 @@ class saswp_post_specific {
|
|
43 |
)
|
44 |
);
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
/**
|
47 |
* List of hooks used in this context
|
48 |
*/
|
@@ -1331,183 +1343,17 @@ class saswp_post_specific {
|
|
1331 |
return;
|
1332 |
}
|
1333 |
$business_type = sanitize_text_field($_GET['business_type']);
|
1334 |
-
|
1335 |
-
$response = $this->
|
1336 |
|
1337 |
-
if($response){
|
1338 |
-
$this->options_response = $response;
|
1339 |
echo json_encode(array('status'=>'t', 'result'=>$response));
|
1340 |
}else{
|
1341 |
echo json_encode(array('status'=>'f', 'result'=>'data not available'));
|
1342 |
}
|
1343 |
wp_die();
|
1344 |
}
|
1345 |
-
|
1346 |
-
* Function to get fields as an array of sub business(LocalBusiness Schema)
|
1347 |
-
* @param type $business_type
|
1348 |
-
* @return array
|
1349 |
-
* @since version 1.0.4
|
1350 |
-
*/
|
1351 |
-
public function saswp_get_sub_business_array($business_type){
|
1352 |
-
|
1353 |
-
$sub_business_options = array();
|
1354 |
-
|
1355 |
-
switch ($business_type) {
|
1356 |
-
case 'automotivebusiness':
|
1357 |
-
$sub_business_options = array(
|
1358 |
-
'' => 'Select Sub Business Type ( optional )',
|
1359 |
-
'autobodyshop' => 'Auto Body Shop',
|
1360 |
-
'autodealer' => 'Auto Dealer',
|
1361 |
-
'autopartsstore' => 'Auto Parts Store',
|
1362 |
-
'autorental' => 'Auto Rental',
|
1363 |
-
'autorepair' => 'Auto Repair',
|
1364 |
-
'autowash' => 'Auto Wash',
|
1365 |
-
'gasstation' => 'Gas Station',
|
1366 |
-
'motorcycledealer' => 'Motorcycle Dealer',
|
1367 |
-
'motorcyclerepair' => 'Motorcycle Repair'
|
1368 |
-
);
|
1369 |
-
break;
|
1370 |
-
case 'emergencyservice':
|
1371 |
-
$sub_business_options = array(
|
1372 |
-
'' => 'Select Sub Business Type ( optional )',
|
1373 |
-
'firestation' => 'Fire Station',
|
1374 |
-
'hospital' => 'Hospital',
|
1375 |
-
'policestation' => 'Police Station',
|
1376 |
-
);
|
1377 |
-
break;
|
1378 |
-
case 'entertainmentbusiness':
|
1379 |
-
$sub_business_options = array(
|
1380 |
-
'' => 'Select Sub Business Type ( optional )',
|
1381 |
-
'adultentertainment' => 'Adult Entertainment',
|
1382 |
-
'amusementpark' => 'Amusement Park',
|
1383 |
-
'artgallery' => 'Art Gallery',
|
1384 |
-
'casino' => 'Casino',
|
1385 |
-
'comedyclub' => 'Comedy Club',
|
1386 |
-
'movietheater' => 'Movie Theater',
|
1387 |
-
'nightclub' => 'Night Club',
|
1388 |
-
|
1389 |
-
);
|
1390 |
-
break;
|
1391 |
-
case 'financialservice':
|
1392 |
-
$sub_business_options = array(
|
1393 |
-
'' => 'Select Sub Business Type ( optional )',
|
1394 |
-
'accountingservice' => 'Accounting Service',
|
1395 |
-
'automatedteller' => 'Automated Teller',
|
1396 |
-
'bankorcredit_union' => 'Bank Or Credit Union',
|
1397 |
-
'insuranceagency' => 'Insurance Agency',
|
1398 |
-
|
1399 |
-
);
|
1400 |
-
break;
|
1401 |
-
case 'foodestablishment':
|
1402 |
-
$sub_business_options = array(
|
1403 |
-
'' => 'Select Sub Business Type ( optional )',
|
1404 |
-
'bakery' => 'Bakery',
|
1405 |
-
'barorpub' => 'Bar Or Pub',
|
1406 |
-
'brewery' => 'Brewery',
|
1407 |
-
'cafeorcoffee_shop' => 'Cafe Or Coffee Shop',
|
1408 |
-
'fastfoodrestaurant' => 'Fast Food Restaurant',
|
1409 |
-
'icecreamshop' => 'Ice Cream Shop',
|
1410 |
-
'restaurant' => 'Restaurant',
|
1411 |
-
'winery' => 'Winery',
|
1412 |
-
|
1413 |
-
);
|
1414 |
-
break;
|
1415 |
-
case 'healthandbeautybusiness':
|
1416 |
-
$sub_business_options = array(
|
1417 |
-
'' => 'Select Sub Business Type ( optional )',
|
1418 |
-
'beautysalon' => 'Beauty Salon',
|
1419 |
-
'dayspa' => 'DaySpa',
|
1420 |
-
'hairsalon' => 'Hair Salon',
|
1421 |
-
'healthclub' => 'Health Club',
|
1422 |
-
'nailsalon' => 'Nail Salon',
|
1423 |
-
'tattooparlor' => 'Tattoo Parlor',
|
1424 |
-
);
|
1425 |
-
break;
|
1426 |
-
case 'homeandconstructionbusiness':
|
1427 |
-
$sub_business_options = array(
|
1428 |
-
'' => 'Select Sub Business Type ( optional )',
|
1429 |
-
'electrician' => 'Electrician',
|
1430 |
-
'generalcontractor' => 'General Contractor',
|
1431 |
-
'hvacbusiness' => 'HVAC Business',
|
1432 |
-
'locksmith' => 'Locksmith',
|
1433 |
-
'movingcompany' => 'Moving Company',
|
1434 |
-
'plumber' => 'Plumber',
|
1435 |
-
'roofingcontractor' => 'Roofing Contractor',
|
1436 |
-
'housepainter' => 'House Painter',
|
1437 |
-
);
|
1438 |
-
break;
|
1439 |
-
case 'legalservice':
|
1440 |
-
$sub_business_options = array(
|
1441 |
-
'' => 'Select Sub Business Type ( optional )',
|
1442 |
-
'attorney' => 'Attorney',
|
1443 |
-
'notary' => 'Notary',
|
1444 |
-
);
|
1445 |
-
break;
|
1446 |
-
case 'lodgingbusiness':
|
1447 |
-
$sub_business_options = array(
|
1448 |
-
'' => 'Select Sub Business Type ( optional )',
|
1449 |
-
'bedandbreakfast' => 'Bed And Breakfast',
|
1450 |
-
'campground' => 'Campground',
|
1451 |
-
'hostel' => 'Hostel',
|
1452 |
-
'hotel' => 'Hotel',
|
1453 |
-
'motel' => 'Motel',
|
1454 |
-
'resort' => 'Resort',
|
1455 |
-
);
|
1456 |
-
break;
|
1457 |
-
case 'sportsactivitylocation':
|
1458 |
-
$sub_business_options = array(
|
1459 |
-
'' => 'Select Sub Business Type ( optional )',
|
1460 |
-
'bowlingalley' => 'Bowling Alley',
|
1461 |
-
'exercisegym' => 'Exercise Gym',
|
1462 |
-
'golfcourse' => 'Golf Course',
|
1463 |
-
'healthclub' => 'Health Club',
|
1464 |
-
'publicswimming_pool' => 'Public Swimming Pool',
|
1465 |
-
'skiresort' => 'Ski Resort',
|
1466 |
-
'sportsclub' => 'Sports Club',
|
1467 |
-
'stadiumorarena' => 'Stadium Or Arena',
|
1468 |
-
'tenniscomplex' => 'Tennis Complex'
|
1469 |
-
);
|
1470 |
-
break;
|
1471 |
-
case 'store':
|
1472 |
-
$sub_business_options = array(
|
1473 |
-
'' => 'Select Sub Business Type ( optional )',
|
1474 |
-
'autopartsstore' => 'Auto Parts Store',
|
1475 |
-
'bikestore' => 'Bike Store',
|
1476 |
-
'bookstore' => 'Book Store',
|
1477 |
-
'clothingstore' => 'Clothing Store',
|
1478 |
-
'computerstore' => 'Computer Store',
|
1479 |
-
'conveniencestore' => 'Convenience Store',
|
1480 |
-
'departmentstore' => 'Department Store',
|
1481 |
-
'electronicsstore' => 'Electronics Store',
|
1482 |
-
'florist' => 'Florist',
|
1483 |
-
'furniturestore' => 'Furniture Store',
|
1484 |
-
'gardenstore' => 'Garden Store',
|
1485 |
-
'grocerystore' => 'Grocery Store',
|
1486 |
-
'hardwarestore' => 'Hardware Store',
|
1487 |
-
'hobbyshop' => 'Hobby Shop',
|
1488 |
-
'homegoodsstore' => 'HomeGoods Store',
|
1489 |
-
'jewelrystore' => 'Jewelry Store',
|
1490 |
-
'liquorstore' => 'Liquor Store',
|
1491 |
-
'mensclothingstore' => 'Mens Clothing Store',
|
1492 |
-
'mobilephonestore' => 'Mobile Phone Store',
|
1493 |
-
'movierentalstore' => 'Movie Rental Store',
|
1494 |
-
'musicstore' => 'Music Store',
|
1495 |
-
'officeequipmentstore' => 'Office Equipment Store',
|
1496 |
-
'outletstore' => 'Outlet Store',
|
1497 |
-
'pawnshop' => 'Pawn Shop',
|
1498 |
-
'petstore' => 'Pet Store',
|
1499 |
-
'shoestore' => 'Shoe Store',
|
1500 |
-
'sportinggoodsstore' => 'Sporting Goods Store',
|
1501 |
-
'tireshop' => 'Tire Shop',
|
1502 |
-
'toystore' => 'Toy Store',
|
1503 |
-
'wholesalestore' => 'Wholesale Store'
|
1504 |
-
);
|
1505 |
-
break;
|
1506 |
-
default:
|
1507 |
-
break;
|
1508 |
-
}
|
1509 |
-
return $sub_business_options;
|
1510 |
-
}
|
1511 |
/**
|
1512 |
* Function to get the fields of a particular schema type as an array
|
1513 |
* @global type $post
|
@@ -1563,53 +1409,16 @@ class saswp_post_specific {
|
|
1563 |
switch ($schema_type) {
|
1564 |
|
1565 |
case 'local_business':
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
break;
|
1571 |
-
case 'emergencyservice':
|
1572 |
-
|
1573 |
-
$this->options_response = $this->saswp_get_sub_business_array($business_type);
|
1574 |
-
break;
|
1575 |
-
case 'entertainmentbusiness':
|
1576 |
-
$this->options_response = $this->saswp_get_sub_business_array($business_type);
|
1577 |
-
break;
|
1578 |
-
case 'financialservice':
|
1579 |
-
$this->options_response = $this->saswp_get_sub_business_array($business_type);
|
1580 |
-
break;
|
1581 |
-
case 'foodestablishment':
|
1582 |
-
$this->options_response = $this->saswp_get_sub_business_array($business_type);
|
1583 |
-
break;
|
1584 |
-
case 'healthandbeautybusiness':
|
1585 |
-
$this->options_response = $this->saswp_get_sub_business_array($business_type);
|
1586 |
-
break;
|
1587 |
-
case 'homeandconstructionbusiness':
|
1588 |
-
$this->options_response = $this->saswp_get_sub_business_array($business_type);
|
1589 |
-
break;
|
1590 |
-
case 'legalservice':
|
1591 |
-
$this->options_response = $this->saswp_get_sub_business_array($business_type);
|
1592 |
-
break;
|
1593 |
-
case 'lodgingbusiness':
|
1594 |
-
$this->options_response = $this->saswp_get_sub_business_array($business_type);
|
1595 |
-
break;
|
1596 |
-
case 'sportsactivitylocation':
|
1597 |
-
$this->options_response = $this->saswp_get_sub_business_array($business_type);
|
1598 |
-
break;
|
1599 |
-
case 'store':
|
1600 |
-
$this->options_response = $this->saswp_get_sub_business_array($business_type);
|
1601 |
-
break;
|
1602 |
-
default:
|
1603 |
-
break;
|
1604 |
-
}
|
1605 |
-
|
1606 |
-
if(!empty($this->options_response)){
|
1607 |
|
1608 |
$sub_business_options = array(
|
1609 |
'label' => 'Sub Business Type',
|
1610 |
'id' => 'saswp_business_name_'.$schema_id,
|
1611 |
'type' => 'select',
|
1612 |
-
'options' => $this->
|
1613 |
'default' => $business_name
|
1614 |
);
|
1615 |
|
@@ -3500,7 +3309,7 @@ class saswp_post_specific {
|
|
3500 |
'type' => 'media',
|
3501 |
),
|
3502 |
array(
|
3503 |
-
'label' => '
|
3504 |
'id' => 'saswp_mc_schema_anatomy_name_'.$schema_id,
|
3505 |
'type' => 'text',
|
3506 |
'attributes' => array(
|
18 |
protected $all_schema = null;
|
19 |
protected $options_response = array();
|
20 |
protected $modify_schema_post_enable = false;
|
21 |
+
protected $_local_sub_business = array();
|
22 |
+
|
23 |
private $schema_type_element = array(
|
24 |
'FAQ' => array(
|
25 |
'faq-question' => 'faq_question',
|
44 |
)
|
45 |
);
|
46 |
|
47 |
+
public function __construct() {
|
48 |
+
|
49 |
+
$mappings_local_sub = SASWP_DIR_NAME . '/core/array-list/local-sub-business.php';
|
50 |
+
|
51 |
+
if ( file_exists( $mappings_local_sub ) ) {
|
52 |
+
$this->_local_sub_business = include $mappings_local_sub;
|
53 |
+
}
|
54 |
+
|
55 |
+
}
|
56 |
+
|
57 |
+
|
58 |
/**
|
59 |
* List of hooks used in this context
|
60 |
*/
|
1343 |
return;
|
1344 |
}
|
1345 |
$business_type = sanitize_text_field($_GET['business_type']);
|
1346 |
+
|
1347 |
+
$response = $this->_local_sub_business[$business_type];
|
1348 |
|
1349 |
+
if($response){
|
|
|
1350 |
echo json_encode(array('status'=>'t', 'result'=>$response));
|
1351 |
}else{
|
1352 |
echo json_encode(array('status'=>'f', 'result'=>'data not available'));
|
1353 |
}
|
1354 |
wp_die();
|
1355 |
}
|
1356 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1357 |
/**
|
1358 |
* Function to get the fields of a particular schema type as an array
|
1359 |
* @global type $post
|
1409 |
switch ($schema_type) {
|
1410 |
|
1411 |
case 'local_business':
|
1412 |
+
|
1413 |
+
$sub_business_options = array();
|
1414 |
+
|
1415 |
+
if(!empty($this->_local_sub_business)){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1416 |
|
1417 |
$sub_business_options = array(
|
1418 |
'label' => 'Sub Business Type',
|
1419 |
'id' => 'saswp_business_name_'.$schema_id,
|
1420 |
'type' => 'select',
|
1421 |
+
'options' => $this->_local_sub_business[$business_type],
|
1422 |
'default' => $business_name
|
1423 |
);
|
1424 |
|
3309 |
'type' => 'media',
|
3310 |
),
|
3311 |
array(
|
3312 |
+
'label' => 'Associated Anatomy Name',
|
3313 |
'id' => 'saswp_mc_schema_anatomy_name_'.$schema_id,
|
3314 |
'type' => 'text',
|
3315 |
'attributes' => array(
|
view/schema_type.php
CHANGED
@@ -704,68 +704,12 @@ function saswp_schema_type_meta_box_callback( $post) {
|
|
704 |
'WebSite' => 'WebSite',
|
705 |
);
|
706 |
|
707 |
-
$
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
),
|
714 |
-
'CreativeWork' => array(
|
715 |
-
'Article' => 'Article',
|
716 |
-
'Blogposting' => 'Blogposting',
|
717 |
-
'Course' => 'Course',
|
718 |
-
'DiscussionForumPosting' => 'DiscussionForumPosting',
|
719 |
-
'FAQ' => 'FAQ',
|
720 |
-
'HowTo' => 'HowTo',
|
721 |
-
'NewsArticle' => 'NewsArticle',
|
722 |
-
'qanda' => 'Q&A',
|
723 |
-
'Review' => 'Review',
|
724 |
-
'Recipe' => 'Recipe',
|
725 |
-
'TVSeries' => 'TVSeries',
|
726 |
-
'SoftwareApplication' => 'SoftwareApplication',
|
727 |
-
'TechArticle' => 'TechArticle',
|
728 |
-
'WebPage' => 'WebPage'
|
729 |
-
),
|
730 |
-
'Event' => array(
|
731 |
-
'Event' => 'Event',
|
732 |
-
),
|
733 |
-
'Game' => array(
|
734 |
-
'VideoGame' => 'VideoGame'
|
735 |
-
),
|
736 |
-
'Intangible' => array(
|
737 |
-
'JobPosting' => 'JobPosting',
|
738 |
-
'Service' => 'Service',
|
739 |
-
'Trip' => 'Trip',
|
740 |
-
|
741 |
-
),
|
742 |
-
'Media' => array(
|
743 |
-
'AudioObject' => 'AudioObject',
|
744 |
-
'VideoObject' => 'VideoObject'
|
745 |
-
),
|
746 |
-
'Medical' => array(
|
747 |
-
'MedicalCondition' => 'MedicalCondition',
|
748 |
-
),
|
749 |
-
'Organization' => array(
|
750 |
-
'local_business' => 'Local Business',
|
751 |
-
),
|
752 |
-
'Product' => array(
|
753 |
-
'Product' => 'Product',
|
754 |
-
),
|
755 |
-
'Place' => array(
|
756 |
-
'TouristAttraction' => 'TouristAttraction',
|
757 |
-
'TouristDestination' => 'TouristDestination',
|
758 |
-
'LandmarksOrHistoricalBuildings' => 'LandmarksOrHistoricalBuildings',
|
759 |
-
),
|
760 |
-
'PlaceOfWorship' => array(
|
761 |
-
'HinduTemple' => 'HinduTemple',
|
762 |
-
'Church' => 'Church',
|
763 |
-
'Mosque' => 'Mosque',
|
764 |
-
),
|
765 |
-
'Thing' => array(
|
766 |
-
'Person' => 'Person',
|
767 |
-
)
|
768 |
-
);
|
769 |
$all_business_type = array(
|
770 |
'' => 'Select Business Type (Optional)',
|
771 |
'animalshelter' => 'Animal Shelter',
|
@@ -964,14 +908,7 @@ function saswp_schema_type_meta_box_callback( $post) {
|
|
964 |
|
965 |
}
|
966 |
?>
|
967 |
-
</select>
|
968 |
-
|
969 |
-
<?php if($schema_type == 'qanda') { ?>
|
970 |
-
<span class="saswp-schem-type-note"><?php echo esc_html__('Note: Currently supported with DW Question & Answer', 'schema-and-structured-data-for-wp' ); ?> <a target="_blank" href="https://wordpress.org/plugins/dw-question-answer/"><?php echo esc_html__('Link', 'schema-and-structured-data-for-wp' ); ?></a></span>
|
971 |
-
<?php }else{ ?>
|
972 |
-
<span class="saswp-schem-type-note saswp_hide"><?php echo esc_html__('Note: Currently supported with DW Question & Answer', 'schema-and-structured-data-for-wp' ); ?> <a target="_blank" href="https://wordpress.org/plugins/dw-question-answer/"><?php echo esc_html__('Link', 'schema-and-structured-data-for-wp' ); ?></a></span>
|
973 |
-
<?php } ?>
|
974 |
-
|
975 |
</td>
|
976 |
</tr>
|
977 |
<tr class="saswp-business-type-tr" <?php echo $style_business_type; ?>>
|
704 |
'WebSite' => 'WebSite',
|
705 |
);
|
706 |
|
707 |
+
$mappings_file = SASWP_DIR_NAME . '/core/array-list/schemas.php';
|
708 |
+
|
709 |
+
if ( file_exists( $mappings_file ) ) {
|
710 |
+
$all_schema_array = include $mappings_file;
|
711 |
+
}
|
712 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
713 |
$all_business_type = array(
|
714 |
'' => 'Select Business Type (Optional)',
|
715 |
'animalshelter' => 'Animal Shelter',
|
908 |
|
909 |
}
|
910 |
?>
|
911 |
+
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
912 |
</td>
|
913 |
</tr>
|
914 |
<tr class="saswp-business-type-tr" <?php echo $style_business_type; ?>>
|