Schema & Structured Data for WP & AMP - Version 1.9.5

Version Description

(06 Sept 2019) =

  • Added: More Organization schema type support #423
  • Added: MedicalBusiness Schema type #334
  • Added: Carousels (itemList) Schema type on archive post/page #306
  • Added: Blog Schema type on archive post/page #460
  • Added: Manual Reviews fields in the product schema #137
  • Added: Aqua Resizer to fix image size is smaller than recommended in google console #435
  • Enhancement: Toggle (on/off) button should be on by default on schema post specific modification #457
  • Bug Fixed: Error log cluttered with php warning regarding count() / PART II #444
  • Bug Fixed: Debug error logs: flexmlsConnectPageCore->__construct(NULL) #446
  • Bug Fixed: In the FAQ schema fields, accepted textarea strip html tags and convert special character to encoded string. #458
Download this release

Release Info

Developer magazine3
Plugin Icon 128x128 Schema & Structured Data for WP & AMP
Version 1.9.5
Comparing to
See all releases

Code changes from version 1.9.4 to 1.9.5

admin_section/css/main-style.min.css CHANGED
@@ -1 +1,1218 @@
1
- .saswp_warning{color:#ef6c00!important}.saswp_hide{display:none}.saswp-general table th{width:auto;font-weight:600;padding:0}.saswp-general table{margin-top:0}.saswp-general table td{padding:5px}.saswp-knowledge table th{width:auto;padding:0}.saswp-knowledge table{margin-top:0}.saswp-knowledge table td{padding:5px}.saswp-schema table th{width:auto;padding:0}.saswp-schema table{margin-top:0}.saswp-schema table td{padding:5px}.saswp-amp table th{width:auto;padding:0}.saswp-amp table{margin-top:0}.saswp-amp table td{padding:5px}.saswp-help table th{width:auto;padding:0}.saswp-support table th{width:auto;padding:0}.saswp-review table th{width:auto;padding:0}.saswp-help table{margin-top:0}.saswp-help table td{padding:5px}.saswp-settings-list{display:inline-block;width:100%}.saswp-settings-list li{padding-left:0}.saswp-settings-list li div label{font-weight:600}.saswp-general h2{margin-bottom:0}.saswp-knowledge h2{margin-bottom:0}.saswp-schema h2{margin-bottom:0}.saswp-help h2{margin-bottom:0}.saswp-settings-form p.submit{margin-top:0}.saswp_qanda_p{font-weight:500}.saswp-display-none{display:none!important}.saswp-placement-groups{border:1px solid #e5e5e5}.saswp-query-success{color:#060}.saswp-query-error{color:#bf3322}.saswp-tools table th{width:auto;padding:0}.saswp-tools table{margin-top:0}.saswp-tools table td{padding:5px}.saswp-tools-field-title strong{padding-right:130px}.saswp-tools .saswp-tooltip{width:230px}.saswp-tools .saswp-knowledge-label{float:left}.saswp-error{color:red!important}.saswp-tooltip{position:relative;display:inline-block}.saswp-tooltip .saswp-tooltiptext{visibility:hidden;width:200px;background-color:#000;color:#fff;text-align:center;border-radius:6px;padding:5px 0;position:absolute;z-index:1;bottom:100%;left:50%;margin-left:-25px}.saswp-tooltiptext::after{content:"";position:absolute;top:100%;left:10%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#000 transparent transparent transparent}.saswp-knowledge-base .saswp-knowledge-label{width:200px;float:left;clear:both}.saswp-knowledge-base .saswp-knowledge-field{width:75%;float:right}.saswp-social-fileds ul{display:grid;grid-template-columns:26.5% 1fr}.saswp-social-fileds li{display:flex}.saswp-social-fileds .saswp-knowledge-field{width:100%;margin-left:10px}.saswp-social-fileds .saswp-knowledge-field input{float:right;margin:inherit}.saswp-schema-type-fields .saswp-knowledge-label{width:200px;float:left;clear:both}.saswp-schema-type-fields .saswp-knowledge-field{width:75%;float:right}.saswp-settings-first-div{width:70%}.saswp-settings-container{display:inline-flex;width:100%}.saswp-settings-second-div{float:right;position:relative;top:20px;margin-right:30px;margin-top:37px}.saswp-feedback-panel{height:200px;width:280px;background:#fff;position:relative}.saswp-start-quck-setup{position:relative;float:inherit;top:7px;left:15px}.saswp-feedback-panel ul{list-style-type:circle;list-style:decimal;padding-left:30px;font-size:15px}.saswp-feedback-panel a{text-decoration:none}.saswp-feedback-panel h2{text-align:center;padding-top:18px}.saswp-social-sharing-buttons{text-align:center;padding-top:20px}.saswp-facebook-share{background:#3b5998;box-shadow:0 0 0 #1b95e0!important;color:#fff!important;line-height:20px!important;height:21px!important;border-radius:3px;margin-right:5px}.saswp-social-sharing-buttons a{text-align:center;padding:8px}.twitter-share-button{background:#1b95e0!important;box-shadow:0 0 0 #1b95e0!important;color:#fff!important;line-height:20px!important;height:21px!important;border-radius:3px;margin-left:5px}.saswp-placement-button{padding:3px 10px;color:#0d0d0d;font-size:14px;border:1px solid #aaa;border-radius:2px;background:linear-gradient(#ededed,#fff)}.saswp-placement-table td{padding:5px 10px!important}.saswp-archive-div .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-archive-div .saswp-knowledge-label{float:left;clear:both}.saswp-amp .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-amp .saswp-knowledge-label{float:left;clear:both}.saswp-review .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-review .saswp-knowledge-label{float:left;clear:both}.saswp-compativility-div .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-compativility-div .saswp-knowledge-label{float:left;clear:both}.saswp-compativility-div li{display:inline-flex}.saswp-seller-div .saswp-knowledge-label{float:left;clear:both}.saswp-seller-div .saswp-knowledge-field{float:left;width:70%}.saswp-post-specific-tab-wrapper{display:inline-block;width:25%;vertical-align:top;box-sizing:border-box;padding-right:10px}.saswp-post-specific-container{display:inline-block;width:calc(75% - 1px);border-left:1px solid #eee}.saswp-post-specific-wrapper{padding:10px}.saswp-tab a.selected{background-color:#ccc}.saswp-tab-links{display:block;background-color:inherit;color:#000;padding:6px 10px;outline:0;text-align:left;cursor:pointer;transition:.3s;font-size:15px;width:130px;overflow:hidden;margin-right:10px}.saswp-star-rating{cursor:pointer}.saswp-post-specific-wrapper select{width:100%}.saswp-review-tables{width:100%}.saswp-over-all-raring{float:right}.saswp-review-pros-and-cons{position:relative;clear:both}.saswp-review-pros-and-cons>div:first{padding-left:10px}.saswp-review-pros-and-cons>div{width:49%;display:inline-block}.saswp-review-pros-and-cons>div:nth-child(2){padding-left:12px}.saswp-wp-ediot-desc{margin-bottom:-23px;display:block}.saswp-review-description{margin-top:40px;padding-top:10px;border-top:1px solid #eee}.saswp-review-pros-and-cons{margin-top:40px;padding-top:10px;border-top:1px solid #eee}.saspw-review-item-list{margin-top:20px;border-top:1px solid #eee}.saswp-review-item-list-table{padding-bottom:10px}#sasw-review input[type=text]{width:180px}#sasw-review input[type=number]{width:180px}#saswp-review-item-enable{width:10px}.saswp-enable-review-on-post{padding-bottom:10px}.saswp-enable-review-on-post label{font-weight:500}.saswp-compatibility table th{width:auto;padding:0}.saswp-compatibility .saswp-knowledge-label{float:left;clear:both}.saswp-tools .saswp-knowledge-label{float:left;clear:both}.saswp-tools .saswp-knowledge-field{float:right;width:69%;padding-bottom:10px}.saswp_kg_logo,.saswp_person_fields{background-color:#fff!important}.saswp_image_thumbnail{padding-top:5px;display:inline-block}.saswp-compatibility .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-job-posting-note,.saswp-schem-type-note{color:#d2691e}.saswp-custom-fields-name{border:1px solid #aaa;border-radius:4px}.saswp-option-table-class p{margin:auto;font-style:italic;color:#666}.saswp-switch{position:relative;display:inline-block;width:40px;height:22px;border:20px}.saswp-switch input{opacity:0;width:0;height:0}.saswp-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#5a6783;transition:.4s;border-radius:20px}.saswp-slider:before{position:absolute;content:"";height:15px;width:15px;left:4px;bottom:4px;background-color:#fff;transition:.4s;border-radius:20px}input:checked+.saswp-slider{background-color:#61bd3b;border-radius:30px}input:focus+.saswp-slider{box-shadow:0 0 1px #2196f3}input:checked+.saswp-slider:before{transform:translateX(15px)}.saswp-slider.saswp-round{border-radius:34px}.saswp-slider.saswp-round:before{border-radius:50%}.saswp-tab-nav li{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;border-bottom:1px solid #eee}.saswp-tab-nav .selected{background-color:#ccc}.saswp-single-post-restore .saswp-switch{height:28px}.saswp-single-post-restore .saswp-slider:before{height:20px}.saswp-wdi-rate-stars{display:inline-block;color:#ffb900;position:relative;top:3px}.saswp-wdi-rate-stars svg{fill:#ffb900}.saswp-wdi-rate-stars svg:hover{fill:#ffb900}.saswp-wdi-rate-stars svg:hover~svg{fill:none}.option-table-class{width:100%}.option-table-class tr td{padding:10px 10px 10px 10px}.option-table-class tr>td{width:30%}.option-table-class tr td:last-child{width:60%}.saswp-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}.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}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ To change this license header, choose License Headers in Project Properties.
3
+ To change this template file, choose Tools | Templates
4
+ and open the template in the editor.
5
+ */
6
+ /*
7
+ Created on : Jul 27, 2018, 5:36:26 PM
8
+ Author : Magazine3
9
+ */
10
+ .saswp_warning{
11
+ color: #ef6c00 !important;
12
+ }
13
+
14
+ .saswp_hide{
15
+ display: none;
16
+ }
17
+ .saswp-general table th{
18
+ width: auto;
19
+ font-weight: 600;
20
+ padding: 0px;
21
+ }
22
+ .saswp-general table{
23
+ margin-top: 0px;
24
+ }
25
+ .saswp-general table td{
26
+ padding: 5px;
27
+ }
28
+ .saswp-knowledge table th{
29
+ width: auto;
30
+ padding: 0px;
31
+ }
32
+ .saswp-knowledge table{
33
+ margin-top: 0px;
34
+ }
35
+ .saswp-knowledge table td{
36
+ padding: 5px;
37
+ }
38
+ .saswp-schema table th{
39
+ width: auto;
40
+ padding: 0px;
41
+ }
42
+ .saswp-schema table{
43
+ margin-top: 0px;
44
+ }
45
+ .saswp-schema table td{
46
+ padding: 5px;
47
+ }
48
+ .saswp-amp table th{
49
+ width: auto;
50
+ padding: 0px;
51
+ }
52
+ .saswp-amp table{
53
+ margin-top: 0px;
54
+ }
55
+ .saswp-amp table td{
56
+ padding: 5px;
57
+ }
58
+ .saswp-help table th{
59
+ width: auto;
60
+ padding: 0px;
61
+ }
62
+ .saswp-support table th{
63
+ width: auto;
64
+ padding: 0px;
65
+ }
66
+ .saswp-review table th{
67
+ width: auto;
68
+ padding: 0px;
69
+ }
70
+ .saswp-help table{
71
+ margin-top: 0px;
72
+ }
73
+ .saswp-help table td{
74
+ padding: 5px;
75
+ }
76
+ .saswp-settings-list{
77
+ display:inline-block;
78
+ width:100%
79
+ }
80
+ .saswp-settings-list li{
81
+ padding-left:0px;
82
+ }
83
+ .saswp-settings-list li div label{
84
+ font-weight: 600;
85
+ }
86
+ .saswp-general h2{
87
+ margin-bottom: 0px;
88
+ }
89
+ .saswp-knowledge h2{
90
+ margin-bottom: 0px;
91
+ }
92
+ .saswp-schema h2{
93
+ margin-bottom: 0px;
94
+ }
95
+ .saswp-help h2{
96
+ margin-bottom: 0px;
97
+ }
98
+ .saswp-settings-form p.submit{
99
+ margin-top:0px;
100
+ }
101
+ .saswp_qanda_p{
102
+ font-weight: 500;
103
+ }
104
+ .saswp-display-none{
105
+ display: none !important;
106
+ }
107
+ .saswp-placement-groups{
108
+ border: 1px solid #e5e5e5;
109
+ }
110
+ .saswp-query-success{
111
+ color: #006600;
112
+ }
113
+ .saswp-query-error{
114
+ color: #bf3322;
115
+ }
116
+ .saswp-tools table th{
117
+ width: auto;
118
+ padding: 0px;
119
+ }
120
+ .saswp-tools table{
121
+ margin-top: 0px;
122
+ }
123
+ .saswp-tools table td{
124
+ padding: 5px;
125
+ }
126
+ .saswp-tools-field-title strong{
127
+ padding-right: 130px;
128
+ }
129
+ .saswp-tools .saswp-tooltip{
130
+ width: 230px;
131
+ }
132
+ .saswp-tools .saswp-knowledge-label {
133
+ float: left;
134
+ }
135
+ .saswp-error{
136
+ color: #ff0000 !important;
137
+ }
138
+ /*
139
+ Tooltip css starts here
140
+
141
+ */
142
+ .saswp-tooltip {
143
+ position: relative;
144
+ display: inline-block;
145
+ }
146
+ .saswp-tooltip .saswp-tooltiptext {
147
+ visibility: hidden;
148
+ width: 200px;
149
+ background-color: black;
150
+ color: #fff;
151
+ text-align: center;
152
+ border-radius: 6px;
153
+ padding: 5px 0;
154
+
155
+ /* Position the tooltip */
156
+ position: absolute;
157
+ z-index: 1;
158
+ bottom: 100%;
159
+ left: 50%;
160
+ margin-left: -25px;
161
+ }
162
+ /*.saswp-tooltip:hover .saswp-tooltiptext {
163
+ visibility: visible;
164
+ }*/
165
+
166
+ .saswp-tooltiptext::after {
167
+ content: "";
168
+ position: absolute;
169
+ top: 100%;
170
+ left: 10%;
171
+ margin-left: -5px;
172
+ border-width: 5px;
173
+ border-style: solid;
174
+ border-color: black transparent transparent transparent;
175
+ }
176
+
177
+ /*
178
+ Tooltip css ends here
179
+
180
+ */
181
+ .saswp-knowledge-base .saswp-knowledge-label{
182
+ width:200px;
183
+ float:left;
184
+ clear: both;
185
+
186
+ }
187
+ .saswp-knowledge-base .saswp-knowledge-field{
188
+ width:75%;
189
+ float:right;
190
+ }
191
+
192
+ .saswp-social-fileds ul{
193
+ display: grid;
194
+ grid-template-columns: 26.5% 1fr;
195
+ }
196
+ .saswp-social-fileds li{
197
+ display: flex;
198
+ }
199
+ .saswp-social-fileds .saswp-knowledge-field{
200
+ width: 100%;
201
+ margin-left: 10px;
202
+ }
203
+ .saswp-social-fileds .saswp-knowledge-field input{
204
+ float: right;
205
+ margin: inherit;
206
+ }
207
+ .saswp-schema-type-fields .saswp-knowledge-label{
208
+ width:200px;
209
+ float:left;
210
+ clear: both;
211
+ }
212
+ .saswp-schema-type-fields .saswp-knowledge-field{
213
+ width:75%;
214
+ float:right;
215
+ }
216
+ .saswp-settings-first-div{
217
+ width: 70%;
218
+ }
219
+ .saswp-settings-container{
220
+ display: inline-flex;
221
+ width: 100%;
222
+ }
223
+ .saswp-settings-second-div{
224
+ float: right;
225
+ position: relative;
226
+ top: 20px;
227
+ margin-right: 30px;
228
+ margin-top: 37px;
229
+ }
230
+ .saswp-feedback-panel{
231
+ height: 200px;
232
+ width: 280px;
233
+ background: #ffffff;
234
+ position: relative;
235
+
236
+ }
237
+ .saswp-start-quck-setup{
238
+ position: relative;
239
+ float: inherit;
240
+ top: 7px;
241
+ left:15px;
242
+ }
243
+ .saswp-feedback-panel ul{
244
+ list-style-type: circle;
245
+ list-style:decimal;
246
+ padding-left: 30px;
247
+ font-size: 15px;
248
+
249
+ }
250
+ .saswp-feedback-panel a{
251
+ text-decoration: none;
252
+
253
+ }
254
+ .saswp-feedback-panel h2{
255
+ text-align: center;
256
+ padding-top: 18px;
257
+
258
+ }
259
+ .saswp-social-sharing-buttons {
260
+ text-align: center;
261
+ padding-top: 20px;
262
+
263
+
264
+ }
265
+ .saswp-facebook-share{
266
+ background: #3B5998;
267
+ box-shadow: 0 0px 0 #1b95e0 !important;
268
+ color: #fff !important;
269
+ line-height: 20px !important;
270
+ height: 21px !important;
271
+ border-radius: 3px;
272
+ margin-right: 5px;
273
+ }
274
+ .saswp-social-sharing-buttons a{
275
+ text-align: center;
276
+ padding: 8px;
277
+
278
+
279
+ }
280
+ .twitter-share-button{
281
+ background: #1b95e0 !important;
282
+ box-shadow: 0 0px 0 #1b95e0 !important;
283
+ color:#fff !important;
284
+ line-height: 20px !important;
285
+ height: 21px !important;
286
+ border-radius: 3px;
287
+ margin-left: 5px;
288
+
289
+ }
290
+ .saswp-placement-button{
291
+ padding: 3px 10px;
292
+ color: #0d0d0d;
293
+ font-size: 14px;
294
+ border: 1px solid #aaa;
295
+ border-radius: 2px;
296
+ background: linear-gradient(#ededed, #ffffff);
297
+ }
298
+ .saswp-placement-table td {
299
+ padding: 5px 10px !important;
300
+ }
301
+ .saswp-archive-div .saswp-knowledge-field{
302
+ float: right;
303
+ width: 75%;
304
+ padding-bottom: 10px;
305
+ }
306
+ .saswp-archive-div .saswp-knowledge-label{
307
+ float:left;
308
+ clear: both;
309
+ }
310
+
311
+ .saswp-amp .saswp-knowledge-field{
312
+ float: right;
313
+ width: 75%;
314
+ padding-bottom: 10px;
315
+ }
316
+ .saswp-amp .saswp-knowledge-label{
317
+ float:left;
318
+ clear: both;
319
+ }
320
+
321
+ .saswp-review .saswp-knowledge-field{
322
+ float: right;
323
+ width: 75%;
324
+ padding-bottom: 10px;
325
+ }
326
+ .saswp-review .saswp-knowledge-label{
327
+ float:left;
328
+ clear: both;
329
+ }
330
+
331
+ .saswp-compativility-div .saswp-knowledge-field{
332
+ float: right;
333
+ width: 75%;
334
+ padding-bottom: 10px;
335
+ }
336
+ .saswp-compativility-div .saswp-knowledge-label{
337
+ float:left;
338
+ clear: both;
339
+ }
340
+ .saswp-compativility-div li {
341
+ display: inline-flex;
342
+ }
343
+ .saswp-seller-div .saswp-knowledge-label{
344
+ float: left;
345
+
346
+ clear: both;
347
+ }
348
+ .saswp-seller-div .saswp-knowledge-field{
349
+ float: left;
350
+ width: 70%;
351
+ }
352
+ .saswp-post-specific-tab-wrapper{
353
+ display: inline-block;
354
+ width: 25%;
355
+ vertical-align: top;
356
+ box-sizing: border-box;
357
+ padding-right:10px;
358
+ }
359
+ .saswp-post-specific-container{
360
+ display: inline-block;
361
+ width: calc(75% - 1px );
362
+ border-left: 1px solid #eee;
363
+ }
364
+ .saswp-post-specific-wrapper{
365
+ padding: 10px;
366
+ }
367
+ .saswp-tab a.selected {
368
+ background-color: #ccc;
369
+ }
370
+ .saswp-tab-links{
371
+ display: block;
372
+ background-color: inherit;
373
+ color: black;
374
+ padding: 6px 10px;
375
+ outline: none;
376
+ text-align: left;
377
+ cursor: pointer;
378
+ transition: 0.3s;
379
+ font-size: 15px;
380
+ width: 130px;
381
+ overflow: hidden;
382
+ margin-right: 10px;
383
+ }
384
+ .saswp-star-rating{
385
+ cursor: pointer;
386
+ }
387
+ .saswp-post-specific-wrapper select{
388
+ width: 100%;
389
+ }
390
+ .saswp-review-tables{
391
+ width: 100%;
392
+ }
393
+ .saswp-over-all-raring{
394
+ float: right;
395
+ }
396
+
397
+ .saswp-review-pros-and-cons{
398
+ position: relative;
399
+ clear:both;
400
+ }
401
+ .saswp-review-pros-and-cons > div:first{
402
+ padding-left: 10px;
403
+ }
404
+ .saswp-review-pros-and-cons > div{
405
+ width: 49%;
406
+ display: inline-block;
407
+ }
408
+ .saswp-review-pros-and-cons > div:nth-child(2){
409
+ padding-left: 12px;
410
+ }
411
+ .saswp-wp-ediot-desc{
412
+ margin-bottom: -23px;
413
+ display: block;
414
+ }
415
+ .saswp-review-description{
416
+ margin-top: 40px;
417
+ padding-top: 10px;
418
+ border-top: 1px solid #eee;
419
+ }
420
+ .saswp-review-pros-and-cons{
421
+ margin-top: 40px;
422
+ padding-top: 10px;
423
+ border-top: 1px solid #eee;
424
+ }
425
+ .saspw-review-item-list{
426
+ margin-top: 20px;
427
+ border-top: 1px solid #eee;
428
+ }
429
+ .saswp-review-item-list-table{
430
+ padding-bottom: 10px;
431
+ }
432
+ #sasw-review input[type=text] {
433
+ width: 180px;
434
+ }
435
+ #sasw-review input[type=number] {
436
+ width: 180px;
437
+ }
438
+ #saswp-review-item-enable{
439
+ width: 10px;
440
+ }
441
+ .saswp-enable-review-on-post{
442
+ padding-bottom: 10px;
443
+ }
444
+ .saswp-enable-review-on-post label{
445
+ font-weight: 500;
446
+ }
447
+ /*
448
+ Compatibility tab css starts here
449
+ */
450
+ .saswp-compatibility table th{
451
+ width: auto;
452
+ padding: 0px;
453
+ }
454
+ .saswp-compatibility .saswp-knowledge-label {
455
+ float: left;
456
+ clear: both;
457
+ }
458
+ .saswp-tools .saswp-knowledge-label {
459
+ float: left;
460
+ clear: both;
461
+ }
462
+ .saswp-tools .saswp-knowledge-field {
463
+ float: right;
464
+ width: 69%;
465
+ padding-bottom: 10px;
466
+ }
467
+ .saswp_kg_logo, .saswp_person_fields{
468
+ background-color: #fff !important;
469
+ }
470
+ .saswp_image_thumbnail{
471
+ padding-top: 5px;
472
+ display: inline-block;
473
+ }
474
+ .saswp-compatibility .saswp-knowledge-field {
475
+ float: right;
476
+ width: 75%;
477
+ padding-bottom: 10px;
478
+ }
479
+ .saswp-schem-type-note, .saswp-job-posting-note{
480
+ color: chocolate;
481
+ }
482
+ .saswp-custom-fields-name{
483
+ border: 1px solid #aaa;
484
+ border-radius: 4px;
485
+ }
486
+ /*
487
+ Compatibility tab css ends
488
+ */
489
+ .saswp-option-table-class p{
490
+ margin: auto;
491
+ font-style: italic;
492
+ color: #666;
493
+ }
494
+ /*
495
+ On/Off Buttons starts here
496
+ */
497
+ .saswp-switch {
498
+ position: relative;
499
+ display: inline-block;
500
+ width: 40px;
501
+ height: 22px;
502
+ border: 20px;
503
+ }
504
+
505
+ .saswp-switch input {
506
+ opacity: 0;
507
+ width: 0;
508
+ height: 0;
509
+ }
510
+
511
+ .saswp-slider {
512
+ position: absolute;
513
+ cursor: pointer;
514
+ top: 0;
515
+ left: 0;
516
+ right: 0;
517
+ bottom: 0;
518
+ background-color: #5a6783;
519
+ transition: .4s;
520
+ border-radius: 20px;
521
+ }
522
+
523
+ .saswp-slider:before {
524
+ position: absolute;
525
+ content: "";
526
+ height: 15px;
527
+ width: 15px;
528
+ left: 4px;
529
+ bottom: 4px;
530
+ background-color: white;
531
+ transition: .4s;
532
+ border-radius: 20px;
533
+ }
534
+
535
+ input:checked + .saswp-slider {
536
+ background-color: #61bd3b;
537
+ border-radius: 30px;
538
+ }
539
+
540
+ input:focus + .saswp-slider {
541
+ box-shadow: 0 0 1px #2196F3;
542
+ }
543
+
544
+ input:checked + .saswp-slider:before {
545
+
546
+ transform: translateX(15px);
547
+ }
548
+
549
+ /* Rounded sliders */
550
+ .saswp-slider.saswp-round {
551
+ border-radius: 34px;
552
+ }
553
+
554
+ .saswp-slider.saswp-round:before {
555
+ border-radius: 50%;
556
+ }
557
+
558
+ .saswp-tab-nav li{
559
+ display: flex;
560
+ align-items: center;
561
+ justify-content: space-between;
562
+ margin-bottom:10px;
563
+ border-bottom: 1px solid #eee;
564
+ }
565
+
566
+ .saswp-tab-nav .selected{
567
+ background-color: #ccc;
568
+ }
569
+ .saswp-single-post-restore .saswp-switch{
570
+ height: 28px;
571
+ }
572
+ .saswp-single-post-restore .saswp-slider:before{
573
+ height: 20px;
574
+ }
575
+ /*
576
+ On/Off Buttons ends here
577
+ */
578
+ .saswp-wdi-rate-stars{display:inline-block;color:#ffb900;position:relative;top:3px;}
579
+ .saswp-wdi-rate-stars svg{fill:#ffb900;}
580
+ .saswp-wdi-rate-stars svg:hover{fill:#ffb900}
581
+ .saswp-wdi-rate-stars svg:hover ~ svg{fill:none;}
582
+
583
+ .option-table-class {width:100%;}
584
+ .option-table-class tr td {padding: 10px 10px 10px 10px ;}
585
+ .option-table-class tr > td{width: 30%;}
586
+ .option-table-class tr td:last-child{width: 60%;}
587
+
588
+ .saswp-custom-fields-table{
589
+ width: 100%;
590
+ }
591
+ .saswp-custom-fields-table input{
592
+ width: 100%;
593
+ }
594
+ .saswp-custom-fields-table tr td {padding: 10px 10px 10px 10px ;}
595
+ .saswp-custom-fields-table td{
596
+ width: 30%;
597
+ }
598
+
599
+ .saswp-option-table-class input[type="text"], .saswp-option-table-class select{
600
+ width:100%;
601
+ }
602
+ .saswp-paywall-table-class input[type="text"], .saswp-paywall-table-class select{
603
+ width:100%;
604
+ }
605
+
606
+ /*
607
+ Compatibility tab css starts here
608
+ */
609
+ .saswp-email_schema table th{
610
+ width: auto;
611
+ padding: 0px;
612
+ }
613
+ .saswp-email_schema .saswp-knowledge-label {
614
+ float: left;
615
+ clear: both;
616
+ }
617
+ .saswp-email_schema .saswp-knowledge-field {
618
+ float: right;
619
+ width: 75%;
620
+ padding-bottom: 10px;
621
+ }
622
+ /*
623
+ Compatibility tab css ends
624
+ */
625
+ .saswp-add-on-plugin label{
626
+ margin-top: 10px;
627
+ }
628
+ .saswp-add-on-plugin span{
629
+ width: 250px;
630
+ display: inline-block;
631
+ }
632
+ .saswp-knowledge-label label[for="saswp_search_box_schema_checkbox"] {
633
+ padding-left: 10px;
634
+ }
635
+
636
+ .saswp-knowledge-label label[for="saswp-woocommerce-booking-checkbox"] {
637
+ padding-left: 10px;
638
+ }
639
+
640
+ .saswp-knowledge-label label[for="saswp-woocommerce-membership-checkbox"] {
641
+ padding-left: 10px;
642
+ }
643
+
644
+ .saswp-global-selected{
645
+ color: #000000;
646
+ font-weight: 500;
647
+ }
648
+ #saswp-global-tabs a{
649
+ cursor: pointer;
650
+ }
651
+ #saswp-global-tabs{
652
+ padding-left: 5px;
653
+ }
654
+ #saswp-tools-tabs a{
655
+ cursor: pointer;
656
+ }
657
+ #saswp-review-tabs a{
658
+ cursor: pointer;
659
+ }
660
+ #saswp-tools-tabs{
661
+ padding-left: 5px;
662
+ }
663
+ .saswp-need-help {
664
+ padding-left: 60px;
665
+ }
666
+ .saswp-heading{
667
+ display: inline-flex;
668
+ align-items: baseline;
669
+ }
670
+ .saswp-heading h2{
671
+ margin-bottom: 0px;
672
+ }
673
+ .saswp-view-docs a{
674
+ margin-right: 5px !important;
675
+ margin-top: 10px !important;
676
+ }
677
+ .saswp-tabs .nav-tab{
678
+ margin-left: 4px;
679
+ }
680
+
681
+ /*
682
+ Google review module starts here
683
+ */
684
+ .saswp-panel {
685
+ padding: 7px 18px;
686
+ background-color: white;
687
+ box-shadow: 0px 0px 20px 1px #d2cccc;
688
+ }
689
+
690
+ /*** Review Design CSS ****/
691
+ .saswp-g-review-header{
692
+ margin-top: 50px;
693
+ }
694
+ .saswp-g-review-body{
695
+ display:inline-grid;
696
+ grid-template-columns: 1fr 300px;
697
+ grid-gap:30px;
698
+ margin-top:30px;
699
+ }
700
+ .saswp-review-list{}
701
+ .saswp-channel-list{
702
+ margin-right: 15px;
703
+ }
704
+ .saswp-input-fields{
705
+ display: inline-flex;
706
+ align-items: center;
707
+ margin-bottom: 8px;
708
+ width: 100%;
709
+ }
710
+ .saswp-input-fields label{
711
+ width: 130px;
712
+ }
713
+ .saswp-input-fields select{
714
+ width:100%;
715
+ }
716
+ .saswp-panel h3{
717
+ font-size: 20px;
718
+ line-height: 1.4;
719
+ color: #222;
720
+ text-align: center;
721
+ margin: 10px 0px 20px 0px;
722
+ }
723
+ .saswp-input-fields a.button-primary{
724
+ margin-top:10px;
725
+ }
726
+ .saswp-glg-review-body{
727
+ display: grid;
728
+ grid-template-columns: 100px 1fr;
729
+ grid-gap: 20px;
730
+ background: #fff;
731
+ padding: 20px;
732
+ box-shadow: 0px 0px 20px 1px #d2cccc;
733
+ margin-bottom: 30px;
734
+ }
735
+ .saswp-g-plus{
736
+ float: right;
737
+ font-size: 15px;
738
+ }
739
+ .saswp-rtng{
740
+ padding-left: 5px;
741
+ font-size: 14px;
742
+ }
743
+ .saswp-pt-dt {
744
+ font-size: 12px;
745
+ color: #999;
746
+ font-weight: 600;
747
+ margin-top: 5px;
748
+ display: inline-block;
749
+ }
750
+ .saswp-str{
751
+ display: inline-block;
752
+ width: 100%;
753
+ vertical-align: middle;
754
+ }
755
+ .saswp-athr{
756
+ font-size: 15px;
757
+ line-height: 1.4;
758
+ color: #000;
759
+ font-weight: bold;
760
+ display: inline-block;
761
+ vertical-align: middle;
762
+ }
763
+ .saswp-str-rtng .saswp-rvw-str{
764
+ display: inline-block;
765
+ vertical-align: middle;
766
+ padding-left: 10px;
767
+ width: auto;
768
+ }
769
+ .saswp-rv-cnt p{
770
+ font-size: 16px;
771
+ line-height: 1.6;
772
+ color: #000;
773
+ margin: 10px 0px 0px 0px;
774
+ }
775
+ .saswp-rv-img img{
776
+ max-width:100px;
777
+ border-radius: 100%;
778
+ }
779
+ /*
780
+ Google review module ends here
781
+ */
782
+
783
+ /** Premium Feature CSS **/
784
+ .saswp-premium_features table th, .saswp-services table th{
785
+ width: auto;
786
+ padding: 0px;
787
+ }
788
+ .saswp-features-blocks{
789
+ display: inline-grid;
790
+ grid-template-columns: 1fr 1fr;
791
+ grid-gap: 20px;
792
+ }
793
+ .saswp-features-blocks li{
794
+ background:#fff;
795
+ padding: 25px;
796
+ border: 1px solid #d8d8d8;
797
+ }
798
+ .saswp-features-blocks li a{
799
+ text-decoration: none;
800
+ }
801
+ .saswp-ele-ic{
802
+ border-radius: 256px;
803
+ display: inline-block;
804
+ padding:8px 10px 8px 10px;
805
+ width: 70px;
806
+ margin-right: 20px;
807
+ float: left;
808
+ }
809
+ .saswp-ele-ic img{
810
+ width:100%;
811
+ }
812
+ .saswp-ele-1{
813
+ background: #96588a;
814
+ }
815
+ .saswp-ele-2{
816
+ background: #00a97e;
817
+ }
818
+ .saswp-ele-3{
819
+ background: #cacaca;
820
+ }.saswp-ele-4{
821
+ background: #9c56cc;
822
+ }
823
+ .saswp-ele-tlt h3{
824
+ margin:0;
825
+ font-size: 18px;
826
+ line-height: 1.4;
827
+ }
828
+ .saswp-ele-tlt p{
829
+ margin-top:10px;
830
+ }
831
+ .saswp-sts-btn{
832
+ box-sizing: border-box;
833
+ height: 52px;
834
+ margin-top: 20px;
835
+ padding: 6px 15px;
836
+ border: 1px solid #e5e5e5;
837
+ border-radius: 3px;
838
+ display: flex;
839
+ align-items: center;
840
+ justify-content: space-between;
841
+ }
842
+ .saswp-d-btn{
843
+ background: #d2150a;
844
+ padding: 6px 18px;
845
+ border-radius: 30px;
846
+ font-size: 14px;
847
+ color: #fff;
848
+ }
849
+ .form-wrap .saswp-sts-txt{
850
+ font-size: 16px;
851
+ color:#000;
852
+ }
853
+ .saswp-sts-txt span{
854
+ color:#bebfc0;
855
+ padding-left:5px;
856
+ }
857
+
858
+ /** star rating Feature CSS **/
859
+ .saswp_review_platform .saswp-g-plus{
860
+ float: left;
861
+ }
862
+ .saswp-pc-wrap{background-color:#004f74;padding:15px 15px 15px 30px;color:#fff;display:inline-flex;width:100%;flex-wrap:wrap;margin-bottom:20px}.saswp-pc-wrap .saswp-lst span{font-size:18px;font-weight:500;margin-bottom:10px;display:inline-block;line-height:1.3}.saswp-pc-wrap .saswp-lst{flex:1 0 42%}.saswp-pc-wrap .saswp-lst ul{margin:0}.saswp-pc-wrap .saswp-lst p{list-style-type:none;font-size:15px;font-weight:lighter;line-height:1.2;margin-bottom:10px;position:relative;padding-left:20px;color:#eee}.saswp-pc-wrap .saswp-lst p:before{content:'';position:absolute;width:8px;height:8px;background-color:#ccc;left:0;top:6px;border-radius:10px}.sgl .saswp-rvw{width:100%;margin-bottom:34px;font-size:13px;border-bottom:1px solid #ededed}.saswp-rvw-hd span,.saswp-rvw-sm span{background-color:#222;color:#fff;display:inline-block;font-size:15px}.saswp-rvw-hd span{line-height:1.4;padding:8px 12px 6px;margin:26px 0}.saswp-rvw td{padding:7px 14px}.saswp-rvw td,.sgl table td{border:1px solid #ededed}.saswp-rvw tbody{width:100%}.saswp-rvw-sm span{padding:8px 12px 6px;margin-bottom:13px;position:relative;line-height:1.2}.saswp-rvw-fs{line-height:1.5;font-size:48px;font-weight:600;margin-bottom:5px}.saswp-rvw-ov .ovs{font-size:11px;font-weight:600}.sgl .saswp-rvw tr td{background:#fff;width:100%}.sgl .saswp-rvw tr:hover td{background-color:#fcfcfc}.saswp-rvw .saswp-rvw-sm{padding:21px 14px}
863
+ .str-ic{font-size:18px;line-height:1.2}.saswp-rvw-str{display:inline-flex;width:100%}.saswp-rvw-str .df-clr,.saswp-rvw-str .half-str,.saswp-rvw-str .str-ic{display:inline-block;width:20px;height:16px;background-repeat:no-repeat}.saswp-rvw-ov{text-align:center}.saswp-rvw-str .half-str{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNNDgyLjIwNywxODYuOTczbC0xNTkuNjk5LTMzLjcwNUwyNDEuMTA0LDExLjgwM2wtODEuNDA0LDE0MS40NjVMMCwxODYuOTczbDEwOS4zODgsMTIxLjEzNEw5Mi4wOTQsNDcwLjQwNGwxNDkuMDEtNjYuNiAgbDE0OS4wMSw2Ni42bC0xNy4yOTQtMTYyLjI5Nkw0ODIuMjA3LDE4Ni45NzN6IE0yNDEuMTA0LDM3MC45NDNWNzEuOTUzbDYyLjA5LDEwNy45TDQyNSwyMDUuNTYxbC04My40MzMsOTIuMzkzbDEzLjE5MSwxMjMuNzg4ICBMMjQxLjEwNCwzNzAuOTQzeiIgZmlsbD0iI2ZmZDcwMCIvPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K)}.saswp-rvw-str .str-ic{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiNmZmQ3MDAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-rvw-str .df-clr{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiM2MzVlNjMiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}
864
+ /*** Review Design CSS ****/
865
+ .saswp-g-review-header{
866
+ margin-top: 50px;
867
+ }
868
+ .saswp-g-review-body{
869
+ display:inline-grid;
870
+ grid-template-columns: 1fr 300px;
871
+ grid-gap:30px;
872
+ margin-top:30px;
873
+ width:100%;
874
+ }
875
+ .saswp-review-list{}
876
+ .saswp-channel-list{
877
+ margin-right: 15px;
878
+ }
879
+ .saswp-input-fields{
880
+ display: inline-flex;
881
+ align-items: center;
882
+ margin-bottom: 8px;
883
+ width: 100%;
884
+ }
885
+ .saswp-input-fields label{
886
+ width: 130px;
887
+ }
888
+ .saswp-panel h3{
889
+ font-size: 20px;
890
+ line-height: 1.4;
891
+ color: #222;
892
+ text-align: center;
893
+ margin: 10px 0px 20px 0px;
894
+ }
895
+ .saswp-input-fields a.button-primary{
896
+ margin-top:10px;
897
+ }
898
+ .saswp-glg-review-body{
899
+ display: grid;
900
+ grid-template-columns: 100px 1fr;
901
+ grid-gap: 20px;
902
+ background: #fff;
903
+ padding: 20px;
904
+ box-shadow: 0px 0px 20px 1px #d2cccc;
905
+ margin-bottom: 30px;
906
+ }
907
+ .saswp-g-plus{
908
+ float: right;
909
+ font-size: 15px;
910
+ width: 20px;
911
+ height: 20px;
912
+ }
913
+ .saswp-g-plus img{
914
+ max-width:100%;
915
+ }
916
+ .saswp-rtng{
917
+ padding-left: 5px;
918
+ font-size: 14px;
919
+ }
920
+ .saswp-pt-dt {
921
+ font-size: 12px;
922
+ color: #999;
923
+ font-weight: 600;
924
+ margin-top: 5px;
925
+ display: inline-block;
926
+ }
927
+ .saswp-athr{
928
+ font-size: 15px;
929
+ line-height: 1.4;
930
+ color: #000;
931
+ font-weight: bold;
932
+ }
933
+ .saswp-rv-cnt p{
934
+ font-size: 16px;
935
+ line-height: 1.6;
936
+ color: #000;
937
+ margin: 10px 0px 0px 0px;
938
+ }
939
+ .saswp-rv-img img{
940
+ max-width:100px;
941
+ }
942
+ .saswp-g-review-header div{
943
+ margin-top:10px;
944
+ }
945
+
946
+ /*** Upgrade Pro CSS ***/
947
+ .saswp-upgrade-pro{
948
+ background: #fff;
949
+ padding: 25px;
950
+ border: 1px solid #d8d8d8;
951
+ display: inline-block;
952
+ margin-top: 10px;
953
+ width: 81%;
954
+ }
955
+ .saswp-upgrade-pro h2{
956
+ font-size: 20px;
957
+ margin: 0;
958
+ color: #23282d;
959
+ font-weight: 600;
960
+ text-align: center;
961
+ }
962
+ .saswp-upgrade-pro ul{
963
+ margin: 25px 0px 20px 0px;
964
+ display: inline-block;
965
+ }
966
+ .saswp-upgrade-pro ul li{
967
+ position: relative;
968
+ padding-left: 30px;
969
+ font-size: 14px;
970
+ line-height: 1.4;
971
+ margin-bottom: 10px;
972
+ }
973
+ .saswp-upgrade-pro ul li:before {
974
+ content: "";
975
+ background-image: url(../images/check.png);
976
+ background-repeat: no-repeat;
977
+ background-size: 20px;
978
+ width: 20px;
979
+ height: 20px;
980
+ position: absolute;
981
+ left: 2px;
982
+ top: 2px;
983
+ }
984
+ .saswp-upgrade-pro a{
985
+ background: #d2150a;
986
+ padding: 10px 0px;
987
+ display: block;
988
+ text-align: center;
989
+ color: #fff;
990
+ text-decoration: none;
991
+ font-size: 16px;
992
+ font-weight: 600;
993
+ letter-spacing: 1px;
994
+ border-radius: 5px;
995
+ }
996
+ .saswp_image_prev{
997
+ max-width: 200px;
998
+ max-height: 200px;
999
+ float: left;
1000
+ padding-left:2px;
1001
+ }
1002
+ .saswp_prev_close {
1003
+ position: relative;
1004
+ width:30px;
1005
+ height:30px;
1006
+ top: 12px;
1007
+ font-size: 20px;
1008
+ top: -5px;
1009
+ text-decoration:none;
1010
+ }
1011
+ .saswp-add-custom-schema-div{
1012
+ margin-top: 10px;
1013
+ border-top: 1px solid #eee;
1014
+ padding-top: 5px;
1015
+ }
1016
+
1017
+ .saswp-nav-menu-list label{
1018
+ padding-left: 10px;
1019
+ }
1020
+ /*** How to schema css starts here ***/
1021
+
1022
+ .saswp-dynamic-properties
1023
+ {
1024
+ border: 1px solid #aaa;
1025
+ margin-top: 5px;
1026
+ margin-bottom: 5px;
1027
+
1028
+ }
1029
+ .saswp-table-close{
1030
+ float: right;
1031
+ cursor: pointer;
1032
+ }
1033
+ .saswp-table-create-onajax table th, .saswp-table-create-onajax table td{
1034
+ padding: 5px;
1035
+ }
1036
+ .saswp-table-create-onajax select{
1037
+ width: 98%;
1038
+ }
1039
+
1040
+ /*** How to schema css ends here ***/
1041
+
1042
+ .saswp-g-reviews-settings-table input{
1043
+ width: 100%;
1044
+ }
1045
+ .saswp-s-reviews-settings-table input{
1046
+ width: 100%;
1047
+ }
1048
+ .saswp_rv_module_pro_notice{
1049
+ border: 1px solid #d8d8d8;
1050
+ background: #fff;
1051
+ }
1052
+
1053
+ /*** Review Module section ***/
1054
+
1055
+ .saswp-settings-list .saswp-rev-mod{
1056
+ width: 100%;
1057
+ display: inline-block;
1058
+ margin-top: 20px;
1059
+ }
1060
+ .saswp-rev-mod .saswp-knowledge-label{
1061
+ width: 100%;
1062
+ display: inline-block;
1063
+ padding: 10px 16px;
1064
+ font-weight: 600;
1065
+ font-size: 16px;
1066
+ color: #333;
1067
+ background: #f9f9f9;
1068
+ border: 1px solid #d8d8d8;
1069
+ border-bottom: none;
1070
+ }
1071
+ .saswp-rev-mod .saswp-knowledge-field{
1072
+ width:100%;
1073
+ display: inline-block;
1074
+ }
1075
+ .saswp-rev-mod .saswp_rv_module_pro_notice{
1076
+ padding:20px;
1077
+ }
1078
+ .saswp_cmpny_lst{
1079
+ width:100%;
1080
+ display: inline-block;
1081
+ margin-top:30px;
1082
+ }
1083
+ .saswp_rv_module_pro_notice ul{
1084
+ margin: 15px 0px 20px 0px;
1085
+ width: 100%;
1086
+ display: inline-grid;
1087
+ grid-template-columns: 1fr 1fr 1fr;
1088
+ grid-gap: 20px;
1089
+ border-bottom: 1px solid #eee;
1090
+ padding-bottom: 20px;
1091
+ }
1092
+ .saswp_rv_module_pro_notice ul li{
1093
+ position: relative;
1094
+ font-size: 15px;
1095
+ line-height: 1.5;
1096
+ color: #444;
1097
+ margin: 0;
1098
+ }
1099
+ .saswp_rv_module_pro_notice ul li span{
1100
+ padding-left:3px;
1101
+ }
1102
+ /*.saswp_rv_module_pro_notice ul li.check-img:before{
1103
+ content: "";
1104
+ background-image: url(../images/check.png);
1105
+ background-repeat: no-repeat;
1106
+ background-size: 16px;
1107
+ width: 16px;
1108
+ height: 16px;
1109
+ position: absolute;
1110
+ left: 2px;
1111
+ top: 6px;
1112
+ }*/
1113
+ .saswp_rv_module_pro_notice h2{
1114
+ text-align: center;
1115
+ font-size: 31px;
1116
+ }
1117
+ .saswp_rv_module_pro_notice .saswp_desc{
1118
+ text-align: center;
1119
+ font-size: 18px;
1120
+ font-style: normal;
1121
+ color: #000;
1122
+ }
1123
+ .saswp_rv_module_pro_notice .saswp_desc a{
1124
+ font-style: italic;
1125
+ }
1126
+ .saswp_rv_module_pro_notice .saswp_lst{
1127
+ color: #808080;
1128
+ font-family: georgia;
1129
+ font-style: italic;
1130
+ font-style: italic;
1131
+ font-size: 15px;
1132
+ font-weight: 600;
1133
+ }
1134
+ .saswp_rv_module_pro_notice .saswp_avlbl{
1135
+ color: #2a902e;
1136
+ font-family: georgia;
1137
+ font-style: italic;
1138
+ font-size: 15px;
1139
+ font-weight: 600;
1140
+ }
1141
+ .saswp_rv_module_pro_notice ul li img{
1142
+ width:20px;
1143
+ height:20px;
1144
+ position: relative;
1145
+ top: 4px;
1146
+ }
1147
+ .saswp-rev-btn{
1148
+ width:100%;
1149
+ display: inline-block;
1150
+ margin-top:20px;
1151
+ text-align: center;
1152
+ }
1153
+ .saswp-rev-btn span{
1154
+ display: block;
1155
+ font-size: 13px;
1156
+ margin-bottom: 15px;
1157
+ }
1158
+ .saswp-rev-btn a{
1159
+ padding: 12px 18px;
1160
+ display: inline-block;
1161
+ text-decoration: none;
1162
+ border-radius: 5px;
1163
+ background: #0085ba;
1164
+ color: #fff;
1165
+ font-weight: 600;
1166
+ font-size: 18px;
1167
+ }
1168
+ .select2-container{
1169
+ width:100% !important;
1170
+ }
1171
+ .saswp-schema-modify-section{
1172
+ margin-top: 15px;
1173
+ border-top: 1px solid #eee;
1174
+ padding-top: 15px;
1175
+ }
1176
+ .saswp-custom-meta-list{
1177
+ border: 1px solid #aaa;
1178
+ border-radius: 4px;
1179
+ }
1180
+ .saswp-custom-fields-table tr td:nth-child(3n+3) input{
1181
+ border: 1px solid #aaa;
1182
+ border-radius: 4px;
1183
+ }
1184
+ /** Notification CSS **/
1185
+ .updated.notice p{
1186
+ display: flex;
1187
+ width: 100%;
1188
+ align-items: center;
1189
+ }
1190
+ .updated.notice .dashicons-thumbs-up{
1191
+ margin-right:10px;
1192
+ }
1193
+ a.saswp-feedback-remindme, a.saswp-feedback-no-thanks{
1194
+ display: inline-block;
1195
+ cursor: pointer;
1196
+ }
1197
+ .saswp-feedback-remindme:after{
1198
+ content:",";
1199
+ display: inline-block;
1200
+ margin-right:5px;
1201
+ padding-left: 5px
1202
+ }
1203
+ a.saswp-revws-lnk{
1204
+ display: inline-block;
1205
+ background: #0085ba;
1206
+ padding: 12px 20px;
1207
+ color: #fff;
1208
+ text-decoration: none;
1209
+ border-radius: 3px;
1210
+ margin-left: 20px;
1211
+ font-size: 14px;
1212
+ line-height: 0.6;
1213
+ }
1214
+ .saswp-update-notice-btns{
1215
+ display: inline-block;
1216
+ width: 100%;
1217
+ margin-bottom: 5px;
1218
+ }
admin_section/js/main-script.min.js CHANGED
@@ -1 +1,1944 @@
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){var o=a;null==o&&(o=Object.keys(s)[0]);var n="";if(n+='<select class="saswp-custom-meta-list" name="saswp_meta_list_val['+o+']">',$.each(e,function(e,s){n+='<optgroup label="'+s.label+'">',$.each(s["meta-list"],function(e,s){n+='<option value="'+e+'">'+s+"</option>"}),n+="</optgroup>"}),n+="</select>",s){var p="<tr>";p+="<td>",p+='<select class="saswp-custom-fields-name">',$.each(s,function(e,s){p+='<option value="'+e+'">'+s+"</option>"}),p+="</select>",p+="</td>",p+="<td>",p+=n,p+="</td>",p+='<td></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td>',p+="</tr>",$(".saswp-custom-fields-table").append(p)}else $(t).html(n)}function saswp_get_meta_list(e,s,a,t,i){saswp_meta_list[e]?saswp_meta_list_html(saswp_meta_list[e],s,t,a,i):$.get(ajaxurl,{action:"saswp_get_meta_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(o){saswp_meta_list[e]=o[e],saswp_meta_list_html(saswp_meta_list[e],s,t,a,i)},"json")}function saswp_get_post_specific_schema_fields(e,s,a,t,i){if(saswp_meta_fields[i]){var o=saswp_fields_html_generator(e,t,i,a,saswp_meta_fields[i]);o&&($(".saswp-"+a+'-section[data-id="'+t+'"]').append(o),saswp_schema_datepicker())}else $.get(ajaxurl,{action:"saswp_get_schema_dynamic_fields_ajax",meta_name:s,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){saswp_meta_fields[i]=s,console.log(saswp_meta_fields);var o=saswp_fields_html_generator(e,t,i,a,s);o&&($(".saswp-"+a+'-section[data-id="'+t+'"]').append(o),saswp_schema_datepicker())},"json")}function saswp_fields_html_generator(e,s,a,t,i){var o="";return o+='<div class="saswp-'+t+'-table-div saswp-dynamic-properties" data-id="'+e+'"><a class="saswp-table-close">X</a><table class="form-table saswp-'+t+'-table">',$.each(i,function(t,i){var n="";switch("saswp_tvseries_season_published_date"!=i.name&&"saswp_feed_element_date_created"!=i.name||(n="saswp-datepicker-picker"),i.type){case"text":o+="<tr><th>"+i.label+'</th><td><input class="'+n+'" style="width:100%" type="text" id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']"></td></tr>';break;case"textarea":o+="<tr><th>"+i.label+'</th><td><textarea style="width: 100%" id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']" rows="5"></textarea></td></tr>';break;case"select":var p="";$.each(i.options,function(e,s){p+='<option value="'+e+'">'+s+"</option>"}),o+="<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":o+="<tr><th>"+i.label+'</th><td><fieldset><input style="width:80%" type="text" id="'+i.name+"_"+e+"_"+s+'" name="'+i.name+"_"+e+"_"+s+'"><input type="hidden" data-id="'+i.name+"_"+e+"_"+s+'_id" name="'+a+s+"["+e+"]["+i.name+'_id]" id="'+i.name+"_"+e+"_"+s+'_id"><input data-id="media" style="width: 19%" class="button" id="'+i.name+"_"+e+"_"+s+'_button" name="'+i.name+"_"+e+"_"+s+'_button" type="button" value="Upload"><div class="saswp_image_div_'+i.name+"_"+e+"_"+s+'"></div></fieldset></td></tr>'}}),o+="</table></div>"}jQuery(document).ready(function(e){if(saswp_localize_data.do_tour){var s,a="<h3>Thanks for using Structured Data!</h3>";a+="<p>Do you want the latest on <b>Structured Data update</b> before others and some best resources on monetization in a single email? - Free just for users of Structured Data!</p>",a+='<style type="text/css">',a+=".wp-pointer-buttons{ padding:0; overflow: hidden; }",a+=".wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none}\t#afw_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }",a+="</style>",a+='<div id="afw_mc_embed_signup">',a+='<form action="//app.mailerlite.com/webforms/submit/o1s7u3" data-id="258182" data-code="o1s7u3" method="POST" target="_blank">',a+='<div id="afw_mc_embed_signup_scroll">',a+='<div class="afw-mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">',a+='<input type="text" name="fields[name]" class="form-control" placeholder="Name" hidden value="'+saswp_localize_data.current_user_name+'" style="display:none">',a+='<input type="text" value="'+saswp_localize_data.current_user_email+'" name="fields[email]" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">',a+='<input type="text" name="fields[company]" class="form-control" placeholder="Website" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="'+saswp_localize_data.get_home_url+'">',a+='<input type="hidden" name="ml-submit" value="1" />',a+="</div>",a+='<div id="mce-responses">',a+='<div class="response" id="mce-error-response" style="display:none"></div>',a+='<div class="response" id="mce-success-response" style="display:none"></div>',a+="</div>",a+='<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a631df13442f19caede5a5baf_c9a71edce6" tabindex="-1" value=""></div>',a+='<input type="submit" value="Subscribe" name="subscribe" id="pointer-close" class="button mc-newsletter-sent" style=" background: #0085ba; border-color: #006799; padding: 0px 16px; text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799; height: 30px; margin-top: 1px; color: #fff; box-shadow: 0 1px 0 #006799;">',a+="</div>",a+="</form>";var t={content:a+="</div>",position:{edge:"top",align:"left"}};s=function(){e(saswp_localize_data.displayID).pointer(t).pointer("open"),saswp_localize_data.button2&&(jQuery("#pointer-close").after('<a id="pointer-primary" class="button-primary">'+saswp_localize_data.button2+"</a>"),jQuery("#pointer-primary").click(function(){saswp_localize_data.function_name}),jQuery("#pointer-close").click(function(){e.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer222",action:"dismiss-wp-pointer"})}))},(t=e.extend(t,{buttons:function(e,s){return button=jQuery('<a id="pointer-close" class="button-secondary">'+saswp_localize_data.button1+"</a>"),button_2=jQuery("#pointer-close.button"),button.bind("click.pointer",function(){s.element.pointer("close")}),button_2.on("click",function(){s.element.pointer("close")}),button},close:function(){e.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer222",action:"dismiss-wp-pointer"})},show:function(e,s){s.pointer.css({left:"170px",top:"160px"})}})).position&&t.position.defer_loading?e(window).bind("load.wp-pointers",s):s()}function i(s,a){var t=a.replace("-checkbox",""),i=e("#"+t).next("p").text();s.is(":checked")&&""!==i?e("#"+t).next("p").removeClass("saswp_hide"):1==e("#"+t).next("p").attr("data-id")?e("#"+t).next("p").text("This feature is only available in pro version"):e("#"+t).next("p").addClass("saswp_hide")}function o(){e(".saswp-item-reviewed").change(function(s){s.preventDefault();var a="";if(e("select#schema_type option:selected").val()&&(a=e("select#schema_type option:selected").val()),e(".saswp-tab-links.selected").attr("saswp-schema-type")&&(a=e(".saswp-tab-links.selected").attr("saswp-schema-type")),"Review"===a){var t=e(this),i=e(this).val(),o=saswp_localize_data.post_id,n=e(t).attr("data-id"),p=e(t).attr("post-specific");e.get(ajaxurl,{action:"saswp_get_item_reviewed_fields",schema_id:n,post_specific:p,item:i,post_id:o,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){e(t).parent().parent().nextAll().remove(".saswp-review-tr"),e(t).parent().parent().after(s)})}}).change()}function n(){"saswp"!=saswp_localize_data.post_type&&"saswp"!=saswp_localize_data.page_now||"saswp_page_structured_data_options"==saswp_localize_data.page_now||e(".saswp-custom-fields-select2").select2({ajax:{type:"POST",url:ajaxurl,dataType:"json",delay:250,data:function(e){return{saswp_security_nonce:saswp_localize_data.saswp_security_nonce,q:e.term,action:"saswp_get_custom_meta_fields"}},processResults:function(e){return{results:e}},cache:!0},minimumInputLength:2})}function 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,o,n,p){s.addClass("updating-message"),e.get(ajaxurl,{action:"saswp_add_s_approved_reviews",site_id:a,token:t,limit:i,api_key:o,page:n,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")),++n<p?c(s,a,t,i,o,n):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),o()),"Product"==s&&(e(".saswp-product-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==s&&(e(".saswp-event-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"AudioObject"==s&&e(".saswp-audio-text-field-tr").show(),"SoftwareApplication"==s&&e(".saswp-softwareapplication-text-field-tr").show(),e(".saswp-schem-type-note").addClass("saswp_hide"),"qanda"==s&&e(".saswp-schem-type-note").removeClass("saswp_hide"),e(".saswp-job-posting-note").addClass("saswp_hide"),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-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 o="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&s.height<1200&&(o='<p class="saswp_warning">Image size is smaller than recommended size</p>'),e(".saswp_image_div_"+t).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+s.url+'"/><a data-id="'+t+'" href="#" class="saswp_prev_close">X</a></div>'+o)}).open()}),e(document).on("click",".saswp_prev_close",function(s){s.preventDefault();var a=e(this).attr("data-id");console.log(a),e(this).parent().remove(),e("#"+a).val(""),e("input[data-id='"+a+"_id']").val(""),e("input[data-id='"+a+"_height']").val(""),e("input[data-id='"+a+"_width']").val(""),e("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(e("#sd_default_image_width").val(""),e("#sd_default_image_height").val(""))}),e(document).on("change",".saswp-schema-type-toggle",function(s){var a=e(this).attr("data-schema-id"),t=e(this).attr("data-post-id");if(e(this).is(":checked"))var i=1;else i=0;e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_enable_disable_schema_on_post",status:i,schema_id:a,post_id:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){},error:function(e){console.log(e)}})}),e(document).on("click",".saswp-reset-data",function(s){s.preventDefault(),1==confirm("Are you sure?")&&e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){setTimeout(function(){location.reload()},1e3)},error:function(e){console.log(e)}})}),e(document).on("click",".saswp_license_activation",function(s){s.preventDefault();var a=e(this);a.addClass("updating-message");var t=e(this).attr("license-status"),i=e(this).attr("add-on"),o=e("#"+i+"_addon_license_key").val();t&&i&&o?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:o,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){e("#"+i+"_addon_license_key_status").val(s.status),"active"==s.status?(e(".saswp-"+i+"-dashicons").addClass("dashicons-yes"),e(".saswp-"+i+"-dashicons").removeClass("dashicons-no-alt"),e(".saswp-"+i+"-dashicons").css("color","green"),e(".saswp_license_activation[add-on='"+i+"']").attr("license-status","inactive"),e(".saswp_license_activation[add-on='"+i+"']").text("Deactivate"),e(".saswp_license_status_msg[add-on='"+i+"']").text("Activated"),e(".saswp_license_status_msg[add-on='"+i+"']").css("color","green"),e(".saswp_license_status_msg[add-on='"+i+"']").text(s.message)):(e(".saswp-"+i+"-dashicons").addClass("dashicons-no-alt"),e(".saswp-"+i+"-dashicons").removeClass("dashicons-yes"),e(".saswp-"+i+"-dashicons").css("color","red"),e(".saswp_license_activation[add-on='"+i+"']").attr("license-status","active"),e(".saswp_license_activation[add-on='"+i+"']").text("Activate"),e(".saswp_license_status_msg[add-on='"+i+"']").css("color","red"),e(".saswp_license_status_msg[add-on='"+i+"']").text(s.message)),a.removeClass("updating-message")},error:function(e){console.log(e)}}):(alert("Please enter value license key"),a.removeClass("updating-message"))}),e(".saswp-send-query").on("click",function(s){s.preventDefault();var a=e("#saswp_query_message").val();""!=e.trim(a)?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_send_query_message",message:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(e(".saswp-query-success").show(),e(".saswp-query-error").hide()):(console.log("dd"),e(".saswp-query-success").hide(),e(".saswp-query-error").show())},error:function(e){console.log(e)}}):alert("Please enter the message")}),e(".saswp-import-plugins").on("click",function(s){s.preventDefault();var a=e(this);a.addClass("updating-message");var t=e(this).attr("data-id");e.get(ajaxurl,{action:"saswp_import_plugin_data",plugin_name:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){"t"==s.status?(e(a).parent().find(".saswp-imported-message").text(s.message),e(a).parent().find(".saswp-imported-message").removeClass("saswp-error"),setTimeout(function(){location.reload()},2e3)):(e(a).parent().find(".saswp-imported-message").addClass("saswp-error"),e(a).parent().find(".saswp-imported-message").text(s.message)),a.removeClass("updating-message")},"json")}),e(".saswp-feedback-no-thanks").on("click",function(s){s.preventDefault(),e.get(ajaxurl,{action:"saswp_feeback_no_thanks"},function(s){"t"==s.status&&e(".saswp-feedback-notice").hide()},"json")}),e(".saswp-feedback-remindme").on("click",function(s){s.preventDefault(),e.get(ajaxurl,{action:"saswp_feeback_remindme"},function(s){"t"==s.status&&e(".saswp-feedback-notice").hide()},"json")}),e(document).on("change",".saswp-local-business-type-select",function(s){s.preventDefault();var a=e(this),t=e(this).val();e.get(ajaxurl,{action:"saswp_get_sub_business_ajax",business_type:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){if("t"==s.status){e(".saswp-local-business-name-select").parents("tr").remove();var t=a.parents(".saswp-post-specific-wrapper").attr("data-id"),i='<tr><th><label for="saswp_business_name_'+t+'">Sub Business Type</label></th>';i+='<td><select class="saswp-local-business-name-select" id="saswp_business_name_'+t+'" name="saswp_business_name_'+t+'">',e.each(s.result,function(e,s){i+='<option value="'+e+'">'+s+"</option>"}),i+="</select></td>",i+="</tr>",a.parents(".form-table tr:first").after(i)}else e(".saswp-local-business-name-select").parents("tr").remove()},"json")}),o(),e(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),e(document).on("click",".saswp-add-custom-schema",function(s){s.preventDefault(),e(".saswp-add-custom-schema-field").removeClass("saswp_hide"),e(this).hide()}),e(document).on("click",".saswp-delete-custom-schema",function(s){s.preventDefault(),e("#saswp_custom_schema_field").val(""),e(".saswp-add-custom-schema-field").addClass("saswp_hide"),e(".saswp-add-custom-schema").show()}),e(".saswp-modify_schema_post_enable").on("click",function(s){var a=e(this);a.addClass("updating-message"),s.preventDefault(),e.get(ajaxurl,{action:"saswp_modify_schema_post_enable",post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){a.remove(),e(".saswp-add-custom-schema-div").remove(),e("#post_specific .inside").append(s),a.removeClass("updating-message"),e(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),saswp_schema_datepicker(),p(),o()})}),saswp_schema_datepicker(),e(".saswp-reviews-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"}),e(document).on("click",".saswp-add-more-item",function(s){s.preventDefault();var a=e(".saswp-review-item-list-table tr").length;console.log(a);e(".saswp-review-item-list-table").append('<tr class="saswp-review-item-tr"><td>Review Item Feature</td><td><input type="text" name="saswp-review-item-feature[]"></td><td>Rating</td><td><input step="0.1" min="0" max="5" type="number" name="saswp-review-item-star-rating[]"></td><td><a type="button" class="saswp-remove-review-item button">x</a></td></tr>')}),e(document).on("click",".saswp-remove-review-item",function(s){s.preventDefault(),e(this).parent().parent("tr").remove()}),e(document).on("focusout",".saswp-review-item-tr input[type=number]",function(s){s.preventDefault();var a=0,t=e(".saswp-review-item-tr input[type=number]").length;e(".saswp-review-item-tr input[type=number]").each(function(s,t){""==e(t).val()?a+=parseFloat(0):a+=parseFloat(e(t).val())});var i=a/t;e("#saswp-review-item-over-all").val(i)}),e("#saswp-review-location").change(function(){var s=e(this).val();e(".saswp-review-shortcode").addClass("saswp_hide"),3==s&&e(".saswp-review-shortcode").removeClass("saswp_hide")}).change(),e("#saswp-review-item-enable").change(function(){e(this).is(":checked")?e(".saswp-review-fields").show():e(".saswp-review-fields").hide()}).change(),e(document).on("click",".saswp-restore-post-schema",function(s){s.preventDefault();var a=e(this);if(a.addClass("updating-message"),e(".saswp-post-specific-schema-ids").val())var t=JSON.parse(e(".saswp-post-specific-schema-ids").val());e.post(ajaxurl,{action:"saswp_restore_schema",schema_ids:t,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status?setTimeout(function(){location.reload()},1e3):(alert(e.msg),setTimeout(function(){location.reload()},1e3)),a.removeClass("updating-message")},"json")}),e(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(s){s.preventDefault();var a=e(this).attr("data-id");e(".saswp-post-specific-wrapper").hide(),e("#"+a).show(),e("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),e("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),e(this).addClass("selected"),e(this).parent().addClass("selected"),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(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).attr("data-id"),t=e(this).attr("fields_type"),i=e(this).attr("div_type"),o=e(".saswp-"+i+"-table-div").length,n=e(".saswp-"+i+"-table-div:nth-child("+o+")").attr("data-id");(n=++n)||(n=0),saswp_get_post_specific_schema_fields(n,t,i,a,t+"_")}),e(document).on("click",".saswp-table-close",function(){e(this).parent().remove()}),e(document).on("click",".saswp-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),n()}),e(document).on("click",".saswp-add-custom-fields",function(){var s=e("select#schema_type option:selected").val(),a=e("#post_ID").val();""!=s&&(saswp_meta_list_fields[s]?saswp_get_meta_list("text",saswp_meta_list_fields[s],null,null,null):e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:a,schema_type:s,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){saswp_meta_list_fields[s]=e,saswp_get_meta_list("text",saswp_meta_list_fields[s],null,null,null)},error:function(e){console.log(e)}}))}),n(),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(),o=e("#saswp_s_approved_reviews").val(),n=e("#reviews_addon_license_key").val(),p=1;o>100&&(p=o/100,o%100&&p++);t&&i&&n?c(a,t,i,o,n,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(),o=e("#saswp_google_place_api_key").val(),n=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&&(n||o)?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:p,reviews_api:n,location:t,blocks:i,g_api:o,premium_status:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s.parent().parent().find(".saswp-rv-fetched-msg").text("Success"),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(s.parent().parent().find(".saswp-rv-fetched-msg").text(e.message),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),s.removeClass("updating-message")},error:function(e){console.log(e)}}):(""==t&&alert("Please enter place id"),""==o&&alert("Please enter api key"),""==n&&alert("Please enter reviews api key"),s.removeClass("updating-message"))}),e("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var s=e(this);s.parent().find(".saswp-phone-validation").remove();var a=e(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(a)?s.parent().find(".saswp-phone-validation").remove():s.after('<span style="color:red;" class="saswp-phone-validation">Invalid Phone Number</span>')})});
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var saswp_meta_list = [];
2
+ var saswp_meta_fields = [];
3
+ var saswp_meta_list_fields = [];
4
+
5
+ function getParameterByName(name, url) {
6
+ if (!url){
7
+ url = window.location.href;
8
+ }
9
+ name = name.replace(/[\[\]]/g, "\\$&");
10
+ var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
11
+ results = regex.exec(url);
12
+ if (!results) return null;
13
+ if (!results[2]) return "";
14
+ return decodeURIComponent(results[2].replace(/\+/g, " "));
15
+ }
16
+
17
+ function saswp_schema_datepicker(){
18
+
19
+ jQuery('.saswp-datepicker-picker').datepicker({
20
+ dateFormat: "yy-mm-dd",
21
+ });
22
+
23
+ }
24
+
25
+
26
+ function saswp_meta_list_html(response, fields, f_name, id, tr){
27
+
28
+ var field_name = f_name;
29
+ if(field_name == null){
30
+ field_name = Object.keys(fields)[0];
31
+ }
32
+ var re_html = '';
33
+ re_html += '<select class="saswp-custom-meta-list" name="saswp_meta_list_val['+field_name+']">';
34
+ $.each(response, function(key,value){
35
+
36
+ re_html += '<optgroup label="'+value['label']+'">';
37
+
38
+ $.each(value['meta-list'], function(key, value){
39
+ re_html += '<option value="'+key+'">'+value+'</option>';
40
+ });
41
+ re_html += '</optgroup>';
42
+
43
+ });
44
+ re_html += '</select>';
45
+
46
+ if(fields){
47
+ var html = '<tr>';
48
+ html += '<td>';
49
+ html += '<select class="saswp-custom-fields-name">';
50
+ $.each(fields, function(key,value){
51
+ html += '<option value="'+key+'">'+value+'</option>';
52
+ });
53
+ html += '</select>';
54
+ html += '</td>';
55
+ html += '<td>';
56
+ html += re_html;
57
+ html += '</td>';
58
+ html += '<td></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td>';
59
+ html += '</tr>';
60
+ $(".saswp-custom-fields-table").append(html);
61
+
62
+ }else{
63
+ $(id).html(re_html);
64
+ }
65
+
66
+ }
67
+
68
+
69
+
70
+
71
+ function saswp_get_meta_list(type, fields, id, fields_name, tr){
72
+ if (!saswp_meta_list[type]) {
73
+
74
+ $.get(ajaxurl,
75
+ { action:"saswp_get_meta_list", saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
76
+ function(response){
77
+ saswp_meta_list[type] = response[type];
78
+ saswp_meta_list_html(saswp_meta_list[type], fields, fields_name, id, tr);
79
+
80
+ },'json');
81
+
82
+ }else{
83
+ saswp_meta_list_html(saswp_meta_list[type], fields, fields_name, id, tr);
84
+ }
85
+
86
+ }
87
+
88
+ function saswp_get_post_specific_schema_fields(index, meta_name, div_type, schema_id, fields_type){
89
+
90
+ if (!saswp_meta_fields[fields_type]) {
91
+
92
+ $.get(ajaxurl,
93
+ { action:"saswp_get_schema_dynamic_fields_ajax",meta_name:meta_name, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
94
+ function(response){
95
+ saswp_meta_fields[fields_type] = response;
96
+ console.log(saswp_meta_fields);
97
+ var html = saswp_fields_html_generator(index, schema_id, fields_type, div_type, response);
98
+
99
+ if(html){
100
+ $('.saswp-'+div_type+'-section[data-id="'+schema_id+'"]').append(html);
101
+ saswp_schema_datepicker();
102
+ }
103
+
104
+ },'json');
105
+
106
+ }else{
107
+
108
+ var html = saswp_fields_html_generator(index, schema_id, fields_type, div_type, saswp_meta_fields[fields_type]);
109
+
110
+ if(html){
111
+ $('.saswp-'+div_type+'-section[data-id="'+schema_id+'"]').append(html);
112
+ saswp_schema_datepicker();
113
+ }
114
+
115
+ }
116
+
117
+
118
+ }
119
+
120
+ function saswp_fields_html_generator(index, schema_id, fields_type, div_type, schema_fields){
121
+
122
+ var html = '';
123
+
124
+ html += '<div class="saswp-'+div_type+'-table-div saswp-dynamic-properties" data-id="'+index+'">'
125
+ + '<a class="saswp-table-close">X</a>'
126
+ + '<table class="form-table saswp-'+div_type+'-table">'
127
+
128
+ $.each(schema_fields, function(eachindex, element){
129
+
130
+ var meta_class = "";
131
+ if(element.name == 'saswp_tvseries_season_published_date' || element.name == 'saswp_feed_element_date_created'){
132
+ meta_class = "saswp-datepicker-picker";
133
+ }
134
+
135
+ switch(element.type) {
136
+
137
+ case "number":
138
+ case "text":
139
+
140
+ html += '<tr>'
141
+ + '<th>'+element.label+'</th><td><input class="'+meta_class+'" style="width:100%" type="'+element.type+'" id="'+element.name+'_'+index+'_'+schema_id+'" name="'+fields_type+schema_id+'['+index+']['+element.name+']"></td>'
142
+ + '</tr>';
143
+
144
+ break;
145
+
146
+ case "textarea":
147
+
148
+ html += '<tr>'
149
+ + '<th>'+element.label+'</th><td><textarea style="width: 100%" id="'+element.name+'_'+index+'_'+schema_id+'" name="'+fields_type+schema_id+'['+index+']['+element.name+']" rows="5"></textarea></td>'
150
+ + '</tr>';
151
+
152
+ break;
153
+ case "select":
154
+
155
+ var options_html = "";
156
+ $.each(element.options, function(opt_index, opt_element){
157
+ options_html += '<option value="'+opt_index+'">'+opt_element+'</option>';
158
+ });
159
+
160
+ html += '<tr>'
161
+ + '<th>'+element.label+'</th>'
162
+ + '<td>'
163
+
164
+ + '<select id="'+element.name+'_'+index+'_'+schema_id+'" name="'+fields_type+schema_id+'['+index+']['+element.name+']">'
165
+ + options_html
166
+ + '</select>'
167
+
168
+ + '</td>'
169
+ + '</tr>';
170
+
171
+ break;
172
+
173
+ case "media":
174
+
175
+ html += '<tr>'
176
+ + '<th>'+element.label+'</th>'
177
+ + '<td>'
178
+ + '<fieldset>'
179
+ + '<input style="width:80%" type="text" id="'+element.name+'_'+index+'_'+schema_id+'" name="'+element.name+'_'+index+'_'+schema_id+'">'
180
+ + '<input type="hidden" data-id="'+element.name+'_'+index+'_'+schema_id+'_id" name="'+fields_type+schema_id+'['+index+']['+element.name+'_id]" id="'+element.name+'_'+index+'_'+schema_id+'_id">'
181
+ + '<input data-id="media" style="width: 19%" class="button" id="'+element.name+'_'+index+'_'+schema_id+'_button" name="'+element.name+'_'+index+'_'+schema_id+'_button" type="button" value="Upload">'
182
+ + '<div class="saswp_image_div_'+element.name+'_'+index+'_'+schema_id+'">'
183
+ + '</div>'
184
+ + '</fieldset>'
185
+ + '</td>'
186
+ + '</tr>';
187
+
188
+ break;
189
+ default:
190
+ // code block
191
+ }
192
+
193
+ });
194
+ html += '</table>'
195
+ + '</div>';
196
+
197
+ return html;
198
+
199
+ }
200
+
201
+ jQuery(document).ready(function($){
202
+
203
+ /* Newletters js starts here */
204
+
205
+ if(saswp_localize_data.do_tour){
206
+
207
+ var content = '<h3>Thanks for using Structured Data!</h3>';
208
+ content += '<p>Do you want the latest on <b>Structured Data update</b> before others and some best resources on monetization in a single email? - Free just for users of Structured Data!</p>';
209
+ content += '<style type="text/css">';
210
+ content += '.wp-pointer-buttons{ padding:0; overflow: hidden; }';
211
+ content += '.wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none} #afw_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }';
212
+ content += '</style>';
213
+ content += '<div id="afw_mc_embed_signup">';
214
+ content += '<form action="//app.mailerlite.com/webforms/submit/o1s7u3" data-id="258182" data-code="o1s7u3" method="POST" target="_blank">';
215
+ content += '<div id="afw_mc_embed_signup_scroll">';
216
+ content += '<div class="afw-mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">';
217
+ content += '<input type="text" name="fields[name]" class="form-control" placeholder="Name" hidden value="'+saswp_localize_data.current_user_name+'" style="display:none">';
218
+ content += '<input type="text" value="'+saswp_localize_data.current_user_email+'" name="fields[email]" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">';
219
+ content += '<input type="text" name="fields[company]" class="form-control" placeholder="Website" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="'+saswp_localize_data.get_home_url+'">';
220
+ content += '<input type="hidden" name="ml-submit" value="1" />';
221
+ content += '</div>';
222
+ content += '<div id="mce-responses">';
223
+ content += '<div class="response" id="mce-error-response" style="display:none"></div>';
224
+ content += '<div class="response" id="mce-success-response" style="display:none"></div>';
225
+ content += '</div>';
226
+ content += '<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a631df13442f19caede5a5baf_c9a71edce6" tabindex="-1" value=""></div>';
227
+ content += '<input type="submit" value="Subscribe" name="subscribe" id="pointer-close" class="button mc-newsletter-sent" style=" background: #0085ba; border-color: #006799; padding: 0px 16px; text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799; height: 30px; margin-top: 1px; color: #fff; box-shadow: 0 1px 0 #006799;">';
228
+ content += '</div>';
229
+ content += '</form>';
230
+ content += '</div>';
231
+
232
+ var setup;
233
+ var wp_pointers_tour_opts = {
234
+ content:content,
235
+ position:{
236
+ edge:"top",
237
+ align:"left"
238
+ }
239
+ };
240
+
241
+ wp_pointers_tour_opts = $.extend (wp_pointers_tour_opts, {
242
+ buttons: function (event, t) {
243
+ button= jQuery ('<a id="pointer-close" class="button-secondary">' + saswp_localize_data.button1 + '</a>');
244
+ button_2= jQuery ('#pointer-close.button');
245
+ button.bind ('click.pointer', function () {
246
+ t.element.pointer ('close');
247
+ });
248
+ button_2.on('click', function() {
249
+ t.element.pointer ('close');
250
+ } );
251
+ return button;
252
+ },
253
+ close: function () {
254
+ $.post (saswp_localize_data.ajax_url, {
255
+ pointer: 'saswp_subscribe_pointer222',
256
+ action: 'dismiss-wp-pointer'
257
+ });
258
+ },
259
+ show: function(event, t){
260
+ t.pointer.css({'left':'170px', 'top':'160px'});
261
+ }
262
+ });
263
+ setup = function () {
264
+ $(saswp_localize_data.displayID).pointer(wp_pointers_tour_opts).pointer('open');
265
+ if (saswp_localize_data.button2) {
266
+ jQuery ('#pointer-close').after ('<a id="pointer-primary" class="button-primary">' + saswp_localize_data.button2+ '</a>');
267
+ jQuery ('#pointer-primary').click (function () {
268
+ saswp_localize_data.function_name;
269
+ });
270
+ jQuery ('#pointer-close').click (function () {
271
+ $.post (saswp_localize_data.ajax_url, {
272
+ pointer: 'saswp_subscribe_pointer222',
273
+ action: 'dismiss-wp-pointer'
274
+ });
275
+ });
276
+ }
277
+ };
278
+ if (wp_pointers_tour_opts.position && wp_pointers_tour_opts.position.defer_loading) {
279
+ $(window).bind('load.wp-pointers', setup);
280
+ }
281
+ else {
282
+ setup ();
283
+ }
284
+
285
+ }
286
+
287
+ /* Newletters js ends here */
288
+
289
+
290
+ $(".saswp-tabs a").click(function(e){
291
+ var href = $(this).attr('href');
292
+ var currentTab = getParameterByName('tab',href);
293
+ if(!currentTab){
294
+ currentTab = "general";
295
+ }
296
+ $(this).siblings().removeClass("nav-tab-active");
297
+ $(this).addClass("nav-tab-active");
298
+ $(".form-wrap").find(".saswp-"+currentTab).siblings().hide();
299
+ $(".form-wrap .saswp-"+currentTab).show();
300
+ window.history.pushState("", "", href);
301
+ return false;
302
+ });
303
+
304
+ $(".saswp-schame-type-select").change(function(){
305
+ $(".saswp-custom-fields-table").html('');
306
+ var schematype = $ (this).val();
307
+
308
+ $(".saswp-option-table-class tr").each(function(index,value){
309
+ if(index>0){
310
+ $(this).hide();
311
+ $(this).find('select').attr('disabled', true);
312
+ }
313
+ });
314
+ if(schematype == 'TechArticle' || schematype == 'Article' || schematype == 'Blogposting' || schematype == 'NewsArticle' || schematype == 'WebPage'){
315
+
316
+ $(".saswp-enable-speakable").parent().parent().show();
317
+ }else{
318
+ $(".saswp-enable-speakable").parent().parent().hide();
319
+ }
320
+
321
+ if(schematype == 'local_business'){
322
+ $(".saswp-option-table-class tr").eq(1).show();
323
+ $(".saswp-business-text-field-tr").show();
324
+ $(".saswp-option-table-class tr").find('select').attr('disabled', false);
325
+ // $("#saswp_dayofweek").attr('disabled', false);
326
+ $('.select-post-type').val('show_globally').trigger('change');
327
+ }
328
+ if(schematype == 'Service'){
329
+ $(".saswp-service-text-field-tr").show();
330
+ $(".saswp-option-table-class tr").find('select').attr('disabled', false);
331
+ }
332
+ if(schematype == 'Review'){
333
+ $(".saswp-review-text-field-tr").show();
334
+ $(".saswp-option-table-class tr").find('select').attr('disabled', false);
335
+ saswp_item_reviewed_call();
336
+ }
337
+ if(schematype == 'Product'){
338
+ $(".saswp-product-text-field-tr").show();
339
+ $(".saswp-option-table-class tr").find('select').attr('disabled', false);
340
+ }
341
+ if(schematype == 'Event'){
342
+ $(".saswp-event-text-field-tr").show();
343
+ $(".saswp-option-table-class tr").find('select').attr('disabled', false);
344
+ }
345
+ if(schematype == 'AudioObject'){
346
+ $(".saswp-audio-text-field-tr").show();
347
+ }
348
+ if(schematype == 'SoftwareApplication'){
349
+ $(".saswp-softwareapplication-text-field-tr").show();
350
+ }
351
+
352
+ $(".saswp-schem-type-note").addClass('saswp_hide');
353
+ if(schematype == 'qanda'){
354
+ $(".saswp-schem-type-note").removeClass('saswp_hide');
355
+ }
356
+
357
+ $(".saswp-job-posting-note").addClass('saswp_hide');
358
+
359
+ // if(schematype == 'JobPosting'){
360
+ // $(".saswp-job-posting-note").removeClass('saswp_hide');
361
+ // }
362
+
363
+ saswp_enable_rating_review();
364
+ });
365
+
366
+ $("#saswp_business_type").change(function(){
367
+ var businesstype = $ (this).val();
368
+ var schematype = $(".saswp-schame-type-select").val();
369
+
370
+ $(".saswp-option-table-class tr").each(function(index,value){
371
+ if(index>1){
372
+ $(this).hide();
373
+ $(this).find('select').attr('disabled', true);
374
+ }
375
+ });
376
+
377
+ if(schematype == 'TechArticle' || schematype == 'Article' || schematype == 'Blogposting' || schematype == 'NewsArticle' || schematype == 'WebPage'){
378
+
379
+ $(".saswp-enable-speakable").parent().parent().show();
380
+ }else{
381
+ $(".saswp-enable-speakable").parent().parent().hide();
382
+ }
383
+
384
+ if(schematype == 'local_business'){
385
+ $(".saswp-"+businesstype+'-tr').show();
386
+ $(".saswp-business-text-field-tr").show();
387
+ $(".saswp-"+businesstype+'-tr').find('select').attr('disabled', false);
388
+ // $("#saswp_dayofweek").attr('disabled', false);
389
+ }
390
+ if(schematype == 'Service'){
391
+ $(".saswp-service-text-field-tr").show();
392
+ $(".saswp-service-text-field-tr").find('select').attr('disabled', false);
393
+ }
394
+ if(schematype == 'Product'){
395
+ $(".saswp-product-text-field-tr").show();
396
+ $(".saswp-product-text-field-tr").find('select').attr('disabled', false);
397
+ }
398
+ if(schematype == 'AudioObject'){
399
+ $(".saswp-audio-text-field-tr").show();
400
+ }
401
+ if(schematype == 'SoftwareApplication'){
402
+ $(".saswp-softwareapplication-text-field-tr").show();
403
+ }
404
+
405
+ if(schematype == 'Review'){
406
+ $(".saswp-review-text-field-tr").show();
407
+ $(".saswp-review-text-field-tr").find('select').attr('disabled', false);
408
+ }
409
+ if(schematype == 'Event'){
410
+ $(".saswp-event-text-field-tr").show();
411
+ $(".saswp-event-text-field-tr").find('select').attr('disabled', false);
412
+ }
413
+ saswp_enable_rating_review();
414
+ }).change();
415
+
416
+
417
+ //Settings page jquery starts here
418
+
419
+
420
+ function saswp_compatibliy_notes(current, id){
421
+
422
+ var plugin_name = id.replace('-checkbox','');
423
+ var text = $("#"+plugin_name).next('p').text();
424
+
425
+ if (current.is(':checked') && text !=='') {
426
+ $("#"+plugin_name).next('p').removeClass('saswp_hide');
427
+ }else{
428
+
429
+ if($("#"+plugin_name).next('p').attr('data-id') == 1){
430
+ $("#"+plugin_name).next('p').text('This feature is only available in pro version');
431
+ }else{
432
+ $("#"+plugin_name).next('p').addClass('saswp_hide');
433
+ }
434
+ }
435
+
436
+ }
437
+
438
+
439
+ $(".saswp-checkbox").change(function(){
440
+
441
+ var id = $(this).attr("id");
442
+ var current = $(this);
443
+
444
+
445
+ switch(id){
446
+
447
+ case 'saswp-the-seo-framework-checkbox':
448
+ saswp_compatibliy_notes(current, id);
449
+ if ($(this).is(':checked')) {
450
+ $("#saswp-the-seo-framework").val(1);
451
+ }else{
452
+ $("#saswp-the-seo-framework").val(0);
453
+ }
454
+ break;
455
+
456
+ case 'saswp-seo-press-checkbox':
457
+ saswp_compatibliy_notes(current, id);
458
+ if ($(this).is(':checked')) {
459
+ $("#saswp-seo-press").val(1);
460
+ }else{
461
+ $("#saswp-seo-press").val(0);
462
+ }
463
+ break;
464
+
465
+ case 'saswp-aiosp-checkbox':
466
+ saswp_compatibliy_notes(current, id);
467
+ if ($(this).is(':checked')) {
468
+ $("#saswp-aiosp").val(1);
469
+ }else{
470
+ $("#saswp-aiosp").val(0);
471
+ }
472
+ break;
473
+
474
+ case 'saswp-smart-crawl-checkbox':
475
+ saswp_compatibliy_notes(current, id);
476
+ if ($(this).is(':checked')) {
477
+ $("#saswp-smart-crawl").val(1);
478
+ }else{
479
+ $("#saswp-smart-crawl").val(0);
480
+ }
481
+ break;
482
+
483
+ case 'saswp-squirrly-seo-checkbox':
484
+ saswp_compatibliy_notes(current, id);
485
+ if ($(this).is(':checked')) {
486
+ $("#saswp-squirrly-seo").val(1);
487
+ }else{
488
+ $("#saswp-squirrly-seo").val(0);
489
+ }
490
+ break;
491
+
492
+ case 'saswp-wp-recipe-maker-checkbox':
493
+ saswp_compatibliy_notes(current, id);
494
+ if ($(this).is(':checked')) {
495
+ $("#saswp-wp-recipe-maker").val(1);
496
+ }else{
497
+ $("#saswp-wp-recipe-maker").val(0);
498
+ }
499
+ break;
500
+
501
+ case 'saswp-wpsso-core-checkbox':
502
+ saswp_compatibliy_notes(current, id);
503
+ if ($(this).is(':checked')) {
504
+ $("#saswp-wpsso-core").val(1);
505
+ }else{
506
+ $("#saswp-wpsso-core").val(0);
507
+ }
508
+ break;
509
+
510
+ case 'saswp-for-wordpress-checkbox':
511
+
512
+ if ($(this).is(':checked')) {
513
+ $("#saswp-for-wordpress").val(1);
514
+ }else{
515
+ $("#saswp-for-wordpress").val(0);
516
+ }
517
+ break;
518
+ case 'saswp-facebook-enable-checkbox':
519
+
520
+ if ($(this).is(':checked')) {
521
+ $("#saswp-facebook-enable").val(1);
522
+ $("#sd_facebook").show();
523
+ }else{
524
+ $("#saswp-facebook-enable").val(0);
525
+ $("#sd_facebook").hide();
526
+ }
527
+ break;
528
+ case 'saswp-twitter-enable-checkbox':
529
+
530
+ if ($(this).is(':checked')) {
531
+ $("#saswp-twitter-enable").val(1);
532
+ $("#sd_twitter").show();
533
+ }else{
534
+ $("#saswp-twitter-enable").val(0);
535
+ $("#sd_twitter").hide();
536
+ }
537
+ break;
538
+ case 'saswp-google-plus-enable-checkbox':
539
+
540
+ if ($(this).is(':checked')) {
541
+ $("#saswp-google-plus-enable").val(1);
542
+ $("#sd_google_plus").show();
543
+ }else{
544
+ $("#saswp-google-plus-enable").val(0);
545
+ $("#sd_google_plus").hide();
546
+ }
547
+ break;
548
+ case 'saswp-instagram-enable-checkbox':
549
+
550
+ if ($(this).is(':checked')) {
551
+ $("#saswp-instagram-enable").val(1);
552
+ $("#sd_instagram").show();
553
+ }else{
554
+ $("#saswp-instagram-enable").val(0);
555
+ $("#sd_instagram").hide();
556
+ }
557
+ break;
558
+ case 'saswp-youtube-enable-checkbox':
559
+
560
+ if ($(this).is(':checked')) {
561
+ $("#sd_youtube").show();
562
+ $("#saswp-youtube-enable").val(1);
563
+ }else{
564
+ $("#saswp-youtube-enable").val(0);
565
+ $("#sd_youtube").hide();
566
+ }
567
+ break;
568
+ case 'saswp-linkedin-enable-checkbox':
569
+
570
+ if ($(this).is(':checked')) {
571
+ $("#saswp-linkedin-enable").val(1);
572
+ $("#sd_linkedin").show();
573
+ }else{
574
+ $("#saswp-linkedin-enable").val(0);
575
+ $("#sd_linkedin").hide();
576
+ }
577
+ break;
578
+ case 'saswp-pinterest-enable-checkbox':
579
+
580
+ if ($(this).is(':checked')) {
581
+ $("#saswp-pinterest-enable").val(1);
582
+ $("#sd_pinterest").show();
583
+ }else{
584
+ $("#saswp-pinterest-enable").val(0);
585
+ $("#sd_pinterest").hide();
586
+ }
587
+ break;
588
+ case 'saswp-soundcloud-enable-checkbox':
589
+
590
+ if ($(this).is(':checked')) {
591
+ $("#saswp-soundcloud-enable").val(1);
592
+ $("#sd_soundcloud").show();
593
+ }else{
594
+ $("#saswp-soundcloud-enable").val(0);
595
+ $("#sd_soundcloud").hide();
596
+ }
597
+ break;
598
+ case 'saswp-tumblr-enable-checkbox':
599
+
600
+ if ($(this).is(':checked')) {
601
+ $("#saswp-tumblr-enable").val(1);
602
+ $("#sd_tumblr").show();
603
+ }else{
604
+ $("#saswp-tumblr-enable").val(0);
605
+ $("#sd_tumblr").hide();
606
+ }
607
+ break;
608
+ case 'saswp-for-amp-checkbox':
609
+
610
+ if ($(this).is(':checked')) {
611
+ $("#saswp-for-amp").val(1);
612
+ }else{
613
+ $("#saswp-for-amp").val(0);
614
+ }
615
+ break;
616
+ case 'saswp_kb_contact_1_checkbox':
617
+
618
+ if ($(this).is(':checked')) {
619
+ $("#saswp_kb_contact_1").val(1);
620
+ $("#saswp_kb_telephone, #saswp_contact_type").parent().parent('li').removeClass("saswp-display-none");
621
+ }else{
622
+ $("#saswp_kb_contact_1").val(0);
623
+ $("#saswp_kb_telephone, #saswp_contact_type").parent().parent('li').addClass("saswp-display-none");
624
+ }
625
+ break;
626
+ case 'saswp-logo-dimensions-check':
627
+
628
+ if ($(this).is(':checked')) {
629
+ $("#saswp-logo-dimensions").val(1);
630
+ $("#saswp-logo-width, #saswp-logo-height").parent().parent('li').show();
631
+ }else{
632
+ $("#saswp-logo-dimensions").val(0);
633
+ $("#saswp-logo-width, #saswp-logo-height").parent().parent('li').hide();
634
+ }
635
+ break;
636
+ case 'saswp_archive_schema_checkbox':
637
+
638
+ if ($(this).is(':checked')) {
639
+ $("#saswp_archive_schema").val(1);
640
+ $(".saswp_archive_schema_type_class").parent().parent().show();
641
+ }else{
642
+ $("#saswp_archive_schema").val(0);
643
+ $(".saswp_archive_schema_type_class").parent().parent().hide();
644
+ }
645
+ break;
646
+
647
+ case 'saswp_website_schema_checkbox':
648
+
649
+ if ($(this).is(':checked')) {
650
+ $("#saswp_website_schema").val(1);
651
+ $("#saswp_search_box_schema").parent().parent().show();
652
+ }else{
653
+ $("#saswp_website_schema").val(0);
654
+ $("#saswp_search_box_schema").parent().parent().hide();
655
+ }
656
+ break;
657
+
658
+ case 'saswp_search_box_schema_checkbox':
659
+
660
+ if ($(this).is(':checked')) {
661
+ $("#saswp_search_box_schema").val(1);
662
+ }else{
663
+ $("#saswp_search_box_schema").val(0);
664
+ }
665
+ break;
666
+
667
+ case 'saswp_breadcrumb_schema_checkbox':
668
+
669
+ if ($(this).is(':checked')) {
670
+ $("#saswp_breadcrumb_schema").val(1);
671
+ }else{
672
+ $("#saswp_breadcrumb_schema").val(0);
673
+ }
674
+ break;
675
+
676
+ case 'saswp_comments_schema_checkbox':
677
+
678
+ if ($(this).is(':checked')) {
679
+ $("#saswp_comments_schema").val(1);
680
+ }else{
681
+ $("#saswp_comments_schema").val(0);
682
+ }
683
+ break;
684
+
685
+ case 'saswp-compativility-checkbox':
686
+
687
+ if ($(this).is(':checked')) {
688
+ $("#saswp-flexmlx-compativility").val(1);
689
+ }else{
690
+ $("#saswp-flexmlx-compativility").val(0);
691
+ }
692
+ break;
693
+
694
+ case 'saswp-review-module-checkbox':
695
+
696
+ if ($(this).is(':checked')) {
697
+ $("#saswp-review-module").val(1);
698
+ }else{
699
+ $("#saswp-review-module").val(0);
700
+ }
701
+ break;
702
+
703
+ case 'saswp-kk-star-raring-checkbox':
704
+
705
+ saswp_compatibliy_notes(current, id);
706
+ if ($(this).is(':checked')) {
707
+ $("#saswp-kk-star-raring").val(1);
708
+ }else{
709
+ $("#saswp-kk-star-raring").val(0);
710
+ }
711
+ break;
712
+ case 'saswp-woocommerce-checkbox':
713
+ saswp_compatibliy_notes(current, id);
714
+ if ($(this).is(':checked')) {
715
+ $("#saswp-woocommerce").val(1);
716
+ }else{
717
+ $("#saswp-woocommerce").val(0);
718
+ }
719
+ break;
720
+
721
+ case 'saswp-extra-checkbox':
722
+ saswp_compatibliy_notes(current, id);
723
+ if ($(this).is(':checked')) {
724
+ $("#saswp-extra").val(1);
725
+ }else{
726
+ $("#saswp-extra").val(0);
727
+ }
728
+ break;
729
+
730
+ case 'saswp-dw-question-answer-checkbox':
731
+ saswp_compatibliy_notes(current, id);
732
+ if ($(this).is(':checked')) {
733
+ $("#saswp-dw-question-answer").val(1);
734
+ }else{
735
+ $("#saswp-dw-question-answer").val(0);
736
+ }
737
+ break;
738
+
739
+ case 'saswp-wp-job-manager-checkbox':
740
+ saswp_compatibliy_notes(current, id);
741
+ if ($(this).is(':checked')) {
742
+ $("#saswp-wp-job-manager").val(1);
743
+ }else{
744
+ $("#saswp-wp-job-manager").val(0);
745
+ }
746
+ break;
747
+
748
+ case 'saswp-yoast-checkbox':
749
+ saswp_compatibliy_notes(current, id);
750
+ if ($(this).is(':checked')) {
751
+ $("#saswp-yoast").val(1);
752
+ }else{
753
+ $("#saswp-yoast").val(0);
754
+ }
755
+ break;
756
+
757
+ case 'saswp-rankmath-checkbox':
758
+ saswp_compatibliy_notes(current, id);
759
+ if ($(this).is(':checked')) {
760
+ $("#saswp-rankmath").val(1);
761
+ }else{
762
+ $("#saswp-rankmath").val(0);
763
+ }
764
+ break;
765
+
766
+ case 'saswp-tagyeem-checkbox':
767
+ saswp_compatibliy_notes(current, id);
768
+ if ($(this).is(':checked')) {
769
+ $("#saswp-tagyeem").val(1);
770
+ }else{
771
+ $("#saswp-tagyeem").val(0);
772
+ }
773
+ break;
774
+
775
+ case 'saswp-the-events-calendar-checkbox':
776
+ saswp_compatibliy_notes(current, id);
777
+ if ($(this).is(':checked')) {
778
+ $("#saswp-the-events-calendar").val(1);
779
+ }else{
780
+ $("#saswp-the-events-calendar").val(0);
781
+ }
782
+ break;
783
+
784
+
785
+ case 'saswp-woocommerce-booking-checkbox':
786
+ saswp_compatibliy_notes(current, id);
787
+ if ($(this).is(':checked')) {
788
+ $("#saswp-woocommerce-booking").val(1);
789
+ $("#saswp-woocommerce-booking-main").val(1);
790
+ }else{
791
+ $("#saswp-woocommerce-booking").val(0);
792
+ $("#saswp-woocommerce-booking-main").val(0);
793
+ }
794
+ break;
795
+
796
+ case 'saswp-woocommerce-booking-main-checkbox':
797
+ saswp_compatibliy_notes(current, id);
798
+ if ($(this).is(':checked')) {
799
+ $("#saswp-woocommerce-booking-main").val(1);
800
+ $("#saswp-woocommerce-booking").val(1);
801
+ }else{
802
+ $("#saswp-woocommerce-booking-main").val(0);
803
+ $("#saswp-woocommerce-booking").val(0);
804
+ }
805
+ break;
806
+
807
+ case 'saswp-woocommerce-membership-checkbox':
808
+ saswp_compatibliy_notes(current, id);
809
+ if ($(this).is(':checked')) {
810
+ $("#saswp-woocommerce-membership").val(1);
811
+ }else{
812
+ $("#saswp-woocommerce-membership").val(0);
813
+ }
814
+ break;
815
+
816
+ case 'saswp-defragment-checkbox':
817
+
818
+ if ($(this).is(':checked')) {
819
+ $("#saswp-defragment").val(1);
820
+ }else{
821
+ $("#saswp-defragment").val(0);
822
+ }
823
+ break;
824
+
825
+ case 'saswp-cooked-checkbox':
826
+ saswp_compatibliy_notes(current, id);
827
+ if ($(this).is(':checked')) {
828
+ $("#saswp-cooked").val(1);
829
+ }else{
830
+ $("#saswp-cooked").val(0);
831
+ }
832
+ break;
833
+
834
+ case 'saswp-flexmlx-compativility-checkbox':
835
+ saswp_compatibliy_notes(current, id);
836
+ if ($(this).is(':checked')) {
837
+ $("#saswp-flexmlx-compativility").val(1);
838
+ }else{
839
+ $("#saswp-flexmlx-compativility").val(0);
840
+ }
841
+ break;
842
+
843
+ case 'saswp-shopper-approved-review-checkbox':
844
+ saswp_compatibliy_notes(current, id);
845
+ if ($(this).is(':checked')) {
846
+ $("#saswp-shopper-approved-review").val(1);
847
+ $(".saswp-s-reviews-settings-table").parent().parent().parent().show();
848
+ }else{
849
+ $("#saswp-shopper-approved-review").val(0);
850
+ $(".saswp-s-reviews-settings-table").parent().parent().parent().hide();
851
+ }
852
+ break;
853
+
854
+ case 'saswp-google-review-checkbox':
855
+
856
+ if ($(this).is(':checked')) {
857
+
858
+ $("#saswp-google-review").val(1);
859
+
860
+ if($("#saswp-google-rv-free-checkbox").length){
861
+
862
+ $("#saswp-google-review-free").parent().parent().show();
863
+
864
+ if($("#saswp-google-rv-free-checkbox").is(":checked")){
865
+ $("#saswp_google_place_api_key").parent().parent().show();
866
+ }else{
867
+ $("#saswp_google_place_api_key").parent().parent().hide();
868
+ }
869
+ }else{
870
+ $("#saswp_google_place_api_key").parent().parent().show();
871
+ }
872
+ $(".saswp-g-reviews-settings-table").parent().parent().parent().show();
873
+
874
+ }else{
875
+
876
+ $("#saswp-google-review").val(0);
877
+ $("#saswp_google_place_api_key").parent().parent().hide();
878
+ $(".saswp-g-reviews-settings-table").parent().parent().parent().hide();
879
+
880
+ if($("#saswp-google-rv-free-checkbox").length){
881
+ $("#saswp-google-review-free").parent().parent().hide();
882
+
883
+ }
884
+
885
+
886
+
887
+
888
+
889
+ }
890
+ break;
891
+
892
+ case 'saswp-google-rv-free-checkbox':
893
+
894
+ if($("#saswp-google-review-checkbox").is(":checked")){
895
+ if ($(this).is(':checked')) {
896
+ $("#saswp-google-review-free").val(1);
897
+ $("#saswp_google_place_api_key").parent().parent().show();
898
+ }else{
899
+ $("#saswp-google-review-free").val(0);
900
+ $("#saswp_google_place_api_key").parent().parent().hide();
901
+ }
902
+
903
+ }else{
904
+ $("#saswp-google-review-free").val(0);
905
+ $("#saswp_google_place_api_key").parent().parent().hide();
906
+ }
907
+
908
+
909
+ break;
910
+
911
+
912
+ case 'saswp-markup-footer-checkbox':
913
+
914
+ if ($(this).is(':checked')) {
915
+ $("#saswp-markup-footer").val(1);
916
+ }else{
917
+ $("#saswp-markup-footer").val(0);
918
+ }
919
+ break;
920
+
921
+ case 'saswp-pretty-print-checkbox':
922
+
923
+ if ($(this).is(':checked')) {
924
+ $("#saswp-pretty-print").val(1);
925
+ }else{
926
+ $("#saswp-pretty-print").val(0);
927
+ }
928
+ break;
929
+
930
+ case 'saswp-wppostratings-raring-checkbox':
931
+ saswp_compatibliy_notes(current, id);
932
+ if ($(this).is(':checked')) {
933
+ $("#saswp-wppostratings-raring").val(1);
934
+ }else{
935
+ $("#saswp-wppostratings-raring").val(0);
936
+ }
937
+ break;
938
+
939
+ case 'saswp-bbpress-checkbox':
940
+ saswp_compatibliy_notes(current, id);
941
+ if ($(this).is(':checked')) {
942
+ $("#saswp-bbpress").val(1);
943
+ }else{
944
+ $("#saswp-bbpress").val(0);
945
+ }
946
+ break;
947
+
948
+ case 'saswp-microdata-cleanup-checkbox':
949
+
950
+ if ($(this).is(':checked')) {
951
+ $("#saswp-microdata-cleanup").val(1);
952
+ }else{
953
+ $("#saswp-microdata-cleanup").val(0);
954
+ }
955
+ break;
956
+
957
+
958
+ default:
959
+ break;
960
+ }
961
+
962
+ }).change();
963
+
964
+ $("#saswp_kb_type").change(function(){
965
+
966
+ var datatype = $(this).val();
967
+
968
+ $(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass('saswp_hide');
969
+ $(".saswp_kg_logo").parent().parent().parent().addClass('saswp_hide');
970
+ $("#sd-person-image").parent().parent().parent().addClass('saswp_hide');
971
+
972
+
973
+ if(datatype == 'Organization'){
974
+
975
+ $(".saswp_org_fields").parent().parent().removeClass('saswp_hide');
976
+ $(".saswp_person_fields").parent().parent().addClass('saswp_hide');
977
+ $(".saswp_kg_logo").parent().parent().parent().removeClass('saswp_hide');
978
+ $("#sd-person-image").parent().parent().parent().addClass('saswp_hide');
979
+ }
980
+ if(datatype == 'Person'){
981
+
982
+ $(".saswp_org_fields").parent().parent().addClass('saswp_hide');
983
+ $(".saswp_person_fields").parent().parent().removeClass('saswp_hide');
984
+ $(".saswp_kg_logo").parent().parent().parent().removeClass('saswp_hide');
985
+ $("#sd-person-image").parent().parent().parent().removeClass('saswp_hide');
986
+ }
987
+
988
+ }).change();
989
+
990
+ $(document).on("click", "input[data-id=media]" ,function(e) { // Application Icon upload
991
+ e.preventDefault();
992
+ var current = $(this);
993
+ var button = current;
994
+ var id = button.attr('id').replace('_button', '');
995
+ var saswpMediaUploader = wp.media({
996
+ title: "Application Icon",
997
+ button: {
998
+ text: "Select Icon"
999
+ },
1000
+ multiple: false, // Set this to true to allow multiple files to be selected
1001
+ library:{type : 'image'}
1002
+ })
1003
+ .on("select", function() {
1004
+ var attachment = saswpMediaUploader.state().get('selection').first().toJSON();
1005
+
1006
+ $("#"+id).val(attachment.url);
1007
+ $("input[data-id='"+id+"_id']").val(attachment.id);
1008
+ $("input[data-id='"+id+"_height']").val(attachment.height);
1009
+ $("input[data-id='"+id+"_width']").val(attachment.width);
1010
+ $("input[data-id='"+id+"_thumbnail']").val(attachment.url);
1011
+
1012
+ if(current.attr('id') === 'sd_default_image_button'){
1013
+
1014
+ $("#sd_default_image_width").val(attachment.width);
1015
+ $("#sd_default_image_height").val(attachment.height);
1016
+
1017
+ }
1018
+ var smaller_img_notice = '';
1019
+ if("saswp_image_div_"+id == 'saswp_image_div_sd_default_image' && attachment.height < 1200){
1020
+ smaller_img_notice = '<p class="saswp_warning">Image size is smaller than recommended size</p>';
1021
+ }
1022
+
1023
+ $(".saswp_image_div_"+id).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+attachment.url+'"/><a data-id="'+id+'" href="#" class="saswp_prev_close">X</a></div>'+smaller_img_notice);
1024
+
1025
+ })
1026
+ .open();
1027
+ });
1028
+
1029
+ $(document).on("click", ".saswp_prev_close", function(e){
1030
+ e.preventDefault();
1031
+
1032
+ var id = $(this).attr('data-id');
1033
+ console.log(id);
1034
+ $(this).parent().remove();
1035
+ $("#"+id).val('');
1036
+ $("input[data-id='"+id+"_id']").val('');
1037
+ $("input[data-id='"+id+"_height']").val('');
1038
+ $("input[data-id='"+id+"_width']").val('');
1039
+ $("input[data-id='"+id+"_thumbnail']").val('');
1040
+
1041
+ if(id === 'sd_default_image'){
1042
+
1043
+ $("#sd_default_image_width").val('');
1044
+ $("#sd_default_image_height").val('');
1045
+
1046
+ }
1047
+
1048
+
1049
+ });
1050
+
1051
+ //Settings page jquery ends here
1052
+
1053
+
1054
+ $(document).on("change",".saswp-schema-type-toggle", function(e){
1055
+ var schema_id = $(this).attr("data-schema-id");
1056
+ var post_id = $(this).attr("data-post-id");
1057
+ if($(this).is(':checked')){
1058
+ var status = 1;
1059
+ }else{
1060
+ var status = 0;
1061
+ }
1062
+ $.ajax({
1063
+ type: "POST",
1064
+ url:ajaxurl,
1065
+ dataType: "json",
1066
+ data:{action:"saswp_enable_disable_schema_on_post",status:status, schema_id:schema_id, post_id:post_id, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1067
+ success:function(response){
1068
+ },
1069
+ error: function(response){
1070
+ console.log(response);
1071
+ }
1072
+ });
1073
+
1074
+ });
1075
+
1076
+
1077
+ $(document).on("click",".saswp-reset-data", function(e){
1078
+ e.preventDefault();
1079
+
1080
+ var saswp_confirm = confirm("Are you sure?");
1081
+
1082
+ if(saswp_confirm == true){
1083
+
1084
+ $.ajax({
1085
+ type: "POST",
1086
+ url:ajaxurl,
1087
+ dataType: "json",
1088
+ data:{action:"saswp_reset_all_settings", saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1089
+ success:function(response){
1090
+ setTimeout(function(){ location.reload(); }, 1000);
1091
+ },
1092
+ error: function(response){
1093
+ console.log(response);
1094
+ }
1095
+ });
1096
+
1097
+ }
1098
+
1099
+
1100
+ });
1101
+
1102
+ //Licensing jquery starts here
1103
+ $(document).on("click",".saswp_license_activation", function(e){
1104
+ e.preventDefault();
1105
+ var current = $(this);
1106
+ current.addClass('updating-message');
1107
+ var license_status = $(this).attr('license-status');
1108
+ var add_on = $(this).attr('add-on');
1109
+ var license_key = $("#"+add_on+"_addon_license_key").val();
1110
+
1111
+ if(license_status && add_on && license_key){
1112
+
1113
+ $.ajax({
1114
+ type: "POST",
1115
+ url:ajaxurl,
1116
+ dataType: "json",
1117
+ data:{action:"saswp_license_status_check",license_key:license_key,license_status:license_status, add_on:add_on, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1118
+ success:function(response){
1119
+
1120
+ $("#"+add_on+"_addon_license_key_status").val(response['status']);
1121
+
1122
+ if(response['status'] =='active'){
1123
+ $(".saswp-"+add_on+"-dashicons").addClass('dashicons-yes');
1124
+ $(".saswp-"+add_on+"-dashicons").removeClass('dashicons-no-alt');
1125
+ $(".saswp-"+add_on+"-dashicons").css("color", "green");
1126
+
1127
+ $(".saswp_license_activation[add-on='" + add_on + "']").attr("license-status", "inactive");
1128
+ $(".saswp_license_activation[add-on='" + add_on + "']").text("Deactivate");
1129
+
1130
+ $(".saswp_license_status_msg[add-on='" + add_on + "']").text('Activated');
1131
+
1132
+ $(".saswp_license_status_msg[add-on='" + add_on + "']").css("color", "green");
1133
+ $(".saswp_license_status_msg[add-on='" + add_on + "']").text(response['message']);
1134
+
1135
+ }else{
1136
+
1137
+ $(".saswp-"+add_on+"-dashicons").addClass('dashicons-no-alt');
1138
+ $(".saswp-"+add_on+"-dashicons").removeClass('dashicons-yes');
1139
+ $(".saswp-"+add_on+"-dashicons").css("color", "red");
1140
+
1141
+ $(".saswp_license_activation[add-on='" + add_on + "']").attr("license-status", "active");
1142
+ $(".saswp_license_activation[add-on='" + add_on + "']").text("Activate");
1143
+
1144
+ $(".saswp_license_status_msg[add-on='" + add_on + "']").css("color", "red");
1145
+ $(".saswp_license_status_msg[add-on='" + add_on + "']").text(response['message']);
1146
+ }
1147
+ current.removeClass('updating-message');
1148
+ },
1149
+ error: function(response){
1150
+ console.log(response);
1151
+ }
1152
+ });
1153
+
1154
+ }else{
1155
+ alert('Please enter value license key');
1156
+ current.removeClass('updating-message');
1157
+ }
1158
+
1159
+ });
1160
+ //Licensing jquery ends here
1161
+ //query form send starts here
1162
+
1163
+ $(".saswp-send-query").on("click", function(e){
1164
+ e.preventDefault();
1165
+ var message = $("#saswp_query_message").val();
1166
+ if($.trim(message) !=''){
1167
+ $.ajax({
1168
+ type: "POST",
1169
+ url:ajaxurl,
1170
+ dataType: "json",
1171
+ data:{action:"saswp_send_query_message", message:message, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1172
+ success:function(response){
1173
+ if(response['status'] =='t'){
1174
+ $(".saswp-query-success").show();
1175
+ $(".saswp-query-error").hide();
1176
+ }else{
1177
+ console.log('dd');
1178
+ $(".saswp-query-success").hide();
1179
+ $(".saswp-query-error").show();
1180
+ }
1181
+ },
1182
+ error: function(response){
1183
+ console.log(response);
1184
+ }
1185
+ });
1186
+ }else{
1187
+ alert('Please enter the message');
1188
+ }
1189
+
1190
+ });
1191
+
1192
+ //Importer from schema plugin starts here
1193
+
1194
+ $(".saswp-import-plugins").on("click", function(e){
1195
+ e.preventDefault();
1196
+ var current_selection = $(this);
1197
+ current_selection.addClass('updating-message');
1198
+ var plugin_name = $(this).attr('data-id');
1199
+ $.get(ajaxurl,
1200
+ { action:"saswp_import_plugin_data", plugin_name:plugin_name, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1201
+ function(response){
1202
+ if(response['status'] =='t'){
1203
+ $(current_selection).parent().find(".saswp-imported-message").text(response['message']);
1204
+ $(current_selection).parent().find(".saswp-imported-message").removeClass('saswp-error');
1205
+ setTimeout(function(){ location.reload(); }, 2000);
1206
+ }else{
1207
+ $(current_selection).parent().find(".saswp-imported-message").addClass('saswp-error');
1208
+ $(current_selection).parent().find(".saswp-imported-message").text(response['message']);
1209
+ }
1210
+ current_selection.removeClass('updating-message');
1211
+ },'json');
1212
+ });
1213
+
1214
+
1215
+ $(".saswp-feedback-no-thanks").on("click", function(e){
1216
+ e.preventDefault();
1217
+ $.get(ajaxurl,
1218
+ { action:"saswp_feeback_no_thanks"},
1219
+ function(response){
1220
+ if(response['status'] =='t'){
1221
+ $(".saswp-feedback-notice").hide();
1222
+ }
1223
+ },'json');
1224
+ });
1225
+
1226
+ $(".saswp-feedback-remindme").on("click", function(e){
1227
+ e.preventDefault();
1228
+ $.get(ajaxurl,
1229
+ { action:"saswp_feeback_remindme"},
1230
+ function(response){
1231
+ if(response['status'] =='t'){
1232
+ $(".saswp-feedback-notice").hide();
1233
+ }
1234
+ },'json');
1235
+ });
1236
+
1237
+ $(document).on("change",'.saswp-local-business-type-select', function(e){
1238
+ e.preventDefault();
1239
+ var current = $(this);
1240
+ var business_type = $(this).val();
1241
+ $.get(ajaxurl,
1242
+ { action:"saswp_get_sub_business_ajax", business_type:business_type, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1243
+ function(response){
1244
+
1245
+ if(response['status'] =='t'){
1246
+ $(".saswp-local-business-name-select").parents('tr').remove();
1247
+ var schema_id = current.parents('.saswp-post-specific-wrapper').attr('data-id');
1248
+ var html ='<tr><th><label for="saswp_business_name_'+schema_id+'">Sub Business Type</label></th>';
1249
+ html +='<td><select class="saswp-local-business-name-select" id="saswp_business_name_'+schema_id+'" name="saswp_business_name_'+schema_id+'">';
1250
+ $.each(response['result'], function(index, element){
1251
+ html +='<option value="'+index+'">'+element+'</option>';
1252
+ });
1253
+ html +='</select></td>';
1254
+ html +='</tr>';
1255
+ current.parents('.form-table tr:first').after(html);
1256
+ }else{
1257
+ $(".saswp-local-business-name-select").parents('tr').remove();
1258
+ }
1259
+ },'json');
1260
+ });
1261
+
1262
+
1263
+ function saswp_item_reviewed_call(){
1264
+
1265
+ $(".saswp-item-reviewed").change(function(e){
1266
+ e.preventDefault();
1267
+ var schema_type ="";
1268
+
1269
+ if($('select#schema_type option:selected').val()){
1270
+ schema_type = $('select#schema_type option:selected').val();
1271
+ }
1272
+ if($(".saswp-tab-links.selected").attr('saswp-schema-type')){
1273
+ schema_type = $(".saswp-tab-links.selected").attr('saswp-schema-type');
1274
+ }
1275
+
1276
+ if(schema_type === 'Review'){
1277
+
1278
+ var current = $(this);
1279
+ var item = $(this).val();
1280
+ var post_id = saswp_localize_data.post_id;
1281
+ var schema_id = $(current).attr('data-id');
1282
+ var post_specific = $(current).attr('post-specific');
1283
+ $.get(ajaxurl,
1284
+ { action:"saswp_get_item_reviewed_fields",schema_id:schema_id, post_specific:post_specific ,item:item, post_id:post_id, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1285
+ function(response){
1286
+
1287
+ $(current).parent().parent().nextAll().remove(".saswp-review-tr");
1288
+ $(current).parent().parent().after(response);
1289
+
1290
+ });
1291
+
1292
+ }
1293
+
1294
+
1295
+ }).change();
1296
+
1297
+ }
1298
+ saswp_item_reviewed_call();
1299
+
1300
+ function saswpAddTimepicker(){
1301
+ $('.saswp-local-schema-time-picker').timepicker({ 'timeFormat': 'H:i:s'});
1302
+ }
1303
+ $('.saswp-local-schema-time-picker').timepicker({ 'timeFormat': 'H:i:s'});
1304
+
1305
+ $(document).on("click",".saswp-add-custom-schema", function(e){
1306
+
1307
+ e.preventDefault();
1308
+
1309
+ $(".saswp-add-custom-schema-field").removeClass('saswp_hide');
1310
+ $(this).hide();
1311
+
1312
+ });
1313
+
1314
+ $(document).on("click", ".saswp-delete-custom-schema", function(e){
1315
+
1316
+ e.preventDefault();
1317
+
1318
+ $("#saswp_custom_schema_field").val('');
1319
+ $(".saswp-add-custom-schema-field").addClass('saswp_hide');
1320
+ $(".saswp-add-custom-schema").show();
1321
+
1322
+ });
1323
+
1324
+ $(".saswp-modify_schema_post_enable").on("click", function(e){
1325
+ var current = $(this);
1326
+ current.addClass('updating-message');
1327
+ e.preventDefault();
1328
+ $.get(ajaxurl,
1329
+ { action:"saswp_modify_schema_post_enable", post_id: saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1330
+ function(response){
1331
+ current.remove();
1332
+ $(".saswp-add-custom-schema-div").remove();
1333
+ $("#post_specific .inside").append(response);
1334
+ current.removeClass('updating-message');
1335
+ saswpAddTimepicker();
1336
+ saswp_schema_datepicker();
1337
+ saswp_enable_rating_review();
1338
+ saswp_item_reviewed_call();
1339
+ });
1340
+
1341
+ });
1342
+ saswp_schema_datepicker();
1343
+
1344
+ saswp_reviews_datepicker();
1345
+ function saswp_reviews_datepicker(){
1346
+
1347
+ $('.saswp-reviews-datepicker-picker').datepicker({
1348
+ dateFormat: "yy-mm-dd"
1349
+ });
1350
+ }
1351
+
1352
+ //Review js starts here
1353
+
1354
+ $(document).on("click", ".saswp-add-more-item",function(e){
1355
+ e.preventDefault();
1356
+ var rows = $('.saswp-review-item-list-table tr').length;
1357
+ console.log(rows);
1358
+ var html = '<tr class="saswp-review-item-tr">';
1359
+ html += '<td>Review Item Feature</td>';
1360
+ html += '<td><input type="text" name="saswp-review-item-feature[]"></td>';
1361
+ html += '<td>Rating</td>';
1362
+ html += '<td><input step="0.1" min="0" max="5" type="number" name="saswp-review-item-star-rating[]"></td>';
1363
+ html += '<td><a type="button" class="saswp-remove-review-item button">x</a></td>';
1364
+ html += '</tr>';
1365
+ $(".saswp-review-item-list-table").append(html);
1366
+
1367
+ });
1368
+
1369
+ $(document).on("click", ".saswp-remove-review-item", function(e){
1370
+ e.preventDefault();
1371
+ $(this).parent().parent('tr').remove();
1372
+ });
1373
+
1374
+ $(document).on("focusout", ".saswp-review-item-tr input[type=number]", function(e){
1375
+ e.preventDefault();
1376
+ var total_rating = 0;
1377
+ var element_count = $(".saswp-review-item-tr input[type=number]").length;
1378
+ $(".saswp-review-item-tr input[type=number]").each(function(index, element){
1379
+ if($(element).val() ==''){
1380
+ total_rating += parseFloat(0);
1381
+ }else{
1382
+ total_rating += parseFloat($(element).val());
1383
+ }
1384
+
1385
+ });
1386
+ var over_all_rating = total_rating / element_count;
1387
+ $("#saswp-review-item-over-all").val(over_all_rating);
1388
+ });
1389
+
1390
+ $("#saswp-review-location").change(function(){
1391
+ var location = $(this).val();
1392
+ $(".saswp-review-shortcode").addClass('saswp_hide');
1393
+ if(location == 3){
1394
+ $(".saswp-review-shortcode").removeClass('saswp_hide');
1395
+ }
1396
+ }).change();
1397
+
1398
+ $("#saswp-review-item-enable").change(function(){
1399
+ if ($(this).is(':checked')) {
1400
+ $(".saswp-review-fields").show();
1401
+ }else{
1402
+ $(".saswp-review-fields").hide();
1403
+ }
1404
+ }).change();
1405
+
1406
+ $(document).on("click", ".saswp-restore-post-schema", function(e){
1407
+ e.preventDefault();
1408
+ var current = $(this);
1409
+ current.addClass('updating-message');
1410
+
1411
+ if($(".saswp-post-specific-schema-ids").val()){
1412
+ var schema_ids = JSON.parse($(".saswp-post-specific-schema-ids").val());
1413
+ }
1414
+
1415
+ $.post(ajaxurl,
1416
+ { action:"saswp_restore_schema", schema_ids:schema_ids,post_id: saswp_localize_data.post_id, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1417
+ function(response){
1418
+ if(response['status'] =='t'){
1419
+ setTimeout(function(){ location.reload(); }, 1000);
1420
+ }else{
1421
+ alert(response['msg']);
1422
+ setTimeout(function(){ location.reload(); }, 1000);
1423
+ }
1424
+ current.removeClass('updating-message');
1425
+ },'json');
1426
+ });
1427
+
1428
+ //Review js ends here
1429
+
1430
+ $(document).on("click","div.saswp-tab ul.saswp-tab-nav a", function(e){
1431
+ e.preventDefault();
1432
+ var attr = $(this).attr('data-id');
1433
+ $(".saswp-post-specific-wrapper").hide();
1434
+ $("#"+attr).show();
1435
+ $('div.saswp-tab ul.saswp-tab-nav a').removeClass('selected');
1436
+ $('div.saswp-tab ul.saswp-tab-nav li').removeClass('selected');
1437
+ $(this).addClass('selected');
1438
+ $(this).parent().addClass('selected');
1439
+ saswp_enable_rating_review();
1440
+ });
1441
+
1442
+
1443
+ $('#saswp-global-tabs a:first').addClass('saswp-global-selected');
1444
+ $('.saswp-global-container').hide();
1445
+
1446
+ var hash = window.location.hash;
1447
+
1448
+ if(hash == '#saswp-default-container'){
1449
+ $('.saswp-global-container:eq(2)').show();
1450
+ }else{
1451
+ $('.saswp-global-container:first').show();
1452
+ }
1453
+
1454
+
1455
+
1456
+ $('#saswp-global-tabs a').click(function(){
1457
+ var t = $(this).attr('data-id');
1458
+
1459
+ if(!$(this).hasClass('saswp-global-selected')){
1460
+ $('#saswp-global-tabs a').removeClass('saswp-global-selected');
1461
+ $(this).addClass('saswp-global-selected');
1462
+
1463
+ $('.saswp-global-container').hide();
1464
+ $('#'+t).show();
1465
+ }
1466
+ });
1467
+
1468
+
1469
+ $('#saswp-tools-tabs a:first').addClass('saswp-global-selected');
1470
+ $('.saswp-tools-container').hide();
1471
+ $('.saswp-tools-container:first').show();
1472
+
1473
+ $('#saswp-tools-tabs a').click(function(){
1474
+ var t = $(this).attr('data-id');
1475
+
1476
+ if(!$(this).hasClass('saswp-global-selected')){
1477
+ $('#saswp-tools-tabs a').removeClass('saswp-global-selected');
1478
+ $(this).addClass('saswp-global-selected');
1479
+
1480
+ $('.saswp-tools-container').hide();
1481
+ $('#'+t).show();
1482
+ }
1483
+ });
1484
+
1485
+
1486
+ $('#saswp-review-tabs a:first').addClass('saswp-global-selected');
1487
+ $('.saswp-review-container').hide();
1488
+ $('.saswp-review-container:first').show();
1489
+
1490
+ $('#saswp-review-tabs a').click(function(){
1491
+ var t = $(this).attr('data-id');
1492
+
1493
+ if(!$(this).hasClass('saswp-global-selected')){
1494
+ $('#saswp-review-tabs a').removeClass('saswp-global-selected');
1495
+ $(this).addClass('saswp-global-selected');
1496
+
1497
+ $('.saswp-review-container').hide();
1498
+ $('#'+t).show();
1499
+ }
1500
+ });
1501
+
1502
+
1503
+ //Importer from schema plugin ends here
1504
+
1505
+ //custom fields modify schema starts here
1506
+
1507
+ //Changing the url of add new schema type
1508
+ $('a[href="'+saswp_localize_data.new_url_selector+'"]').attr( 'href', saswp_localize_data.new_url_href);
1509
+
1510
+
1511
+ $("#saswp_enable_custom_field").change(function(){
1512
+ if ($(this).is(':checked')) {
1513
+ $(".saswp-custom-fields-div").show();
1514
+ }else{
1515
+ $(".saswp-custom-fields-div").hide();
1516
+ }
1517
+ });
1518
+
1519
+ $(document).on('change','.saswp-custom-fields-name',function(){
1520
+
1521
+ var type = 'text';
1522
+ var tr = $(this).parent().parent('tr');
1523
+ var fields_name = $(this).val();
1524
+ var str2 = "image";
1525
+ if(fields_name.indexOf(str2) != -1){
1526
+ type = 'image';
1527
+ }
1528
+ var id = $(this).parent().parent('tr').find("td:eq(1)");
1529
+ saswp_get_meta_list(type, null, id, fields_name, tr);
1530
+
1531
+ });
1532
+
1533
+ $(document).on("click", '.saswp-skip-button', function(e){
1534
+ e.preventDefault();
1535
+ $(this).parent().parent().hide();
1536
+
1537
+ $.post(ajaxurl,
1538
+ { action:"saswp_skip_wizard", saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1539
+ function(response){
1540
+
1541
+ },'json');
1542
+
1543
+ });
1544
+
1545
+ $(document).on("click", ".saswp_add_schema_fields_on_fly", function(e){
1546
+ e.preventDefault();
1547
+
1548
+ var schema_id = $(this).attr('data-id');
1549
+ var fields_type = $(this).attr('fields_type');
1550
+ var div_type = $(this).attr('div_type');
1551
+
1552
+ var count = $(".saswp-"+div_type+"-table-div").length;
1553
+ var index = $( ".saswp-"+div_type+"-table-div:nth-child("+count+")" ).attr('data-id');
1554
+ index = ++index;
1555
+
1556
+ if(!index){
1557
+ index = 0;
1558
+ }
1559
+
1560
+ saswp_get_post_specific_schema_fields(index, fields_type, div_type, schema_id, fields_type+'_');
1561
+
1562
+ });
1563
+
1564
+ $(document).on("click", ".saswp-table-close", function(){
1565
+ $(this).parent().remove();
1566
+ });
1567
+
1568
+ //How to schema js ends here
1569
+
1570
+ $(document).on("click", ".saswp-rmv-modify_row", function(e){
1571
+ e.preventDefault();
1572
+ $(this).parent().parent().remove();
1573
+ });
1574
+
1575
+ $(document).on("change",".saswp-custom-meta-list", function(){
1576
+
1577
+ var meta_val = $(this).val();
1578
+ var field_name = $(this).parent().parent('tr').find(".saswp-custom-fields-name").val();
1579
+ var html = '';
1580
+ if(meta_val == 'manual_text'){
1581
+ html += '<td><input type="text" name="saswp_fixed_text['+field_name+']"></td>';
1582
+ html += '<td><a class="button button-default saswp-rmv-modify_row">X</a></td>';
1583
+
1584
+ }else if(meta_val == 'custom_field'){
1585
+ html += '<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+field_name+']">';
1586
+ html += '</select></td>';
1587
+ html += '<td><a class="button button-default saswp-rmv-modify_row">X</a></td>';
1588
+ }else{
1589
+ html += '<td></td>';
1590
+ html += '<td><a class="button button-default saswp-rmv-modify_row">X</a></td>';
1591
+ }
1592
+
1593
+ $(this).parent().parent('tr').find("td:gt(1)").remove();
1594
+ $(this).parent().parent('tr').append(html);
1595
+ saswpCustomSelect2();
1596
+
1597
+ });
1598
+
1599
+ $(document).on("click", '.saswp-add-custom-fields', function(){
1600
+ var schema_type = $('select#schema_type option:selected').val();
1601
+ var post_id = $('#post_ID').val();
1602
+ if(schema_type !=''){
1603
+
1604
+ if(!saswp_meta_list_fields[schema_type]){
1605
+
1606
+ $.ajax({
1607
+ type: "POST",
1608
+ url:ajaxurl,
1609
+ dataType: "json",
1610
+ data:{action:"saswp_get_schema_type_fields",post_id:post_id, schema_type:schema_type, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1611
+ success:function(response){
1612
+
1613
+ saswp_meta_list_fields[schema_type] = response;
1614
+ saswp_get_meta_list('text', saswp_meta_list_fields[schema_type], null, null, null);
1615
+
1616
+ },
1617
+ error: function(response){
1618
+ console.log(response);
1619
+ }
1620
+ });
1621
+
1622
+
1623
+ }else{
1624
+
1625
+ saswp_get_meta_list('text', saswp_meta_list_fields[schema_type], null, null, null);
1626
+
1627
+ }
1628
+
1629
+ }
1630
+ });
1631
+ saswpCustomSelect2();
1632
+ function saswpCustomSelect2(){
1633
+ if((saswp_localize_data.post_type == 'saswp' || saswp_localize_data.page_now =='saswp') && saswp_localize_data.page_now !='saswp_page_structured_data_options'){
1634
+
1635
+ $('.saswp-custom-fields-select2').select2({
1636
+ ajax: {
1637
+ type: "POST",
1638
+ url: ajaxurl, // AJAX URL is predefined in WordPress admin
1639
+ dataType: 'json',
1640
+ delay: 250, // delay in ms while typing when to perform a AJAX search
1641
+ data: function (params) {
1642
+ return {
1643
+ saswp_security_nonce: saswp_localize_data.saswp_security_nonce,
1644
+ q: params.term, // search query
1645
+ action: 'saswp_get_custom_meta_fields' // AJAX action for admin-ajax.php
1646
+ };
1647
+ },
1648
+ processResults: function( data ) {
1649
+ return {
1650
+ results: data
1651
+ };
1652
+ },
1653
+ cache: true
1654
+ },
1655
+ minimumInputLength: 2 // the minimum of symbols to input before perform a search
1656
+ });
1657
+
1658
+ }
1659
+
1660
+ }
1661
+
1662
+ function saswp_enable_rating_review(){
1663
+ var schema_type ="";
1664
+ if($('select#schema_type option:selected').val()){
1665
+ schema_type = $('select#schema_type option:selected').val();
1666
+ }
1667
+ if($(".saswp-tab-links.selected").attr('saswp-schema-type')){
1668
+ schema_type = $(".saswp-tab-links.selected").attr('saswp-schema-type');
1669
+ }
1670
+
1671
+ if(schema_type){
1672
+ $(".saswp-enable-rating-review-"+schema_type.toLowerCase()).change(function(){
1673
+
1674
+ if($(this).is(':checked')){
1675
+ $(this).parent().parent().siblings('.saswp-rating-review-'+schema_type.toLowerCase()).show();
1676
+ }else{
1677
+ $(this).parent().parent().siblings('.saswp-rating-review-'+schema_type.toLowerCase()).hide();
1678
+ }
1679
+
1680
+ }).change();
1681
+ }
1682
+
1683
+ }
1684
+ saswp_enable_rating_review();
1685
+
1686
+ //custom fields modify schema ends here
1687
+
1688
+
1689
+ //Google review js starts here
1690
+
1691
+ $('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr( 'href', saswp_localize_data.collection_post_add_new_url);
1692
+
1693
+
1694
+
1695
+ $(document).on("click", '.saswp_coonect_google_place', function(){
1696
+
1697
+ var place_id = $("#saswp_google_place_id").val();
1698
+ var language = $("#saswp_language_list").val();
1699
+ var google_api = $("#saswp_googel_api").val();
1700
+
1701
+ if(place_id !=''){
1702
+ $.ajax({
1703
+ type: "POST",
1704
+ url:ajaxurl,
1705
+ dataType: "json",
1706
+ data:{action:"saswp_connect_google_place",place_id:place_id, language:language, google_api:google_api, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1707
+ success:function(response){
1708
+ console.log(response['status']);
1709
+ },
1710
+ error: function(response){
1711
+ console.log(response);
1712
+ }
1713
+ });
1714
+ }
1715
+ });
1716
+
1717
+ //google review js ends here
1718
+
1719
+ //Adding settings button beside add schema type button on schema type list page
1720
+
1721
+ if ('saswp' == saswp_localize_data.post_type && saswp_localize_data.page_now == 'edit.php') {
1722
+
1723
+ jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>");
1724
+
1725
+ }
1726
+
1727
+ //star rating stars here
1728
+ if(typeof(saswp_reviews_data) !== 'undefined'){
1729
+
1730
+ $(".saswp-rating-div").rateYo({
1731
+
1732
+ rating: saswp_reviews_data.rating_val,
1733
+ halfStar: true,
1734
+ //normalFill: "#ffd700",
1735
+ readOnly: saswp_reviews_data.readonly,
1736
+ onSet: function (rating, rateYoInstance) {
1737
+ $(this).next().val(rating);
1738
+ console.log(rating);
1739
+ }
1740
+
1741
+ });
1742
+
1743
+ }
1744
+ $(document).on("click", ".saswp-add-g-location-btn", function(e){
1745
+
1746
+ var blocks_field = '';
1747
+
1748
+ if($("#saswp_google_place_api_key").length){
1749
+
1750
+ blocks_field = '<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="5" step="5" placeholder="5" disabled="disabled">';
1751
+ }else{
1752
+ blocks_field = '<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="10" step="10" placeholder="10">';
1753
+ }
1754
+
1755
+ e.preventDefault();
1756
+ var html = '';
1757
+ html += '<tr>'
1758
+ + '<td style="width:12%;"><strong>Place Id</strong></td>'
1759
+ + '<td style="width:20%;"><input class="saswp-g-location-field" name="sd_data[saswp_reviews_location_name][]" type="text" value=""></td>'
1760
+ + '<td style="width:10%;"><strong>Reviews</strong></td>'
1761
+ + '<td style="width:10%;">'+blocks_field+'</td>'
1762
+ + '<td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">Fetch</a></td>'
1763
+ + '<td style="width:10%;"><a type="button" class="saswp-remove-review-item button">x</a></td>'
1764
+ + '<td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td>'
1765
+ + '</tr>';
1766
+ if(html){
1767
+ $(".saswp-g-reviews-settings-table").append(html);
1768
+ }
1769
+
1770
+ });
1771
+
1772
+ function saswp_fetch_s_approved_reviews(current){
1773
+
1774
+ current.addClass('updating-message');
1775
+ $.get(ajaxurl,
1776
+ { action:"saswp_fetch_s_approved_reviews", saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1777
+ function(response){
1778
+ current.removeClass('updating-message');
1779
+ console.log(response);
1780
+ if(response['status']){
1781
+ current.parent().parent().find('.saswp-rv-fetched-msg').text(response['message']);
1782
+ current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "green");
1783
+ }else{
1784
+ current.parent().parent().find('.saswp-rv-fetched-msg').text(response['message']);
1785
+ current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "#988f1b");
1786
+ }
1787
+
1788
+ },'json');
1789
+
1790
+ }
1791
+
1792
+ function saswp_add_s_approved_reviews(current, site_id, token, limit, api_key, page, loop_run){
1793
+ current.addClass('updating-message');
1794
+ $.get(ajaxurl,
1795
+ { action:"saswp_add_s_approved_reviews",site_id:site_id,token:token,limit:limit,api_key:api_key,page:page, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1796
+ function(response){
1797
+ current.removeClass('updating-message');
1798
+ console.log(response);
1799
+ if(response['status']){
1800
+ current.parent().parent().find('.saswp-rv-fetched-msg').text(response['message']);
1801
+ current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "green");
1802
+ }else{
1803
+ current.parent().parent().find('.saswp-rv-fetched-msg').text(response['message']);
1804
+ current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "#988f1b");
1805
+ }
1806
+ page++;
1807
+ if(page <loop_run){
1808
+ saswp_add_s_approved_reviews(current, site_id, token, limit, api_key, page);
1809
+ }else{
1810
+ saswp_fetch_s_approved_reviews(current);
1811
+ }
1812
+ },'json');
1813
+
1814
+ }
1815
+
1816
+ $(document).on("click",".saswp-fetch-s-approved-reviews", function(e){
1817
+
1818
+ e.preventDefault();
1819
+ var current = $(this);
1820
+ current.addClass('updating-message');
1821
+ var site_id = $("#saswp_s_approved_site_id").val();
1822
+ var token = $("#saswp_s_approved_token").val();
1823
+ var limit = $("#saswp_s_approved_reviews").val();
1824
+ var api_key = $("#reviews_addon_license_key").val();
1825
+ var loop_run = 1;
1826
+ var page = 0;
1827
+
1828
+ if(limit > 100){
1829
+ var div_limit = limit/100;
1830
+ var div_remainder = limit%100;
1831
+ loop_run = div_limit;
1832
+
1833
+ if(div_remainder){
1834
+ loop_run++;
1835
+ }
1836
+
1837
+ }
1838
+
1839
+ if(site_id && token && api_key){
1840
+
1841
+ saswp_add_s_approved_reviews(current, site_id, token, limit, api_key, page, loop_run);
1842
+
1843
+ }else{
1844
+ current.removeClass('updating-message');
1845
+ alert('Fill the site id and token with valid api key');
1846
+ }
1847
+
1848
+ });
1849
+
1850
+
1851
+ $(document).on("click", '.saswp-fetch-g-reviews', function(){
1852
+
1853
+ var current = $(this);
1854
+ var premium_status = 'free';
1855
+ current.addClass('updating-message');
1856
+
1857
+ var location = $(this).parent().parent().find('.saswp-g-location-field').val();
1858
+ var blocks = $(this).parent().parent().find('.saswp-g-blocks-field').val();
1859
+ var g_api = $("#saswp_google_place_api_key").val();
1860
+ var reviews_api = $("#reviews_addon_license_key").val();
1861
+ var reviews_api_status = $("#reviews_addon_license_key_status").val();
1862
+
1863
+ if($("#saswp_google_place_api_key").length){
1864
+ premium_status = 'free';
1865
+ }else{
1866
+ premium_status = 'premium';
1867
+ }
1868
+
1869
+ if(premium_status == 'premium'){
1870
+
1871
+ if(blocks > 0){
1872
+
1873
+ var blocks_remainder = blocks % 10;
1874
+
1875
+ if(blocks_remainder != 0){
1876
+
1877
+ current.parent().parent().find('.saswp-rv-fetched-msg').text('Reviews count should be in step of 10');
1878
+ current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "#988f1b");
1879
+ current.removeClass('updating-message');
1880
+ return false;
1881
+
1882
+ }
1883
+
1884
+ }else{
1885
+ alert('Blocks value is zero');
1886
+ current.removeClass('updating-message');
1887
+ return false;
1888
+ }
1889
+
1890
+ }
1891
+
1892
+ if(location !='' && (reviews_api || g_api)){
1893
+ $.ajax({
1894
+ type: "POST",
1895
+ url:ajaxurl,
1896
+ dataType: "json",
1897
+ data:{action:"saswp_fetch_google_reviews",reviews_api_status:reviews_api_status, reviews_api:reviews_api,location:location,blocks:blocks,g_api:g_api,premium_status:premium_status, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1898
+ success:function(response){
1899
+ if(response['status'] =='t'){
1900
+ current.parent().parent().find('.saswp-rv-fetched-msg').text('Success');
1901
+ current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "green");
1902
+ }else{
1903
+ current.parent().parent().find('.saswp-rv-fetched-msg').text(response['message']);
1904
+ current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "#988f1b");
1905
+ }
1906
+ current.removeClass('updating-message');
1907
+ },
1908
+ error: function(response){
1909
+ console.log(response);
1910
+ }
1911
+ });
1912
+ }else{
1913
+ if(location ==''){
1914
+ alert('Please enter place id');
1915
+ }
1916
+ if(g_api ==''){
1917
+ alert('Please enter api key');
1918
+ }
1919
+ if(reviews_api ==''){
1920
+ alert('Please enter reviews api key');
1921
+ }
1922
+ current.removeClass('updating-message');
1923
+ }
1924
+ });
1925
+
1926
+ //rating ends here
1927
+
1928
+ $("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){
1929
+ var current = $(this);
1930
+
1931
+ current.parent().find('.saswp-phone-validation').remove();
1932
+
1933
+ var pnumber = $(this).val();
1934
+ var p_regex = /^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/;
1935
+
1936
+ if(!p_regex.test(pnumber)){
1937
+ current.after('<span style="color:red;" class="saswp-phone-validation">Invalid Phone Number</span>');
1938
+ }else{
1939
+ current.parent().find('.saswp-phone-validation').remove();
1940
+ }
1941
+
1942
+ });
1943
+
1944
+ });
admin_section/settings.php CHANGED
@@ -27,9 +27,7 @@ function saswp_plugin_action_links( $links ) {
27
 
28
  }
29
 
30
- function saswp_add_menu_links() {
31
- // Settings page - Same as main menu page
32
- add_submenu_page( 'edit.php?post_type=saswp', esc_html__( 'Schema & Structured Data For Wp', 'schema-and-structured-data-for-wp' ), esc_html__( 'Settings', 'schema-and-structured-data-for-wp' ), 'manage_options', 'structured_data_options', 'saswp_admin_interface_render' );
33
 
34
  $mappings_file = SASWP_DIR_NAME . '/core/array-list/pro_extensions.php';
35
 
@@ -40,6 +38,7 @@ function saswp_add_menu_links() {
40
  }
41
 
42
  $check_active_ext = false;
 
43
  if(!empty($pro_ext)){
44
 
45
  foreach($pro_ext as $ext){
@@ -54,7 +53,15 @@ function saswp_add_menu_links() {
54
 
55
  }
56
 
57
- if(!$check_active_ext){
 
 
 
 
 
 
 
 
58
  add_submenu_page( 'edit.php?post_type=saswp', esc_html__( 'Schema & Structured Data For Wp', 'schema-and-structured-data-for-wp' ), '<span style="color:#fff176;">'.esc_html__( 'Upgrade To Premium', 'schema-and-structured-data-for-wp' ).'</span>', 'manage_options', 'structured_data_premium', 'saswp_premium_interface_render' );
59
  }
60
 
@@ -232,6 +239,9 @@ function saswp_admin_interface_render(){
232
  <p style="float: left;"><?php echo esc_html__('Need Help?','schema-and-structured-data-for-wp') ?></p> <a style="float: right;" class="button button-default" target="_blank" href="http://structured-data-for-wp.com/docs/"><?php echo esc_html__('View Documentation','schema-and-structured-data-for-wp') ?></a>
233
 
234
  </div>
 
 
 
235
  <div class="saswp-upgrade-pro">
236
  <h2><?php echo esc_html__('Upgrade to Pro!','schema-and-structured-data-for-wp') ?></h2>
237
  <ul>
@@ -240,7 +250,9 @@ function saswp_admin_interface_render(){
240
  <li><?php echo esc_html__('Active Development','schema-and-structured-data-for-wp') ?></li>
241
  </ul>
242
  <a target="_blank" href="http://structured-data-for-wp.com/pricing/"><?php echo esc_html__('UPGRADE','schema-and-structured-data-for-wp') ?></a>
243
- </div>
 
 
244
  </div>
245
  </div>
246
 
@@ -596,7 +608,7 @@ function saswp_general_page_callback(){
596
  'type' => 'select',
597
  'options' => array(
598
  'Article' => 'Article',
599
- 'Blogposting' => 'Blogposting',
600
  'NewsArticle' => 'NewsArticle',
601
  'WebPage' => 'WebPage'
602
  )
@@ -727,6 +739,28 @@ function saswp_general_page_callback(){
727
  'Person' => 'Person',
728
  )
729
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
730
  array(
731
  'label' => 'Organization Name',
732
  'id' => 'sd_name',
27
 
28
  }
29
 
30
+ function saswp_ext_installed_status(){
 
 
31
 
32
  $mappings_file = SASWP_DIR_NAME . '/core/array-list/pro_extensions.php';
33
 
38
  }
39
 
40
  $check_active_ext = false;
41
+
42
  if(!empty($pro_ext)){
43
 
44
  foreach($pro_ext as $ext){
53
 
54
  }
55
 
56
+ return $check_active_ext;
57
+
58
+ }
59
+
60
+ function saswp_add_menu_links() {
61
+ // Settings page - Same as main menu page
62
+ add_submenu_page( 'edit.php?post_type=saswp', esc_html__( 'Schema & Structured Data For Wp', 'schema-and-structured-data-for-wp' ), esc_html__( 'Settings', 'schema-and-structured-data-for-wp' ), 'manage_options', 'structured_data_options', 'saswp_admin_interface_render' );
63
+
64
+ if(!saswp_ext_installed_status()){
65
  add_submenu_page( 'edit.php?post_type=saswp', esc_html__( 'Schema & Structured Data For Wp', 'schema-and-structured-data-for-wp' ), '<span style="color:#fff176;">'.esc_html__( 'Upgrade To Premium', 'schema-and-structured-data-for-wp' ).'</span>', 'manage_options', 'structured_data_premium', 'saswp_premium_interface_render' );
66
  }
67
 
239
  <p style="float: left;"><?php echo esc_html__('Need Help?','schema-and-structured-data-for-wp') ?></p> <a style="float: right;" class="button button-default" target="_blank" href="http://structured-data-for-wp.com/docs/"><?php echo esc_html__('View Documentation','schema-and-structured-data-for-wp') ?></a>
240
 
241
  </div>
242
+
243
+ <?php if(!saswp_ext_installed_status()) { ?>
244
+
245
  <div class="saswp-upgrade-pro">
246
  <h2><?php echo esc_html__('Upgrade to Pro!','schema-and-structured-data-for-wp') ?></h2>
247
  <ul>
250
  <li><?php echo esc_html__('Active Development','schema-and-structured-data-for-wp') ?></li>
251
  </ul>
252
  <a target="_blank" href="http://structured-data-for-wp.com/pricing/"><?php echo esc_html__('UPGRADE','schema-and-structured-data-for-wp') ?></a>
253
+ </div>
254
+
255
+ <?php } ?>
256
  </div>
257
  </div>
258
 
608
  'type' => 'select',
609
  'options' => array(
610
  'Article' => 'Article',
611
+ 'BlogPosting' => 'BlogPosting',
612
  'NewsArticle' => 'NewsArticle',
613
  'WebPage' => 'WebPage'
614
  )
739
  'Person' => 'Person',
740
  )
741
  ),
742
+ array(
743
+ 'label' => 'Organization Type',
744
+ 'id' => 'saswp_organization_type',
745
+ 'name' => 'sd_data[saswp_organization_type]',
746
+ 'class' => 'saswp_org_fields',
747
+ 'type' => 'select',
748
+ 'options' => array(
749
+ '' => 'Select (Optional)',
750
+ 'Airline' => 'Airline',
751
+ 'Consortium' => 'Consortium',
752
+ 'Corporation' => 'Corporation',
753
+ 'EducationalOrganization' => 'EducationalOrganization',
754
+ 'GovernmentOrganization' => 'GovernmentOrganization',
755
+ 'LibrarySystem' => 'LibrarySystem',
756
+ 'MedicalOrganization' => 'MedicalOrganization',
757
+ 'NewsMediaOrganization' => 'NewsMediaOrganization',
758
+ 'NGO' => 'NGO',
759
+ 'PerformingGroup' => 'PerformingGroup',
760
+ 'SportsOrganization' => 'SportsOrganization',
761
+ 'WorkersUnion' => 'WorkersUnion',
762
+ )
763
+ ),
764
  array(
765
  'label' => 'Organization Name',
766
  'id' => 'sd_name',
admin_section/structure_admin.php CHANGED
@@ -1097,7 +1097,7 @@ function saswp_custom_breadcrumbs() {
1097
 
1098
  foreach ( $anc as $ancestor ) {
1099
 
1100
- $parents .= '<li class="item-parent item-parent-' . esc_attr($ancestor) . '"><a class="bread-parent bread-parent-' . esc_attr($ancestor) . '" href="' . esc_url(get_permalink($ancestor)) . '" title="' . esc_attr(get_the_title($ancestor)) . '">' . esc_html__(get_the_title($ancestor), 'schema-and-structured-data-for-wp' ) . '</a></li>';
1101
  $parents .= '<li class="separator separator-' . esc_attr($ancestor) . '"> ' . esc_html__($separator, 'schema-and-structured-data-for-wp' ) . ' </li>';
1102
  $variables1_titles[] = @get_the_title($ancestor);
1103
  $variables2_links[] = get_permalink($ancestor);
1097
 
1098
  foreach ( $anc as $ancestor ) {
1099
 
1100
+ $parents .= '<li class="item-parent item-parent-' . esc_attr($ancestor) . '"><a class="bread-parent bread-parent-' . esc_attr($ancestor) . '" href="' . esc_url(get_permalink($ancestor)) . '" title="' . esc_attr(@get_the_title($ancestor)) . '">' . esc_html__(@get_the_title($ancestor), 'schema-and-structured-data-for-wp' ) . '</a></li>';
1101
  $parents .= '<li class="separator separator-' . esc_attr($ancestor) . '"> ' . esc_html__($separator, 'schema-and-structured-data-for-wp' ) . ' </li>';
1102
  $variables1_titles[] = @get_the_title($ancestor);
1103
  $variables2_links[] = get_permalink($ancestor);
core/3rd-party/aqua_resizer.php ADDED
@@ -0,0 +1,247 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Title : Aqua Resizer
5
+ * Description : Resizes WordPress images on the fly
6
+ * Version : 1.2.2
7
+ * Author : Syamil MJ
8
+ * Author URI : http://aquagraphite.com
9
+ * License : WTFPL - http://sam.zoy.org/wtfpl/
10
+ * Documentation : https://github.com/sy4mil/Aqua-Resizer/
11
+ *
12
+ * @param string $url - (required) must be uploaded using wp media uploader
13
+ * @param int $width - (required)
14
+ * @param int $height - (optional)
15
+ * @param bool $crop - (optional) default to soft crop
16
+ * @param bool $single - (optional) returns an array if false
17
+ * @param bool $upscale - (optional) resizes smaller images
18
+ * @uses wp_upload_dir()
19
+ * @uses image_resize_dimensions()
20
+ * @uses wp_get_image_editor()
21
+ *
22
+ * @return str|array
23
+ */
24
+
25
+ if(!class_exists('Aq_Resize')) {
26
+ class Aq_Exception extends Exception {}
27
+
28
+ class Aq_Resize
29
+ {
30
+ /**
31
+ * The singleton instance
32
+ */
33
+ static private $instance = null;
34
+
35
+ /**
36
+ * Should an Aq_Exception be thrown on error?
37
+ * If false (default), then the error will just be logged.
38
+ */
39
+ public $throwOnError = false;
40
+
41
+ /**
42
+ * No initialization allowed
43
+ */
44
+ private function __construct() {}
45
+
46
+ /**
47
+ * No cloning allowed
48
+ */
49
+ private function __clone() {}
50
+
51
+ /**
52
+ * For your custom default usage you may want to initialize an Aq_Resize object by yourself and then have own defaults
53
+ */
54
+ static public function getInstance() {
55
+ if(self::$instance == null) {
56
+ self::$instance = new self;
57
+ }
58
+
59
+ return self::$instance;
60
+ }
61
+
62
+ /**
63
+ * Run, forest.
64
+ */
65
+ public function process( $url, $width = null, $height = null, $crop = null, $single = true, $upscale = false ) {
66
+ try {
67
+ // Validate inputs.
68
+ if (!$url)
69
+ throw new Aq_Exception('$url parameter is required');
70
+ if (!$width)
71
+ throw new Aq_Exception('$width parameter is required');
72
+
73
+ // Caipt'n, ready to hook.
74
+ if ( true === $upscale ) add_filter( 'image_resize_dimensions', array($this, 'aq_upscale'), 10, 6 );
75
+
76
+ // Define upload path & dir.
77
+ $upload_info = wp_upload_dir();
78
+ $upload_dir = $upload_info['basedir'];
79
+ $upload_url = $upload_info['baseurl'];
80
+
81
+ $http_prefix = "http://";
82
+ $https_prefix = "https://";
83
+ $relative_prefix = "//"; // The protocol-relative URL
84
+
85
+ /* if the $url scheme differs from $upload_url scheme, make them match
86
+ if the schemes differe, images don't show up. */
87
+ if(!strncmp($url,$https_prefix,strlen($https_prefix))){ //if url begins with https:// make $upload_url begin with https:// as well
88
+ $upload_url = str_replace($http_prefix,$https_prefix,$upload_url);
89
+ }
90
+ elseif(!strncmp($url,$http_prefix,strlen($http_prefix))){ //if url begins with http:// make $upload_url begin with http:// as well
91
+ $upload_url = str_replace($https_prefix,$http_prefix,$upload_url);
92
+ }
93
+ elseif(!strncmp($url,$relative_prefix,strlen($relative_prefix))){ //if url begins with // make $upload_url begin with // as well
94
+ $upload_url = str_replace(array( 0 => "$http_prefix", 1 => "$https_prefix"),$relative_prefix,$upload_url);
95
+ }
96
+
97
+
98
+ // Check if $img_url is local.
99
+ if ( false === strpos( $url, $upload_url ) )
100
+ throw new Aq_Exception('Image must be local: ' . $url);
101
+
102
+ // Define path of image.
103
+ $rel_path = str_replace( $upload_url, '', $url );
104
+ $img_path = $upload_dir . $rel_path;
105
+
106
+ // Check if img path exists, and is an image indeed.
107
+ if ( ! file_exists( $img_path ) or ! getimagesize( $img_path ) )
108
+ throw new Aq_Exception('Image file does not exist (or is not an image): ' . $img_path);
109
+
110
+ // Get image info.
111
+ $info = pathinfo( $img_path );
112
+ $ext = $info['extension'];
113
+ list( $orig_w, $orig_h ) = getimagesize( $img_path );
114
+
115
+ // Get image size after cropping.
116
+ $dims = image_resize_dimensions( $orig_w, $orig_h, $width, $height, $crop );
117
+ $dst_w = $dims[4];
118
+ $dst_h = $dims[5];
119
+
120
+ // Return the original image only if it exactly fits the needed measures.
121
+ if ( ! $dims || ( ( ( null === $height && $orig_w == $width ) xor ( null === $width && $orig_h == $height ) ) xor ( $height == $orig_h && $width == $orig_w ) ) ) {
122
+ $img_url = $url;
123
+ $dst_w = $orig_w;
124
+ $dst_h = $orig_h;
125
+ } else {
126
+ // Use this to check if cropped image already exists, so we can return that instead.
127
+ $suffix = "{$dst_w}x{$dst_h}";
128
+ $dst_rel_path = str_replace( '.' . $ext, '', $rel_path );
129
+ $destfilename = "{$upload_dir}{$dst_rel_path}-{$suffix}.{$ext}";
130
+
131
+ if ( ! $dims || ( true == $crop && false == $upscale && ( $dst_w < $width || $dst_h < $height ) ) ) {
132
+ // Can't resize, so return false saying that the action to do could not be processed as planned.
133
+ throw new Aq_Exception('Unable to resize image because image_resize_dimensions() failed');
134
+ }
135
+ // Else check if cache exists.
136
+ elseif ( file_exists( $destfilename ) && getimagesize( $destfilename ) ) {
137
+ $img_url = "{$upload_url}{$dst_rel_path}-{$suffix}.{$ext}";
138
+ }
139
+ // Else, we resize the image and return the new resized image url.
140
+ else {
141
+
142
+ $editor = wp_get_image_editor( $img_path );
143
+
144
+ if ( is_wp_error( $editor ) || is_wp_error( $editor->resize( $width, $height, $crop ) ) ) {
145
+ throw new Aq_Exception('Unable to get WP_Image_Editor: ' .
146
+ $editor->get_error_message() . ' (is GD or ImageMagick installed?)');
147
+ }
148
+
149
+ $resized_file = $editor->save();
150
+
151
+ if ( ! is_wp_error( $resized_file ) ) {
152
+ $resized_rel_path = str_replace( $upload_dir, '', $resized_file['path'] );
153
+ $img_url = $upload_url . $resized_rel_path;
154
+ } else {
155
+ throw new Aq_Exception('Unable to save resized image file: ' . $editor->get_error_message());
156
+ }
157
+
158
+ }
159
+ }
160
+
161
+ // Okay, leave the ship.
162
+ if ( true === $upscale ) remove_filter( 'image_resize_dimensions', array( $this, 'aq_upscale' ) );
163
+
164
+ // Return the output.
165
+ if ( $single ) {
166
+ // str return.
167
+ $image = $img_url;
168
+ } else {
169
+ // array return.
170
+ $image = array (
171
+ 0 => $img_url,
172
+ 1 => $dst_w,
173
+ 2 => $dst_h
174
+ );
175
+ }
176
+
177
+ return $image;
178
+ }
179
+ catch (Aq_Exception $ex) {
180
+ error_log('Aq_Resize.process() error: ' . $ex->getMessage());
181
+
182
+ if ($this->throwOnError) {
183
+ // Bubble up exception.
184
+ throw $ex;
185
+ }
186
+ else {
187
+ // Return false, so that this patch is backwards-compatible.
188
+ return false;
189
+ }
190
+ }
191
+ }
192
+
193
+ /**
194
+ * Callback to overwrite WP computing of thumbnail measures
195
+ */
196
+ function aq_upscale( $default, $orig_w, $orig_h, $dest_w, $dest_h, $crop ) {
197
+ if ( ! $crop ) return null; // Let the wordpress default function handle this.
198
+
199
+ // Here is the point we allow to use larger image size than the original one.
200
+ $aspect_ratio = $orig_w / $orig_h;
201
+ $new_w = $dest_w;
202
+ $new_h = $dest_h;
203
+
204
+ if ( ! $new_w ) {
205
+ $new_w = intval( $new_h * $aspect_ratio );
206
+ }
207
+
208
+ if ( ! $new_h ) {
209
+ $new_h = intval( $new_w / $aspect_ratio );
210
+ }
211
+
212
+ $size_ratio = max( $new_w / $orig_w, $new_h / $orig_h );
213
+
214
+ $crop_w = round( $new_w / $size_ratio );
215
+ $crop_h = round( $new_h / $size_ratio );
216
+
217
+ $s_x = floor( ( $orig_w - $crop_w ) / 2 );
218
+ $s_y = floor( ( $orig_h - $crop_h ) / 2 );
219
+
220
+ return array( 0, 0, (int) $s_x, (int) $s_y, (int) $new_w, (int) $new_h, (int) $crop_w, (int) $crop_h );
221
+ }
222
+ }
223
+ }
224
+
225
+
226
+
227
+
228
+
229
+ if(!function_exists('aq_resize')) {
230
+
231
+ /**
232
+ * This is just a tiny wrapper function for the class above so that there is no
233
+ * need to change any code in your own WP themes. Usage is still the same :)
234
+ */
235
+ function aq_resize( $url, $width = null, $height = null, $crop = null, $single = true, $upscale = false ) {
236
+ /* WPML Fix */
237
+ if ( defined( 'ICL_SITEPRESS_VERSION' ) ){
238
+ global $sitepress;
239
+ $url = $sitepress->convert_url( $url, $sitepress->get_default_language() );
240
+ }
241
+ /* WPML Fix */
242
+
243
+ $aq_resize = Aq_Resize::getInstance();
244
+ return $aq_resize->process( $url, $width, $height, $crop, $single, $upscale );
245
+ }
246
+ }
247
+
core/array-list/local-sub-business.php CHANGED
@@ -127,6 +127,33 @@ return array(
127
  'tireshop' => 'Tire Shop',
128
  'toystore' => 'Toy Store',
129
  'wholesalestore' => 'Wholesale Store'
130
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  );
132
 
127
  'tireshop' => 'Tire Shop',
128
  'toystore' => 'Toy Store',
129
  'wholesalestore' => 'Wholesale Store'
130
+ ),
131
+ 'medicalbusiness' => array(
132
+ '' => 'Select Sub Business Type ( optional )',
133
+ 'Communityhealth' => 'Community Health',
134
+ 'dentist' => 'Dentist',
135
+ 'dermatology' => 'Dermatology',
136
+ 'dietnutrition' => 'Diet Nutrition',
137
+ 'emergency' => 'Emergency',
138
+ 'geriatric' => 'Geriatric',
139
+ 'gynecologic' => 'Gynecologic',
140
+ 'medicalclinic' => 'Medical Clinic',
141
+ 'midwifery' => 'Midwifery',
142
+ 'nursing' => 'Nursing',
143
+ 'obstetric' => 'Obstetric',
144
+ 'oncologic' => 'Oncologic',
145
+ 'optician' => 'Optician',
146
+ 'optometric' => 'Optometric',
147
+ 'otolaryngologic' => 'Otolaryngologic',
148
+ 'pediatric' => 'Pediatric',
149
+ 'pharmacy' => 'Pharmacy',
150
+ 'physician' => 'Physician',
151
+ 'physiotherapy' => 'Physiotherapy',
152
+ 'plasticsurgery' => 'Plastic Surgery',
153
+ 'podiatric' => 'Podiatric',
154
+ 'primarycare' => 'Primary Care',
155
+ 'psychiatric' => 'Psychiatric',
156
+ 'publichealth' => 'Public Health',
157
+ )
158
  );
159
 
output/flexmls.php CHANGED
@@ -17,9 +17,15 @@ class saswp_flexmls_list extends flexmlsConnectPageCore{
17
  protected $search_criteria;
18
 
19
  function __construct() {
20
- global $fmc_api;
21
- parent::__construct($fmc_api);
22
-
 
 
 
 
 
 
23
  add_filter('the_content', array($this,'saswp_content'),9);
24
  add_action('wp_footer', array($this, 'saswp_get_flexidx_listing'));
25
  add_action('amp_post_template_footer',array($this, 'saswp_get_flexidx_listing'));
@@ -27,7 +33,9 @@ class saswp_flexmls_list extends flexmlsConnectPageCore{
27
  public function saswp_get_flexidx_listing(){
28
 
29
  global $fmc_api;
30
-
 
 
31
  $settings = array();
32
 
33
  foreach ($this->shorcode[1] as $shortcodeAttr){
@@ -217,7 +225,9 @@ class saswp_flexmls_list extends flexmlsConnectPageCore{
217
  echo "\n";
218
  echo '</script>';
219
  }
220
-
 
 
221
  }
222
  public function saswp_content($content){
223
 
17
  protected $search_criteria;
18
 
19
  function __construct() {
20
+
21
+ global $fmc_api;
22
+
23
+ if(!empty($fmc_api)){
24
+
25
+ parent::__construct($fmc_api);
26
+
27
+ }
28
+
29
  add_filter('the_content', array($this,'saswp_content'),9);
30
  add_action('wp_footer', array($this, 'saswp_get_flexidx_listing'));
31
  add_action('amp_post_template_footer',array($this, 'saswp_get_flexidx_listing'));
33
  public function saswp_get_flexidx_listing(){
34
 
35
  global $fmc_api;
36
+
37
+ if(!empty($fmc_api)){
38
+
39
  $settings = array();
40
 
41
  foreach ($this->shorcode[1] as $shortcodeAttr){
225
  echo "\n";
226
  echo '</script>';
227
  }
228
+
229
+ }
230
+
231
  }
232
  public function saswp_content($content){
233
 
output/function.php CHANGED
@@ -69,13 +69,23 @@ function saswp_schema_markup_output() {
69
  $output = '';
70
  $post_specific_enable = '';
71
  $schema_output = array();
72
- $kb_schema_output = array();
73
-
 
 
 
74
  $site_navigation = saswp_site_navigation_output();
75
  $contact_page_output = saswp_contact_page_output();
76
  $about_page_output = saswp_about_page_output();
77
  $author_output = saswp_author_output();
78
  $archive_output = saswp_archive_output();
 
 
 
 
 
 
 
79
  $schema_breadcrumb_output = saswp_schema_breadcrumb_output();
80
  $kb_website_output = saswp_kb_website_output();
81
 
@@ -119,12 +129,24 @@ function saswp_schema_markup_output() {
119
  $output .= ",";
120
  $output .= "\n\n";
121
  }
122
- if(!empty($archive_output)){
123
 
124
- $output .= saswp_json_print_format($archive_output);
125
  $output .= ",";
126
  $output .= "\n\n";
127
- }
 
 
 
 
 
 
 
 
 
 
 
 
128
 
129
  if(isset($sd_data['saswp-defragment']) && $sd_data['saswp-defragment'] == 1){
130
 
69
  $output = '';
70
  $post_specific_enable = '';
71
  $schema_output = array();
72
+ $kb_schema_output = array();
73
+ $item_list = array();
74
+ $collection_page = array();
75
+ $blog_page = array();
76
+
77
  $site_navigation = saswp_site_navigation_output();
78
  $contact_page_output = saswp_contact_page_output();
79
  $about_page_output = saswp_about_page_output();
80
  $author_output = saswp_author_output();
81
  $archive_output = saswp_archive_output();
82
+
83
+ if($archive_output){
84
+ $item_list = $archive_output[0];
85
+ $collection_page = $archive_output[1];
86
+ $blog_page = $archive_output[2];
87
+ }
88
+
89
  $schema_breadcrumb_output = saswp_schema_breadcrumb_output();
90
  $kb_website_output = saswp_kb_website_output();
91
 
129
  $output .= ",";
130
  $output .= "\n\n";
131
  }
132
+ if(!empty($collection_page)){
133
 
134
+ $output .= saswp_json_print_format($collection_page);
135
  $output .= ",";
136
  $output .= "\n\n";
137
+ }
138
+ if(!empty($item_list)){
139
+
140
+ $output .= saswp_json_print_format($item_list);
141
+ $output .= ",";
142
+ $output .= "\n\n";
143
+ }
144
+ if(!empty($blog_page)){
145
+
146
+ $output .= saswp_json_print_format($blog_page);
147
+ $output .= ",";
148
+ $output .= "\n\n";
149
+ }
150
 
151
  if(isset($sd_data['saswp-defragment']) && $sd_data['saswp-defragment'] == 1){
152
 
output/output.php CHANGED
@@ -96,8 +96,7 @@ function saswp_kb_schema_output() {
96
  }
97
 
98
  $contact_info = array();
99
-
100
-
101
  $contact_1 = saswp_remove_warnings($sd_data, 'saswp_contact_type', 'saswp_string');
102
  $telephone_1 = saswp_remove_warnings($sd_data, 'saswp_kb_telephone', 'saswp_string');
103
  $contact_url = saswp_remove_warnings($sd_data, 'saswp_kb_contact_url', 'saswp_string');
@@ -118,10 +117,9 @@ function saswp_kb_schema_output() {
118
 
119
  }
120
 
121
-
122
  $input = array(
123
- '@context' =>saswp_context_url(),
124
- '@type' => 'Organization',
125
  '@id' => $site_url.'#Organization',
126
  'name' => saswp_remove_warnings($sd_data, 'sd_name', 'saswp_string'),
127
  'url' => saswp_remove_warnings($sd_data, 'sd_url', 'saswp_string'),
@@ -1881,11 +1879,13 @@ function saswp_archive_output(){
1881
 
1882
  $service_object = new saswp_output_service();
1883
  $logo = $service_object->saswp_get_publisher(true);
1884
-
1885
-
1886
  if ( is_category() ) {
1887
 
1888
  $category_posts = array();
 
 
 
1889
  $category_loop = new WP_Query( $query_string );
1890
  if ( $category_loop->have_posts() ):
1891
  while( $category_loop->have_posts() ): $category_loop->the_post();
@@ -1912,35 +1912,37 @@ function saswp_archive_output(){
1912
  }
1913
 
1914
  }
1915
-
1916
- $publisher_info = array(
1917
- "type" => "Organization",
1918
- "name" => esc_attr($site_name),
1919
- "logo" => array(
1920
- "@type" => "ImageObject",
1921
- "name" => esc_attr($site_name),
1922
- "width" => isset($logo['width']) ? esc_attr($logo['width']):'',
1923
- "height" => isset($logo['height']) ? esc_attr($logo['height']):'',
1924
- "url" => isset($logo['url']) ? esc_attr($logo['url']):''
1925
- )
1926
- );
1927
-
1928
- $publisher_info['name'] = get_bloginfo('name');
1929
- $publisher_info['id'] = get_the_permalink();
1930
-
1931
- $category_posts[] = array(
1932
-
1933
- '@type' => esc_attr($schema_type),
1934
- 'headline' => saswp_get_the_title(),
1935
- 'url' => get_the_permalink(),
1936
- 'datePublished' => get_the_date('c'),
1937
- 'dateModified' => get_the_modified_date('c'),
1938
- 'mainEntityOfPage' => get_the_permalink(),
1939
- 'author' => get_the_author(),
1940
- 'publisher' => $publisher_info,
1941
- 'image' => $archive_image,
 
1942
  );
1943
-
 
1944
  endwhile;
1945
 
1946
  wp_reset_postdata();
@@ -1949,18 +1951,42 @@ function saswp_archive_output(){
1949
  $category_id = intval($category[0]->term_id);
1950
  $category_link = get_category_link( $category_id );
1951
  $category_link = get_term_link( $category[0]->term_id , 'category' );
1952
- $category_headline = single_cat_title( '', false ) . __(' Category', 'schema-wp');
1953
- $input = array
 
1954
  (
1955
  '@context' => saswp_context_url(),
1956
  '@type' => "CollectionPage",
 
1957
  'headline' => esc_attr($category_headline),
1958
  'description' => strip_tags(category_description()),
1959
- 'url' => esc_url($category_link),
1960
- 'sameAs' => '',
1961
  'hasPart' => $category_posts
1962
  );
1963
- return apply_filters('saswp_modify_archive_output', $input);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1964
  endif;
1965
  }
1966
  }
96
  }
97
 
98
  $contact_info = array();
99
+
 
100
  $contact_1 = saswp_remove_warnings($sd_data, 'saswp_contact_type', 'saswp_string');
101
  $telephone_1 = saswp_remove_warnings($sd_data, 'saswp_kb_telephone', 'saswp_string');
102
  $contact_url = saswp_remove_warnings($sd_data, 'saswp_kb_contact_url', 'saswp_string');
117
 
118
  }
119
 
 
120
  $input = array(
121
+ '@context' => saswp_context_url(),
122
+ '@type' => (isset($sd_data['saswp_organization_type']) && $sd_data['saswp_organization_type'] !='')? $sd_data['saswp_organization_type']:'Organization',
123
  '@id' => $site_url.'#Organization',
124
  'name' => saswp_remove_warnings($sd_data, 'sd_name', 'saswp_string'),
125
  'url' => saswp_remove_warnings($sd_data, 'sd_url', 'saswp_string'),
1879
 
1880
  $service_object = new saswp_output_service();
1881
  $logo = $service_object->saswp_get_publisher(true);
1882
+
 
1883
  if ( is_category() ) {
1884
 
1885
  $category_posts = array();
1886
+ $item_list = array();
1887
+
1888
+ $i = 1;
1889
  $category_loop = new WP_Query( $query_string );
1890
  if ( $category_loop->have_posts() ):
1891
  while( $category_loop->have_posts() ): $category_loop->the_post();
1912
  }
1913
 
1914
  }
1915
+
1916
+ $publisher_info['type'] = 'Organization';
1917
+ $publisher_info['name'] = esc_attr($site_name);
1918
+ $publisher_info['logo']['@type'] = 'ImageObject';
1919
+ $publisher_info['logo']['url'] = isset($logo['url']) ? esc_attr($logo['url']):'';
1920
+ $publisher_info['logo']['width'] = isset($logo['width']) ? esc_attr($logo['width']):'';
1921
+ $publisher_info['logo']['height'] = isset($logo['height']) ? esc_attr($logo['height']):'';
1922
+
1923
+ $schema_properties['@type'] = esc_attr($schema_type);
1924
+ $schema_properties['headline'] = saswp_get_the_title();
1925
+ $schema_properties['url'] = get_the_permalink();
1926
+ $schema_properties['datePublished'] = get_the_date('c');
1927
+ $schema_properties['dateModified'] = get_the_modified_date('c');
1928
+ $schema_properties['mainEntityOfPage'] = get_the_permalink();
1929
+ $schema_properties['author'] = get_the_author();
1930
+ $schema_properties['publisher'] = $publisher_info;
1931
+
1932
+ if(!empty($archive_image['url'])){
1933
+ $schema_properties['image'] = $archive_image;
1934
+ }
1935
+
1936
+ $category_posts[] = $schema_properties;
1937
+
1938
+ $item_list[] = array(
1939
+ '@type' => 'ListItem',
1940
+ 'position' => $i,
1941
+ 'url' => get_the_permalink(),
1942
+
1943
  );
1944
+
1945
+ $i++;
1946
  endwhile;
1947
 
1948
  wp_reset_postdata();
1951
  $category_id = intval($category[0]->term_id);
1952
  $category_link = get_category_link( $category_id );
1953
  $category_link = get_term_link( $category[0]->term_id , 'category' );
1954
+ $category_headline = single_cat_title( '', false ) . __(' Category', 'schema-wp');
1955
+
1956
+ $collection_page = array
1957
  (
1958
  '@context' => saswp_context_url(),
1959
  '@type' => "CollectionPage",
1960
+ '@id' => trailingslashit(esc_url($category_link)).'#CollectionPage',
1961
  'headline' => esc_attr($category_headline),
1962
  'description' => strip_tags(category_description()),
1963
+ 'url' => esc_url($category_link),
 
1964
  'hasPart' => $category_posts
1965
  );
1966
+
1967
+ $blog_page = array
1968
+ (
1969
+ '@context' => saswp_context_url(),
1970
+ '@type' => "Blog",
1971
+ '@id' => trailingslashit(esc_url($category_link)).'#Blog',
1972
+ 'headline' => esc_attr($category_headline),
1973
+ 'description' => strip_tags(category_description()),
1974
+ 'url' => esc_url($category_link),
1975
+ 'blogPost' => $category_posts
1976
+ );
1977
+
1978
+ $item_list_schema['@context'] = saswp_context_url();
1979
+ $item_list_schema['@type'] = 'ItemList';
1980
+ $item_list_schema['itemListElement'] = $item_list;
1981
+
1982
+ if($schema_type == 'BlogPosting'){
1983
+ $output = array($item_list_schema, $collection_page, $blog_page);
1984
+ }else{
1985
+ $output = array($item_list_schema, $collection_page, array());
1986
+ }
1987
+
1988
+ return apply_filters('saswp_modify_archive_output', $output);
1989
+
1990
  endif;
1991
  }
1992
  }
output/output_post_specific.php CHANGED
@@ -61,13 +61,13 @@ function saswp_post_specific_schema_output() {
61
  $input1 = array();
62
 
63
  $schema_id = $schema;
64
- $schema_type = esc_sql ( get_post_meta($schema_id, 'schema_type', true) );
65
  $schema_post_id = $post->ID;
66
- $all_post_meta = esc_sql ( get_post_meta($schema_post_id, $key='', true) );
67
 
68
- if(is_singular() && isset($schema_enable[$schema_id]) && $schema_enable[$schema_id] == 1 ){
69
 
70
- $saswp_review_details = esc_sql ( get_post_meta(get_the_ID(), 'saswp_review_details', true));
71
 
72
  $aggregateRating = array();
73
  $saswp_over_all_rating ='';
@@ -157,9 +157,8 @@ function saswp_post_specific_schema_output() {
157
  $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
158
 
159
  }
160
-
161
-
162
- $itinerary = esc_sql ( get_post_meta($schema_post_id, 'trip_itinerary_'.$schema_id, true) );
163
 
164
  $itinerary_arr = array();
165
 
@@ -187,7 +186,7 @@ function saswp_post_specific_schema_output() {
187
  $input1['@type'] = 'FAQPage';
188
  $input1['@id'] = trailingslashit(get_permalink()).'#FAQPage';
189
 
190
- $faq_question = esc_sql ( get_post_meta($schema_post_id, 'faq_question_'.$schema_id, true) );
191
 
192
  $faq_question_arr = array();
193
 
@@ -549,9 +548,9 @@ function saswp_post_specific_schema_output() {
549
  $howto_image = get_post_meta( get_the_ID(), 'saswp_howto_schema_image_'.$schema_id.'_detail',true);
550
 
551
 
552
- $tool = esc_sql ( get_post_meta($schema_post_id, 'howto_tool_'.$schema_id, true) );
553
- $step = esc_sql ( get_post_meta($schema_post_id, 'howto_step_'.$schema_id, true) );
554
- $supply = esc_sql ( get_post_meta($schema_post_id, 'howto_supply_'.$schema_id, true) );
555
 
556
 
557
  $input1['@context'] = saswp_context_url();
@@ -699,8 +698,8 @@ function saswp_post_specific_schema_output() {
699
  $howto_image = get_post_meta( get_the_ID(), 'saswp_tvseries_schema_image_'.$schema_id.'_detail',true);
700
 
701
 
702
- $actor = esc_sql ( get_post_meta($schema_post_id, 'tvseries_actor_'.$schema_id, true) );
703
- $season = esc_sql ( get_post_meta($schema_post_id, 'tvseries_season_'.$schema_id, true) );
704
 
705
  $input1['@context'] = saswp_context_url();
706
  $input1['@type'] = 'TVSeries';
@@ -756,9 +755,9 @@ function saswp_post_specific_schema_output() {
756
 
757
  $howto_image = get_post_meta( get_the_ID(), 'saswp_mc_schema_image_'.$schema_id.'_detail',true);
758
 
759
- $cause = esc_sql ( get_post_meta($schema_post_id, 'mc_cause_'.$schema_id, true));
760
- $symptom = esc_sql ( get_post_meta($schema_post_id, 'mc_symptom_'.$schema_id, true));
761
- $riskfactro = esc_sql ( get_post_meta($schema_post_id, 'mc_risk_factor_'.$schema_id, true));
762
 
763
 
764
  $input1['@context'] = saswp_context_url();
@@ -938,7 +937,7 @@ function saswp_post_specific_schema_output() {
938
  );
939
 
940
 
941
- $performer = esc_sql ( get_post_meta($schema_post_id, 'feed_element_'.$schema_id, true) );
942
 
943
  $performer_arr = array();
944
 
@@ -1004,7 +1003,7 @@ function saswp_post_specific_schema_output() {
1004
  );
1005
 
1006
 
1007
- $performer = esc_sql ( get_post_meta($schema_post_id, 'performer_'.$schema_id, true) );
1008
 
1009
  $performer_arr = array();
1010
 
@@ -1575,6 +1574,10 @@ function saswp_post_specific_schema_output() {
1575
  )
1576
  );
1577
 
 
 
 
 
1578
  if(isset($all_post_meta['saswp_product_schema_gtin8_'.$schema_id])){
1579
  $input1['gtin8'] = esc_attr($all_post_meta['saswp_product_schema_gtin8_'.$schema_id][0]);
1580
  }
@@ -1593,7 +1596,39 @@ function saswp_post_specific_schema_output() {
1593
  "reviewCount" => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_review_count_'.$schema_id, 'saswp_array')
1594
  );
1595
  }
1596
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1597
  if(!empty($aggregateRating)){
1598
  $input1['aggregateRating'] = $aggregateRating;
1599
  }
@@ -1610,8 +1645,7 @@ function saswp_post_specific_schema_output() {
1610
  $reviews = array();
1611
 
1612
  foreach ($product_details['product_reviews'] as $review){
1613
-
1614
-
1615
  $review_fields = array();
1616
 
1617
  $review_fields['@type'] = 'Review';
@@ -1627,16 +1661,12 @@ function saswp_post_specific_schema_output() {
1627
  $review_fields['reviewRating']['worstRating'] = '1';
1628
 
1629
  }
1630
-
1631
-
1632
-
1633
  $reviews[] = $review_fields;
1634
 
1635
  }
1636
- $input1['review'] = $reviews;
1637
- }
1638
-
1639
-
1640
  }
1641
 
1642
  if( 'NewsArticle' === $schema_type ){
61
  $input1 = array();
62
 
63
  $schema_id = $schema;
64
+ $schema_type = get_post_meta($schema_id, 'schema_type', true);
65
  $schema_post_id = $post->ID;
66
+ $all_post_meta = get_post_meta($schema_post_id, $key='', true);
67
 
68
+ if(is_singular() && (!isset($schema_enable[$schema_id]) || $schema_enable[$schema_id] == 1 )){
69
 
70
+ $saswp_review_details = get_post_meta(get_the_ID(), 'saswp_review_details', true);
71
 
72
  $aggregateRating = array();
73
  $saswp_over_all_rating ='';
157
  $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
158
 
159
  }
160
+
161
+ $itinerary = get_post_meta($schema_post_id, 'trip_itinerary_'.$schema_id, true);
 
162
 
163
  $itinerary_arr = array();
164
 
186
  $input1['@type'] = 'FAQPage';
187
  $input1['@id'] = trailingslashit(get_permalink()).'#FAQPage';
188
 
189
+ $faq_question = get_post_meta($schema_post_id, 'faq_question_'.$schema_id, true);
190
 
191
  $faq_question_arr = array();
192
 
548
  $howto_image = get_post_meta( get_the_ID(), 'saswp_howto_schema_image_'.$schema_id.'_detail',true);
549
 
550
 
551
+ $tool = get_post_meta($schema_post_id, 'howto_tool_'.$schema_id, true);
552
+ $step = get_post_meta($schema_post_id, 'howto_step_'.$schema_id, true);
553
+ $supply = get_post_meta($schema_post_id, 'howto_supply_'.$schema_id, true);
554
 
555
 
556
  $input1['@context'] = saswp_context_url();
698
  $howto_image = get_post_meta( get_the_ID(), 'saswp_tvseries_schema_image_'.$schema_id.'_detail',true);
699
 
700
 
701
+ $actor = get_post_meta($schema_post_id, 'tvseries_actor_'.$schema_id, true);
702
+ $season = get_post_meta($schema_post_id, 'tvseries_season_'.$schema_id, true);
703
 
704
  $input1['@context'] = saswp_context_url();
705
  $input1['@type'] = 'TVSeries';
755
 
756
  $howto_image = get_post_meta( get_the_ID(), 'saswp_mc_schema_image_'.$schema_id.'_detail',true);
757
 
758
+ $cause = get_post_meta($schema_post_id, 'mc_cause_'.$schema_id, true);
759
+ $symptom = get_post_meta($schema_post_id, 'mc_symptom_'.$schema_id, true);
760
+ $riskfactro = get_post_meta($schema_post_id, 'mc_risk_factor_'.$schema_id, true);
761
 
762
 
763
  $input1['@context'] = saswp_context_url();
937
  );
938
 
939
 
940
+ $performer = get_post_meta($schema_post_id, 'feed_element_'.$schema_id, true);
941
 
942
  $performer_arr = array();
943
 
1003
  );
1004
 
1005
 
1006
+ $performer = get_post_meta($schema_post_id, 'performer_'.$schema_id, true);
1007
 
1008
  $performer_arr = array();
1009
 
1574
  )
1575
  );
1576
 
1577
+ if(isset($all_post_meta['saswp_product_schema_seller_'.$schema_id])){
1578
+ $input1['seller']['@type'] = 'Organization';
1579
+ $input1['seller']['name'] = esc_attr($all_post_meta['saswp_product_schema_seller_'.$schema_id][0]);
1580
+ }
1581
  if(isset($all_post_meta['saswp_product_schema_gtin8_'.$schema_id])){
1582
  $input1['gtin8'] = esc_attr($all_post_meta['saswp_product_schema_gtin8_'.$schema_id][0]);
1583
  }
1596
  "reviewCount" => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_review_count_'.$schema_id, 'saswp_array')
1597
  );
1598
  }
1599
+
1600
+
1601
+ $itinerary = get_post_meta($schema_post_id, 'product_reviews_'.$schema_id, true);
1602
+
1603
+ $itinerary_arr = array();
1604
+
1605
+ if(!empty($itinerary)){
1606
+
1607
+ foreach($itinerary as $review){
1608
+
1609
+
1610
+ $review_fields = array();
1611
+
1612
+ $review_fields['@type'] = 'Review';
1613
+ $review_fields['author'] = esc_attr($review['saswp_product_reviews_reviewer_name']);
1614
+ $review_fields['datePublished'] = esc_html($review['saswp_product_reviews_created_date']);
1615
+ $review_fields['description'] = esc_textarea($review['saswp_product_reviews_text']);
1616
+
1617
+ if(is_int($review['saswp_product_reviews_reviewer_rating'])){
1618
+
1619
+ $review_fields['reviewRating']['@type'] = 'Rating';
1620
+ $review_fields['reviewRating']['bestRating'] = '5';
1621
+ $review_fields['reviewRating']['ratingValue'] = esc_attr($review['saswp_product_reviews_reviewer_rating']);
1622
+ $review_fields['reviewRating']['worstRating'] = '1';
1623
+
1624
+ }
1625
+
1626
+ $itinerary_arr[] = $review_fields;
1627
+ }
1628
+ $input1['review'] = $itinerary_arr;
1629
+ }
1630
+
1631
+
1632
  if(!empty($aggregateRating)){
1633
  $input1['aggregateRating'] = $aggregateRating;
1634
  }
1645
  $reviews = array();
1646
 
1647
  foreach ($product_details['product_reviews'] as $review){
1648
+
 
1649
  $review_fields = array();
1650
 
1651
  $review_fields['@type'] = 'Review';
1661
  $review_fields['reviewRating']['worstRating'] = '1';
1662
 
1663
  }
1664
+
 
 
1665
  $reviews[] = $review_fields;
1666
 
1667
  }
1668
+ $input1['review'] = $reviews;
1669
+ }
 
 
1670
  }
1671
 
1672
  if( 'NewsArticle' === $schema_type ){
output/service.php CHANGED
@@ -313,6 +313,13 @@ Class saswp_output_service{
313
  if(isset($custom_fields['saswp_article_organization_logo'])){
314
  $input1['Publisher']['logo']['url'] = $custom_fields['saswp_article_organization_logo'];
315
  }
 
 
 
 
 
 
 
316
  break;
317
 
318
  case 'HowTo':
@@ -498,6 +505,14 @@ Class saswp_output_service{
498
  if(isset($custom_fields['saswp_software_schema_date_modified'])){
499
  $input1['dateModified'] = $custom_fields['saswp_software_schema_date_modified'];
500
  }
 
 
 
 
 
 
 
 
501
 
502
  break;
503
 
@@ -550,7 +565,17 @@ Class saswp_output_service{
550
  }
551
  if(isset($custom_fields['saswp_newsarticle_organization_logo'])){
552
  $input1['Publisher']['logo']['url'] = $custom_fields['saswp_newsarticle_organization_logo'];
553
- }
 
 
 
 
 
 
 
 
 
 
554
 
555
  break;
556
 
@@ -694,6 +719,13 @@ Class saswp_output_service{
694
  if(isset($custom_fields['saswp_tech_article_organization_logo'])){
695
  $input1['Publisher']['logo']['url'] = $custom_fields['saswp_tech_article_organization_logo'];
696
  }
 
 
 
 
 
 
 
697
  break;
698
 
699
  case 'Course':
@@ -903,6 +935,17 @@ Class saswp_output_service{
903
  if(isset($custom_fields['saswp_product_sku'])){
904
  $input1['sku'] = $custom_fields['saswp_product_sku'];
905
  }
 
 
 
 
 
 
 
 
 
 
 
906
  break;
907
 
908
  case 'Service':
@@ -2197,7 +2240,9 @@ Class saswp_output_service{
2197
  'saswp_newsarticle_author_name' => 'Author Name',
2198
  'saswp_newsarticle_author_image' => 'Author Image',
2199
  'saswp_newsarticle_organization_name' => 'Organization Name',
2200
- 'saswp_newsarticle_organization_logo' => 'Organization Logo',
 
 
2201
  );
2202
 
2203
  break;
@@ -2235,7 +2280,9 @@ Class saswp_output_service{
2235
  'saswp_article_date_modified' => 'Date Modified',
2236
  'saswp_article_author_name' => 'Author Name',
2237
  'saswp_article_organization_name' => 'Organization Name',
2238
- 'saswp_article_organization_logo' => 'Organization Logo',
 
 
2239
 
2240
  );
2241
  break;
@@ -2256,6 +2303,8 @@ Class saswp_output_service{
2256
  'saswp_tech_article_author_name' => 'Author Name',
2257
  'saswp_tech_article_organization_name' => 'Organization Name',
2258
  'saswp_tech_article_organization_logo' => 'Organization Logo',
 
 
2259
 
2260
  );
2261
  break;
@@ -2360,7 +2409,10 @@ Class saswp_output_service{
2360
  'saswp_product_sku' => 'SKU',
2361
  'saswp_product_mpn' => 'MPN',
2362
  'saswp_product_isbn' => 'ISBN',
2363
- 'saswp_product_gtin8' => 'GTIN 8',
 
 
 
2364
  );
2365
  break;
2366
 
@@ -2575,6 +2627,8 @@ Class saswp_output_service{
2575
  'saswp_software_schema_price_currency' => 'Price Currency',
2576
  'saswp_software_schema_date_published' => 'Date Published',
2577
  'saswp_software_schema_date_modified' => 'Date Modified',
 
 
2578
  );
2579
 
2580
  break;
@@ -2953,16 +3007,15 @@ Class saswp_output_service{
2953
  $image_details = wp_get_attachment_image_src($image_id, 'full');
2954
 
2955
  if( is_array($image_details) ){
2956
-
2957
-
2958
- if(isset($image_details[1]) && ($image_details[1] < 1200) && function_exists('ampforwp_aq_resize')){
2959
 
2960
  $width = array(1280, 640, 300);
2961
  $height = array(720, 480, 300);
2962
 
2963
  for($i = 0; $i<3; $i++){
2964
 
2965
- $resize_image = ampforwp_aq_resize( $image_details[0], $width[$i], $height[$i], true, false, true );
2966
 
2967
  if(isset($resize_image[0]) && isset($resize_image[1]) && isset($resize_image[2]) ){
2968
 
313
  if(isset($custom_fields['saswp_article_organization_logo'])){
314
  $input1['Publisher']['logo']['url'] = $custom_fields['saswp_article_organization_logo'];
315
  }
316
+ if(isset($custom_fields['saswp_article_rating_value']) && isset($custom_fields['saswp_article_rating_count'])){
317
+ $input1['aggregateRating']['@type'] = 'AggregateRating';
318
+ $input1['aggregateRating']['worstRating'] = 0;
319
+ $input1['aggregateRating']['bestRating'] = 5;
320
+ $input1['aggregateRating']['ratingValue'] = $custom_fields['saswp_article_rating_value'];
321
+ $input1['aggregateRating']['ratingCount'] = $custom_fields['saswp_article_rating_count'];
322
+ }
323
  break;
324
 
325
  case 'HowTo':
505
  if(isset($custom_fields['saswp_software_schema_date_modified'])){
506
  $input1['dateModified'] = $custom_fields['saswp_software_schema_date_modified'];
507
  }
508
+ if(isset($custom_fields['saswp_software_rating_value']) && isset($custom_fields['saswp_software_rating_count'])){
509
+ $input1['aggregateRating']['@type'] = 'AggregateRating';
510
+ $input1['aggregateRating']['worstRating'] = 0;
511
+ $input1['aggregateRating']['bestRating'] = 5;
512
+ $input1['aggregateRating']['ratingValue'] = $custom_fields['saswp_software_rating_value'];
513
+ $input1['aggregateRating']['ratingCount'] = $custom_fields['saswp_software_rating_count'];
514
+ }
515
+
516
 
517
  break;
518
 
565
  }
566
  if(isset($custom_fields['saswp_newsarticle_organization_logo'])){
567
  $input1['Publisher']['logo']['url'] = $custom_fields['saswp_newsarticle_organization_logo'];
568
+ }
569
+
570
+ if(isset($custom_fields['saswp_newsarticle_rating_value']) && isset($custom_fields['saswp_newsarticle_rating_count'])){
571
+ $input1['aggregateRating']['@type'] = 'AggregateRating';
572
+ $input1['aggregateRating']['worstRating'] = 0;
573
+ $input1['aggregateRating']['bestRating'] = 5;
574
+ $input1['aggregateRating']['ratingValue'] = $custom_fields['saswp_newsarticle_rating_value'];
575
+ $input1['aggregateRating']['ratingCount'] = $custom_fields['saswp_newsarticle_rating_count'];
576
+ }
577
+
578
+
579
 
580
  break;
581
 
719
  if(isset($custom_fields['saswp_tech_article_organization_logo'])){
720
  $input1['Publisher']['logo']['url'] = $custom_fields['saswp_tech_article_organization_logo'];
721
  }
722
+ if(isset($custom_fields['saswp_tech_article_rating_value']) && isset($custom_fields['saswp_tech_article_rating_count'])){
723
+ $input1['aggregateRating']['@type'] = 'AggregateRating';
724
+ $input1['aggregateRating']['worstRating'] = 0;
725
+ $input1['aggregateRating']['bestRating'] = 5;
726
+ $input1['aggregateRating']['ratingValue'] = $custom_fields['saswp_tech_article_rating_value'];
727
+ $input1['aggregateRating']['ratingCount'] = $custom_fields['saswp_tech_article_rating_count'];
728
+ }
729
  break;
730
 
731
  case 'Course':
935
  if(isset($custom_fields['saswp_product_sku'])){
936
  $input1['sku'] = $custom_fields['saswp_product_sku'];
937
  }
938
+ if(isset($custom_fields['saswp_product_seller'])){
939
+ $input1['seller']['@type'] = 'Organization';
940
+ $input1['seller']['name'] = $custom_fields['saswp_product_seller'];
941
+ }
942
+
943
+ if(isset($custom_fields['saswp_product_rating']) && isset($custom_fields['saswp_product_rating_count'])){
944
+ $input1['aggregateRating']['@type'] = 'aggregateRating';
945
+ $input1['aggregateRating']['ratingValue'] = $custom_fields['saswp_product_rating'];
946
+ $input1['aggregateRating']['reviewCount'] = $custom_fields['saswp_product_rating_count'];
947
+ }
948
+
949
  break;
950
 
951
  case 'Service':
2240
  'saswp_newsarticle_author_name' => 'Author Name',
2241
  'saswp_newsarticle_author_image' => 'Author Image',
2242
  'saswp_newsarticle_organization_name' => 'Organization Name',
2243
+ 'saswp_newsarticle_organization_logo' => 'Organization Logo',
2244
+ 'saswp_newsarticle_rating_value' => 'Rating Value',
2245
+ 'saswp_newsarticle_rating_count' => 'Rating Count',
2246
  );
2247
 
2248
  break;
2280
  'saswp_article_date_modified' => 'Date Modified',
2281
  'saswp_article_author_name' => 'Author Name',
2282
  'saswp_article_organization_name' => 'Organization Name',
2283
+ 'saswp_article_organization_logo' => 'Organization Logo',
2284
+ 'saswp_article_rating_value' => 'Rating Value',
2285
+ 'saswp_article_rating_count' => 'Rating Count',
2286
 
2287
  );
2288
  break;
2303
  'saswp_tech_article_author_name' => 'Author Name',
2304
  'saswp_tech_article_organization_name' => 'Organization Name',
2305
  'saswp_tech_article_organization_logo' => 'Organization Logo',
2306
+ 'saswp_tech_article_rating_value' => 'Rating Value',
2307
+ 'saswp_tech_article_rating_count' => 'Rating Count',
2308
 
2309
  );
2310
  break;
2409
  'saswp_product_sku' => 'SKU',
2410
  'saswp_product_mpn' => 'MPN',
2411
  'saswp_product_isbn' => 'ISBN',
2412
+ 'saswp_product_gtin8' => 'GTIN 8',
2413
+ 'saswp_product_seller' => 'Seller Organization',
2414
+ 'saswp_product_rating' => 'Rating',
2415
+ 'saswp_product_rating_count' => 'Rating Count',
2416
  );
2417
  break;
2418
 
2627
  'saswp_software_schema_price_currency' => 'Price Currency',
2628
  'saswp_software_schema_date_published' => 'Date Published',
2629
  'saswp_software_schema_date_modified' => 'Date Modified',
2630
+ 'saswp_software_rating_value' => 'Rating Value',
2631
+ 'saswp_software_rating_count' => 'Rating Count',
2632
  );
2633
 
2634
  break;
3007
  $image_details = wp_get_attachment_image_src($image_id, 'full');
3008
 
3009
  if( is_array($image_details) ){
3010
+
3011
+ if(isset($image_details[1]) && ($image_details[1] < 1200) && function_exists('aq_resize')){
 
3012
 
3013
  $width = array(1280, 640, 300);
3014
  $height = array(720, 480, 300);
3015
 
3016
  for($i = 0; $i<3; $i++){
3017
 
3018
+ $resize_image = aq_resize( $image_details[0], $width[$i], $height[$i], true, false, true );
3019
 
3020
  if(isset($resize_image[0]) && isset($resize_image[1]) && isset($resize_image[2]) ){
3021
 
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.4
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -88,6 +88,7 @@ Bug reports for Schema & Structured Data for WP & AMP are [welcomed on GitHub](h
88
  * Merlin WP used https://github.com/richtabor/MerlinWP - License URI: https://github.com/richtabor/MerlinWP/blob/master/LICENSE,
89
  * jquery-timepicker used https://github.com/jonthornton/jquery-timepicker
90
  * Rate Yo! used https://github.com/prrashi/rateYo - License URI: https://github.com/prrashi/rateYo/commit/f3812fe96c38b08627d209795176053550fb1427
 
91
 
92
 
93
 
@@ -111,9 +112,24 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
111
 
112
  == Changelog ==
113
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  = 1.9.4 (03 Sept 2019) =
115
 
116
  * Added: DataFeed Schema type #411
 
117
  * Enhancement: Remove button to modified Schema Output item #456.
118
  * Bug Fixed: Compatibility code for The SEO Framework results in invalid output. #452
119
  * Bug Fixed: Custom fields for products has the wrong identifier. #453
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.5
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
88
  * Merlin WP used https://github.com/richtabor/MerlinWP - License URI: https://github.com/richtabor/MerlinWP/blob/master/LICENSE,
89
  * jquery-timepicker used https://github.com/jonthornton/jquery-timepicker
90
  * Rate Yo! used https://github.com/prrashi/rateYo - License URI: https://github.com/prrashi/rateYo/commit/f3812fe96c38b08627d209795176053550fb1427
91
+ * Aqua Resizer used http://aquagraphite.com - License URI: WTFPL - http://sam.zoy.org/wtfpl/
92
 
93
 
94
 
112
 
113
  == Changelog ==
114
 
115
+ = 1.9.5 (06 Sept 2019) =
116
+
117
+ * Added: More Organization schema type support #423
118
+ * Added: MedicalBusiness Schema type #334
119
+ * Added: Carousels (itemList) Schema type on archive post/page #306
120
+ * Added: Blog Schema type on archive post/page #460
121
+ * Added: Manual Reviews fields in the product schema #137
122
+ * Added: Aqua Resizer to fix image size is smaller than recommended in google console #435
123
+ * Enhancement: Toggle (on/off) button should be on by default on schema post specific modification #457
124
+ * Bug Fixed: Error log cluttered with php warning regarding count() / PART II #444
125
+ * Bug Fixed: Debug error logs: flexmlsConnectPageCore->__construct(NULL) #446
126
+ * Bug Fixed: In the FAQ schema fields, accepted textarea strip html tags and convert special character to encoded string. #458
127
+
128
+
129
  = 1.9.4 (03 Sept 2019) =
130
 
131
  * Added: DataFeed Schema type #411
132
+ * Added: Option to add multiple performer in event Schema type #411
133
  * Enhancement: Remove button to modified Schema Output item #456.
134
  * Bug Fixed: Compatibility code for The SEO Framework results in invalid output. #452
135
  * Bug Fixed: Custom fields for products has the wrong identifier. #453
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.4
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.4');
17
  define('SASWP_DIR_NAME_FILE', __FILE__ );
18
  define('SASWP_DIR_NAME', dirname( __FILE__ ));
19
  define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
@@ -79,6 +79,9 @@ require_once SASWP_DIR_NAME.'/reviews/reviews_admin.php';
79
  require_once SASWP_DIR_NAME.'/reviews/reviews_setup.php';
80
  require_once SASWP_DIR_NAME.'/reviews/reviews_service.php';
81
  require_once SASWP_DIR_NAME.'/reviews/reviews_widget.php';
 
 
 
82
  /**
83
  * set user defined message on plugin activate
84
  */
@@ -131,11 +134,14 @@ function saswp_admin_notice(){
131
  if(($next_days < $current_date) && $activation_never !='never' ){
132
  ?>
133
  <div class="updated notice is-dismissible message notice notice-alt saswp-feedback-notice">
134
- <p><span class="dashicons dashicons-thumbs-up"></span> <?php echo esc_html__('You have been using the Schema & structured data for wp plugin for some time now, do you like it?, If so,', 'schema-and-structured-data-for-wp') ?>
135
- <a target="_blank" href="https://wordpress.org/plugins/schema-and-structured-data-for-wp/#reviews"> <?php echo esc_html__('please write us a review', 'schema-and-structured-data-for-wp') ?></a>&nbsp;&nbsp;&nbsp;&nbsp;
136
- <a class="saswp-feedback-remindme button button-primary"><?php echo esc_html__('Remind Me Later', 'schema-and-structured-data-for-wp') ?></a>
137
- <a class="saswp-feedback-no-thanks button button-primary"><?php echo esc_html__('No Thanks', 'schema-and-structured-data-for-wp') ?></a>
138
- </p>
 
 
 
139
  </div>
140
  <?php
141
  }
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.5
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.5');
17
  define('SASWP_DIR_NAME_FILE', __FILE__ );
18
  define('SASWP_DIR_NAME', dirname( __FILE__ ));
19
  define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
79
  require_once SASWP_DIR_NAME.'/reviews/reviews_setup.php';
80
  require_once SASWP_DIR_NAME.'/reviews/reviews_service.php';
81
  require_once SASWP_DIR_NAME.'/reviews/reviews_widget.php';
82
+
83
+ //Loading Third party files
84
+ require_once SASWP_DIR_NAME.'/core/3rd-party/aqua_resizer.php';
85
  /**
86
  * set user defined message on plugin activate
87
  */
134
  if(($next_days < $current_date) && $activation_never !='never' ){
135
  ?>
136
  <div class="updated notice is-dismissible message notice notice-alt saswp-feedback-notice">
137
+ <p><span class="dashicons dashicons-thumbs-up"></span>
138
+ <?php echo esc_html__('You have been using the Schema & Structured Data for WP & AMP plugin for some time. Now, Do you like it? If Yes.', 'schema-and-structured-data-for-wp') ?>
139
+ <a class="saswp-revws-lnk" target="_blank" href="https://wordpress.org/plugins/schema-and-structured-data-for-wp/#reviews"> <?php echo esc_html__('Rate Plugin', 'schema-and-structured-data-for-wp') ?></a>
140
+ </p>
141
+ <div class="saswp-update-notice-btns">
142
+ <a class="saswp-feedback-remindme"><?php echo esc_html__('Remind Me Later', 'schema-and-structured-data-for-wp') ?></a>
143
+ <a class="saswp-feedback-no-thanks"><?php echo esc_html__('No Thanks', 'schema-and-structured-data-for-wp') ?></a>
144
+ </div>
145
  </div>
146
  <?php
147
  }
view/post_specific.php CHANGED
@@ -21,6 +21,9 @@ class saswp_post_specific {
21
  public $_local_sub_business = array();
22
 
23
  private $schema_type_element = array(
 
 
 
24
  'DataFeed' => array(
25
  'feed_element' => 'feed_element',
26
  ),
@@ -215,6 +218,34 @@ class saswp_post_specific {
215
  $meta_fields = array();
216
  switch ($meta_name) {
217
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
218
  case 'feed_element':
219
 
220
  $meta_fields = array(
@@ -527,7 +558,7 @@ class saswp_post_specific {
527
  '<textarea style="width: 100%%" id="%s" name="%s" rows="5">%s</textarea>',
528
  esc_attr($meta_field['name']).'_'.esc_attr($index).'_'.esc_attr($schema_id),
529
  esc_attr($meta_name).'_'.esc_attr($schema_id).'['.esc_attr($index).']['.esc_attr($meta_field['name']).']',
530
- esc_html($data[$meta_field['name']])
531
  );
532
 
533
  break;
@@ -597,7 +628,7 @@ class saswp_post_specific {
597
 
598
  foreach($type_fields as $key => $value){
599
 
600
- $howto_data[$value.'_'.$schema_id] = esc_sql ( get_post_meta($post_id, $value.'_'.$schema_id, true) );
601
 
602
  $tabs_fields .= '<div class="saswp-'.$key.'-section-main">';
603
  $tabs_fields .= '<div class="saswp-'.$key.'-section" data-id="'.esc_attr($schema_id).'">';
@@ -651,17 +682,18 @@ class saswp_post_specific {
651
  foreach($this->all_schema as $key => $schema){
652
 
653
  $checked = '';
654
-
655
- if(isset($schema_enable[$schema->ID]) && $schema_enable[$schema->ID] == 1){
656
 
657
- $checked = 'checked';
 
 
658
 
659
- }
660
  $response = $this->saswp_get_fields_by_schema_type($schema->ID);
661
  $this->meta_fields = $response;
662
 
663
  $output = $this->saswp_saswp_post_specific( $post, $schema->ID );
664
- $schema_type = esc_sql ( get_post_meta($schema->ID, 'schema_type', true) );
665
 
666
  if($key==0){
667
 
@@ -752,7 +784,7 @@ class saswp_post_specific {
752
  $response = $this->saswp_get_fields_by_schema_type($all_schema[0]->ID);
753
 
754
  $schema_ids[] = $all_schema[0]->ID;
755
- $schema_type = esc_sql ( get_post_meta($all_schema[0]->ID, 'schema_type', true) );
756
  $checked = '';
757
  if(isset($schema_enable[$all_schema[0]->ID]) && $schema_enable[$all_schema[0]->ID] == 1){
758
  $checked = 'checked';
@@ -962,7 +994,7 @@ class saswp_post_specific {
962
 
963
  $current_user = wp_get_current_user();
964
  $author_details = get_avatar_data($current_user->ID);
965
- $schema_type = esc_sql ( get_post_meta($schema_id, 'schema_type', true) );
966
  $output = '';
967
 
968
  $this->meta_fields = array_filter($this->meta_fields);
@@ -1017,7 +1049,7 @@ class saswp_post_specific {
1017
  }
1018
  if (strpos($meta_field['id'], 'business_logo') !== false && empty($media_value_meta)) {
1019
 
1020
- $business_details = esc_sql ( get_post_meta($schema_id, 'saswp_local_business_details', true) );
1021
  if(array_key_exists('local_business_logo', $business_details) && is_array($business_details['local_business_logo'])){
1022
 
1023
  $media_value['height'] = $business_details['local_business_logo']['height'];
@@ -1030,7 +1062,7 @@ class saswp_post_specific {
1030
 
1031
  if (strpos($meta_field['id'], 'service_schema_image') !== false && empty($media_value_meta)) {
1032
 
1033
- $business_details = esc_sql ( get_post_meta($schema_id, 'saswp_service_schema_details', true) );
1034
 
1035
  if(array_key_exists('saswp_service_schema_image', $business_details) && is_array($business_details['saswp_service_schema_image'])){
1036
  $media_value['height'] = $business_details['saswp_service_schema_image']['height'];
@@ -1042,7 +1074,7 @@ class saswp_post_specific {
1042
 
1043
  if (strpos($meta_field['id'], 'review_schema_image') !== false && empty($media_value_meta)) {
1044
 
1045
- $business_details = esc_sql ( get_post_meta($schema_id, 'saswp_review_schema_details', true) );
1046
  if(array_key_exists('saswp_review_schema_image', $business_details) && is_array($business_details['saswp_review_schema_image'])){
1047
  $media_value['height'] = $business_details['saswp_review_schema_image']['height'];
1048
  $media_value['width'] = $business_details['saswp_review_schema_image']['width'];
@@ -1051,7 +1083,7 @@ class saswp_post_specific {
1051
  }
1052
  if (strpos($meta_field['id'], 'event_schema_image') !== false && empty($media_value_meta)) {
1053
 
1054
- $business_details = esc_sql ( get_post_meta($schema_id, 'saswp_event_schema_details', true) );
1055
  if(array_key_exists('saswp_event_schema_image', $business_details) && is_array($business_details['saswp_event_schema_image'])){
1056
  $media_value['height'] = $business_details['saswp_event_schema_image']['height'];
1057
  $media_value['width'] = $business_details['saswp_event_schema_image']['width'];
@@ -1316,8 +1348,7 @@ class saswp_post_specific {
1316
 
1317
  $custom_schema = sanitize_textarea_field($_POST['saswp_custom_schema_field']);
1318
  update_post_meta( $post_id, 'saswp_custom_schema_field', $custom_schema );
1319
-
1320
-
1321
  if($option != 'enable'){
1322
  return;
1323
  }
@@ -1346,10 +1377,17 @@ class saswp_post_specific {
1346
  $data = (array) $_POST[$val.'_'.$schema->ID];
1347
 
1348
  foreach ($data as $supply){
1349
-
1350
- $element_val[] = array_map( 'sanitize_text_field', $supply );
 
 
 
 
 
 
1351
 
1352
  }
 
1353
  update_post_meta( $post_id, $val.'_'.intval($schema->ID), $element_val);
1354
 
1355
  }
@@ -1386,15 +1424,18 @@ class saswp_post_specific {
1386
  case 'text':
1387
  $post_meta[ $meta_field['id'] ] = sanitize_text_field( $post_meta[ $meta_field['id'] ] );
1388
  break;
 
 
 
1389
  default:
1390
- $post_meta[ $meta_field['id'] ] = sanitize_text_field( $post_meta[ $meta_field['id'] ] );
1391
 
1392
  }
1393
  update_post_meta( $post_id, $meta_field['id'], $post_meta[ $meta_field['id'] ] );
1394
  } else if ( $meta_field['type'] === 'checkbox' ) {
1395
  update_post_meta( $post_id, $meta_field['id'], '0' );
1396
  }
1397
- }
1398
 
1399
  }
1400
  }
@@ -1453,11 +1494,11 @@ class saswp_post_specific {
1453
  $current_user = wp_get_current_user();
1454
  $author_desc = get_the_author_meta( 'user_description' );
1455
  $author_details = get_avatar_data($current_user->ID);
1456
- $schema_type = esc_sql ( get_post_meta($schema_id, 'schema_type', true) );
1457
 
1458
- $business_type = esc_sql ( get_post_meta($schema_id, 'saswp_business_type', true) );
1459
- $business_name = esc_sql ( get_post_meta($schema_id, 'saswp_business_name', true) );
1460
- $business_details = esc_sql ( get_post_meta($schema_id, 'saswp_local_business_details', true) );
1461
  $dayoftheweek = get_post_meta ($schema_id, 'saswp_dayofweek', true);
1462
 
1463
  $saswp_business_type_key = 'saswp_business_type_'.$schema_id;
@@ -2163,7 +2204,7 @@ class saswp_post_specific {
2163
 
2164
  case 'Event':
2165
 
2166
- $event_schema_details = esc_sql ( get_post_meta($schema_id, 'saswp_event_schema_details', true) );
2167
  $meta_field = array(
2168
  array(
2169
  'label' => 'Name',
@@ -2785,6 +2826,11 @@ class saswp_post_specific {
2785
  'label' => 'GTIN8',
2786
  'id' => 'saswp_product_schema_gtin8_'.$schema_id,
2787
  'type' => 'text',
 
 
 
 
 
2788
  ),
2789
  array(
2790
  'label' => 'Aggregate Rating',
@@ -2809,7 +2855,7 @@ class saswp_post_specific {
2809
  break;
2810
 
2811
  case 'Service':
2812
- $service_schema_details = esc_sql ( get_post_meta($schema_id, 'saswp_service_schema_details', true) );
2813
  $meta_field = array(
2814
  array(
2815
  'label' => 'Name',
@@ -2936,7 +2982,7 @@ class saswp_post_specific {
2936
 
2937
  }else{
2938
 
2939
- $item_type_by_post = esc_sql ( get_post_meta($post->ID, 'saswp_review_schema_item_type_'.$schema_id, true) );
2940
 
2941
  if($item_type_by_post){
2942
 
@@ -2944,7 +2990,7 @@ class saswp_post_specific {
2944
 
2945
  }else{
2946
 
2947
- $service_schema_details = esc_sql ( get_post_meta($schema_id, 'saswp_review_schema_details', true) );
2948
  $reviewed_field = saswp_item_reviewed_fields($service_schema_details['saswp_review_schema_item_type'], $post_specific=1, $schema_id);
2949
 
2950
  }
@@ -3006,7 +3052,7 @@ class saswp_post_specific {
3006
 
3007
  case 'AudioObject':
3008
 
3009
- $service_schema_details = esc_sql ( get_post_meta($schema_id, 'saswp_audio_schema_details', true) );
3010
  $meta_field = array(
3011
 
3012
  array(
@@ -3069,7 +3115,7 @@ class saswp_post_specific {
3069
 
3070
  case 'SoftwareApplication':
3071
 
3072
- $software_schema_details = esc_sql ( get_post_meta($schema_id, 'saswp_software_schema_details', true) );
3073
  $meta_field = array(
3074
 
3075
  array(
21
  public $_local_sub_business = array();
22
 
23
  private $schema_type_element = array(
24
+ 'Product' => array(
25
+ 'product_reviews' => 'product_reviews',
26
+ ),
27
  'DataFeed' => array(
28
  'feed_element' => 'feed_element',
29
  ),
218
  $meta_fields = array();
219
  switch ($meta_name) {
220
 
221
+ case 'product_reviews':
222
+
223
+ $meta_fields = array(
224
+
225
+ array(
226
+ 'label' => 'Reviewer Name',
227
+ 'name' => 'saswp_product_reviews_reviewer_name',
228
+ 'type' => 'text',
229
+ ),
230
+ array(
231
+ 'label' => 'Rating',
232
+ 'name' => 'saswp_product_reviews_reviewer_rating',
233
+ 'type' => 'number',
234
+ ),
235
+ array(
236
+ 'label' => 'Text',
237
+ 'name' => 'saswp_product_reviews_text',
238
+ 'type' => 'textarea',
239
+ ),
240
+ array(
241
+ 'label' => 'Created Date',
242
+ 'name' => 'saswp_product_reviews_created_date',
243
+ 'type' => 'text',
244
+ )
245
+ );
246
+
247
+ break;
248
+
249
  case 'feed_element':
250
 
251
  $meta_fields = array(
558
  '<textarea style="width: 100%%" id="%s" name="%s" rows="5">%s</textarea>',
559
  esc_attr($meta_field['name']).'_'.esc_attr($index).'_'.esc_attr($schema_id),
560
  esc_attr($meta_name).'_'.esc_attr($schema_id).'['.esc_attr($index).']['.esc_attr($meta_field['name']).']',
561
+ esc_textarea($data[$meta_field['name']])
562
  );
563
 
564
  break;
628
 
629
  foreach($type_fields as $key => $value){
630
 
631
+ $howto_data[$value.'_'.$schema_id] = get_post_meta($post_id, $value.'_'.$schema_id, true);
632
 
633
  $tabs_fields .= '<div class="saswp-'.$key.'-section-main">';
634
  $tabs_fields .= '<div class="saswp-'.$key.'-section" data-id="'.esc_attr($schema_id).'">';
682
  foreach($this->all_schema as $key => $schema){
683
 
684
  $checked = '';
685
+
686
+ if(!isset($schema_enable[$schema->ID]) || $schema_enable[$schema->ID] == 1){
687
 
688
+ $checked = 'checked';
689
+
690
+ }
691
 
 
692
  $response = $this->saswp_get_fields_by_schema_type($schema->ID);
693
  $this->meta_fields = $response;
694
 
695
  $output = $this->saswp_saswp_post_specific( $post, $schema->ID );
696
+ $schema_type = get_post_meta($schema->ID, 'schema_type', true);
697
 
698
  if($key==0){
699
 
784
  $response = $this->saswp_get_fields_by_schema_type($all_schema[0]->ID);
785
 
786
  $schema_ids[] = $all_schema[0]->ID;
787
+ $schema_type = get_post_meta($all_schema[0]->ID, 'schema_type', true);
788
  $checked = '';
789
  if(isset($schema_enable[$all_schema[0]->ID]) && $schema_enable[$all_schema[0]->ID] == 1){
790
  $checked = 'checked';
994
 
995
  $current_user = wp_get_current_user();
996
  $author_details = get_avatar_data($current_user->ID);
997
+ $schema_type = get_post_meta($schema_id, 'schema_type', true);
998
  $output = '';
999
 
1000
  $this->meta_fields = array_filter($this->meta_fields);
1049
  }
1050
  if (strpos($meta_field['id'], 'business_logo') !== false && empty($media_value_meta)) {
1051
 
1052
+ $business_details = get_post_meta($schema_id, 'saswp_local_business_details', true);
1053
  if(array_key_exists('local_business_logo', $business_details) && is_array($business_details['local_business_logo'])){
1054
 
1055
  $media_value['height'] = $business_details['local_business_logo']['height'];
1062
 
1063
  if (strpos($meta_field['id'], 'service_schema_image') !== false && empty($media_value_meta)) {
1064
 
1065
+ $business_details = get_post_meta($schema_id, 'saswp_service_schema_details', true);
1066
 
1067
  if(array_key_exists('saswp_service_schema_image', $business_details) && is_array($business_details['saswp_service_schema_image'])){
1068
  $media_value['height'] = $business_details['saswp_service_schema_image']['height'];
1074
 
1075
  if (strpos($meta_field['id'], 'review_schema_image') !== false && empty($media_value_meta)) {
1076
 
1077
+ $business_details = get_post_meta($schema_id, 'saswp_review_schema_details', true);
1078
  if(array_key_exists('saswp_review_schema_image', $business_details) && is_array($business_details['saswp_review_schema_image'])){
1079
  $media_value['height'] = $business_details['saswp_review_schema_image']['height'];
1080
  $media_value['width'] = $business_details['saswp_review_schema_image']['width'];
1083
  }
1084
  if (strpos($meta_field['id'], 'event_schema_image') !== false && empty($media_value_meta)) {
1085
 
1086
+ $business_details = get_post_meta($schema_id, 'saswp_event_schema_details', true);
1087
  if(array_key_exists('saswp_event_schema_image', $business_details) && is_array($business_details['saswp_event_schema_image'])){
1088
  $media_value['height'] = $business_details['saswp_event_schema_image']['height'];
1089
  $media_value['width'] = $business_details['saswp_event_schema_image']['width'];
1348
 
1349
  $custom_schema = sanitize_textarea_field($_POST['saswp_custom_schema_field']);
1350
  update_post_meta( $post_id, 'saswp_custom_schema_field', $custom_schema );
1351
+
 
1352
  if($option != 'enable'){
1353
  return;
1354
  }
1377
  $data = (array) $_POST[$val.'_'.$schema->ID];
1378
 
1379
  foreach ($data as $supply){
1380
+
1381
+ $sanitize_data = array();
1382
+
1383
+ foreach($supply as $k => $el){
1384
+ $sanitize_data[$k] = wp_kses_post(wp_unslash($el));
1385
+ }
1386
+
1387
+ $element_val[] = $sanitize_data;
1388
 
1389
  }
1390
+
1391
  update_post_meta( $post_id, $val.'_'.intval($schema->ID), $element_val);
1392
 
1393
  }
1424
  case 'text':
1425
  $post_meta[ $meta_field['id'] ] = sanitize_text_field( $post_meta[ $meta_field['id'] ] );
1426
  break;
1427
+ case 'textarea':
1428
+ $post_meta[ $meta_field['id'] ] = sanitize_textarea_field( $post_meta[ $meta_field['id'] ] );
1429
+ break;
1430
  default:
1431
+ $post_meta[ $meta_field['id'] ] = wp_unslash( $post_meta[ $meta_field['id'] ] );
1432
 
1433
  }
1434
  update_post_meta( $post_id, $meta_field['id'], $post_meta[ $meta_field['id'] ] );
1435
  } else if ( $meta_field['type'] === 'checkbox' ) {
1436
  update_post_meta( $post_id, $meta_field['id'], '0' );
1437
  }
1438
+ }
1439
 
1440
  }
1441
  }
1494
  $current_user = wp_get_current_user();
1495
  $author_desc = get_the_author_meta( 'user_description' );
1496
  $author_details = get_avatar_data($current_user->ID);
1497
+ $schema_type = get_post_meta($schema_id, 'schema_type', true);
1498
 
1499
+ $business_type = get_post_meta($schema_id, 'saswp_business_type', true);
1500
+ $business_name = get_post_meta($schema_id, 'saswp_business_name', true);
1501
+ $business_details = get_post_meta($schema_id, 'saswp_local_business_details', true);
1502
  $dayoftheweek = get_post_meta ($schema_id, 'saswp_dayofweek', true);
1503
 
1504
  $saswp_business_type_key = 'saswp_business_type_'.$schema_id;
2204
 
2205
  case 'Event':
2206
 
2207
+ $event_schema_details = get_post_meta($schema_id, 'saswp_event_schema_details', true);
2208
  $meta_field = array(
2209
  array(
2210
  'label' => 'Name',
2826
  'label' => 'GTIN8',
2827
  'id' => 'saswp_product_schema_gtin8_'.$schema_id,
2828
  'type' => 'text',
2829
+ ),
2830
+ array(
2831
+ 'label' => 'Seller Organization',
2832
+ 'id' => 'saswp_product_schema_seller_'.$schema_id,
2833
+ 'type' => 'text',
2834
  ),
2835
  array(
2836
  'label' => 'Aggregate Rating',
2855
  break;
2856
 
2857
  case 'Service':
2858
+ $service_schema_details = get_post_meta($schema_id, 'saswp_service_schema_details', true);
2859
  $meta_field = array(
2860
  array(
2861
  'label' => 'Name',
2982
 
2983
  }else{
2984
 
2985
+ $item_type_by_post = get_post_meta($post->ID, 'saswp_review_schema_item_type_'.$schema_id, true);
2986
 
2987
  if($item_type_by_post){
2988
 
2990
 
2991
  }else{
2992
 
2993
+ $service_schema_details = get_post_meta($schema_id, 'saswp_review_schema_details', true);
2994
  $reviewed_field = saswp_item_reviewed_fields($service_schema_details['saswp_review_schema_item_type'], $post_specific=1, $schema_id);
2995
 
2996
  }
3052
 
3053
  case 'AudioObject':
3054
 
3055
+ $service_schema_details = get_post_meta($schema_id, 'saswp_audio_schema_details', true);
3056
  $meta_field = array(
3057
 
3058
  array(
3115
 
3116
  case 'SoftwareApplication':
3117
 
3118
+ $software_schema_details = get_post_meta($schema_id, 'saswp_software_schema_details', true);
3119
  $meta_field = array(
3120
 
3121
  array(
view/schema_type.php CHANGED
@@ -594,63 +594,63 @@ function saswp_schema_type_meta_box_callback( $post) {
594
 
595
  if($post){
596
 
597
- $schema_options = esc_sql ( get_post_meta($post->ID, 'schema_options', true) );
598
- $meta_list = esc_sql ( get_post_meta($post->ID, 'saswp_meta_list_val', true) );
599
- $fixed_text = esc_sql ( get_post_meta($post->ID, 'saswp_fixed_text', true) );
600
- $cus_field = esc_sql ( get_post_meta($post->ID, 'saswp_custom_meta_field', true) );
601
 
602
- $schema_type = esc_sql ( get_post_meta($post->ID, 'schema_type', true) );
603
 
604
  switch ($schema_type) {
605
 
606
  case 'AudioObject':
607
 
608
- $audio_details = esc_sql ( get_post_meta($post->ID, 'saswp_audio_schema_details', true) );
609
 
610
  break;
611
 
612
  case 'SoftwareApplication':
613
 
614
- $software_details = esc_sql ( get_post_meta($post->ID, 'saswp_software_schema_details', true) );
615
 
616
  break;
617
 
618
  case 'local_business':
619
 
620
- $business_type = esc_sql ( get_post_meta($post->ID, 'saswp_business_type', true) );
621
- $business_name = esc_sql ( get_post_meta($post->ID, 'saswp_business_name', true) );
622
- $business_details = esc_sql ( get_post_meta($post->ID, 'saswp_local_business_details', true) );
623
  $dayoftheweek = get_post_meta($post->ID, 'saswp_dayofweek', true);
624
 
625
  break;
626
 
627
  case 'Product':
628
 
629
- $product_details = esc_sql ( get_post_meta($post->ID, 'saswp_product_schema_details', true) );
630
 
631
  break;
632
 
633
  case 'Service':
634
 
635
- $service_details = esc_sql ( get_post_meta($post->ID, 'saswp_service_schema_details', true) );
636
 
637
  break;
638
 
639
  case 'Review':
640
 
641
- $review_details = esc_sql ( get_post_meta($post->ID, 'saswp_review_schema_details', true) );
642
 
643
  break;
644
 
645
  case 'Event':
646
 
647
- $event_details = esc_sql ( get_post_meta($post->ID, 'saswp_event_schema_details', true) );
648
 
649
  break;
650
 
651
  default:
652
 
653
- $speakable = esc_sql ( get_post_meta($post->ID, 'saswp_enable_speakable_schema', true) );
654
 
655
  break;
656
  }
@@ -716,6 +716,14 @@ function saswp_schema_type_meta_box_callback( $post) {
716
  if ( file_exists( $mappings_file ) ) {
717
  $all_schema_array = include $mappings_file;
718
  }
 
 
 
 
 
 
 
 
719
 
720
  $all_business_type = array(
721
  '' => 'Select Business Type (Optional)',
@@ -736,6 +744,7 @@ function saswp_schema_type_meta_box_callback( $post) {
736
  'legalservice' => 'Legal Service',
737
  'library' => 'Library',
738
  'lodgingbusiness' => 'Lodging Business',
 
739
  'professionalservice' => 'Professional Service',
740
  'radiostation' => 'Radio Station',
741
  'realestateagent' => 'Real Estate Agent',
@@ -749,140 +758,18 @@ function saswp_schema_type_meta_box_callback( $post) {
749
  'travelagency' => 'Travel Agency',
750
  );
751
 
752
- $all_automotive_array = array(
753
- '' => 'Select Sub Business Type ( optional )',
754
- 'autobodyshop' => 'Auto Body Shop',
755
- 'autodealer' => 'Auto Dealer',
756
- 'autopartsstore' => 'Auto Parts Store',
757
- 'autorental' => 'Auto Rental',
758
- 'autorepair' => 'Auto Repair',
759
- 'autowash' => 'Auto Wash',
760
- 'gasstation' => 'Gas Station',
761
- 'motorcycledealer' => 'Motorcycle Dealer',
762
- 'motorcyclerepair' => 'Motorcycle Repair'
763
- );
764
-
765
- $all_emergency_array = array(
766
- '' => 'Select Sub Business Type ( optional )',
767
- 'firestation' => 'Fire Station',
768
- 'hospital' => 'Hospital',
769
- 'policestation' => 'Police Station',
770
- );
771
- $all_entertainment_array = array(
772
- '' => 'Select Sub Business Type ( optional )',
773
- 'adultentertainment' => 'Adult Entertainment',
774
- 'amusementpark' => 'Amusement Park',
775
- 'artgallery' => 'Art Gallery',
776
- 'casino' => 'Casino',
777
- 'comedyclub' => 'Comedy Club',
778
- 'movietheater' => 'Movie Theater',
779
- 'nightclub' => 'Night Club',
780
-
781
- );
782
- $all_financial_array = array(
783
- '' => 'Select Sub Business Type ( optional )',
784
- 'accountingservice' => 'Accounting Service',
785
- 'automatedteller' => 'Automated Teller',
786
- 'bankorcredit_union' => 'Bank Or Credit Union',
787
- 'insuranceagency' => 'Insurance Agency',
788
-
789
- );
790
-
791
- $all_food_establishment_array = array(
792
- '' => 'Select Sub Business Type ( optional )',
793
- 'bakery' => 'Bakery',
794
- 'barorpub' => 'Bar Or Pub',
795
- 'brewery' => 'Brewery',
796
- 'cafeorcoffee_shop' => 'Cafe Or Coffee Shop',
797
- 'fastfoodrestaurant' => 'Fast Food Restaurant',
798
- 'icecreamshop' => 'Ice Cream Shop',
799
- 'restaurant' => 'Restaurant',
800
- 'winery' => 'Winery',
801
-
802
- );
803
- $all_health_and_beauty_array = array(
804
- '' => 'Select Sub Business Type ( optional )',
805
- 'beautysalon' => 'Beauty Salon',
806
- 'dayspa' => 'DaySpa',
807
- 'hairsalon' => 'Hair Salon',
808
- 'healthclub' => 'Health Club',
809
- 'nailsalon' => 'Nail Salon',
810
- 'tattooparlor' => 'Tattoo Parlor',
811
- );
812
-
813
- $all_home_and_construction_array = array(
814
- '' => 'Select Sub Business Type ( optional )',
815
- 'electrician' => 'Electrician',
816
- 'generalcontractor' => 'General Contractor',
817
- 'hvacbusiness' => 'HVAC Business',
818
- 'locksmith' => 'Locksmith',
819
- 'movingcompany' => 'Moving Company',
820
- 'plumber' => 'Plumber',
821
- 'roofingcontractor' => 'Roofing Contractor',
822
- 'housepainter' => 'House Painter',
823
- );
824
-
825
- $all_legal_service_array = array(
826
- '' => 'Select Sub Business Type ( optional )',
827
- 'attorney' => 'Attorney',
828
- 'notary' => 'Notary',
829
- );
830
-
831
- $all_lodging_array = array(
832
- '' => 'Select Sub Business Type ( optional )',
833
- 'bedandbreakfast' => 'Bed And Breakfast',
834
- 'campground' => 'Campground',
835
- 'hostel' => 'Hostel',
836
- 'hotel' => 'Hotel',
837
- 'motel' => 'Motel',
838
- 'resort' => 'Resort',
839
- );
840
-
841
- $all_sports_activity_location = array(
842
- '' => 'Select Sub Business Type ( optional )',
843
- 'bowlingalley' => 'Bowling Alley',
844
- 'exercisegym' => 'Exercise Gym',
845
- 'golfcourse' => 'Golf Course',
846
- 'healthclub' => 'Health Club',
847
- 'publicswimming_pool' => 'Public Swimming Pool',
848
- 'skiresort' => 'Ski Resort',
849
- 'sportsclub' => 'Sports Club',
850
- 'stadiumorarena' => 'Stadium Or Arena',
851
- 'tenniscomplex' => 'Tennis Complex'
852
- );
853
- $all_store = array(
854
- '' => 'Select Sub Business Type ( optional )',
855
- 'autopartsstore' => 'Auto Parts Store',
856
- 'bikestore' => 'Bike Store',
857
- 'bookstore' => 'Book Store',
858
- 'clothingstore' => 'Clothing Store',
859
- 'computerstore' => 'Computer Store',
860
- 'conveniencestore' => 'Convenience Store',
861
- 'departmentstore' => 'Department Store',
862
- 'electronicsstore' => 'Electronics Store',
863
- 'florist' => 'Florist',
864
- 'furniturestore' => 'Furniture Store',
865
- 'gardenstore' => 'Garden Store',
866
- 'grocerystore' => 'Grocery Store',
867
- 'hardwarestore' => 'Hardware Store',
868
- 'hobbyshop' => 'Hobby Shop',
869
- 'homegoodsstore' => 'HomeGoods Store',
870
- 'jewelrystore' => 'Jewelry Store',
871
- 'liquorstore' => 'Liquor Store',
872
- 'mensclothingstore' => 'Mens Clothing Store',
873
- 'mobilephonestore' => 'Mobile Phone Store',
874
- 'movierentalstore' => 'Movie Rental Store',
875
- 'musicstore' => 'Music Store',
876
- 'officeequipmentstore' => 'Office Equipment Store',
877
- 'outletstore' => 'Outlet Store',
878
- 'pawnshop' => 'Pawn Shop',
879
- 'petstore' => 'Pet Store',
880
- 'shoestore' => 'Shoe Store',
881
- 'sportinggoodsstore' => 'Sporting Goods Store',
882
- 'tireshop' => 'Tire Shop',
883
- 'toystore' => 'Toy Store',
884
- 'wholesalestore' => 'Wholesale Store'
885
- );
886
  ?>
887
  <!-- Below variable $style_business_type is static -->
888
  <div class="misc-pub-section">
@@ -993,6 +880,25 @@ function saswp_schema_type_meta_box_callback( $post) {
993
  </select>
994
  </td>
995
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
996
  <tr class="saswp-financialservice-tr" <?php if(!array_key_exists($business_name, $all_financial_array)){ echo 'style="display:none;"';}else{ echo $style_business_name;} ?>>
997
  <td><?php echo esc_html__('Sub Business Type', 'schema-and-structured-data-for-wp' ); ?></td>
998
  <td>
@@ -1606,7 +1512,7 @@ function saswp_schema_type_meta_box_callback( $post) {
1606
 
1607
  if(!empty($meta_list)){
1608
 
1609
- $schema_type = esc_sql ( get_post_meta($post->ID, 'schema_type', true) );
1610
 
1611
  $service = new saswp_output_service();
1612
  $meta_fields = $service->saswp_get_all_schema_type_fields($schema_type);
594
 
595
  if($post){
596
 
597
+ $schema_options = get_post_meta($post->ID, 'schema_options', true);
598
+ $meta_list = get_post_meta($post->ID, 'saswp_meta_list_val', true);
599
+ $fixed_text = get_post_meta($post->ID, 'saswp_fixed_text', true);
600
+ $cus_field = get_post_meta($post->ID, 'saswp_custom_meta_field', true);
601
 
602
+ $schema_type = get_post_meta($post->ID, 'schema_type', true);
603
 
604
  switch ($schema_type) {
605
 
606
  case 'AudioObject':
607
 
608
+ $audio_details = get_post_meta($post->ID, 'saswp_audio_schema_details', true);
609
 
610
  break;
611
 
612
  case 'SoftwareApplication':
613
 
614
+ $software_details = get_post_meta($post->ID, 'saswp_software_schema_details', true);
615
 
616
  break;
617
 
618
  case 'local_business':
619
 
620
+ $business_type = get_post_meta($post->ID, 'saswp_business_type', true);
621
+ $business_name = get_post_meta($post->ID, 'saswp_business_name', true);
622
+ $business_details = get_post_meta($post->ID, 'saswp_local_business_details', true);
623
  $dayoftheweek = get_post_meta($post->ID, 'saswp_dayofweek', true);
624
 
625
  break;
626
 
627
  case 'Product':
628
 
629
+ $product_details = get_post_meta($post->ID, 'saswp_product_schema_details', true);
630
 
631
  break;
632
 
633
  case 'Service':
634
 
635
+ $service_details = get_post_meta($post->ID, 'saswp_service_schema_details', true);
636
 
637
  break;
638
 
639
  case 'Review':
640
 
641
+ $review_details = get_post_meta($post->ID, 'saswp_review_schema_details', true);
642
 
643
  break;
644
 
645
  case 'Event':
646
 
647
+ $event_details = get_post_meta($post->ID, 'saswp_event_schema_details', true);
648
 
649
  break;
650
 
651
  default:
652
 
653
+ $speakable = get_post_meta($post->ID, 'saswp_enable_speakable_schema', true);
654
 
655
  break;
656
  }
716
  if ( file_exists( $mappings_file ) ) {
717
  $all_schema_array = include $mappings_file;
718
  }
719
+
720
+ $mappings_sub_business = SASWP_DIR_NAME . '/core/array-list/local-sub-business.php';
721
+
722
+ if ( file_exists( $mappings_sub_business ) ) {
723
+ $sub_business_arr = include $mappings_sub_business;
724
+ }
725
+
726
+
727
 
728
  $all_business_type = array(
729
  '' => 'Select Business Type (Optional)',
744
  'legalservice' => 'Legal Service',
745
  'library' => 'Library',
746
  'lodgingbusiness' => 'Lodging Business',
747
+ 'medicalbusiness' => 'Medical Business',
748
  'professionalservice' => 'Professional Service',
749
  'radiostation' => 'Radio Station',
750
  'realestateagent' => 'Real Estate Agent',
758
  'travelagency' => 'Travel Agency',
759
  );
760
 
761
+ $all_medical_business_array = $sub_business_arr['medicalbusiness'];
762
+ $all_automotive_array = $sub_business_arr['automotivebusiness'];
763
+ $all_emergency_array = $sub_business_arr['emergencyservice'];
764
+ $all_entertainment_array = $sub_business_arr['entertainmentbusiness'];
765
+ $all_financial_array = $sub_business_arr['financialservice'];
766
+ $all_food_establishment_array = $sub_business_arr['foodestablishment'];
767
+ $all_health_and_beauty_array = $sub_business_arr['healthandbeautybusiness'];
768
+ $all_home_and_construction_array = $sub_business_arr['homeandconstructionbusiness'];
769
+ $all_legal_service_array = $sub_business_arr['legalservice'];
770
+ $all_lodging_array = $sub_business_arr['lodgingbusiness'];
771
+ $all_sports_activity_location = $sub_business_arr['sportsactivitylocation'];
772
+ $all_store = $sub_business_arr['store'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
773
  ?>
774
  <!-- Below variable $style_business_type is static -->
775
  <div class="misc-pub-section">
880
  </select>
881
  </td>
882
  </tr>
883
+
884
+ <tr class="saswp-medicalbusiness-tr" <?php if(!array_key_exists($business_name, $all_medical_business_array)){ echo 'style="display:none;"';}else{ echo $style_business_name;} ?>>
885
+ <td><?php echo esc_html__('Sub Business Type', 'schema-and-structured-data-for-wp' ); ?></td>
886
+ <td>
887
+ <select id="saswp_medicalbusiness" name="saswp_business_name">
888
+ <?php
889
+
890
+ foreach ($all_medical_business_array as $key => $value) {
891
+ $sel = '';
892
+ if($business_name == $key){
893
+ $sel = 'selected';
894
+ }
895
+ echo "<option value='".esc_attr($key)."' ".esc_attr($sel).">".esc_html__($value, 'schema-and-structured-data-for-wp' )."</option>";
896
+ }
897
+ ?>
898
+ </select>
899
+ </td>
900
+ </tr>
901
+
902
  <tr class="saswp-financialservice-tr" <?php if(!array_key_exists($business_name, $all_financial_array)){ echo 'style="display:none;"';}else{ echo $style_business_name;} ?>>
903
  <td><?php echo esc_html__('Sub Business Type', 'schema-and-structured-data-for-wp' ); ?></td>
904
  <td>
1512
 
1513
  if(!empty($meta_list)){
1514
 
1515
+ $schema_type = get_post_meta($post->ID, 'schema_type', true);
1516
 
1517
  $service = new saswp_output_service();
1518
  $meta_fields = $service->saswp_get_all_schema_type_fields($schema_type);