Version Description
(28 Sept 2019) =
- Added: Post category in modify meta list. #509
- Fixed: Setup Wizard is very slow. Need to improve the timing. #518
- Fixed: Image is not being pre filled or populated on post specific modify schema #508
- Fixed: KK Star is not working anymore #506
- Fixed: The property publisher is not recognized by Google for an object of type LocalBusiness. #512
Download this release
Release Info
Developer | magazine3 |
Plugin | Schema & Structured Data for WP & AMP |
Version | 1.9.9 |
Comparing to | |
See all releases |
Code changes from version 1.9.8 to 1.9.9
- admin_section/css/main-style.css +7 -0
- admin_section/css/main-style.min.css +1 -1
- admin_section/js/main-script.js +31 -5
- admin_section/js/main-script.min.js +1 -1
- admin_section/js/saswp-add-new.js +16 -106
- admin_section/js/saswp-add-new.min.js +1 -1
- admin_section/js/saswp-install.js +5 -14
- admin_section/js/saswp-install.min.js +1 -1
- admin_section/settings.php +19 -1
- admin_section/structure_admin.php +2 -1
- core/array-list/meta_list.php +7 -5
- modules/gutenberg/assets/css/editor.css +134 -134
- modules/gutenberg/assets/css/style.css +9 -9
- modules/gutenberg/includes/class-gutenberg.php +56 -11
- output/function.php +0 -2
- output/output_post_specific.php +35 -0
- output/service.php +93 -46
- readme.txt +9 -1
- structured-data-for-wp.php +2 -2
- view/paywall.php +6 -1
- view/post_specific.php +20 -43
- view/schema_type.php +35 -3
admin_section/css/main-style.css
CHANGED
@@ -589,6 +589,7 @@ On/Off Buttons ends here
|
|
589 |
.saswp-custom-fields-table tr td {padding: 10px 10px 10px 10px ;}
|
590 |
.saswp-custom-fields-table td{
|
591 |
width: 30%;
|
|
|
592 |
}
|
593 |
|
594 |
.saswp-option-table-class input[type="text"], .saswp-option-table-class select{
|
@@ -1225,4 +1226,10 @@ a.saswp-revws-lnk{
|
|
1225 |
}
|
1226 |
.saswp_add_schema_fields_on_fly{
|
1227 |
margin-bottom: 5px !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
1228 |
}
|
589 |
.saswp-custom-fields-table tr td {padding: 10px 10px 10px 10px ;}
|
590 |
.saswp-custom-fields-table td{
|
591 |
width: 30%;
|
592 |
+
vertical-align: top;
|
593 |
}
|
594 |
|
595 |
.saswp-option-table-class input[type="text"], .saswp-option-table-class select{
|
1226 |
}
|
1227 |
.saswp_add_schema_fields_on_fly{
|
1228 |
margin-bottom: 5px !important;
|
1229 |
+
}
|
1230 |
+
.saswp-custom-fields-table .saswp_image_prev{
|
1231 |
+
max-width:62px !important;
|
1232 |
+
}
|
1233 |
+
.saswp-custom-fields-table .saswp_prev_close{
|
1234 |
+
font-size: 15px;
|
1235 |
}
|
admin_section/css/main-style.min.css
CHANGED
@@ -1 +1 @@
|
|
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}.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-custom-fields-table{width:100%}.saswp-custom-fields-table input{width:100%}.saswp-custom-fields-table tr td{padding:10px 10px 10px 10px}.saswp-custom-fields-table td{width:30%}.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-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;float:right}.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{max-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-dynamic-properties{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-s-reviews-settings-table input{width:100%}.saswp_rv_module_pro_notice{border:1px solid #d8d8d8;background:#fff}.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}.select2-container{width:100%!important}.saswp-schema-modify-section{margin-top:15px;border-top:1px solid #eee;padding-top:15px}.saswp-custom-meta-list{border:1px solid #aaa;border-radius:4px}.saswp-custom-fields-table tr td:nth-child(3n+3) input{border:1px solid #aaa;border-radius:4px}.updated.notice p{display:flex;width:100%;align-items:center}.updated.notice .dashicons-thumbs-up{margin-right:10px}a.saswp-feedback-no-thanks,a.saswp-feedback-remindme{display:inline-block;cursor:pointer}.saswp-feedback-remindme:after{content:",";display:inline-block;margin-right:5px;padding-left:5px}a.saswp-revws-lnk{display:inline-block;background:#0085ba;padding:12px 20px;color:#fff;text-decoration:none;border-radius:3px;margin-left:20px;font-size:14px;line-height:.6}.saswp-update-notice-btns{display:inline-block;width:100%;margin-bottom:5px}.saswp-about-contact-page{width:75%;float:right}.saswp-about-contact-page-tooltip{float:left;clear:both}.saswp-quick-setup{float:left}.saswp_add_schema_fields_on_fly{margin-bottom:5px!important}
|
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}.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-custom-fields-table{width:100%}.saswp-custom-fields-table input{width:100%}.saswp-custom-fields-table tr td{padding:10px 10px 10px 10px}.saswp-custom-fields-table td{width:30%;vertical-align:top}.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-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;float:right}.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{max-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-dynamic-properties{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-s-reviews-settings-table input{width:100%}.saswp_rv_module_pro_notice{border:1px solid #d8d8d8;background:#fff}.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}.select2-container{width:100%!important}.saswp-schema-modify-section{margin-top:15px;border-top:1px solid #eee;padding-top:15px}.saswp-custom-meta-list{border:1px solid #aaa;border-radius:4px}.saswp-custom-fields-table tr td:nth-child(3n+3) input{border:1px solid #aaa;border-radius:4px}.updated.notice p{display:flex;width:100%;align-items:center}.updated.notice .dashicons-thumbs-up{margin-right:10px}a.saswp-feedback-no-thanks,a.saswp-feedback-remindme{display:inline-block;cursor:pointer}.saswp-feedback-remindme:after{content:",";display:inline-block;margin-right:5px;padding-left:5px}a.saswp-revws-lnk{display:inline-block;background:#0085ba;padding:12px 20px;color:#fff;text-decoration:none;border-radius:3px;margin-left:20px;font-size:14px;line-height:.6}.saswp-update-notice-btns{display:inline-block;width:100%;margin-bottom:5px}.saswp-about-contact-page{width:75%;float:right}.saswp-about-contact-page-tooltip{float:left;clear:both}.saswp-quick-setup{float:left}.saswp_add_schema_fields_on_fly{margin-bottom:5px!important}.saswp-custom-fields-table .saswp_image_prev{max-width:62px!important}.saswp-custom-fields-table .saswp_prev_close{font-size:15px}
|
admin_section/js/main-script.js
CHANGED
@@ -799,6 +799,15 @@ jQuery(document).ready(function($){
|
|
799 |
}
|
800 |
break;
|
801 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
802 |
|
803 |
case 'saswp-woocommerce-booking-checkbox':
|
804 |
saswp_compatibliy_notes(current, id);
|
@@ -1540,7 +1549,8 @@ jQuery(document).ready(function($){
|
|
1540 |
var tr = $(this).parent().parent('tr');
|
1541 |
var fields_name = $(this).val();
|
1542 |
var str2 = "image";
|
1543 |
-
|
|
|
1544 |
type = 'image';
|
1545 |
}
|
1546 |
var id = $(this).parent().parent('tr').find("td:eq(1)");
|
@@ -1596,9 +1606,12 @@ jQuery(document).ready(function($){
|
|
1596 |
|
1597 |
$(document).on("change",".saswp-custom-meta-list", function(){
|
1598 |
|
1599 |
-
var
|
1600 |
-
var
|
1601 |
-
var
|
|
|
|
|
|
|
1602 |
if(meta_val == 'manual_text'){
|
1603 |
html += '<td><input type="text" name="saswp_fixed_text['+field_name+']"></td>';
|
1604 |
html += '<td><a class="button button-default saswp-rmv-modify_row">X</a></td>';
|
@@ -1607,7 +1620,20 @@ jQuery(document).ready(function($){
|
|
1607 |
html += '<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+field_name+']">';
|
1608 |
html += '</select></td>';
|
1609 |
html += '<td><a class="button button-default saswp-rmv-modify_row">X</a></td>';
|
1610 |
-
}else{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1611 |
html += '<td></td>';
|
1612 |
html += '<td><a class="button button-default saswp-rmv-modify_row">X</a></td>';
|
1613 |
}
|
799 |
}
|
800 |
break;
|
801 |
|
802 |
+
case 'saswp-realhomes-checkbox':
|
803 |
+
saswp_compatibliy_notes(current, id);
|
804 |
+
if ($(this).is(':checked')) {
|
805 |
+
$("#saswp-realhomes").val(1);
|
806 |
+
}else{
|
807 |
+
$("#saswp-realhomes").val(0);
|
808 |
+
}
|
809 |
+
break;
|
810 |
+
|
811 |
|
812 |
case 'saswp-woocommerce-booking-checkbox':
|
813 |
saswp_compatibliy_notes(current, id);
|
1549 |
var tr = $(this).parent().parent('tr');
|
1550 |
var fields_name = $(this).val();
|
1551 |
var str2 = "image";
|
1552 |
+
var str3 = "logo";
|
1553 |
+
if((fields_name.indexOf(str2) != -1)|| (fields_name.indexOf(str3) != -1)){
|
1554 |
type = 'image';
|
1555 |
}
|
1556 |
var id = $(this).parent().parent('tr').find("td:eq(1)");
|
1606 |
|
1607 |
$(document).on("change",".saswp-custom-meta-list", function(){
|
1608 |
|
1609 |
+
var schema_type = $('select#schema_type option:selected').val();
|
1610 |
+
var meta_val = $(this).val();
|
1611 |
+
var field_name = $(this).parent().parent('tr').find(".saswp-custom-fields-name").val();
|
1612 |
+
var html = '';
|
1613 |
+
var el_id = schema_type.toLowerCase()+'_'+field_name;
|
1614 |
+
var media_name = 'saswp_fixed_image['+field_name+']';
|
1615 |
if(meta_val == 'manual_text'){
|
1616 |
html += '<td><input type="text" name="saswp_fixed_text['+field_name+']"></td>';
|
1617 |
html += '<td><a class="button button-default saswp-rmv-modify_row">X</a></td>';
|
1620 |
html += '<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+field_name+']">';
|
1621 |
html += '</select></td>';
|
1622 |
html += '<td><a class="button button-default saswp-rmv-modify_row">X</a></td>';
|
1623 |
+
}else if(meta_val == 'fixed_image'){
|
1624 |
+
html += '<td>';
|
1625 |
+
html += '<fieldset>';
|
1626 |
+
html += '<input data-id="media" style="width: 30%;" class="button" id="'+el_id+'_button" name="'+el_id+'_button" type="button" value="Upload" />';
|
1627 |
+
html += '<input type="hidden" data-id="'+el_id+'_height" class="upload-height" name="'+media_name+'[height]" id="'+el_id+'_height" value="">';
|
1628 |
+
html += '<input type="hidden" data-id="'+el_id+'_width" class="upload-width" name="'+media_name+'[width]" id="'+el_id+'_width" value="">';
|
1629 |
+
html += '<input type="hidden" data-id="'+el_id+'_thumbnail" class="upload-thumbnail" name="'+media_name+'[thumbnail]" id="'+el_id+'_thumbnail" value="">';
|
1630 |
+
html += '<div class="saswp_image_div_'+el_id+'">';
|
1631 |
+
html += '</div>';
|
1632 |
+
html += '</fieldset>';
|
1633 |
+
html += '</td>';
|
1634 |
+
html += '<td><a class="button button-default saswp-rmv-modify_row">X</a></td>';
|
1635 |
+
}
|
1636 |
+
else{
|
1637 |
html += '<td></td>';
|
1638 |
html += '<td><a class="button button-default saswp-rmv-modify_row">X</a></td>';
|
1639 |
}
|
admin_section/js/main-script.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var saswp_meta_list=[],saswp_meta_fields=[],saswp_meta_list_fields=[];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"})}function saswp_meta_list_html(e,s,a,t,i,n){var o=t;null==o&&(o=Object.keys(a)[0]);var p="";if(p+='<select class="saswp-custom-meta-list" name="saswp_meta_list_val['+o+']">',jQuery.each(s,function(e,s){p+='<optgroup label="'+s.label+'">',jQuery.each(s["meta-list"],function(e,s){p+='<option value="'+e+'">'+s+"</option>"}),p+="</optgroup>"}),p+="</select>",a){var c="<tr>";c+="<td>",c+='<select class="saswp-custom-fields-name">',jQuery.each(a,function(e,s){c+='<option value="'+e+'">'+s+"</option>"}),c+="</select>",c+="</td>",c+="<td>",c+=p,c+="</td>",c+='<td></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td>',c+="</tr>",jQuery(".saswp-custom-fields-table").append(c),null!=e&&e.removeClass("updating-message")}else jQuery(i).html(p),null!=e&&e.removeClass("updating-message")}function saswp_get_meta_list(e,s,a,t,i,n){saswp_meta_list[s]?saswp_meta_list_html(e,saswp_meta_list[s],a,i,t,n):jQuery.get(ajaxurl,{action:"saswp_get_meta_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(o){saswp_meta_list[s]=o[s],saswp_meta_list_html(e,saswp_meta_list[s],a,i,t,n)},"json")}function saswp_get_post_specific_schema_fields(e,s,a,t,i,n){if(saswp_meta_fields[n]){var o=saswp_fields_html_generator(s,i,n,t,saswp_meta_fields[n]);o&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(o),saswp_schema_datepicker(),e.removeClass("updating-message"))}else jQuery.get(ajaxurl,{action:"saswp_get_schema_dynamic_fields_ajax",meta_name:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){saswp_meta_fields[n]=a,console.log(saswp_meta_fields);var o=saswp_fields_html_generator(s,i,n,t,a);o&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(o),saswp_schema_datepicker(),e.removeClass("updating-message"))},"json")}function saswp_fields_html_generator(e,s,a,t,i){var n="";return n+='<div class="saswp-'+t+'-table-div saswp-dynamic-properties" data-id="'+e+'"><a class="saswp-table-close">X</a><table class="form-table saswp-'+t+'-table">',jQuery.each(i,function(t,i){var o="";switch("saswp_tvseries_season_published_date"!=i.name&&"saswp_feed_element_date_created"!=i.name&&"saswp_product_reviews_created_date"!=i.name||(o="saswp-datepicker-picker"),i.type){case"number":case"text":n+="<tr><th>"+i.label+'</th><td><input class="'+o+'" style="width:100%" type="'+i.type+'" id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']"></td></tr>';break;case"textarea":n+="<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 p="";jQuery.each(i.options,function(e,s){p+='<option value="'+e+'">'+s+"</option>"}),n+="<tr><th>"+i.label+'</th><td><select id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']">'+p+"</select></td></tr>";break;case"media":n+="<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>'}}),n+="</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 n(){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(),n=saswp_localize_data.post_id,o=e(t).attr("data-id"),p=e(t).attr("post-specific");e.get(ajaxurl,{action:"saswp_get_item_reviewed_fields",schema_id:o,post_specific:p,item:i,post_id:n,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 o(){"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 p(){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()}function c(s,a,t,i,n,o,p){s.addClass("updating-message"),e.get(ajaxurl,{action:"saswp_add_s_approved_reviews",site_id:a,token:t,limit:i,api_key:n,page:o,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(l){s.removeClass("updating-message"),console.log(l),l.status?(s.parent().parent().find(".saswp-rv-fetched-msg").text(l.message),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(s.parent().parent().find(".saswp-rv-fetched-msg").text(l.message),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),++o<p?c(s,a,t,i,n,o):function(s){s.addClass("updating-message"),e.get(ajaxurl,{action:"saswp_fetch_s_approved_reviews",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s.removeClass("updating-message"),console.log(e),e.status?(s.parent().parent().find(".saswp-rv-fetched-msg").text(e.message),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"))},"json")}(s)},"json")}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),n()),"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"),p()}),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)),p()}).change(),e(".saswp-checkbox").change(function(){var s=e(this).attr("id"),a=e(this);switch(s){case"saswp-the-seo-framework-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-the-seo-framework").val(1):e("#saswp-the-seo-framework").val(0);break;case"saswp-seo-press-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-seo-press").val(1):e("#saswp-seo-press").val(0);break;case"saswp-aiosp-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-aiosp").val(1):e("#saswp-aiosp").val(0);break;case"saswp-smart-crawl-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-smart-crawl").val(1):e("#saswp-smart-crawl").val(0);break;case"saswp-squirrly-seo-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-squirrly-seo").val(1):e("#saswp-squirrly-seo").val(0);break;case"saswp-wp-recipe-maker-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-wp-recipe-maker").val(1):e("#saswp-wp-recipe-maker").val(0);break;case"saswp-wpsso-core-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-wpsso-core").val(1):e("#saswp-wpsso-core").val(0);break;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-homeland-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-homeland").val(1):e("#saswp-homeland").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-shopper-approved-review-checkbox":i(a,s),e(this).is(":checked")?(e("#saswp-shopper-approved-review").val(1),e(".saswp-s-reviews-settings-table").parent().parent().parent().show()):(e("#saswp-shopper-approved-review").val(0),e(".saswp-s-reviews-settings-table").parent().parent().parent().hide());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 n="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&s.height<1200&&(n='<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>'+n)}).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"),n=e("#"+i+"_addon_license_key").val();t&&i&&n?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:n,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")}),n(),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(),p(),n()})}),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"),p()}),e("#saswp-global-tabs a:first").addClass("saswp-global-selected"),e(".saswp-global-container").hide(),"#saswp-default-container"==window.location.hash?e(".saswp-global-container:eq(2)").show():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(){var s="text",a=e(this).parent().parent("tr"),t=e(this).val();-1!=t.indexOf("image")&&(s="image"),saswp_get_meta_list(null,s,null,e(this).parent().parent("tr").find("td:eq(1)"),t,a)}),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);a.addClass("updating-message");var t=e(this).attr("data-id"),i=e(this).attr("fields_type"),n=e(this).attr("div_type"),o=e(".saswp-"+n+"-table-div").length,p=e(".saswp-"+n+"-table-div:nth-child("+o+")").attr("data-id");(p=++p)||(p=0),saswp_get_post_specific_schema_fields(a,p,i,n,t,i+"_")}),e(document).on("click",".saswp-table-close",function(){e(this).parent().remove()}),e(document).on("click",".saswp-rmv-modify_row",function(s){s.preventDefault(),e(this).parent().parent().remove()}),e(document).on("change",".saswp-custom-meta-list",function(){var s=e(this).val(),a=e(this).parent().parent("tr").find(".saswp-custom-fields-name").val(),t="";"manual_text"==s?(t+='<td><input type="text" name="saswp_fixed_text['+a+']"></td>',t+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>'):"custom_field"==s?(t+='<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+a+']">',t+="</select></td>",t+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>'):(t+="<td></td>",t+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>'),e(this).parent().parent("tr").find("td:gt(1)").remove(),e(this).parent().parent("tr").append(t),o()}),e(document).on("change",".saswp-item-reivewed-list",function(){e(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[]}),e(document).on("click",".saswp-add-custom-fields",function(){var s=e(this);s.addClass("updating-message");var a=e("select#schema_type option:selected").val(),t="";"Review"==a&&(t=e("select.saswp-item-reivewed-list option:selected").val());var i=e("#post_ID").val();""!=a&&(saswp_meta_list_fields[a]?saswp_get_meta_list(s,"text",saswp_meta_list_fields[a],null,null,null):e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:i,schema_type:a,schema_subtype:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){saswp_meta_list_fields[a]=e,saswp_get_meta_list(s,"text",saswp_meta_list_fields[a],null,null,null)},error:function(e){console.log(e)}}))}),o(),p(),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-s-approved-reviews",function(s){s.preventDefault();var a=e(this);a.addClass("updating-message");var t=e("#saswp_s_approved_site_id").val(),i=e("#saswp_s_approved_token").val(),n=e("#saswp_s_approved_reviews").val(),o=e("#reviews_addon_license_key").val(),p=1;n>100&&(p=n/100,n%100&&p++);t&&i&&o?c(a,t,i,n,o,0,p):(a.removeClass("updating-message"),alert("Fill the site id and token with valid api key"))}),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(),n=e("#saswp_google_place_api_key").val(),o=e("#reviews_addon_license_key").val(),p=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&&(o||n)?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:p,reviews_api:o,location:t,blocks:i,g_api:n,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"),""==n&&alert("Please enter api key"),""==o&&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=[],saswp_meta_fields=[],saswp_meta_list_fields=[];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"})}function saswp_meta_list_html(e,s,a,t,i,n){var o=t;null==o&&(o=Object.keys(a)[0]);var p="";if(p+='<select class="saswp-custom-meta-list" name="saswp_meta_list_val['+o+']">',jQuery.each(s,function(e,s){p+='<optgroup label="'+s.label+'">',jQuery.each(s["meta-list"],function(e,s){p+='<option value="'+e+'">'+s+"</option>"}),p+="</optgroup>"}),p+="</select>",a){var c="<tr>";c+="<td>",c+='<select class="saswp-custom-fields-name">',jQuery.each(a,function(e,s){c+='<option value="'+e+'">'+s+"</option>"}),c+="</select>",c+="</td>",c+="<td>",c+=p,c+="</td>",c+='<td></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td>',c+="</tr>",jQuery(".saswp-custom-fields-table").append(c),null!=e&&e.removeClass("updating-message")}else jQuery(i).html(p),null!=e&&e.removeClass("updating-message")}function saswp_get_meta_list(e,s,a,t,i,n){saswp_meta_list[s]?saswp_meta_list_html(e,saswp_meta_list[s],a,i,t,n):jQuery.get(ajaxurl,{action:"saswp_get_meta_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(o){saswp_meta_list[s]=o[s],saswp_meta_list_html(e,saswp_meta_list[s],a,i,t,n)},"json")}function saswp_get_post_specific_schema_fields(e,s,a,t,i,n){if(saswp_meta_fields[n]){var o=saswp_fields_html_generator(s,i,n,t,saswp_meta_fields[n]);o&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(o),saswp_schema_datepicker(),e.removeClass("updating-message"))}else jQuery.get(ajaxurl,{action:"saswp_get_schema_dynamic_fields_ajax",meta_name:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){saswp_meta_fields[n]=a,console.log(saswp_meta_fields);var o=saswp_fields_html_generator(s,i,n,t,a);o&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(o),saswp_schema_datepicker(),e.removeClass("updating-message"))},"json")}function saswp_fields_html_generator(e,s,a,t,i){var n="";return n+='<div class="saswp-'+t+'-table-div saswp-dynamic-properties" data-id="'+e+'"><a class="saswp-table-close">X</a><table class="form-table saswp-'+t+'-table">',jQuery.each(i,function(t,i){var o="";switch("saswp_tvseries_season_published_date"!=i.name&&"saswp_feed_element_date_created"!=i.name&&"saswp_product_reviews_created_date"!=i.name||(o="saswp-datepicker-picker"),i.type){case"number":case"text":n+="<tr><th>"+i.label+'</th><td><input class="'+o+'" style="width:100%" type="'+i.type+'" id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']"></td></tr>';break;case"textarea":n+="<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 p="";jQuery.each(i.options,function(e,s){p+='<option value="'+e+'">'+s+"</option>"}),n+="<tr><th>"+i.label+'</th><td><select id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']">'+p+"</select></td></tr>";break;case"media":n+="<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>'}}),n+="</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 n(){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(),n=saswp_localize_data.post_id,o=e(t).attr("data-id"),p=e(t).attr("post-specific");e.get(ajaxurl,{action:"saswp_get_item_reviewed_fields",schema_id:o,post_specific:p,item:i,post_id:n,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 o(){"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 p(){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()}function c(s,a,t,i,n,o,p){s.addClass("updating-message"),e.get(ajaxurl,{action:"saswp_add_s_approved_reviews",site_id:a,token:t,limit:i,api_key:n,page:o,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(l){s.removeClass("updating-message"),console.log(l),l.status?(s.parent().parent().find(".saswp-rv-fetched-msg").text(l.message),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(s.parent().parent().find(".saswp-rv-fetched-msg").text(l.message),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),++o<p?c(s,a,t,i,n,o):function(s){s.addClass("updating-message"),e.get(ajaxurl,{action:"saswp_fetch_s_approved_reviews",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s.removeClass("updating-message"),console.log(e),e.status?(s.parent().parent().find(".saswp-rv-fetched-msg").text(e.message),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"))},"json")}(s)},"json")}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),n()),"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"),p()}),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)),p()}).change(),e(".saswp-checkbox").change(function(){var s=e(this).attr("id"),a=e(this);switch(s){case"saswp-the-seo-framework-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-the-seo-framework").val(1):e("#saswp-the-seo-framework").val(0);break;case"saswp-seo-press-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-seo-press").val(1):e("#saswp-seo-press").val(0);break;case"saswp-aiosp-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-aiosp").val(1):e("#saswp-aiosp").val(0);break;case"saswp-smart-crawl-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-smart-crawl").val(1):e("#saswp-smart-crawl").val(0);break;case"saswp-squirrly-seo-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-squirrly-seo").val(1):e("#saswp-squirrly-seo").val(0);break;case"saswp-wp-recipe-maker-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-wp-recipe-maker").val(1):e("#saswp-wp-recipe-maker").val(0);break;case"saswp-wpsso-core-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-wpsso-core").val(1):e("#saswp-wpsso-core").val(0);break;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-homeland-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-homeland").val(1):e("#saswp-homeland").val(0);break;case"saswp-realhomes-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-realhomes").val(1):e("#saswp-realhomes").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-shopper-approved-review-checkbox":i(a,s),e(this).is(":checked")?(e("#saswp-shopper-approved-review").val(1),e(".saswp-s-reviews-settings-table").parent().parent().parent().show()):(e("#saswp-shopper-approved-review").val(0),e(".saswp-s-reviews-settings-table").parent().parent().parent().hide());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 n="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&s.height<1200&&(n='<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>'+n)}).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"),n=e("#"+i+"_addon_license_key").val();t&&i&&n?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:n,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")}),n(),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(),p(),n()})}),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"),p()}),e("#saswp-global-tabs a:first").addClass("saswp-global-selected"),e(".saswp-global-container").hide(),"#saswp-default-container"==window.location.hash?e(".saswp-global-container:eq(2)").show():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(){var s="text",a=e(this).parent().parent("tr"),t=e(this).val();-1==t.indexOf("image")&&-1==t.indexOf("logo")||(s="image"),saswp_get_meta_list(null,s,null,e(this).parent().parent("tr").find("td:eq(1)"),t,a)}),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);a.addClass("updating-message");var t=e(this).attr("data-id"),i=e(this).attr("fields_type"),n=e(this).attr("div_type"),o=e(".saswp-"+n+"-table-div").length,p=e(".saswp-"+n+"-table-div:nth-child("+o+")").attr("data-id");(p=++p)||(p=0),saswp_get_post_specific_schema_fields(a,p,i,n,t,i+"_")}),e(document).on("click",".saswp-table-close",function(){e(this).parent().remove()}),e(document).on("click",".saswp-rmv-modify_row",function(s){s.preventDefault(),e(this).parent().parent().remove()}),e(document).on("change",".saswp-custom-meta-list",function(){var s=e("select#schema_type option:selected").val(),a=e(this).val(),t=e(this).parent().parent("tr").find(".saswp-custom-fields-name").val(),i="",n=s.toLowerCase()+"_"+t,p="saswp_fixed_image["+t+"]";"manual_text"==a?(i+='<td><input type="text" name="saswp_fixed_text['+t+']"></td>',i+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>'):"custom_field"==a?(i+='<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+t+']">',i+="</select></td>",i+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>'):"fixed_image"==a?(i+="<td>",i+="<fieldset>",i+='<input data-id="media" style="width: 30%;" class="button" id="'+n+'_button" name="'+n+'_button" type="button" value="Upload" />',i+='<input type="hidden" data-id="'+n+'_height" class="upload-height" name="'+p+'[height]" id="'+n+'_height" value="">',i+='<input type="hidden" data-id="'+n+'_width" class="upload-width" name="'+p+'[width]" id="'+n+'_width" value="">',i+='<input type="hidden" data-id="'+n+'_thumbnail" class="upload-thumbnail" name="'+p+'[thumbnail]" id="'+n+'_thumbnail" value="">',i+='<div class="saswp_image_div_'+n+'">',i+="</div>",i+="</fieldset>",i+="</td>",i+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>'):(i+="<td></td>",i+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>'),e(this).parent().parent("tr").find("td:gt(1)").remove(),e(this).parent().parent("tr").append(i),o()}),e(document).on("change",".saswp-item-reivewed-list",function(){e(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[]}),e(document).on("click",".saswp-add-custom-fields",function(){var s=e(this);s.addClass("updating-message");var a=e("select#schema_type option:selected").val(),t="";"Review"==a&&(t=e("select.saswp-item-reivewed-list option:selected").val());var i=e("#post_ID").val();""!=a&&(saswp_meta_list_fields[a]?saswp_get_meta_list(s,"text",saswp_meta_list_fields[a],null,null,null):e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:i,schema_type:a,schema_subtype:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){saswp_meta_list_fields[a]=e,saswp_get_meta_list(s,"text",saswp_meta_list_fields[a],null,null,null)},error:function(e){console.log(e)}}))}),o(),p(),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-s-approved-reviews",function(s){s.preventDefault();var a=e(this);a.addClass("updating-message");var t=e("#saswp_s_approved_site_id").val(),i=e("#saswp_s_approved_token").val(),n=e("#saswp_s_approved_reviews").val(),o=e("#reviews_addon_license_key").val(),p=1;n>100&&(p=n/100,n%100&&p++);t&&i&&o?c(a,t,i,n,o,0,p):(a.removeClass("updating-message"),alert("Fill the site id and token with valid api key"))}),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(),n=e("#saswp_google_place_api_key").val(),o=e("#reviews_addon_license_key").val(),p=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&&(o||n)?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:p,reviews_api:o,location:t,blocks:i,g_api:n,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"),""==n&&alert("Please enter api key"),""==o&&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>')})});
|
admin_section/js/saswp-add-new.js
CHANGED
@@ -6,10 +6,10 @@ var Merlin = (function($){
|
|
6 |
|
7 |
// callbacks from form button clicks.
|
8 |
var callbacks = {
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
install_child: function(btn) {
|
14 |
var installer = new ChildTheme();
|
15 |
installer.init(btn);
|
@@ -82,8 +82,7 @@ var Merlin = (function($){
|
|
82 |
var data_callback = $(this).data("callback");
|
83 |
if( data_callback && typeof callbacks[data_callback] !== "undefined"){
|
84 |
// We have to process a callback before continue with form submission.
|
85 |
-
callbacks[data_callback](this);
|
86 |
-
$(".saswp_branding").hide();
|
87 |
return false;
|
88 |
} else {
|
89 |
return true;
|
@@ -92,7 +91,7 @@ var Merlin = (function($){
|
|
92 |
}
|
93 |
|
94 |
function saveLogo() {
|
95 |
-
var body
|
96 |
var complete, notice = $("#child-theme-text");
|
97 |
|
98 |
function ajax_callback(r) {
|
@@ -147,20 +146,21 @@ var Merlin = (function($){
|
|
147 |
return {
|
148 |
init: function(btn) {
|
149 |
complete = function() {
|
150 |
-
|
151 |
setTimeout(function(){
|
152 |
-
|
153 |
-
|
|
|
154 |
|
155 |
body.removeClass( drawer_opened );
|
156 |
|
157 |
setTimeout(function(){
|
158 |
$('.merlin__body').addClass('exiting');
|
159 |
-
},
|
160 |
|
161 |
setTimeout(function(){
|
162 |
window.location.href=btn.href;
|
163 |
-
},
|
164 |
|
165 |
};
|
166 |
do_ajax();
|
@@ -168,14 +168,6 @@ var Merlin = (function($){
|
|
168 |
}
|
169 |
}
|
170 |
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
|
180 |
function merlin_loading_button( btn ){
|
181 |
|
@@ -235,7 +227,6 @@ jQuery(document).ready(function($) {
|
|
235 |
}
|
236 |
}
|
237 |
|
238 |
-
|
239 |
$(".post-type-fields input[type=checkbox]").change(function(){
|
240 |
var self = $(this);
|
241 |
if(self.prop('checked')){
|
@@ -270,42 +261,15 @@ jQuery(document).ready(function($) {
|
|
270 |
if(schematype == 'local_business'){
|
271 |
$(".saswp-option-table-class tr").eq(1).show();
|
272 |
$(".saswp-business-text-field-tr").show();
|
273 |
-
$(".saswp-option-table-class tr").find('select').attr('disabled', false);
|
274 |
-
// $("#saswp_dayofweek").attr('disabled', false);
|
275 |
$('.select-post-type').val('show_globally').trigger('change');
|
276 |
}
|
277 |
-
|
278 |
-
$(".saswp-service-text-field-tr").show();
|
279 |
-
$(".saswp-option-table-class tr").find('select').attr('disabled', false);
|
280 |
-
}
|
281 |
-
if(schematype == 'Event'){
|
282 |
-
$(".saswp-event-text-field-tr").show();
|
283 |
-
$(".saswp-option-table-class tr").find('select').attr('disabled', false);
|
284 |
-
}
|
285 |
-
if(schematype == 'Product'){
|
286 |
-
$(".saswp-product-text-field-tr").show();
|
287 |
-
$(".saswp-option-table-class tr").find('select').attr('disabled', false);
|
288 |
-
}
|
289 |
-
if(schematype == 'AudioObject'){
|
290 |
-
$(".saswp-audio-text-field-tr").show();
|
291 |
-
}
|
292 |
-
if(schematype == 'SoftwareApplication'){
|
293 |
-
$(".saswp-softwareapplication-text-field-tr").show();
|
294 |
-
}
|
295 |
if(schematype == 'Review'){
|
296 |
$(".saswp-review-text-field-tr").show();
|
297 |
$(".saswp-option-table-class tr").find('select').attr('disabled', false);
|
298 |
}
|
299 |
$(".saswp-schem-type-note").addClass('saswp_hide');
|
300 |
-
if(schematype == 'qanda'){
|
301 |
-
$(".saswp-schem-type-note").removeClass('saswp_hide');
|
302 |
-
}
|
303 |
-
|
304 |
-
$(".saswp-job-posting-note").addClass('saswp_hide');
|
305 |
-
|
306 |
-
// if(schematype == 'JobPosting'){
|
307 |
-
// $(".saswp-job-posting-note").removeClass('saswp_hide');
|
308 |
-
// }
|
309 |
|
310 |
saswp_enable_rating_review();
|
311 |
}).change();
|
@@ -329,27 +293,9 @@ jQuery(document).ready(function($) {
|
|
329 |
if(schematype == 'local_business'){
|
330 |
$(".saswp-"+businesstype+'-tr').show();
|
331 |
$(".saswp-business-text-field-tr").show();
|
332 |
-
$(".saswp-"+businesstype+'-tr').find('select').attr('disabled', false);
|
333 |
-
// $("#saswp_dayofweek").attr('disabled', false);
|
334 |
-
}
|
335 |
-
if(schematype == 'Service'){
|
336 |
-
$(".saswp-service-text-field-tr").show();
|
337 |
-
$(".saswp-service-text-field-tr").find('select').attr('disabled', false);
|
338 |
}
|
339 |
-
|
340 |
-
$(".saswp-event-text-field-tr").show();
|
341 |
-
$(".saswp-service-text-field-tr").find('select').attr('disabled', false);
|
342 |
-
}
|
343 |
-
if(schematype == 'Product'){
|
344 |
-
$(".saswp-product-text-field-tr").show();
|
345 |
-
$(".saswp-product-text-field-tr").find('select').attr('disabled', false);
|
346 |
-
}
|
347 |
-
if(schematype == 'AudioObject'){
|
348 |
-
$(".saswp-audio-text-field-tr").show();
|
349 |
-
}
|
350 |
-
if(schematype == 'SoftwareApplication'){
|
351 |
-
$(".saswp-softwareapplication-text-field-tr").show();
|
352 |
-
}
|
353 |
if(schematype == 'Review'){
|
354 |
$(".saswp-review-text-field-tr").show();
|
355 |
$(".saswp-review-text-field-tr").find('select').attr('disabled', false);
|
@@ -357,42 +303,6 @@ jQuery(document).ready(function($) {
|
|
357 |
saswp_enable_rating_review();
|
358 |
}).change();
|
359 |
|
360 |
-
saswp_schema_datepicker();
|
361 |
-
function saswp_schema_datepicker(){
|
362 |
-
|
363 |
-
$('.saswp-datepicker-picker').datepicker({
|
364 |
-
dateFormat: "yy-mm-dd",
|
365 |
-
minDate: 0
|
366 |
-
});
|
367 |
-
}
|
368 |
-
|
369 |
-
|
370 |
-
$("input[data-id=media]").click(function(e) { // Application Icon upload
|
371 |
-
e.preventDefault();
|
372 |
-
var button = $(this);
|
373 |
-
var id = button.attr('id').replace('_button', '');
|
374 |
-
var saswpMediaUploader = wp.media({
|
375 |
-
title: "Application Icon",
|
376 |
-
button: {
|
377 |
-
text: "Select Icon"
|
378 |
-
},
|
379 |
-
multiple: false // Set this to true to allow multiple files to be selected
|
380 |
-
})
|
381 |
-
.on("select", function() {
|
382 |
-
var attachment = saswpMediaUploader.state().get('selection').first().toJSON();
|
383 |
-
|
384 |
-
$("#"+id).val(attachment.url);
|
385 |
-
$("input[data-id='"+id+"_id']").val(attachment.id);
|
386 |
-
$("input[data-id='"+id+"_height']").val(attachment.height);
|
387 |
-
$("input[data-id='"+id+"_width']").val(attachment.width);
|
388 |
-
$("input[data-id='"+id+"_thumbnail']").val(attachment.url);
|
389 |
-
})
|
390 |
-
.open();
|
391 |
-
});
|
392 |
-
|
393 |
-
$('#saswp-dayofweek-opens-time').timepicker({ 'timeFormat': 'H:i:s'});
|
394 |
-
$('#saswp-dayofweek-closes-time').timepicker({ 'timeFormat': 'H:i:s'});
|
395 |
-
|
396 |
function saswp_enable_rating_review(){
|
397 |
var schema_type ="";
|
398 |
if($('select#schema_type option:selected').val()){
|
6 |
|
7 |
// callbacks from form button clicks.
|
8 |
var callbacks = {
|
9 |
+
save_logo: function(btn){
|
10 |
+
var logosave = new saveLogo(btn);
|
11 |
+
logosave.init(btn);
|
12 |
+
},
|
13 |
install_child: function(btn) {
|
14 |
var installer = new ChildTheme();
|
15 |
installer.init(btn);
|
82 |
var data_callback = $(this).data("callback");
|
83 |
if( data_callback && typeof callbacks[data_callback] !== "undefined"){
|
84 |
// We have to process a callback before continue with form submission.
|
85 |
+
callbacks[data_callback](this);
|
|
|
86 |
return false;
|
87 |
} else {
|
88 |
return true;
|
91 |
}
|
92 |
|
93 |
function saveLogo() {
|
94 |
+
var body = $('.merlin__body');
|
95 |
var complete, notice = $("#child-theme-text");
|
96 |
|
97 |
function ajax_callback(r) {
|
146 |
return {
|
147 |
init: function(btn) {
|
148 |
complete = function() {
|
149 |
+
|
150 |
setTimeout(function(){
|
151 |
+
$(".saswp_branding").hide();
|
152 |
+
$(".merlin__body").addClass('js--finished');
|
153 |
+
},0);
|
154 |
|
155 |
body.removeClass( drawer_opened );
|
156 |
|
157 |
setTimeout(function(){
|
158 |
$('.merlin__body').addClass('exiting');
|
159 |
+
},1200);
|
160 |
|
161 |
setTimeout(function(){
|
162 |
window.location.href=btn.href;
|
163 |
+
},1200);
|
164 |
|
165 |
};
|
166 |
do_ajax();
|
168 |
}
|
169 |
}
|
170 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
|
172 |
function merlin_loading_button( btn ){
|
173 |
|
227 |
}
|
228 |
}
|
229 |
|
|
|
230 |
$(".post-type-fields input[type=checkbox]").change(function(){
|
231 |
var self = $(this);
|
232 |
if(self.prop('checked')){
|
261 |
if(schematype == 'local_business'){
|
262 |
$(".saswp-option-table-class tr").eq(1).show();
|
263 |
$(".saswp-business-text-field-tr").show();
|
264 |
+
$(".saswp-option-table-class tr").find('select').attr('disabled', false);
|
|
|
265 |
$('.select-post-type').val('show_globally').trigger('change');
|
266 |
}
|
267 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
if(schematype == 'Review'){
|
269 |
$(".saswp-review-text-field-tr").show();
|
270 |
$(".saswp-option-table-class tr").find('select').attr('disabled', false);
|
271 |
}
|
272 |
$(".saswp-schem-type-note").addClass('saswp_hide');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
|
274 |
saswp_enable_rating_review();
|
275 |
}).change();
|
293 |
if(schematype == 'local_business'){
|
294 |
$(".saswp-"+businesstype+'-tr').show();
|
295 |
$(".saswp-business-text-field-tr").show();
|
296 |
+
$(".saswp-"+businesstype+'-tr').find('select').attr('disabled', false);
|
|
|
|
|
|
|
|
|
|
|
297 |
}
|
298 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
299 |
if(schematype == 'Review'){
|
300 |
$(".saswp-review-text-field-tr").show();
|
301 |
$(".saswp-review-text-field-tr").find('select').attr('disabled', false);
|
303 |
saswp_enable_rating_review();
|
304 |
}).change();
|
305 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
306 |
function saswp_enable_rating_review(){
|
307 |
var schema_type ="";
|
308 |
if($('select#schema_type option:selected').val()){
|
admin_section/js/saswp-add-new.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var ajaxurl=saswp_add_new_params.ajaxurl,Merlin=function(e){var t={save_logo:function(e){new a(e).init(e)},install_child:function(e){(new ChildTheme).init(e)},activate_license:function(e){(new ActivateLicense).init(e)},install_plugins:function(e){(new PluginManager).init(e)},install_content:function(e){(new ContentManager).init(e)}};function s(){var s=e(".merlin__body"),a=(e(".merlin__body--loading"),e(".merlin__body--exiting"),e("#merlin__drawer-trigger"));drawer_opened="merlin__drawer--open",setTimeout(function(){s.addClass("loaded")},100),a.on("click",function(){s.toggleClass(drawer_opened)}),e(".merlin__button--proceed:not(.merlin__button--closer)").click(function(e){e.preventDefault();var t=this.getAttribute("href");s.addClass("exiting"),setTimeout(function(){window.location=t},400)}),e(".merlin__button--closer").on("click",function(e){s.removeClass(drawer_opened),e.preventDefault();var t=this.getAttribute("href");setTimeout(function(){s.addClass("exiting")},600),setTimeout(function(){window.location=t},1100)}),e(".button-next").on("click",function(s){if(s.preventDefault(),!function(e){var t=jQuery(e);if("yes"==t.data("done-loading"))return!1;t.is("input")||t.is("button");return t.data("done-loading","yes"),t.addClass("merlin__button--loading"),{done:function(){!0,t.attr("disabled",!1)}}}(this))return!1;var a=e(this).data("callback");return!a||void 0===t[a]||(t[a](this)
|
1 |
+
var ajaxurl=saswp_add_new_params.ajaxurl,Merlin=function(e){var t={save_logo:function(e){new a(e).init(e)},install_child:function(e){(new ChildTheme).init(e)},activate_license:function(e){(new ActivateLicense).init(e)},install_plugins:function(e){(new PluginManager).init(e)},install_content:function(e){(new ContentManager).init(e)}};function s(){var s=e(".merlin__body"),a=(e(".merlin__body--loading"),e(".merlin__body--exiting"),e("#merlin__drawer-trigger"));drawer_opened="merlin__drawer--open",setTimeout(function(){s.addClass("loaded")},100),a.on("click",function(){s.toggleClass(drawer_opened)}),e(".merlin__button--proceed:not(.merlin__button--closer)").click(function(e){e.preventDefault();var t=this.getAttribute("href");s.addClass("exiting"),setTimeout(function(){window.location=t},400)}),e(".merlin__button--closer").on("click",function(e){s.removeClass(drawer_opened),e.preventDefault();var t=this.getAttribute("href");setTimeout(function(){s.addClass("exiting")},600),setTimeout(function(){window.location=t},1100)}),e(".button-next").on("click",function(s){if(s.preventDefault(),!function(e){var t=jQuery(e);if("yes"==t.data("done-loading"))return!1;t.is("input")||t.is("button");return t.data("done-loading","yes"),t.addClass("merlin__button--loading"),{done:function(){!0,t.attr("disabled",!1)}}}(this))return!1;var a=e(this).data("callback");return!a||void 0===t[a]||(t[a](this),!1)})}function a(){var t,s=e(".merlin__body"),a=e("#child-theme-text");function n(e){void 0!==e.done?(setTimeout(function(){a.addClass("lead")},0),setTimeout(function(){a.addClass("success"),a.html(e.message)},600),t()):(a.addClass("lead error"),a.html(e.error))}return{init:function(a){var i;t=function(){setTimeout(function(){e(".saswp_branding").hide(),e(".merlin__body").addClass("js--finished")},0),s.removeClass(drawer_opened),setTimeout(function(){e(".merlin__body").addClass("exiting")},1200),setTimeout(function(){window.location.href=a.href},1200)},i={action:"saswp_add_new_save_steps_data",wpnonce:saswp_add_new_params.wpnonce},jQuery("ul.merlin__drawer--import-content").find("input, select, textarea").each(function(e,t){switch(jQuery(this).attr("type")){case"text":case"hidden":i[jQuery(this).attr("name")]=jQuery(this).val();break;case"checkbox":1==jQuery(this).prop("checked")?i[jQuery(this).attr("name")]=1:i[jQuery(this).attr("name")]=0;break;default:0==jQuery(this).prop("disabled")&&(i[jQuery(this).attr("name")]=jQuery(this).val())}}),jQuery.post(saswp_add_new_params.ajaxurl,i,n).fail(n)}}}return{init:function(){this,e(s)},callback:function(e){console.log(e),console.log(this)}}}(jQuery);Merlin.init(),jQuery(document).ready(function(e){function t(e){if(e.prop("checked")){var t=e.attr("name");t=t.replace("_checkbox",""),e.parent(".social-fields").find("input[type=text]").show()}else e.parent(".social-fields").find("input[type=text]").val("").hide()}function s(){var t="";e("select#schema_type option:selected").val()&&(t=e("select#schema_type option:selected").val()),e(".saswp-tab-links.selected").attr("saswp-schema-type")&&(t=e(".saswp-tab-links.selected").attr("saswp-schema-type")),t&&e(".saswp-enable-rating-review-"+t.toLowerCase()).change(function(){e(this).is(":checked")?e(this).parent().parent().siblings(".saswp-rating-review-"+t.toLowerCase()).show():e(this).parent().parent().siblings(".saswp-rating-review-"+t.toLowerCase()).hide()}).change()}e(".social-fields input[type=checkbox]").change(function(){t(e(this))}),e(".social-fields input[type=checkbox]").each(function(){t(e(this))}),e(".post-type-fields input[type=checkbox]").change(function(){var t=e(this);if(t.prop("checked")){var s=t.attr("name");s=s.replace("_checkbox",""),t.parent(".post-type-fields").find("select#schema_type").show()}else t.parent(".post-type-fields").find("select#schema_type").val("").hide()}),e(".post-type-fields").each(function(){e(this).find("select#schema_type").val("").hide()}),e(".saswp-schame-type-select").change(function(){var t=e(this).val();e(".saswp-option-table-class tr").each(function(t,s){t>0&&(e(this).hide(),e(this).find("select").attr("disabled",!0))}),"TechArticle"==t||"Article"==t||"Blogposting"==t||"NewsArticle"==t||"WebPage"==t?e(".saswp-enable-speakable").parent().parent().show():e(".saswp-enable-speakable").parent().parent().hide(),"local_business"==t&&(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")),"Review"==t&&(e(".saswp-review-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),e(".saswp-schem-type-note").addClass("saswp_hide"),s()}).change(),e("#saswp_business_type").change(function(){var t=e(this).val(),a=e(".saswp-schame-type-select").val();e(".saswp-option-table-class tr").each(function(t,s){t>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-"+t+"-tr").show(),e(".saswp-business-text-field-tr").show(),e(".saswp-"+t+"-tr").find("select").attr("disabled",!1)),"Review"==a&&(e(".saswp-review-text-field-tr").show(),e(".saswp-review-text-field-tr").find("select").attr("disabled",!1)),s()}).change(),s()});
|
admin_section/js/saswp-install.js
CHANGED
@@ -81,8 +81,7 @@ var Merlin = (function($){
|
|
81 |
var data_callback = $(this).data("callback");
|
82 |
if( data_callback && typeof callbacks[data_callback] !== "undefined"){
|
83 |
// We have to process a callback before continue with form submission.
|
84 |
-
callbacks[data_callback](this);
|
85 |
-
$(".saswp_branding").hide();
|
86 |
return false;
|
87 |
} else {
|
88 |
return true;
|
@@ -145,33 +144,25 @@ var Merlin = (function($){
|
|
145 |
complete = function() {
|
146 |
|
147 |
setTimeout(function(){
|
|
|
148 |
$(".merlin__body").addClass('js--finished');
|
149 |
-
},
|
150 |
|
151 |
body.removeClass( drawer_opened );
|
152 |
|
153 |
setTimeout(function(){
|
154 |
$('.merlin__body').addClass('exiting');
|
155 |
-
},
|
156 |
|
157 |
setTimeout(function(){
|
158 |
window.location.href=btn.href;
|
159 |
-
},
|
160 |
|
161 |
};
|
162 |
do_ajax();
|
163 |
}
|
164 |
}
|
165 |
}
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
|
176 |
function merlin_loading_button( btn ){
|
177 |
|
81 |
var data_callback = $(this).data("callback");
|
82 |
if( data_callback && typeof callbacks[data_callback] !== "undefined"){
|
83 |
// We have to process a callback before continue with form submission.
|
84 |
+
callbacks[data_callback](this);
|
|
|
85 |
return false;
|
86 |
} else {
|
87 |
return true;
|
144 |
complete = function() {
|
145 |
|
146 |
setTimeout(function(){
|
147 |
+
$(".saswp_branding").hide();
|
148 |
$(".merlin__body").addClass('js--finished');
|
149 |
+
},0);
|
150 |
|
151 |
body.removeClass( drawer_opened );
|
152 |
|
153 |
setTimeout(function(){
|
154 |
$('.merlin__body').addClass('exiting');
|
155 |
+
},1200);
|
156 |
|
157 |
setTimeout(function(){
|
158 |
window.location.href=btn.href;
|
159 |
+
},1200);
|
160 |
|
161 |
};
|
162 |
do_ajax();
|
163 |
}
|
164 |
}
|
165 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
|
167 |
function merlin_loading_button( btn ){
|
168 |
|
admin_section/js/saswp-install.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var ajaxurl=saswp_install_params.ajaxurl,Merlin=function(e){var t={save_logo:function(e){new i(e).init(e)},install_child:function(e){(new ChildTheme).init(e)},activate_license:function(e){(new ActivateLicense).init(e)},install_plugins:function(e){(new PluginManager).init(e)},install_content:function(e){(new ContentManager).init(e)}};function n(){var n=e(".merlin__body"),i=(e(".merlin__body--loading"),e(".merlin__body--exiting"),e("#merlin__drawer-trigger"));drawer_opened="merlin__drawer--open",setTimeout(function(){n.addClass("loaded")},100),i.on("click",function(){n.toggleClass(drawer_opened)}),e(".merlin__button--proceed:not(.merlin__button--closer)").click(function(e){e.preventDefault();var t=this.getAttribute("href");n.addClass("exiting"),setTimeout(function(){window.location=t},400)}),e(".merlin__button--closer").on("click",function(e){n.removeClass(drawer_opened),e.preventDefault();var t=this.getAttribute("href");setTimeout(function(){n.addClass("exiting")},600),setTimeout(function(){window.location=t},1100)}),e(".button-next").on("click",function(n){if(n.preventDefault(),!function(e){var t=jQuery(e);if("yes"==t.data("done-loading"))return!1;t.is("input")||t.is("button");return t.data("done-loading","yes"),t.addClass("merlin__button--loading"),{done:function(){!0,t.attr("disabled",!1)}}}(this))return!1;var i=e(this).data("callback");return!i||void 0===t[i]||(t[i](this)
|
1 |
+
var ajaxurl=saswp_install_params.ajaxurl,Merlin=function(e){var t={save_logo:function(e){new i(e).init(e)},install_child:function(e){(new ChildTheme).init(e)},activate_license:function(e){(new ActivateLicense).init(e)},install_plugins:function(e){(new PluginManager).init(e)},install_content:function(e){(new ContentManager).init(e)}};function n(){var n=e(".merlin__body"),i=(e(".merlin__body--loading"),e(".merlin__body--exiting"),e("#merlin__drawer-trigger"));drawer_opened="merlin__drawer--open",setTimeout(function(){n.addClass("loaded")},100),i.on("click",function(){n.toggleClass(drawer_opened)}),e(".merlin__button--proceed:not(.merlin__button--closer)").click(function(e){e.preventDefault();var t=this.getAttribute("href");n.addClass("exiting"),setTimeout(function(){window.location=t},400)}),e(".merlin__button--closer").on("click",function(e){n.removeClass(drawer_opened),e.preventDefault();var t=this.getAttribute("href");setTimeout(function(){n.addClass("exiting")},600),setTimeout(function(){window.location=t},1100)}),e(".button-next").on("click",function(n){if(n.preventDefault(),!function(e){var t=jQuery(e);if("yes"==t.data("done-loading"))return!1;t.is("input")||t.is("button");return t.data("done-loading","yes"),t.addClass("merlin__button--loading"),{done:function(){!0,t.attr("disabled",!1)}}}(this))return!1;var i=e(this).data("callback");return!i||void 0===t[i]||(t[i](this),!1)})}function i(){var t,n=e(".merlin__body"),i=e("#child-theme-text");function a(e){void 0!==e.done?(setTimeout(function(){i.addClass("lead")},0),setTimeout(function(){i.addClass("success"),i.html(e.message)},600),t()):(i.addClass("lead error"),i.html(e.error))}return{init:function(i){var s;t=function(){setTimeout(function(){e(".saswp_branding").hide(),e(".merlin__body").addClass("js--finished")},0),n.removeClass(drawer_opened),setTimeout(function(){e(".merlin__body").addClass("exiting")},1200),setTimeout(function(){window.location.href=i.href},1200)},s={action:"saswp_save_installer",wpnonce:saswp_install_params.wpnonce},jQuery("ul.merlin__drawer--import-content").find("input, select").each(function(e,t){switch(jQuery(this).attr("type")){case"text":case"hidden":s[jQuery(this).attr("name")]=jQuery(this).val();break;case"checkbox":1==jQuery(this).prop("checked")?s[jQuery(this).attr("name")]=1:s[jQuery(this).attr("name")]=0;break;default:s[jQuery(this).attr("name")]=jQuery(this).val()}}),jQuery.post(saswp_install_params.ajaxurl,s,a).fail(a)}}}return{init:function(){this,e(n)},callback:function(e){console.log(e),console.log(this)}}}(jQuery);Merlin.init(),jQuery(document).ready(function(e){function t(e){if(e.prop("checked")){var t=e.attr("name");t=t.replace("_checkbox",""),e.parent(".saswp-social-fields").find("input[type=text]").show()}else e.parent(".saswp-social-fields").find("input[type=text]").val("").hide()}e(".saswp-social-fields input[type=checkbox]").change(function(){t(e(this))}),e(".saswp-social-fields input[type=checkbox]").each(function(){t(e(this))}),e(".post-type-fields input[type=checkbox]").change(function(){var t=e(this);if(t.prop("checked")){var n=t.attr("name");n=n.replace("_checkbox",""),t.parent(".post-type-fields").find("select#schema_type").show()}else t.parent(".post-type-fields").find("select#schema_type").val("").hide()}),e(".post-type-fields").each(function(){e(this).find("select#schema_type").val("").hide()})});
|
admin_section/settings.php
CHANGED
@@ -1683,6 +1683,17 @@ function saswp_compatibility_page_callback(){
|
|
1683 |
'name' => 'sd_data[saswp-homeland]',
|
1684 |
)
|
1685 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1686 |
|
1687 |
$seo_press = array(
|
1688 |
'label' => 'SEOPress',
|
@@ -1888,6 +1899,11 @@ function saswp_compatibility_page_callback(){
|
|
1888 |
|
1889 |
$homeland_theme['note'] = esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/homeland-responsive-real-estate-theme-for-wordpress/6518965">Homeland</a>';
|
1890 |
|
|
|
|
|
|
|
|
|
|
|
1891 |
}
|
1892 |
|
1893 |
if(!is_plugin_active('taqyeem/taqyeem.php') || get_template() != 'jannah' ){
|
@@ -1924,6 +1940,7 @@ function saswp_compatibility_page_callback(){
|
|
1924 |
if(!is_plugin_active('real-estate-schema/real-estate-schema.php')){
|
1925 |
|
1926 |
$homeland_theme['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/extensions/">Real Estate Schema Addon</a>';
|
|
|
1927 |
|
1928 |
}
|
1929 |
|
@@ -1957,7 +1974,8 @@ function saswp_compatibility_page_callback(){
|
|
1957 |
$squirrly_seo,
|
1958 |
$recipe_maker,
|
1959 |
$rankmath,
|
1960 |
-
$homeland_theme
|
|
|
1961 |
|
1962 |
);
|
1963 |
|
1683 |
'name' => 'sd_data[saswp-homeland]',
|
1684 |
)
|
1685 |
);
|
1686 |
+
$real_homes = array(
|
1687 |
+
'label' => 'RealHomes Theme',
|
1688 |
+
'id' => 'saswp-realhomes-checkbox',
|
1689 |
+
'name' => 'saswp-realhomes-checkbox',
|
1690 |
+
'type' => 'checkbox',
|
1691 |
+
'class' => 'checkbox saswp-checkbox',
|
1692 |
+
'hidden' => array(
|
1693 |
+
'id' => 'saswp-realhomes',
|
1694 |
+
'name' => 'sd_data[saswp-realhomes]',
|
1695 |
+
)
|
1696 |
+
);
|
1697 |
|
1698 |
$seo_press = array(
|
1699 |
'label' => 'SEOPress',
|
1899 |
|
1900 |
$homeland_theme['note'] = esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/homeland-responsive-real-estate-theme-for-wordpress/6518965">Homeland</a>';
|
1901 |
|
1902 |
+
}
|
1903 |
+
if(get_template() != 'realhomes' ){
|
1904 |
+
|
1905 |
+
$real_homes['note'] = esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/real-homes-wordpress-real-estate-theme/5373914">RealHomes</a>';
|
1906 |
+
|
1907 |
}
|
1908 |
|
1909 |
if(!is_plugin_active('taqyeem/taqyeem.php') || get_template() != 'jannah' ){
|
1940 |
if(!is_plugin_active('real-estate-schema/real-estate-schema.php')){
|
1941 |
|
1942 |
$homeland_theme['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/extensions/">Real Estate Schema Addon</a>';
|
1943 |
+
$real_homes['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/extensions/">Real Estate Schema Addon</a>';
|
1944 |
|
1945 |
}
|
1946 |
|
1974 |
$squirrly_seo,
|
1975 |
$recipe_maker,
|
1976 |
$rankmath,
|
1977 |
+
$homeland_theme,
|
1978 |
+
$real_homes
|
1979 |
|
1980 |
);
|
1981 |
|
admin_section/structure_admin.php
CHANGED
@@ -778,7 +778,8 @@ function saswp_dequeue_script() {
|
|
778 |
|
779 |
}
|
780 |
}
|
781 |
-
|
|
|
782 |
|
783 |
add_action( 'admin_enqueue_scripts', 'saswp_style_script_include' );
|
784 |
|
778 |
|
779 |
}
|
780 |
}
|
781 |
+
|
782 |
+
add_action( 'wp_print_scripts', 'saswp_dequeue_script', 100 );
|
783 |
|
784 |
add_action( 'admin_enqueue_scripts', 'saswp_style_script_include' );
|
785 |
|
core/array-list/meta_list.php
CHANGED
@@ -5,16 +5,17 @@ return apply_filters('saswp_modify_post_meta_list',
|
|
5 |
array(
|
6 |
'label' => __( 'Single Element', 'schema-and-structured-data-for-wp' ),
|
7 |
'meta-list' => array(
|
8 |
-
'blogname'
|
9 |
'blogdescription' => __( 'Tagline', 'schema-and-structured-data-for-wp' ),
|
10 |
'site_url' => __( 'Site URL', 'schema-and-structured-data-for-wp' ),
|
11 |
'post_title' => __( 'Title', 'schema-and-structured-data-for-wp' ),
|
12 |
'post_content' => __( 'Content', 'schema-and-structured-data-for-wp' ),
|
|
|
13 |
'post_excerpt' => __( 'Excerpt', 'schema-and-structured-data-for-wp' ),
|
14 |
'post_permalink' => __( 'Permalink', 'schema-and-structured-data-for-wp' ),
|
15 |
-
'author_name' => __( 'Author
|
16 |
-
'author_first_name' => __( 'Author
|
17 |
-
'author_last_name' => __( 'Author
|
18 |
'post_date' => __( 'Publish Date', 'schema-and-structured-data-for-wp' ),
|
19 |
'post_modified' => __( 'Last Modify Date', 'schema-and-structured-data-for-wp' ),
|
20 |
),
|
@@ -39,7 +40,7 @@ return apply_filters('saswp_modify_post_meta_list',
|
|
39 |
'meta-list' => array(
|
40 |
'featured_img' => __( 'Featured image', 'schema-and-structured-data-for-wp' ),
|
41 |
'author_image' => __( 'Author image', 'schema-and-structured-data-for-wp' ),
|
42 |
-
'site_logo'
|
43 |
),
|
44 |
),
|
45 |
array(
|
@@ -51,6 +52,7 @@ return apply_filters('saswp_modify_post_meta_list',
|
|
51 |
array(
|
52 |
'label' => __( 'Custom Field', 'schema-and-structured-data-for-wp' ),
|
53 |
'meta-list' => array(
|
|
|
54 |
'custom_field' => __( 'Custom Field', 'schema-and-structured-data-for-wp' ),
|
55 |
),
|
56 |
),
|
5 |
array(
|
6 |
'label' => __( 'Single Element', 'schema-and-structured-data-for-wp' ),
|
7 |
'meta-list' => array(
|
8 |
+
'blogname' => __( 'Site Title', 'schema-and-structured-data-for-wp' ),
|
9 |
'blogdescription' => __( 'Tagline', 'schema-and-structured-data-for-wp' ),
|
10 |
'site_url' => __( 'Site URL', 'schema-and-structured-data-for-wp' ),
|
11 |
'post_title' => __( 'Title', 'schema-and-structured-data-for-wp' ),
|
12 |
'post_content' => __( 'Content', 'schema-and-structured-data-for-wp' ),
|
13 |
+
'post_category' => __( 'Category', 'schema-and-structured-data-for-wp' ),
|
14 |
'post_excerpt' => __( 'Excerpt', 'schema-and-structured-data-for-wp' ),
|
15 |
'post_permalink' => __( 'Permalink', 'schema-and-structured-data-for-wp' ),
|
16 |
+
'author_name' => __( 'Author Name', 'schema-and-structured-data-for-wp' ),
|
17 |
+
'author_first_name' => __( 'Author First Name', 'schema-and-structured-data-for-wp' ),
|
18 |
+
'author_last_name' => __( 'Author Last Name', 'schema-and-structured-data-for-wp' ),
|
19 |
'post_date' => __( 'Publish Date', 'schema-and-structured-data-for-wp' ),
|
20 |
'post_modified' => __( 'Last Modify Date', 'schema-and-structured-data-for-wp' ),
|
21 |
),
|
40 |
'meta-list' => array(
|
41 |
'featured_img' => __( 'Featured image', 'schema-and-structured-data-for-wp' ),
|
42 |
'author_image' => __( 'Author image', 'schema-and-structured-data-for-wp' ),
|
43 |
+
'site_logo' => __( 'Logo', 'schema-and-structured-data-for-wp' ),
|
44 |
),
|
45 |
),
|
46 |
array(
|
52 |
array(
|
53 |
'label' => __( 'Custom Field', 'schema-and-structured-data-for-wp' ),
|
54 |
'meta-list' => array(
|
55 |
+
'fixed_image' => __( 'Fixed Image', 'schema-and-structured-data-for-wp' ),
|
56 |
'custom_field' => __( 'Custom Field', 'schema-and-structured-data-for-wp' ),
|
57 |
),
|
58 |
),
|
modules/gutenberg/assets/css/editor.css
CHANGED
@@ -1,135 +1,135 @@
|
|
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 : Sep 15, 2019, 1:52:02 PM
|
8 |
-
Author : acer
|
9 |
-
*/
|
10 |
-
|
11 |
-
.saswp-how-to-step-button:hover{
|
12 |
-
color: #0085ba !important;
|
13 |
-
box-shadow: none !important;
|
14 |
-
}
|
15 |
-
.saswp-how-to-setp-list li{
|
16 |
-
position: relative;
|
17 |
-
padding: 8px 4px 8px 32px;
|
18 |
-
margin: 4px 0;
|
19 |
-
border: 1px solid rgba(145,151,162,.25);
|
20 |
-
list-style-type: none;
|
21 |
-
list-style: none;
|
22 |
-
}
|
23 |
-
|
24 |
-
.saswp-how-to-tool-list li{
|
25 |
-
position: relative;
|
26 |
-
padding: 8px 8px 8px 32px;
|
27 |
-
margin: 4px;
|
28 |
-
border: 1px solid rgba(145,151,162,.25);
|
29 |
-
list-style-type: none;
|
30 |
-
list-style: none;
|
31 |
-
display: flow-root;
|
32 |
-
}
|
33 |
-
.saswp-how-to-material-list li{
|
34 |
-
position: relative;
|
35 |
-
padding: 8px 8px 8px 32px;
|
36 |
-
margin: 4px;
|
37 |
-
border: 1px solid rgba(145,151,162,.25);
|
38 |
-
list-style-type: none;
|
39 |
-
list-style: none;
|
40 |
-
display: flow-root;
|
41 |
-
}
|
42 |
-
|
43 |
-
.saswp-how-to-step-number {
|
44 |
-
position: absolute;
|
45 |
-
left: 4px;
|
46 |
-
width: 24px;
|
47 |
-
text-align: right;
|
48 |
-
}
|
49 |
-
.saswp-how-to-step-title{
|
50 |
-
font-weight: 600;
|
51 |
-
}
|
52 |
-
.saswp-how-to-step-button-container{
|
53 |
-
display: flex;
|
54 |
-
}
|
55 |
-
.saswp-how-to-step-mover{
|
56 |
-
display: flex;
|
57 |
-
}
|
58 |
-
.saswp-how-to-step-controls-container{
|
59 |
-
display: flex;
|
60 |
-
justify-content: flex-end;
|
61 |
-
}
|
62 |
-
.saswp-how-to-duration-input{
|
63 |
-
width: 50px;
|
64 |
-
margin: 0 2px;
|
65 |
-
padding: 6px 4px;
|
66 |
-
text-align: center;
|
67 |
-
border-radius: 5px;
|
68 |
-
}
|
69 |
-
.saswp-how-to-duration-time-input{
|
70 |
-
display: inline-flex;
|
71 |
-
}
|
72 |
-
.saswp-how-to-duration-time-input button{
|
73 |
-
position: relative;
|
74 |
-
top: -12px;
|
75 |
-
}
|
76 |
-
|
77 |
-
|
78 |
-
.saswp-faq-step-button:hover{
|
79 |
-
color: #0085ba !important;
|
80 |
-
box-shadow: none !important;
|
81 |
-
}
|
82 |
-
.saswp-faq-setp-list li{
|
83 |
-
position: relative;
|
84 |
-
padding: 8px 4px 8px 32px;
|
85 |
-
margin: 4px 0;
|
86 |
-
border: 1px solid rgba(145,151,162,.25);
|
87 |
-
list-style-type: none;
|
88 |
-
list-style: none;
|
89 |
-
}
|
90 |
-
.saswp-faq-step-number {
|
91 |
-
position: absolute;
|
92 |
-
left: 4px;
|
93 |
-
width: 24px;
|
94 |
-
text-align: right;
|
95 |
-
}
|
96 |
-
.saswp-faq-step-title{
|
97 |
-
font-weight: 600;
|
98 |
-
}
|
99 |
-
.saswp-faq-button-container{
|
100 |
-
display: flex;
|
101 |
-
}
|
102 |
-
.saswp-faq-step-mover{
|
103 |
-
display: flex;
|
104 |
-
}
|
105 |
-
.saswp-faq-step-controls-container{
|
106 |
-
display: flex;
|
107 |
-
justify-content: flex-end;
|
108 |
-
}
|
109 |
-
.saswp-faq-duration-input{
|
110 |
-
width: 50px;
|
111 |
-
margin: 0 2px;
|
112 |
-
padding: 6px 4px;
|
113 |
-
text-align: center;
|
114 |
-
border-radius: 5px;
|
115 |
-
}
|
116 |
-
.saswp-faq-duration-time-input{
|
117 |
-
display: inline-flex;
|
118 |
-
}
|
119 |
-
.saswp-faq-duration-time-input button{
|
120 |
-
position: relative;
|
121 |
-
top: -12px;
|
122 |
-
}
|
123 |
-
.saswp-how-to-setp-block{
|
124 |
-
margin-bottom: 40px;
|
125 |
-
}
|
126 |
-
.saswp-how-to-tool-block, .saswp-how-to-material-block{
|
127 |
-
border: 1px solid rgba(145,151,162,.25);
|
128 |
-
margin-bottom: 5px;
|
129 |
-
}
|
130 |
-
.saswp-how-to-material-controls-container, .saswp-how-to-tool-controls-container{
|
131 |
-
float: right;
|
132 |
-
}
|
133 |
-
.saswp-how-to-material-button, .saswp-how-to-tool-button{
|
134 |
-
margin: 5px;
|
135 |
}
|
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 : Sep 15, 2019, 1:52:02 PM
|
8 |
+
Author : acer
|
9 |
+
*/
|
10 |
+
|
11 |
+
.saswp-how-to-step-button:hover{
|
12 |
+
color: #0085ba !important;
|
13 |
+
box-shadow: none !important;
|
14 |
+
}
|
15 |
+
.saswp-how-to-setp-list li{
|
16 |
+
position: relative;
|
17 |
+
padding: 8px 4px 8px 32px;
|
18 |
+
margin: 4px 0;
|
19 |
+
border: 1px solid rgba(145,151,162,.25);
|
20 |
+
list-style-type: none;
|
21 |
+
list-style: none;
|
22 |
+
}
|
23 |
+
|
24 |
+
.saswp-how-to-tool-list li{
|
25 |
+
position: relative;
|
26 |
+
padding: 8px 8px 8px 32px;
|
27 |
+
margin: 4px;
|
28 |
+
border: 1px solid rgba(145,151,162,.25);
|
29 |
+
list-style-type: none;
|
30 |
+
list-style: none;
|
31 |
+
display: flow-root;
|
32 |
+
}
|
33 |
+
.saswp-how-to-material-list li{
|
34 |
+
position: relative;
|
35 |
+
padding: 8px 8px 8px 32px;
|
36 |
+
margin: 4px;
|
37 |
+
border: 1px solid rgba(145,151,162,.25);
|
38 |
+
list-style-type: none;
|
39 |
+
list-style: none;
|
40 |
+
display: flow-root;
|
41 |
+
}
|
42 |
+
|
43 |
+
.saswp-how-to-step-number {
|
44 |
+
position: absolute;
|
45 |
+
left: 4px;
|
46 |
+
width: 24px;
|
47 |
+
text-align: right;
|
48 |
+
}
|
49 |
+
.saswp-how-to-step-title{
|
50 |
+
font-weight: 600;
|
51 |
+
}
|
52 |
+
.saswp-how-to-step-button-container{
|
53 |
+
display: flex;
|
54 |
+
}
|
55 |
+
.saswp-how-to-step-mover{
|
56 |
+
display: flex;
|
57 |
+
}
|
58 |
+
.saswp-how-to-step-controls-container{
|
59 |
+
display: flex;
|
60 |
+
justify-content: flex-end;
|
61 |
+
}
|
62 |
+
.saswp-how-to-duration-input{
|
63 |
+
width: 50px;
|
64 |
+
margin: 0 2px;
|
65 |
+
padding: 6px 4px;
|
66 |
+
text-align: center;
|
67 |
+
border-radius: 5px;
|
68 |
+
}
|
69 |
+
.saswp-how-to-duration-time-input{
|
70 |
+
display: inline-flex;
|
71 |
+
}
|
72 |
+
.saswp-how-to-duration-time-input button{
|
73 |
+
position: relative;
|
74 |
+
top: -12px;
|
75 |
+
}
|
76 |
+
|
77 |
+
|
78 |
+
.saswp-faq-step-button:hover{
|
79 |
+
color: #0085ba !important;
|
80 |
+
box-shadow: none !important;
|
81 |
+
}
|
82 |
+
.saswp-faq-setp-list li{
|
83 |
+
position: relative;
|
84 |
+
padding: 8px 4px 8px 32px;
|
85 |
+
margin: 4px 0;
|
86 |
+
border: 1px solid rgba(145,151,162,.25);
|
87 |
+
list-style-type: none;
|
88 |
+
list-style: none;
|
89 |
+
}
|
90 |
+
.saswp-faq-step-number {
|
91 |
+
position: absolute;
|
92 |
+
left: 4px;
|
93 |
+
width: 24px;
|
94 |
+
text-align: right;
|
95 |
+
}
|
96 |
+
.saswp-faq-step-title{
|
97 |
+
font-weight: 600;
|
98 |
+
}
|
99 |
+
.saswp-faq-button-container{
|
100 |
+
display: flex;
|
101 |
+
}
|
102 |
+
.saswp-faq-step-mover{
|
103 |
+
display: flex;
|
104 |
+
}
|
105 |
+
.saswp-faq-step-controls-container{
|
106 |
+
display: flex;
|
107 |
+
justify-content: flex-end;
|
108 |
+
}
|
109 |
+
.saswp-faq-duration-input{
|
110 |
+
width: 50px;
|
111 |
+
margin: 0 2px;
|
112 |
+
padding: 6px 4px;
|
113 |
+
text-align: center;
|
114 |
+
border-radius: 5px;
|
115 |
+
}
|
116 |
+
.saswp-faq-duration-time-input{
|
117 |
+
display: inline-flex;
|
118 |
+
}
|
119 |
+
.saswp-faq-duration-time-input button{
|
120 |
+
position: relative;
|
121 |
+
top: -12px;
|
122 |
+
}
|
123 |
+
.saswp-how-to-setp-block{
|
124 |
+
margin-bottom: 40px;
|
125 |
+
}
|
126 |
+
.saswp-how-to-tool-block, .saswp-how-to-material-block{
|
127 |
+
border: 1px solid rgba(145,151,162,.25);
|
128 |
+
margin-bottom: 5px;
|
129 |
+
}
|
130 |
+
.saswp-how-to-material-controls-container, .saswp-how-to-tool-controls-container{
|
131 |
+
float: right;
|
132 |
+
}
|
133 |
+
.saswp-how-to-material-button, .saswp-how-to-tool-button{
|
134 |
+
margin: 5px;
|
135 |
}
|
modules/gutenberg/assets/css/style.css
CHANGED
@@ -1,9 +1,9 @@
|
|
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 : Sep 15, 2019, 1:52:02 PM
|
8 |
-
Author : acer
|
9 |
-
*/
|
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 : Sep 15, 2019, 1:52:02 PM
|
8 |
+
Author : acer
|
9 |
+
*/
|
modules/gutenberg/includes/class-gutenberg.php
CHANGED
@@ -1,9 +1,27 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
class SASWP_Gutenberg {
|
4 |
|
|
|
|
|
|
|
|
|
5 |
private static $instance;
|
6 |
|
|
|
|
|
|
|
7 |
private function __construct() {
|
8 |
add_action( 'init', array( $this, 'register_how_to' ) );
|
9 |
add_action( 'init', array( $this, 'register_faq' ) );
|
@@ -11,7 +29,10 @@ class SASWP_Gutenberg {
|
|
11 |
//add_action( 'enqueue_block_assets', array( $this, 'register_frontend_assets' ) );
|
12 |
add_filter( 'block_categories', array( $this, 'saswp_add_blocks_categories' ) );
|
13 |
}
|
14 |
-
|
|
|
|
|
|
|
15 |
public function register_frontend_assets() {
|
16 |
|
17 |
if(!is_admin){
|
@@ -24,7 +45,10 @@ class SASWP_Gutenberg {
|
|
24 |
|
25 |
}
|
26 |
}
|
27 |
-
|
|
|
|
|
|
|
28 |
public function register_admin_assets() {
|
29 |
|
30 |
if ( !function_exists( 'register_block_type' ) ) {
|
@@ -66,8 +90,10 @@ class SASWP_Gutenberg {
|
|
66 |
wp_enqueue_script( 'saswp-how-to-js-reg' );
|
67 |
}
|
68 |
/**
|
69 |
-
|
70 |
-
|
|
|
|
|
71 |
public function register_how_to() {
|
72 |
|
73 |
if ( !function_exists( 'register_block_type' ) ) {
|
@@ -85,8 +111,10 @@ class SASWP_Gutenberg {
|
|
85 |
|
86 |
}
|
87 |
/**
|
88 |
-
|
89 |
-
|
|
|
|
|
90 |
public function register_faq() {
|
91 |
|
92 |
if ( !function_exists( 'register_block_type' ) ) {
|
@@ -102,7 +130,12 @@ class SASWP_Gutenberg {
|
|
102 |
) );
|
103 |
|
104 |
}
|
105 |
-
|
|
|
|
|
|
|
|
|
|
|
106 |
public static function render_faq_data( $attributes ) {
|
107 |
|
108 |
ob_start();
|
@@ -143,7 +176,12 @@ class SASWP_Gutenberg {
|
|
143 |
|
144 |
return ob_get_clean();
|
145 |
}
|
146 |
-
|
|
|
|
|
|
|
|
|
|
|
147 |
public static function render_how_to_data( $attributes ) {
|
148 |
|
149 |
ob_start();
|
@@ -237,7 +275,12 @@ class SASWP_Gutenberg {
|
|
237 |
|
238 |
return ob_get_clean();
|
239 |
}
|
240 |
-
|
|
|
|
|
|
|
|
|
|
|
241 |
public function saswp_add_blocks_categories($categories){
|
242 |
|
243 |
$categories[] = array(
|
@@ -250,8 +293,10 @@ class SASWP_Gutenberg {
|
|
250 |
}
|
251 |
|
252 |
/**
|
253 |
-
|
254 |
-
|
|
|
|
|
255 |
public static function get_instance() {
|
256 |
if ( null == self::$instance ) {
|
257 |
self::$instance = new self;
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Class SASWP_Gutenberg
|
4 |
+
*
|
5 |
+
* @author Magazine3
|
6 |
+
* @category Backend
|
7 |
+
* @path modules/gutenberg/includes/class-gutenberg
|
8 |
+
* @Since Version 1.9.7
|
9 |
+
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
13 |
|
14 |
class SASWP_Gutenberg {
|
15 |
|
16 |
+
/**
|
17 |
+
* Static private variable to hold instance this class
|
18 |
+
* @var type
|
19 |
+
*/
|
20 |
private static $instance;
|
21 |
|
22 |
+
/**
|
23 |
+
* This is class constructer to use all the hooks and filters used in this class
|
24 |
+
*/
|
25 |
private function __construct() {
|
26 |
add_action( 'init', array( $this, 'register_how_to' ) );
|
27 |
add_action( 'init', array( $this, 'register_faq' ) );
|
29 |
//add_action( 'enqueue_block_assets', array( $this, 'register_frontend_assets' ) );
|
30 |
add_filter( 'block_categories', array( $this, 'saswp_add_blocks_categories' ) );
|
31 |
}
|
32 |
+
/**
|
33 |
+
* Function to enqueue frontend assets for gutenberg blocks
|
34 |
+
* @Since Version 1.9.7
|
35 |
+
*/
|
36 |
public function register_frontend_assets() {
|
37 |
|
38 |
if(!is_admin){
|
45 |
|
46 |
}
|
47 |
}
|
48 |
+
/**
|
49 |
+
* Function to enqueue admin assets for gutenberg blocks
|
50 |
+
* @Since Version 1.9.7
|
51 |
+
*/
|
52 |
public function register_admin_assets() {
|
53 |
|
54 |
if ( !function_exists( 'register_block_type' ) ) {
|
90 |
wp_enqueue_script( 'saswp-how-to-js-reg' );
|
91 |
}
|
92 |
/**
|
93 |
+
* Register a how to block
|
94 |
+
* @return type
|
95 |
+
* @since version 1.9.7
|
96 |
+
*/
|
97 |
public function register_how_to() {
|
98 |
|
99 |
if ( !function_exists( 'register_block_type' ) ) {
|
111 |
|
112 |
}
|
113 |
/**
|
114 |
+
* Register a FAQ block
|
115 |
+
* @return type
|
116 |
+
* @since version 1.9.7
|
117 |
+
*/
|
118 |
public function register_faq() {
|
119 |
|
120 |
if ( !function_exists( 'register_block_type' ) ) {
|
130 |
) );
|
131 |
|
132 |
}
|
133 |
+
/**
|
134 |
+
* Function to render faq block data in frontend post content
|
135 |
+
* @param type $attributes
|
136 |
+
* @return string
|
137 |
+
* @since version 1.9.7
|
138 |
+
*/
|
139 |
public static function render_faq_data( $attributes ) {
|
140 |
|
141 |
ob_start();
|
176 |
|
177 |
return ob_get_clean();
|
178 |
}
|
179 |
+
/**
|
180 |
+
* Function to render 'howto' block data in frontend post content
|
181 |
+
* @param type $attributes
|
182 |
+
* @return string
|
183 |
+
* @since version 1.9.7
|
184 |
+
*/
|
185 |
public static function render_how_to_data( $attributes ) {
|
186 |
|
187 |
ob_start();
|
275 |
|
276 |
return ob_get_clean();
|
277 |
}
|
278 |
+
/**
|
279 |
+
* Function to register schema blocks category in Gutenberg block's categories list
|
280 |
+
* @param array $categories
|
281 |
+
* @return array
|
282 |
+
* @since version 1.9.7
|
283 |
+
*/
|
284 |
public function saswp_add_blocks_categories($categories){
|
285 |
|
286 |
$categories[] = array(
|
293 |
}
|
294 |
|
295 |
/**
|
296 |
+
* Return the unique instance
|
297 |
+
* @return type instance
|
298 |
+
* @since version 1.9.7
|
299 |
+
*/
|
300 |
public static function get_instance() {
|
301 |
if ( null == self::$instance ) {
|
302 |
self::$instance = new self;
|
output/function.php
CHANGED
@@ -477,7 +477,6 @@ function saswp_remove_warnings($data, $index, $type){
|
|
477 |
}
|
478 |
}
|
479 |
|
480 |
-
|
481 |
/**
|
482 |
* Gets the total word count and expected time to read the article
|
483 |
* @return type array
|
@@ -537,7 +536,6 @@ function saswp_extract_kk_star_ratings(){
|
|
537 |
|
538 |
}
|
539 |
}
|
540 |
-
|
541 |
|
542 |
/**
|
543 |
* Extracting the value of wp-post-rating ratings plugins on current post
|
477 |
}
|
478 |
}
|
479 |
|
|
|
480 |
/**
|
481 |
* Gets the total word count and expected time to read the article
|
482 |
* @return type array
|
536 |
|
537 |
}
|
538 |
}
|
|
|
539 |
|
540 |
/**
|
541 |
* Extracting the value of wp-post-rating ratings plugins on current post
|
output/output_post_specific.php
CHANGED
@@ -1362,6 +1362,8 @@ function saswp_post_specific_schema_output() {
|
|
1362 |
}
|
1363 |
|
1364 |
if( 'SoftwareApplication' === $schema_type){
|
|
|
|
|
1365 |
|
1366 |
$input1 = array(
|
1367 |
'@context' => saswp_context_url(),
|
@@ -1381,6 +1383,17 @@ function saswp_post_specific_schema_output() {
|
|
1381 |
|
1382 |
);
|
1383 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1384 |
if(saswp_remove_warnings($all_post_meta, 'saswp_software_schema_enable_rating_'.$schema_id, 'saswp_array') == 1){
|
1385 |
|
1386 |
$input1['aggregateRating'] = array(
|
@@ -2393,6 +2406,28 @@ function saswp_post_specific_schema_output() {
|
|
2393 |
|
2394 |
|
2395 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2396 |
|
2397 |
if( !empty($input1) && !isset($input1['image'])){
|
2398 |
|
1362 |
}
|
1363 |
|
1364 |
if( 'SoftwareApplication' === $schema_type){
|
1365 |
+
|
1366 |
+
|
1367 |
|
1368 |
$input1 = array(
|
1369 |
'@context' => saswp_context_url(),
|
1383 |
|
1384 |
);
|
1385 |
|
1386 |
+
$soft_image = get_post_meta( get_the_ID(), 'saswp_software_schema_image_'.$schema_id.'_detail',true);
|
1387 |
+
|
1388 |
+
if(!(empty($soft_image))){
|
1389 |
+
|
1390 |
+
$input1['image']['@type'] = 'ImageObject';
|
1391 |
+
$input1['image']['url'] = isset($soft_image['thumbnail']) ? esc_url($soft_image['thumbnail']):'';
|
1392 |
+
$input1['image']['height'] = isset($soft_image['width']) ? esc_attr($soft_image['width']) :'';
|
1393 |
+
$input1['image']['width'] = isset($soft_image['height']) ? esc_attr($soft_image['height']) :'';
|
1394 |
+
|
1395 |
+
}
|
1396 |
+
|
1397 |
if(saswp_remove_warnings($all_post_meta, 'saswp_software_schema_enable_rating_'.$schema_id, 'saswp_array') == 1){
|
1398 |
|
1399 |
$input1['aggregateRating'] = array(
|
2406 |
|
2407 |
|
2408 |
}
|
2409 |
+
|
2410 |
+
global $without_aggregate;
|
2411 |
+
|
2412 |
+
if(!in_array($schema_type, $without_aggregate)){
|
2413 |
+
|
2414 |
+
//kk star rating
|
2415 |
+
|
2416 |
+
$kkstar_aggregateRating = saswp_extract_kk_star_ratings();
|
2417 |
+
|
2418 |
+
if(!empty($kkstar_aggregateRating)){
|
2419 |
+
$input1['aggregateRating'] = $kkstar_aggregateRating;
|
2420 |
+
}
|
2421 |
+
|
2422 |
+
//wp post-rating star rating
|
2423 |
+
|
2424 |
+
$wp_post_rating_ar = saswp_extract_wp_post_ratings();
|
2425 |
+
|
2426 |
+
if(!empty($wp_post_rating_ar)){
|
2427 |
+
$input1['aggregateRating'] = $wp_post_rating_ar;
|
2428 |
+
}
|
2429 |
+
|
2430 |
+
}
|
2431 |
|
2432 |
if( !empty($input1) && !isset($input1['image'])){
|
2433 |
|
output/service.php
CHANGED
@@ -12,6 +12,10 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
12 |
|
13 |
Class saswp_output_service{
|
14 |
|
|
|
|
|
|
|
|
|
15 |
private $_meta_list = null;
|
16 |
|
17 |
public function __construct() {
|
@@ -39,7 +43,12 @@ Class saswp_output_service{
|
|
39 |
add_filter( 'saswp_modify_post_meta_list', array( $this, 'saswp_get_acf_meta_keys' ) );
|
40 |
|
41 |
}
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
43 |
public function saswp_get_acf_meta_keys($fields){
|
44 |
|
45 |
if ( function_exists( 'acf' ) && class_exists( 'acf' ) ) {
|
@@ -101,7 +110,10 @@ Class saswp_output_service{
|
|
101 |
return $fields;
|
102 |
|
103 |
}
|
104 |
-
|
|
|
|
|
|
|
105 |
public function saswp_get_meta_list(){
|
106 |
|
107 |
if ( ! isset( $_GET['saswp_security_nonce'] ) ){
|
@@ -121,17 +133,19 @@ Class saswp_output_service{
|
|
121 |
wp_send_json( $response);
|
122 |
|
123 |
}
|
|
|
124 |
/**
|
|
|
125 |
* This function replaces the value of schema's fields with the selected custom meta field
|
126 |
* @param type $input1
|
127 |
* @param type $schema_post_id
|
128 |
-
* @return type array
|
129 |
-
*/
|
130 |
-
|
131 |
public function saswp_get_meta_list_value($key, $field, $schema_post_id){
|
132 |
|
133 |
global $post;
|
134 |
|
|
|
135 |
$fixed_text = get_post_meta($schema_post_id, 'saswp_fixed_text', true) ;
|
136 |
$cus_field = get_post_meta($schema_post_id, 'saswp_custom_meta_field', true);
|
137 |
|
@@ -153,6 +167,17 @@ Class saswp_output_service{
|
|
153 |
case 'post_content':
|
154 |
$response = saswp_get_the_content();
|
155 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
case 'post_excerpt':
|
157 |
$response = saswp_get_the_excerpt();
|
158 |
break;
|
@@ -199,13 +224,22 @@ Class saswp_output_service{
|
|
199 |
case 'custom_field':
|
200 |
$response = get_post_meta($post->ID, $cus_field[$key], true);
|
201 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
case 'featured_img':
|
203 |
-
$image_id
|
204 |
-
$image_details
|
205 |
$response['@type'] = 'ImageObject';
|
206 |
$response['url'] = $image_details[0];
|
207 |
$response['width'] = $image_details[1];
|
208 |
-
$response['height'] = $image_details[2];
|
209 |
|
210 |
break;
|
211 |
case 'author_image':
|
@@ -256,9 +290,15 @@ Class saswp_output_service{
|
|
256 |
return $response;
|
257 |
|
258 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
public function saswp_replace_with_custom_fields_value($input1, $schema_post_id){
|
260 |
|
261 |
-
$custom_fields = get_post_meta($schema_post_id, 'saswp_meta_list_val', true);
|
262 |
$review_markup = array();
|
263 |
$review_response = array();
|
264 |
$main_schema_type = '';
|
@@ -393,7 +433,7 @@ Class saswp_output_service{
|
|
393 |
break;
|
394 |
|
395 |
case 'Article':
|
396 |
-
|
397 |
if(isset($custom_fields['saswp_article_main_entity_of_page'])){
|
398 |
$input1['mainEntityOfPage'] = $custom_fields['saswp_article_main_entity_of_page'];
|
399 |
}
|
@@ -426,12 +466,11 @@ Class saswp_output_service{
|
|
426 |
}
|
427 |
if(isset($custom_fields['saswp_article_author_name'])){
|
428 |
$input1['author']['name'] = $custom_fields['saswp_article_author_name'];
|
429 |
-
}
|
430 |
-
if(isset($custom_fields['saswp_article_organization_name'])){
|
431 |
-
$input1['Publisher']['
|
432 |
-
|
433 |
-
|
434 |
-
$input1['Publisher']['logo']['url'] = $custom_fields['saswp_article_organization_logo'];
|
435 |
}
|
436 |
break;
|
437 |
|
@@ -562,13 +601,14 @@ Class saswp_output_service{
|
|
562 |
if(isset($custom_fields['saswp_blogposting_author_name'])){
|
563 |
$input1['author']['name'] = $custom_fields['saswp_blogposting_author_name'];
|
564 |
}
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
$input1['Publisher']['logo']
|
570 |
}
|
571 |
|
|
|
572 |
break;
|
573 |
|
574 |
case 'AudioObject':
|
@@ -609,6 +649,9 @@ Class saswp_output_service{
|
|
609 |
if(isset($custom_fields['saswp_software_schema_description'])){
|
610 |
$input1['description'] = $custom_fields['saswp_software_schema_description'];
|
611 |
}
|
|
|
|
|
|
|
612 |
if(isset($custom_fields['saswp_software_schema_operating_system'])){
|
613 |
$input1['operatingSystem'] = $custom_fields['saswp_software_schema_operating_system'];
|
614 |
}
|
@@ -684,12 +727,11 @@ Class saswp_output_service{
|
|
684 |
}
|
685 |
if(isset($custom_fields['saswp_newsarticle_author_image'])){
|
686 |
$input1['author']['Image']['url'] = $custom_fields['saswp_newsarticle_author_image'];
|
687 |
-
}
|
688 |
-
if(isset($custom_fields['saswp_newsarticle_organization_name'])){
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
$input1['Publisher']['logo']['url'] = $custom_fields['saswp_newsarticle_organization_logo'];
|
693 |
}
|
694 |
|
695 |
break;
|
@@ -828,12 +870,12 @@ Class saswp_output_service{
|
|
828 |
if(isset($custom_fields['saswp_tech_article_author_name'])){
|
829 |
$input1['author']['name'] = $custom_fields['saswp_tech_article_author_name'];
|
830 |
}
|
831 |
-
|
832 |
-
|
|
|
|
|
|
|
833 |
}
|
834 |
-
if(isset($custom_fields['saswp_tech_article_organization_logo'])){
|
835 |
-
$input1['Publisher']['logo']['url'] = $custom_fields['saswp_tech_article_organization_logo'];
|
836 |
-
}
|
837 |
break;
|
838 |
|
839 |
case 'Course':
|
@@ -887,13 +929,12 @@ Class saswp_output_service{
|
|
887 |
if(isset($custom_fields['saswp_dfp_main_entity_of_page'])){
|
888 |
$input1['mainEntityOfPage'] = $custom_fields['saswp_dfp_main_entity_of_page'];
|
889 |
}
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
$input1['
|
895 |
-
}
|
896 |
-
|
897 |
break;
|
898 |
|
899 |
case 'Recipe':
|
@@ -1150,13 +1191,12 @@ Class saswp_output_service{
|
|
1150 |
}
|
1151 |
if(isset($custom_fields['saswp_video_object_author_image'])){
|
1152 |
$input1['author']['Image']['url'] = $custom_fields['saswp_video_object_author_image'];
|
|
|
|
|
|
|
|
|
|
|
1153 |
}
|
1154 |
-
if(isset($custom_fields['saswp_video_object_organization_name'])){
|
1155 |
-
$input1['Publisher']['name'] = $custom_fields['saswp_video_object_organization_name'];
|
1156 |
-
}
|
1157 |
-
if(isset($custom_fields['saswp_video_object_organization_logo'])){
|
1158 |
-
$input1['Publisher']['logo']['url'] = $custom_fields['saswp_video_object_organization_logo'];
|
1159 |
-
}
|
1160 |
break;
|
1161 |
|
1162 |
case 'qanda':
|
@@ -2102,7 +2142,13 @@ Class saswp_output_service{
|
|
2102 |
return $review_data;
|
2103 |
|
2104 |
}
|
2105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2106 |
public function saswp_bb_press_topic_details($post_id){
|
2107 |
|
2108 |
$dw_qa = array();
|
@@ -2705,6 +2751,7 @@ Class saswp_output_service{
|
|
2705 |
|
2706 |
'saswp_software_schema_name' => 'Name',
|
2707 |
'saswp_software_schema_description' => 'Description',
|
|
|
2708 |
'saswp_software_schema_operating_system' => 'Operating System',
|
2709 |
'saswp_software_schema_application_category' => 'Application Category',
|
2710 |
'saswp_software_schema_price' => 'Price',
|
12 |
|
13 |
Class saswp_output_service{
|
14 |
|
15 |
+
/**
|
16 |
+
* private variable to hold mata list
|
17 |
+
* @var type
|
18 |
+
*/
|
19 |
private $_meta_list = null;
|
20 |
|
21 |
public function __construct() {
|
43 |
add_filter( 'saswp_modify_post_meta_list', array( $this, 'saswp_get_acf_meta_keys' ) );
|
44 |
|
45 |
}
|
46 |
+
/**
|
47 |
+
* Function to get acf meta keys
|
48 |
+
* @param type $fields
|
49 |
+
* @return type array
|
50 |
+
* @since version 1.9.3
|
51 |
+
*/
|
52 |
public function saswp_get_acf_meta_keys($fields){
|
53 |
|
54 |
if ( function_exists( 'acf' ) && class_exists( 'acf' ) ) {
|
110 |
return $fields;
|
111 |
|
112 |
}
|
113 |
+
/**
|
114 |
+
* Ajax function to get meta list
|
115 |
+
* @return type json
|
116 |
+
*/
|
117 |
public function saswp_get_meta_list(){
|
118 |
|
119 |
if ( ! isset( $_GET['saswp_security_nonce'] ) ){
|
133 |
wp_send_json( $response);
|
134 |
|
135 |
}
|
136 |
+
|
137 |
/**
|
138 |
+
* @since version 1.9.1
|
139 |
* This function replaces the value of schema's fields with the selected custom meta field
|
140 |
* @param type $input1
|
141 |
* @param type $schema_post_id
|
142 |
+
* @return type array or string
|
143 |
+
*/
|
|
|
144 |
public function saswp_get_meta_list_value($key, $field, $schema_post_id){
|
145 |
|
146 |
global $post;
|
147 |
|
148 |
+
$fixed_image = get_post_meta($schema_post_id, 'saswp_fixed_image', true) ;
|
149 |
$fixed_text = get_post_meta($schema_post_id, 'saswp_fixed_text', true) ;
|
150 |
$cus_field = get_post_meta($schema_post_id, 'saswp_custom_meta_field', true);
|
151 |
|
167 |
case 'post_content':
|
168 |
$response = saswp_get_the_content();
|
169 |
break;
|
170 |
+
case 'post_category':
|
171 |
+
$categories = get_the_category();
|
172 |
+
if($categories){
|
173 |
+
foreach ($categories as $category){
|
174 |
+
if(isset($category->name)){
|
175 |
+
$response[] = $category->name;
|
176 |
+
}
|
177 |
+
}
|
178 |
+
|
179 |
+
}
|
180 |
+
break;
|
181 |
case 'post_excerpt':
|
182 |
$response = saswp_get_the_excerpt();
|
183 |
break;
|
224 |
case 'custom_field':
|
225 |
$response = get_post_meta($post->ID, $cus_field[$key], true);
|
226 |
break;
|
227 |
+
case 'fixed_image':
|
228 |
+
|
229 |
+
$response['@type'] = 'ImageObject';
|
230 |
+
$response['url'] = $fixed_image[$key]['thumbnail'];
|
231 |
+
$response['width'] = $fixed_image[$key]['width'];
|
232 |
+
$response['height'] = $fixed_image[$key]['height'];
|
233 |
+
|
234 |
+
break;
|
235 |
+
|
236 |
case 'featured_img':
|
237 |
+
$image_id = get_post_thumbnail_id();
|
238 |
+
$image_details = wp_get_attachment_image_src($image_id, 'full');
|
239 |
$response['@type'] = 'ImageObject';
|
240 |
$response['url'] = $image_details[0];
|
241 |
$response['width'] = $image_details[1];
|
242 |
+
$response['height'] = $image_details[2];
|
243 |
|
244 |
break;
|
245 |
case 'author_image':
|
290 |
return $response;
|
291 |
|
292 |
}
|
293 |
+
/**
|
294 |
+
* Function to replace schema markup fields value with custom value enter or selected by users while modifying globally
|
295 |
+
* @param type $input1
|
296 |
+
* @param type $schema_post_id
|
297 |
+
* @return type array
|
298 |
+
*/
|
299 |
public function saswp_replace_with_custom_fields_value($input1, $schema_post_id){
|
300 |
|
301 |
+
$custom_fields = get_post_meta($schema_post_id, 'saswp_meta_list_val', true);
|
302 |
$review_markup = array();
|
303 |
$review_response = array();
|
304 |
$main_schema_type = '';
|
433 |
break;
|
434 |
|
435 |
case 'Article':
|
436 |
+
|
437 |
if(isset($custom_fields['saswp_article_main_entity_of_page'])){
|
438 |
$input1['mainEntityOfPage'] = $custom_fields['saswp_article_main_entity_of_page'];
|
439 |
}
|
466 |
}
|
467 |
if(isset($custom_fields['saswp_article_author_name'])){
|
468 |
$input1['author']['name'] = $custom_fields['saswp_article_author_name'];
|
469 |
+
}
|
470 |
+
if(isset($custom_fields['saswp_article_organization_logo']) && isset($custom_fields['saswp_article_organization_name'])){
|
471 |
+
$input1['Publisher']['@type'] = 'Organization';
|
472 |
+
$input1['Publisher']['name'] = $custom_fields['saswp_article_organization_name'];
|
473 |
+
$input1['Publisher']['logo'] = $custom_fields['saswp_article_organization_logo'];
|
|
|
474 |
}
|
475 |
break;
|
476 |
|
601 |
if(isset($custom_fields['saswp_blogposting_author_name'])){
|
602 |
$input1['author']['name'] = $custom_fields['saswp_blogposting_author_name'];
|
603 |
}
|
604 |
+
|
605 |
+
if(isset($custom_fields['saswp_blogposting_organization_logo']) && isset($custom_fields['saswp_blogposting_organization_name'])){
|
606 |
+
$input1['Publisher']['@type'] = 'Organization';
|
607 |
+
$input1['Publisher']['name'] = $custom_fields['saswp_blogposting_organization_name'];
|
608 |
+
$input1['Publisher']['logo'] = $custom_fields['saswp_blogposting_organization_logo'];
|
609 |
}
|
610 |
|
611 |
+
|
612 |
break;
|
613 |
|
614 |
case 'AudioObject':
|
649 |
if(isset($custom_fields['saswp_software_schema_description'])){
|
650 |
$input1['description'] = $custom_fields['saswp_software_schema_description'];
|
651 |
}
|
652 |
+
if(isset($custom_fields['saswp_software_schema_image'])){
|
653 |
+
$input1['image'] = $custom_fields['saswp_software_schema_image'];
|
654 |
+
}
|
655 |
if(isset($custom_fields['saswp_software_schema_operating_system'])){
|
656 |
$input1['operatingSystem'] = $custom_fields['saswp_software_schema_operating_system'];
|
657 |
}
|
727 |
}
|
728 |
if(isset($custom_fields['saswp_newsarticle_author_image'])){
|
729 |
$input1['author']['Image']['url'] = $custom_fields['saswp_newsarticle_author_image'];
|
730 |
+
}
|
731 |
+
if(isset($custom_fields['saswp_newsarticle_organization_logo']) && isset($custom_fields['saswp_newsarticle_organization_name'])){
|
732 |
+
$input1['Publisher']['@type'] = 'Organization';
|
733 |
+
$input1['Publisher']['name'] = $custom_fields['saswp_newsarticle_organization_name'];
|
734 |
+
$input1['Publisher']['logo'] = $custom_fields['saswp_newsarticle_organization_logo'];
|
|
|
735 |
}
|
736 |
|
737 |
break;
|
870 |
if(isset($custom_fields['saswp_tech_article_author_name'])){
|
871 |
$input1['author']['name'] = $custom_fields['saswp_tech_article_author_name'];
|
872 |
}
|
873 |
+
|
874 |
+
if(isset($custom_fields['saswp_tech_article_organization_logo']) && isset($custom_fields['saswp_tech_article_organization_name'])){
|
875 |
+
$input1['Publisher']['@type'] = 'Organization';
|
876 |
+
$input1['Publisher']['name'] = $custom_fields['saswp_tech_article_organization_name'];
|
877 |
+
$input1['Publisher']['logo'] = $custom_fields['saswp_tech_article_organization_logo'];
|
878 |
}
|
|
|
|
|
|
|
879 |
break;
|
880 |
|
881 |
case 'Course':
|
929 |
if(isset($custom_fields['saswp_dfp_main_entity_of_page'])){
|
930 |
$input1['mainEntityOfPage'] = $custom_fields['saswp_dfp_main_entity_of_page'];
|
931 |
}
|
932 |
+
|
933 |
+
if(isset($custom_fields['saswp_dfp_organization_logo']) && isset($custom_fields['saswp_dfp_organization_name'])){
|
934 |
+
$input1['Publisher']['@type'] = 'Organization';
|
935 |
+
$input1['Publisher']['name'] = $custom_fields['saswp_dfp_organization_name'];
|
936 |
+
$input1['Publisher']['logo'] = $custom_fields['saswp_dfp_organization_logo'];
|
937 |
+
}
|
|
|
938 |
break;
|
939 |
|
940 |
case 'Recipe':
|
1191 |
}
|
1192 |
if(isset($custom_fields['saswp_video_object_author_image'])){
|
1193 |
$input1['author']['Image']['url'] = $custom_fields['saswp_video_object_author_image'];
|
1194 |
+
}
|
1195 |
+
if(isset($custom_fields['saswp_video_object_organization_logo']) && isset($custom_fields['saswp_video_object_organization_name'])){
|
1196 |
+
$input1['Publisher']['@type'] = 'Organization';
|
1197 |
+
$input1['Publisher']['name'] = $custom_fields['saswp_video_object_organization_name'];
|
1198 |
+
$input1['Publisher']['logo'] = $custom_fields['saswp_video_object_organization_logo'];
|
1199 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1200 |
break;
|
1201 |
|
1202 |
case 'qanda':
|
2142 |
return $review_data;
|
2143 |
|
2144 |
}
|
2145 |
+
/**
|
2146 |
+
* This function gets topic details as an array from bbpress posts
|
2147 |
+
* DW Question & Answer ( https://wordpress.org/plugins/bbpress/ )
|
2148 |
+
* @global type $sd_data
|
2149 |
+
* @param type $post_id
|
2150 |
+
* @return type array
|
2151 |
+
*/
|
2152 |
public function saswp_bb_press_topic_details($post_id){
|
2153 |
|
2154 |
$dw_qa = array();
|
2751 |
|
2752 |
'saswp_software_schema_name' => 'Name',
|
2753 |
'saswp_software_schema_description' => 'Description',
|
2754 |
+
'saswp_software_schema_image' => 'Image',
|
2755 |
'saswp_software_schema_operating_system' => 'Operating System',
|
2756 |
'saswp_software_schema_application_category' => 'Application Category',
|
2757 |
'saswp_software_schema_price' => 'Price',
|
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 |
|
@@ -114,6 +114,14 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
|
|
114 |
|
115 |
== Changelog ==
|
116 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
|
118 |
= 1.9.8 (25 Sept 2019) =
|
119 |
|
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.9
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
114 |
|
115 |
== Changelog ==
|
116 |
|
117 |
+
= 1.9.9 (28 Sept 2019) =
|
118 |
+
|
119 |
+
* Added: Post category in modify meta list. #509
|
120 |
+
* Fixed: Setup Wizard is very slow. Need to improve the timing. #518
|
121 |
+
* Fixed: Image is not being pre filled or populated on post specific modify schema #508
|
122 |
+
* Fixed: KK Star is not working anymore #506
|
123 |
+
* Fixed: The property publisher is not recognized by Google for an object of type LocalBusiness. #512
|
124 |
+
|
125 |
|
126 |
= 1.9.8 (25 Sept 2019) =
|
127 |
|
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__));
|
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.9
|
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.9');
|
17 |
define('SASWP_DIR_NAME_FILE', __FILE__ );
|
18 |
define('SASWP_DIR_NAME', dirname( __FILE__ ));
|
19 |
define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
|
view/paywall.php
CHANGED
@@ -88,6 +88,8 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
88 |
$paywall_class_name = '';
|
89 |
$enable_custom_field = '';
|
90 |
$custom_fields = '';
|
|
|
|
|
91 |
|
92 |
if ( isset( $_POST['notAccessibleForFree'] ) )
|
93 |
$notAccessibleForFree = sanitize_text_field($_POST['notAccessibleForFree']);
|
@@ -103,6 +105,8 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
103 |
$fixed_text = array_map ('sanitize_text_field', $_POST['saswp_fixed_text']);
|
104 |
if ( isset( $_POST['saswp_custom_meta_field'] ) )
|
105 |
$cus_meta_field = array_map ('sanitize_text_field', $_POST['saswp_custom_meta_field']);
|
|
|
|
|
106 |
|
107 |
$saswp_schema_options = array(
|
108 |
'isAccessibleForFree' => $isAccessibleForFree,
|
@@ -110,10 +114,11 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
110 |
'paywall_class_name' => $paywall_class_name,
|
111 |
'enable_custom_field' => $enable_custom_field
|
112 |
);
|
113 |
-
|
114 |
update_post_meta( $post_id, 'schema_options', $saswp_schema_options);
|
115 |
update_post_meta( $post_id, 'saswp_meta_list_val', $meta_list);
|
116 |
update_post_meta( $post_id, 'saswp_fixed_text', $fixed_text);
|
|
|
117 |
update_post_meta( $post_id, 'saswp_custom_meta_field', $cus_meta_field);
|
118 |
|
119 |
|
88 |
$paywall_class_name = '';
|
89 |
$enable_custom_field = '';
|
90 |
$custom_fields = '';
|
91 |
+
$fixed_text = '';
|
92 |
+
$fixed_image = '';
|
93 |
|
94 |
if ( isset( $_POST['notAccessibleForFree'] ) )
|
95 |
$notAccessibleForFree = sanitize_text_field($_POST['notAccessibleForFree']);
|
105 |
$fixed_text = array_map ('sanitize_text_field', $_POST['saswp_fixed_text']);
|
106 |
if ( isset( $_POST['saswp_custom_meta_field'] ) )
|
107 |
$cus_meta_field = array_map ('sanitize_text_field', $_POST['saswp_custom_meta_field']);
|
108 |
+
if ( isset( $_POST['saswp_fixed_image'] ) )
|
109 |
+
$fixed_image = wp_unslash($_POST['saswp_fixed_image']);
|
110 |
|
111 |
$saswp_schema_options = array(
|
112 |
'isAccessibleForFree' => $isAccessibleForFree,
|
114 |
'paywall_class_name' => $paywall_class_name,
|
115 |
'enable_custom_field' => $enable_custom_field
|
116 |
);
|
117 |
+
|
118 |
update_post_meta( $post_id, 'schema_options', $saswp_schema_options);
|
119 |
update_post_meta( $post_id, 'saswp_meta_list_val', $meta_list);
|
120 |
update_post_meta( $post_id, 'saswp_fixed_text', $fixed_text);
|
121 |
+
update_post_meta( $post_id, 'saswp_fixed_image', $fixed_image);
|
122 |
update_post_meta( $post_id, 'saswp_custom_meta_field', $cus_meta_field);
|
123 |
|
124 |
|
view/post_specific.php
CHANGED
@@ -985,6 +985,10 @@ class saswp_post_specific {
|
|
985 |
switch ( $meta_field['type'] ) {
|
986 |
|
987 |
case 'media':
|
|
|
|
|
|
|
|
|
988 |
$media_value = array();
|
989 |
$media_key = $meta_field['id'].'_detail';
|
990 |
|
@@ -999,6 +1003,17 @@ class saswp_post_specific {
|
|
999 |
$media_value['width'] = $author_details['width'];
|
1000 |
$media_value['thumbnail'] = $author_details['url'];
|
1001 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1002 |
if (strpos($meta_field['id'], 'organization_logo') !== false && empty($media_value_meta)) {
|
1003 |
|
1004 |
if(isset($sd_data['sd_logo'])){
|
@@ -1008,49 +1023,6 @@ class saswp_post_specific {
|
|
1008 |
}
|
1009 |
|
1010 |
}
|
1011 |
-
if (strpos($meta_field['id'], 'business_logo') !== false && empty($media_value_meta)) {
|
1012 |
-
|
1013 |
-
$business_details = get_post_meta($schema_id, 'saswp_local_business_details', true);
|
1014 |
-
if(array_key_exists('local_business_logo', $business_details) && is_array($business_details['local_business_logo'])){
|
1015 |
-
|
1016 |
-
$media_value['height'] = $business_details['local_business_logo']['height'];
|
1017 |
-
$media_value['width'] = $business_details['local_business_logo']['width'];
|
1018 |
-
$media_value['thumbnail'] = $business_details['local_business_logo']['url'];
|
1019 |
-
|
1020 |
-
}
|
1021 |
-
}
|
1022 |
-
|
1023 |
-
|
1024 |
-
if (strpos($meta_field['id'], 'service_schema_image') !== false && empty($media_value_meta)) {
|
1025 |
-
|
1026 |
-
$business_details = get_post_meta($schema_id, 'saswp_service_schema_details', true);
|
1027 |
-
|
1028 |
-
if(array_key_exists('saswp_service_schema_image', $business_details) && is_array($business_details['saswp_service_schema_image'])){
|
1029 |
-
$media_value['height'] = $business_details['saswp_service_schema_image']['height'];
|
1030 |
-
$media_value['width'] = $business_details['saswp_service_schema_image']['width'];
|
1031 |
-
$media_value['thumbnail'] = $business_details['saswp_service_schema_image']['url'];
|
1032 |
-
}
|
1033 |
-
|
1034 |
-
}
|
1035 |
-
|
1036 |
-
if (strpos($meta_field['id'], 'review_schema_image') !== false && empty($media_value_meta)) {
|
1037 |
-
|
1038 |
-
$business_details = get_post_meta($schema_id, 'saswp_review_schema_details', true);
|
1039 |
-
if(array_key_exists('saswp_review_schema_image', $business_details) && is_array($business_details['saswp_review_schema_image'])){
|
1040 |
-
$media_value['height'] = $business_details['saswp_review_schema_image']['height'];
|
1041 |
-
$media_value['width'] = $business_details['saswp_review_schema_image']['width'];
|
1042 |
-
$media_value['thumbnail'] = $business_details['saswp_review_schema_image']['url'];
|
1043 |
-
}
|
1044 |
-
}
|
1045 |
-
if (strpos($meta_field['id'], 'event_schema_image') !== false && empty($media_value_meta)) {
|
1046 |
-
|
1047 |
-
$business_details = get_post_meta($schema_id, 'saswp_event_schema_details', true);
|
1048 |
-
if(array_key_exists('saswp_event_schema_image', $business_details) && is_array($business_details['saswp_event_schema_image'])){
|
1049 |
-
$media_value['height'] = $business_details['saswp_event_schema_image']['height'];
|
1050 |
-
$media_value['width'] = $business_details['saswp_event_schema_image']['width'];
|
1051 |
-
$media_value['thumbnail'] = $business_details['saswp_event_schema_image']['url'];
|
1052 |
-
}
|
1053 |
-
}
|
1054 |
|
1055 |
$media_height = '';
|
1056 |
$media_width = '';
|
@@ -2962,6 +2934,11 @@ class saswp_post_specific {
|
|
2962 |
'id' => 'saswp_software_schema_description_'.$schema_id,
|
2963 |
'type' => 'textarea',
|
2964 |
),
|
|
|
|
|
|
|
|
|
|
|
2965 |
array(
|
2966 |
'label' => 'Operating System',
|
2967 |
'id' => 'saswp_software_schema_operating_system_'.$schema_id,
|
985 |
switch ( $meta_field['type'] ) {
|
986 |
|
987 |
case 'media':
|
988 |
+
|
989 |
+
$f_image_id = get_post_thumbnail_id();
|
990 |
+
$f_image_details = wp_get_attachment_image_src($f_image_id, 'full');
|
991 |
+
|
992 |
$media_value = array();
|
993 |
$media_key = $meta_field['id'].'_detail';
|
994 |
|
1003 |
$media_value['width'] = $author_details['width'];
|
1004 |
$media_value['thumbnail'] = $author_details['url'];
|
1005 |
}
|
1006 |
+
if (strpos($meta_field['id'], 'image') !== false && empty($media_value_meta)) {
|
1007 |
+
|
1008 |
+
if(!empty($f_image_details)){
|
1009 |
+
$media_value['thumbnail'] = $f_image_details[0];
|
1010 |
+
$media_value['width'] = $f_image_details[1];
|
1011 |
+
$media_value['height'] = $f_image_details[2];
|
1012 |
+
|
1013 |
+
}
|
1014 |
+
|
1015 |
+
}
|
1016 |
+
|
1017 |
if (strpos($meta_field['id'], 'organization_logo') !== false && empty($media_value_meta)) {
|
1018 |
|
1019 |
if(isset($sd_data['sd_logo'])){
|
1023 |
}
|
1024 |
|
1025 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1026 |
|
1027 |
$media_height = '';
|
1028 |
$media_width = '';
|
2934 |
'id' => 'saswp_software_schema_description_'.$schema_id,
|
2935 |
'type' => 'textarea',
|
2936 |
),
|
2937 |
+
array(
|
2938 |
+
'label' => 'Image',
|
2939 |
+
'id' => 'saswp_software_schema_image_'.$schema_id,
|
2940 |
+
'type' => 'media',
|
2941 |
+
),
|
2942 |
array(
|
2943 |
'label' => 'Operating System',
|
2944 |
'id' => 'saswp_software_schema_operating_system_'.$schema_id,
|
view/schema_type.php
CHANGED
@@ -556,7 +556,8 @@ function saswp_schema_type_meta_box_callback( $post) {
|
|
556 |
|
557 |
$schema_options = get_post_meta($post->ID, 'schema_options', true);
|
558 |
$meta_list = get_post_meta($post->ID, 'saswp_meta_list_val', true);
|
559 |
-
$fixed_text = get_post_meta($post->ID, 'saswp_fixed_text', true);
|
|
|
560 |
$cus_field = get_post_meta($post->ID, 'saswp_custom_meta_field', true);
|
561 |
$schema_type = get_post_meta($post->ID, 'schema_type', true);
|
562 |
|
@@ -1119,7 +1120,7 @@ function saswp_schema_type_meta_box_callback( $post) {
|
|
1119 |
<?php
|
1120 |
|
1121 |
if(!empty($meta_list)){
|
1122 |
-
|
1123 |
$service = new saswp_output_service();
|
1124 |
|
1125 |
$schema_type = get_post_meta($post->ID, 'schema_type', true);
|
@@ -1176,7 +1177,7 @@ function saswp_schema_type_meta_box_callback( $post) {
|
|
1176 |
|
1177 |
$meta_list_arr = $meta_list_fields['text'];
|
1178 |
|
1179 |
-
if (strpos($fieldkey, 'image') !== false) {
|
1180 |
$meta_list_arr = $meta_list_fields['image'];
|
1181 |
}
|
1182 |
|
@@ -1209,6 +1210,37 @@ function saswp_schema_type_meta_box_callback( $post) {
|
|
1209 |
echo '<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['.esc_attr($fieldkey).']">';
|
1210 |
echo '<option value="'.esc_attr($cus_field[$fieldkey]).'">'.preg_replace( '/^_/', '', esc_html( str_replace( '_', ' ', $cus_field[$fieldkey] ) ) ).'</option>';
|
1211 |
echo '</select></td>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1212 |
}else{
|
1213 |
echo '<td></td>';
|
1214 |
}
|
556 |
|
557 |
$schema_options = get_post_meta($post->ID, 'schema_options', true);
|
558 |
$meta_list = get_post_meta($post->ID, 'saswp_meta_list_val', true);
|
559 |
+
$fixed_text = get_post_meta($post->ID, 'saswp_fixed_text', true);
|
560 |
+
$fixed_image = get_post_meta($post->ID, 'saswp_fixed_image', true);
|
561 |
$cus_field = get_post_meta($post->ID, 'saswp_custom_meta_field', true);
|
562 |
$schema_type = get_post_meta($post->ID, 'schema_type', true);
|
563 |
|
1120 |
<?php
|
1121 |
|
1122 |
if(!empty($meta_list)){
|
1123 |
+
|
1124 |
$service = new saswp_output_service();
|
1125 |
|
1126 |
$schema_type = get_post_meta($post->ID, 'schema_type', true);
|
1177 |
|
1178 |
$meta_list_arr = $meta_list_fields['text'];
|
1179 |
|
1180 |
+
if ((strpos($fieldkey, 'image') !== false) || strpos($fieldkey, 'logo') !== false) {
|
1181 |
$meta_list_arr = $meta_list_fields['image'];
|
1182 |
}
|
1183 |
|
1210 |
echo '<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['.esc_attr($fieldkey).']">';
|
1211 |
echo '<option value="'.esc_attr($cus_field[$fieldkey]).'">'.preg_replace( '/^_/', '', esc_html( str_replace( '_', ' ', $cus_field[$fieldkey] ) ) ).'</option>';
|
1212 |
echo '</select></td>';
|
1213 |
+
|
1214 |
+
}else if($fieldval == 'fixed_image'){
|
1215 |
+
|
1216 |
+
$image_pre = '';
|
1217 |
+
$el_id = strtolower($schema_type). '_'.$fieldkey;
|
1218 |
+
$media_name = 'saswp_fixed_image['.esc_attr($fieldkey).']';
|
1219 |
+
$media_url = $fixed_image[$fieldkey]['thumbnail'];
|
1220 |
+
$media_width = $fixed_image[$fieldkey]['width'];
|
1221 |
+
$media_height = $fixed_image[$fieldkey]['height'];
|
1222 |
+
|
1223 |
+
if($media_url){
|
1224 |
+
|
1225 |
+
$image_pre = '<div class="saswp_image_thumbnail">
|
1226 |
+
<img class="saswp_image_prev" src="'.esc_attr($media_url).'" />
|
1227 |
+
<a data-id="'.esc_attr($el_id).'" href="#" class="saswp_prev_close">X</a>
|
1228 |
+
</div>';
|
1229 |
+
|
1230 |
+
}
|
1231 |
+
|
1232 |
+
echo '<td>'
|
1233 |
+
.'<fieldset>'
|
1234 |
+
. '<input data-id="media" style="width: 30%;" class="button" id="'. esc_attr($el_id).'_button" name="'. esc_attr($el_id).'_button" type="button" value="Upload" />'
|
1235 |
+
. '<input type="hidden" data-id="'.esc_attr($el_id).'_height" class="upload-height" name="'.esc_attr($media_name).'[height]" id="'.esc_attr($el_id).'_height" value="'.esc_attr($media_height).'">'
|
1236 |
+
. '<input type="hidden" data-id="'.esc_attr($el_id).'_width" class="upload-width" name="'.esc_attr($media_name).'[width]" id="'.esc_attr($el_id).'_width" value="'.esc_attr($media_width).'">'
|
1237 |
+
. '<input type="hidden" data-id="'.esc_attr($el_id).'_thumbnail" class="upload-thumbnail" name="'.esc_attr($media_name).'[thumbnail]" id="'.esc_attr($el_id).'_thumbnail" value="'.esc_attr($media_url).'">'
|
1238 |
+
. '<div class="saswp_image_div_'.esc_attr($el_id).'">'
|
1239 |
+
. $image_pre
|
1240 |
+
. '</div>'
|
1241 |
+
. '</fieldset>'
|
1242 |
+
. '</td>';
|
1243 |
+
|
1244 |
}else{
|
1245 |
echo '<td></td>';
|
1246 |
}
|