Version Description
(11 Nov 2022) =
- Added: Need to create an About option in the Artical Schema.. #1761
- Fixed: Deprecated Warning in PHP Version 8.0.13 #1763
- Fixed: PHP Notice: Undefined index #1765
- Fixed: The option "Business Type" under local business schema type is not visible anymore. #1766
- Added: Divi builder with schema in duplicate content url ( video url ) and url is not valid #1770
- Added: Nested custom field mapping does not work need to improve it. #1777
- Fixed: Need to fix the warning in error log #1773
Download this release
Release Info
Developer | magazine3 |
Plugin | Schema & Structured Data for WP & AMP |
Version | 1.9.104 |
Comparing to | |
See all releases |
Code changes from version 1.9.103 to 1.9.104
- admin_section/common-function.php +24 -12
- admin_section/js/main-script.js +8 -0
- admin_section/js/main-script.min.js +1 -1
- admin_section/js/saswp-add-new.js +9 -4
- admin_section/js/saswp-add-new.min.js +1 -1
- core/array-list/schema-properties.php +110 -2
- modules/reviews/reviews_collection.php +6 -2
- modules/reviews/reviews_service.php +16 -9
- output/function.php +3 -1
- output/markup.php +60 -21
- output/output.php +2 -3
- output/service.php +1198 -239
- readme.txt +12 -2
- structured-data-for-wp.php +2 -2
- view/common.php +6 -4
- view/schema_type.php +1 -0
admin_section/common-function.php
CHANGED
@@ -3434,6 +3434,8 @@ function saswp_is_date_field($date_str){
|
|
3434 |
|
3435 |
}
|
3436 |
|
|
|
|
|
3437 |
function saswp_get_video_metadata($content = ''){
|
3438 |
|
3439 |
global $post, $sd_data;
|
@@ -3462,7 +3464,7 @@ function saswp_get_video_metadata($content = ''){
|
|
3462 |
|
3463 |
if(strpos($value, 'http')!== false){
|
3464 |
|
3465 |
-
$response[]['video_url'] = $value;
|
3466 |
|
3467 |
}
|
3468 |
}
|
@@ -3488,7 +3490,7 @@ function saswp_get_video_metadata($content = ''){
|
|
3488 |
if(isset($attr['ids'])){
|
3489 |
|
3490 |
$vurl = wp_get_attachment_url($attr['ids']);
|
3491 |
-
$response[]['video_url'] = $vurl;
|
3492 |
|
3493 |
}
|
3494 |
|
@@ -3502,7 +3504,7 @@ function saswp_get_video_metadata($content = ''){
|
|
3502 |
|
3503 |
foreach($matches as $match){
|
3504 |
|
3505 |
-
$vurl = $match[0];
|
3506 |
$metadata = array();
|
3507 |
if(isset($sd_data['saswp-youtube-api']) && $sd_data['saswp-youtube-api'] != ''){
|
3508 |
|
@@ -3549,7 +3551,7 @@ function saswp_get_video_metadata($content = ''){
|
|
3549 |
if(!empty($youtubematches)){
|
3550 |
|
3551 |
foreach($youtubematches as $match){
|
3552 |
-
$vurl = $match[1].'youtu.be'.$match[2];
|
3553 |
$metadata = array();
|
3554 |
|
3555 |
if(isset($sd_data['saswp-youtube-api']) && $sd_data['saswp-youtube-api'] != ''){
|
@@ -3592,7 +3594,7 @@ function saswp_get_video_metadata($content = ''){
|
|
3592 |
$temp_aray = array();
|
3593 |
foreach($attributes as $match){
|
3594 |
if(!empty($match['attrs']['url'])){
|
3595 |
-
$vurl = $match['attrs']['url'];
|
3596 |
|
3597 |
$metadata = array();
|
3598 |
if(isset($sd_data['saswp-youtube-api']) && $sd_data['saswp-youtube-api'] != ''){
|
@@ -3620,28 +3622,38 @@ function saswp_get_video_metadata($content = ''){
|
|
3620 |
}
|
3621 |
}
|
3622 |
|
3623 |
-
$result =
|
3624 |
|
3625 |
return $result;
|
3626 |
}
|
3627 |
|
3628 |
-
function
|
3629 |
$temp_array = array();
|
3630 |
$i = 0;
|
3631 |
$key_array = array();
|
3632 |
if(!empty($array) && !empty($key)){
|
3633 |
foreach($array as $val) {
|
3634 |
if(isset($val[$key])){
|
3635 |
-
|
3636 |
-
|
3637 |
-
$
|
3638 |
-
|
3639 |
-
|
|
|
|
|
|
|
3640 |
}
|
3641 |
}
|
3642 |
}
|
3643 |
return $temp_array;
|
3644 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3645 |
|
3646 |
|
3647 |
function saswp_get_thumbnail(){
|
3434 |
|
3435 |
}
|
3436 |
|
3437 |
+
|
3438 |
+
|
3439 |
function saswp_get_video_metadata($content = ''){
|
3440 |
|
3441 |
global $post, $sd_data;
|
3464 |
|
3465 |
if(strpos($value, 'http')!== false){
|
3466 |
|
3467 |
+
$response[]['video_url'] = trim($value, '"');
|
3468 |
|
3469 |
}
|
3470 |
}
|
3490 |
if(isset($attr['ids'])){
|
3491 |
|
3492 |
$vurl = wp_get_attachment_url($attr['ids']);
|
3493 |
+
$response[]['video_url'] = trim($vurl, '"');
|
3494 |
|
3495 |
}
|
3496 |
|
3504 |
|
3505 |
foreach($matches as $match){
|
3506 |
|
3507 |
+
$vurl = trim($match[0], '"');
|
3508 |
$metadata = array();
|
3509 |
if(isset($sd_data['saswp-youtube-api']) && $sd_data['saswp-youtube-api'] != ''){
|
3510 |
|
3551 |
if(!empty($youtubematches)){
|
3552 |
|
3553 |
foreach($youtubematches as $match){
|
3554 |
+
$vurl = trim($match[1].'youtu.be'.$match[2], '"');
|
3555 |
$metadata = array();
|
3556 |
|
3557 |
if(isset($sd_data['saswp-youtube-api']) && $sd_data['saswp-youtube-api'] != ''){
|
3594 |
$temp_aray = array();
|
3595 |
foreach($attributes as $match){
|
3596 |
if(!empty($match['attrs']['url'])){
|
3597 |
+
$vurl = trim($match['attrs']['url'], '"');
|
3598 |
|
3599 |
$metadata = array();
|
3600 |
if(isset($sd_data['saswp-youtube-api']) && $sd_data['saswp-youtube-api'] != ''){
|
3622 |
}
|
3623 |
}
|
3624 |
|
3625 |
+
$result = saswp_unique_multidim_array($response,'video_url');
|
3626 |
|
3627 |
return $result;
|
3628 |
}
|
3629 |
|
3630 |
+
function saswp_unique_multidim_array($array, $key) {
|
3631 |
$temp_array = array();
|
3632 |
$i = 0;
|
3633 |
$key_array = array();
|
3634 |
if(!empty($array) && !empty($key)){
|
3635 |
foreach($array as $val) {
|
3636 |
if(isset($val[$key])){
|
3637 |
+
$checked = saswp_youtube_check_validate_url($val[$key]);
|
3638 |
+
if (!empty($checked)) {
|
3639 |
+
if (!in_array($val[$key], $key_array)) {
|
3640 |
+
$key_array[$i] = $val[$key];
|
3641 |
+
$temp_array[$i] = $val;
|
3642 |
+
$i++;
|
3643 |
+
}
|
3644 |
+
}
|
3645 |
}
|
3646 |
}
|
3647 |
}
|
3648 |
return $temp_array;
|
3649 |
}
|
3650 |
+
|
3651 |
+
function saswp_youtube_check_validate_url($yt_url) {
|
3652 |
+
$url_parsed_arr = parse_url($yt_url);
|
3653 |
+
if ($url_parsed_arr['host'] == "youtu.be" || $url_parsed_arr['host'] == "www.youtube.com" || $url_parsed_arr['path'] == "/watch" || substr($url_parsed_arr['query'], 0, 2) == "v=") {
|
3654 |
+
return $yt_url;
|
3655 |
+
}
|
3656 |
+
}
|
3657 |
|
3658 |
|
3659 |
function saswp_get_thumbnail(){
|
admin_section/js/main-script.js
CHANGED
@@ -4,6 +4,14 @@ var rmv_boolean = false;
|
|
4 |
var rmv_html = '';
|
5 |
jQuery(document).ready(function($){
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
$(document).on("click", '#saswp_loc_display_on_front', function(){
|
8 |
|
9 |
if( $(this).is(":checked") ){
|
4 |
var rmv_html = '';
|
5 |
jQuery(document).ready(function($){
|
6 |
|
7 |
+
//edit Schema page in show field for
|
8 |
+
var busines_stype = $('#schema_type').find(":selected").val();
|
9 |
+
if(busines_stype == 'local_business'){
|
10 |
+
$(document).ready(function(){
|
11 |
+
$(".saswp-business-type-tr").show();
|
12 |
+
});
|
13 |
+
}
|
14 |
+
|
15 |
$(document).on("click", '#saswp_loc_display_on_front', function(){
|
16 |
|
17 |
if( $(this).is(":checked") ){
|
admin_section/js/main-script.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var saswp_attached_rv=[],saswp_attached_col=[],rmv_boolean=!1,rmv_html="";jQuery(document).ready(function(s){if(s(document).on("click","#saswp_loc_display_on_front",function(){s(this).is(":checked")?s(".saswp-front-location-inst").removeClass("saswp_hide"):s(".saswp-front-location-inst").addClass("saswp_hide")}),s(document).on("change",".saswp-collection-where",function(){s(this);var e,a=s(this).val();a&&(e=a)&&s.ajax({url:ajaxurl,method:"GET",data:{action:"saswp_get_select2_data",type:e,q:"",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},beforeSend:function(){},success:function(e){if(e){var a="";s.each(e,function(s,e){a+='<option value="'+e.id+'">'+e.text+"</option>"}),s(".saswp-collection-where-data").html(""),s(".saswp-collection-where-data").append(a),saswp_select2()}},error:function(s){console.log("Failed Ajax Request"),console.log(s)}})}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?(s(".saswp-coll-where").addClass("saswp_hide"),s("#saswp-motivatebox").css("display","block")):(s(".saswp-coll-where").removeClass("saswp_hide"),s("#saswp-motivatebox").css("display","none"))}).change(),s(document).on("click",".saswp-dismiss-notices",function(){var e=s(this),a=s(this).attr("notice-type");a&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_dismiss_notices",notice_type:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status&&e.parent().parent().hide()},error:function(s){console.log(s)}})}),saswp_select2(),s(".saswp-upgrade-to-pro").parent().attr({href:"https://structured-data-for-wp.com/pricing/",target:"_blank"}),s(document).on("click",".saswp-attach-reviews",function(){s(".saswp-enable-append-reviews").is(":checked")?(tb_show(saswp_localize_data.translable_txt.attach_review,"#TB_inline??width=615&height=400&inlineId=saswp-embed-code-div"),s(document).find("#TB_window").width(600).height(415).css({top:"200px","margin-top":"0px"}),s(".saswp-attached-rv-count").show()):s(".saswp-attached-rv-count").hide()}),s(".close-attached-reviews-popup").on("click",function(){s("#TB_closeWindowButton").trigger("click")}),s("#saswp_attahced_reviews").val()&&(saswp_attached_rv=JSON.parse(s("#saswp_attahced_reviews").val())),s("#saswp_attached_collection").val()&&(saswp_attached_col=JSON.parse(s("#saswp_attached_collection").val())),s(document).on("click",".saswp-attach-rv-checkbox",function(){var e=null;e=parseInt(s(this).parent().attr("data-id"));var a=s(this).parent().attr("data-type");s(this).is(":checked")?("review"==a&&saswp_attached_rv.push(e),"collection"==a&&saswp_attached_col.push(e)):("review"==a&&saswp_attached_rv.splice(saswp_attached_rv.indexOf(e),1),"collection"==a&&saswp_attached_col.splice(saswp_attached_col.indexOf(e),1));var t=saswp_attached_rv.length,i=saswp_attached_col.length,c="";t>0&&(c+=t+" Reviews, "),i>0&&(c+=i+" Collection"),c||(c=0),s(".saswp-attached-rv-count").text("Attached "+c),s("#saswp_attahced_reviews").val(JSON.stringify(saswp_attached_rv)),s("#saswp_attached_collection").val(JSON.stringify(saswp_attached_col))}),s(".saswp-load-more-rv").on("click",function(e){var a=s(this).attr("data-type"),t=s(".saswp-add-rv-loop[data-type="+a+"]").length,i=t/10+1;s("#saswp-add-rv-automatic .spinner").addClass("is-active"),e.preventDefault(),s.get(ajaxurl,{action:"saswp_get_reviews_on_load",data_type:a,offset:t,paged:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){var t="";e.result&&(s.each(e.result,function(s,e){var i="";"review"==a&&saswp_attached_rv.includes(parseInt(e.saswp_review_id))&&(i="checked"),"collection"==a&&saswp_attached_col.includes(parseInt(e.saswp_review_id))&&(i="checked"),t+='<div class="saswp-add-rv-loop" data-type="'+a+'" data-id="'+e.saswp_review_id+'">',"review"==a&&(t+='<input class="saswp-attach-rv-checkbox" type="checkbox" '+i+"> <strong> "+e.saswp_reviewer_name+" ( Rating - "+e.saswp_review_rating+' ) <span class="saswp-g-plus"><img src="'+e.saswp_review_platform_icon+'"/></span></strong>'),"collection"==a&&(t+='<input class="saswp-attach-rv-checkbox" type="checkbox" '+i+"> <strong> "+e.saswp_reviewer_name+" </strong>"),t+="</div>"}),s(".saswp-add-rv-automatic-list[data-type="+a+"]").append(t)),i>=10&&s(".saswp-load-more-rv[data-type="+a+"]").addClass("saswp_hide"),e.message&&(s(".saswp-rv-not-found[data-type="+a+"]").removeClass("saswp_hide"),s(".saswp-load-more-rv[data-type="+a+"]").addClass("saswp_hide"))}else alert(e.message);s("#saswp-add-rv-automatic .spinner").removeClass("is-active")},"json")}),s(".saswp-modify-schema-toggle").click(function(e){e.preventDefault(),s(".saswp-modify-container").slideToggle("300");var a=s("#saswp_enable_custom_field"),t=a.val();a.val("1"===t?"0":"1"),s(".saswp-enable-modify-schema-output").change()}),s(".saswp-enable-itemlist").change(function(){s(this).is(":checked")?(s("#saswp_item_list_tags").show(),s(".saspw-item-list-note").show(),"custom"==s("#saswp_item_list_tags").val()?s("#saswp_item_list_custom").show():s("#saswp_item_list_custom").hide()):(s(".saspw-item-list-note").hide(),s("#saswp_item_list_tags").hide(),s("#saswp_item_list_custom").hide())}),s("#saswp_item_list_tags").change(function(){"custom"==s(this).val()?s("#saswp_item_list_custom").show():s("#saswp_item_list_custom").hide()}),s(document).on("click",".saswp-add-g-location-btn",function(e){var a="";a=s("#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">',e.preventDefault();var t="";(t+='<tr><td style="width:12%;"><strong>'+saswp_localize_data.translable_txt.place_id+'</strong></td><td style="width:15%;"><input class="saswp-g-location-field" name="sd_data[saswp_reviews_location_name][]" type="text" value=""></td><td style="width:10%;"><strong>'+saswp_localize_data.translable_txt.language+'</strong></td><td style="width:10%;"><input class="saswp-g-language-field" name="sd_data[saswp_reviews_language_name][]" type="text" value="" placeholder="nl"></td><td style="width:10%;"><strong>'+saswp_localize_data.translable_txt.reviews+'</strong></td><td style="width:10%;">'+a+'</td><td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">'+saswp_localize_data.translable_txt.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>')&&s(".saswp-g-reviews-settings-table").append(t)}),s(document).on("click",".saswp-fetch-g-reviews",function(){var e=s(this),a="free";e.addClass("updating-message");var t=s(this).parent().parent().find(".saswp-g-location-field").val(),i=s(this).parent().parent().find(".saswp-g-language-field").val(),c=s(this).parent().parent().find(".saswp-g-blocks-field").val(),p=s("#saswp_google_place_api_key").val(),n=s("#reviews_addon_license_key").val(),o=s("#reviews_addon_license_key_status").val();if("premium"==(a=s("#saswp_google_place_api_key").length?"free":"premium")){if(!(c>0))return alert(saswp_localize_data.translable_txt.blocks_zero),e.removeClass("updating-message"),!1;if(0!=c%10)return e.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.step_in),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),e.removeClass("updating-message"),!1}""!=t&&(n||p)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:o,reviews_api:n,location:t,language:i,blocks:c,g_api:p,premium_status:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(e.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.success),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(e.parent().parent().find(".saswp-rv-fetched-msg").text(s.message),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),e.removeClass("updating-message")},error:function(s){console.log(s)}}):(""==t&&alert(saswp_localize_data.translable_txt.enter_place_id),""==p&&alert(saswp_localize_data.translable_txt.enter_api_key),""==n&&alert(saswp_localize_data.translable_txt.enter_rv_api_key),e.removeClass("updating-message"))}),saswp_localize_data.do_tour){var e,a,t,i="<h3>"+saswp_localize_data.translable_txt.using_schema+"</h3>";i+="<p>"+saswp_localize_data.translable_txt.do_you_want+" <b>"+saswp_localize_data.translable_txt.sd_update+"</b> "+saswp_localize_data.translable_txt.before_others+"</p>",i+='<style type="text/css">',i+=".wp-pointer-buttons{ padding:0; overflow: hidden; }",i+=".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} #saswp_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }",i+="</style>",i+='<div id="saswp_mc_embed_signup">',i+='<form method="POST" accept-charset="utf-8" id="saswp-news-letter-form">',i+='<div id="saswp_mc_embed_signup_scroll">',i+='<div class="saswp-mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">',i+='<input type="text" name="saswp_subscriber_name" class="form-control" placeholder="Name" hidden value="'+saswp_localize_data.current_user_name+'" style="display:none">',i+='<input type="text" value="'+saswp_localize_data.current_user_email+'" name="saswp_subscriber_email" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">',i+='<input type="text" name="saswp_subscriber_website" class="form-control" placeholder="Website" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="'+saswp_localize_data.get_home_url+'">',i+='<input type="hidden" name="ml-submit" value="1" />',i+="</div>",i+='<div id="mce-responses">',i+="</div>",i+='<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a631df13442f19caede5a5baf_c9a71edce6" tabindex="-1" value=""></div>',i+='<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;">',i+='<p id="saswp-news-letter-status"></p>',i+="</div>",i+="</form>",i+="</div>",s(document).on("submit","#saswp-news-letter-form",function(e){e.preventDefault();var a=s(this),t=a.find('input[name="saswp_subscriber_name"]').val(),i=a.find('input[name="saswp_subscriber_email"]').val();website=a.find('input[name="saswp_subscriber_website"]').val(),s.post(saswp_localize_data.ajax_url,{action:"saswp_subscribe_to_news_letter",saswp_security_nonce:saswp_localize_data.saswp_security_nonce,name:t,email:i,website:website},function(e){e?"Some fields are missing."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Invalid email address."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Invalid list ID."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Already subscribed."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):(s("#saswp-news-letter-status").text("You're subscribed!"),s("#saswp-news-letter-status").css("color","green")):alert("Sorry, unable to subscribe. Please try again later!")})});var c={content:i,position:{edge:"top",align:"left"}};c=s.extend(c,{buttons:function(s,e){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(){e.element.pointer("close")}),button_2.on("click",function(){setTimeout(function(){e.element.pointer("close")},3e3)}),button},close:function(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})},show:function(s,e){e.pointer.css({left:"170px",top:"160px"})}}),t=function(){s(saswp_localize_data.displayID).pointer(c).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(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})}))},c.position&&c.position.defer_loading?s(window).bind("load.wp-pointers",t):t()}s(".saswp-tabs a").click(function(e){var a=s(this).attr("href"),t=getParameterByName("tab",a);if(t||(t="general"),s(this).siblings().removeClass("nav-tab-active"),s(this).addClass("nav-tab-active"),"premium_features"!=t||"yes"!=jQuery(this).attr("data-extmgr"))return s(".form-wrap").find(".saswp-"+t).siblings().hide(),s(".form-wrap .saswp-"+t).show(),window.history.pushState("","",a),!1;window.location.href="edit.php?post_type=saswp&page=saswp-extension-manager"}),s(".saswp-schame-type-select").select2(),s(".saswp-schame-type-select").change(function(e){e.preventDefault(),s(".saswp-custom-fields-table").html("");var a=s(this).val();s(".saswp-option-table-class tr").each(function(e,a){e>0&&s(this).hide()}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"Organization"==a||"CreativeWorkSeries"==a||"MobileApplication"==a||"ImageObject"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"Service"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a||"Review"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"VideoObject"==a?s(".saswp-enable-markup-class").parent().parent().show():s(".saswp-enable-markup-class").parent().parent().hide(),s("#saswp_location_meta_box").addClass("saswp_hide"),"local_business"==a&&(s("#saswp_location_meta_box").removeClass("saswp_hide"),s(".saswp-option-table-class tr").eq(1).show(),s(".saswp-business-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".select-post-type").val("show_globally").trigger("change")),"Service"==a&&(s(".saswp-service-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==a&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Review"==a&&(s(".saswp-review-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".saswp-item-reivewed-list").change()),"ItemList"==a?(s(".saswp-schema-modify-section").hide(),s(".saswp-itemlist-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".saswp-itemlist-item-type-list").change()):s(".saswp-schema-modify-section").show(),saswp_enable_rating_review(),saswp_enable_rating_automate(),s(".saswp-manual-modification").html(""),s(".saswp-static-container .spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_manual_fields_on_ajax",schema_type:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-static-container .spinner").removeClass("is-active"),s(".saswp-manual-modification").append(e),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_item_reviewed_call()}),"HowTo"==a||"local_business"==a||"FAQ"==a||"Service"==a?s(".saswp-enable-modify-schema").show():(s(".saswp-enable-modify-schema-output").val("automatic"),s(".saswp-enable-modify-schema-output").change(),s(".saswp-enable-modify-schema").hide())}),s("#saswp_business_type").select2(),s(".saswp-local-sub-type-2").select2(),s("#saswp_business_type").change(function(){var e=s(this).val(),a=s(".saswp-schame-type-select").val();s(".saswp-option-table-class tr").each(function(e,a){e>1&&(s(this).hide(),s(this).find(".saswp-local-sub-type-2").attr("disabled",!0))}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"Organization"==a||"CreativeWorkSeries"==a||"MobileApplication"==a||"ImageObject"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"Service"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a||"Review"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"VideoObject"==a?s(".saswp-enable-markup-class").parent().parent().show():s(".saswp-enable-markup-class").parent().parent().hide(),s("#saswp_location_meta_box").addClass("saswp_hide"),"local_business"==a&&(s(".saswp-"+e+"-tr").show(),s(".saswp-business-text-field-tr").show(),s(".saswp-"+e+"-tr").find("select").attr("disabled",!1),s("#saswp_location_meta_box").removeClass("saswp_hide")),"Review"==a&&(s(".saswp-review-text-field-tr").show(),s(".saswp-review-text-field-tr").find("select").attr("disabled",!1)),"ItemList"==a?(s(".saswp-schema-modify-section").hide(),s(".saswp-itemlist-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)):s(".saswp-schema-modify-section").show(),"Event"==a&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review(),saswp_enable_rating_automate()}).change(),s(".saswp-checkbox").change(function(){var e=s(this).attr("id"),a=s(this);switch(e){case"saswp-the-seo-framework-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-seo-framework").val(1):s("#saswp-the-seo-framework").val(0);break;case"saswp-seo-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-seo-press").val(1):s("#saswp-seo-press").val(0);break;case"saswp-aiosp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-aiosp").val(1):s("#saswp-aiosp").val(0);break;case"saswp-smart-crawl-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-smart-crawl").val(1):s("#saswp-smart-crawl").val(0);break;case"saswp-squirrly-seo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-squirrly-seo").val(1):s("#saswp-squirrly-seo").val(0);break;case"saswp-wp-recipe-maker-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-recipe-maker").val(1):s("#saswp-wp-recipe-maker").val(0);break;case"saswp-wpzoom-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpzoom").val(1):s("#saswp-wpzoom").val(0);break;case"saswp-yotpo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yotpo").val(1):s("#saswp-yotpo").val(0);break;case"saswp-ryviu-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ryviu").val(1):s("#saswp-ryviu").val(0);break;case"saswp-ultimate-blocks-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimate-blocks").val(1):s("#saswp-ultimate-blocks").val(0);break;case"saswp-starsrating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-starsrating").val(1):s("#saswp-starsrating").val(0);break;case"saswp-wptastyrecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wptastyrecipe").val(1):s("#saswp-wptastyrecipe").val(0);break;case"saswp-recipress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-recipress").val(1):s("#saswp-recipress").val(0);break;case"saswp-wp-ultimate-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-ultimate-recipe").val(1):s("#saswp-wp-ultimate-recipe").val(0);break;case"saswp-zip-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-zip-recipes").val(1):s("#saswp-zip-recipes").val(0);break;case"saswp-mediavine-create-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-mediavine-create").val(1):s("#saswp-mediavine-create").val(0);break;case"saswp-ht-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ht-recipes").val(1):s("#saswp-ht-recipes").val(0);break;case"saswp-wpsso-core-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpsso-core").val(1):s("#saswp-wpsso-core").val(0);break;case"saswp-for-wordpress-checkbox":s(this).is(":checked")?s("#saswp-for-wordpress").val(1):s("#saswp-for-wordpress").val(0);break;case"saswp-for-amp-checkbox":s(this).is(":checked")?s("#saswp-for-amp").val(1):s("#saswp-for-amp").val(0);break;case"saswp_kb_contact_1_checkbox":s(this).is(":checked")?(s("#saswp_kb_contact_1").val(1),s("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").removeClass("saswp-display-none")):(s("#saswp_kb_contact_1").val(0),s("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").addClass("saswp-display-none"));break;case"saswp-logo-dimensions-check":s(this).is(":checked")?(s("#saswp-logo-dimensions").val(1),s("#saswp-logo-width, #saswp-logo-height").parent().parent("li").show()):(s("#saswp-logo-dimensions").val(0),s("#saswp-logo-width, #saswp-logo-height").parent().parent("li").hide());break;case"saswp_archive_schema_checkbox":s(this).is(":checked")?(s("#saswp_archive_schema").val(1),s(".saswp_archive_schema_type_class").parent().parent().show()):(s("#saswp_archive_schema").val(0),s(".saswp_archive_schema_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":s(this).is(":checked")?(s("#saswp_website_schema").val(1),s("#saswp_search_box_schema").parent().parent().show()):(s("#saswp_website_schema").val(0),s("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":s(this).is(":checked")?s("#saswp_search_box_schema").val(1):s("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_remove_cat_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_remove_cat").val(1):s("#saswp_breadcrumb_remove_cat").val(0);break;case"saswp_breadcrumb_include_parent_cat_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_include_parent_cat").val(1):s("#saswp_breadcrumb_include_parent_cat").val(0);break;case"saswp_breadcrumb_schema_checkbox":s(this).is(":checked")?(s("#saswp_breadcrumb_schema").val(1),s("#saswp_breadcrumb_remove_cat").parent().parent().show(),s("#saswp_breadcrumb_include_parent_cat").parent().parent().show()):(s("#saswp_breadcrumb_schema").val(0),s("#saswp_breadcrumb_remove_cat").parent().parent().hide(),s("#saswp_breadcrumb_include_parent_cat").parent().parent().hide());break;case"saswp_comments_schema_checkbox":s(this).is(":checked")?s("#saswp_comments_schema").val(1):s("#saswp_comments_schema").val(0);break;case"saswp_remove_version_tag_checkbox":s(this).is(":checked")?s("#saswp_remove_version_tag").val(1):s("#saswp_remove_version_tag").val(0);break;case"saswp-compativility-checkbox":s(this).is(":checked")?s("#saswp-flexmlx-compativility").val(1):s("#saswp-flexmlx-compativility").val(0);break;case"saswp-review-module-checkbox":s(this).is(":checked")?s("#saswp-review-module").val(1):s("#saswp-review-module").val(0);break;case"saswp-stars-rating-checkbox":s(this).is(":checked")?(s(".saswp-stars-post-table").removeClass("saswp_hide"),s(this).parent().parent().next().removeClass("saswp_hide"),s("#saswp-stars-rating").val(1)):(s(this).parent().parent().next().addClass("saswp_hide"),s(".saswp-stars-post-table").addClass("saswp_hide"),s("#saswp-stars-rating").val(0));break;case"saswp-kk-star-raring-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-kk-star-raring").val(1):s("#saswp-kk-star-raring").val(0);break;case"saswp-rmprating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rmprating").val(1):s("#saswp-rmprating").val(0);break;case"saswp-ratingform-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ratingform").val(1):s("#saswp-ratingform").val(0);break;case"saswp-wpdiscuz-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpdiscuz").val(1):s("#saswp-wpdiscuz").val(0);break;case"saswp-yet-another-stars-rating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yet-another-stars-rating").val(1):s("#saswp-yet-another-stars-rating").val(0);break;case"saswp-simple-author-box-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-simple-author-box").val(1):s("#saswp-simple-author-box").val(0);break;case"saswp-woocommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce").val(1):s("#saswp-woocommerce").val(0);break;case"saswp_woocommerce_archive_checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp_woocommerce_archive").val(1):s("#saswp_woocommerce_archive").val(0);break;case"saswp-wpecommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpecommerce").val(1):s("#saswp-wpecommerce").val(0);break;case"saswp-default-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp_default_review").val(1):s("#saswp_default_review").val(0);break;case"saswp-single-price-product-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-single-price-product").val(1),s(".saswp-single-price-opt").parent().parent().show()):(s("#saswp-single-price-product").val(0),s(".saswp-single-price-opt").parent().parent().hide());break;case"saswp-extra-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-extra").val(1):s("#saswp-extra").val(0);break;case"saswp-enfold-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-enfold").val(1):s("#saswp-enfold").val(0);break;case"saswp-soledad-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-soledad").val(1):s("#saswp-soledad").val(0);break;case"saswp-wp-theme-reviews-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-theme-reviews").val(1):s("#saswp-wp-theme-reviews").val(0);break;case"saswp-dw-question-answer-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-dw-question-answer").val(1):s("#saswp-dw-question-answer").val(0);break;case"saswp-wpqa-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpqa").val(1):s("#saswp-wpqa").val(0);break;case"saswp-wp-job-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-job-manager").val(1):s("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yoast").val(1):s("#saswp-yoast").val(0);break;case"saswp-polylang-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-polylang").val(1):s("#saswp-polylang").val(0);break;case"saswp-autolistings-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-autolistings").val(1):s("#saswp-autolistings").val(0);break;case"saswp-wpml-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpml").val(1):s("#saswp-wpml").val(0);break;case"saswp-metatagmanager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-metatagmanager").val(1):s("#saswp-metatagmanager").val(0);break;case"saswp-slimseo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-slimseo").val(1):s("#saswp-slimseo").val(0);break;case"saswp-rankmath-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rankmath").val(1):s("#saswp-rankmath").val(0);break;case"saswp-taqyeem-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-taqyeem").val(1):s("#saswp-taqyeem").val(0);break;case"saswp-video-thumbnails-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-video-thumbnails").val(1):s("#saswp-video-thumbnails").val(0);break;case"saswp-featured-video-plus-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-featured-video-plus").val(1):s("#saswp-featured-video-plus").val(0);break;case"saswp-wp-product-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-product-review").val(1):s("#saswp-wp-product-review").val(0);break;case"saswp-the-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-events-calendar").val(1):s("#saswp-the-events-calendar").val(0);break;case"saswp-homeland-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-homeland").val(1):s("#saswp-homeland").val(0);break;case"saswp-ratency-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ratency").val(1):s("#saswp-ratency").val(0);break;case"saswp-wpresidence-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpresidence").val(1):s("#saswp-wpresidence").val(0);break;case"saswp-myhome-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-myhome").val(1):s("#saswp-myhome").val(0);break;case"saswp-realestate-5-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realestate-5").val(1):s("#saswp-realestate-5").val(0);break;case"saswp-realestate-7-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realestate-7").val(1):s("#saswp-realestate-7").val(0);break;case"saswp-stamped-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-stamped").val(1):s("#saswp-stamped").val(0);break;case"saswp-sabaidiscuss-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-sabaidiscuss").val(1):s("#saswp-sabaidiscuss").val(0);break;case"saswp-geodirectory-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-geodirectory").val(1):s("#saswp-geodirectory").val(0);break;case"saswp-classipress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-classipress").val(1):s("#saswp-classipress").val(0);break;case"saswp-realhomes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realhomes").val(1):s("#saswp-realhomes").val(0);break;case"saswp-learn-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-press").val(1):s("#saswp-learn-press").val(0);break;case"saswp-wplms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wplms").val(1):s("#saswp-wplms").val(0);break;case"saswp-learn-dash-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-dash").val(1):s("#saswp-learn-dash").val(0);break;case"saswp-lifter-lms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-lifter-lms").val(1):s("#saswp-lifter-lms").val(0);break;case"saswp-senseilms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-senseilms").val(1):s("#saswp-senseilms").val(0);break;case"saswp-wp-event-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-manager").val(1):s("#saswp-wp-event-manager").val(0);break;case"saswp-events-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-events-manager").val(1):s("#saswp-events-manager").val(0);break;case"saswp-event-calendar-wd-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-calendar-wd").val(1):s("#saswp-event-calendar-wd").val(0);break;case"saswp-event-organiser-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-organiser").val(1):s("#saswp-event-organiser").val(0);break;case"saswp-modern-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-modern-events-calendar").val(1):s("#saswp-modern-events-calendar").val(0);break;case"saswp-woocommerce-booking-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-woocommerce-booking").val(1),s("#saswp-woocommerce-booking-main").val(1)):(s("#saswp-woocommerce-booking").val(0),s("#saswp-woocommerce-booking-main").val(0));break;case"saswp-woocommerce-booking-main-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-woocommerce-booking-main").val(1),s("#saswp-woocommerce-booking").val(1)):(s("#saswp-woocommerce-booking-main").val(0),s("#saswp-woocommerce-booking").val(0));break;case"saswp-woocommerce-membership-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce-membership").val(1):s("#saswp-woocommerce-membership").val(0);break;case"saswp-defragment-checkbox":s(this).is(":checked")?s("#saswp-defragment").val(1):s("#saswp-defragment").val(0);break;case"saswp-cooked-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-cooked").val(1):s("#saswp-cooked").val(0);break;case"saswp-flexmlx-compativility-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-flexmlx-compativility").val(1):s("#saswp-flexmlx-compativility").val(0);break;case"saswp-shopper-approved-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-shopper-approved-review").val(1),s(".saswp-s-reviews-settings-table").parent().parent().parent().show()):(s("#saswp-shopper-approved-review").val(0),s(".saswp-s-reviews-settings-table").parent().parent().parent().hide());break;case"saswp-google-review-checkbox":s(this).is(":checked")?(s("#saswp-google-review").val(1),s("#saswp-google-rv-free-checkbox").length?(s("#saswp-google-review-free").parent().parent().show(),s("#saswp-google-rv-free-checkbox").is(":checked")?s("#saswp_google_place_api_key").parent().parent().show():s("#saswp_google_place_api_key").parent().parent().hide()):s("#saswp_google_place_api_key").parent().parent().show(),s(".saswp-g-reviews-settings-table").parent().parent().parent().show()):(s("#saswp-google-review").val(0),s("#saswp_google_place_api_key").parent().parent().hide(),s(".saswp-g-reviews-settings-table").parent().parent().parent().hide(),s("#saswp-google-rv-free-checkbox").length&&s("#saswp-google-review-free").parent().parent().hide());break;case"saswp-google-rv-free-checkbox":s("#saswp-google-review-checkbox").is(":checked")&&s(this).is(":checked")?(s("#saswp-google-review-free").val(1),s("#saswp_google_place_api_key").parent().parent().show()):(s("#saswp-google-review-free").val(0),s("#saswp_google_place_api_key").parent().parent().hide());break;case"saswp-markup-footer-checkbox":s(this).is(":checked")?s("#saswp-markup-footer").val(1):s("#saswp-markup-footer").val(0);break;case"saswp-pretty-print-checkbox":s(this).is(":checked")?s("#saswp-pretty-print").val(1):s("#saswp-pretty-print").val(0);break;case"saswp-wppostratings-raring-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wppostratings-raring").val(1):s("#saswp-wppostratings-raring").val(0);break;case"saswp-bbpress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-bbpress").val(1):s("#saswp-bbpress").val(0);break;case"saswp-microdata-cleanup-checkbox":s(this).is(":checked")?s("#saswp-microdata-cleanup").val(1):s("#saswp-microdata-cleanup").val(0);break;case"saswp-other-images-checkbox":s(this).is(":checked")?s("#saswp-other-images").val(1):s("#saswp-other-images").val(0);break;case"saswp-full-heading-checkbox":s(this).is(":checked")?s("#saswp-full-heading").val(1):s("#saswp-full-heading").val(0);break;case"saswp-rss-feed-image-checkbox":s(this).is(":checked")?s("#saswp-rss-feed-image").val(1):s("#saswp-rss-feed-image").val(0);break;case"saswp-image-resizing-checkbox":s(this).is(":checked")?s("#saswp-image-resizing").val(1):s("#saswp-image-resizing").val(0);break;case"saswp-multiple-size-image-checkbox":s(this).is(":checked")?s("#saswp-multiple-size-image").val(1):s("#saswp-multiple-size-image").val(0);break;case"saswp-easy-testimonials-checkbox":s(this).is(":checked")?s("#saswp-easy-testimonials").val(1):s("#saswp-easy-testimonials").val(0);break;case"saswp-brb-checkbox":s(this).is(":checked")?s("#saswp-brb").val(1):s("#saswp-brb").val(0);break;case"saswp-testimonial-pro-checkbox":s(this).is(":checked")?s("#saswp-testimonial-pro").val(1):s("#saswp-testimonial-pro").val(0);break;case"saswp-bne-testimonials-checkbox":s(this).is(":checked")?s("#saswp-bne-testimonials").val(1):s("#saswp-bne-testimonials").val(0);break;case"saswp-ampforwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampforwp").val(1):s("#saswp-ampforwp").val(0);break;case"saswp-wpreviewslider-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpreviewslider").val(1):s("#saswp-wpreviewslider").val(0);break;case"saswp-ampbyautomatic-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampbyautomatic").val(1):s("#saswp-ampbyautomatic").val(0);break;case"saswp-cmp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-cmp").val(1):s("#saswp-cmp").val(0);break;case"saswp-wpreviewpro-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpreviewpro").val(1):s("#saswp-wpreviewpro").val(0);break;case"saswp-webstories-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-webstories").val(1):s("#saswp-webstories").val(0);break;case"saswp-resized-image-folder-checkbox":var t=s("#saswp-resized-image-folder-checkbox");s(this).is(":checked")?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_create_resized_image_folder",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s("#saswp-resized-image-folder").val(1),s("#saswp-resized-image-folder-checkbox").after('<a class="saswp-clear-images button button-default">Clear Images</a>')):(t.prop("checked",!1),t.next().text(e.message),t.next().css("color","red"))},error:function(s){t.prop("checked",!1),t.next().text(s),t.next().css("color","red")}}):(s("#saswp-resized-image-folder").val(0),s(".saswp-clear-images").remove());break;case"saswp-elementor-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-elementor").val(1):s("#saswp-elementor").val(0);break;case"saswp-rannarecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rannarecipe").val(1):s("#saswp-rannarecipe").val(0);break;case"saswp-jetpackrecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-jetpackrecipe").val(1):s("#saswp-jetpackrecipe").val(0);break;case"saswp-quickandeasyfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-quickandeasyfaq").val(1):s("#saswp-quickandeasyfaq").val(0);break;case"saswp-ultimatefaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimatefaqs").val(1):s("#saswp-ultimatefaqs").val(0);break;case"saswp-ultimatemember-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimatemember").val(1):s("#saswp-ultimatemember").val(0);break;case"saswp-showcaseidx-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-showcaseidx").val(1):s("#saswp-showcaseidx").val(0);break;case"saswp-arconixfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-arconixfaq").val(1):s("#saswp-arconixfaq").val(0);break;case"saswp-faqconcertina-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-faqconcertina").val(1):s("#saswp-faqconcertina").val(0);break;case"saswp-wpjobmanager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpjobmanager").val(1):s("#saswp-wpjobmanager").val(0);break;case"saswp-simplejobboard-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-simplejobboard").val(1):s("#saswp-simplejobboard").val(0);break;case"saswp-wpjobopenings-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpjobopenings").val(1):s("#saswp-wpjobopenings").val(0);break;case"saswp-webfaq10-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-webfaq10").val(1):s("#saswp-webfaq10").val(0);break;case"saswp-wpfaqschemamarkup-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpfaqschemamarkup").val(1):s("#saswp-wpfaqschemamarkup").val(0);break;case"saswp-faqschemaforpost-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-faqschemaforpost").val(1):s("#saswp-faqschemaforpost").val(0);break;case"saswp-masteraccordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-masteraccordion").val(1):s("#saswp-masteraccordion").val(0);break;case"saswp-easyfaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easyfaqs").val(1):s("#saswp-easyfaqs").val(0);break;case"saswp-accordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-accordion").val(1):s("#saswp-accordion").val(0);break;case"saswp-html5responsivefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-html5responsivefaq").val(1):s("#saswp-html5responsivefaq").val(0);break;case"saswp-wpresponsivefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpresponsivefaq").val(1):s("#saswp-wpresponsivefaq").val(0);break;case"saswp-ameliabooking-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ameliabooking").val(1):s("#saswp-ameliabooking").val(0);break;case"saswp-easyaccordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easyaccordion").val(1):s("#saswp-easyaccordion").val(0);break;case"saswp-helpiefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-helpiefaq").val(1):s("#saswp-helpiefaq").val(0);break;case"saswp-mooberrybm-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-mooberrybm").val(1):s("#saswp-mooberrybm").val(0);break;case"saswp-novelist-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-novelist").val(1):s("#saswp-novelist").val(0);break;case"saswp-accordionfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-accordionfaq").val(1):s("#saswp-accordionfaq").val(0);break;case"saswp-schemaforfaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-schemaforfaqs").val(1):s("#saswp-schemaforfaqs").val(0);break;case"saswp-wp-customer-reviews-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-customer-reviews").val(1):s("#saswp-wp-customer-reviews").val(0);break;case"saswp-total-recipe-generator-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-total-recipe-generator").val(1):s("#saswp-total-recipe-generator").val(0);break;case"saswp-wordpress-news-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordpress-news").val(1):s("#saswp-wordpress-news").val(0);break;case"saswp-ampwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampwp").val(1):s("#saswp-ampwp").val(0);break;case"saswp-wp-event-aggregator-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-aggregator").val(1):s("#saswp-wp-event-aggregator").val(0);break;case"saswp-timetable-event-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-timetable-event").val(1):s("#saswp-timetable-event").val(0);break;case"saswp-xo-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-xo-event-calendar").val(1):s("#saswp-xo-event-calendar").val(0);break;case"saswp-vs-event-list-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-vs-event-list").val(1):s("#saswp-vs-event-list").val(0);break;case"saswp-calendarize-it-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-calendarize-it").val(1):s("#saswp-calendarize-it").val(0);break;case"saswp-events-schedule-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-events-schedule").val(1):s("#saswp-events-schedule").val(0);break;case"saswp-woo-event-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woo-event-manager").val(1):s("#saswp-woo-event-manager").val(0);break;case"saswp-stachethemes-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-stachethemes-event-calendar").val(1):s("#saswp-stachethemes-event-calendar").val(0);break;case"saswp-all-in-one-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-all-in-one-event-calendar").val(1):s("#saswp-all-in-one-event-calendar").val(0);break;case"saswp-event-on-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-on").val(1):s("#saswp-event-on").val(0);break;case"saswp-easy-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easy-recipe").val(1):s("#saswp-easy-recipe").val(0);break;case"saswp-tevolution-events-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-tevolution-events").val(1):s("#saswp-tevolution-events").val(0);break;case"saswp-strong-testimonials-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-strong-testimonials").val(1):s("#saswp-strong-testimonials").val(0);break;case"saswp-wordlift-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordlift").val(1):s("#saswp-wordlift").val(0);break;case"saswp-betteramp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-betteramp").val(1):s("#saswp-betteramp").val(0);break;case"saswp-wpamp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpamp").val(1):s("#saswp-wpamp").val(0)}}).change(),s("#saswp_kb_type").change(function(){var e=s(this).val();s(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().addClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide"),"Organization"==e&&(s(".saswp_org_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide")),"Person"==e&&(s(".saswp_org_fields").parent().parent().addClass("saswp_hide"),s(".saswp_person_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().removeClass("saswp_hide"))}).change(),s(document).on("click","input[data-id=media]",function(e){e.preventDefault();var a=s(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 e=i.state().get("selection").first().toJSON();s("#"+t).val(e.url),s("input[data-id='"+t+"_id']").val(e.id),s("input[data-id='"+t+"_height']").val(e.height),s("input[data-id='"+t+"_width']").val(e.width),s("input[data-id='"+t+"_thumbnail']").val(e.url),"sd_default_image_button"===a.attr("id")&&(s("#sd_default_image_width").val(e.width),s("#sd_default_image_height").val(e.height));var c="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&e.height<1200&&(c='<p class="saswp_warning">Image size is smaller than recommended size</p>'),s(".saswp_image_div_"+t).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+e.url+'"/><a data-id="'+t+'" href="#" class="saswp_prev_close">X</a></div>'+c)}).open()}),s(document).on("click",".saswp_prev_close",function(e){e.preventDefault();var a=s(this).attr("data-id");s(this).parent().remove(),s("#"+a).val(""),s("input[data-id='"+a+"_id']").val(""),s("input[data-id='"+a+"_height']").val(""),s("input[data-id='"+a+"_width']").val(""),s("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(s("#sd_default_image_width").val(""),s("#sd_default_image_height").val(""))}),s(document).on("click",".saswp-modify-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.get(ajaxurl,{action:"saswp_modify_schema_post_enable",tag_ID:saswp_localize_data.tag_ID,schema_id:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-post-specific-wrapper[data-id="+a+"] .saswp-post-specific-setting").after(e),s(".saswp_modify_this_schema_hidden_"+a).val(1),s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),t.removeClass("updating-message"),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_enable_rating_review(),saswp_enable_rating_automate(),saswp_item_reviewed_call()})}),s(document).on("click",".saswp-restore-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.post(ajaxurl,{action:"saswp_modify_schema_post_restore",tag_ID:saswp_localize_data.tag_ID,schema_id:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){t.removeClass("updating-message"),"t"==e.status?(s(".saswp_modify_this_schema_hidden_"+a).val(0),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-ps-toggle[schema-id="+a+"]").remove()):alert("Something went wrong")},"json")}),s(document).on("change",".saswp-schema-type-toggle",function(e){var a=s(this).attr("data-schema-id"),t=s(this).attr("data-post-id"),i=s(".saswp_modify_this_schema_hidden_"+a).val();if(s(this).is(":checked")){var c=0;s(".saswp-ps-toggle[schema-id="+a+"]").addClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s("#saswp_custom_schema_field[schema-id="+a+"]").parent().addClass("saswp_hide")}else{s("#saswp_custom_schema_field[schema-id="+a+"]").parent().removeClass("saswp_hide"),1==i?(s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide")):(s(".saswp-modify-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-ps-toggle[schema-id="+a+"]").addClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"));var c=1}s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_enable_disable_schema_on_post",status:c,schema_id:a,post_id:t,req_from:saswp_localize_data.req_from,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-reset-data",function(e){e.preventDefault(),!0==confirm("Are you sure?")&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){setTimeout(function(){location.reload()},1e3)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp_license_activation",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("license-status"),i=s(this).attr("add-on"),c=s("#"+i+"_addon_license_key").val();t&&i&&c?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){s("#"+i+"_addon_license_key_status").val(e.status),"active"==e.status&&e.days_remaining<0?(s("span.inactive_status_reviews").text("Expired"),s("span.inactive_status_reviews").css({color:"red","font-weight":"400"})):"active"==e.status?(s(".saswp-"+i+"-dashicons").addClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").css("color","green"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","inactive"),s(".saswp_license_activation[add-on='"+i+"']").text("Deactivate"),s("span.addon-activated_reviews").css({color:"green","margin-left":"8px","font-weight":"400"}),s(".saswp_license_status_msg[add-on='"+i+"']").text("Activated"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","green"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message),s("span.inactive_status_"+i).text("Active"),s("span.inactive_status_"+i).css({color:"green","margin-left":"8px","font-weight":"400"}),s("span.inactive_status_"+i).removeClass("inactive_status_"+i).addClass("addon-activated_"+i)):(s(".saswp-"+i+"-dashicons").addClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").css("color","red"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","active"),s(".saswp_license_activation[add-on='"+i+"']").text("Activate"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","red"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message),s("span.addon-activated_"+i).text("Inactive"),s("span.addon-activated_"+i).css("color","#bebfc0"),s("span.addon-activated_"+i).removeClass("addon-activated_"+i).addClass("inactive_status_"+i),s("span.limit_span").css("display","none")),a.removeClass("updating-message")},error:function(s){console.log(s)}}):(alert("Please enter value license key"),a.removeClass("updating-message"))}),jQuery(document).on("click",".user_refresh_single_addon",function(s){var e=jQuery(this);s.preventDefault();var a=e.attr("add-on"),t=e.attr("remaining_days_org"),i=jQuery("#"+a+"_addon_license_key").val();document.getElementById("user_refresh_"+a).classList.add("spin");var c=new Date,p=function s(e){for(var a=e+"=",t=document.cookie.split(";"),i=0;i<t.length;i++){for(var c=t[i];" "==c.charAt(0);)c=c.substring(1,c.length);if(0==c.indexOf(a))return c.substring(a.length,c.length)}return null}("saswp_addon_refresh_check");p=new Date(p);var n=-1,o=Math.abs(c.getTime()-p.getTime()),n=Math.ceil(o/864e5),o=Math.abs(new Date(t).getTime()-c.getTime()),r=Math.ceil(o/864e5);-1==n||n>1||r<1?(document.cookie="saswp_addon_refresh_check="+c,jQuery.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:i,license_status:"active",add_on:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){jQuery("#"+a+"_addon_license_key_status").val(s.status),document.getElementById("user_refresh_"+a).classList.remove("spin"),e.removeClass("updating-message")},error:function(s){console.log(s)}})):(setTimeout(function(){jQuery(".dashicons").removeClass("spin")},0),alert("Please try after "+(p=Math.abs(p.getDate()+1)+"/"+Math.abs(p.getMonth()+1)+"/"+p.getFullYear()+" "+p.getHours()+":"+p.getMinutes()+":"+p.getSeconds())))});var p=document.getElementById("activated-plugins-days_remaining");if(p)var n=p.getAttribute("days_remaining");n>=0&&n<=7&&setTimeout(function(){jQuery("#refresh_license_icon_top-").trigger("click")},0),jQuery(document).on("click","#refresh_license_icon_top-",function(e){document.getElementById("refresh_license_icon_top").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on");s(this).attr("data-attr"),s(this).attr("add-onname");var c=s("#"+i+"_addon_license_key").val();i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("refresh_license_icon_top").classList.remove("spin");var a=e.days_remaining;a>=0&&a<=7&&s("span.saswp-addon-alert").text("expiring in "+a+" days ")}else document.getElementsByClassName("saswp-addon-alert")[0].style.color="green",document.getElementsByClassName("renewal-license")[0].style.display="none",document.getElementById("refresh_license_icon_top").classList.remove("spin"),s("span.pro_warning").css("display","none")}}):(alert("Please enter value license key"),a.removeClass("updating-message")),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_transient",license_key:c,license_key:c,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){JSON.parse(s)}})});var p=document.getElementById("activated-plugins-days_remaining");if(p)var n=p.getAttribute("days_remaining");n>=0&&n<=7&&setTimeout(function(){jQuery("#user_refresh_expired_addon-").trigger("click")},0),jQuery(document).on("click","#user_refresh_expired_addon-",function(e){document.getElementById("user_refresh_expired_addon").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on");s(this).attr("data-attr"),s(this).attr("add-onname");var c=s("#"+i+"_addon_license_key").val();i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("user_refresh_expired_addon").classList.remove("spin");var a=e.days_remaining;a<0?(s("span#exp").text("Expired"),location.reload()):a>7&&(s("span.inner_span").text(""),s("span.saswp_addon_inactive").text(""),s("span.expiredinner_span").text("Your License is Active"),s("span.expiredinner_span").css("color","green"),s(".renewal-license").css("display","none"),s(".saswp_addon_icon").css("display","none"))}}}):(alert("Please enter value license key"),a.removeClass("updating-message"))});var p=document.getElementById("activated-plugins-days_remaining");if(p)var n=p.getAttribute("days_remaining");setTimeout(function(){jQuery("#refresh_expired_addon-").trigger("click")},0),jQuery(document).on("click","#refresh_expired_addon-",function(e){document.getElementById("refresh_expired_addon").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on");s(this).attr("data-attr"),s(this).attr("add-onname");var c=s("#"+i+"_addon_license_key").val();i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("refresh_expired_addon").classList.remove("spin");var a=e.days_remaining;a<0?s("span#exp").text("Expired"):a>7&&(s("span.inner_span").text(""),s("span.saswp_addon_inactive").text(""),s("span.expiredinner_span").text("Your License is Active"),s("span.expiredinner_span").css("color","green"),s(".renewal-license").css("display","none"),s(".saswp_addon_icon").css("display","none"))}}}):(alert("Please enter value license key"),a.removeClass("updating-message")),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_expired_license_transient",license_key:c,license_key:c,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){JSON.parse(s)}})}),s(".saswp-send-query").on("click",function(e){e.preventDefault();var a=s("#saswp_query_message").val(),t=s("#saswp_query_email").val(),i=s("#saswp_query_premium_cus").val();""!=s.trim(a)&&i&&""!=s.trim(t)&&!0==saswpIsEmail(t)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_send_query_message",premium_cus:i,message:a,email:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s(".saswp-query-success").show(),s(".saswp-query-error").hide()):(s(".saswp-query-success").hide(),s(".saswp-query-error").show())},error:function(s){console.log(s)}}):""==s.trim(a)&&""==i&&""==s.trim(t)?alert("Please enter the message, email and select customer type"):(""==i&&alert("Select Customer type"),""==s.trim(a)&&alert("Please enter the message"),""==s.trim(t)&&alert("Please enter the email"),!1==saswpIsEmail(t)&&alert("Please enter a valid email"))}),s(".saswp-import-plugins").on("click",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("data-id");s.get(ajaxurl,{action:"saswp_import_plugin_data",plugin_name:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status?(s(a).parent().find(".saswp-imported-message").text(e.message),s(a).parent().find(".saswp-imported-message").removeClass("saswp-error"),setTimeout(function(){location.reload()},2e3)):(s(a).parent().find(".saswp-imported-message").addClass("saswp-error"),s(a).parent().find(".saswp-imported-message").text(e.message)),a.removeClass("updating-message")},"json")}),s(".saswp-feedback-no-thanks").on("click",function(e){e.preventDefault(),s.get(ajaxurl,{action:"saswp_feeback_no_thanks",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status&&s(".saswp-feedback-notice").hide()},"json")}),s(".saswp-feedback-remindme").on("click",function(e){e.preventDefault(),s.get(ajaxurl,{action:"saswp_feeback_remindme",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status&&s(".saswp-feedback-notice").hide()},"json")}),s(document).on("change",".saswp-local-business-type-select",function(e){e.preventDefault();var a=s(this),t=s(this).val();s.get(ajaxurl,{action:"saswp_get_sub_business_ajax",business_type:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){s(".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+'">',s.each(e.result,function(s,e){i+='<option value="'+s+'">'+e+"</option>"}),i+="</select></td>",i+="</tr>",a.parents(".form-table tr:first").after(i)}else s(".saswp-local-business-name-select").parents("tr").remove()},"json")}),saswp_item_reviewed_call(),jQuery(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),s(document).on("click",".saswp-add-custom-schema",function(e){e.preventDefault(),s(".saswp-add-custom-schema-field").removeClass("saswp_hide"),s(this).hide()}),s(document).on("click",".saswp-delete-custom-schema",function(e){e.preventDefault(),s("#saswp_custom_schema_field").val(""),s(".saswp-add-custom-schema-field").addClass("saswp_hide"),s(".saswp-add-custom-schema").show()}),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_reviews_datepicker(),s(document).on("click",".saswp-add-more-item",function(e){e.preventDefault();var a='<tr class="saswp-review-item-tr">';a+="<td>Review Item Feature</td>",a+='<td><input type="text" name="saswp-review-item-feature[]"></td>',a+="<td>Rating</td>",a+='<td><input step="0.1" min="0" max="5" type="number" name="saswp-review-item-star-rating[]"></td>',a+='<td><a type="button" class="saswp-remove-review-item button">x</a></td>',a+="</tr>",s(".saswp-review-item-list-table").append(a)}),s(document).on("click",".saswp-remove-review-item",function(e){e.preventDefault(),s(this).parent().parent("tr").remove()}),s(document).on("focusout",".saswp-review-item-tr input[type=number]",function(e){e.preventDefault();var a=0,t=s(".saswp-review-item-tr input[type=number]").length;s(".saswp-review-item-tr input[type=number]").each(function(e,t){""==s(t).val()?a+=parseFloat(0):a+=parseFloat(s(t).val())});var i=a/t;s("#saswp-review-item-over-all").val(i)}),s("#saswp-review-location").change(function(){var e=s(this).val();s(".saswp-review-shortcode").addClass("saswp_hide"),3==e&&s(".saswp-review-shortcode").removeClass("saswp_hide")}).change(),s("#saswp-review-item-enable").change(function(){s(this).is(":checked")?s(".saswp-review-fields").show():s(".saswp-review-fields").hide()}).change(),s(document).on("click",".saswp-restore-post-schema",function(e){e.preventDefault();var a=s(this);if(a.addClass("updating-message"),s(".saswp-post-specific-schema-ids").val())var t=JSON.parse(s(".saswp-post-specific-schema-ids").val());s.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(s){"t"==s.status||alert(s.msg),setTimeout(function(){location.reload()},1e3),a.removeClass("updating-message")},"json")}),s(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(e){e.preventDefault();var a=s(this).attr("data-id");s(".saswp-post-specific-wrapper").hide(),s("#"+a).show(),s("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),s("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),s(this).addClass("selected"),s(this).parent().addClass("selected"),saswp_enable_rating_review(),saswp_enable_rating_automate()}),s("#saswp-global-tabs a:first").addClass("saswp-global-selected"),s(".saswp-global-container").hide();var o=window.location.hash;if("#saswp-default-container"==o?s(".saswp-global-container:eq(2)").show():"#saswp-knowledge-container"==o?s(".saswp-global-container:eq(1)").show():s(".saswp-global-container:first").show(),s("#saswp-global-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-global-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-global-container").hide(),s("#"+e).show())}),s("#saswp-review-tabs a:first").addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s(".saswp-review-container:first").show(),s("#saswp-review-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-review-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s("#"+e).show())}),s("#saswp-compatibility-tabs a:first").addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s(".saswp-compatibility-container:first").show(),s("#saswp-compatibility-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-compatibility-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s("#"+e).show())}),s('a[href="'+saswp_localize_data.new_url_selector+'"]').attr("href",saswp_localize_data.new_url_href),s(".saswp-enable-modify-schema-output").on("change",function(){s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide"),"manual"==s(this).val()&&(s(".saswp-static-container").removeClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide")),"automatic"==s(this).val()&&(s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").removeClass("saswp_hide"))}),s(document).on("change",".saswp-custom-fields-name",function(){var e="text",a=s(this).parent().parent("tr"),t=s(this).val();(-1!=t.indexOf("_image")||-1!=t.indexOf("_logo"))&&(e="image");var i=s(this).parent().parent("tr").find("td:eq(1)");saswp_get_meta_list(null,e,null,i,t,a)}),s(document).on("click",".saswp-skip-button",function(e){e.preventDefault(),s(this).parent().parent().hide(),s.post(ajaxurl,{action:"saswp_skip_wizard",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){},"json")}),s(document).on("click",".saswp_add_schema_fields_on_fly",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("data-id"),i=s(this).attr("fields_type"),c=s(this).attr("div_type"),p=s(this).attr("itemlist_sub_type"),n=s("saswp_specific_"+t+" , .saswp-"+c+"-table-div").length,o=s("saswp_specific_"+t+" , .saswp-"+c+"-table-div:nth-child("+n+")").attr("data-id");(o=++o)||(o=0),saswp_get_post_specific_schema_fields(a,o,i,c,t,i+"_",p)}),s(document).on("click",".saswp-table-close",function(){s(this).parent().remove()}),s(document).on("click",".saswp-table-close-new",function(){s(this).closest(".saswp-dynamic-properties").remove()}),s(document).on("click",".saswp-rmv-modify_row",function(e){e.preventDefault(),s(this).parent().parent().remove()}),s(document).on("change",".saswp-custom-meta-list",function(){var e=s(this),a=s("select#schema_type option:selected").val(),t=s(this).val(),i=s(this).parent().parent("tr").find(".saswp-custom-fields-name").val(),c="",p=a.toLowerCase()+"_"+i,n="saswp_fixed_image["+i+"]";"manual_text"==t?(c+='<td><textarea cols="35" rows="2" name="saswp_fixed_text['+i+']"></textarea></td>',c+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):"taxonomy_term"==t?saswp_taxonomy_term.taxonomy?(c+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(c),saswpCustomSelect2()):s.get(ajaxurl,{action:"saswp_get_taxonomy_term_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){s&&(saswp_taxonomy_term.taxonomy=s,c+=saswp_taxonomy_term_html(s,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(c),saswpCustomSelect2())},"json"):"custom_field"==t?(c+='<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+i+']">',c+="</select></td>",c+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):"fixed_image"==t?(c+="<td>",c+="<fieldset>",c+='<input data-id="media" style="width: 30%;" class="button" id="'+p+'_button" name="'+p+'_button" type="button" value="Upload" />',c+='<input type="hidden" data-id="'+p+'_height" class="upload-height" name="'+n+'[height]" id="'+p+'_height" value="">',c+='<input type="hidden" data-id="'+p+'_width" class="upload-width" name="'+n+'[width]" id="'+p+'_width" value="">',c+='<input type="hidden" data-id="'+p+'_thumbnail" class="upload-thumbnail" name="'+n+'[thumbnail]" id="'+p+'_thumbnail" value="">',c+='<div class="saswp_image_div_'+p+'">',c+="</div>",c+="</fieldset>",c+="</td>",c+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):(c+="<td></td>",c+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2())}),s(document).on("change",".saswp-item-reivewed-list",function(){s(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[];var e=s(this),a=s("select#schema_type option:selected").val();saswp_item_reviewed_ajax(a,e,"manual")}),s(document).on("click",".saswp-add-custom-fields",function(){var e=s(this);e.addClass("updating-message");var a=s("select#schema_type option:selected").val(),t="",i=null;"Review"==a&&(t=s("select.saswp-item-reivewed-list option:selected").val(),i="saswp_review_name");var c=s("#post_ID").val();""!=a&&(saswp_meta_list_fields[a]?saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null):s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:c,schema_type:a,schema_subtype:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){saswp_meta_list_fields[a]=s,saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null)},error:function(s){console.log(s)}}))}),saswpCustomSelect2(),saswp_enable_rating_review(),saswp_enable_rating_automate(),saswp_enable_rating_automate(),s('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),s(document).on("click",".saswp_coonect_google_place",function(){var e=s("#saswp_google_place_id").val(),a=s("#saswp_language_list").val(),t=s("#saswp_googel_api").val();""!=e&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:e,language:a,google_api:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){console.log(s.status)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-add-social-links",function(){s(".saswp-social-links-table").append('<tr><td><input type="text" placeholder="https://www.facebook.com/profile" name="sd_data[saswp_social_links][]" value=""></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td></tr>')}),s(document).on("click",".saswp-show-accept-rv-popup",function(){tb_show("Reviews Form","#TB_inline??width=600&height=400&inlineId=saswp-accept-reviews-popup"),s(document).find("#TB_window").width(600).height(400).css({top:"100px","margin-top":"0px"})}),("saswp_reviews"==saswp_localize_data.post_type||"saswp-collections"==saswp_localize_data.post_type)&&"edit.php"==saswp_localize_data.page_now){var r='<div class="saswp-custom-post-tab">';r+='<div style="display:none;" id="saswp-accept-reviews-popup">',r+='<div class="saswp-accept-rv-container">',r+="<p>Use Below shortcode to show reviews form in your website. Using this you can accept reviews from your website directly</p>",r+='<div class="saswp-show-form-on-tab"><strong>Simple Form</strong> <input value="[saswp-reviews-form]" type="text" readonly></div>',r+='<div class="saswp-show-form-on-tab"><strong>Show form on button tap</strong> <input value="[saswp-reviews-form onbutton="1"]" type="text" readonly></div>',r+='<p><strong>Note:</strong> To enable google reCAPTCHA v2 add SITE KEY & SECRET KEY respectively as parameters in above shortcode. Eg <input value="[saswp-reviews-form site_key="your key" secret_key="your key"]" type="text" readonly>. To get keys <a target="_blank" href="https://www.google.com/recaptcha/admin/create">Click here.</a> You must choose reCAPTCHA type v2 </p>',r+="</div>",r+="</div>",r+='<h2 class="nav-tab-wrapper">',r+="<a href="+saswp_localize_data.reviews_page_url+' class="nav-tab '+(saswp_localize_data.current_url==saswp_localize_data.reviews_page_url?"saswp-global-selected":"")+'">Reviews</a>',r+="<a href="+saswp_localize_data.collections_page_url+' class="nav-tab '+(saswp_localize_data.current_url==saswp_localize_data.collections_page_url?"saswp-global-selected":"")+'">Collections</a>',r+='<a class="nav-tab saswp-show-accept-rv-popup">Accept Reviews</a>',r+="</h2>",r+="</div>",jQuery(jQuery(".wrap")).prepend(r)}jQuery(document).on("click",".saswp-clear-images",function(e){e.preventDefault();var a=s(this);!0==confirm("Are you sure? It will remove all the resized images")&&(a.addClass("updating-message"),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_clear_resized_image_folder",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){a.removeClass("updating-message"),"t"!=s.status&&alert("something went wrong")},error:function(s){console.log(s)}}))}),"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&&s(".saswp-rating-div").rateYo({spacing:"5px",rtl:saswp_localize_data.is_rtl,rating:saswp_reviews_data.rating_val,readOnly:saswp_reviews_data.readonly,onSet:function(e,a){s(this).next().next().val(e)}}).on("rateyo.change",function(e,a){var t=a.rating;s(this).next().text(t)}),s("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var e=s(this);e.parent().find(".saswp-phone-validation").remove();var a=s(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(a)?e.parent().find(".saswp-phone-validation").remove():e.after('<span style="color:red;" class="saswp-phone-validation">Invalid Phone Number</span>')}),saswpCollectionSlider(),s(document).on("click",".saswp-add-rv-btn",function(){s(".saswp-dynamic-platforms").toggle()}),s(".saswp-rmv-coll-rv").on("click",function(){if(rmv_boolean=!rmv_boolean,saswp_on_collection_design_change(),jQuery(jQuery(".saswp-add-dynamic-section")).remove(),rmv_boolean){var s="";s+='<div class="saswp-add-dynamic-section">',s+='<div class="saswp-add-dynamic-btn">',s+='<span class="dashicons dashicons-plus-alt saswp-add-rv-btn"></span>',s+="</div>",s+='<div class="saswp-dynamic-platforms" style="display:none;">',s+='<select name="saswp_dynamic_platforms" id="saswp_dynamic_platforms"><option value="">Choose Platform</option>'+jQuery("#saswp-plaftorm-list").html()+"</select>",s+="</div>",s+="</div>",jQuery(jQuery(".saswp-collection-preview")[0]).after(s)}}),s(document).on("change","#saswp_dynamic_platforms",function(){var e=s(this).val(),a="";a+='<select id="saswp_dynamic_reviews_list">',a+="</select>",a+='<a class="button button-default saswp-add-single-rv">Add</a>',s("#saswp_dynamic_platforms").nextAll().remove(),s("#saswp_dynamic_platforms").after(a);var t=ajaxurl+"?action=saswp_add_reviews_to_select2&saswp_security_nonce="+saswp_localize_data.saswp_security_nonce+"&platform_id="+e;s("#saswp_dynamic_reviews_list").select2({ajax:{url:t,dataType:"json",processResults:function(s){if(s.status)return{results:s.message}}}})}),s(document).on("click",".saswp-add-single-rv",function(e){e.preventDefault();var a=s("#saswp_dynamic_reviews_list").val(),t=s("#saswp_dynamic_platforms").val();a&&saswp_get_collection_data(null,t,null,a,!0)}),s(document).on("click",".saswp-remove-coll-rv",function(){var e=s(this).attr("data-id"),a=s(this).attr("platform-id");if(a){var t=saswp_collection[a].filter(function(s){return s.saswp_review_id!=e});saswp_collection[a]=t,saswp_on_collection_design_change()}}),s(document).on("click",".saswp-grid-page",function(e){e.preventDefault(),saswp_grid_page=s(this).attr("data-id"),saswp_on_collection_design_change()}),s("#saswp-coll-pagination").change(function(){saswp_grid_page=1,s("#saswp-coll-per-page").parent().addClass("saswp_hide_imp"),s(this).is(":checked")&&s("#saswp-coll-per-page").parent().removeClass("saswp_hide_imp"),saswp_on_collection_design_change()}),s(".saswp-accordion").click(function(){s(this).toggleClass("active"),s(this).next(".saswp-accordion-panel").slideToggle(200)}),s(document).on("click",".saswp-opn-cls-btn",function(){s("#saswp-reviews-cntn").toggle(),s("#saswp-reviews-cntn").is(":visible")?(s(".saswp-onclick-show").css("display","flex"),s(".saswp-onclick-hide").hide(),s(".saswp-open-class").css("width","500px")):(s(".saswp-onclick-show").css("display","none"),s(".saswp-onclick-hide").show(),s(".saswp-open-class").css("width","300px"))}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?s(".saswp-collection-shortcode").removeClass("saswp_hide"):s(".saswp-collection-shortcode").addClass("saswp_hide")}).change(),s(document).on("click",".saswp-remove-platform",function(e){e.preventDefault();var a=s(this).attr("platform-id");saswp_collection.splice(a,1),s(this).parent().remove(),saswp_on_collection_design_change()}),s(".saswp-number-change").bind("keyup mouseup",function(){saswp_on_collection_design_change()}),s(".saswp-coll-settings-options").change(function(){saswp_grid_page=1;var e=s(".saswp-collection-desing").val(),a=s(".saswp-collection-sorting").val();s(".saswp-coll-options").addClass("saswp_hide"),s(".saswp-collection-lp").css("height","auto"),s(".saswp-rmv-coll-rv").hide(),s(".saswp-add-dynamic-section").hide(),"grid"==e&&(s(".saswp-grid-options").removeClass("saswp_hide"),s(".saswp-rmv-coll-rv").show(),s(".saswp-add-dynamic-section").show()),"gallery"==e&&s(".saswp-slider-options").removeClass("saswp_hide"),"fomo"==e&&(s(".saswp-fomo-options").removeClass("saswp_hide"),s(".saswp-collection-lp").css("height","31px")),"popup"==e&&s(".saswp-collection-lp").css("height","31px"),s("#saswp_collection_specific_rating").is(":checked")?s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"):s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide"),"recent"==a?(s("#saswp_collection_specific_rating").parent().parent().removeClass("saswp_hide"),s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"),s("#saswp_collection_specific_rating").is(":checked")?s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"):s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide")):(s("#saswp_collection_specific_rating").parent().parent().addClass("saswp_hide"),s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide")),saswp_on_collection_design_change()}).change(),s(".saswp-add-to-collection").on("click",function(e){e.preventDefault();var a=s(this),t=s("#saswp-plaftorm-list").val(),i=s("#saswp-review-count").val();t&&i>0?(a.addClass("updating-message"),saswp_get_collection_data(i,t,a,null)):alert("Enter Count")});var l=s("#saswp_total_reviews_list").val();l&&saswp_get_collection_data(null,null,null,null,l),(e=document.createElement("div")).style.cssText="position:absolute; background:black; color:white; padding:4px 6px;z-index:10000;border-radius:2px; font-size:12px;box-shadow:3px 3px 3px rgba(0,0,0,.4);opacity:0;transition:opacity 0.3s",e.innerHTML="Copied!",document.body.appendChild(e);var d=document.getElementById("saswp-motivatebox");d&&d.addEventListener("mouseup",function(s){var t,i,c,p,n,s=s||event,o=s.target||s.srcElement;"motivate"==o.className&&(t=o,(i=document.createRange()).selectNodeContents(t),(c=window.getSelection()).removeAllRanges(),c.addRange(i),function s(){var e;try{e=document.execCommand("copy")}catch(a){e=!1}return e}()&&(n=(p=s)||event,clearTimeout(a),e.style.left=n.pageX-10+"px",e.style.top=n.pageY+15+"px",e.style.opacity=1,a=setTimeout(function(){e.style.opacity=0},500)))},!1)});
|
1 |
+
var saswp_attached_rv=[],saswp_attached_col=[],rmv_boolean=!1,rmv_html="";jQuery(document).ready(function(s){if("local_business"==s("#schema_type").find(":selected").val()&&s(document).ready(function(){s(".saswp-business-type-tr").show()}),s(document).on("click","#saswp_loc_display_on_front",function(){s(this).is(":checked")?s(".saswp-front-location-inst").removeClass("saswp_hide"):s(".saswp-front-location-inst").addClass("saswp_hide")}),s(document).on("change",".saswp-collection-where",function(){s(this);var e,a=s(this).val();a&&(e=a)&&s.ajax({url:ajaxurl,method:"GET",data:{action:"saswp_get_select2_data",type:e,q:"",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},beforeSend:function(){},success:function(e){if(e){var a="";s.each(e,function(s,e){a+='<option value="'+e.id+'">'+e.text+"</option>"}),s(".saswp-collection-where-data").html(""),s(".saswp-collection-where-data").append(a),saswp_select2()}},error:function(s){console.log("Failed Ajax Request"),console.log(s)}})}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?(s(".saswp-coll-where").addClass("saswp_hide"),s("#saswp-motivatebox").css("display","block")):(s(".saswp-coll-where").removeClass("saswp_hide"),s("#saswp-motivatebox").css("display","none"))}).change(),s(document).on("click",".saswp-dismiss-notices",function(){var e=s(this),a=s(this).attr("notice-type");a&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_dismiss_notices",notice_type:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status&&e.parent().parent().hide()},error:function(s){console.log(s)}})}),saswp_select2(),s(".saswp-upgrade-to-pro").parent().attr({href:"https://structured-data-for-wp.com/pricing/",target:"_blank"}),s(document).on("click",".saswp-attach-reviews",function(){s(".saswp-enable-append-reviews").is(":checked")?(tb_show(saswp_localize_data.translable_txt.attach_review,"#TB_inline??width=615&height=400&inlineId=saswp-embed-code-div"),s(document).find("#TB_window").width(600).height(415).css({top:"200px","margin-top":"0px"}),s(".saswp-attached-rv-count").show()):s(".saswp-attached-rv-count").hide()}),s(".close-attached-reviews-popup").on("click",function(){s("#TB_closeWindowButton").trigger("click")}),s("#saswp_attahced_reviews").val()&&(saswp_attached_rv=JSON.parse(s("#saswp_attahced_reviews").val())),s("#saswp_attached_collection").val()&&(saswp_attached_col=JSON.parse(s("#saswp_attached_collection").val())),s(document).on("click",".saswp-attach-rv-checkbox",function(){var e=null;e=parseInt(s(this).parent().attr("data-id"));var a=s(this).parent().attr("data-type");s(this).is(":checked")?("review"==a&&saswp_attached_rv.push(e),"collection"==a&&saswp_attached_col.push(e)):("review"==a&&saswp_attached_rv.splice(saswp_attached_rv.indexOf(e),1),"collection"==a&&saswp_attached_col.splice(saswp_attached_col.indexOf(e),1));var t=saswp_attached_rv.length,i=saswp_attached_col.length,c="";t>0&&(c+=t+" Reviews, "),i>0&&(c+=i+" Collection"),c||(c=0),s(".saswp-attached-rv-count").text("Attached "+c),s("#saswp_attahced_reviews").val(JSON.stringify(saswp_attached_rv)),s("#saswp_attached_collection").val(JSON.stringify(saswp_attached_col))}),s(".saswp-load-more-rv").on("click",function(e){var a=s(this).attr("data-type"),t=s(".saswp-add-rv-loop[data-type="+a+"]").length,i=t/10+1;s("#saswp-add-rv-automatic .spinner").addClass("is-active"),e.preventDefault(),s.get(ajaxurl,{action:"saswp_get_reviews_on_load",data_type:a,offset:t,paged:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){var t="";e.result&&(s.each(e.result,function(s,e){var i="";"review"==a&&saswp_attached_rv.includes(parseInt(e.saswp_review_id))&&(i="checked"),"collection"==a&&saswp_attached_col.includes(parseInt(e.saswp_review_id))&&(i="checked"),t+='<div class="saswp-add-rv-loop" data-type="'+a+'" data-id="'+e.saswp_review_id+'">',"review"==a&&(t+='<input class="saswp-attach-rv-checkbox" type="checkbox" '+i+"> <strong> "+e.saswp_reviewer_name+" ( Rating - "+e.saswp_review_rating+' ) <span class="saswp-g-plus"><img src="'+e.saswp_review_platform_icon+'"/></span></strong>'),"collection"==a&&(t+='<input class="saswp-attach-rv-checkbox" type="checkbox" '+i+"> <strong> "+e.saswp_reviewer_name+" </strong>"),t+="</div>"}),s(".saswp-add-rv-automatic-list[data-type="+a+"]").append(t)),i>=10&&s(".saswp-load-more-rv[data-type="+a+"]").addClass("saswp_hide"),e.message&&(s(".saswp-rv-not-found[data-type="+a+"]").removeClass("saswp_hide"),s(".saswp-load-more-rv[data-type="+a+"]").addClass("saswp_hide"))}else alert(e.message);s("#saswp-add-rv-automatic .spinner").removeClass("is-active")},"json")}),s(".saswp-modify-schema-toggle").click(function(e){e.preventDefault(),s(".saswp-modify-container").slideToggle("300");var a=s("#saswp_enable_custom_field"),t=a.val();a.val("1"===t?"0":"1"),s(".saswp-enable-modify-schema-output").change()}),s(".saswp-enable-itemlist").change(function(){s(this).is(":checked")?(s("#saswp_item_list_tags").show(),s(".saspw-item-list-note").show(),"custom"==s("#saswp_item_list_tags").val()?s("#saswp_item_list_custom").show():s("#saswp_item_list_custom").hide()):(s(".saspw-item-list-note").hide(),s("#saswp_item_list_tags").hide(),s("#saswp_item_list_custom").hide())}),s("#saswp_item_list_tags").change(function(){"custom"==s(this).val()?s("#saswp_item_list_custom").show():s("#saswp_item_list_custom").hide()}),s(document).on("click",".saswp-add-g-location-btn",function(e){var a="";a=s("#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">',e.preventDefault();var t="";(t+='<tr><td style="width:12%;"><strong>'+saswp_localize_data.translable_txt.place_id+'</strong></td><td style="width:15%;"><input class="saswp-g-location-field" name="sd_data[saswp_reviews_location_name][]" type="text" value=""></td><td style="width:10%;"><strong>'+saswp_localize_data.translable_txt.language+'</strong></td><td style="width:10%;"><input class="saswp-g-language-field" name="sd_data[saswp_reviews_language_name][]" type="text" value="" placeholder="nl"></td><td style="width:10%;"><strong>'+saswp_localize_data.translable_txt.reviews+'</strong></td><td style="width:10%;">'+a+'</td><td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">'+saswp_localize_data.translable_txt.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>')&&s(".saswp-g-reviews-settings-table").append(t)}),s(document).on("click",".saswp-fetch-g-reviews",function(){var e=s(this),a="free";e.addClass("updating-message");var t=s(this).parent().parent().find(".saswp-g-location-field").val(),i=s(this).parent().parent().find(".saswp-g-language-field").val(),c=s(this).parent().parent().find(".saswp-g-blocks-field").val(),p=s("#saswp_google_place_api_key").val(),n=s("#reviews_addon_license_key").val(),o=s("#reviews_addon_license_key_status").val();if("premium"==(a=s("#saswp_google_place_api_key").length?"free":"premium")){if(!(c>0))return alert(saswp_localize_data.translable_txt.blocks_zero),e.removeClass("updating-message"),!1;if(0!=c%10)return e.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.step_in),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),e.removeClass("updating-message"),!1}""!=t&&(n||p)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:o,reviews_api:n,location:t,language:i,blocks:c,g_api:p,premium_status:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(e.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.success),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(e.parent().parent().find(".saswp-rv-fetched-msg").text(s.message),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),e.removeClass("updating-message")},error:function(s){console.log(s)}}):(""==t&&alert(saswp_localize_data.translable_txt.enter_place_id),""==p&&alert(saswp_localize_data.translable_txt.enter_api_key),""==n&&alert(saswp_localize_data.translable_txt.enter_rv_api_key),e.removeClass("updating-message"))}),saswp_localize_data.do_tour){var e,a,t,i="<h3>"+saswp_localize_data.translable_txt.using_schema+"</h3>";i+="<p>"+saswp_localize_data.translable_txt.do_you_want+" <b>"+saswp_localize_data.translable_txt.sd_update+"</b> "+saswp_localize_data.translable_txt.before_others+"</p>",i+='<style type="text/css">',i+=".wp-pointer-buttons{ padding:0; overflow: hidden; }",i+=".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} #saswp_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }",i+="</style>",i+='<div id="saswp_mc_embed_signup">',i+='<form method="POST" accept-charset="utf-8" id="saswp-news-letter-form">',i+='<div id="saswp_mc_embed_signup_scroll">',i+='<div class="saswp-mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">',i+='<input type="text" name="saswp_subscriber_name" class="form-control" placeholder="Name" hidden value="'+saswp_localize_data.current_user_name+'" style="display:none">',i+='<input type="text" value="'+saswp_localize_data.current_user_email+'" name="saswp_subscriber_email" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">',i+='<input type="text" name="saswp_subscriber_website" class="form-control" placeholder="Website" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="'+saswp_localize_data.get_home_url+'">',i+='<input type="hidden" name="ml-submit" value="1" />',i+="</div>",i+='<div id="mce-responses">',i+="</div>",i+='<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a631df13442f19caede5a5baf_c9a71edce6" tabindex="-1" value=""></div>',i+='<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;">',i+='<p id="saswp-news-letter-status"></p>',i+="</div>",i+="</form>",i+="</div>",s(document).on("submit","#saswp-news-letter-form",function(e){e.preventDefault();var a=s(this),t=a.find('input[name="saswp_subscriber_name"]').val(),i=a.find('input[name="saswp_subscriber_email"]').val();website=a.find('input[name="saswp_subscriber_website"]').val(),s.post(saswp_localize_data.ajax_url,{action:"saswp_subscribe_to_news_letter",saswp_security_nonce:saswp_localize_data.saswp_security_nonce,name:t,email:i,website:website},function(e){e?"Some fields are missing."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Invalid email address."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Invalid list ID."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Already subscribed."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):(s("#saswp-news-letter-status").text("You're subscribed!"),s("#saswp-news-letter-status").css("color","green")):alert("Sorry, unable to subscribe. Please try again later!")})});var c={content:i,position:{edge:"top",align:"left"}};c=s.extend(c,{buttons:function(s,e){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(){e.element.pointer("close")}),button_2.on("click",function(){setTimeout(function(){e.element.pointer("close")},3e3)}),button},close:function(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})},show:function(s,e){e.pointer.css({left:"170px",top:"160px"})}}),t=function(){s(saswp_localize_data.displayID).pointer(c).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(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})}))},c.position&&c.position.defer_loading?s(window).bind("load.wp-pointers",t):t()}s(".saswp-tabs a").click(function(e){var a=s(this).attr("href"),t=getParameterByName("tab",a);if(t||(t="general"),s(this).siblings().removeClass("nav-tab-active"),s(this).addClass("nav-tab-active"),"premium_features"!=t||"yes"!=jQuery(this).attr("data-extmgr"))return s(".form-wrap").find(".saswp-"+t).siblings().hide(),s(".form-wrap .saswp-"+t).show(),window.history.pushState("","",a),!1;window.location.href="edit.php?post_type=saswp&page=saswp-extension-manager"}),s(".saswp-schame-type-select").select2(),s(".saswp-schame-type-select").change(function(e){e.preventDefault(),s(".saswp-custom-fields-table").html("");var a=s(this).val();s(".saswp-option-table-class tr").each(function(e,a){e>0&&s(this).hide()}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"Organization"==a||"CreativeWorkSeries"==a||"MobileApplication"==a||"ImageObject"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"Service"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a||"Review"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"VideoObject"==a?s(".saswp-enable-markup-class").parent().parent().show():s(".saswp-enable-markup-class").parent().parent().hide(),s("#saswp_location_meta_box").addClass("saswp_hide"),"local_business"==a&&(s("#saswp_location_meta_box").removeClass("saswp_hide"),s(".saswp-option-table-class tr").eq(1).show(),s(".saswp-business-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".select-post-type").val("show_globally").trigger("change")),"Service"==a&&(s(".saswp-service-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==a&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Review"==a&&(s(".saswp-review-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".saswp-item-reivewed-list").change()),"ItemList"==a?(s(".saswp-schema-modify-section").hide(),s(".saswp-itemlist-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".saswp-itemlist-item-type-list").change()):s(".saswp-schema-modify-section").show(),saswp_enable_rating_review(),saswp_enable_rating_automate(),s(".saswp-manual-modification").html(""),s(".saswp-static-container .spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_manual_fields_on_ajax",schema_type:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-static-container .spinner").removeClass("is-active"),s(".saswp-manual-modification").append(e),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_item_reviewed_call()}),"HowTo"==a||"local_business"==a||"FAQ"==a||"Service"==a?s(".saswp-enable-modify-schema").show():(s(".saswp-enable-modify-schema-output").val("automatic"),s(".saswp-enable-modify-schema-output").change(),s(".saswp-enable-modify-schema").hide())}),s("#saswp_business_type").select2(),s(".saswp-local-sub-type-2").select2(),s("#saswp_business_type").change(function(){var e=s(this).val(),a=s(".saswp-schame-type-select").val();s(".saswp-option-table-class tr").each(function(e,a){e>1&&(s(this).hide(),s(this).find(".saswp-local-sub-type-2").attr("disabled",!0))}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"Organization"==a||"CreativeWorkSeries"==a||"MobileApplication"==a||"ImageObject"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"Service"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a||"Review"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"VideoObject"==a?s(".saswp-enable-markup-class").parent().parent().show():s(".saswp-enable-markup-class").parent().parent().hide(),s("#saswp_location_meta_box").addClass("saswp_hide"),"local_business"==a&&(s(".saswp-"+e+"-tr").show(),s(".saswp-business-text-field-tr").show(),s(".saswp-"+e+"-tr").find("select").attr("disabled",!1),s("#saswp_location_meta_box").removeClass("saswp_hide")),"Review"==a&&(s(".saswp-review-text-field-tr").show(),s(".saswp-review-text-field-tr").find("select").attr("disabled",!1)),"ItemList"==a?(s(".saswp-schema-modify-section").hide(),s(".saswp-itemlist-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)):s(".saswp-schema-modify-section").show(),"Event"==a&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review(),saswp_enable_rating_automate()}).change(),s(".saswp-checkbox").change(function(){var e=s(this).attr("id"),a=s(this);switch(e){case"saswp-the-seo-framework-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-seo-framework").val(1):s("#saswp-the-seo-framework").val(0);break;case"saswp-seo-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-seo-press").val(1):s("#saswp-seo-press").val(0);break;case"saswp-aiosp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-aiosp").val(1):s("#saswp-aiosp").val(0);break;case"saswp-smart-crawl-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-smart-crawl").val(1):s("#saswp-smart-crawl").val(0);break;case"saswp-squirrly-seo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-squirrly-seo").val(1):s("#saswp-squirrly-seo").val(0);break;case"saswp-wp-recipe-maker-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-recipe-maker").val(1):s("#saswp-wp-recipe-maker").val(0);break;case"saswp-wpzoom-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpzoom").val(1):s("#saswp-wpzoom").val(0);break;case"saswp-yotpo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yotpo").val(1):s("#saswp-yotpo").val(0);break;case"saswp-ryviu-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ryviu").val(1):s("#saswp-ryviu").val(0);break;case"saswp-ultimate-blocks-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimate-blocks").val(1):s("#saswp-ultimate-blocks").val(0);break;case"saswp-starsrating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-starsrating").val(1):s("#saswp-starsrating").val(0);break;case"saswp-wptastyrecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wptastyrecipe").val(1):s("#saswp-wptastyrecipe").val(0);break;case"saswp-recipress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-recipress").val(1):s("#saswp-recipress").val(0);break;case"saswp-wp-ultimate-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-ultimate-recipe").val(1):s("#saswp-wp-ultimate-recipe").val(0);break;case"saswp-zip-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-zip-recipes").val(1):s("#saswp-zip-recipes").val(0);break;case"saswp-mediavine-create-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-mediavine-create").val(1):s("#saswp-mediavine-create").val(0);break;case"saswp-ht-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ht-recipes").val(1):s("#saswp-ht-recipes").val(0);break;case"saswp-wpsso-core-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpsso-core").val(1):s("#saswp-wpsso-core").val(0);break;case"saswp-for-wordpress-checkbox":s(this).is(":checked")?s("#saswp-for-wordpress").val(1):s("#saswp-for-wordpress").val(0);break;case"saswp-for-amp-checkbox":s(this).is(":checked")?s("#saswp-for-amp").val(1):s("#saswp-for-amp").val(0);break;case"saswp_kb_contact_1_checkbox":s(this).is(":checked")?(s("#saswp_kb_contact_1").val(1),s("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").removeClass("saswp-display-none")):(s("#saswp_kb_contact_1").val(0),s("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").addClass("saswp-display-none"));break;case"saswp-logo-dimensions-check":s(this).is(":checked")?(s("#saswp-logo-dimensions").val(1),s("#saswp-logo-width, #saswp-logo-height").parent().parent("li").show()):(s("#saswp-logo-dimensions").val(0),s("#saswp-logo-width, #saswp-logo-height").parent().parent("li").hide());break;case"saswp_archive_schema_checkbox":s(this).is(":checked")?(s("#saswp_archive_schema").val(1),s(".saswp_archive_schema_type_class").parent().parent().show()):(s("#saswp_archive_schema").val(0),s(".saswp_archive_schema_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":s(this).is(":checked")?(s("#saswp_website_schema").val(1),s("#saswp_search_box_schema").parent().parent().show()):(s("#saswp_website_schema").val(0),s("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":s(this).is(":checked")?s("#saswp_search_box_schema").val(1):s("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_remove_cat_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_remove_cat").val(1):s("#saswp_breadcrumb_remove_cat").val(0);break;case"saswp_breadcrumb_include_parent_cat_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_include_parent_cat").val(1):s("#saswp_breadcrumb_include_parent_cat").val(0);break;case"saswp_breadcrumb_schema_checkbox":s(this).is(":checked")?(s("#saswp_breadcrumb_schema").val(1),s("#saswp_breadcrumb_remove_cat").parent().parent().show(),s("#saswp_breadcrumb_include_parent_cat").parent().parent().show()):(s("#saswp_breadcrumb_schema").val(0),s("#saswp_breadcrumb_remove_cat").parent().parent().hide(),s("#saswp_breadcrumb_include_parent_cat").parent().parent().hide());break;case"saswp_comments_schema_checkbox":s(this).is(":checked")?s("#saswp_comments_schema").val(1):s("#saswp_comments_schema").val(0);break;case"saswp_remove_version_tag_checkbox":s(this).is(":checked")?s("#saswp_remove_version_tag").val(1):s("#saswp_remove_version_tag").val(0);break;case"saswp-compativility-checkbox":s(this).is(":checked")?s("#saswp-flexmlx-compativility").val(1):s("#saswp-flexmlx-compativility").val(0);break;case"saswp-review-module-checkbox":s(this).is(":checked")?s("#saswp-review-module").val(1):s("#saswp-review-module").val(0);break;case"saswp-stars-rating-checkbox":s(this).is(":checked")?(s(".saswp-stars-post-table").removeClass("saswp_hide"),s(this).parent().parent().next().removeClass("saswp_hide"),s("#saswp-stars-rating").val(1)):(s(this).parent().parent().next().addClass("saswp_hide"),s(".saswp-stars-post-table").addClass("saswp_hide"),s("#saswp-stars-rating").val(0));break;case"saswp-kk-star-raring-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-kk-star-raring").val(1):s("#saswp-kk-star-raring").val(0);break;case"saswp-rmprating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rmprating").val(1):s("#saswp-rmprating").val(0);break;case"saswp-ratingform-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ratingform").val(1):s("#saswp-ratingform").val(0);break;case"saswp-wpdiscuz-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpdiscuz").val(1):s("#saswp-wpdiscuz").val(0);break;case"saswp-yet-another-stars-rating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yet-another-stars-rating").val(1):s("#saswp-yet-another-stars-rating").val(0);break;case"saswp-simple-author-box-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-simple-author-box").val(1):s("#saswp-simple-author-box").val(0);break;case"saswp-woocommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce").val(1):s("#saswp-woocommerce").val(0);break;case"saswp_woocommerce_archive_checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp_woocommerce_archive").val(1):s("#saswp_woocommerce_archive").val(0);break;case"saswp-wpecommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpecommerce").val(1):s("#saswp-wpecommerce").val(0);break;case"saswp-default-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp_default_review").val(1):s("#saswp_default_review").val(0);break;case"saswp-single-price-product-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-single-price-product").val(1),s(".saswp-single-price-opt").parent().parent().show()):(s("#saswp-single-price-product").val(0),s(".saswp-single-price-opt").parent().parent().hide());break;case"saswp-extra-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-extra").val(1):s("#saswp-extra").val(0);break;case"saswp-enfold-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-enfold").val(1):s("#saswp-enfold").val(0);break;case"saswp-soledad-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-soledad").val(1):s("#saswp-soledad").val(0);break;case"saswp-wp-theme-reviews-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-theme-reviews").val(1):s("#saswp-wp-theme-reviews").val(0);break;case"saswp-dw-question-answer-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-dw-question-answer").val(1):s("#saswp-dw-question-answer").val(0);break;case"saswp-wpqa-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpqa").val(1):s("#saswp-wpqa").val(0);break;case"saswp-wp-job-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-job-manager").val(1):s("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yoast").val(1):s("#saswp-yoast").val(0);break;case"saswp-polylang-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-polylang").val(1):s("#saswp-polylang").val(0);break;case"saswp-autolistings-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-autolistings").val(1):s("#saswp-autolistings").val(0);break;case"saswp-wpml-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpml").val(1):s("#saswp-wpml").val(0);break;case"saswp-metatagmanager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-metatagmanager").val(1):s("#saswp-metatagmanager").val(0);break;case"saswp-slimseo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-slimseo").val(1):s("#saswp-slimseo").val(0);break;case"saswp-rankmath-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rankmath").val(1):s("#saswp-rankmath").val(0);break;case"saswp-taqyeem-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-taqyeem").val(1):s("#saswp-taqyeem").val(0);break;case"saswp-video-thumbnails-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-video-thumbnails").val(1):s("#saswp-video-thumbnails").val(0);break;case"saswp-featured-video-plus-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-featured-video-plus").val(1):s("#saswp-featured-video-plus").val(0);break;case"saswp-wp-product-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-product-review").val(1):s("#saswp-wp-product-review").val(0);break;case"saswp-the-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-events-calendar").val(1):s("#saswp-the-events-calendar").val(0);break;case"saswp-homeland-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-homeland").val(1):s("#saswp-homeland").val(0);break;case"saswp-ratency-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ratency").val(1):s("#saswp-ratency").val(0);break;case"saswp-wpresidence-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpresidence").val(1):s("#saswp-wpresidence").val(0);break;case"saswp-myhome-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-myhome").val(1):s("#saswp-myhome").val(0);break;case"saswp-realestate-5-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realestate-5").val(1):s("#saswp-realestate-5").val(0);break;case"saswp-realestate-7-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realestate-7").val(1):s("#saswp-realestate-7").val(0);break;case"saswp-stamped-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-stamped").val(1):s("#saswp-stamped").val(0);break;case"saswp-sabaidiscuss-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-sabaidiscuss").val(1):s("#saswp-sabaidiscuss").val(0);break;case"saswp-geodirectory-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-geodirectory").val(1):s("#saswp-geodirectory").val(0);break;case"saswp-classipress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-classipress").val(1):s("#saswp-classipress").val(0);break;case"saswp-realhomes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realhomes").val(1):s("#saswp-realhomes").val(0);break;case"saswp-learn-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-press").val(1):s("#saswp-learn-press").val(0);break;case"saswp-wplms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wplms").val(1):s("#saswp-wplms").val(0);break;case"saswp-learn-dash-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-dash").val(1):s("#saswp-learn-dash").val(0);break;case"saswp-lifter-lms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-lifter-lms").val(1):s("#saswp-lifter-lms").val(0);break;case"saswp-senseilms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-senseilms").val(1):s("#saswp-senseilms").val(0);break;case"saswp-wp-event-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-manager").val(1):s("#saswp-wp-event-manager").val(0);break;case"saswp-events-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-events-manager").val(1):s("#saswp-events-manager").val(0);break;case"saswp-event-calendar-wd-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-calendar-wd").val(1):s("#saswp-event-calendar-wd").val(0);break;case"saswp-event-organiser-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-organiser").val(1):s("#saswp-event-organiser").val(0);break;case"saswp-modern-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-modern-events-calendar").val(1):s("#saswp-modern-events-calendar").val(0);break;case"saswp-woocommerce-booking-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-woocommerce-booking").val(1),s("#saswp-woocommerce-booking-main").val(1)):(s("#saswp-woocommerce-booking").val(0),s("#saswp-woocommerce-booking-main").val(0));break;case"saswp-woocommerce-booking-main-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-woocommerce-booking-main").val(1),s("#saswp-woocommerce-booking").val(1)):(s("#saswp-woocommerce-booking-main").val(0),s("#saswp-woocommerce-booking").val(0));break;case"saswp-woocommerce-membership-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce-membership").val(1):s("#saswp-woocommerce-membership").val(0);break;case"saswp-defragment-checkbox":s(this).is(":checked")?s("#saswp-defragment").val(1):s("#saswp-defragment").val(0);break;case"saswp-cooked-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-cooked").val(1):s("#saswp-cooked").val(0);break;case"saswp-flexmlx-compativility-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-flexmlx-compativility").val(1):s("#saswp-flexmlx-compativility").val(0);break;case"saswp-shopper-approved-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-shopper-approved-review").val(1),s(".saswp-s-reviews-settings-table").parent().parent().parent().show()):(s("#saswp-shopper-approved-review").val(0),s(".saswp-s-reviews-settings-table").parent().parent().parent().hide());break;case"saswp-google-review-checkbox":s(this).is(":checked")?(s("#saswp-google-review").val(1),s("#saswp-google-rv-free-checkbox").length?(s("#saswp-google-review-free").parent().parent().show(),s("#saswp-google-rv-free-checkbox").is(":checked")?s("#saswp_google_place_api_key").parent().parent().show():s("#saswp_google_place_api_key").parent().parent().hide()):s("#saswp_google_place_api_key").parent().parent().show(),s(".saswp-g-reviews-settings-table").parent().parent().parent().show()):(s("#saswp-google-review").val(0),s("#saswp_google_place_api_key").parent().parent().hide(),s(".saswp-g-reviews-settings-table").parent().parent().parent().hide(),s("#saswp-google-rv-free-checkbox").length&&s("#saswp-google-review-free").parent().parent().hide());break;case"saswp-google-rv-free-checkbox":s("#saswp-google-review-checkbox").is(":checked")&&s(this).is(":checked")?(s("#saswp-google-review-free").val(1),s("#saswp_google_place_api_key").parent().parent().show()):(s("#saswp-google-review-free").val(0),s("#saswp_google_place_api_key").parent().parent().hide());break;case"saswp-markup-footer-checkbox":s(this).is(":checked")?s("#saswp-markup-footer").val(1):s("#saswp-markup-footer").val(0);break;case"saswp-pretty-print-checkbox":s(this).is(":checked")?s("#saswp-pretty-print").val(1):s("#saswp-pretty-print").val(0);break;case"saswp-wppostratings-raring-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wppostratings-raring").val(1):s("#saswp-wppostratings-raring").val(0);break;case"saswp-bbpress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-bbpress").val(1):s("#saswp-bbpress").val(0);break;case"saswp-microdata-cleanup-checkbox":s(this).is(":checked")?s("#saswp-microdata-cleanup").val(1):s("#saswp-microdata-cleanup").val(0);break;case"saswp-other-images-checkbox":s(this).is(":checked")?s("#saswp-other-images").val(1):s("#saswp-other-images").val(0);break;case"saswp-full-heading-checkbox":s(this).is(":checked")?s("#saswp-full-heading").val(1):s("#saswp-full-heading").val(0);break;case"saswp-rss-feed-image-checkbox":s(this).is(":checked")?s("#saswp-rss-feed-image").val(1):s("#saswp-rss-feed-image").val(0);break;case"saswp-image-resizing-checkbox":s(this).is(":checked")?s("#saswp-image-resizing").val(1):s("#saswp-image-resizing").val(0);break;case"saswp-multiple-size-image-checkbox":s(this).is(":checked")?s("#saswp-multiple-size-image").val(1):s("#saswp-multiple-size-image").val(0);break;case"saswp-easy-testimonials-checkbox":s(this).is(":checked")?s("#saswp-easy-testimonials").val(1):s("#saswp-easy-testimonials").val(0);break;case"saswp-brb-checkbox":s(this).is(":checked")?s("#saswp-brb").val(1):s("#saswp-brb").val(0);break;case"saswp-testimonial-pro-checkbox":s(this).is(":checked")?s("#saswp-testimonial-pro").val(1):s("#saswp-testimonial-pro").val(0);break;case"saswp-bne-testimonials-checkbox":s(this).is(":checked")?s("#saswp-bne-testimonials").val(1):s("#saswp-bne-testimonials").val(0);break;case"saswp-ampforwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampforwp").val(1):s("#saswp-ampforwp").val(0);break;case"saswp-wpreviewslider-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpreviewslider").val(1):s("#saswp-wpreviewslider").val(0);break;case"saswp-ampbyautomatic-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampbyautomatic").val(1):s("#saswp-ampbyautomatic").val(0);break;case"saswp-cmp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-cmp").val(1):s("#saswp-cmp").val(0);break;case"saswp-wpreviewpro-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpreviewpro").val(1):s("#saswp-wpreviewpro").val(0);break;case"saswp-webstories-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-webstories").val(1):s("#saswp-webstories").val(0);break;case"saswp-resized-image-folder-checkbox":var t=s("#saswp-resized-image-folder-checkbox");s(this).is(":checked")?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_create_resized_image_folder",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s("#saswp-resized-image-folder").val(1),s("#saswp-resized-image-folder-checkbox").after('<a class="saswp-clear-images button button-default">Clear Images</a>')):(t.prop("checked",!1),t.next().text(e.message),t.next().css("color","red"))},error:function(s){t.prop("checked",!1),t.next().text(s),t.next().css("color","red")}}):(s("#saswp-resized-image-folder").val(0),s(".saswp-clear-images").remove());break;case"saswp-elementor-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-elementor").val(1):s("#saswp-elementor").val(0);break;case"saswp-rannarecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rannarecipe").val(1):s("#saswp-rannarecipe").val(0);break;case"saswp-jetpackrecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-jetpackrecipe").val(1):s("#saswp-jetpackrecipe").val(0);break;case"saswp-quickandeasyfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-quickandeasyfaq").val(1):s("#saswp-quickandeasyfaq").val(0);break;case"saswp-ultimatefaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimatefaqs").val(1):s("#saswp-ultimatefaqs").val(0);break;case"saswp-ultimatemember-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimatemember").val(1):s("#saswp-ultimatemember").val(0);break;case"saswp-showcaseidx-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-showcaseidx").val(1):s("#saswp-showcaseidx").val(0);break;case"saswp-arconixfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-arconixfaq").val(1):s("#saswp-arconixfaq").val(0);break;case"saswp-faqconcertina-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-faqconcertina").val(1):s("#saswp-faqconcertina").val(0);break;case"saswp-wpjobmanager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpjobmanager").val(1):s("#saswp-wpjobmanager").val(0);break;case"saswp-simplejobboard-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-simplejobboard").val(1):s("#saswp-simplejobboard").val(0);break;case"saswp-wpjobopenings-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpjobopenings").val(1):s("#saswp-wpjobopenings").val(0);break;case"saswp-webfaq10-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-webfaq10").val(1):s("#saswp-webfaq10").val(0);break;case"saswp-wpfaqschemamarkup-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpfaqschemamarkup").val(1):s("#saswp-wpfaqschemamarkup").val(0);break;case"saswp-faqschemaforpost-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-faqschemaforpost").val(1):s("#saswp-faqschemaforpost").val(0);break;case"saswp-masteraccordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-masteraccordion").val(1):s("#saswp-masteraccordion").val(0);break;case"saswp-easyfaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easyfaqs").val(1):s("#saswp-easyfaqs").val(0);break;case"saswp-accordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-accordion").val(1):s("#saswp-accordion").val(0);break;case"saswp-html5responsivefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-html5responsivefaq").val(1):s("#saswp-html5responsivefaq").val(0);break;case"saswp-wpresponsivefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpresponsivefaq").val(1):s("#saswp-wpresponsivefaq").val(0);break;case"saswp-ameliabooking-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ameliabooking").val(1):s("#saswp-ameliabooking").val(0);break;case"saswp-easyaccordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easyaccordion").val(1):s("#saswp-easyaccordion").val(0);break;case"saswp-helpiefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-helpiefaq").val(1):s("#saswp-helpiefaq").val(0);break;case"saswp-mooberrybm-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-mooberrybm").val(1):s("#saswp-mooberrybm").val(0);break;case"saswp-novelist-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-novelist").val(1):s("#saswp-novelist").val(0);break;case"saswp-accordionfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-accordionfaq").val(1):s("#saswp-accordionfaq").val(0);break;case"saswp-schemaforfaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-schemaforfaqs").val(1):s("#saswp-schemaforfaqs").val(0);break;case"saswp-wp-customer-reviews-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-customer-reviews").val(1):s("#saswp-wp-customer-reviews").val(0);break;case"saswp-total-recipe-generator-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-total-recipe-generator").val(1):s("#saswp-total-recipe-generator").val(0);break;case"saswp-wordpress-news-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordpress-news").val(1):s("#saswp-wordpress-news").val(0);break;case"saswp-ampwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampwp").val(1):s("#saswp-ampwp").val(0);break;case"saswp-wp-event-aggregator-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-aggregator").val(1):s("#saswp-wp-event-aggregator").val(0);break;case"saswp-timetable-event-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-timetable-event").val(1):s("#saswp-timetable-event").val(0);break;case"saswp-xo-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-xo-event-calendar").val(1):s("#saswp-xo-event-calendar").val(0);break;case"saswp-vs-event-list-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-vs-event-list").val(1):s("#saswp-vs-event-list").val(0);break;case"saswp-calendarize-it-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-calendarize-it").val(1):s("#saswp-calendarize-it").val(0);break;case"saswp-events-schedule-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-events-schedule").val(1):s("#saswp-events-schedule").val(0);break;case"saswp-woo-event-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woo-event-manager").val(1):s("#saswp-woo-event-manager").val(0);break;case"saswp-stachethemes-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-stachethemes-event-calendar").val(1):s("#saswp-stachethemes-event-calendar").val(0);break;case"saswp-all-in-one-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-all-in-one-event-calendar").val(1):s("#saswp-all-in-one-event-calendar").val(0);break;case"saswp-event-on-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-on").val(1):s("#saswp-event-on").val(0);break;case"saswp-easy-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easy-recipe").val(1):s("#saswp-easy-recipe").val(0);break;case"saswp-tevolution-events-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-tevolution-events").val(1):s("#saswp-tevolution-events").val(0);break;case"saswp-strong-testimonials-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-strong-testimonials").val(1):s("#saswp-strong-testimonials").val(0);break;case"saswp-wordlift-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordlift").val(1):s("#saswp-wordlift").val(0);break;case"saswp-betteramp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-betteramp").val(1):s("#saswp-betteramp").val(0);break;case"saswp-wpamp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpamp").val(1):s("#saswp-wpamp").val(0)}}).change(),s("#saswp_kb_type").change(function(){var e=s(this).val();s(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().addClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide"),"Organization"==e&&(s(".saswp_org_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide")),"Person"==e&&(s(".saswp_org_fields").parent().parent().addClass("saswp_hide"),s(".saswp_person_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().removeClass("saswp_hide"))}).change(),s(document).on("click","input[data-id=media]",function(e){e.preventDefault();var a=s(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 e=i.state().get("selection").first().toJSON();s("#"+t).val(e.url),s("input[data-id='"+t+"_id']").val(e.id),s("input[data-id='"+t+"_height']").val(e.height),s("input[data-id='"+t+"_width']").val(e.width),s("input[data-id='"+t+"_thumbnail']").val(e.url),"sd_default_image_button"===a.attr("id")&&(s("#sd_default_image_width").val(e.width),s("#sd_default_image_height").val(e.height));var c="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&e.height<1200&&(c='<p class="saswp_warning">Image size is smaller than recommended size</p>'),s(".saswp_image_div_"+t).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+e.url+'"/><a data-id="'+t+'" href="#" class="saswp_prev_close">X</a></div>'+c)}).open()}),s(document).on("click",".saswp_prev_close",function(e){e.preventDefault();var a=s(this).attr("data-id");s(this).parent().remove(),s("#"+a).val(""),s("input[data-id='"+a+"_id']").val(""),s("input[data-id='"+a+"_height']").val(""),s("input[data-id='"+a+"_width']").val(""),s("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(s("#sd_default_image_width").val(""),s("#sd_default_image_height").val(""))}),s(document).on("click",".saswp-modify-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.get(ajaxurl,{action:"saswp_modify_schema_post_enable",tag_ID:saswp_localize_data.tag_ID,schema_id:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-post-specific-wrapper[data-id="+a+"] .saswp-post-specific-setting").after(e),s(".saswp_modify_this_schema_hidden_"+a).val(1),s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),t.removeClass("updating-message"),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_enable_rating_review(),saswp_enable_rating_automate(),saswp_item_reviewed_call()})}),s(document).on("click",".saswp-restore-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.post(ajaxurl,{action:"saswp_modify_schema_post_restore",tag_ID:saswp_localize_data.tag_ID,schema_id:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){t.removeClass("updating-message"),"t"==e.status?(s(".saswp_modify_this_schema_hidden_"+a).val(0),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-ps-toggle[schema-id="+a+"]").remove()):alert("Something went wrong")},"json")}),s(document).on("change",".saswp-schema-type-toggle",function(e){var a=s(this).attr("data-schema-id"),t=s(this).attr("data-post-id"),i=s(".saswp_modify_this_schema_hidden_"+a).val();if(s(this).is(":checked")){var c=0;s(".saswp-ps-toggle[schema-id="+a+"]").addClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s("#saswp_custom_schema_field[schema-id="+a+"]").parent().addClass("saswp_hide")}else{s("#saswp_custom_schema_field[schema-id="+a+"]").parent().removeClass("saswp_hide"),1==i?(s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide")):(s(".saswp-modify-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-ps-toggle[schema-id="+a+"]").addClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"));var c=1}s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_enable_disable_schema_on_post",status:c,schema_id:a,post_id:t,req_from:saswp_localize_data.req_from,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-reset-data",function(e){e.preventDefault(),!0==confirm("Are you sure?")&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){setTimeout(function(){location.reload()},1e3)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp_license_activation",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("license-status"),i=s(this).attr("add-on"),c=s("#"+i+"_addon_license_key").val();t&&i&&c?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){s("#"+i+"_addon_license_key_status").val(e.status),"active"==e.status&&e.days_remaining<0?(s("span.inactive_status_reviews").text("Expired"),s("span.inactive_status_reviews").css({color:"red","font-weight":"400"})):"active"==e.status?(s(".saswp-"+i+"-dashicons").addClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").css("color","green"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","inactive"),s(".saswp_license_activation[add-on='"+i+"']").text("Deactivate"),s("span.addon-activated_reviews").css({color:"green","margin-left":"8px","font-weight":"400"}),s(".saswp_license_status_msg[add-on='"+i+"']").text("Activated"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","green"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message),s("span.inactive_status_"+i).text("Active"),s("span.inactive_status_"+i).css({color:"green","margin-left":"8px","font-weight":"400"}),s("span.inactive_status_"+i).removeClass("inactive_status_"+i).addClass("addon-activated_"+i)):(s(".saswp-"+i+"-dashicons").addClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").css("color","red"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","active"),s(".saswp_license_activation[add-on='"+i+"']").text("Activate"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","red"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message),s("span.addon-activated_"+i).text("Inactive"),s("span.addon-activated_"+i).css("color","#bebfc0"),s("span.addon-activated_"+i).removeClass("addon-activated_"+i).addClass("inactive_status_"+i),s("span.limit_span").css("display","none")),a.removeClass("updating-message")},error:function(s){console.log(s)}}):(alert("Please enter value license key"),a.removeClass("updating-message"))}),jQuery(document).on("click",".user_refresh_single_addon",function(s){var e=jQuery(this);s.preventDefault();var a=e.attr("add-on"),t=e.attr("remaining_days_org"),i=jQuery("#"+a+"_addon_license_key").val();document.getElementById("user_refresh_"+a).classList.add("spin");var c=new Date,p=function s(e){for(var a=e+"=",t=document.cookie.split(";"),i=0;i<t.length;i++){for(var c=t[i];" "==c.charAt(0);)c=c.substring(1,c.length);if(0==c.indexOf(a))return c.substring(a.length,c.length)}return null}("saswp_addon_refresh_check");p=new Date(p);var n=-1,o=Math.abs(c.getTime()-p.getTime()),n=Math.ceil(o/864e5),o=Math.abs(new Date(t).getTime()-c.getTime()),r=Math.ceil(o/864e5);-1==n||n>1||r<1?(document.cookie="saswp_addon_refresh_check="+c,jQuery.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:i,license_status:"active",add_on:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){jQuery("#"+a+"_addon_license_key_status").val(s.status),document.getElementById("user_refresh_"+a).classList.remove("spin"),e.removeClass("updating-message")},error:function(s){console.log(s)}})):(setTimeout(function(){jQuery(".dashicons").removeClass("spin")},0),alert("Please try after "+(p=Math.abs(p.getDate()+1)+"/"+Math.abs(p.getMonth()+1)+"/"+p.getFullYear()+" "+p.getHours()+":"+p.getMinutes()+":"+p.getSeconds())))});var p=document.getElementById("activated-plugins-days_remaining");if(p)var n=p.getAttribute("days_remaining");n>=0&&n<=7&&setTimeout(function(){jQuery("#refresh_license_icon_top-").trigger("click")},0),jQuery(document).on("click","#refresh_license_icon_top-",function(e){document.getElementById("refresh_license_icon_top").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on");s(this).attr("data-attr"),s(this).attr("add-onname");var c=s("#"+i+"_addon_license_key").val();i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("refresh_license_icon_top").classList.remove("spin");var a=e.days_remaining;a>=0&&a<=7&&s("span.saswp-addon-alert").text("expiring in "+a+" days ")}else document.getElementsByClassName("saswp-addon-alert")[0].style.color="green",document.getElementsByClassName("renewal-license")[0].style.display="none",document.getElementById("refresh_license_icon_top").classList.remove("spin"),s("span.pro_warning").css("display","none")}}):(alert("Please enter value license key"),a.removeClass("updating-message")),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_transient",license_key:c,license_key:c,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){JSON.parse(s)}})});var p=document.getElementById("activated-plugins-days_remaining");if(p)var n=p.getAttribute("days_remaining");n>=0&&n<=7&&setTimeout(function(){jQuery("#user_refresh_expired_addon-").trigger("click")},0),jQuery(document).on("click","#user_refresh_expired_addon-",function(e){document.getElementById("user_refresh_expired_addon").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on");s(this).attr("data-attr"),s(this).attr("add-onname");var c=s("#"+i+"_addon_license_key").val();i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("user_refresh_expired_addon").classList.remove("spin");var a=e.days_remaining;a<0?(s("span#exp").text("Expired"),location.reload()):a>7&&(s("span.inner_span").text(""),s("span.saswp_addon_inactive").text(""),s("span.expiredinner_span").text("Your License is Active"),s("span.expiredinner_span").css("color","green"),s(".renewal-license").css("display","none"),s(".saswp_addon_icon").css("display","none"))}}}):(alert("Please enter value license key"),a.removeClass("updating-message"))});var p=document.getElementById("activated-plugins-days_remaining");if(p)var n=p.getAttribute("days_remaining");setTimeout(function(){jQuery("#refresh_expired_addon-").trigger("click")},0),jQuery(document).on("click","#refresh_expired_addon-",function(e){document.getElementById("refresh_expired_addon").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on");s(this).attr("data-attr"),s(this).attr("add-onname");var c=s("#"+i+"_addon_license_key").val();i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("refresh_expired_addon").classList.remove("spin");var a=e.days_remaining;a<0?s("span#exp").text("Expired"):a>7&&(s("span.inner_span").text(""),s("span.saswp_addon_inactive").text(""),s("span.expiredinner_span").text("Your License is Active"),s("span.expiredinner_span").css("color","green"),s(".renewal-license").css("display","none"),s(".saswp_addon_icon").css("display","none"))}}}):(alert("Please enter value license key"),a.removeClass("updating-message")),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_expired_license_transient",license_key:c,license_key:c,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){JSON.parse(s)}})}),s(".saswp-send-query").on("click",function(e){e.preventDefault();var a=s("#saswp_query_message").val(),t=s("#saswp_query_email").val(),i=s("#saswp_query_premium_cus").val();""!=s.trim(a)&&i&&""!=s.trim(t)&&!0==saswpIsEmail(t)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_send_query_message",premium_cus:i,message:a,email:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s(".saswp-query-success").show(),s(".saswp-query-error").hide()):(s(".saswp-query-success").hide(),s(".saswp-query-error").show())},error:function(s){console.log(s)}}):""==s.trim(a)&&""==i&&""==s.trim(t)?alert("Please enter the message, email and select customer type"):(""==i&&alert("Select Customer type"),""==s.trim(a)&&alert("Please enter the message"),""==s.trim(t)&&alert("Please enter the email"),!1==saswpIsEmail(t)&&alert("Please enter a valid email"))}),s(".saswp-import-plugins").on("click",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("data-id");s.get(ajaxurl,{action:"saswp_import_plugin_data",plugin_name:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status?(s(a).parent().find(".saswp-imported-message").text(e.message),s(a).parent().find(".saswp-imported-message").removeClass("saswp-error"),setTimeout(function(){location.reload()},2e3)):(s(a).parent().find(".saswp-imported-message").addClass("saswp-error"),s(a).parent().find(".saswp-imported-message").text(e.message)),a.removeClass("updating-message")},"json")}),s(".saswp-feedback-no-thanks").on("click",function(e){e.preventDefault(),s.get(ajaxurl,{action:"saswp_feeback_no_thanks",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status&&s(".saswp-feedback-notice").hide()},"json")}),s(".saswp-feedback-remindme").on("click",function(e){e.preventDefault(),s.get(ajaxurl,{action:"saswp_feeback_remindme",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status&&s(".saswp-feedback-notice").hide()},"json")}),s(document).on("change",".saswp-local-business-type-select",function(e){e.preventDefault();var a=s(this),t=s(this).val();s.get(ajaxurl,{action:"saswp_get_sub_business_ajax",business_type:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){s(".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+'">',s.each(e.result,function(s,e){i+='<option value="'+s+'">'+e+"</option>"}),i+="</select></td>",i+="</tr>",a.parents(".form-table tr:first").after(i)}else s(".saswp-local-business-name-select").parents("tr").remove()},"json")}),saswp_item_reviewed_call(),jQuery(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),s(document).on("click",".saswp-add-custom-schema",function(e){e.preventDefault(),s(".saswp-add-custom-schema-field").removeClass("saswp_hide"),s(this).hide()}),s(document).on("click",".saswp-delete-custom-schema",function(e){e.preventDefault(),s("#saswp_custom_schema_field").val(""),s(".saswp-add-custom-schema-field").addClass("saswp_hide"),s(".saswp-add-custom-schema").show()}),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_reviews_datepicker(),s(document).on("click",".saswp-add-more-item",function(e){e.preventDefault();var a='<tr class="saswp-review-item-tr">';a+="<td>Review Item Feature</td>",a+='<td><input type="text" name="saswp-review-item-feature[]"></td>',a+="<td>Rating</td>",a+='<td><input step="0.1" min="0" max="5" type="number" name="saswp-review-item-star-rating[]"></td>',a+='<td><a type="button" class="saswp-remove-review-item button">x</a></td>',a+="</tr>",s(".saswp-review-item-list-table").append(a)}),s(document).on("click",".saswp-remove-review-item",function(e){e.preventDefault(),s(this).parent().parent("tr").remove()}),s(document).on("focusout",".saswp-review-item-tr input[type=number]",function(e){e.preventDefault();var a=0,t=s(".saswp-review-item-tr input[type=number]").length;s(".saswp-review-item-tr input[type=number]").each(function(e,t){""==s(t).val()?a+=parseFloat(0):a+=parseFloat(s(t).val())});var i=a/t;s("#saswp-review-item-over-all").val(i)}),s("#saswp-review-location").change(function(){var e=s(this).val();s(".saswp-review-shortcode").addClass("saswp_hide"),3==e&&s(".saswp-review-shortcode").removeClass("saswp_hide")}).change(),s("#saswp-review-item-enable").change(function(){s(this).is(":checked")?s(".saswp-review-fields").show():s(".saswp-review-fields").hide()}).change(),s(document).on("click",".saswp-restore-post-schema",function(e){e.preventDefault();var a=s(this);if(a.addClass("updating-message"),s(".saswp-post-specific-schema-ids").val())var t=JSON.parse(s(".saswp-post-specific-schema-ids").val());s.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(s){"t"==s.status||alert(s.msg),setTimeout(function(){location.reload()},1e3),a.removeClass("updating-message")},"json")}),s(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(e){e.preventDefault();var a=s(this).attr("data-id");s(".saswp-post-specific-wrapper").hide(),s("#"+a).show(),s("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),s("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),s(this).addClass("selected"),s(this).parent().addClass("selected"),saswp_enable_rating_review(),saswp_enable_rating_automate()}),s("#saswp-global-tabs a:first").addClass("saswp-global-selected"),s(".saswp-global-container").hide();var o=window.location.hash;if("#saswp-default-container"==o?s(".saswp-global-container:eq(2)").show():"#saswp-knowledge-container"==o?s(".saswp-global-container:eq(1)").show():s(".saswp-global-container:first").show(),s("#saswp-global-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-global-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-global-container").hide(),s("#"+e).show())}),s("#saswp-review-tabs a:first").addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s(".saswp-review-container:first").show(),s("#saswp-review-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-review-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s("#"+e).show())}),s("#saswp-compatibility-tabs a:first").addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s(".saswp-compatibility-container:first").show(),s("#saswp-compatibility-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-compatibility-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s("#"+e).show())}),s('a[href="'+saswp_localize_data.new_url_selector+'"]').attr("href",saswp_localize_data.new_url_href),s(".saswp-enable-modify-schema-output").on("change",function(){s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide"),"manual"==s(this).val()&&(s(".saswp-static-container").removeClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide")),"automatic"==s(this).val()&&(s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").removeClass("saswp_hide"))}),s(document).on("change",".saswp-custom-fields-name",function(){var e="text",a=s(this).parent().parent("tr"),t=s(this).val();(-1!=t.indexOf("_image")||-1!=t.indexOf("_logo"))&&(e="image");var i=s(this).parent().parent("tr").find("td:eq(1)");saswp_get_meta_list(null,e,null,i,t,a)}),s(document).on("click",".saswp-skip-button",function(e){e.preventDefault(),s(this).parent().parent().hide(),s.post(ajaxurl,{action:"saswp_skip_wizard",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){},"json")}),s(document).on("click",".saswp_add_schema_fields_on_fly",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("data-id"),i=s(this).attr("fields_type"),c=s(this).attr("div_type"),p=s(this).attr("itemlist_sub_type"),n=s("saswp_specific_"+t+" , .saswp-"+c+"-table-div").length,o=s("saswp_specific_"+t+" , .saswp-"+c+"-table-div:nth-child("+n+")").attr("data-id");(o=++o)||(o=0),saswp_get_post_specific_schema_fields(a,o,i,c,t,i+"_",p)}),s(document).on("click",".saswp-table-close",function(){s(this).parent().remove()}),s(document).on("click",".saswp-table-close-new",function(){s(this).closest(".saswp-dynamic-properties").remove()}),s(document).on("click",".saswp-rmv-modify_row",function(e){e.preventDefault(),s(this).parent().parent().remove()}),s(document).on("change",".saswp-custom-meta-list",function(){var e=s(this),a=s("select#schema_type option:selected").val(),t=s(this).val(),i=s(this).parent().parent("tr").find(".saswp-custom-fields-name").val(),c="",p=a.toLowerCase()+"_"+i,n="saswp_fixed_image["+i+"]";"manual_text"==t?(c+='<td><textarea cols="35" rows="2" name="saswp_fixed_text['+i+']"></textarea></td>',c+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):"taxonomy_term"==t?saswp_taxonomy_term.taxonomy?(c+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(c),saswpCustomSelect2()):s.get(ajaxurl,{action:"saswp_get_taxonomy_term_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){s&&(saswp_taxonomy_term.taxonomy=s,c+=saswp_taxonomy_term_html(s,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(c),saswpCustomSelect2())},"json"):"custom_field"==t?(c+='<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+i+']">',c+="</select></td>",c+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):"fixed_image"==t?(c+="<td>",c+="<fieldset>",c+='<input data-id="media" style="width: 30%;" class="button" id="'+p+'_button" name="'+p+'_button" type="button" value="Upload" />',c+='<input type="hidden" data-id="'+p+'_height" class="upload-height" name="'+n+'[height]" id="'+p+'_height" value="">',c+='<input type="hidden" data-id="'+p+'_width" class="upload-width" name="'+n+'[width]" id="'+p+'_width" value="">',c+='<input type="hidden" data-id="'+p+'_thumbnail" class="upload-thumbnail" name="'+n+'[thumbnail]" id="'+p+'_thumbnail" value="">',c+='<div class="saswp_image_div_'+p+'">',c+="</div>",c+="</fieldset>",c+="</td>",c+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):(c+="<td></td>",c+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2())}),s(document).on("change",".saswp-item-reivewed-list",function(){s(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[];var e=s(this),a=s("select#schema_type option:selected").val();saswp_item_reviewed_ajax(a,e,"manual")}),s(document).on("click",".saswp-add-custom-fields",function(){var e=s(this);e.addClass("updating-message");var a=s("select#schema_type option:selected").val(),t="",i=null;"Review"==a&&(t=s("select.saswp-item-reivewed-list option:selected").val(),i="saswp_review_name");var c=s("#post_ID").val();""!=a&&(saswp_meta_list_fields[a]?saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null):s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:c,schema_type:a,schema_subtype:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){saswp_meta_list_fields[a]=s,saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null)},error:function(s){console.log(s)}}))}),saswpCustomSelect2(),saswp_enable_rating_review(),saswp_enable_rating_automate(),saswp_enable_rating_automate(),s('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),s(document).on("click",".saswp_coonect_google_place",function(){var e=s("#saswp_google_place_id").val(),a=s("#saswp_language_list").val(),t=s("#saswp_googel_api").val();""!=e&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:e,language:a,google_api:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){console.log(s.status)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-add-social-links",function(){s(".saswp-social-links-table").append('<tr><td><input type="text" placeholder="https://www.facebook.com/profile" name="sd_data[saswp_social_links][]" value=""></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td></tr>')}),s(document).on("click",".saswp-show-accept-rv-popup",function(){tb_show("Reviews Form","#TB_inline??width=600&height=400&inlineId=saswp-accept-reviews-popup"),s(document).find("#TB_window").width(600).height(400).css({top:"100px","margin-top":"0px"})}),("saswp_reviews"==saswp_localize_data.post_type||"saswp-collections"==saswp_localize_data.post_type)&&"edit.php"==saswp_localize_data.page_now){var r='<div class="saswp-custom-post-tab">';r+='<div style="display:none;" id="saswp-accept-reviews-popup">',r+='<div class="saswp-accept-rv-container">',r+="<p>Use Below shortcode to show reviews form in your website. Using this you can accept reviews from your website directly</p>",r+='<div class="saswp-show-form-on-tab"><strong>Simple Form</strong> <input value="[saswp-reviews-form]" type="text" readonly></div>',r+='<div class="saswp-show-form-on-tab"><strong>Show form on button tap</strong> <input value="[saswp-reviews-form onbutton="1"]" type="text" readonly></div>',r+='<p><strong>Note:</strong> To enable google reCAPTCHA v2 add SITE KEY & SECRET KEY respectively as parameters in above shortcode. Eg <input value="[saswp-reviews-form site_key="your key" secret_key="your key"]" type="text" readonly>. To get keys <a target="_blank" href="https://www.google.com/recaptcha/admin/create">Click here.</a> You must choose reCAPTCHA type v2 </p>',r+="</div>",r+="</div>",r+='<h2 class="nav-tab-wrapper">',r+="<a href="+saswp_localize_data.reviews_page_url+' class="nav-tab '+(saswp_localize_data.current_url==saswp_localize_data.reviews_page_url?"saswp-global-selected":"")+'">Reviews</a>',r+="<a href="+saswp_localize_data.collections_page_url+' class="nav-tab '+(saswp_localize_data.current_url==saswp_localize_data.collections_page_url?"saswp-global-selected":"")+'">Collections</a>',r+='<a class="nav-tab saswp-show-accept-rv-popup">Accept Reviews</a>',r+="</h2>",r+="</div>",jQuery(jQuery(".wrap")).prepend(r)}jQuery(document).on("click",".saswp-clear-images",function(e){e.preventDefault();var a=s(this);!0==confirm("Are you sure? It will remove all the resized images")&&(a.addClass("updating-message"),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_clear_resized_image_folder",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){a.removeClass("updating-message"),"t"!=s.status&&alert("something went wrong")},error:function(s){console.log(s)}}))}),"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&&s(".saswp-rating-div").rateYo({spacing:"5px",rtl:saswp_localize_data.is_rtl,rating:saswp_reviews_data.rating_val,readOnly:saswp_reviews_data.readonly,onSet:function(e,a){s(this).next().next().val(e)}}).on("rateyo.change",function(e,a){var t=a.rating;s(this).next().text(t)}),s("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var e=s(this);e.parent().find(".saswp-phone-validation").remove();var a=s(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(a)?e.parent().find(".saswp-phone-validation").remove():e.after('<span style="color:red;" class="saswp-phone-validation">Invalid Phone Number</span>')}),saswpCollectionSlider(),s(document).on("click",".saswp-add-rv-btn",function(){s(".saswp-dynamic-platforms").toggle()}),s(".saswp-rmv-coll-rv").on("click",function(){if(rmv_boolean=!rmv_boolean,saswp_on_collection_design_change(),jQuery(jQuery(".saswp-add-dynamic-section")).remove(),rmv_boolean){var s="";s+='<div class="saswp-add-dynamic-section">',s+='<div class="saswp-add-dynamic-btn">',s+='<span class="dashicons dashicons-plus-alt saswp-add-rv-btn"></span>',s+="</div>",s+='<div class="saswp-dynamic-platforms" style="display:none;">',s+='<select name="saswp_dynamic_platforms" id="saswp_dynamic_platforms"><option value="">Choose Platform</option>'+jQuery("#saswp-plaftorm-list").html()+"</select>",s+="</div>",s+="</div>",jQuery(jQuery(".saswp-collection-preview")[0]).after(s)}}),s(document).on("change","#saswp_dynamic_platforms",function(){var e=s(this).val(),a="";a+='<select id="saswp_dynamic_reviews_list">',a+="</select>",a+='<a class="button button-default saswp-add-single-rv">Add</a>',s("#saswp_dynamic_platforms").nextAll().remove(),s("#saswp_dynamic_platforms").after(a);var t=ajaxurl+"?action=saswp_add_reviews_to_select2&saswp_security_nonce="+saswp_localize_data.saswp_security_nonce+"&platform_id="+e;s("#saswp_dynamic_reviews_list").select2({ajax:{url:t,dataType:"json",processResults:function(s){if(s.status)return{results:s.message}}}})}),s(document).on("click",".saswp-add-single-rv",function(e){e.preventDefault();var a=s("#saswp_dynamic_reviews_list").val(),t=s("#saswp_dynamic_platforms").val();a&&saswp_get_collection_data(null,t,null,a,!0)}),s(document).on("click",".saswp-remove-coll-rv",function(){var e=s(this).attr("data-id"),a=s(this).attr("platform-id");if(a){var t=saswp_collection[a].filter(function(s){return s.saswp_review_id!=e});saswp_collection[a]=t,saswp_on_collection_design_change()}}),s(document).on("click",".saswp-grid-page",function(e){e.preventDefault(),saswp_grid_page=s(this).attr("data-id"),saswp_on_collection_design_change()}),s("#saswp-coll-pagination").change(function(){saswp_grid_page=1,s("#saswp-coll-per-page").parent().addClass("saswp_hide_imp"),s(this).is(":checked")&&s("#saswp-coll-per-page").parent().removeClass("saswp_hide_imp"),saswp_on_collection_design_change()}),s(".saswp-accordion").click(function(){s(this).toggleClass("active"),s(this).next(".saswp-accordion-panel").slideToggle(200)}),s(document).on("click",".saswp-opn-cls-btn",function(){s("#saswp-reviews-cntn").toggle(),s("#saswp-reviews-cntn").is(":visible")?(s(".saswp-onclick-show").css("display","flex"),s(".saswp-onclick-hide").hide(),s(".saswp-open-class").css("width","500px")):(s(".saswp-onclick-show").css("display","none"),s(".saswp-onclick-hide").show(),s(".saswp-open-class").css("width","300px"))}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?s(".saswp-collection-shortcode").removeClass("saswp_hide"):s(".saswp-collection-shortcode").addClass("saswp_hide")}).change(),s(document).on("click",".saswp-remove-platform",function(e){e.preventDefault();var a=s(this).attr("platform-id");saswp_collection.splice(a,1),s(this).parent().remove(),saswp_on_collection_design_change()}),s(".saswp-number-change").bind("keyup mouseup",function(){saswp_on_collection_design_change()}),s(".saswp-coll-settings-options").change(function(){saswp_grid_page=1;var e=s(".saswp-collection-desing").val(),a=s(".saswp-collection-sorting").val();s(".saswp-coll-options").addClass("saswp_hide"),s(".saswp-collection-lp").css("height","auto"),s(".saswp-rmv-coll-rv").hide(),s(".saswp-add-dynamic-section").hide(),"grid"==e&&(s(".saswp-grid-options").removeClass("saswp_hide"),s(".saswp-rmv-coll-rv").show(),s(".saswp-add-dynamic-section").show()),"gallery"==e&&s(".saswp-slider-options").removeClass("saswp_hide"),"fomo"==e&&(s(".saswp-fomo-options").removeClass("saswp_hide"),s(".saswp-collection-lp").css("height","31px")),"popup"==e&&s(".saswp-collection-lp").css("height","31px"),s("#saswp_collection_specific_rating").is(":checked")?s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"):s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide"),"recent"==a?(s("#saswp_collection_specific_rating").parent().parent().removeClass("saswp_hide"),s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"),s("#saswp_collection_specific_rating").is(":checked")?s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"):s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide")):(s("#saswp_collection_specific_rating").parent().parent().addClass("saswp_hide"),s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide")),saswp_on_collection_design_change()}).change(),s(".saswp-add-to-collection").on("click",function(e){e.preventDefault();var a=s(this),t=s("#saswp-plaftorm-list").val(),i=s("#saswp-review-count").val();t&&i>0?(a.addClass("updating-message"),saswp_get_collection_data(i,t,a,null)):alert("Enter Count")});var l=s("#saswp_total_reviews_list").val();l&&saswp_get_collection_data(null,null,null,null,l),(e=document.createElement("div")).style.cssText="position:absolute; background:black; color:white; padding:4px 6px;z-index:10000;border-radius:2px; font-size:12px;box-shadow:3px 3px 3px rgba(0,0,0,.4);opacity:0;transition:opacity 0.3s",e.innerHTML="Copied!",document.body.appendChild(e);var d=document.getElementById("saswp-motivatebox");d&&d.addEventListener("mouseup",function(s){var t,i,c,p,n,s=s||event,o=s.target||s.srcElement;"motivate"==o.className&&(t=o,(i=document.createRange()).selectNodeContents(t),(c=window.getSelection()).removeAllRanges(),c.addRange(i),function s(){var e;try{e=document.execCommand("copy")}catch(a){e=!1}return e}()&&(n=(p=s)||event,clearTimeout(a),e.style.left=n.pageX-10+"px",e.style.top=n.pageY+15+"px",e.style.opacity=1,a=setTimeout(function(){e.style.opacity=0},500)))},!1)});
|
admin_section/js/saswp-add-new.js
CHANGED
@@ -210,7 +210,6 @@ var Merlin = (function($){
|
|
210 |
Merlin.init();
|
211 |
|
212 |
jQuery(document).ready(function($) {
|
213 |
-
|
214 |
$(".social-fields input[type=checkbox]").change(function(){
|
215 |
socialFields($(this));
|
216 |
})
|
@@ -243,7 +242,7 @@ jQuery(document).ready(function($) {
|
|
243 |
|
244 |
$(".saswp-schame-type-select").select2();
|
245 |
$(".saswp-schame-type-select").change(function(){
|
246 |
-
var schematype = $
|
247 |
|
248 |
$(".saswp-option-table-class tr").each(function(index,value){
|
249 |
if(index>0){
|
@@ -259,6 +258,11 @@ jQuery(document).ready(function($) {
|
|
259 |
}
|
260 |
|
261 |
if(schematype == 'local_business'){
|
|
|
|
|
|
|
|
|
|
|
262 |
$(".saswp-option-table-class tr").eq(1).show();
|
263 |
$(".saswp-business-text-field-tr").show();
|
264 |
$(".saswp-option-table-class tr").find('select').attr('disabled', false);
|
@@ -276,13 +280,13 @@ jQuery(document).ready(function($) {
|
|
276 |
$(".saswp-local-sub-type-2").select2();
|
277 |
$("#saswp_business_type").select2();
|
278 |
$("#saswp_business_type").change(function(){
|
279 |
-
var businesstype = $
|
280 |
var schematype = $(".saswp-schame-type-select").val();
|
281 |
|
282 |
$(".saswp-option-table-class tr").each(function(index,value){
|
283 |
if(index>1){
|
284 |
$(this).hide();
|
285 |
-
|
286 |
}
|
287 |
});
|
288 |
if(schematype == 'TechArticle' || schematype == 'Article' || schematype == 'Blogposting' || schematype == 'NewsArticle' || schematype == 'WebPage'){
|
@@ -292,6 +296,7 @@ jQuery(document).ready(function($) {
|
|
292 |
$(".saswp-enable-speakable").parent().parent().hide();
|
293 |
}
|
294 |
if(schematype == 'local_business'){
|
|
|
295 |
$(".saswp-"+businesstype+'-tr').show();
|
296 |
$(".saswp-business-text-field-tr").show();
|
297 |
$(".saswp-"+businesstype+'-tr').find('select').attr('disabled', false);
|
210 |
Merlin.init();
|
211 |
|
212 |
jQuery(document).ready(function($) {
|
|
|
213 |
$(".social-fields input[type=checkbox]").change(function(){
|
214 |
socialFields($(this));
|
215 |
})
|
242 |
|
243 |
$(".saswp-schame-type-select").select2();
|
244 |
$(".saswp-schame-type-select").change(function(){
|
245 |
+
var schematype = $(this).val();
|
246 |
|
247 |
$(".saswp-option-table-class tr").each(function(index,value){
|
248 |
if(index>0){
|
258 |
}
|
259 |
|
260 |
if(schematype == 'local_business'){
|
261 |
+
$(document).ready(function(){
|
262 |
+
$(".saswp-faqs-checkbox-field-tr").hide();
|
263 |
+
$(".saswp-business-type-tr").show();
|
264 |
+
});
|
265 |
+
$(".saswp-faqs-checkbox-field-tr").hide(); // local business
|
266 |
$(".saswp-option-table-class tr").eq(1).show();
|
267 |
$(".saswp-business-text-field-tr").show();
|
268 |
$(".saswp-option-table-class tr").find('select').attr('disabled', false);
|
280 |
$(".saswp-local-sub-type-2").select2();
|
281 |
$("#saswp_business_type").select2();
|
282 |
$("#saswp_business_type").change(function(){
|
283 |
+
var businesstype = $(this).val();
|
284 |
var schematype = $(".saswp-schame-type-select").val();
|
285 |
|
286 |
$(".saswp-option-table-class tr").each(function(index,value){
|
287 |
if(index>1){
|
288 |
$(this).hide();
|
289 |
+
//$(this).find('select').attr('disabled', true);
|
290 |
}
|
291 |
});
|
292 |
if(schematype == 'TechArticle' || schematype == 'Article' || schematype == 'Blogposting' || schematype == 'NewsArticle' || schematype == 'WebPage'){
|
296 |
$(".saswp-enable-speakable").parent().parent().hide();
|
297 |
}
|
298 |
if(schematype == 'local_business'){
|
299 |
+
$(".saswp-business-type-tr").show();
|
300 |
$(".saswp-"+businesstype+'-tr').show();
|
301 |
$(".saswp-business-text-field-tr").show();
|
302 |
$(".saswp-"+businesstype+'-tr').find('select').attr('disabled', false);
|
admin_section/js/saswp-add-new.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var ajaxurl=saswp_add_new_params.ajaxurl,Merlin=function(e){var t={save_logo:function(e){new
|
1 |
+
var ajaxurl=saswp_add_new_params.ajaxurl,Merlin=function(e){var t,s={save_logo:function(e){new n(e).init(e)},install_child:function(e){new ChildTheme().init(e)},activate_license:function(e){new ActivateLicense().init(e)},install_plugins:function(e){new PluginManager().init(e)},install_content:function(e){new ContentManager().init(e)}};function a(){var t=e(".merlin__body"),a=(e(".merlin__body--loading"),e(".merlin__body--exiting"),e("#merlin__drawer-trigger"));drawer_opened="merlin__drawer--open",setTimeout(function(){t.addClass("loaded")},100),a.on("click",function(){t.toggleClass(drawer_opened)}),e(".merlin__button--proceed:not(.merlin__button--closer)").click(function(e){e.preventDefault();var s=this.getAttribute("href");t.addClass("exiting"),setTimeout(function(){window.location=s},400)}),e(".merlin__button--closer").on("click",function(e){t.removeClass(drawer_opened),e.preventDefault();var s=this.getAttribute("href");setTimeout(function(){t.addClass("exiting")},600),setTimeout(function(){window.location=s},1100)}),e(".button-next").on("click",function(t){if(t.preventDefault(),!function e(t){var s=jQuery(t);if("yes"==s.data("done-loading"))return!1;var a=!1;return s.is("input")||s.is("button"),s.data("done-loading","yes"),s.addClass("merlin__button--loading"),{done:function(){a=!0,s.attr("disabled",!1)}}}(this))return!1;var a=e(this).data("callback");return!a||void 0===s[a]||(s[a](this),!1)})}function n(){var t,s=e(".merlin__body"),a=e("#child-theme-text");function n(e){void 0!==e.done?(setTimeout(function(){a.addClass("lead")},0),setTimeout(function(){a.addClass("success"),a.html(e.message)},600),t()):(a.addClass("lead error"),a.html(e.error))}return{init:function(a){var i;t=function(){setTimeout(function(){e(".saswp_branding").hide(),e(".merlin__body").addClass("js--finished")},0),s.removeClass(drawer_opened),setTimeout(function(){e(".merlin__body").addClass("exiting")},1200),setTimeout(function(){window.location.href=a.href},1200)},i={action:"saswp_add_new_save_steps_data",wpnonce:saswp_add_new_params.wpnonce},jQuery("ul.merlin__drawer--import-content").find("input, select, textarea").each(function(e,t){switch(jQuery(this).attr("type")){case"text":case"hidden":i[jQuery(this).attr("name")]=jQuery(this).val();break;case"checkbox":!0==jQuery(this).prop("checked")?i[jQuery(this).attr("name")]=1:i[jQuery(this).attr("name")]=0;break;default:!1==jQuery(this).prop("disabled")&&(i[jQuery(this).attr("name")]=jQuery(this).val())}}),jQuery.post(saswp_add_new_params.ajaxurl,i,n).fail(n)}}}return{init:function(){t=this,e(a)},callback:function(e){console.log(e),console.log(this)}}}(jQuery);Merlin.init(),jQuery(document).ready(function(e){function t(e){if(e.prop("checked")){var t=e.attr("name");t=t.replace("_checkbox",""),e.parent(".social-fields").find("input[type=text]").show()}else e.parent(".social-fields").find("input[type=text]").val("").hide()}function s(){var t="";e("select#schema_type option:selected").val()&&(t=e("select#schema_type option:selected").val()),e(".saswp-tab-links.selected").attr("saswp-schema-type")&&(t=e(".saswp-tab-links.selected").attr("saswp-schema-type")),t&&e(".saswp-enable-rating-review-"+t.toLowerCase()).change(function(){e(this).is(":checked")?e(this).parent().parent().siblings(".saswp-rating-review-"+t.toLowerCase()).show():e(this).parent().parent().siblings(".saswp-rating-review-"+t.toLowerCase()).hide()}).change()}e(".social-fields input[type=checkbox]").change(function(){t(e(this))}),e(".social-fields input[type=checkbox]").each(function(){t(e(this))}),e(".post-type-fields input[type=checkbox]").change(function(){var t=e(this);if(t.prop("checked")){var s=t.attr("name");s=s.replace("_checkbox",""),t.parent(".post-type-fields").find("select#schema_type").show()}else t.parent(".post-type-fields").find("select#schema_type").val("").hide()}),e(".post-type-fields").each(function(){e(this).find("select#schema_type").val("").hide()}),e(".saswp-schame-type-select").select2(),e(".saswp-schame-type-select").change(function(){var t=e(this).val();e(".saswp-option-table-class tr").each(function(t,s){t>0&&(e(this).hide(),e(this).find("select").attr("disabled",!0))}),"TechArticle"==t||"Article"==t||"Blogposting"==t||"NewsArticle"==t||"WebPage"==t?e(".saswp-enable-speakable").parent().parent().show():e(".saswp-enable-speakable").parent().parent().hide(),"local_business"==t&&(e(document).ready(function(){e(".saswp-faqs-checkbox-field-tr").hide(),e(".saswp-business-type-tr").show()}),e(".saswp-faqs-checkbox-field-tr").hide(),e(".saswp-option-table-class tr").eq(1).show(),e(".saswp-business-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1),e(".select-post-type").val("show_globally").trigger("change")),"Review"==t&&(e(".saswp-review-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),e(".saswp-schem-type-note").addClass("saswp_hide"),s()}).change(),e(".saswp-local-sub-type-2").select2(),e("#saswp_business_type").select2(),e("#saswp_business_type").change(function(){var t=e(this).val(),a=e(".saswp-schame-type-select").val();e(".saswp-option-table-class tr").each(function(t,s){t>1&&e(this).hide()}),"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-business-type-tr").show(),e(".saswp-"+t+"-tr").show(),e(".saswp-business-text-field-tr").show(),e(".saswp-"+t+"-tr").find("select").attr("disabled",!1)),"Review"==a&&(e(".saswp-review-text-field-tr").show(),e(".saswp-review-text-field-tr").find("select").attr("disabled",!1)),s()}).change(),s()});
|
core/array-list/schema-properties.php
CHANGED
@@ -398,6 +398,11 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
398 |
'type' => 'text',
|
399 |
'default' => get_the_modified_date("Y-m-d")
|
400 |
),
|
|
|
|
|
|
|
|
|
|
|
401 |
array(
|
402 |
'label' => 'Author Type',
|
403 |
'id' => 'saswp_blogposting_author_type_'.$schema_id,
|
@@ -448,6 +453,11 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
448 |
'placeholder' => 'eg: Editor in Chief'
|
449 |
),
|
450 |
),
|
|
|
|
|
|
|
|
|
|
|
451 |
array(
|
452 |
'label' => 'ReviewedBy Type',
|
453 |
'id' => 'saswp_blogposting_reviewedby_type_'.$schema_id,
|
@@ -541,6 +551,16 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
541 |
'type' => 'media',
|
542 |
'default' => isset($sd_data['sd_logo']) ? $sd_data['sd_logo']['url'] : ''
|
543 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
544 |
array(
|
545 |
'label' => 'AlumniOf',
|
546 |
'id' => 'saswp_blogposting_alumniof_'.$schema_id,
|
@@ -756,7 +776,16 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
756 |
'type' => 'media',
|
757 |
'default' => isset($author_details['url']) ? $author_details['url']: ''
|
758 |
),
|
759 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
760 |
array(
|
761 |
'label' => 'Organization Name',
|
762 |
'id' => 'saswp_newsarticle_organization_name_'.$schema_id,
|
@@ -1087,6 +1116,11 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
1087 |
'type' => 'text',
|
1088 |
'default' => get_the_modified_date("Y-m-d")
|
1089 |
),
|
|
|
|
|
|
|
|
|
|
|
1090 |
array(
|
1091 |
'label' => 'Author Type',
|
1092 |
'id' => 'saswp_photograph_author_type_'.$schema_id,
|
@@ -1180,7 +1214,11 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
1180 |
'type' => 'media',
|
1181 |
'default' => isset($author_details['url']) ? $author_details['url']: ''
|
1182 |
),
|
1183 |
-
|
|
|
|
|
|
|
|
|
1184 |
array(
|
1185 |
'label' => 'ReviewedBy Type',
|
1186 |
'id' => 'saswp_photograph_reviewedby_type_'.$schema_id,
|
@@ -1229,6 +1267,16 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
1229 |
'type' => 'media',
|
1230 |
'default' => isset($sd_data['sd_logo']['url']) ? $sd_data['sd_logo']['url']:''
|
1231 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1232 |
array(
|
1233 |
'label' => 'AlumniOf',
|
1234 |
'id' => 'saswp_photograph_alumniof_'.$schema_id,
|
@@ -1331,6 +1379,11 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
1331 |
'type' => 'text',
|
1332 |
'default' => get_the_modified_date("Y-m-d")
|
1333 |
),
|
|
|
|
|
|
|
|
|
|
|
1334 |
array(
|
1335 |
'label' => 'Author Type',
|
1336 |
'id' => 'saswp_article_author_type_'.$schema_id,
|
@@ -1381,6 +1434,11 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
1381 |
'placeholder' => 'eg: Editor in Chief'
|
1382 |
),
|
1383 |
),
|
|
|
|
|
|
|
|
|
|
|
1384 |
array(
|
1385 |
'label' => 'ReviewedBy Type',
|
1386 |
'id' => 'saswp_article_reviewedby_type_'.$schema_id,
|
@@ -1471,6 +1529,16 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
1471 |
'type' => 'media',
|
1472 |
'default' => isset($sd_data['sd_logo']['url']) ? $sd_data['sd_logo']['url']:''
|
1473 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1474 |
array(
|
1475 |
'label' => 'AlumniOf',
|
1476 |
'id' => 'saswp_article_alumniof_'.$schema_id,
|
@@ -1933,6 +2001,11 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
1933 |
'type' => 'text',
|
1934 |
'default' => get_the_modified_date("Y-m-d")
|
1935 |
),
|
|
|
|
|
|
|
|
|
|
|
1936 |
array(
|
1937 |
'label' => 'Author Type',
|
1938 |
'id' => 'saswp_creativework_author_type_'.$schema_id,
|
@@ -1983,6 +2056,11 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
1983 |
'placeholder' => 'eg: Editor in Chief'
|
1984 |
),
|
1985 |
),
|
|
|
|
|
|
|
|
|
|
|
1986 |
array(
|
1987 |
'label' => 'ReviewedBy Type',
|
1988 |
'id' => 'saswp_creativework_reviewedby_type_'.$schema_id,
|
@@ -2075,6 +2153,16 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
2075 |
'type' => 'media',
|
2076 |
'default' => isset($sd_data['sd_logo']['url']) ? $sd_data['sd_logo']['url']:''
|
2077 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2078 |
array(
|
2079 |
'label' => 'AlumniOf',
|
2080 |
'id' => 'saswp_creativework_alumniof_'.$schema_id,
|
@@ -2588,6 +2676,11 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
2588 |
'type' => 'text',
|
2589 |
'default' => get_the_modified_date("Y-m-d")
|
2590 |
),
|
|
|
|
|
|
|
|
|
|
|
2591 |
array(
|
2592 |
'label' => 'Author Type',
|
2593 |
'id' => 'saswp_tech_article_author_type_'.$schema_id,
|
@@ -2638,6 +2731,11 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
2638 |
'placeholder' => 'eg: Editor in Chief'
|
2639 |
),
|
2640 |
),
|
|
|
|
|
|
|
|
|
|
|
2641 |
array(
|
2642 |
'label' => 'ReviewedBy Type',
|
2643 |
'id' => 'saswp_tech_article_reviewedby_type_'.$schema_id,
|
@@ -2728,6 +2826,16 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
2728 |
'type' => 'media',
|
2729 |
'default' => isset($sd_data['sd_logo']) ? $sd_data['sd_logo']['url']:''
|
2730 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2731 |
array(
|
2732 |
'label' => 'AlumniOf',
|
2733 |
'id' => 'saswp_tech_article_alumniof_'.$schema_id,
|
398 |
'type' => 'text',
|
399 |
'default' => get_the_modified_date("Y-m-d")
|
400 |
),
|
401 |
+
array(
|
402 |
+
'label' => 'Author',
|
403 |
+
'id' => 'saswp_blogposting_author_global_mapping_'.$schema_id,
|
404 |
+
'type' => 'global_mapping'
|
405 |
+
),
|
406 |
array(
|
407 |
'label' => 'Author Type',
|
408 |
'id' => 'saswp_blogposting_author_type_'.$schema_id,
|
453 |
'placeholder' => 'eg: Editor in Chief'
|
454 |
),
|
455 |
),
|
456 |
+
array(
|
457 |
+
'label' => 'ReviewedBy',
|
458 |
+
'id' => 'saswp_blogposting_reviewedby_global_mapping_'.$schema_id,
|
459 |
+
'type' => 'global_mapping'
|
460 |
+
),
|
461 |
array(
|
462 |
'label' => 'ReviewedBy Type',
|
463 |
'id' => 'saswp_blogposting_reviewedby_type_'.$schema_id,
|
551 |
'type' => 'media',
|
552 |
'default' => isset($sd_data['sd_logo']) ? $sd_data['sd_logo']['url'] : ''
|
553 |
),
|
554 |
+
array(
|
555 |
+
'label' => 'About',
|
556 |
+
'id' => 'saswp_blogposting_about_'.$schema_id,
|
557 |
+
'type' => 'textarea',
|
558 |
+
'default' => '',
|
559 |
+
'note' => 'Note: If There are more than one About, Separate About list by comma ( , )',
|
560 |
+
'attributes' => array(
|
561 |
+
'placeholder' => 'eg: Apple is March 21 Announcements'
|
562 |
+
),
|
563 |
+
),
|
564 |
array(
|
565 |
'label' => 'AlumniOf',
|
566 |
'id' => 'saswp_blogposting_alumniof_'.$schema_id,
|
776 |
'type' => 'media',
|
777 |
'default' => isset($author_details['url']) ? $author_details['url']: ''
|
778 |
),
|
779 |
+
array(
|
780 |
+
'label' => 'About',
|
781 |
+
'id' => 'saswp_newsarticle_about_'.$schema_id,
|
782 |
+
'type' => 'textarea',
|
783 |
+
'default' => '',
|
784 |
+
'note' => 'Note: If There are more than one About, Separate About list by comma ( , )',
|
785 |
+
'attributes' => array(
|
786 |
+
'placeholder' => 'eg: Apple is March 21 Announcements'
|
787 |
+
),
|
788 |
+
),
|
789 |
array(
|
790 |
'label' => 'Organization Name',
|
791 |
'id' => 'saswp_newsarticle_organization_name_'.$schema_id,
|
1116 |
'type' => 'text',
|
1117 |
'default' => get_the_modified_date("Y-m-d")
|
1118 |
),
|
1119 |
+
array(
|
1120 |
+
'label' => 'Author',
|
1121 |
+
'id' => 'saswp_photograph_author_global_mapping_'.$schema_id,
|
1122 |
+
'type' => 'global_mapping'
|
1123 |
+
),
|
1124 |
array(
|
1125 |
'label' => 'Author Type',
|
1126 |
'id' => 'saswp_photograph_author_type_'.$schema_id,
|
1214 |
'type' => 'media',
|
1215 |
'default' => isset($author_details['url']) ? $author_details['url']: ''
|
1216 |
),
|
1217 |
+
array(
|
1218 |
+
'label' => 'ReviewedBy',
|
1219 |
+
'id' => 'saswp_photograph_reviewedby_global_mapping_'.$schema_id,
|
1220 |
+
'type' => 'global_mapping'
|
1221 |
+
),
|
1222 |
array(
|
1223 |
'label' => 'ReviewedBy Type',
|
1224 |
'id' => 'saswp_photograph_reviewedby_type_'.$schema_id,
|
1267 |
'type' => 'media',
|
1268 |
'default' => isset($sd_data['sd_logo']['url']) ? $sd_data['sd_logo']['url']:''
|
1269 |
),
|
1270 |
+
array(
|
1271 |
+
'label' => 'About',
|
1272 |
+
'id' => 'saswp_photograph_about_'.$schema_id,
|
1273 |
+
'type' => 'textarea',
|
1274 |
+
'default' => '',
|
1275 |
+
'note' => 'Note: If There are more than one About, Separate About list by comma ( , )',
|
1276 |
+
'attributes' => array(
|
1277 |
+
'placeholder' => 'eg: Apple is March 21 Announcements'
|
1278 |
+
),
|
1279 |
+
),
|
1280 |
array(
|
1281 |
'label' => 'AlumniOf',
|
1282 |
'id' => 'saswp_photograph_alumniof_'.$schema_id,
|
1379 |
'type' => 'text',
|
1380 |
'default' => get_the_modified_date("Y-m-d")
|
1381 |
),
|
1382 |
+
array(
|
1383 |
+
'label' => 'Author',
|
1384 |
+
'id' => 'saswp_article_author_global_mapping_'.$schema_id,
|
1385 |
+
'type' => 'global_mapping'
|
1386 |
+
),
|
1387 |
array(
|
1388 |
'label' => 'Author Type',
|
1389 |
'id' => 'saswp_article_author_type_'.$schema_id,
|
1434 |
'placeholder' => 'eg: Editor in Chief'
|
1435 |
),
|
1436 |
),
|
1437 |
+
array(
|
1438 |
+
'label' => 'ReviewedBy',
|
1439 |
+
'id' => 'saswp_article_reviewedby_global_mapping_'.$schema_id,
|
1440 |
+
'type' => 'global_mapping'
|
1441 |
+
),
|
1442 |
array(
|
1443 |
'label' => 'ReviewedBy Type',
|
1444 |
'id' => 'saswp_article_reviewedby_type_'.$schema_id,
|
1529 |
'type' => 'media',
|
1530 |
'default' => isset($sd_data['sd_logo']['url']) ? $sd_data['sd_logo']['url']:''
|
1531 |
),
|
1532 |
+
array(
|
1533 |
+
'label' => 'About',
|
1534 |
+
'id' => 'saswp_article_about_'.$schema_id,
|
1535 |
+
'type' => 'textarea',
|
1536 |
+
'default' => '',
|
1537 |
+
'note' => 'Note: If There are more than one About, Separate About list by comma ( , )',
|
1538 |
+
'attributes' => array(
|
1539 |
+
'placeholder' => 'eg: Apple is March 21 Announcements'
|
1540 |
+
),
|
1541 |
+
),
|
1542 |
array(
|
1543 |
'label' => 'AlumniOf',
|
1544 |
'id' => 'saswp_article_alumniof_'.$schema_id,
|
2001 |
'type' => 'text',
|
2002 |
'default' => get_the_modified_date("Y-m-d")
|
2003 |
),
|
2004 |
+
array(
|
2005 |
+
'label' => 'Author',
|
2006 |
+
'id' => 'saswp_creativework_author_global_mapping_'.$schema_id,
|
2007 |
+
'type' => 'global_mapping'
|
2008 |
+
),
|
2009 |
array(
|
2010 |
'label' => 'Author Type',
|
2011 |
'id' => 'saswp_creativework_author_type_'.$schema_id,
|
2056 |
'placeholder' => 'eg: Editor in Chief'
|
2057 |
),
|
2058 |
),
|
2059 |
+
array(
|
2060 |
+
'label' => 'ReviewedBy',
|
2061 |
+
'id' => 'saswp_creativework_reviewedby_global_mapping_'.$schema_id,
|
2062 |
+
'type' => 'global_mapping'
|
2063 |
+
),
|
2064 |
array(
|
2065 |
'label' => 'ReviewedBy Type',
|
2066 |
'id' => 'saswp_creativework_reviewedby_type_'.$schema_id,
|
2153 |
'type' => 'media',
|
2154 |
'default' => isset($sd_data['sd_logo']['url']) ? $sd_data['sd_logo']['url']:''
|
2155 |
),
|
2156 |
+
array(
|
2157 |
+
'label' => 'About',
|
2158 |
+
'id' => 'saswp_creativework_about_'.$schema_id,
|
2159 |
+
'type' => 'textarea',
|
2160 |
+
'default' => '',
|
2161 |
+
'note' => 'Note: If There are more than one About, Separate About list by comma ( , )',
|
2162 |
+
'attributes' => array(
|
2163 |
+
'placeholder' => 'eg: Apple is March 21 Announcements'
|
2164 |
+
),
|
2165 |
+
),
|
2166 |
array(
|
2167 |
'label' => 'AlumniOf',
|
2168 |
'id' => 'saswp_creativework_alumniof_'.$schema_id,
|
2676 |
'type' => 'text',
|
2677 |
'default' => get_the_modified_date("Y-m-d")
|
2678 |
),
|
2679 |
+
array(
|
2680 |
+
'label' => 'Author',
|
2681 |
+
'id' => 'saswp_tech_article_author_global_mapping_'.$schema_id,
|
2682 |
+
'type' => 'global_mapping'
|
2683 |
+
),
|
2684 |
array(
|
2685 |
'label' => 'Author Type',
|
2686 |
'id' => 'saswp_tech_article_author_type_'.$schema_id,
|
2731 |
'placeholder' => 'eg: Editor in Chief'
|
2732 |
),
|
2733 |
),
|
2734 |
+
array(
|
2735 |
+
'label' => 'ReviewedBy',
|
2736 |
+
'id' => 'saswp_tech_article_reviewedby_global_mapping_'.$schema_id,
|
2737 |
+
'type' => 'global_mapping'
|
2738 |
+
),
|
2739 |
array(
|
2740 |
'label' => 'ReviewedBy Type',
|
2741 |
'id' => 'saswp_tech_article_reviewedby_type_'.$schema_id,
|
2826 |
'type' => 'media',
|
2827 |
'default' => isset($sd_data['sd_logo']) ? $sd_data['sd_logo']['url']:''
|
2828 |
),
|
2829 |
+
array(
|
2830 |
+
'label' => 'About',
|
2831 |
+
'id' => 'saswp_tech_article_about_'.$schema_id,
|
2832 |
+
'type' => 'textarea',
|
2833 |
+
'default' => '',
|
2834 |
+
'note' => 'Note: If There are more than one About, Separate About list by comma ( , )',
|
2835 |
+
'attributes' => array(
|
2836 |
+
'placeholder' => 'eg: Apple is March 21 Announcements'
|
2837 |
+
),
|
2838 |
+
),
|
2839 |
array(
|
2840 |
'label' => 'AlumniOf',
|
2841 |
'id' => 'saswp_tech_article_alumniof_'.$schema_id,
|
modules/reviews/reviews_collection.php
CHANGED
@@ -409,11 +409,15 @@ class SASWP_Reviews_Collection {
|
|
409 |
$date_format = $collection_data['saswp_collection_date_format'][0];
|
410 |
}
|
411 |
if(isset($collection_data['saswp_collection_hide_col_r_img'][0])){
|
412 |
-
$saswp_collection_hide_col_rew_img
|
|
|
|
|
413 |
}
|
414 |
if(isset($collection_data['saswp_collection_gallery_img_hide'][0])){
|
415 |
$saswp_collection_gallery_img_hide = $collection_data['saswp_collection_gallery_img_hide'][0];
|
416 |
-
}
|
|
|
|
|
417 |
|
418 |
if(isset($collection_data['saswp_collection_cols'][0])){
|
419 |
|
409 |
$date_format = $collection_data['saswp_collection_date_format'][0];
|
410 |
}
|
411 |
if(isset($collection_data['saswp_collection_hide_col_r_img'][0])){
|
412 |
+
$saswp_collection_hide_col_rew_img = $collection_data['saswp_collection_hide_col_r_img'][0];
|
413 |
+
}else{
|
414 |
+
$saswp_collection_hide_col_rew_img = "";
|
415 |
}
|
416 |
if(isset($collection_data['saswp_collection_gallery_img_hide'][0])){
|
417 |
$saswp_collection_gallery_img_hide = $collection_data['saswp_collection_gallery_img_hide'][0];
|
418 |
+
}else{
|
419 |
+
$saswp_collection_gallery_img_hide = "";
|
420 |
+
}
|
421 |
|
422 |
if(isset($collection_data['saswp_collection_cols'][0])){
|
423 |
|
modules/reviews/reviews_service.php
CHANGED
@@ -145,16 +145,21 @@ class saswp_reviews_service {
|
|
145 |
|
146 |
$term = get_term_by( 'slug','self', 'platform' );
|
147 |
|
148 |
-
if($rv_image){
|
149 |
|
150 |
$image_details = saswp_get_attachment_details($rv_image);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
|
152 |
-
|
153 |
-
|
154 |
-
'height' => $image_details[0][1],
|
155 |
-
'thumbnail' => $rv_image,
|
156 |
-
);
|
157 |
-
|
158 |
}
|
159 |
|
160 |
$review_meta = array(
|
@@ -259,6 +264,8 @@ class saswp_reviews_service {
|
|
259 |
}
|
260 |
if(!empty($sd_data['saswp_date_format']) && $sd_data['saswp_date_format'] == 'default'){
|
261 |
$days_ago_format = date('d-m-Y',strtotime($review['saswp_review_date']));
|
|
|
|
|
262 |
}
|
263 |
|
264 |
$review_rating = $review['saswp_review_rating'];
|
@@ -987,7 +994,7 @@ class saswp_reviews_service {
|
|
987 |
|
988 |
}
|
989 |
|
990 |
-
if($pagination_wpr && $pagination){
|
991 |
|
992 |
if($break == 1){
|
993 |
$html .= '<li data-id="'.esc_attr($break).'">';
|
@@ -1069,7 +1076,7 @@ class saswp_reviews_service {
|
|
1069 |
|
1070 |
}
|
1071 |
|
1072 |
-
if(($page_count > 0 && $pagination ) && $pagination_wpr){
|
1073 |
|
1074 |
$html .= '<div class="saswp-grid-pagination saswp-grid-wpr">';
|
1075 |
$html .= '<a data-id="1" class="saswp-grid-page saswp-pagination-first-last" href="#">«</a>';
|
145 |
|
146 |
$term = get_term_by( 'slug','self', 'platform' );
|
147 |
|
148 |
+
if(!empty($rv_image)){
|
149 |
|
150 |
$image_details = saswp_get_attachment_details($rv_image);
|
151 |
+
if(!empty($image_details)){
|
152 |
+
$media_detail = array(
|
153 |
+
'width' => $image_details[0][0],
|
154 |
+
'height' => $image_details[0][1],
|
155 |
+
'thumbnail' => $rv_image,
|
156 |
+
);
|
157 |
+
}else{
|
158 |
+
$media_detail = "";
|
159 |
+
}
|
160 |
|
161 |
+
}else{
|
162 |
+
$rv_image = "";
|
|
|
|
|
|
|
|
|
163 |
}
|
164 |
|
165 |
$review_meta = array(
|
264 |
}
|
265 |
if(!empty($sd_data['saswp_date_format']) && $sd_data['saswp_date_format'] == 'default'){
|
266 |
$days_ago_format = date('d-m-Y',strtotime($review['saswp_review_date']));
|
267 |
+
}else{
|
268 |
+
$days_ago_format = "";
|
269 |
}
|
270 |
|
271 |
$review_rating = $review['saswp_review_rating'];
|
994 |
|
995 |
}
|
996 |
|
997 |
+
if(!empty($pagination_wpr) && !empty($pagination)){
|
998 |
|
999 |
if($break == 1){
|
1000 |
$html .= '<li data-id="'.esc_attr($break).'">';
|
1076 |
|
1077 |
}
|
1078 |
|
1079 |
+
if(($page_count > 0 && $pagination ) && !empty($pagination_wpr)){
|
1080 |
|
1081 |
$html .= '<div class="saswp-grid-pagination saswp-grid-wpr">';
|
1082 |
$html .= '<a data-id="1" class="saswp-grid-page saswp-pagination-first-last" href="#">«</a>';
|
output/function.php
CHANGED
@@ -3411,11 +3411,13 @@ function saswp_default_video_object_scjhema(){
|
|
3411 |
if(count($video_links) > 1){
|
3412 |
if(isset($v_val['video_url']) && !empty($v_val['video_url'])){
|
3413 |
|
3414 |
-
$input1['@type'] = "ItemList";
|
|
|
3415 |
foreach($video_links as $vkey => $v_val){
|
3416 |
$vnewarr = array(
|
3417 |
'@type' => 'VideoObject',
|
3418 |
"position" => $vkey+1,
|
|
|
3419 |
'name' => isset($v_val['title'])? $v_val['title'] : saswp_get_the_title(),
|
3420 |
'datePublished' => esc_html($date),
|
3421 |
'dateModified' => esc_html($modified_date),
|
3411 |
if(count($video_links) > 1){
|
3412 |
if(isset($v_val['video_url']) && !empty($v_val['video_url'])){
|
3413 |
|
3414 |
+
$input1['@type'] = "ItemList";
|
3415 |
+
$i = 1;
|
3416 |
foreach($video_links as $vkey => $v_val){
|
3417 |
$vnewarr = array(
|
3418 |
'@type' => 'VideoObject',
|
3419 |
"position" => $vkey+1,
|
3420 |
+
"@id" => trailingslashit(saswp_get_permalink()).'#'.$i++,
|
3421 |
'name' => isset($v_val['title'])? $v_val['title'] : saswp_get_the_title(),
|
3422 |
'datePublished' => esc_html($date),
|
3423 |
'dateModified' => esc_html($modified_date),
|
output/markup.php
CHANGED
@@ -3530,7 +3530,10 @@ function saswp_blogposting_schema_markup($schema_id, $schema_post_id, $all_post_
|
|
3530 |
$input1['alumniOf'][] = $vnewarr;
|
3531 |
}
|
3532 |
}
|
3533 |
-
|
|
|
|
|
|
|
3534 |
if( !empty($all_post_meta['saswp_blogposting_knowsabout_'.$schema_id][0]) && isset( $all_post_meta['saswp_blogposting_knowsabout_'.$schema_id][0] )){
|
3535 |
$input1['knowsAbout'] = explode(',', $all_post_meta['saswp_blogposting_knowsabout_'.$schema_id][0]);
|
3536 |
}
|
@@ -4369,7 +4372,10 @@ function saswp_photograph_schema_markup($schema_id, $schema_post_id, $all_post_m
|
|
4369 |
if( !empty($all_post_meta['saswp_photograph_knowsabout_'.$schema_id][0]) && isset( $all_post_meta['saswp_photograph_knowsabout_'.$schema_id][0] )){
|
4370 |
$input1['knowsAbout'] = explode(',', $all_post_meta['saswp_photograph_knowsabout_'.$schema_id][0]);
|
4371 |
}
|
4372 |
-
|
|
|
|
|
|
|
4373 |
if( !empty($all_post_meta['saswp_photograph_alumniof_'.$schema_id][0]) && isset( $all_post_meta['saswp_photograph_alumniof_'.$schema_id][0] )){
|
4374 |
$itemlist = explode(',', $all_post_meta['saswp_photograph_alumniof_'.$schema_id][0]);
|
4375 |
foreach ($itemlist as $key => $list){
|
@@ -4481,10 +4487,23 @@ function saswp_article_schema_markup($schema_id, $schema_post_id, $all_post_meta
|
|
4481 |
$input1['reviewedBy']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_article_reviewedby_url_'.$schema_id, 'saswp_array');
|
4482 |
}
|
4483 |
}
|
|
|
4484 |
|
4485 |
-
|
4486 |
-
|
4487 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4488 |
|
4489 |
if(!empty($all_post_meta['saswp_article_alumniof_'.$schema_id][0]) && isset( $all_post_meta['saswp_article_alumniof_'.$schema_id][0] )){
|
4490 |
$itemlist = explode(',', $all_post_meta['saswp_article_alumniof_'.$schema_id][0]);
|
@@ -4627,7 +4646,10 @@ function saswp_creativework_schema_markup($schema_id, $schema_post_id, $all_post
|
|
4627 |
if( !empty($all_post_meta['saswp_creativework_knowsabout_'.$schema_id][0]) && isset( $all_post_meta['saswp_creativework_knowsabout_'.$schema_id][0] )){
|
4628 |
$input1['knowsAbout'] = explode(',', $all_post_meta['saswp_creativework_knowsabout_'.$schema_id][0]);
|
4629 |
}
|
4630 |
-
|
|
|
|
|
|
|
4631 |
if(!empty($all_post_meta['saswp_creativework_alumniof_'.$schema_id][0]) && isset( $all_post_meta['saswp_creativework_alumniof_'.$schema_id][0] )){
|
4632 |
$itemlist = explode(',', $all_post_meta['saswp_creativework_alumniof_'.$schema_id][0]);
|
4633 |
foreach ($itemlist as $key => $list){
|
@@ -4760,7 +4782,10 @@ function saswp_tech_article_schema_markup($schema_id, $schema_post_id, $all_post
|
|
4760 |
$input1['reviewedBy']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_tech_article_reviewedby_url_'.$schema_id, 'saswp_array');
|
4761 |
}
|
4762 |
}
|
4763 |
-
|
|
|
|
|
|
|
4764 |
if( !empty($all_post_meta['saswp_tech_article_knowsabout_'.$schema_id][0]) && isset( $all_post_meta['saswp_tech_article_knowsabout_'.$schema_id][0] )){
|
4765 |
$input1['knowsAbout'] = explode(',', $all_post_meta['saswp_tech_article_knowsabout_'.$schema_id][0]);
|
4766 |
}
|
@@ -4861,21 +4886,35 @@ function saswp_news_article_schema_markup($schema_id, $schema_post_id, $all_post
|
|
4861 |
$input1['author']['image']['height'] = isset($author_image['height']) ? $author_image['height'] : '';
|
4862 |
$input1['author']['image']['width'] = isset($author_image['width']) ? $author_image['width'] : '';
|
4863 |
|
4864 |
-
|
4865 |
-
|
4866 |
-
|
4867 |
-
|
4868 |
-
|
4869 |
-
|
4870 |
-
|
4871 |
-
|
4872 |
-
|
4873 |
-
|
4874 |
-
|
4875 |
-
|
4876 |
-
|
4877 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4878 |
|
|
|
|
|
|
|
|
|
4879 |
$itemlist = get_post_meta($schema_post_id, 'newsarticle_items_'.$schema_id, true);
|
4880 |
|
4881 |
if($itemlist){
|
3530 |
$input1['alumniOf'][] = $vnewarr;
|
3531 |
}
|
3532 |
}
|
3533 |
+
if( !empty($all_post_meta['saswp_blogposting_about_'.$schema_id][0]) && isset( $all_post_meta['saswp_blogposting_about_'.$schema_id][0] )){
|
3534 |
+
$input1['about']['@type'] = 'Event';
|
3535 |
+
$input1['about']['name'] = explode(',', $all_post_meta['saswp_blogposting_about_'.$schema_id][0]);
|
3536 |
+
}
|
3537 |
if( !empty($all_post_meta['saswp_blogposting_knowsabout_'.$schema_id][0]) && isset( $all_post_meta['saswp_blogposting_knowsabout_'.$schema_id][0] )){
|
3538 |
$input1['knowsAbout'] = explode(',', $all_post_meta['saswp_blogposting_knowsabout_'.$schema_id][0]);
|
3539 |
}
|
4372 |
if( !empty($all_post_meta['saswp_photograph_knowsabout_'.$schema_id][0]) && isset( $all_post_meta['saswp_photograph_knowsabout_'.$schema_id][0] )){
|
4373 |
$input1['knowsAbout'] = explode(',', $all_post_meta['saswp_photograph_knowsabout_'.$schema_id][0]);
|
4374 |
}
|
4375 |
+
if( !empty($all_post_meta['saswp_photograph_about_'.$schema_id][0]) && isset( $all_post_meta['saswp_photograph_about_'.$schema_id][0] )){
|
4376 |
+
$input1['about']['@type'] = 'Event';
|
4377 |
+
$input1['about']['name'] = explode(',', $all_post_meta['saswp_photograph_about_'.$schema_id][0]);
|
4378 |
+
}
|
4379 |
if( !empty($all_post_meta['saswp_photograph_alumniof_'.$schema_id][0]) && isset( $all_post_meta['saswp_photograph_alumniof_'.$schema_id][0] )){
|
4380 |
$itemlist = explode(',', $all_post_meta['saswp_photograph_alumniof_'.$schema_id][0]);
|
4381 |
foreach ($itemlist as $key => $list){
|
4487 |
$input1['reviewedBy']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_article_reviewedby_url_'.$schema_id, 'saswp_array');
|
4488 |
}
|
4489 |
}
|
4490 |
+
if( !empty($all_post_meta['saswp_article_about_'.$schema_id][0]) && isset( $all_post_meta['saswp_article_about_'.$schema_id][0] )){
|
4491 |
|
4492 |
+
$explode_about = explode(',', $all_post_meta['saswp_article_about_'.$schema_id][0]);
|
4493 |
+
if(!empty($explode_about)){
|
4494 |
+
$about_arr = array();
|
4495 |
+
foreach($explode_about as $val){
|
4496 |
+
$about_arr[] = array(
|
4497 |
+
'@type' => 'Thing',
|
4498 |
+
'name' => $val
|
4499 |
+
);
|
4500 |
+
}
|
4501 |
+
$input1['about'] = $about_arr;
|
4502 |
+
}
|
4503 |
+
}
|
4504 |
+
if( !empty($all_post_meta['saswp_article_knowsabout_'.$schema_id][0]) && isset( $all_post_meta['saswp_article_knowsabout_'.$schema_id][0] )){
|
4505 |
+
$input1['knowsAbout'] = explode(',', $all_post_meta['saswp_article_knowsabout_'.$schema_id][0]);
|
4506 |
+
}
|
4507 |
|
4508 |
if(!empty($all_post_meta['saswp_article_alumniof_'.$schema_id][0]) && isset( $all_post_meta['saswp_article_alumniof_'.$schema_id][0] )){
|
4509 |
$itemlist = explode(',', $all_post_meta['saswp_article_alumniof_'.$schema_id][0]);
|
4646 |
if( !empty($all_post_meta['saswp_creativework_knowsabout_'.$schema_id][0]) && isset( $all_post_meta['saswp_creativework_knowsabout_'.$schema_id][0] )){
|
4647 |
$input1['knowsAbout'] = explode(',', $all_post_meta['saswp_creativework_knowsabout_'.$schema_id][0]);
|
4648 |
}
|
4649 |
+
if( !empty($all_post_meta['saswp_creativework_about_'.$schema_id][0]) && isset( $all_post_meta['saswp_creativework_about_'.$schema_id][0] )){
|
4650 |
+
$input1['about']['@type'] = 'Event';
|
4651 |
+
$input1['about']['name'] = explode(',', $all_post_meta['saswp_creativework_about_'.$schema_id][0]);
|
4652 |
+
}
|
4653 |
if(!empty($all_post_meta['saswp_creativework_alumniof_'.$schema_id][0]) && isset( $all_post_meta['saswp_creativework_alumniof_'.$schema_id][0] )){
|
4654 |
$itemlist = explode(',', $all_post_meta['saswp_creativework_alumniof_'.$schema_id][0]);
|
4655 |
foreach ($itemlist as $key => $list){
|
4782 |
$input1['reviewedBy']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_tech_article_reviewedby_url_'.$schema_id, 'saswp_array');
|
4783 |
}
|
4784 |
}
|
4785 |
+
if( !empty($all_post_meta['saswp_tech_article_about_'.$schema_id][0]) && isset( $all_post_meta['saswp_tech_article_about_'.$schema_id][0] )){
|
4786 |
+
$input1['about']['@type'] = 'Event';
|
4787 |
+
$input1['about']['name'] = explode(',', $all_post_meta['saswp_tech_article_about_'.$schema_id][0]);
|
4788 |
+
}
|
4789 |
if( !empty($all_post_meta['saswp_tech_article_knowsabout_'.$schema_id][0]) && isset( $all_post_meta['saswp_tech_article_knowsabout_'.$schema_id][0] )){
|
4790 |
$input1['knowsAbout'] = explode(',', $all_post_meta['saswp_tech_article_knowsabout_'.$schema_id][0]);
|
4791 |
}
|
4886 |
$input1['author']['image']['height'] = isset($author_image['height']) ? $author_image['height'] : '';
|
4887 |
$input1['author']['image']['width'] = isset($author_image['width']) ? $author_image['width'] : '';
|
4888 |
|
4889 |
+
if( !empty($all_post_meta['saswp_newsarticle_editor_type_'.$schema_id][0]) && isset( $all_post_meta['saswp_newsarticle_editor_type_'.$schema_id][0] )){
|
4890 |
+
$input1['editor']['@type'] = 'Person';
|
4891 |
+
if(!empty( $all_post_meta['saswp_newsarticle_editor_type_'.$schema_id][0] )){
|
4892 |
+
$input1['editor']['@type'] = $all_post_meta['saswp_newsarticle_editor_type_'.$schema_id][0];
|
4893 |
+
}
|
4894 |
+
if(!empty( $all_post_meta['saswp_newsarticle_editor_name_'.$schema_id][0] )){
|
4895 |
+
$input1['editor']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_editor_name_'.$schema_id, 'saswp_array');
|
4896 |
+
}
|
4897 |
+
if(!empty( $all_post_meta['saswp_newsarticle_editor_honorific_suffix_'.$schema_id][0] )){
|
4898 |
+
$input1['editor']['honorificSuffix'] = saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_editor_honorific_suffix_'.$schema_id, 'saswp_array');
|
4899 |
+
}
|
4900 |
+
if(!empty( $all_post_meta['saswp_newsarticle_editor_description_'.$schema_id][0] )){
|
4901 |
+
$input1['editor']['description'] = saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_editor_description_'.$schema_id, 'saswp_array');
|
4902 |
+
}
|
4903 |
+
if(!empty( $all_post_meta['saswp_newsarticle_editor_url_'.$schema_id][0] )){
|
4904 |
+
$input1['editor']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_editor_url_'.$schema_id, 'saswp_array');
|
4905 |
+
}
|
4906 |
+
if(!empty( $all_post_meta['saswp_newsarticle_editor_image_'.$schema_id][0] )){
|
4907 |
+
$input1['editor']['image']['@type'] = 'ImageObject';
|
4908 |
+
$input1['editor']['image']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_editor_image_'.$schema_id, 'saswp_array');
|
4909 |
+
$input1['editor']['image']['height'] = isset($author_image['height']) ? $author_image['height'] : '';
|
4910 |
+
$input1['editor']['image']['width'] = isset($author_image['width']) ? $author_image['width'] : '';
|
4911 |
+
}
|
4912 |
+
}
|
4913 |
|
4914 |
+
if( !empty($all_post_meta['saswp_newsarticle_about_'.$schema_id][0]) && isset( $all_post_meta['saswp_newsarticle_about_'.$schema_id][0] )){
|
4915 |
+
$input1['about']['@type'] = 'Event';
|
4916 |
+
$input1['about']['name'] = explode(',', $all_post_meta['saswp_newsarticle_about_'.$schema_id][0]);
|
4917 |
+
}
|
4918 |
$itemlist = get_post_meta($schema_post_id, 'newsarticle_items_'.$schema_id, true);
|
4919 |
|
4920 |
if($itemlist){
|
output/output.php
CHANGED
@@ -1788,15 +1788,14 @@ function saswp_schema_output() {
|
|
1788 |
$input1['@context'] = saswp_context_url();
|
1789 |
|
1790 |
if(!empty($video_links) && count($video_links) > 1){
|
1791 |
-
|
1792 |
|
1793 |
$input1['@type'] = "ItemList";
|
1794 |
-
|
1795 |
foreach($video_links as $vkey => $v_val){
|
1796 |
-
|
1797 |
$vnewarr = array(
|
1798 |
'@type' => 'VideoObject',
|
1799 |
"position" => $vkey+1,
|
|
|
1800 |
'name' => isset($v_val['title'])? $v_val['title'] : saswp_get_the_title(),
|
1801 |
'datePublished' => esc_html($date),
|
1802 |
'dateModified' => esc_html($modified_date),
|
1788 |
$input1['@context'] = saswp_context_url();
|
1789 |
|
1790 |
if(!empty($video_links) && count($video_links) > 1){
|
|
|
1791 |
|
1792 |
$input1['@type'] = "ItemList";
|
1793 |
+
$i = 1;
|
1794 |
foreach($video_links as $vkey => $v_val){
|
|
|
1795 |
$vnewarr = array(
|
1796 |
'@type' => 'VideoObject',
|
1797 |
"position" => $vkey+1,
|
1798 |
+
"@id" => trailingslashit(saswp_get_permalink()).'#'.$i++,
|
1799 |
'name' => isset($v_val['title'])? $v_val['title'] : saswp_get_the_title(),
|
1800 |
'datePublished' => esc_html($date),
|
1801 |
'dateModified' => esc_html($modified_date),
|
output/service.php
CHANGED
@@ -1437,9 +1437,7 @@ Class saswp_output_service{
|
|
1437 |
$input1['editor']['@type'] = 'Person';
|
1438 |
$input1['editor']['name'] = $custom_fields['saswp_article_editor_name'];
|
1439 |
}
|
1440 |
-
|
1441 |
-
$input1['author']['@type'] = $custom_fields['saswp_article_author_type'];
|
1442 |
-
}
|
1443 |
if(isset($custom_fields['saswp_article_editor_honorific_suffix']) && $custom_fields['saswp_article_editor_honorific_suffix'] != '') {
|
1444 |
$input1['editor']['honorificSuffix'] = $custom_fields['saswp_article_editor_honorific_suffix'];
|
1445 |
}
|
@@ -1453,58 +1451,257 @@ Class saswp_output_service{
|
|
1453 |
$input1['editor']['Image']['url'] = $custom_fields['saswp_article_editor_image'];
|
1454 |
}
|
1455 |
|
1456 |
-
if(
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1476 |
}
|
|
|
1477 |
if(isset($custom_fields['saswp_article_organization_logo']) && isset($custom_fields['saswp_article_organization_name'])){
|
1478 |
$input1['publisher']['@type'] = 'Organization';
|
1479 |
$input1['publisher']['name'] = $custom_fields['saswp_article_organization_name'];
|
1480 |
$input1['publisher']['logo'] = $custom_fields['saswp_article_organization_logo'];
|
1481 |
}
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
}
|
1488 |
-
if(isset($custom_fields['saswp_article_reviewedby_honorific_suffix'])){
|
1489 |
-
$input1['reviewedBy']['honorificSuffix'] = $custom_fields['saswp_article_reviewedby_honorific_suffix'];
|
1490 |
-
}
|
1491 |
-
if(isset($custom_fields['saswp_article_reviewedby_description'])){
|
1492 |
-
$input1['reviewedBy']['description'] = $custom_fields['saswp_article_reviewedby_description'];
|
1493 |
-
}
|
1494 |
-
if(isset($custom_fields['saswp_article_reviewedby_url'])){
|
1495 |
-
$input1['reviewedBy']['url'] = $custom_fields['saswp_article_reviewedby_url'];
|
1496 |
-
}
|
1497 |
-
if(isset($custom_fields['saswp_article_alumniof'])){
|
1498 |
-
$str = $custom_fields['saswp_article_alumniof'];
|
1499 |
-
$itemlist = explode(",", $str);
|
1500 |
-
foreach ($itemlist as $key => $list){
|
1501 |
-
$vnewarr['@type'] = 'Organization';
|
1502 |
-
$vnewarr['Name'] = $list;
|
1503 |
-
$input1['alumniOf'][] = $vnewarr;
|
1504 |
}
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1508 |
}
|
1509 |
|
1510 |
break;
|
@@ -1567,56 +1764,245 @@ Class saswp_output_service{
|
|
1567 |
if(isset($custom_fields['saswp_creativework_editor_image'])){
|
1568 |
$input1['editor']['Image']['url'] = $custom_fields['saswp_creativework_editor_image'];
|
1569 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1570 |
|
1571 |
-
|
1572 |
-
|
1573 |
-
$
|
1574 |
-
|
1575 |
-
|
1576 |
-
$
|
1577 |
-
|
1578 |
-
|
1579 |
-
$
|
1580 |
-
|
1581 |
-
|
1582 |
-
$
|
1583 |
-
|
1584 |
-
|
1585 |
-
$
|
1586 |
-
|
1587 |
-
|
1588 |
-
$
|
1589 |
-
|
1590 |
-
|
1591 |
-
$
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
|
1596 |
-
if(isset($custom_fields['saswp_creativework_alumniof'])){
|
1597 |
-
$str = $custom_fields['saswp_creativework_alumniof'];
|
1598 |
-
$itemlist = explode(",", $str);
|
1599 |
-
foreach ($itemlist as $key => $list){
|
1600 |
-
$vnewarr['@type'] = 'Organization';
|
1601 |
-
$vnewarr['Name'] = $list;
|
1602 |
-
$input1['alumniOf'][] = $vnewarr;
|
1603 |
}
|
1604 |
}
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
$input1['reviewedBy']['name'] = $custom_fields['saswp_creativework_reviewedby_name'];
|
1610 |
-
}
|
1611 |
-
if(isset($custom_fields['saswp_creativework_reviewedby_honorific_suffix'])){
|
1612 |
-
$input1['reviewedBy']['honorificSuffix'] = $custom_fields['saswp_creativework_reviewedby_honorific_suffix'];
|
1613 |
-
}
|
1614 |
-
if(isset($custom_fields['saswp_creativework_reviewedby_description'])){
|
1615 |
-
$input1['reviewedBy']['description'] = $custom_fields['saswp_creativework_reviewedby_description'];
|
1616 |
}
|
1617 |
-
|
1618 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1619 |
}
|
|
|
1620 |
if(isset($custom_fields['saswp_creativework_organization_logo']) && isset($custom_fields['saswp_creativework_organization_name'])){
|
1621 |
$input1['publisher']['@type'] = 'Organization';
|
1622 |
$input1['publisher']['name'] = $custom_fields['saswp_creativework_organization_name'];
|
@@ -1706,31 +2092,124 @@ Class saswp_output_service{
|
|
1706 |
}
|
1707 |
if(isset($custom_fields['saswp_photograph_date_modified'])){
|
1708 |
$input1['dateModified'] = $custom_fields['saswp_photograph_date_modified'];
|
1709 |
-
}
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
|
1717 |
-
$
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
|
1723 |
-
|
1724 |
-
|
1725 |
-
|
1726 |
-
|
1727 |
-
|
1728 |
-
|
1729 |
-
$
|
1730 |
-
|
1731 |
-
|
1732 |
-
|
1733 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1734 |
|
1735 |
if(isset($custom_fields['saswp_photograph_editor_type'])){
|
1736 |
$input1['editor']['@type'] = $custom_fields['saswp_photograph_editor_type'];
|
@@ -1756,15 +2235,106 @@ Class saswp_output_service{
|
|
1756 |
$input1['publisher']['@type'] = 'Organization';
|
1757 |
$input1['publisher']['name'] = $custom_fields['saswp_photograph_organization_name'];
|
1758 |
$input1['publisher']['logo'] = $custom_fields['saswp_photograph_organization_logo'];
|
1759 |
-
}
|
1760 |
-
|
1761 |
-
|
1762 |
-
|
1763 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1764 |
$input1['reviewedBy']['name'] = $custom_fields['saswp_photograph_reviewedby_name'];
|
1765 |
}
|
1766 |
if(isset($custom_fields['saswp_photograph_reviewedby_honorific_suffix'])){
|
1767 |
-
|
1768 |
}
|
1769 |
if(isset($custom_fields['saswp_photograph_reviewedby_description'])){
|
1770 |
$input1['reviewedBy']['description'] = $custom_fields['saswp_photograph_reviewedby_description'];
|
@@ -1775,6 +2345,10 @@ Class saswp_output_service{
|
|
1775 |
if(isset($custom_fields['saswp_photograph_knowsabout'])){
|
1776 |
$input1['knowsAbout'] = explode(',', $custom_fields['saswp_photograph_knowsabout']);
|
1777 |
}
|
|
|
|
|
|
|
|
|
1778 |
if(isset($custom_fields['saswp_photograph_alumniof'])){
|
1779 |
$str = $custom_fields['saswp_photograph_alumniof'];
|
1780 |
$itemlist = explode(",", $str);
|
@@ -1784,6 +2358,7 @@ Class saswp_output_service{
|
|
1784 |
$input1['alumniOf'][] = $vnewarr;
|
1785 |
}
|
1786 |
}
|
|
|
1787 |
|
1788 |
break;
|
1789 |
|
@@ -2066,58 +2641,245 @@ Class saswp_output_service{
|
|
2066 |
$input1['editor']['Image']['url'] = $custom_fields['saswp_blogposting_editor_image'];
|
2067 |
}
|
2068 |
|
2069 |
-
if(
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
-
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
2077 |
-
|
2078 |
-
|
2079 |
-
|
2080 |
-
|
2081 |
-
|
2082 |
-
|
2083 |
-
|
2084 |
-
|
2085 |
-
|
2086 |
-
|
2087 |
-
|
2088 |
-
|
2089 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2090 |
|
2091 |
-
|
2092 |
-
|
2093 |
-
|
2094 |
-
|
2095 |
-
|
2096 |
-
|
2097 |
-
|
2098 |
-
|
2099 |
-
|
2100 |
-
|
2101 |
-
|
2102 |
-
|
2103 |
-
|
2104 |
-
if(isset($custom_fields['saswp_blogposting_reviewedby_description'])){
|
2105 |
-
$input1['reviewedBy']['description'] = $custom_fields['saswp_blogposting_reviewedby_description'];
|
2106 |
-
}
|
2107 |
|
|
|
2108 |
|
2109 |
-
|
2110 |
-
$input1['
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2111 |
}
|
2112 |
-
|
2113 |
-
|
2114 |
-
|
2115 |
-
|
2116 |
-
$
|
2117 |
-
$vnewarr['Name'] = $list;
|
2118 |
-
$input1['alumniOf'][] = $vnewarr;
|
2119 |
}
|
2120 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2121 |
if(isset($custom_fields['saswp_blogposting_organization_logo']) && isset($custom_fields['saswp_blogposting_organization_name'])){
|
2122 |
$input1['publisher']['@type'] = 'Organization';
|
2123 |
$input1['publisher']['name'] = $custom_fields['saswp_blogposting_organization_name'];
|
@@ -2296,26 +3058,27 @@ Class saswp_output_service{
|
|
2296 |
$input1['mainEntity']['@id'] = $custom_fields['saswp_newsarticle_main_entity_id'];
|
2297 |
}
|
2298 |
|
2299 |
-
|
2300 |
-
|
2301 |
-
|
2302 |
-
|
2303 |
-
|
2304 |
-
|
2305 |
-
|
2306 |
-
|
2307 |
-
|
2308 |
-
|
2309 |
-
|
2310 |
-
|
2311 |
-
|
2312 |
-
|
2313 |
-
|
2314 |
-
|
2315 |
-
|
2316 |
-
|
2317 |
-
|
2318 |
-
|
|
|
2319 |
}
|
2320 |
|
2321 |
if(isset($custom_fields['saswp_newsarticle_author_type'])){
|
@@ -2336,7 +3099,10 @@ Class saswp_output_service{
|
|
2336 |
if(isset($custom_fields['saswp_newsarticle_author_image'])){
|
2337 |
$input1['author']['Image']['url'] = $custom_fields['saswp_newsarticle_author_image'];
|
2338 |
}
|
2339 |
-
|
|
|
|
|
|
|
2340 |
if(isset($custom_fields['saswp_newsarticle_organization_logo']) && isset($custom_fields['saswp_newsarticle_organization_name'])){
|
2341 |
$input1['publisher']['@type'] = 'Organization';
|
2342 |
$input1['publisher']['name'] = $custom_fields['saswp_newsarticle_organization_name'];
|
@@ -2665,27 +3431,120 @@ Class saswp_output_service{
|
|
2665 |
if(isset($custom_fields['saswp_tech_article_date_modified'])){
|
2666 |
$input1['dateModified'] = $custom_fields['saswp_tech_article_date_modified'];
|
2667 |
}
|
2668 |
-
|
2669 |
-
if(
|
2670 |
-
|
2671 |
-
|
2672 |
-
|
2673 |
-
|
2674 |
-
|
2675 |
-
|
2676 |
-
|
2677 |
-
|
2678 |
-
|
2679 |
-
|
2680 |
-
|
2681 |
-
|
2682 |
-
|
2683 |
-
|
2684 |
-
|
2685 |
-
|
2686 |
-
|
2687 |
-
|
2688 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2689 |
}
|
2690 |
|
2691 |
if(isset($custom_fields['saswp_tech_article_editor_name']) && $custom_fields['saswp_tech_article_editor_name'] != '') {
|
@@ -2702,45 +3561,145 @@ Class saswp_output_service{
|
|
2702 |
if(isset($custom_fields['saswp_tech_article_editor_url'])){
|
2703 |
$input1['editor']['url'] = saswp_validate_url($custom_fields['saswp_tech_article_editor_url']);
|
2704 |
}
|
|
|
2705 |
if(isset($custom_fields['saswp_tech_article_editor_description'])){
|
2706 |
$input1['editor']['description'] = $custom_fields['saswp_tech_article_editor_description'];
|
2707 |
}
|
2708 |
if(isset($custom_fields['saswp_tech_article_editor_image'])){
|
2709 |
$input1['editor']['Image']['url'] = $custom_fields['saswp_tech_article_editor_image'];
|
2710 |
}
|
2711 |
-
|
2712 |
-
if(isset($custom_fields['saswp_tech_article_knowsabout'])){
|
2713 |
-
$input1['knowsAbout'] = explode(',', $custom_fields['saswp_tech_article_knowsabout']);
|
2714 |
-
}
|
2715 |
if(isset($custom_fields['saswp_tech_article_organization_logo']) && isset($custom_fields['saswp_tech_article_organization_name'])){
|
2716 |
$input1['publisher']['@type'] = 'Organization';
|
2717 |
$input1['publisher']['name'] = $custom_fields['saswp_tech_article_organization_name'];
|
2718 |
$input1['publisher']['logo'] = $custom_fields['saswp_tech_article_organization_logo'];
|
2719 |
}
|
2720 |
-
|
2721 |
-
|
2722 |
-
|
2723 |
-
|
2724 |
-
|
2725 |
-
|
2726 |
-
|
2727 |
-
|
2728 |
-
|
2729 |
-
$input1['
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2730 |
}
|
2731 |
}
|
2732 |
-
|
2733 |
-
$input1['reviewedBy']['name'] = $custom_fields['saswp_tech_article_reviewedby_name'];
|
2734 |
-
}
|
2735 |
-
if(isset($custom_fields['saswp_tech_article_reviewedby_honorific_suffix'])){
|
2736 |
-
$input1['reviewedBy']['honorificSuffix'] = $custom_fields['saswp_tech_article_reviewedby_honorific_suffix'];
|
2737 |
-
}
|
2738 |
-
if(isset($custom_fields['saswp_tech_article_reviewedby_url'])){
|
2739 |
-
$input1['reviewedBy']['url'] = saswp_validate_url($custom_fields['saswp_tech_article_reviewedby_url']);
|
2740 |
-
}
|
2741 |
-
if(isset($custom_fields['saswp_tech_article_reviewedby_description'])){
|
2742 |
-
$input1['reviewedBy']['description'] = $custom_fields['saswp_tech_article_reviewedby_description'];
|
2743 |
-
}
|
2744 |
break;
|
2745 |
|
2746 |
case 'Course':
|
1437 |
$input1['editor']['@type'] = 'Person';
|
1438 |
$input1['editor']['name'] = $custom_fields['saswp_article_editor_name'];
|
1439 |
}
|
1440 |
+
|
|
|
|
|
1441 |
if(isset($custom_fields['saswp_article_editor_honorific_suffix']) && $custom_fields['saswp_article_editor_honorific_suffix'] != '') {
|
1442 |
$input1['editor']['honorificSuffix'] = $custom_fields['saswp_article_editor_honorific_suffix'];
|
1443 |
}
|
1451 |
$input1['editor']['Image']['url'] = $custom_fields['saswp_article_editor_image'];
|
1452 |
}
|
1453 |
|
1454 |
+
if(!empty($custom_fields['saswp_article_author_global_mapping'])){
|
1455 |
+
|
1456 |
+
if(!empty($custom_fields['saswp_article_author_global_mapping'])){
|
1457 |
+
$input1['author']['@type'] = "Person";
|
1458 |
+
}
|
1459 |
+
|
1460 |
+
if(!empty($custom_fields['saswp_article_author_global_mapping']['name'])){
|
1461 |
+
$input1['author']['name'] = $custom_fields['saswp_article_author_global_mapping']['name'];
|
1462 |
+
}
|
1463 |
+
|
1464 |
+
if(!empty($custom_fields['saswp_article_author_global_mapping']['url'])){
|
1465 |
+
$input1['author']['url'] = $custom_fields['saswp_article_author_global_mapping']['url'];
|
1466 |
+
}
|
1467 |
+
|
1468 |
+
if(!empty($custom_fields['saswp_article_author_global_mapping']['description'])){
|
1469 |
+
$input1['author']['description'] = $custom_fields['saswp_article_author_global_mapping']['description'];
|
1470 |
+
}
|
1471 |
+
|
1472 |
+
if(!empty($custom_fields['saswp_article_author_global_mapping']['honorificsuffix'][0])){
|
1473 |
+
$input1['author']['honorificsuffix'] = $custom_fields['saswp_article_author_global_mapping']['honorificsuffix'][0];
|
1474 |
+
}
|
1475 |
+
|
1476 |
+
if(!empty($custom_fields['saswp_article_author_global_mapping']['knowsabout'][0])){
|
1477 |
+
$input1['author']['knowsabout'] = explode(',', $custom_fields['saswp_article_author_global_mapping']['knowsabout'][0]);
|
1478 |
+
}
|
1479 |
+
|
1480 |
+
if(!empty($custom_fields['saswp_article_author_global_mapping']['short_intro'][0])){
|
1481 |
+
$input1['author']['short_intro'] = $custom_fields['saswp_article_author_global_mapping']['short_intro'][0];
|
1482 |
+
}
|
1483 |
+
|
1484 |
+
if(!empty($custom_fields['saswp_article_author_global_mapping']['team_subtitle'][0])){
|
1485 |
+
$input1['author']['subtitle'] = $custom_fields['saswp_article_author_global_mapping']['team_subtitle'][0];
|
1486 |
+
}
|
1487 |
+
|
1488 |
+
if(!empty($custom_fields['saswp_article_author_global_mapping']['team_subtitle_2'][0])){
|
1489 |
+
$input1['author']['subtitle_2'] = $custom_fields['saswp_article_author_global_mapping']['team_subtitle_2'][0];
|
1490 |
+
}
|
1491 |
+
|
1492 |
+
if(!empty($custom_fields['saswp_article_author_global_mapping']['team_contact'][0])){
|
1493 |
+
$input1['author']['contact'] = $custom_fields['saswp_article_author_global_mapping']['team_contact'][0];
|
1494 |
+
}
|
1495 |
+
|
1496 |
+
if(!empty($custom_fields['saswp_article_author_global_mapping']['team_phone'][0])){
|
1497 |
+
$input1['author']['team_phone'] = $custom_fields['saswp_article_author_global_mapping']['team_phone'][0];
|
1498 |
+
}
|
1499 |
+
|
1500 |
+
$sameas = array();
|
1501 |
+
if(!empty($custom_fields['saswp_article_author_global_mapping']['team_facebook'][0])){
|
1502 |
+
$sameas[] = $custom_fields['saswp_article_author_global_mapping']['team_facebook'][0];
|
1503 |
+
}
|
1504 |
+
|
1505 |
+
if(!empty($custom_fields['saswp_article_author_global_mapping']['team_twitter'][0])){
|
1506 |
+
$sameas[] = $custom_fields['saswp_article_author_global_mapping']['team_twitter'][0];
|
1507 |
+
}
|
1508 |
+
|
1509 |
+
if(!empty($custom_fields['saswp_article_author_global_mapping']['team_linkedin'][0])){
|
1510 |
+
$sameas[] = $custom_fields['saswp_article_author_global_mapping']['team_linkedin'][0];
|
1511 |
+
}
|
1512 |
+
|
1513 |
+
if(!empty($custom_fields['saswp_article_author_global_mapping']['team_instagram'][0])){
|
1514 |
+
$sameas[] = $custom_fields['saswp_article_author_global_mapping']['team_instagram'][0];
|
1515 |
+
}
|
1516 |
+
|
1517 |
+
if(!empty($custom_fields['saswp_article_author_global_mapping']['team_youtube'][0])){
|
1518 |
+
$sameas[] = $custom_fields['saswp_article_author_global_mapping']['team_youtube'][0];
|
1519 |
+
}
|
1520 |
+
if($sameas){
|
1521 |
+
$input1['author']['sameAs'] = $sameas;
|
1522 |
+
}
|
1523 |
+
|
1524 |
+
|
1525 |
+
if(!empty($custom_fields['saswp_article_author_global_mapping']['college_logo'][0])){
|
1526 |
+
$input1['author']['college_logo'] = wp_get_attachment_image_url($custom_fields['saswp_article_author_global_mapping']['college_logo'][0]);
|
1527 |
+
}
|
1528 |
+
|
1529 |
+
if(!empty($custom_fields['saswp_article_author_global_mapping']['reviewer_bio'][0])){
|
1530 |
+
$input1['author']['reviewer_bio'] = $custom_fields['saswp_article_author_global_mapping']['reviewer_bio'][0];
|
1531 |
+
}
|
1532 |
+
|
1533 |
+
if(!empty($custom_fields['saswp_article_author_global_mapping']['alumniof'][0])){
|
1534 |
+
$str = $custom_fields['saswp_article_author_global_mapping']['alumniof'][0];
|
1535 |
+
$itemlist = explode(",", $str);
|
1536 |
+
foreach ($itemlist as $key => $list){
|
1537 |
+
$vnewarr['@type'] = 'Organization';
|
1538 |
+
$vnewarr['Name'] = $list;
|
1539 |
+
$input1['author']['alumniOf'][] = $vnewarr;
|
1540 |
+
}
|
1541 |
+
}
|
1542 |
+
}else{
|
1543 |
+
|
1544 |
+
if(isset($custom_fields['saswp_article_author_type'])){
|
1545 |
+
$input1['author']['@type'] = $custom_fields['saswp_article_author_type'];
|
1546 |
+
}
|
1547 |
+
if(isset($custom_fields['saswp_article_author_name'])){
|
1548 |
+
$input1['author']['name'] = $custom_fields['saswp_article_author_name'];
|
1549 |
+
}
|
1550 |
+
if(isset($custom_fields['saswp_article_author_honorific_suffix'])){
|
1551 |
+
$input1['author']['honorificSuffix'] = $custom_fields['saswp_article_author_honorific_suffix'];
|
1552 |
+
}
|
1553 |
+
if(isset($custom_fields['saswp_article_author_description'])){
|
1554 |
+
$input1['author']['description'] = $custom_fields['saswp_article_author_description'];
|
1555 |
+
}
|
1556 |
+
if(isset($custom_fields['saswp_article_author_url'])){
|
1557 |
+
$input1['author']['url'] = $custom_fields['saswp_article_author_url'];
|
1558 |
+
}
|
1559 |
+
if(isset($custom_fields['saswp_article_author_image'])){
|
1560 |
+
$input1['author']['Image']['url'] = $custom_fields['saswp_article_author_image'];
|
1561 |
+
}
|
1562 |
+
if(isset($custom_fields['saswp_article_author_jobtitle'])){
|
1563 |
+
$input1['author']['JobTitle'] = $custom_fields['saswp_article_author_jobtitle'];
|
1564 |
+
}
|
1565 |
}
|
1566 |
+
|
1567 |
if(isset($custom_fields['saswp_article_organization_logo']) && isset($custom_fields['saswp_article_organization_name'])){
|
1568 |
$input1['publisher']['@type'] = 'Organization';
|
1569 |
$input1['publisher']['name'] = $custom_fields['saswp_article_organization_name'];
|
1570 |
$input1['publisher']['logo'] = $custom_fields['saswp_article_organization_logo'];
|
1571 |
}
|
1572 |
+
|
1573 |
+
if(!empty($custom_fields['saswp_article_reviewedby_global_mapping'])){
|
1574 |
+
|
1575 |
+
if(!empty($custom_fields['saswp_article_reviewedby_global_mapping'])){
|
1576 |
+
$input1['reviewedBy']['@type'] = "Person";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1577 |
}
|
1578 |
+
|
1579 |
+
if(!empty($custom_fields['saswp_article_reviewedby_global_mapping']['name'])){
|
1580 |
+
$input1['reviewedBy']['name'] = $custom_fields['saswp_article_reviewedby_global_mapping']['name'];
|
1581 |
+
}
|
1582 |
+
|
1583 |
+
if(!empty($custom_fields['saswp_article_reviewedby_global_mapping']['url'])){
|
1584 |
+
$input1['reviewedBy']['url'] = $custom_fields['saswp_article_reviewedby_global_mapping']['url'];
|
1585 |
+
}
|
1586 |
+
|
1587 |
+
if(!empty($custom_fields['saswp_article_reviewedby_global_mapping']['description'])){
|
1588 |
+
$input1['reviewedBy']['description'] = $custom_fields['saswp_article_reviewedby_global_mapping']['description'];
|
1589 |
+
}
|
1590 |
+
|
1591 |
+
if(!empty($custom_fields['saswp_article_reviewedby_global_mapping']['honorificsuffix'][0])){
|
1592 |
+
$input1['reviewedBy']['honorificsuffix'] = $custom_fields['saswp_article_reviewedby_global_mapping']['honorificsuffix'][0];
|
1593 |
+
}
|
1594 |
+
|
1595 |
+
if(!empty($custom_fields['saswp_article_reviewedby_global_mapping']['knowsabout'][0])){
|
1596 |
+
$input1['reviewedBy']['knowsabout'] = explode(',', $custom_fields['saswp_article_reviewedby_global_mapping']['knowsabout'][0]);
|
1597 |
+
}
|
1598 |
+
|
1599 |
+
if(!empty($custom_fields['saswp_article_reviewedby_global_mapping']['short_intro'][0])){
|
1600 |
+
$input1['reviewedBy']['short_intro'] = $custom_fields['saswp_article_reviewedby_global_mapping']['short_intro'][0];
|
1601 |
+
}
|
1602 |
+
|
1603 |
+
if(!empty($custom_fields['saswp_article_reviewedby_global_mapping']['team_subtitle'][0])){
|
1604 |
+
$input1['reviewedBy']['subtitle'] = $custom_fields['saswp_article_reviewedby_global_mapping']['team_subtitle'][0];
|
1605 |
+
}
|
1606 |
+
|
1607 |
+
if(!empty($custom_fields['saswp_article_reviewedby_global_mapping']['team_subtitle_2'][0])){
|
1608 |
+
$input1['reviewedBy']['subtitle_2'] = $custom_fields['saswp_article_reviewedby_global_mapping']['team_subtitle_2'][0];
|
1609 |
+
}
|
1610 |
+
|
1611 |
+
if(!empty($custom_fields['saswp_article_reviewedby_global_mapping']['team_contact'][0])){
|
1612 |
+
$input1['reviewedBy']['contact'] = $custom_fields['saswp_article_reviewedby_global_mapping']['team_contact'][0];
|
1613 |
+
}
|
1614 |
+
|
1615 |
+
if(!empty($custom_fields['saswp_article_reviewedby_global_mapping']['team_phone'][0])){
|
1616 |
+
$input1['reviewedBy']['team_phone'] = $custom_fields['saswp_article_reviewedby_global_mapping']['team_phone'][0];
|
1617 |
+
}
|
1618 |
+
|
1619 |
+
$sameas = array();
|
1620 |
+
if(!empty($custom_fields['saswp_article_reviewedby_global_mapping']['team_facebook'][0])){
|
1621 |
+
$sameas[] = $custom_fields['saswp_article_reviewedby_global_mapping']['team_facebook'][0];
|
1622 |
+
}
|
1623 |
+
|
1624 |
+
if(!empty($custom_fields['saswp_article_reviewedby_global_mapping']['team_twitter'][0])){
|
1625 |
+
$sameas[] = $custom_fields['saswp_article_reviewedby_global_mapping']['team_twitter'][0];
|
1626 |
+
}
|
1627 |
+
|
1628 |
+
if(!empty($custom_fields['saswp_article_reviewedby_global_mapping']['team_linkedin'][0])){
|
1629 |
+
$sameas[] = $custom_fields['saswp_article_reviewedby_global_mapping']['team_linkedin'][0];
|
1630 |
+
}
|
1631 |
+
|
1632 |
+
if(!empty($custom_fields['saswp_article_reviewedby_global_mapping']['team_instagram'][0])){
|
1633 |
+
$sameas[] = $custom_fields['saswp_article_reviewedby_global_mapping']['team_instagram'][0];
|
1634 |
+
}
|
1635 |
+
|
1636 |
+
if(!empty($custom_fields['saswp_article_reviewedby_global_mapping']['team_youtube'][0])){
|
1637 |
+
$sameas[] = $custom_fields['saswp_article_reviewedby_global_mapping']['team_youtube'][0];
|
1638 |
+
}
|
1639 |
+
if($sameas){
|
1640 |
+
$input1['reviewedBy']['sameAs'] = $sameas;
|
1641 |
+
}
|
1642 |
+
|
1643 |
+
if(!empty($custom_fields['saswp_article_reviewedby_global_mapping']['college_logo'][0])){
|
1644 |
+
$input1['reviewedBy']['college_logo'] = wp_get_attachment_image_url($custom_fields['saswp_article_reviewedby_global_mapping']['college_logo'][0]);
|
1645 |
+
}
|
1646 |
+
|
1647 |
+
if(!empty($custom_fields['saswp_article_reviewedby_global_mapping']['reviewer_bio'][0])){
|
1648 |
+
$input1['reviewedBy']['reviewer_bio'] = $custom_fields['saswp_article_reviewedby_global_mapping']['reviewer_bio'][0];
|
1649 |
+
}
|
1650 |
+
|
1651 |
+
if(!empty($custom_fields['saswp_article_reviewedby_global_mapping']['alumniof'][0])){
|
1652 |
+
$str = $custom_fields['saswp_article_reviewedby_global_mapping']['alumniof'][0];
|
1653 |
+
$itemlist = explode(",", $str);
|
1654 |
+
foreach ($itemlist as $key => $list){
|
1655 |
+
$vnewarr['@type'] = 'Organization';
|
1656 |
+
$vnewarr['Name'] = $list;
|
1657 |
+
$input1['reviewedBy']['alumniOf'][] = $vnewarr;
|
1658 |
+
}
|
1659 |
+
}
|
1660 |
+
|
1661 |
+
}else{
|
1662 |
+
|
1663 |
+
if(isset($custom_fields['saswp_article_reviewedby_type'])){
|
1664 |
+
$input1['reviewedBy']['@type'] = $custom_fields['saswp_article_reviewedby_type'];
|
1665 |
+
}
|
1666 |
+
if(isset($custom_fields['saswp_article_reviewedby_name'])){
|
1667 |
+
$input1['reviewedBy']['name'] = $custom_fields['saswp_article_reviewedby_name'];
|
1668 |
+
}
|
1669 |
+
if(isset($custom_fields['saswp_article_reviewedby_honorific_suffix'])){
|
1670 |
+
$input1['reviewedBy']['honorificSuffix'] = $custom_fields['saswp_article_reviewedby_honorific_suffix'];
|
1671 |
+
}
|
1672 |
+
if(isset($custom_fields['saswp_article_reviewedby_description'])){
|
1673 |
+
$input1['reviewedBy']['description'] = $custom_fields['saswp_article_reviewedby_description'];
|
1674 |
+
}
|
1675 |
+
if(isset($custom_fields['saswp_article_reviewedby_url'])){
|
1676 |
+
$input1['reviewedBy']['url'] = $custom_fields['saswp_article_reviewedby_url'];
|
1677 |
+
}
|
1678 |
+
|
1679 |
+
if(isset($custom_fields['saswp_article_alumniof'])){
|
1680 |
+
$str = $custom_fields['saswp_article_alumniof'];
|
1681 |
+
$itemlist = explode(",", $str);
|
1682 |
+
foreach ($itemlist as $key => $list){
|
1683 |
+
$vnewarr['@type'] = 'Organization';
|
1684 |
+
$vnewarr['Name'] = $list;
|
1685 |
+
$input1['alumniOf'][] = $vnewarr;
|
1686 |
+
}
|
1687 |
+
}
|
1688 |
+
if(isset($custom_fields['saswp_article_knowsabout'])){
|
1689 |
+
$input1['knowsAbout'] = explode(',', $custom_fields['saswp_article_knowsabout']);
|
1690 |
+
}
|
1691 |
+
}
|
1692 |
+
|
1693 |
+
if(!empty($custom_fields['saswp_article_about']) && isset($custom_fields['saswp_article_about'])){
|
1694 |
+
$explode_about = explode(',', $custom_fields['saswp_article_about']);
|
1695 |
+
if(!empty($explode_about)){
|
1696 |
+
$about_arr = array();
|
1697 |
+
foreach($explode_about as $val){
|
1698 |
+
$about_arr[] = array(
|
1699 |
+
'@type' => 'Thing',
|
1700 |
+
'name' => $val
|
1701 |
+
);
|
1702 |
+
}
|
1703 |
+
$input1['about'] = $about_arr;
|
1704 |
+
}
|
1705 |
}
|
1706 |
|
1707 |
break;
|
1764 |
if(isset($custom_fields['saswp_creativework_editor_image'])){
|
1765 |
$input1['editor']['Image']['url'] = $custom_fields['saswp_creativework_editor_image'];
|
1766 |
}
|
1767 |
+
if(!empty($custom_fields['saswp_creativework_author_global_mapping'])){
|
1768 |
+
|
1769 |
+
if(!empty($custom_fields['saswp_creativework_author_global_mapping'])){
|
1770 |
+
$input1['author']['@type'] = "Person";
|
1771 |
+
}
|
1772 |
+
|
1773 |
+
if(!empty($custom_fields['saswp_creativework_author_global_mapping']['name'])){
|
1774 |
+
$input1['author']['name'] = $custom_fields['saswp_creativework_author_global_mapping']['name'];
|
1775 |
+
}
|
1776 |
+
|
1777 |
+
if(!empty($custom_fields['saswp_creativework_author_global_mapping']['url'])){
|
1778 |
+
$input1['author']['url'] = $custom_fields['saswp_creativework_author_global_mapping']['url'];
|
1779 |
+
}
|
1780 |
+
|
1781 |
+
if(!empty($custom_fields['saswp_creativework_author_global_mapping']['description'])){
|
1782 |
+
$input1['author']['description'] = $custom_fields['saswp_creativework_author_global_mapping']['description'];
|
1783 |
+
}
|
1784 |
+
|
1785 |
+
if(!empty($custom_fields['saswp_creativework_author_global_mapping']['honorificsuffix'][0])){
|
1786 |
+
$input1['author']['honorificsuffix'] = $custom_fields['saswp_creativework_author_global_mapping']['honorificsuffix'][0];
|
1787 |
+
}
|
1788 |
+
|
1789 |
+
if(!empty($custom_fields['saswp_creativework_author_global_mapping']['knowsabout'][0])){
|
1790 |
+
$input1['author']['knowsabout'] = explode(',', $custom_fields['saswp_creativework_author_global_mapping']['knowsabout'][0]);
|
1791 |
+
}
|
1792 |
+
|
1793 |
+
|
1794 |
+
if(!empty($custom_fields['saswp_creativework_author_global_mapping']['short_intro'][0])){
|
1795 |
+
$input1['author']['short_intro'] = $custom_fields['saswp_creativework_author_global_mapping']['short_intro'][0];
|
1796 |
+
}
|
1797 |
+
|
1798 |
+
if(!empty($custom_fields['saswp_creativework_author_global_mapping']['team_subtitle'][0])){
|
1799 |
+
$input1['author']['subtitle'] = $custom_fields['saswp_creativework_author_global_mapping']['team_subtitle'][0];
|
1800 |
+
}
|
1801 |
+
|
1802 |
+
if(!empty($custom_fields['saswp_creativework_author_global_mapping']['team_subtitle_2'][0])){
|
1803 |
+
$input1['author']['subtitle_2'] = $custom_fields['saswp_creativework_author_global_mapping']['team_subtitle_2'][0];
|
1804 |
+
}
|
1805 |
+
|
1806 |
+
if(!empty($custom_fields['saswp_creativework_author_global_mapping']['team_contact'][0])){
|
1807 |
+
$input1['author']['contact'] = $custom_fields['saswp_creativework_author_global_mapping']['team_contact'][0];
|
1808 |
+
}
|
1809 |
+
|
1810 |
+
if(!empty($custom_fields['saswp_creativework_author_global_mapping']['team_phone'][0])){
|
1811 |
+
$input1['author']['team_phone'] = $custom_fields['saswp_creativework_author_global_mapping']['team_phone'][0];
|
1812 |
+
}
|
1813 |
+
|
1814 |
+
$sameas = array();
|
1815 |
+
if(!empty($custom_fields['saswp_creativework_author_global_mapping']['team_facebook'][0])){
|
1816 |
+
$sameas[] = $custom_fields['saswp_creativework_author_global_mapping']['team_facebook'][0];
|
1817 |
+
}
|
1818 |
+
|
1819 |
+
if(!empty($custom_fields['saswp_creativework_author_global_mapping']['team_twitter'][0])){
|
1820 |
+
$sameas[] = $custom_fields['saswp_creativework_author_global_mapping']['team_twitter'][0];
|
1821 |
+
}
|
1822 |
+
|
1823 |
+
if(!empty($custom_fields['saswp_creativework_author_global_mapping']['team_linkedin'][0])){
|
1824 |
+
$sameas[] = $custom_fields['saswp_creativework_author_global_mapping']['team_linkedin'][0];
|
1825 |
+
}
|
1826 |
+
|
1827 |
+
if(!empty($custom_fields['saswp_creativework_author_global_mapping']['team_instagram'][0])){
|
1828 |
+
$sameas[] = $custom_fields['saswp_creativework_author_global_mapping']['team_instagram'][0];
|
1829 |
+
}
|
1830 |
+
|
1831 |
+
if(!empty($custom_fields['saswp_creativework_author_global_mapping']['team_youtube'][0])){
|
1832 |
+
$sameas[] = $custom_fields['saswp_creativework_author_global_mapping']['team_youtube'][0];
|
1833 |
+
}
|
1834 |
+
if($sameas){
|
1835 |
+
$input1['author']['sameAs'] = $sameas;
|
1836 |
+
}
|
1837 |
+
|
1838 |
+
if(!empty($custom_fields['saswp_creativework_author_global_mapping']['college_logo'][0])){
|
1839 |
+
$input1['author']['college_logo'] = wp_get_attachment_image_url($custom_fields['saswp_creativework_author_global_mapping']['college_logo'][0]);
|
1840 |
+
}
|
1841 |
+
|
1842 |
+
if(!empty($custom_fields['saswp_creativework_author_global_mapping']['reviewer_bio'][0])){
|
1843 |
+
$input1['author']['reviewer_bio'] = $custom_fields['saswp_creativework_author_global_mapping']['reviewer_bio'][0];
|
1844 |
+
}
|
1845 |
+
|
1846 |
+
if(!empty($custom_fields['saswp_creativework_author_global_mapping']['alumniof'][0])){
|
1847 |
+
$str = $custom_fields['saswp_creativework_author_global_mapping']['alumniof'][0];
|
1848 |
+
$itemlist = explode(",", $str);
|
1849 |
+
foreach ($itemlist as $key => $list){
|
1850 |
+
$vnewarr['@type'] = 'Organization';
|
1851 |
+
$vnewarr['Name'] = $list;
|
1852 |
+
$input1['author']['alumniOf'][] = $vnewarr;
|
1853 |
+
}
|
1854 |
+
}
|
1855 |
|
1856 |
+
}else{
|
1857 |
+
|
1858 |
+
if(isset($custom_fields['saswp_creativework_author_type'])){
|
1859 |
+
$input1['author']['@type'] = $custom_fields['saswp_creativework_author_type'];
|
1860 |
+
}
|
1861 |
+
if(isset($custom_fields['saswp_creativework_author_name'])){
|
1862 |
+
$input1['author']['name'] = $custom_fields['saswp_creativework_author_name'];
|
1863 |
+
}
|
1864 |
+
if(isset($custom_fields['saswp_creativework_author_honorific_suffix'])){
|
1865 |
+
$input1['author']['honorificSuffix'] = $custom_fields['saswp_creativework_author_honorific_suffix'];
|
1866 |
+
}
|
1867 |
+
if(isset($custom_fields['saswp_creativework_author_description'])){
|
1868 |
+
$input1['author']['description'] = $custom_fields['saswp_creativework_author_description'];
|
1869 |
+
}
|
1870 |
+
if(isset($custom_fields['saswp_creativework_author_url'])){
|
1871 |
+
$input1['author']['url'] = $custom_fields['saswp_creativework_author_url'];
|
1872 |
+
}
|
1873 |
+
if(isset($custom_fields['saswp_creativework_author_jobtitle'])){
|
1874 |
+
$input1['author']['JobTitle'] = $custom_fields['saswp_creativework_author_jobtitle'];
|
1875 |
+
}
|
1876 |
+
if(isset($custom_fields['saswp_creativework_author_image'])){
|
1877 |
+
$input1['author']['Image']['url'] = $custom_fields['saswp_creativework_author_image'];
|
1878 |
+
}
|
1879 |
+
if(isset($custom_fields['saswp_creativework_knowsabout'])){
|
1880 |
+
$input1['knowsAbout'] = explode(',', $custom_fields['saswp_creativework_knowsabout']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1881 |
}
|
1882 |
}
|
1883 |
+
|
1884 |
+
if(!empty($custom_fields['saswp_creativework_about']) && isset($custom_fields['saswp_creativework_about'])){
|
1885 |
+
$input1['about']['@type'] = 'Event';
|
1886 |
+
$input1['about']['name'] = explode(',', $custom_fields['saswp_creativework_about']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1887 |
}
|
1888 |
+
|
1889 |
+
if(!empty($custom_fields['saswp_creativework_reviewedby_global_mapping'])){
|
1890 |
+
|
1891 |
+
if(!empty($custom_fields['saswp_creativework_reviewedby_global_mapping'])){
|
1892 |
+
$input1['reviewedBy']['@type'] = "Person";
|
1893 |
+
}
|
1894 |
+
|
1895 |
+
if(!empty($custom_fields['saswp_creativework_reviewedby_global_mapping']['name'])){
|
1896 |
+
$input1['reviewedBy']['name'] = $custom_fields['saswp_creativework_reviewedby_global_mapping']['name'];
|
1897 |
+
}
|
1898 |
+
|
1899 |
+
if(!empty($custom_fields['saswp_creativework_reviewedby_global_mapping']['url'])){
|
1900 |
+
$input1['reviewedBy']['url'] = $custom_fields['saswp_creativework_reviewedby_global_mapping']['url'];
|
1901 |
+
}
|
1902 |
+
|
1903 |
+
if(!empty($custom_fields['saswp_creativework_reviewedby_global_mapping']['description'])){
|
1904 |
+
$input1['reviewedBy']['description'] = $custom_fields['saswp_creativework_reviewedby_global_mapping']['description'];
|
1905 |
+
}
|
1906 |
+
|
1907 |
+
if(!empty($custom_fields['saswp_creativework_reviewedby_global_mapping']['honorificsuffix'][0])){
|
1908 |
+
$input1['reviewedBy']['honorificsuffix'] = $custom_fields['saswp_creativework_reviewedby_global_mapping']['honorificsuffix'][0];
|
1909 |
+
}
|
1910 |
+
|
1911 |
+
if(!empty($custom_fields['saswp_creativework_reviewedby_global_mapping']['knowsabout'][0])){
|
1912 |
+
$input1['reviewedBy']['knowsabout'] = explode(',', $custom_fields['saswp_creativework_reviewedby_global_mapping']['knowsabout'][0]);
|
1913 |
+
}
|
1914 |
+
|
1915 |
+
|
1916 |
+
if(!empty($custom_fields['saswp_creativework_reviewedby_global_mapping']['short_intro'][0])){
|
1917 |
+
$input1['reviewedBy']['short_intro'] = $custom_fields['saswp_creativework_reviewedby_global_mapping']['short_intro'][0];
|
1918 |
+
}
|
1919 |
+
|
1920 |
+
if(!empty($custom_fields['saswp_creativework_reviewedby_global_mapping']['team_subtitle'][0])){
|
1921 |
+
$input1['reviewedBy']['subtitle'] = $custom_fields['saswp_creativework_reviewedby_global_mapping']['team_subtitle'][0];
|
1922 |
+
}
|
1923 |
+
|
1924 |
+
if(!empty($custom_fields['saswp_creativework_reviewedby_global_mapping']['team_subtitle_2'][0])){
|
1925 |
+
$input1['reviewedBy']['subtitle_2'] = $custom_fields['saswp_creativework_reviewedby_global_mapping']['team_subtitle_2'][0];
|
1926 |
+
}
|
1927 |
+
|
1928 |
+
if(!empty($custom_fields['saswp_creativework_reviewedby_global_mapping']['team_contact'][0])){
|
1929 |
+
$input1['reviewedBy']['contact'] = $custom_fields['saswp_creativework_reviewedby_global_mapping']['team_contact'][0];
|
1930 |
+
}
|
1931 |
+
|
1932 |
+
if(!empty($custom_fields['saswp_creativework_reviewedby_global_mapping']['team_phone'][0])){
|
1933 |
+
$input1['reviewedBy']['team_phone'] = $custom_fields['saswp_creativework_reviewedby_global_mapping']['team_phone'][0];
|
1934 |
+
}
|
1935 |
+
|
1936 |
+
$sameas = array();
|
1937 |
+
if(!empty($custom_fields['saswp_creativework_reviewedby_global_mapping']['team_facebook'][0])){
|
1938 |
+
$sameas[] = $custom_fields['saswp_creativework_reviewedby_global_mapping']['team_facebook'][0];
|
1939 |
+
}
|
1940 |
+
|
1941 |
+
if(!empty($custom_fields['saswp_creativework_reviewedby_global_mapping']['team_twitter'][0])){
|
1942 |
+
$sameas[] = $custom_fields['saswp_creativework_reviewedby_global_mapping']['team_twitter'][0];
|
1943 |
+
}
|
1944 |
+
|
1945 |
+
if(!empty($custom_fields['saswp_creativework_reviewedby_global_mapping']['team_linkedin'][0])){
|
1946 |
+
$sameas[] = $custom_fields['saswp_creativework_reviewedby_global_mapping']['team_linkedin'][0];
|
1947 |
+
}
|
1948 |
+
|
1949 |
+
if(!empty($custom_fields['saswp_creativework_reviewedby_global_mapping']['team_instagram'][0])){
|
1950 |
+
$sameas[] = $custom_fields['saswp_creativework_reviewedby_global_mapping']['team_instagram'][0];
|
1951 |
+
}
|
1952 |
+
|
1953 |
+
if(!empty($custom_fields['saswp_creativework_reviewedby_global_mapping']['team_youtube'][0])){
|
1954 |
+
$sameas[] = $custom_fields['saswp_creativework_reviewedby_global_mapping']['team_youtube'][0];
|
1955 |
+
}
|
1956 |
+
if($sameas){
|
1957 |
+
$input1['reviewedBy']['sameAs'] = $sameas;
|
1958 |
+
}
|
1959 |
+
|
1960 |
+
if(!empty($custom_fields['saswp_creativework_reviewedby_global_mapping']['college_logo'][0])){
|
1961 |
+
$input1['reviewedBy']['college_logo'] = wp_get_attachment_image_url($custom_fields['saswp_creativework_reviewedby_global_mapping']['college_logo'][0]);
|
1962 |
+
}
|
1963 |
+
|
1964 |
+
if(!empty($custom_fields['saswp_creativework_reviewedby_global_mapping']['reviewer_bio'][0])){
|
1965 |
+
$input1['reviewedBy']['reviewer_bio'] = $custom_fields['saswp_creativework_reviewedby_global_mapping']['reviewer_bio'][0];
|
1966 |
+
}
|
1967 |
+
|
1968 |
+
if(!empty($custom_fields['saswp_creativework_reviewedby_global_mapping']['alumniof'][0])){
|
1969 |
+
$str = $custom_fields['saswp_creativework_reviewedby_global_mapping']['alumniof'][0];
|
1970 |
+
$itemlist = explode(",", $str);
|
1971 |
+
foreach ($itemlist as $key => $list){
|
1972 |
+
$vnewarr['@type'] = 'Organization';
|
1973 |
+
$vnewarr['Name'] = $list;
|
1974 |
+
$input1['reviewedBy']['alumniOf'][] = $vnewarr;
|
1975 |
+
}
|
1976 |
+
}
|
1977 |
+
|
1978 |
+
}else{
|
1979 |
+
|
1980 |
+
if(isset($custom_fields['saswp_creativework_reviewedby_type'])){
|
1981 |
+
$input1['reviewedBy']['@type'] = $custom_fields['saswp_creativework_reviewedby_type'];
|
1982 |
+
}
|
1983 |
+
if(isset($custom_fields['saswp_creativework_reviewedby_name'])){
|
1984 |
+
$input1['reviewedBy']['name'] = $custom_fields['saswp_creativework_reviewedby_name'];
|
1985 |
+
}
|
1986 |
+
if(isset($custom_fields['saswp_creativework_reviewedby_honorific_suffix'])){
|
1987 |
+
$input1['reviewedBy']['honorificSuffix'] = $custom_fields['saswp_creativework_reviewedby_honorific_suffix'];
|
1988 |
+
}
|
1989 |
+
if(isset($custom_fields['saswp_creativework_reviewedby_description'])){
|
1990 |
+
$input1['reviewedBy']['description'] = $custom_fields['saswp_creativework_reviewedby_description'];
|
1991 |
+
}
|
1992 |
+
if(isset($custom_fields['saswp_creativework_reviewedby_url'])){
|
1993 |
+
$input1['reviewedBy']['url'] = $custom_fields['saswp_creativework_reviewedby_url'];
|
1994 |
+
}
|
1995 |
+
if(isset($custom_fields['saswp_creativework_alumniof'])){
|
1996 |
+
$str = $custom_fields['saswp_creativework_alumniof'];
|
1997 |
+
$itemlist = explode(",", $str);
|
1998 |
+
foreach ($itemlist as $key => $list){
|
1999 |
+
$vnewarr['@type'] = 'Organization';
|
2000 |
+
$vnewarr['Name'] = $list;
|
2001 |
+
$input1['alumniOf'][] = $vnewarr;
|
2002 |
+
}
|
2003 |
+
}
|
2004 |
}
|
2005 |
+
|
2006 |
if(isset($custom_fields['saswp_creativework_organization_logo']) && isset($custom_fields['saswp_creativework_organization_name'])){
|
2007 |
$input1['publisher']['@type'] = 'Organization';
|
2008 |
$input1['publisher']['name'] = $custom_fields['saswp_creativework_organization_name'];
|
2092 |
}
|
2093 |
if(isset($custom_fields['saswp_photograph_date_modified'])){
|
2094 |
$input1['dateModified'] = $custom_fields['saswp_photograph_date_modified'];
|
2095 |
+
}
|
2096 |
+
|
2097 |
+
if(!empty($custom_fields['saswp_photograph_author_global_mapping'])){
|
2098 |
+
|
2099 |
+
if(!empty($custom_fields['saswp_photograph_author_global_mapping'])){
|
2100 |
+
$input1['author']['@type'] = "Person";
|
2101 |
+
}
|
2102 |
+
|
2103 |
+
if(!empty($custom_fields['saswp_photograph_author_global_mapping']['name'])){
|
2104 |
+
$input1['author']['name'] = $custom_fields['saswp_photograph_author_global_mapping']['name'];
|
2105 |
+
}
|
2106 |
+
|
2107 |
+
if(!empty($custom_fields['saswp_photograph_author_global_mapping']['url'])){
|
2108 |
+
$input1['author']['url'] = $custom_fields['saswp_photograph_author_global_mapping']['url'];
|
2109 |
+
}
|
2110 |
+
|
2111 |
+
if(!empty($custom_fields['saswp_photograph_author_global_mapping']['description'])){
|
2112 |
+
$input1['author']['description'] = $custom_fields['saswp_photograph_author_global_mapping']['description'];
|
2113 |
+
}
|
2114 |
+
|
2115 |
+
if(!empty($custom_fields['saswp_photograph_author_global_mapping']['honorificsuffix'][0])){
|
2116 |
+
$input1['author']['honorificsuffix'] = $custom_fields['saswp_photograph_author_global_mapping']['honorificsuffix'][0];
|
2117 |
+
}
|
2118 |
+
|
2119 |
+
if(!empty($custom_fields['saswp_photograph_author_global_mapping']['knowsabout'][0])){
|
2120 |
+
$input1['author']['knowsabout'] = explode(',', $custom_fields['saswp_photograph_author_global_mapping']['knowsabout'][0]);
|
2121 |
+
}
|
2122 |
+
|
2123 |
+
|
2124 |
+
if(!empty($custom_fields['saswp_photograph_author_global_mapping']['short_intro'][0])){
|
2125 |
+
$input1['author']['short_intro'] = $custom_fields['saswp_photograph_author_global_mapping']['short_intro'][0];
|
2126 |
+
}
|
2127 |
+
|
2128 |
+
if(!empty($custom_fields['saswp_photograph_author_global_mapping']['team_subtitle'][0])){
|
2129 |
+
$input1['author']['subtitle'] = $custom_fields['saswp_photograph_author_global_mapping']['team_subtitle'][0];
|
2130 |
+
}
|
2131 |
+
|
2132 |
+
if(!empty($custom_fields['saswp_photograph_author_global_mapping']['team_subtitle_2'][0])){
|
2133 |
+
$input1['author']['subtitle_2'] = $custom_fields['saswp_photograph_author_global_mapping']['team_subtitle_2'][0];
|
2134 |
+
}
|
2135 |
+
|
2136 |
+
if(!empty($custom_fields['saswp_photograph_author_global_mapping']['team_contact'][0])){
|
2137 |
+
$input1['author']['contact'] = $custom_fields['saswp_photograph_author_global_mapping']['team_contact'][0];
|
2138 |
+
}
|
2139 |
+
|
2140 |
+
if(!empty($custom_fields['saswp_photograph_author_global_mapping']['team_phone'][0])){
|
2141 |
+
$input1['author']['team_phone'] = $custom_fields['saswp_photograph_author_global_mapping']['team_phone'][0];
|
2142 |
+
}
|
2143 |
+
|
2144 |
+
|
2145 |
+
$sameas = array();
|
2146 |
+
if(!empty($custom_fields['saswp_photograph_author_global_mapping']['team_facebook'][0])){
|
2147 |
+
$sameas[] = $custom_fields['saswp_photograph_author_global_mapping']['team_facebook'][0];
|
2148 |
+
}
|
2149 |
+
|
2150 |
+
if(!empty($custom_fields['saswp_photograph_author_global_mapping']['team_twitter'][0])){
|
2151 |
+
$sameas[] = $custom_fields['saswp_photograph_author_global_mapping']['team_twitter'][0];
|
2152 |
+
}
|
2153 |
+
|
2154 |
+
if(!empty($custom_fields['saswp_photograph_author_global_mapping']['team_linkedin'][0])){
|
2155 |
+
$sameas[] = $custom_fields['saswp_photograph_author_global_mapping']['team_linkedin'][0];
|
2156 |
+
}
|
2157 |
+
|
2158 |
+
if(!empty($custom_fields['saswp_photograph_author_global_mapping']['team_instagram'][0])){
|
2159 |
+
$sameas[] = $custom_fields['saswp_photograph_author_global_mapping']['team_instagram'][0];
|
2160 |
+
}
|
2161 |
+
|
2162 |
+
if(!empty($custom_fields['saswp_photograph_author_global_mapping']['team_youtube'][0])){
|
2163 |
+
$sameas[] = $custom_fields['saswp_photograph_author_global_mapping']['team_youtube'][0];
|
2164 |
+
}
|
2165 |
+
if($sameas){
|
2166 |
+
$input1['author']['sameAs'] = $sameas;
|
2167 |
+
}
|
2168 |
+
|
2169 |
+
|
2170 |
+
if(!empty($custom_fields['saswp_photograph_author_global_mapping']['college_logo'][0])){
|
2171 |
+
$input1['author']['college_logo'] = wp_get_attachment_image_url($custom_fields['saswp_photograph_author_global_mapping']['college_logo'][0]);
|
2172 |
+
}
|
2173 |
+
|
2174 |
+
if(!empty($custom_fields['saswp_photograph_author_global_mapping']['reviewer_bio'][0])){
|
2175 |
+
$input1['author']['reviewer_bio'] = $custom_fields['saswp_photograph_author_global_mapping']['reviewer_bio'][0];
|
2176 |
+
}
|
2177 |
+
|
2178 |
+
if(!empty($custom_fields['saswp_photograph_author_global_mapping']['alumniof'][0])){
|
2179 |
+
$str = $custom_fields['saswp_photograph_author_global_mapping']['alumniof'][0];
|
2180 |
+
$itemlist = explode(",", $str);
|
2181 |
+
foreach ($itemlist as $key => $list){
|
2182 |
+
$vnewarr['@type'] = 'Organization';
|
2183 |
+
$vnewarr['Name'] = $list;
|
2184 |
+
$input1['author']['alumniOf'][] = $vnewarr;
|
2185 |
+
}
|
2186 |
+
}
|
2187 |
+
|
2188 |
+
}else{
|
2189 |
+
if(isset($custom_fields['saswp_photograph_author_type'])){
|
2190 |
+
$input1['author']['@type'] = $custom_fields['saswp_photograph_author_type'];
|
2191 |
+
}
|
2192 |
+
if(isset($custom_fields['saswp_photograph_author_name'])){
|
2193 |
+
$input1['author']['name'] = $custom_fields['saswp_photograph_author_name'];
|
2194 |
+
}
|
2195 |
+
if(isset($custom_fields['saswp_photograph_author_jobtitle'])){
|
2196 |
+
$input1['author']['JobTitle'] = $custom_fields['saswp_photograph_author_jobtitle'];
|
2197 |
+
}
|
2198 |
+
|
2199 |
+
if(isset($custom_fields['saswp_photograph_author_honorific_suffix'])){
|
2200 |
+
$input1['author']['honorificSuffix'] = $custom_fields['saswp_photograph_author_honorific_suffix'];
|
2201 |
+
}
|
2202 |
+
if(isset($custom_fields['saswp_photograph_author_description'])){
|
2203 |
+
$input1['author']['description'] = $custom_fields['saswp_photograph_author_description'];
|
2204 |
+
}
|
2205 |
+
if(isset($custom_fields['saswp_photograph_author_url'])){
|
2206 |
+
$input1['author']['url'] = $custom_fields['saswp_photograph_author_url'];
|
2207 |
+
}
|
2208 |
+
if(isset($custom_fields['saswp_photograph_author_image'])){
|
2209 |
+
$input1['author']['Image']['url'] = $custom_fields['saswp_photograph_author_image'];
|
2210 |
+
}
|
2211 |
+
|
2212 |
+
}
|
2213 |
|
2214 |
if(isset($custom_fields['saswp_photograph_editor_type'])){
|
2215 |
$input1['editor']['@type'] = $custom_fields['saswp_photograph_editor_type'];
|
2235 |
$input1['publisher']['@type'] = 'Organization';
|
2236 |
$input1['publisher']['name'] = $custom_fields['saswp_photograph_organization_name'];
|
2237 |
$input1['publisher']['logo'] = $custom_fields['saswp_photograph_organization_logo'];
|
2238 |
+
}
|
2239 |
+
|
2240 |
+
if(!empty($custom_fields['saswp_photograph_reviewedby_global_mapping'])){
|
2241 |
+
|
2242 |
+
if(!empty($custom_fields['saswp_photograph_reviewedby_global_mapping'])){
|
2243 |
+
$input1['reviewedBy']['@type'] = "Person";
|
2244 |
+
}
|
2245 |
+
|
2246 |
+
if(!empty($custom_fields['saswp_photograph_reviewedby_global_mapping']['name'])){
|
2247 |
+
$input1['reviewedBy']['name'] = $custom_fields['saswp_photograph_reviewedby_global_mapping']['name'];
|
2248 |
+
}
|
2249 |
+
|
2250 |
+
if(!empty($custom_fields['saswp_photograph_reviewedby_global_mapping']['url'])){
|
2251 |
+
$input1['reviewedBy']['url'] = $custom_fields['saswp_photograph_reviewedby_global_mapping']['url'];
|
2252 |
+
}
|
2253 |
+
|
2254 |
+
if(!empty($custom_fields['saswp_photograph_reviewedby_global_mapping']['description'])){
|
2255 |
+
$input1['reviewedBy']['description'] = $custom_fields['saswp_photograph_reviewedby_global_mapping']['description'];
|
2256 |
+
}
|
2257 |
+
|
2258 |
+
if(!empty($custom_fields['saswp_photograph_reviewedby_global_mapping']['honorificsuffix'][0])){
|
2259 |
+
$input1['reviewedBy']['honorificsuffix'] = $custom_fields['saswp_photograph_reviewedby_global_mapping']['honorificsuffix'][0];
|
2260 |
+
}
|
2261 |
+
|
2262 |
+
if(!empty($custom_fields['saswp_photograph_reviewedby_global_mapping']['knowsabout'][0])){
|
2263 |
+
$input1['reviewedBy']['knowsabout'] = explode(',', $custom_fields['saswp_photograph_reviewedby_global_mapping']['knowsabout'][0]);
|
2264 |
+
}
|
2265 |
+
|
2266 |
+
|
2267 |
+
if(!empty($custom_fields['saswp_photograph_reviewedby_global_mapping']['short_intro'][0])){
|
2268 |
+
$input1['reviewedBy']['short_intro'] = $custom_fields['saswp_photograph_reviewedby_global_mapping']['short_intro'][0];
|
2269 |
+
}
|
2270 |
+
|
2271 |
+
if(!empty($custom_fields['saswp_photograph_reviewedby_global_mapping']['team_subtitle'][0])){
|
2272 |
+
$input1['reviewedBy']['subtitle'] = $custom_fields['saswp_photograph_reviewedby_global_mapping']['team_subtitle'][0];
|
2273 |
+
}
|
2274 |
+
|
2275 |
+
if(!empty($custom_fields['saswp_photograph_reviewedby_global_mapping']['team_subtitle_2'][0])){
|
2276 |
+
$input1['reviewedBy']['subtitle_2'] = $custom_fields['saswp_photograph_reviewedby_global_mapping']['team_subtitle_2'][0];
|
2277 |
+
}
|
2278 |
+
|
2279 |
+
if(!empty($custom_fields['saswp_photograph_reviewedby_global_mapping']['team_contact'][0])){
|
2280 |
+
$input1['reviewedBy']['contact'] = $custom_fields['saswp_photograph_reviewedby_global_mapping']['team_contact'][0];
|
2281 |
+
}
|
2282 |
+
|
2283 |
+
if(!empty($custom_fields['saswp_photograph_reviewedby_global_mapping']['team_phone'][0])){
|
2284 |
+
$input1['reviewedBy']['team_phone'] = $custom_fields['saswp_photograph_reviewedby_global_mapping']['team_phone'][0];
|
2285 |
+
}
|
2286 |
+
|
2287 |
+
$sameas = array();
|
2288 |
+
if(!empty($custom_fields['saswp_photograph_reviewedby_global_mapping']['team_facebook'][0])){
|
2289 |
+
$sameas[] = $custom_fields['saswp_photograph_reviewedby_global_mapping']['team_facebook'][0];
|
2290 |
+
}
|
2291 |
+
|
2292 |
+
if(!empty($custom_fields['saswp_photograph_reviewedby_global_mapping']['team_twitter'][0])){
|
2293 |
+
$sameas[] = $custom_fields['saswp_photograph_reviewedby_global_mapping']['team_twitter'][0];
|
2294 |
+
}
|
2295 |
+
|
2296 |
+
if(!empty($custom_fields['saswp_photograph_reviewedby_global_mapping']['team_linkedin'][0])){
|
2297 |
+
$sameas[] = $custom_fields['saswp_photograph_reviewedby_global_mapping']['team_linkedin'][0];
|
2298 |
+
}
|
2299 |
+
|
2300 |
+
if(!empty($custom_fields['saswp_photograph_reviewedby_global_mapping']['team_instagram'][0])){
|
2301 |
+
$sameas[] = $custom_fields['saswp_photograph_reviewedby_global_mapping']['team_instagram'][0];
|
2302 |
+
}
|
2303 |
+
|
2304 |
+
if(!empty($custom_fields['saswp_photograph_reviewedby_global_mapping']['team_youtube'][0])){
|
2305 |
+
$sameas[] = $custom_fields['saswp_photograph_reviewedby_global_mapping']['team_youtube'][0];
|
2306 |
+
}
|
2307 |
+
if($sameas){
|
2308 |
+
$input1['reviewedBy']['sameAs'] = $sameas;
|
2309 |
+
}
|
2310 |
+
|
2311 |
+
if(!empty($custom_fields['saswp_photograph_reviewedby_global_mapping']['college_logo'][0])){
|
2312 |
+
$input1['reviewedBy']['college_logo'] = wp_get_attachment_image_url($custom_fields['saswp_photograph_reviewedby_global_mapping']['college_logo'][0]);
|
2313 |
+
}
|
2314 |
+
|
2315 |
+
if(!empty($custom_fields['saswp_photograph_reviewedby_global_mapping']['reviewer_bio'][0])){
|
2316 |
+
$input1['reviewedBy']['reviewer_bio'] = $custom_fields['saswp_photograph_reviewedby_global_mapping']['reviewer_bio'][0];
|
2317 |
+
}
|
2318 |
+
|
2319 |
+
if(!empty($custom_fields['saswp_photograph_reviewedby_global_mapping']['alumniof'][0])){
|
2320 |
+
$str = $custom_fields['saswp_photograph_reviewedby_global_mapping']['alumniof'][0];
|
2321 |
+
$itemlist = explode(",", $str);
|
2322 |
+
foreach ($itemlist as $key => $list){
|
2323 |
+
$vnewarr['@type'] = 'Organization';
|
2324 |
+
$vnewarr['Name'] = $list;
|
2325 |
+
$input1['reviewedBy']['alumniOf'][] = $vnewarr;
|
2326 |
+
}
|
2327 |
+
}
|
2328 |
+
|
2329 |
+
}else{
|
2330 |
+
if(isset($custom_fields['saswp_photograph_reviewedby_type'])){
|
2331 |
+
$input1['reviewedBy']['@type'] = $custom_fields['saswp_photograph_reviewedby_type'];
|
2332 |
+
}
|
2333 |
+
if(isset($custom_fields['saswp_photograph_reviewedby_name'])){
|
2334 |
$input1['reviewedBy']['name'] = $custom_fields['saswp_photograph_reviewedby_name'];
|
2335 |
}
|
2336 |
if(isset($custom_fields['saswp_photograph_reviewedby_honorific_suffix'])){
|
2337 |
+
$input1['reviewedBy']['honorificSuffix'] = $custom_fields['saswp_photograph_reviewedby_honorific_suffix'];
|
2338 |
}
|
2339 |
if(isset($custom_fields['saswp_photograph_reviewedby_description'])){
|
2340 |
$input1['reviewedBy']['description'] = $custom_fields['saswp_photograph_reviewedby_description'];
|
2345 |
if(isset($custom_fields['saswp_photograph_knowsabout'])){
|
2346 |
$input1['knowsAbout'] = explode(',', $custom_fields['saswp_photograph_knowsabout']);
|
2347 |
}
|
2348 |
+
if(!empty($custom_fields['saswp_photograph_about']) && isset($custom_fields['saswp_photograph_about'])){
|
2349 |
+
$input1['about']['@type'] = 'Event';
|
2350 |
+
$input1['about']['name'] = explode(',', $custom_fields['saswp_photograph_about']);
|
2351 |
+
}
|
2352 |
if(isset($custom_fields['saswp_photograph_alumniof'])){
|
2353 |
$str = $custom_fields['saswp_photograph_alumniof'];
|
2354 |
$itemlist = explode(",", $str);
|
2358 |
$input1['alumniOf'][] = $vnewarr;
|
2359 |
}
|
2360 |
}
|
2361 |
+
}
|
2362 |
|
2363 |
break;
|
2364 |
|
2641 |
$input1['editor']['Image']['url'] = $custom_fields['saswp_blogposting_editor_image'];
|
2642 |
}
|
2643 |
|
2644 |
+
if(!empty($custom_fields['saswp_blogposting_author_global_mapping'])){
|
2645 |
+
|
2646 |
+
if(!empty($custom_fields['saswp_blogposting_author_global_mapping'])){
|
2647 |
+
$input1['author']['@type'] = "Person";
|
2648 |
+
}
|
2649 |
+
|
2650 |
+
if(!empty($custom_fields['saswp_blogposting_author_global_mapping']['name'])){
|
2651 |
+
$input1['author']['name'] = $custom_fields['saswp_blogposting_author_global_mapping']['name'];
|
2652 |
+
}
|
2653 |
+
|
2654 |
+
if(!empty($custom_fields['saswp_blogposting_author_global_mapping']['url'])){
|
2655 |
+
$input1['author']['url'] = $custom_fields['saswp_blogposting_author_global_mapping']['url'];
|
2656 |
+
}
|
2657 |
+
|
2658 |
+
if(!empty($custom_fields['saswp_blogposting_author_global_mapping']['description'])){
|
2659 |
+
$input1['author']['description'] = $custom_fields['saswp_blogposting_author_global_mapping']['description'];
|
2660 |
+
}
|
2661 |
+
|
2662 |
+
if(!empty($custom_fields['saswp_blogposting_author_global_mapping']['honorificsuffix'][0])){
|
2663 |
+
$input1['author']['honorificsuffix'] = $custom_fields['saswp_blogposting_author_global_mapping']['honorificsuffix'][0];
|
2664 |
+
}
|
2665 |
+
|
2666 |
+
if(!empty($custom_fields['saswp_blogposting_author_global_mapping']['knowsabout'][0])){
|
2667 |
+
$input1['author']['knowsabout'] = explode(',', $custom_fields['saswp_blogposting_author_global_mapping']['knowsabout'][0]);
|
2668 |
+
}
|
2669 |
+
|
2670 |
+
|
2671 |
+
if(!empty($custom_fields['saswp_blogposting_author_global_mapping']['short_intro'][0])){
|
2672 |
+
$input1['author']['short_intro'] = $custom_fields['saswp_blogposting_author_global_mapping']['short_intro'][0];
|
2673 |
+
}
|
2674 |
+
|
2675 |
+
if(!empty($custom_fields['saswp_blogposting_author_global_mapping']['team_subtitle'][0])){
|
2676 |
+
$input1['author']['subtitle'] = $custom_fields['saswp_blogposting_author_global_mapping']['team_subtitle'][0];
|
2677 |
+
}
|
2678 |
+
|
2679 |
+
if(!empty($custom_fields['saswp_blogposting_author_global_mapping']['team_subtitle_2'][0])){
|
2680 |
+
$input1['author']['subtitle_2'] = $custom_fields['saswp_blogposting_author_global_mapping']['team_subtitle_2'][0];
|
2681 |
+
}
|
2682 |
+
|
2683 |
+
if(!empty($custom_fields['saswp_blogposting_author_global_mapping']['team_contact'][0])){
|
2684 |
+
$input1['author']['contact'] = $custom_fields['saswp_blogposting_author_global_mapping']['team_contact'][0];
|
2685 |
+
}
|
2686 |
+
|
2687 |
+
if(!empty($custom_fields['saswp_blogposting_author_global_mapping']['team_phone'][0])){
|
2688 |
+
$input1['author']['team_phone'] = $custom_fields['saswp_blogposting_author_global_mapping']['team_phone'][0];
|
2689 |
+
}
|
2690 |
+
|
2691 |
+
$sameas = array();
|
2692 |
+
if(!empty($custom_fields['saswp_blogposting_author_global_mapping']['team_facebook'][0])){
|
2693 |
+
$sameas[] = $custom_fields['saswp_blogposting_author_global_mapping']['team_facebook'][0];
|
2694 |
+
}
|
2695 |
+
|
2696 |
+
if(!empty($custom_fields['saswp_blogposting_author_global_mapping']['team_twitter'][0])){
|
2697 |
+
$sameas[] = $custom_fields['saswp_blogposting_author_global_mapping']['team_twitter'][0];
|
2698 |
+
}
|
2699 |
+
|
2700 |
+
if(!empty($custom_fields['saswp_blogposting_author_global_mapping']['team_linkedin'][0])){
|
2701 |
+
$sameas[] = $custom_fields['saswp_blogposting_author_global_mapping']['team_linkedin'][0];
|
2702 |
+
}
|
2703 |
+
|
2704 |
+
if(!empty($custom_fields['saswp_blogposting_author_global_mapping']['team_instagram'][0])){
|
2705 |
+
$sameas[] = $custom_fields['saswp_blogposting_author_global_mapping']['team_instagram'][0];
|
2706 |
+
}
|
2707 |
+
|
2708 |
+
if(!empty($custom_fields['saswp_blogposting_author_global_mapping']['team_youtube'][0])){
|
2709 |
+
$sameas[] = $custom_fields['saswp_blogposting_author_global_mapping']['team_youtube'][0];
|
2710 |
+
}
|
2711 |
+
if($sameas){
|
2712 |
+
$input1['author']['sameAs'] = $sameas;
|
2713 |
+
}
|
2714 |
+
|
2715 |
+
|
2716 |
+
if(!empty($custom_fields['saswp_blogposting_author_global_mapping']['college_logo'][0])){
|
2717 |
+
$input1['author']['college_logo'] = wp_get_attachment_image_url($custom_fields['saswp_blogposting_author_global_mapping']['college_logo'][0]);
|
2718 |
+
}
|
2719 |
|
2720 |
+
if(!empty($custom_fields['saswp_blogposting_author_global_mapping']['reviewer_bio'][0])){
|
2721 |
+
$input1['author']['reviewer_bio'] = $custom_fields['saswp_blogposting_author_global_mapping']['reviewer_bio'][0];
|
2722 |
+
}
|
2723 |
+
|
2724 |
+
if(!empty($custom_fields['saswp_blogposting_author_global_mapping']['alumniof'][0])){
|
2725 |
+
$str = $custom_fields['saswp_blogposting_author_global_mapping']['alumniof'][0];
|
2726 |
+
$itemlist = explode(",", $str);
|
2727 |
+
foreach ($itemlist as $key => $list){
|
2728 |
+
$vnewarr['@type'] = 'Organization';
|
2729 |
+
$vnewarr['Name'] = $list;
|
2730 |
+
$input1['author']['alumniOf'][] = $vnewarr;
|
2731 |
+
}
|
2732 |
+
}
|
|
|
|
|
|
|
2733 |
|
2734 |
+
}else{
|
2735 |
|
2736 |
+
if(isset($custom_fields['saswp_blogposting_author_type'])){
|
2737 |
+
$input1['author']['@type'] = $custom_fields['saswp_blogposting_author_type'];
|
2738 |
+
}
|
2739 |
+
if(isset($custom_fields['saswp_blogposting_author_name'])){
|
2740 |
+
$input1['author']['name'] = $custom_fields['saswp_blogposting_author_name'];
|
2741 |
+
}
|
2742 |
+
if(isset($custom_fields['saswp_blogposting_author_honorific_suffix'])){
|
2743 |
+
$input1['author']['honorificSuffix'] = $custom_fields['saswp_blogposting_author_honorific_suffix'];
|
2744 |
+
}
|
2745 |
+
if(isset($custom_fields['saswp_blogposting_author_url'])){
|
2746 |
+
$input1['author']['url'] = $custom_fields['saswp_blogposting_author_url'];
|
2747 |
+
}
|
2748 |
+
if(isset($custom_fields['saswp_blogposting_author_description'])){
|
2749 |
+
$input1['author']['description'] = $custom_fields['saswp_blogposting_author_description'];
|
2750 |
+
}
|
2751 |
+
if(isset($custom_fields['saswp_blogposting_author_jobtitle'])){
|
2752 |
+
$input1['author']['JobTitle'] = $custom_fields['saswp_blogposting_author_jobtitle'];
|
2753 |
+
}
|
2754 |
+
if(isset($custom_fields['saswp_blogposting_author_image'])){
|
2755 |
+
$input1['author']['Image']['url'] = $custom_fields['saswp_blogposting_author_image'];
|
2756 |
+
}
|
2757 |
}
|
2758 |
+
|
2759 |
+
if(!empty($custom_fields['saswp_blogposting_reviewedby_global_mapping'])){
|
2760 |
+
|
2761 |
+
if(!empty($custom_fields['saswp_blogposting_reviewedby_global_mapping'])){
|
2762 |
+
$input1['reviewedBy']['@type'] = "Person";
|
|
|
|
|
2763 |
}
|
2764 |
+
|
2765 |
+
if(!empty($custom_fields['saswp_blogposting_reviewedby_global_mapping']['name'])){
|
2766 |
+
$input1['reviewedBy']['name'] = $custom_fields['saswp_blogposting_reviewedby_global_mapping']['name'];
|
2767 |
+
}
|
2768 |
+
|
2769 |
+
if(!empty($custom_fields['saswp_blogposting_reviewedby_global_mapping']['url'])){
|
2770 |
+
$input1['reviewedBy']['url'] = $custom_fields['saswp_blogposting_reviewedby_global_mapping']['url'];
|
2771 |
+
}
|
2772 |
+
|
2773 |
+
if(!empty($custom_fields['saswp_blogposting_reviewedby_global_mapping']['description'])){
|
2774 |
+
$input1['reviewedBy']['description'] = $custom_fields['saswp_blogposting_reviewedby_global_mapping']['description'];
|
2775 |
+
}
|
2776 |
+
|
2777 |
+
if(!empty($custom_fields['saswp_blogposting_reviewedby_global_mapping']['honorificsuffix'][0])){
|
2778 |
+
$input1['reviewedBy']['honorificsuffix'] = $custom_fields['saswp_blogposting_reviewedby_global_mapping']['honorificsuffix'][0];
|
2779 |
+
}
|
2780 |
+
|
2781 |
+
if(!empty($custom_fields['saswp_blogposting_reviewedby_global_mapping']['knowsabout'][0])){
|
2782 |
+
$input1['reviewedBy']['knowsabout'] = explode(',', $custom_fields['saswp_blogposting_reviewedby_global_mapping']['knowsabout'][0]);
|
2783 |
+
}
|
2784 |
+
|
2785 |
+
|
2786 |
+
if(!empty($custom_fields['saswp_blogposting_reviewedby_global_mapping']['short_intro'][0])){
|
2787 |
+
$input1['reviewedBy']['short_intro'] = $custom_fields['saswp_blogposting_reviewedby_global_mapping']['short_intro'][0];
|
2788 |
+
}
|
2789 |
+
|
2790 |
+
if(!empty($custom_fields['saswp_blogposting_reviewedby_global_mapping']['team_subtitle'][0])){
|
2791 |
+
$input1['reviewedBy']['subtitle'] = $custom_fields['saswp_blogposting_reviewedby_global_mapping']['team_subtitle'][0];
|
2792 |
+
}
|
2793 |
+
|
2794 |
+
if(!empty($custom_fields['saswp_blogposting_reviewedby_global_mapping']['team_subtitle_2'][0])){
|
2795 |
+
$input1['reviewedBy']['subtitle_2'] = $custom_fields['saswp_blogposting_reviewedby_global_mapping']['team_subtitle_2'][0];
|
2796 |
+
}
|
2797 |
+
|
2798 |
+
if(!empty($custom_fields['saswp_blogposting_reviewedby_global_mapping']['team_contact'][0])){
|
2799 |
+
$input1['reviewedBy']['contact'] = $custom_fields['saswp_blogposting_reviewedby_global_mapping']['team_contact'][0];
|
2800 |
+
}
|
2801 |
+
|
2802 |
+
if(!empty($custom_fields['saswp_blogposting_reviewedby_global_mapping']['team_phone'][0])){
|
2803 |
+
$input1['reviewedBy']['team_phone'] = $custom_fields['saswp_blogposting_reviewedby_global_mapping']['team_phone'][0];
|
2804 |
+
}
|
2805 |
+
|
2806 |
+
$sameas = array();
|
2807 |
+
if(!empty($custom_fields['saswp_blogposting_reviewedby_global_mapping']['team_facebook'][0])){
|
2808 |
+
$sameas[] = $custom_fields['saswp_blogposting_reviewedby_global_mapping']['team_facebook'][0];
|
2809 |
+
}
|
2810 |
+
|
2811 |
+
if(!empty($custom_fields['saswp_blogposting_reviewedby_global_mapping']['team_twitter'][0])){
|
2812 |
+
$sameas[] = $custom_fields['saswp_blogposting_reviewedby_global_mapping']['team_twitter'][0];
|
2813 |
+
}
|
2814 |
+
|
2815 |
+
if(!empty($custom_fields['saswp_blogposting_reviewedby_global_mapping']['team_linkedin'][0])){
|
2816 |
+
$sameas[] = $custom_fields['saswp_blogposting_reviewedby_global_mapping']['team_linkedin'][0];
|
2817 |
+
}
|
2818 |
+
|
2819 |
+
if(!empty($custom_fields['saswp_blogposting_reviewedby_global_mapping']['team_instagram'][0])){
|
2820 |
+
$sameas[] = $custom_fields['saswp_blogposting_reviewedby_global_mapping']['team_instagram'][0];
|
2821 |
+
}
|
2822 |
+
|
2823 |
+
if(!empty($custom_fields['saswp_blogposting_reviewedby_global_mapping']['team_youtube'][0])){
|
2824 |
+
$sameas[] = $custom_fields['saswp_blogposting_reviewedby_global_mapping']['team_youtube'][0];
|
2825 |
+
}
|
2826 |
+
if($sameas){
|
2827 |
+
$input1['reviewedBy']['sameAs'] = $sameas;
|
2828 |
+
}
|
2829 |
+
|
2830 |
+
if(!empty($custom_fields['saswp_blogposting_reviewedby_global_mapping']['college_logo'][0])){
|
2831 |
+
$input1['reviewedBy']['college_logo'] = wp_get_attachment_image_url($custom_fields['saswp_blogposting_reviewedby_global_mapping']['college_logo'][0]);
|
2832 |
+
}
|
2833 |
+
|
2834 |
+
if(!empty($custom_fields['saswp_blogposting_reviewedby_global_mapping']['reviewer_bio'][0])){
|
2835 |
+
$input1['reviewedBy']['reviewer_bio'] = $custom_fields['saswp_blogposting_reviewedby_global_mapping']['reviewer_bio'][0];
|
2836 |
+
}
|
2837 |
+
|
2838 |
+
if(!empty($custom_fields['saswp_blogposting_reviewedby_global_mapping']['alumniof'][0])){
|
2839 |
+
$str = $custom_fields['saswp_blogposting_reviewedby_global_mapping']['alumniof'][0];
|
2840 |
+
$itemlist = explode(",", $str);
|
2841 |
+
foreach ($itemlist as $key => $list){
|
2842 |
+
$vnewarr['@type'] = 'Organization';
|
2843 |
+
$vnewarr['Name'] = $list;
|
2844 |
+
$input1['reviewedBy']['alumniOf'][] = $vnewarr;
|
2845 |
+
}
|
2846 |
+
}
|
2847 |
+
|
2848 |
+
}else{
|
2849 |
+
if(isset($custom_fields['saswp_blogposting_reviewedby_type'])){
|
2850 |
+
$input1['reviewedBy']['@type'] = $custom_fields['saswp_blogposting_reviewedby_type'];
|
2851 |
+
}
|
2852 |
+
if(isset($custom_fields['saswp_blogposting_reviewedby_name'])){
|
2853 |
+
$input1['reviewedBy']['name'] = $custom_fields['saswp_blogposting_reviewedby_name'];
|
2854 |
+
}
|
2855 |
+
if(isset($custom_fields['saswp_blogposting_reviewedby_honorific_suffix'])){
|
2856 |
+
$input1['reviewedBy']['honorificSuffix'] = $custom_fields['saswp_blogposting_reviewedby_honorific_suffix'];
|
2857 |
+
}
|
2858 |
+
if(isset($custom_fields['saswp_blogposting_reviewedby_url'])){
|
2859 |
+
$input1['reviewedBy']['url'] = $custom_fields['saswp_blogposting_reviewedby_url'];
|
2860 |
+
}
|
2861 |
+
if(isset($custom_fields['saswp_blogposting_reviewedby_description'])){
|
2862 |
+
$input1['reviewedBy']['description'] = $custom_fields['saswp_blogposting_reviewedby_description'];
|
2863 |
+
}
|
2864 |
+
if(isset($custom_fields['saswp_blogposting_knowsabout'])){
|
2865 |
+
$input1['knowsAbout'] = explode(',', $custom_fields['saswp_blogposting_knowsabout']);
|
2866 |
+
}
|
2867 |
+
if(isset($custom_fields['saswp_blogposting_alumniof'])){
|
2868 |
+
$str = $custom_fields['saswp_blogposting_alumniof'];
|
2869 |
+
$itemlist = explode(",", $str);
|
2870 |
+
foreach ($itemlist as $key => $list){
|
2871 |
+
$vnewarr['@type'] = 'Organization';
|
2872 |
+
$vnewarr['Name'] = $list;
|
2873 |
+
$input1['alumniOf'][] = $vnewarr;
|
2874 |
+
}
|
2875 |
+
}
|
2876 |
+
}
|
2877 |
+
|
2878 |
+
if(!empty($custom_fields['saswp_blogposting_about']) && isset($custom_fields['saswp_blogposting_about'])){
|
2879 |
+
$input1['about']['@type'] = 'Event';
|
2880 |
+
$input1['about']['name'] = explode(',', $custom_fields['saswp_blogposting_about']);
|
2881 |
+
}
|
2882 |
+
|
2883 |
if(isset($custom_fields['saswp_blogposting_organization_logo']) && isset($custom_fields['saswp_blogposting_organization_name'])){
|
2884 |
$input1['publisher']['@type'] = 'Organization';
|
2885 |
$input1['publisher']['name'] = $custom_fields['saswp_blogposting_organization_name'];
|
3058 |
$input1['mainEntity']['@id'] = $custom_fields['saswp_newsarticle_main_entity_id'];
|
3059 |
}
|
3060 |
|
3061 |
+
if(!empty($custom_fields['saswp_newsarticle_editor_type'])){
|
3062 |
+
if(!empty($custom_fields['saswp_newsarticle_editor_name']) && $custom_fields['saswp_newsarticle_editor_name'] != '') {
|
3063 |
+
$input1['editor'] = array();
|
3064 |
+
$input1['editor']['@type'] = 'Person';
|
3065 |
+
$input1['editor']['name'] = $custom_fields['saswp_newsarticle_editor_name'];
|
3066 |
+
}
|
3067 |
+
if(!empty($custom_fields['saswp_newsarticle_editor_type'])){
|
3068 |
+
$input1['editor']['@type'] = $custom_fields['saswp_newsarticle_editor_type'];
|
3069 |
+
}
|
3070 |
+
if(!empty($custom_fields['saswp_newsarticle_editor_honorific_suffix']) && $custom_fields['saswp_newsarticle_editor_honorific_suffix'] != '') {
|
3071 |
+
$input1['editor']['honorificSuffix'] = $custom_fields['saswp_newsarticle_editor_honorific_suffix'];
|
3072 |
+
}
|
3073 |
+
if(!empty($custom_fields['saswp_newsarticle_editor_description'])){
|
3074 |
+
$input1['editor']['description'] = $custom_fields['saswp_newsarticle_editor_description'];
|
3075 |
+
}
|
3076 |
+
if(!empty($custom_fields['saswp_newsarticle_editor_url'])){
|
3077 |
+
$input1['editor']['url'] = $custom_fields['saswp_newsarticle_editor_url'];
|
3078 |
+
}
|
3079 |
+
if(!empty($custom_fields['saswp_newsarticle_editor_image'])){
|
3080 |
+
$input1['editor']['Image']['url'] = $custom_fields['saswp_newsarticle_editor_image'];
|
3081 |
+
}
|
3082 |
}
|
3083 |
|
3084 |
if(isset($custom_fields['saswp_newsarticle_author_type'])){
|
3099 |
if(isset($custom_fields['saswp_newsarticle_author_image'])){
|
3100 |
$input1['author']['Image']['url'] = $custom_fields['saswp_newsarticle_author_image'];
|
3101 |
}
|
3102 |
+
if(!empty($custom_fields['saswp_newsarticle_about']) && isset($custom_fields['saswp_newsarticle_about'])){
|
3103 |
+
$input1['about']['@type'] = 'Event';
|
3104 |
+
$input1['about']['name'] = explode(',', $custom_fields['saswp_newsarticle_about']);
|
3105 |
+
}
|
3106 |
if(isset($custom_fields['saswp_newsarticle_organization_logo']) && isset($custom_fields['saswp_newsarticle_organization_name'])){
|
3107 |
$input1['publisher']['@type'] = 'Organization';
|
3108 |
$input1['publisher']['name'] = $custom_fields['saswp_newsarticle_organization_name'];
|
3431 |
if(isset($custom_fields['saswp_tech_article_date_modified'])){
|
3432 |
$input1['dateModified'] = $custom_fields['saswp_tech_article_date_modified'];
|
3433 |
}
|
3434 |
+
|
3435 |
+
if(!empty($custom_fields['saswp_tech_article_author_global_mapping'])){
|
3436 |
+
|
3437 |
+
if(!empty($custom_fields['saswp_tech_article_author_global_mapping'])){
|
3438 |
+
$input1['author']['@type'] = "Person";
|
3439 |
+
}
|
3440 |
+
|
3441 |
+
if(!empty($custom_fields['saswp_tech_article_author_global_mapping']['name'])){
|
3442 |
+
$input1['author']['name'] = $custom_fields['saswp_tech_article_author_global_mapping']['name'];
|
3443 |
+
}
|
3444 |
+
|
3445 |
+
if(!empty($custom_fields['saswp_tech_article_author_global_mapping']['url'])){
|
3446 |
+
$input1['author']['url'] = $custom_fields['saswp_tech_article_author_global_mapping']['url'];
|
3447 |
+
}
|
3448 |
+
|
3449 |
+
if(!empty($custom_fields['saswp_tech_article_author_global_mapping']['description'])){
|
3450 |
+
$input1['author']['description'] = $custom_fields['saswp_tech_article_author_global_mapping']['description'];
|
3451 |
+
}
|
3452 |
+
|
3453 |
+
if(!empty($custom_fields['saswp_tech_article_author_global_mapping']['honorificsuffix'][0])){
|
3454 |
+
$input1['author']['honorificsuffix'] = $custom_fields['saswp_tech_article_author_global_mapping']['honorificsuffix'][0];
|
3455 |
+
}
|
3456 |
+
|
3457 |
+
if(!empty($custom_fields['saswp_tech_article_author_global_mapping']['knowsabout'][0])){
|
3458 |
+
$input1['author']['knowsabout'] = explode(',', $custom_fields['saswp_tech_article_author_global_mapping']['knowsabout'][0]);
|
3459 |
+
}
|
3460 |
+
|
3461 |
+
|
3462 |
+
if(!empty($custom_fields['saswp_tech_article_author_global_mapping']['short_intro'][0])){
|
3463 |
+
$input1['author']['short_intro'] = $custom_fields['saswp_tech_article_author_global_mapping']['short_intro'][0];
|
3464 |
+
}
|
3465 |
+
|
3466 |
+
if(!empty($custom_fields['saswp_tech_article_author_global_mapping']['team_subtitle'][0])){
|
3467 |
+
$input1['author']['subtitle'] = $custom_fields['saswp_tech_article_author_global_mapping']['team_subtitle'][0];
|
3468 |
+
}
|
3469 |
+
|
3470 |
+
if(!empty($custom_fields['saswp_tech_article_author_global_mapping']['team_subtitle_2'][0])){
|
3471 |
+
$input1['author']['subtitle_2'] = $custom_fields['saswp_tech_article_author_global_mapping']['team_subtitle_2'][0];
|
3472 |
+
}
|
3473 |
+
|
3474 |
+
if(!empty($custom_fields['saswp_tech_article_author_global_mapping']['team_contact'][0])){
|
3475 |
+
$input1['author']['contact'] = $custom_fields['saswp_tech_article_author_global_mapping']['team_contact'][0];
|
3476 |
+
}
|
3477 |
+
|
3478 |
+
if(!empty($custom_fields['saswp_tech_article_author_global_mapping']['team_phone'][0])){
|
3479 |
+
$input1['author']['team_phone'] = $custom_fields['saswp_tech_article_author_global_mapping']['team_phone'][0];
|
3480 |
+
}
|
3481 |
+
|
3482 |
+
$sameas = array();
|
3483 |
+
if(!empty($custom_fields['saswp_tech_article_author_global_mapping']['team_facebook'][0])){
|
3484 |
+
$sameas[] = $custom_fields['saswp_tech_article_author_global_mapping']['team_facebook'][0];
|
3485 |
+
}
|
3486 |
+
|
3487 |
+
if(!empty($custom_fields['saswp_tech_article_author_global_mapping']['team_twitter'][0])){
|
3488 |
+
$sameas[] = $custom_fields['saswp_tech_article_author_global_mapping']['team_twitter'][0];
|
3489 |
+
}
|
3490 |
+
|
3491 |
+
if(!empty($custom_fields['saswp_tech_article_author_global_mapping']['team_linkedin'][0])){
|
3492 |
+
$sameas[] = $custom_fields['saswp_tech_article_author_global_mapping']['team_linkedin'][0];
|
3493 |
+
}
|
3494 |
+
|
3495 |
+
if(!empty($custom_fields['saswp_tech_article_author_global_mapping']['team_instagram'][0])){
|
3496 |
+
$sameas[] = $custom_fields['saswp_tech_article_author_global_mapping']['team_instagram'][0];
|
3497 |
+
}
|
3498 |
+
|
3499 |
+
if(!empty($custom_fields['saswp_tech_article_author_global_mapping']['team_youtube'][0])){
|
3500 |
+
$sameas[] = $custom_fields['saswp_tech_article_author_global_mapping']['team_youtube'][0];
|
3501 |
+
}
|
3502 |
+
if($sameas){
|
3503 |
+
$input1['author']['sameAs'] = $sameas;
|
3504 |
+
}
|
3505 |
+
|
3506 |
+
|
3507 |
+
if(!empty($custom_fields['saswp_tech_article_author_global_mapping']['college_logo'][0])){
|
3508 |
+
$input1['author']['college_logo'] = wp_get_attachment_image_url($custom_fields['saswp_tech_article_author_global_mapping']['college_logo'][0]);
|
3509 |
+
}
|
3510 |
+
|
3511 |
+
if(!empty($custom_fields['saswp_tech_article_author_global_mapping']['reviewer_bio'][0])){
|
3512 |
+
$input1['author']['reviewer_bio'] = $custom_fields['saswp_tech_article_author_global_mapping']['reviewer_bio'][0];
|
3513 |
+
}
|
3514 |
+
|
3515 |
+
if(!empty($custom_fields['saswp_tech_article_author_global_mapping']['alumniof'][0])){
|
3516 |
+
$str = $custom_fields['saswp_tech_article_author_global_mapping']['alumniof'][0];
|
3517 |
+
$itemlist = explode(",", $str);
|
3518 |
+
foreach ($itemlist as $key => $list){
|
3519 |
+
$vnewarr['@type'] = 'Organization';
|
3520 |
+
$vnewarr['Name'] = $list;
|
3521 |
+
$input1['author']['alumniOf'][] = $vnewarr;
|
3522 |
+
}
|
3523 |
+
}
|
3524 |
+
|
3525 |
+
}else{
|
3526 |
+
|
3527 |
+
if(isset($custom_fields['saswp_tech_article_author_type'])){
|
3528 |
+
$input1['author']['@type'] = $custom_fields['saswp_tech_article_author_type'];
|
3529 |
+
}
|
3530 |
+
if(isset($custom_fields['saswp_tech_article_author_name'])){
|
3531 |
+
$input1['author']['name'] = $custom_fields['saswp_tech_article_author_name'];
|
3532 |
+
}
|
3533 |
+
if(isset($custom_fields['saswp_tech_article_author_honorific_suffix'])){
|
3534 |
+
$input1['author']['honorificSuffix'] = $custom_fields['saswp_tech_article_author_honorific_suffix'];
|
3535 |
+
}
|
3536 |
+
if(isset($custom_fields['saswp_tech_article_author_url'])){
|
3537 |
+
$input1['author']['url'] = saswp_validate_url($custom_fields['saswp_tech_article_author_url']);
|
3538 |
+
}
|
3539 |
+
if(isset($custom_fields['saswp_tech_article_author_description'])){
|
3540 |
+
$input1['author']['description'] = $custom_fields['saswp_tech_article_author_description'];
|
3541 |
+
}
|
3542 |
+
if(isset($custom_fields['saswp_tech_article_author_jobtitle'])){
|
3543 |
+
$input1['author']['JobTitle'] = $custom_fields['saswp_tech_article_author_jobtitle'];
|
3544 |
+
}
|
3545 |
+
if(isset($custom_fields['saswp_tech_article_author_image'])){
|
3546 |
+
$input1['author']['Image']['url'] = $custom_fields['saswp_tech_article_author_image'];
|
3547 |
+
}
|
3548 |
}
|
3549 |
|
3550 |
if(isset($custom_fields['saswp_tech_article_editor_name']) && $custom_fields['saswp_tech_article_editor_name'] != '') {
|
3561 |
if(isset($custom_fields['saswp_tech_article_editor_url'])){
|
3562 |
$input1['editor']['url'] = saswp_validate_url($custom_fields['saswp_tech_article_editor_url']);
|
3563 |
}
|
3564 |
+
|
3565 |
if(isset($custom_fields['saswp_tech_article_editor_description'])){
|
3566 |
$input1['editor']['description'] = $custom_fields['saswp_tech_article_editor_description'];
|
3567 |
}
|
3568 |
if(isset($custom_fields['saswp_tech_article_editor_image'])){
|
3569 |
$input1['editor']['Image']['url'] = $custom_fields['saswp_tech_article_editor_image'];
|
3570 |
}
|
3571 |
+
|
|
|
|
|
|
|
3572 |
if(isset($custom_fields['saswp_tech_article_organization_logo']) && isset($custom_fields['saswp_tech_article_organization_name'])){
|
3573 |
$input1['publisher']['@type'] = 'Organization';
|
3574 |
$input1['publisher']['name'] = $custom_fields['saswp_tech_article_organization_name'];
|
3575 |
$input1['publisher']['logo'] = $custom_fields['saswp_tech_article_organization_logo'];
|
3576 |
}
|
3577 |
+
|
3578 |
+
if(!empty($custom_fields['saswp_tech_article_about']) && isset($custom_fields['saswp_tech_article_about'])){
|
3579 |
+
$input1['about']['@type'] = 'Event';
|
3580 |
+
$input1['about']['name'] = explode(',', $custom_fields['saswp_tech_article_about']);
|
3581 |
+
}
|
3582 |
+
|
3583 |
+
if(!empty($custom_fields['saswp_tech_article_reviewedby_global_mapping'])){
|
3584 |
+
|
3585 |
+
if(!empty($custom_fields['saswp_tech_article_reviewedby_global_mapping'])){
|
3586 |
+
$input1['reviewedBy']['@type'] = "Person";
|
3587 |
+
}
|
3588 |
+
|
3589 |
+
if(!empty($custom_fields['saswp_tech_article_reviewedby_global_mapping']['name'])){
|
3590 |
+
$input1['reviewedBy']['name'] = $custom_fields['saswp_tech_article_reviewedby_global_mapping']['name'];
|
3591 |
+
}
|
3592 |
+
|
3593 |
+
if(!empty($custom_fields['saswp_tech_article_reviewedby_global_mapping']['url'])){
|
3594 |
+
$input1['reviewedBy']['url'] = $custom_fields['saswp_tech_article_reviewedby_global_mapping']['url'];
|
3595 |
+
}
|
3596 |
+
|
3597 |
+
if(!empty($custom_fields['saswp_tech_article_reviewedby_global_mapping']['description'])){
|
3598 |
+
$input1['reviewedBy']['description'] = $custom_fields['saswp_tech_article_reviewedby_global_mapping']['description'];
|
3599 |
+
}
|
3600 |
+
|
3601 |
+
if(!empty($custom_fields['saswp_tech_article_reviewedby_global_mapping']['honorificsuffix'][0])){
|
3602 |
+
$input1['reviewedBy']['honorificsuffix'] = $custom_fields['saswp_tech_article_reviewedby_global_mapping']['honorificsuffix'][0];
|
3603 |
+
}
|
3604 |
+
|
3605 |
+
if(!empty($custom_fields['saswp_tech_article_reviewedby_global_mapping']['knowsabout'][0])){
|
3606 |
+
$input1['reviewedBy']['knowsabout'] = explode(',', $custom_fields['saswp_tech_article_reviewedby_global_mapping']['knowsabout'][0]);
|
3607 |
+
}
|
3608 |
+
|
3609 |
+
|
3610 |
+
if(!empty($custom_fields['saswp_tech_article_reviewedby_global_mapping']['short_intro'][0])){
|
3611 |
+
$input1['reviewedBy']['short_intro'] = $custom_fields['saswp_tech_article_reviewedby_global_mapping']['short_intro'][0];
|
3612 |
+
}
|
3613 |
+
|
3614 |
+
if(!empty($custom_fields['saswp_tech_article_reviewedby_global_mapping']['team_subtitle'][0])){
|
3615 |
+
$input1['reviewedBy']['subtitle'] = $custom_fields['saswp_tech_article_reviewedby_global_mapping']['team_subtitle'][0];
|
3616 |
+
}
|
3617 |
+
|
3618 |
+
if(!empty($custom_fields['saswp_tech_article_reviewedby_global_mapping']['team_subtitle_2'][0])){
|
3619 |
+
$input1['reviewedBy']['subtitle_2'] = $custom_fields['saswp_tech_article_reviewedby_global_mapping']['team_subtitle_2'][0];
|
3620 |
+
}
|
3621 |
+
|
3622 |
+
if(!empty($custom_fields['saswp_tech_article_reviewedby_global_mapping']['team_contact'][0])){
|
3623 |
+
$input1['reviewedBy']['contact'] = $custom_fields['saswp_tech_article_reviewedby_global_mapping']['team_contact'][0];
|
3624 |
+
}
|
3625 |
+
|
3626 |
+
if(!empty($custom_fields['saswp_tech_article_reviewedby_global_mapping']['team_phone'][0])){
|
3627 |
+
$input1['reviewedBy']['team_phone'] = $custom_fields['saswp_tech_article_reviewedby_global_mapping']['team_phone'][0];
|
3628 |
+
}
|
3629 |
+
|
3630 |
+
$sameas = array();
|
3631 |
+
if(!empty($custom_fields['saswp_tech_article_reviewedby_global_mapping']['team_facebook'][0])){
|
3632 |
+
$sameas[] = $custom_fields['saswp_tech_article_reviewedby_global_mapping']['team_facebook'][0];
|
3633 |
+
}
|
3634 |
+
|
3635 |
+
if(!empty($custom_fields['saswp_tech_article_reviewedby_global_mapping']['team_twitter'][0])){
|
3636 |
+
$sameas[] = $custom_fields['saswp_tech_article_reviewedby_global_mapping']['team_twitter'][0];
|
3637 |
+
}
|
3638 |
+
|
3639 |
+
if(!empty($custom_fields['saswp_tech_article_reviewedby_global_mapping']['team_linkedin'][0])){
|
3640 |
+
$sameas[] = $custom_fields['saswp_tech_article_reviewedby_global_mapping']['team_linkedin'][0];
|
3641 |
+
}
|
3642 |
+
|
3643 |
+
if(!empty($custom_fields['saswp_tech_article_reviewedby_global_mapping']['team_instagram'][0])){
|
3644 |
+
$sameas[] = $custom_fields['saswp_tech_article_reviewedby_global_mapping']['team_instagram'][0];
|
3645 |
+
}
|
3646 |
+
|
3647 |
+
if(!empty($custom_fields['saswp_tech_article_reviewedby_global_mapping']['team_youtube'][0])){
|
3648 |
+
$sameas[] = $custom_fields['saswp_tech_article_reviewedby_global_mapping']['team_youtube'][0];
|
3649 |
+
}
|
3650 |
+
if($sameas){
|
3651 |
+
$input1['reviewedBy']['sameAs'] = $sameas;
|
3652 |
+
}
|
3653 |
+
|
3654 |
+
if(!empty($custom_fields['saswp_tech_article_reviewedby_global_mapping']['college_logo'][0])){
|
3655 |
+
$input1['reviewedBy']['college_logo'] = wp_get_attachment_image_url($custom_fields['saswp_tech_article_reviewedby_global_mapping']['college_logo'][0]);
|
3656 |
+
}
|
3657 |
+
|
3658 |
+
if(!empty($custom_fields['saswp_tech_article_reviewedby_global_mapping']['reviewer_bio'][0])){
|
3659 |
+
$input1['reviewedBy']['reviewer_bio'] = $custom_fields['saswp_tech_article_reviewedby_global_mapping']['reviewer_bio'][0];
|
3660 |
+
}
|
3661 |
+
|
3662 |
+
if(!empty($custom_fields['saswp_tech_article_reviewedby_global_mapping']['alumniof'][0])){
|
3663 |
+
$str = $custom_fields['saswp_tech_article_reviewedby_global_mapping']['alumniof'][0];
|
3664 |
+
$itemlist = explode(",", $str);
|
3665 |
+
foreach ($itemlist as $key => $list){
|
3666 |
+
$vnewarr['@type'] = 'Organization';
|
3667 |
+
$vnewarr['Name'] = $list;
|
3668 |
+
$input1['reviewedBy']['alumniOf'][] = $vnewarr;
|
3669 |
+
}
|
3670 |
+
}
|
3671 |
+
|
3672 |
+
}else{
|
3673 |
+
|
3674 |
+
if(isset($custom_fields['saswp_tech_article_knowsabout'])){
|
3675 |
+
$input1['knowsAbout'] = explode(',', $custom_fields['saswp_tech_article_knowsabout']);
|
3676 |
+
}
|
3677 |
+
if(isset($custom_fields['saswp_tech_article_reviewedby_type'])){
|
3678 |
+
$input1['reviewedBy']['@type'] = $custom_fields['saswp_tech_article_reviewedby_type'];
|
3679 |
+
}
|
3680 |
+
if(isset($custom_fields['saswp_tech_article_reviewedby_name'])){
|
3681 |
+
$input1['reviewedBy']['name'] = $custom_fields['saswp_tech_article_reviewedby_name'];
|
3682 |
+
}
|
3683 |
+
if(isset($custom_fields['saswp_tech_article_reviewedby_honorific_suffix'])){
|
3684 |
+
$input1['reviewedBy']['honorificSuffix'] = $custom_fields['saswp_tech_article_reviewedby_honorific_suffix'];
|
3685 |
+
}
|
3686 |
+
if(isset($custom_fields['saswp_tech_article_reviewedby_url'])){
|
3687 |
+
$input1['reviewedBy']['url'] = saswp_validate_url($custom_fields['saswp_tech_article_reviewedby_url']);
|
3688 |
+
}
|
3689 |
+
if(isset($custom_fields['saswp_tech_article_reviewedby_description'])){
|
3690 |
+
$input1['reviewedBy']['description'] = $custom_fields['saswp_tech_article_reviewedby_description'];
|
3691 |
+
}
|
3692 |
+
if(isset($custom_fields['saswp_tech_article_alumniof'])){
|
3693 |
+
$str = $custom_fields['saswp_tech_article_alumniof'];
|
3694 |
+
$itemlist = explode(",", $str);
|
3695 |
+
foreach ($itemlist as $key => $list){
|
3696 |
+
$vnewarr['@type'] = 'Organization';
|
3697 |
+
$vnewarr['Name'] = $list;
|
3698 |
+
$input1['alumniOf'][] = $vnewarr;
|
3699 |
+
}
|
3700 |
}
|
3701 |
}
|
3702 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3703 |
break;
|
3704 |
|
3705 |
case 'Course':
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
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: 6.
|
6 |
Requires PHP: 5.6.20
|
7 |
-
Stable tag: 1.9.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -121,6 +121,16 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
|
|
121 |
|
122 |
== Changelog ==
|
123 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
= 1.9.103 (21 Oct 2022) =
|
125 |
|
126 |
* Added: Add the JobTitle field in author schema. #1685
|
2 |
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: 6.1
|
6 |
Requires PHP: 5.6.20
|
7 |
+
Stable tag: 1.9.104
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
121 |
|
122 |
== Changelog ==
|
123 |
|
124 |
+
= 1.9.104 (11 Nov 2022) =
|
125 |
+
|
126 |
+
* Added: Need to create an About option in the Artical Schema.. #1761
|
127 |
+
* Fixed: Deprecated Warning in PHP Version 8.0.13 #1763
|
128 |
+
* Fixed: PHP Notice: Undefined index #1765
|
129 |
+
* Fixed: The option "Business Type" under local business schema type is not visible anymore. #1766
|
130 |
+
* Added: Divi builder with schema in duplicate content url ( video url ) and url is not valid #1770
|
131 |
+
* Added: Nested custom field mapping does not work need to improve it. #1777
|
132 |
+
* Fixed: Need to fix the warning in error log #1773
|
133 |
+
|
134 |
= 1.9.103 (21 Oct 2022) =
|
135 |
|
136 |
* Added: Add the JobTitle field in author schema. #1685
|
structured-data-for-wp.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Schema & Structured Data for WP & AMP
|
4 |
Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
|
5 |
-
Version: 1.9.
|
6 |
Text Domain: schema-and-structured-data-for-wp
|
7 |
Domain Path: /languages
|
8 |
Author: Magazine3
|
@@ -13,7 +13,7 @@ License: GPL2
|
|
13 |
// Exit if accessed directly.
|
14 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
15 |
|
16 |
-
define('SASWP_VERSION', '1.9.
|
17 |
define('SASWP_DIR_NAME_FILE', __FILE__ );
|
18 |
define('SASWP_DIR_NAME', dirname( __FILE__ ));
|
19 |
define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
|
2 |
/*
|
3 |
Plugin Name: Schema & Structured Data for WP & AMP
|
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.104
|
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.104');
|
17 |
define('SASWP_DIR_NAME_FILE', __FILE__ );
|
18 |
define('SASWP_DIR_NAME', dirname( __FILE__ ));
|
19 |
define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
|
view/common.php
CHANGED
@@ -364,12 +364,12 @@ class saswp_view_common_class {
|
|
364 |
$attributes = '';
|
365 |
$label = '';
|
366 |
$meta_value = array();
|
367 |
-
|
368 |
if($meta_field['type'] != 'repeater'){
|
369 |
$label = '<label for="' . esc_attr($meta_field['id']) . '">' . saswp_t_string( $meta_field['label'] ). '</label>';
|
370 |
-
|
371 |
}
|
372 |
-
|
373 |
if ( empty( $meta_value ) && isset($meta_field['default'])) {
|
374 |
|
375 |
$meta_value = $meta_field['default'];
|
@@ -639,7 +639,9 @@ class saswp_view_common_class {
|
|
639 |
$output .= '<tr class="saswp-review-tr"><th>'.$label.'</th><td>'.$input.'</td></tr>';
|
640 |
|
641 |
}else if($meta_field['id'] != 'product_pros_'.$schema_id){
|
642 |
-
$
|
|
|
|
|
643 |
}else{
|
644 |
$output .= '<tr><th>'.$label.'</th><td>'.$input.'</td></tr>';
|
645 |
}
|
364 |
$attributes = '';
|
365 |
$label = '';
|
366 |
$meta_value = array();
|
367 |
+
if($meta_field['type'] != 'global_mapping'){
|
368 |
if($meta_field['type'] != 'repeater'){
|
369 |
$label = '<label for="' . esc_attr($meta_field['id']) . '">' . saswp_t_string( $meta_field['label'] ). '</label>';
|
370 |
+
$meta_value = saswp_get_post_meta( $post_id, $meta_field['id'], true );
|
371 |
}
|
372 |
+
}
|
373 |
if ( empty( $meta_value ) && isset($meta_field['default'])) {
|
374 |
|
375 |
$meta_value = $meta_field['default'];
|
639 |
$output .= '<tr class="saswp-review-tr"><th>'.$label.'</th><td>'.$input.'</td></tr>';
|
640 |
|
641 |
}else if($meta_field['id'] != 'product_pros_'.$schema_id){
|
642 |
+
if($meta_field['type'] != 'global_mapping'){
|
643 |
+
$output .= '<tr class="saswp-product-pros"><th>'.$label.'</th><td>'.$input.'</td></tr>';
|
644 |
+
}
|
645 |
}else{
|
646 |
$output .= '<tr><th>'.$label.'</th><td>'.$input.'</td></tr>';
|
647 |
}
|
view/schema_type.php
CHANGED
@@ -153,6 +153,7 @@ function saswp_schema_type_meta_box_callback( $post) {
|
|
153 |
$append_reviews = '';
|
154 |
$event_type = '';
|
155 |
$post_id = null;
|
|
|
156 |
|
157 |
if($post){
|
158 |
|
153 |
$append_reviews = '';
|
154 |
$event_type = '';
|
155 |
$post_id = null;
|
156 |
+
$style_faq_type = '';
|
157 |
|
158 |
if($post){
|
159 |
|