Version Description
(23 Oct 2019) =
- Fixed: Multiple Instances of Schema Type (i.e. LocalBusiness) Merging Improperly on Same Page #537
- Fixed: Price not showing in product schema for variable product #530
- Fixed: Published and modified date needs to correct with proper timezone #562
- Fixed: ImageObject Error when using the enfold theme. #558
- Enhancement: Added default author value in review array for anonymous user #557
- Enhancement: Added two section in compatiblity tab (Active & InActive) #560
- Added: Recipe Schema Box in Premium Features tab #561
Download this release
Release Info
Developer | magazine3 |
Plugin | Schema & Structured Data for WP & AMP |
Version | 1.9.15 |
Comparing to | |
See all releases |
Code changes from version 1.9.14 to 1.9.15
- admin_section/common-function.php +41 -160
- admin_section/images/recipe.png +0 -0
- admin_section/js/main-script.js +53 -0
- admin_section/js/main-script.min.js +1 -1
- admin_section/settings.php +258 -119
- admin_section/structure_admin.php +8 -5
- core/array-list/compatibility-list.php +222 -0
- core/array-list/plugins.php +0 -132
- core/array-list/pro_extensions.php +7 -2
- output/compatibility.php +15 -8
- output/function.php +38 -4
- output/output.php +25 -30
- output/output_post_specific.php +3 -3
- output/review-output.php +2 -2
- output/service.php +77 -34
- readme.txt +11 -1
- structured-data-for-wp.php +2 -2
- view/post_specific.php +7 -1
admin_section/common-function.php
CHANGED
@@ -1623,7 +1623,7 @@ if ( ! defined('ABSPATH') ) exit;
|
|
1623 |
$user_id = get_current_user_id();
|
1624 |
$username = '';
|
1625 |
|
1626 |
-
if($user_id>0){
|
1627 |
|
1628 |
$user_info = get_userdata($user_id);
|
1629 |
$username = $user_info->data->display_name;
|
@@ -1631,40 +1631,19 @@ if ( ! defined('ABSPATH') ) exit;
|
|
1631 |
}
|
1632 |
$defaults = array(
|
1633 |
|
1634 |
-
'saswp_kb_type'
|
1635 |
-
'sd_name'
|
1636 |
-
'sd_alt_name'
|
1637 |
-
'sd_url'
|
1638 |
-
'sd-person-name'
|
1639 |
-
'sd-person-url'
|
1640 |
-
'saswp_kb_contact_1'
|
1641 |
-
|
1642 |
'saswp-for-wordpress' => 1,
|
1643 |
'sd_initial_wizard_status' => 1,
|
1644 |
'saswp-microdata-cleanup' => 1
|
1645 |
|
1646 |
);
|
1647 |
-
|
1648 |
-
$plugin_name = array(
|
1649 |
-
'kk_star_rating' => 'saswp-kk-star-raring',
|
1650 |
-
'wp_post_rating' => 'saswp-wppostratings-raring',
|
1651 |
-
'bb_press' => 'saswp-bbpress',
|
1652 |
-
'woocommerce' => 'saswp-woocommerce',
|
1653 |
-
'cooked' => 'saswp-cooked',
|
1654 |
-
'the_events_calendar' => 'saswp-the-events-calendar',
|
1655 |
-
'yoast_seo' => 'saswp-yoast',
|
1656 |
-
'rank_math' => 'saswp-rankmath',
|
1657 |
-
'dw_qna' => 'saswp-dw-question-answer'
|
1658 |
-
);
|
1659 |
|
1660 |
-
foreach($plugin_name as $name => $s_key){
|
1661 |
-
|
1662 |
-
if(saswp_check_plugin_active_status($name)){
|
1663 |
-
$defaults[$s_key] = 1;
|
1664 |
-
}
|
1665 |
-
|
1666 |
-
}
|
1667 |
-
|
1668 |
if(is_array($logo)){
|
1669 |
|
1670 |
$defaults['sd_logo'] = array(
|
@@ -1676,43 +1655,25 @@ if ( ! defined('ABSPATH') ) exit;
|
|
1676 |
);
|
1677 |
|
1678 |
}
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
|
1689 |
-
|
1690 |
-
}
|
1691 |
-
|
1692 |
-
if(is_plugin_active('woocommerce/woocommerce.php') && is_plugin_active('woocommerce-memberships/woocommerce-memberships.php')){
|
1693 |
-
|
1694 |
-
$defaults['saswp-woocommerce-membership'] = 1;
|
1695 |
-
|
1696 |
-
}
|
1697 |
-
|
1698 |
-
if(get_template() == 'Extra'){
|
1699 |
-
|
1700 |
-
$defaults['saswp-extra'] = 1;
|
1701 |
-
|
1702 |
-
}
|
1703 |
-
if(is_plugin_active('flexmls-idx/flexmls_connect.php')){
|
1704 |
-
|
1705 |
-
$defaults['saswp-flexmlx-compativility'] = 1;
|
1706 |
-
|
1707 |
-
}
|
1708 |
|
1709 |
return $defaults;
|
1710 |
|
1711 |
}
|
1712 |
|
1713 |
function saswp_defaultSettings(){
|
|
|
|
|
1714 |
|
1715 |
-
global $sd_data;
|
1716 |
$sd_data = get_option( 'sd_data', saswp_default_settings_array());
|
1717 |
|
1718 |
return $sd_data;
|
@@ -2472,117 +2433,37 @@ if ( ! defined('ABSPATH') ) exit;
|
|
2472 |
return $array;
|
2473 |
}
|
2474 |
|
2475 |
-
function
|
2476 |
-
|
2477 |
-
$status = false;
|
2478 |
-
$free_status = false;
|
2479 |
-
$pro_status = false;
|
2480 |
-
|
2481 |
-
$pnamelist = array(
|
2482 |
-
'kk_star_rating' => array(
|
2483 |
-
'free' => 'kk-star-ratings/index.php',
|
2484 |
-
),
|
2485 |
-
'event_organiser' => array(
|
2486 |
-
'free' => 'event-organiser/event-organiser.php',
|
2487 |
-
),
|
2488 |
-
'modern_events_calendar' => array(
|
2489 |
-
'free' => 'modern-events-calendar-lite/modern-events-calendar-lite.php',
|
2490 |
-
),
|
2491 |
-
'events_manager' => array(
|
2492 |
-
'free' => 'events-manager/events-manager.php',
|
2493 |
-
),
|
2494 |
-
'event_calendar_wd' => array(
|
2495 |
-
'free' => 'event-calendar-wd/ecwd.php',
|
2496 |
-
),
|
2497 |
-
'wp_event_manager' => array(
|
2498 |
-
'free' => 'wp-event-manager/wp-event-manager.php',
|
2499 |
-
),
|
2500 |
-
'wp_post_rating' => array(
|
2501 |
-
'free' => 'wp-postratings/wp-postratings.php',
|
2502 |
-
),
|
2503 |
-
'bb_press' => array(
|
2504 |
-
'free' => 'bbpress/bbpress.php'
|
2505 |
-
),
|
2506 |
-
'woocommerce' => array(
|
2507 |
-
'free' => 'woocommerce/woocommerce.php'
|
2508 |
-
),
|
2509 |
-
'the_events_calendar' => array(
|
2510 |
-
'free' => 'the-events-calendar/the-events-calendar.php',
|
2511 |
-
),
|
2512 |
-
'yoast_seo' => array(
|
2513 |
-
'free' => 'wordpress-seo/wp-seo.php',
|
2514 |
-
'pro' => 'wordpress-seo-premium/wp-seo-premium.php',
|
2515 |
-
),
|
2516 |
-
'rank_math' => array(
|
2517 |
-
'free' => 'seo-by-rank-math/rank-math.php',
|
2518 |
-
'pro' => 'seo-by-rank-math-premium/rank-math-premium.php',
|
2519 |
-
),
|
2520 |
-
'cooked' => array(
|
2521 |
-
'free' => 'cooked/cooked.php',
|
2522 |
-
'pro' => 'cooked-pro/cooked-pro.php',
|
2523 |
-
),
|
2524 |
-
'dw_qna' => array(
|
2525 |
-
'free' => 'dw-question-answer/dw-question-answer.php',
|
2526 |
-
'pro' => 'dw-question-answer-pro/dw-question-answer.php',
|
2527 |
-
),
|
2528 |
-
'smart_crawl' => array(
|
2529 |
-
'free' => 'smartcrawl-seo/wpmu-dev-seo.php',
|
2530 |
-
),
|
2531 |
-
'the_seo_framework' => array(
|
2532 |
-
'free' => 'autodescription/autodescription.php',
|
2533 |
-
),
|
2534 |
-
'seo_press' => array(
|
2535 |
-
'free' => 'wp-seopress/seopress.php',
|
2536 |
-
),
|
2537 |
-
'aiosp' => array(
|
2538 |
-
'free' => 'all-in-one-seo-pack/all_in_one_seo_pack.php',
|
2539 |
-
),
|
2540 |
-
'squirrly_seo' => array(
|
2541 |
-
'free' => 'squirrly-seo/squirrly.php',
|
2542 |
-
),
|
2543 |
-
'wpsso_core' => array(
|
2544 |
-
'free' => 'wpsso/wpsso.php',
|
2545 |
-
),
|
2546 |
-
'wp_recipe_maker' => array(
|
2547 |
-
'free' => 'wp-recipe-maker/wp-recipe-maker.php',
|
2548 |
-
),
|
2549 |
-
'learn_press' => array(
|
2550 |
-
'free' => 'learnpress/learnpress.php',
|
2551 |
-
),
|
2552 |
-
'lifter_lms' => array(
|
2553 |
-
'free' => 'lifterlms/lifterlms.php',
|
2554 |
-
),
|
2555 |
-
'learn_dash' => array(
|
2556 |
-
'free' => 'learndash/learndash.php',
|
2557 |
-
),
|
2558 |
-
);
|
2559 |
-
|
2560 |
-
if(array_key_exists('free', $pnamelist[$pname])){
|
2561 |
|
2562 |
-
|
2563 |
-
|
2564 |
-
$free_status = true;
|
2565 |
-
|
2566 |
-
}
|
2567 |
|
|
|
|
|
|
|
|
|
2568 |
}
|
2569 |
|
2570 |
-
|
2571 |
|
2572 |
-
if(is_plugin_active($
|
2573 |
|
2574 |
-
|
2575 |
|
2576 |
-
|
2577 |
|
2578 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2579 |
|
2580 |
-
if($free_status || $pro_status){
|
2581 |
-
$status = true;
|
2582 |
}
|
2583 |
-
|
2584 |
-
|
2585 |
-
return $status;
|
2586 |
|
2587 |
}
|
2588 |
|
1623 |
$user_id = get_current_user_id();
|
1624 |
$username = '';
|
1625 |
|
1626 |
+
if($user_id > 0){
|
1627 |
|
1628 |
$user_info = get_userdata($user_id);
|
1629 |
$username = $user_info->data->display_name;
|
1631 |
}
|
1632 |
$defaults = array(
|
1633 |
|
1634 |
+
'saswp_kb_type' => 'Organization',
|
1635 |
+
'sd_name' => $sd_name,
|
1636 |
+
'sd_alt_name' => $sd_name,
|
1637 |
+
'sd_url' => $current_url,
|
1638 |
+
'sd-person-name' => $username,
|
1639 |
+
'sd-person-url' => $current_url,
|
1640 |
+
'saswp_kb_contact_1' => 0,
|
|
|
1641 |
'saswp-for-wordpress' => 1,
|
1642 |
'sd_initial_wizard_status' => 1,
|
1643 |
'saswp-microdata-cleanup' => 1
|
1644 |
|
1645 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1646 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1647 |
if(is_array($logo)){
|
1648 |
|
1649 |
$defaults['sd_logo'] = array(
|
1655 |
);
|
1656 |
|
1657 |
}
|
1658 |
+
|
1659 |
+
$active_plugin = saswp_compatible_active_list();
|
1660 |
+
|
1661 |
+
if($active_plugin){
|
1662 |
+
|
1663 |
+
foreach ($active_plugin as $plugin){
|
1664 |
+
$defaults[$plugin] = 1;
|
1665 |
+
}
|
1666 |
+
|
1667 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1668 |
|
1669 |
return $defaults;
|
1670 |
|
1671 |
}
|
1672 |
|
1673 |
function saswp_defaultSettings(){
|
1674 |
+
|
1675 |
+
global $sd_data;
|
1676 |
|
|
|
1677 |
$sd_data = get_option( 'sd_data', saswp_default_settings_array());
|
1678 |
|
1679 |
return $sd_data;
|
2433 |
return $array;
|
2434 |
}
|
2435 |
|
2436 |
+
function saswp_compatible_active_list(){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2437 |
|
2438 |
+
$pnamelist = array();
|
2439 |
+
$active = array();
|
|
|
|
|
|
|
2440 |
|
2441 |
+
$mappings_file = SASWP_DIR_NAME . '/core/array-list/compatibility-list.php';
|
2442 |
+
|
2443 |
+
if ( file_exists( $mappings_file ) ) {
|
2444 |
+
$pnamelist = include $mappings_file;
|
2445 |
}
|
2446 |
|
2447 |
+
foreach ($pnamelist['plugins'] as $key => $plugin){
|
2448 |
|
2449 |
+
if(is_plugin_active($plugin['free']) || (array_key_exists('pro', $plugin) && is_plugin_active($plugin['pro']))){
|
2450 |
|
2451 |
+
$active[$key] = $plugin['opt_name'];
|
2452 |
|
2453 |
+
}
|
2454 |
|
2455 |
+
}
|
2456 |
+
foreach ($pnamelist['themes'] as $key => $plugin){
|
2457 |
+
|
2458 |
+
if(get_template() == $plugin['free']){
|
2459 |
+
|
2460 |
+
$active[$key] = $plugin['opt_name'];
|
2461 |
+
|
2462 |
+
}
|
2463 |
|
|
|
|
|
2464 |
}
|
2465 |
+
|
2466 |
+
return $active;
|
|
|
2467 |
|
2468 |
}
|
2469 |
|
admin_section/images/recipe.png
ADDED
Binary file
|
admin_section/js/main-script.js
CHANGED
@@ -734,6 +734,42 @@ jQuery(document).ready(function($){
|
|
734 |
}
|
735 |
break;
|
736 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
737 |
case 'saswp-wpsso-core-checkbox':
|
738 |
saswp_compatibliy_notes(current, id);
|
739 |
if ($(this).is(':checked')) {
|
@@ -1790,6 +1826,23 @@ jQuery(document).ready(function($){
|
|
1790 |
});
|
1791 |
|
1792 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1793 |
//Importer from schema plugin ends here
|
1794 |
|
1795 |
//custom fields modify schema starts here
|
734 |
}
|
735 |
break;
|
736 |
|
737 |
+
case 'saswp-wp-ultimate-recipe-checkbox':
|
738 |
+
saswp_compatibliy_notes(current, id);
|
739 |
+
if ($(this).is(':checked')) {
|
740 |
+
$("#saswp-wp-ultimate-recipe").val(1);
|
741 |
+
}else{
|
742 |
+
$("#saswp-wp-ultimate-recipe").val(0);
|
743 |
+
}
|
744 |
+
break;
|
745 |
+
|
746 |
+
case 'saswp-zip-recipes-checkbox':
|
747 |
+
saswp_compatibliy_notes(current, id);
|
748 |
+
if ($(this).is(':checked')) {
|
749 |
+
$("#saswp-zip-recipes").val(1);
|
750 |
+
}else{
|
751 |
+
$("#saswp-zip-recipes").val(0);
|
752 |
+
}
|
753 |
+
break;
|
754 |
+
|
755 |
+
case 'saswp-mediavine-create-checkbox':
|
756 |
+
saswp_compatibliy_notes(current, id);
|
757 |
+
if ($(this).is(':checked')) {
|
758 |
+
$("#saswp-mediavine-create").val(1);
|
759 |
+
}else{
|
760 |
+
$("#saswp-mediavine-create").val(0);
|
761 |
+
}
|
762 |
+
break;
|
763 |
+
|
764 |
+
case 'saswp-ht-recipes-checkbox':
|
765 |
+
saswp_compatibliy_notes(current, id);
|
766 |
+
if ($(this).is(':checked')) {
|
767 |
+
$("#saswp-ht-recipes").val(1);
|
768 |
+
}else{
|
769 |
+
$("#saswp-ht-recipes").val(0);
|
770 |
+
}
|
771 |
+
break;
|
772 |
+
|
773 |
case 'saswp-wpsso-core-checkbox':
|
774 |
saswp_compatibliy_notes(current, id);
|
775 |
if ($(this).is(':checked')) {
|
1826 |
});
|
1827 |
|
1828 |
|
1829 |
+
$('#saswp-compatibility-tabs a:first').addClass('saswp-global-selected');
|
1830 |
+
$('.saswp-compatibility-container').hide();
|
1831 |
+
$('.saswp-compatibility-container:first').show();
|
1832 |
+
|
1833 |
+
$('#saswp-compatibility-tabs a').click(function(){
|
1834 |
+
var t = $(this).attr('data-id');
|
1835 |
+
|
1836 |
+
if(!$(this).hasClass('saswp-global-selected')){
|
1837 |
+
$('#saswp-compatibility-tabs a').removeClass('saswp-global-selected');
|
1838 |
+
$(this).addClass('saswp-global-selected');
|
1839 |
+
|
1840 |
+
$('.saswp-compatibility-container').hide();
|
1841 |
+
$('#'+t).show();
|
1842 |
+
}
|
1843 |
+
});
|
1844 |
+
|
1845 |
+
|
1846 |
//Importer from schema plugin ends here
|
1847 |
|
1848 |
//custom fields modify schema starts here
|
admin_section/js/main-script.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var saswp_meta_list=[],saswp_meta_fields=[],saswp_meta_list_fields=[],saswp_taxonomy_term=[];function saswp_taxonomy_term_html(e,s){var a="";return a+="<td>",a+='<select name="saswp_taxonomy_term['+s+']">',jQuery.each(e,function(e,s){a+='<option value="'+e+'">'+s+"</option>"}),a+="</select>",a+="</td>",a+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>'}function saswp_enable_rating_review(){var e="";jQuery("select#schema_type option:selected").val()&&(e=jQuery("select#schema_type option:selected").val()),jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")&&(e=jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")),e&&jQuery(".saswp-enable-rating-review-"+e.toLowerCase()).change(function(){jQuery(this).is(":checked")?jQuery(this).parent().parent().siblings(".saswp-rating-review-"+e.toLowerCase()).show():jQuery(this).parent().parent().siblings(".saswp-rating-review-"+e.toLowerCase()).hide()}).change()}function getParameterByName(e,s){s||(s=window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var a=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(s);return a?a[2]?decodeURIComponent(a[2].replace(/\+/g," ")):"":null}function saswpCustomSelect2(){"saswp"!=saswp_localize_data.post_type&&"saswp"!=saswp_localize_data.page_now||"saswp_page_structured_data_options"==saswp_localize_data.page_now||jQuery(".saswp-custom-fields-select2").select2({ajax:{type:"POST",url:ajaxurl,dataType:"json",delay:250,data:function(e){return{saswp_security_nonce:saswp_localize_data.saswp_security_nonce,q:e.term,action:"saswp_get_custom_meta_fields"}},processResults:function(e){return{results:e}},cache:!0},minimumInputLength:2})}function saswp_reviews_datepicker(){jQuery(".saswp-reviews-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"})}function saswp_schema_datepicker(){jQuery(".saswp-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"})}function saswpAddTimepicker(){jQuery(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"})}function saswp_item_reviewed_call(){jQuery(".saswp-item-reviewed").change(function(e){e.preventDefault();var s="";if(jQuery("select#schema_type option:selected").val()&&(s=jQuery("select#schema_type option:selected").val()),jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")&&(s=jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")),"Review"===s){var a=jQuery(this),t=jQuery(this).val(),i=saswp_localize_data.post_id,n=jQuery(a).attr("data-id"),p=jQuery(a).attr("post-specific");jQuery.get(ajaxurl,{action:"saswp_get_item_reviewed_fields",schema_id:n,post_specific:p,item:t,post_id:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){jQuery(a).parent().parent().nextAll().remove(".saswp-review-tr"),jQuery(a).parent().parent().after(e)})}}).change()}function saswp_compatibliy_notes(e,s){var a=s.replace("-checkbox",""),t=jQuery("#"+a).next("p").text();e.is(":checked")&&""!==t?jQuery("#"+a).next("p").removeClass("saswp_hide"):1==jQuery("#"+a).next("p").attr("data-id")?jQuery("#"+a).next("p").text("This feature is only available in pro version"):jQuery("#"+a).next("p").addClass("saswp_hide")}function saswp_meta_list_html(e,s,a,t,i,n){var p=t;null==p&&(p=Object.keys(a)[0]);var o="";if(o+='<select class="saswp-custom-meta-list" name="saswp_meta_list_val['+p+']">',jQuery.each(s,function(e,s){o+='<optgroup label="'+s.label+'">',jQuery.each(s["meta-list"],function(e,s){o+='<option value="'+e+'">'+s+"</option>"}),o+="</optgroup>"}),o+="</select>",a){var c="<tr>";c+="<td>",c+='<select class="saswp-custom-fields-name">',jQuery.each(a,function(e,s){c+='<option value="'+e+'">'+s+"</option>"}),c+="</select>",c+="</td>",c+="<td>",c+=o,c+="</td>",c+='<td></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td>',c+="</tr>",jQuery(".saswp-custom-fields-table").append(c),null!=e&&e.removeClass("updating-message")}else jQuery(i).html(o),null!=e&&e.removeClass("updating-message")}function saswp_get_meta_list(e,s,a,t,i,n){saswp_meta_list[s]?saswp_meta_list_html(e,saswp_meta_list[s],a,i,t,n):jQuery.get(ajaxurl,{action:"saswp_get_meta_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(p){saswp_meta_list[s]=p[s],saswp_meta_list_html(e,saswp_meta_list[s],a,i,t,n)},"json")}function saswp_get_post_specific_schema_fields(e,s,a,t,i,n){if(saswp_meta_fields[n]){var p=saswp_fields_html_generator(s,i,n,t,saswp_meta_fields[n]);p&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(p),saswp_schema_datepicker(),e.removeClass("updating-message"))}else jQuery.get(ajaxurl,{action:"saswp_get_schema_dynamic_fields_ajax",meta_name:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){saswp_meta_fields[n]=a,console.log(saswp_meta_fields);var p=saswp_fields_html_generator(s,i,n,t,a);p&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(p),saswp_schema_datepicker(),e.removeClass("updating-message"))},"json")}function saswp_fields_html_generator(e,s,a,t,i){var n="";return n+='<div class="saswp-'+t+'-table-div saswp-dynamic-properties" data-id="'+e+'"><a class="saswp-table-close">X</a><table class="form-table saswp-'+t+'-table">',jQuery.each(i,function(t,i){var p="";switch("saswp_tvseries_season_published_date"!=i.name&&"saswp_feed_element_date_created"!=i.name&&"saswp_product_reviews_created_date"!=i.name||(p="saswp-datepicker-picker"),i.type){case"number":case"text":n+="<tr><th>"+i.label+'</th><td><input class="'+p+'" style="width:100%" type="'+i.type+'" id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']"></td></tr>';break;case"textarea":n+="<tr><th>"+i.label+'</th><td><textarea style="width: 100%" id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']" rows="5"></textarea></td></tr>';break;case"select":var o="";jQuery.each(i.options,function(e,s){o+='<option value="'+e+'">'+s+"</option>"}),n+="<tr><th>"+i.label+'</th><td><select id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']">'+o+"</select></td></tr>";break;case"media":n+="<tr><th>"+i.label+'</th><td><fieldset><input style="width:80%" type="text" id="'+i.name+"_"+e+"_"+s+'" name="'+i.name+"_"+e+"_"+s+'"><input type="hidden" data-id="'+i.name+"_"+e+"_"+s+'_id" name="'+a+s+"["+e+"]["+i.name+'_id]" id="'+i.name+"_"+e+"_"+s+'_id"><input data-id="media" style="width: 19%" class="button" id="'+i.name+"_"+e+"_"+s+'_button" name="'+i.name+"_"+e+"_"+s+'_button" type="button" value="Upload"><div class="saswp_image_div_'+i.name+"_"+e+"_"+s+'"></div></fieldset></td></tr>'}}),n+="</table></div>"}jQuery(document).ready(function(e){if(e(document).on("click",".saswp-add-g-location-btn",function(s){var a="";a=e("#saswp_google_place_api_key").length?'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="5" step="5" placeholder="5" disabled="disabled">':'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="10" step="10" placeholder="10">',s.preventDefault();var t="";(t+='<tr><td style="width:12%;"><strong>Place Id</strong></td><td style="width:20%;"><input class="saswp-g-location-field" name="sd_data[saswp_reviews_location_name][]" type="text" value=""></td><td style="width:10%;"><strong>Reviews</strong></td><td style="width:10%;">'+a+'</td><td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">Fetch</a></td><td style="width:10%;"><a type="button" class="saswp-remove-review-item button">x</a></td><td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td></tr>')&&e(".saswp-g-reviews-settings-table").append(t)}),e(document).on("click",".saswp-fetch-g-reviews",function(){var s=e(this),a="free";s.addClass("updating-message");var t=e(this).parent().parent().find(".saswp-g-location-field").val(),i=e(this).parent().parent().find(".saswp-g-blocks-field").val(),n=e("#saswp_google_place_api_key").val(),p=e("#reviews_addon_license_key").val(),o=e("#reviews_addon_license_key_status").val();if("premium"==(a=e("#saswp_google_place_api_key").length?"free":"premium")){if(!(i>0))return alert("Blocks value is zero"),s.removeClass("updating-message"),!1;if(0!=i%10)return s.parent().parent().find(".saswp-rv-fetched-msg").text("Reviews count should be in step of 10"),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),s.removeClass("updating-message"),!1}""!=t&&(p||n)?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:o,reviews_api:p,location:t,blocks:i,g_api:n,premium_status:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s.parent().parent().find(".saswp-rv-fetched-msg").text("Success"),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(s.parent().parent().find(".saswp-rv-fetched-msg").text(e.message),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),s.removeClass("updating-message")},error:function(e){console.log(e)}}):(""==t&&alert("Please enter place id"),""==n&&alert("Please enter api key"),""==p&&alert("Please enter reviews api key"),s.removeClass("updating-message"))}),saswp_localize_data.do_tour){var s,a="<h3>Thanks for using Structured Data!</h3>";a+="<p>Do you want the latest on <b>Structured Data update</b> before others and some best resources on monetization in a single email? - Free just for users of Structured Data!</p>",a+='<style type="text/css">',a+=".wp-pointer-buttons{ padding:0; overflow: hidden; }",a+=".wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none}\t#afw_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }",a+="</style>",a+='<div id="afw_mc_embed_signup">',a+='<form action="//app.mailerlite.com/webforms/submit/z7t4b8" data-id="258182" data-code="z7t4b8" method="POST" target="_blank">',a+='<div id="afw_mc_embed_signup_scroll">',a+='<div class="afw-mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">',a+='<input type="text" name="fields[name]" class="form-control" placeholder="Name" hidden value="'+saswp_localize_data.current_user_name+'" style="display:none">',a+='<input type="text" value="'+saswp_localize_data.current_user_email+'" name="fields[email]" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">',a+='<input type="text" name="fields[company]" class="form-control" placeholder="Website" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="'+saswp_localize_data.get_home_url+'">',a+='<input type="hidden" name="ml-submit" value="1" />',a+="</div>",a+='<div id="mce-responses">',a+='<div class="response" id="mce-error-response" style="display:none"></div>',a+='<div class="response" id="mce-success-response" style="display:none"></div>',a+="</div>",a+='<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a631df13442f19caede5a5baf_c9a71edce6" tabindex="-1" value=""></div>',a+='<input type="submit" value="Subscribe" name="subscribe" id="pointer-close" class="button mc-newsletter-sent" style=" background: #0085ba; border-color: #006799; padding: 0px 16px; text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799; height: 30px; margin-top: 1px; color: #fff; box-shadow: 0 1px 0 #006799;">',a+="</div>",a+="</form>";var t={content:a+="</div>",position:{edge:"top",align:"left"}};s=function(){e(saswp_localize_data.displayID).pointer(t).pointer("open"),saswp_localize_data.button2&&(jQuery("#pointer-close").after('<a id="pointer-primary" class="button-primary">'+saswp_localize_data.button2+"</a>"),jQuery("#pointer-primary").click(function(){saswp_localize_data.function_name}),jQuery("#pointer-close").click(function(){e.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})}))},(t=e.extend(t,{buttons:function(e,s){return button=jQuery('<a id="pointer-close" class="button-secondary">'+saswp_localize_data.button1+"</a>"),button_2=jQuery("#pointer-close.button"),button.bind("click.pointer",function(){s.element.pointer("close")}),button_2.on("click",function(){s.element.pointer("close")}),button},close:function(){e.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})},show:function(e,s){s.pointer.css({left:"170px",top:"160px"})}})).position&&t.position.defer_loading?e(window).bind("load.wp-pointers",s):s()}e(".saswp-tabs a").click(function(s){var a=e(this).attr("href"),t=getParameterByName("tab",a);return t||(t="general"),e(this).siblings().removeClass("nav-tab-active"),e(this).addClass("nav-tab-active"),e(".form-wrap").find(".saswp-"+t).siblings().hide(),e(".form-wrap .saswp-"+t).show(),window.history.pushState("","",a),!1}),e(".saswp-schame-type-select").change(function(){e(".saswp-custom-fields-table").html("");var s=e(this).val();e(".saswp-option-table-class tr").each(function(s,a){s>0&&(e(this).hide(),e(this).find("select").attr("disabled",!0))}),"TechArticle"==s||"Article"==s||"Blogposting"==s||"NewsArticle"==s||"WebPage"==s?e(".saswp-enable-speakable").parent().parent().show():e(".saswp-enable-speakable").parent().parent().hide(),"Book"==s||"Course"==s||"HowTo"==s||"MusicPlaylist"==s||"MusicAlbum"==s||"Recipe"==s||"TVSeries"==s||"SoftwareApplication"==s||"Event"==s||"VideoGame"==s||"Service"==s||"AudioObject"==s||"VideoObject"==s||"local_business"==s||"Product"==s?e(".saswp-enable-append-reviews").parent().parent().show():e(".saswp-enable-append-reviews").parent().parent().hide(),"local_business"==s&&(e(".saswp-option-table-class tr").eq(1).show(),e(".saswp-business-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1),e(".select-post-type").val("show_globally").trigger("change")),"Service"==s&&(e(".saswp-service-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==s&&(e(".saswp-event-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Review"==s&&(e(".saswp-review-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1),saswp_item_reviewed_call()),saswp_enable_rating_review()}),e("#saswp_business_type").change(function(){var s=e(this).val(),a=e(".saswp-schame-type-select").val();e(".saswp-option-table-class tr").each(function(s,a){s>1&&(e(this).hide(),e(this).find("select").attr("disabled",!0))}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?e(".saswp-enable-speakable").parent().parent().show():e(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==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?e(".saswp-enable-append-reviews").parent().parent().show():e(".saswp-enable-append-reviews").parent().parent().hide(),"local_business"==a&&(e(".saswp-"+s+"-tr").show(),e(".saswp-business-text-field-tr").show(),e(".saswp-"+s+"-tr").find("select").attr("disabled",!1)),"Review"==a&&(e(".saswp-review-text-field-tr").show(),e(".saswp-review-text-field-tr").find("select").attr("disabled",!1)),"Event"==a&&(e(".saswp-event-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review()}).change(),e(".saswp-checkbox").change(function(){var s=e(this).attr("id"),a=e(this);switch(s){case"saswp-the-seo-framework-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-the-seo-framework").val(1):e("#saswp-the-seo-framework").val(0);break;case"saswp-seo-press-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-seo-press").val(1):e("#saswp-seo-press").val(0);break;case"saswp-aiosp-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-aiosp").val(1):e("#saswp-aiosp").val(0);break;case"saswp-smart-crawl-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-smart-crawl").val(1):e("#saswp-smart-crawl").val(0);break;case"saswp-squirrly-seo-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-squirrly-seo").val(1):e("#saswp-squirrly-seo").val(0);break;case"saswp-wp-recipe-maker-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-wp-recipe-maker").val(1):e("#saswp-wp-recipe-maker").val(0);break;case"saswp-wpsso-core-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-wpsso-core").val(1):e("#saswp-wpsso-core").val(0);break;case"saswp-for-wordpress-checkbox":e(this).is(":checked")?e("#saswp-for-wordpress").val(1):e("#saswp-for-wordpress").val(0);break;case"saswp-facebook-enable-checkbox":e(this).is(":checked")?(e("#saswp-facebook-enable").val(1),e("#sd_facebook").show()):(e("#saswp-facebook-enable").val(0),e("#sd_facebook").hide());break;case"saswp-twitter-enable-checkbox":e(this).is(":checked")?(e("#saswp-twitter-enable").val(1),e("#sd_twitter").show()):(e("#saswp-twitter-enable").val(0),e("#sd_twitter").hide());break;case"saswp-google-plus-enable-checkbox":e(this).is(":checked")?(e("#saswp-google-plus-enable").val(1),e("#sd_google_plus").show()):(e("#saswp-google-plus-enable").val(0),e("#sd_google_plus").hide());break;case"saswp-instagram-enable-checkbox":e(this).is(":checked")?(e("#saswp-instagram-enable").val(1),e("#sd_instagram").show()):(e("#saswp-instagram-enable").val(0),e("#sd_instagram").hide());break;case"saswp-youtube-enable-checkbox":e(this).is(":checked")?(e("#sd_youtube").show(),e("#saswp-youtube-enable").val(1)):(e("#saswp-youtube-enable").val(0),e("#sd_youtube").hide());break;case"saswp-linkedin-enable-checkbox":e(this).is(":checked")?(e("#saswp-linkedin-enable").val(1),e("#sd_linkedin").show()):(e("#saswp-linkedin-enable").val(0),e("#sd_linkedin").hide());break;case"saswp-pinterest-enable-checkbox":e(this).is(":checked")?(e("#saswp-pinterest-enable").val(1),e("#sd_pinterest").show()):(e("#saswp-pinterest-enable").val(0),e("#sd_pinterest").hide());break;case"saswp-soundcloud-enable-checkbox":e(this).is(":checked")?(e("#saswp-soundcloud-enable").val(1),e("#sd_soundcloud").show()):(e("#saswp-soundcloud-enable").val(0),e("#sd_soundcloud").hide());break;case"saswp-tumblr-enable-checkbox":e(this).is(":checked")?(e("#saswp-tumblr-enable").val(1),e("#sd_tumblr").show()):(e("#saswp-tumblr-enable").val(0),e("#sd_tumblr").hide());break;case"saswp-yelp-enable-checkbox":e(this).is(":checked")?(e("#saswp-yelp-enable").val(1),e("#sd_yelp").show()):(e("#saswp-yelp-enable").val(0),e("#sd_yelp").hide());break;case"saswp-for-amp-checkbox":e(this).is(":checked")?e("#saswp-for-amp").val(1):e("#saswp-for-amp").val(0);break;case"saswp_kb_contact_1_checkbox":e(this).is(":checked")?(e("#saswp_kb_contact_1").val(1),e("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").removeClass("saswp-display-none")):(e("#saswp_kb_contact_1").val(0),e("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").addClass("saswp-display-none"));break;case"saswp-logo-dimensions-check":e(this).is(":checked")?(e("#saswp-logo-dimensions").val(1),e("#saswp-logo-width, #saswp-logo-height").parent().parent("li").show()):(e("#saswp-logo-dimensions").val(0),e("#saswp-logo-width, #saswp-logo-height").parent().parent("li").hide());break;case"saswp_archive_schema_checkbox":e(this).is(":checked")?(e("#saswp_archive_schema").val(1),e(".saswp_archive_schema_type_class").parent().parent().show()):(e("#saswp_archive_schema").val(0),e(".saswp_archive_schema_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":e(this).is(":checked")?(e("#saswp_website_schema").val(1),e("#saswp_search_box_schema").parent().parent().show()):(e("#saswp_website_schema").val(0),e("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":e(this).is(":checked")?e("#saswp_search_box_schema").val(1):e("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_schema_checkbox":e(this).is(":checked")?e("#saswp_breadcrumb_schema").val(1):e("#saswp_breadcrumb_schema").val(0);break;case"saswp_comments_schema_checkbox":e(this).is(":checked")?e("#saswp_comments_schema").val(1):e("#saswp_comments_schema").val(0);break;case"saswp-compativility-checkbox":e(this).is(":checked")?e("#saswp-flexmlx-compativility").val(1):e("#saswp-flexmlx-compativility").val(0);break;case"saswp-review-module-checkbox":e(this).is(":checked")?e("#saswp-review-module").val(1):e("#saswp-review-module").val(0);break;case"saswp-kk-star-raring-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-kk-star-raring").val(1):e("#saswp-kk-star-raring").val(0);break;case"saswp-woocommerce-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-woocommerce").val(1):e("#saswp-woocommerce").val(0);break;case"saswp-extra-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-extra").val(1):e("#saswp-extra").val(0);break;case"saswp-dw-question-answer-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-dw-question-answer").val(1):e("#saswp-dw-question-answer").val(0);break;case"saswp-wp-job-manager-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-wp-job-manager").val(1):e("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-yoast").val(1):e("#saswp-yoast").val(0);break;case"saswp-rankmath-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-rankmath").val(1):e("#saswp-rankmath").val(0);break;case"saswp-tagyeem-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-tagyeem").val(1):e("#saswp-tagyeem").val(0);break;case"saswp-the-events-calendar-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-the-events-calendar").val(1):e("#saswp-the-events-calendar").val(0);break;case"saswp-homeland-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-homeland").val(1):e("#saswp-homeland").val(0);break;case"saswp-realhomes-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-realhomes").val(1):e("#saswp-realhomes").val(0);break;case"saswp-learn-press-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-learn-press").val(1):e("#saswp-learn-press").val(0);break;case"saswp-learn-dash-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-learn-dash").val(1):e("#saswp-learn-dash").val(0);break;case"saswp-lifter-lms-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-lifter-lms").val(1):e("#saswp-lifter-lms").val(0);break;case"saswp-wp-event-manager-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-wp-event-manager").val(1):e("#saswp-wp-event-manager").val(0);break;case"saswp-events-manager-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-events-manager").val(1):e("#saswp-events-manager").val(0);break;case"saswp-event-calendar-wd-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-event-calendar-wd").val(1):e("#saswp-event-calendar-wd").val(0);break;case"saswp-event-organiser-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-event-organiser").val(1):e("#saswp-event-organiser").val(0);break;case"saswp-modern-events-calendar-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-modern-events-calendar").val(1):e("#saswp-modern-events-calendar").val(0);break;case"saswp-woocommerce-booking-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?(e("#saswp-woocommerce-booking").val(1),e("#saswp-woocommerce-booking-main").val(1)):(e("#saswp-woocommerce-booking").val(0),e("#saswp-woocommerce-booking-main").val(0));break;case"saswp-woocommerce-booking-main-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?(e("#saswp-woocommerce-booking-main").val(1),e("#saswp-woocommerce-booking").val(1)):(e("#saswp-woocommerce-booking-main").val(0),e("#saswp-woocommerce-booking").val(0));break;case"saswp-woocommerce-membership-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-woocommerce-membership").val(1):e("#saswp-woocommerce-membership").val(0);break;case"saswp-defragment-checkbox":e(this).is(":checked")?e("#saswp-defragment").val(1):e("#saswp-defragment").val(0);break;case"saswp-cooked-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-cooked").val(1):e("#saswp-cooked").val(0);break;case"saswp-flexmlx-compativility-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-flexmlx-compativility").val(1):e("#saswp-flexmlx-compativility").val(0);break;case"saswp-shopper-approved-review-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?(e("#saswp-shopper-approved-review").val(1),e(".saswp-s-reviews-settings-table").parent().parent().parent().show()):(e("#saswp-shopper-approved-review").val(0),e(".saswp-s-reviews-settings-table").parent().parent().parent().hide());break;case"saswp-google-review-checkbox":e(this).is(":checked")?(e("#saswp-google-review").val(1),e("#saswp-google-rv-free-checkbox").length?(e("#saswp-google-review-free").parent().parent().show(),e("#saswp-google-rv-free-checkbox").is(":checked")?e("#saswp_google_place_api_key").parent().parent().show():e("#saswp_google_place_api_key").parent().parent().hide()):e("#saswp_google_place_api_key").parent().parent().show(),e(".saswp-g-reviews-settings-table").parent().parent().parent().show()):(e("#saswp-google-review").val(0),e("#saswp_google_place_api_key").parent().parent().hide(),e(".saswp-g-reviews-settings-table").parent().parent().parent().hide(),e("#saswp-google-rv-free-checkbox").length&&e("#saswp-google-review-free").parent().parent().hide());break;case"saswp-google-rv-free-checkbox":e("#saswp-google-review-checkbox").is(":checked")&&e(this).is(":checked")?(e("#saswp-google-review-free").val(1),e("#saswp_google_place_api_key").parent().parent().show()):(e("#saswp-google-review-free").val(0),e("#saswp_google_place_api_key").parent().parent().hide());break;case"saswp-markup-footer-checkbox":e(this).is(":checked")?e("#saswp-markup-footer").val(1):e("#saswp-markup-footer").val(0);break;case"saswp-pretty-print-checkbox":e(this).is(":checked")?e("#saswp-pretty-print").val(1):e("#saswp-pretty-print").val(0);break;case"saswp-wppostratings-raring-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-wppostratings-raring").val(1):e("#saswp-wppostratings-raring").val(0);break;case"saswp-bbpress-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-bbpress").val(1):e("#saswp-bbpress").val(0);break;case"saswp-microdata-cleanup-checkbox":e(this).is(":checked")?e("#saswp-microdata-cleanup").val(1):e("#saswp-microdata-cleanup").val(0)}}).change(),e("#saswp_kb_type").change(function(){var s=e(this).val();e(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass("saswp_hide"),e(".saswp_kg_logo").parent().parent().parent().addClass("saswp_hide"),e("#sd-person-image").parent().parent().parent().addClass("saswp_hide"),"Organization"==s&&(e(".saswp_org_fields").parent().parent().removeClass("saswp_hide"),e(".saswp_person_fields").parent().parent().addClass("saswp_hide"),e(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),e("#sd-person-image").parent().parent().parent().addClass("saswp_hide")),"Person"==s&&(e(".saswp_org_fields").parent().parent().addClass("saswp_hide"),e(".saswp_person_fields").parent().parent().removeClass("saswp_hide"),e(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),e("#sd-person-image").parent().parent().parent().removeClass("saswp_hide"))}).change(),e(document).on("click","input[data-id=media]",function(s){s.preventDefault();var a=e(this),t=a.attr("id").replace("_button",""),i=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1,library:{type:"image"}}).on("select",function(){var s=i.state().get("selection").first().toJSON();e("#"+t).val(s.url),e("input[data-id='"+t+"_id']").val(s.id),e("input[data-id='"+t+"_height']").val(s.height),e("input[data-id='"+t+"_width']").val(s.width),e("input[data-id='"+t+"_thumbnail']").val(s.url),"sd_default_image_button"===a.attr("id")&&(e("#sd_default_image_width").val(s.width),e("#sd_default_image_height").val(s.height));var n="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&s.height<1200&&(n='<p class="saswp_warning">Image size is smaller than recommended size</p>'),e(".saswp_image_div_"+t).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+s.url+'"/><a data-id="'+t+'" href="#" class="saswp_prev_close">X</a></div>'+n)}).open()}),e(document).on("click",".saswp_prev_close",function(s){s.preventDefault();var a=e(this).attr("data-id");console.log(a),e(this).parent().remove(),e("#"+a).val(""),e("input[data-id='"+a+"_id']").val(""),e("input[data-id='"+a+"_height']").val(""),e("input[data-id='"+a+"_width']").val(""),e("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(e("#sd_default_image_width").val(""),e("#sd_default_image_height").val(""))}),e(document).on("change",".saswp-schema-type-toggle",function(s){var a=e(this).attr("data-schema-id"),t=e(this).attr("data-post-id");if(e(this).is(":checked"))var i=1;else i=0;e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_enable_disable_schema_on_post",status:i,schema_id:a,post_id:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){},error:function(e){console.log(e)}})}),e(document).on("click",".saswp-reset-data",function(s){s.preventDefault(),1==confirm("Are you sure?")&&e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){setTimeout(function(){location.reload()},1e3)},error:function(e){console.log(e)}})}),e(document).on("click",".saswp_license_activation",function(s){s.preventDefault();var a=e(this);a.addClass("updating-message");var t=e(this).attr("license-status"),i=e(this).attr("add-on"),n=e("#"+i+"_addon_license_key").val();t&&i&&n?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:n,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){e("#"+i+"_addon_license_key_status").val(s.status),"active"==s.status?(e(".saswp-"+i+"-dashicons").addClass("dashicons-yes"),e(".saswp-"+i+"-dashicons").removeClass("dashicons-no-alt"),e(".saswp-"+i+"-dashicons").css("color","green"),e(".saswp_license_activation[add-on='"+i+"']").attr("license-status","inactive"),e(".saswp_license_activation[add-on='"+i+"']").text("Deactivate"),e(".saswp_license_status_msg[add-on='"+i+"']").text("Activated"),e(".saswp_license_status_msg[add-on='"+i+"']").css("color","green"),e(".saswp_license_status_msg[add-on='"+i+"']").text(s.message)):(e(".saswp-"+i+"-dashicons").addClass("dashicons-no-alt"),e(".saswp-"+i+"-dashicons").removeClass("dashicons-yes"),e(".saswp-"+i+"-dashicons").css("color","red"),e(".saswp_license_activation[add-on='"+i+"']").attr("license-status","active"),e(".saswp_license_activation[add-on='"+i+"']").text("Activate"),e(".saswp_license_status_msg[add-on='"+i+"']").css("color","red"),e(".saswp_license_status_msg[add-on='"+i+"']").text(s.message)),a.removeClass("updating-message")},error:function(e){console.log(e)}}):(alert("Please enter value license key"),a.removeClass("updating-message"))}),e(".saswp-send-query").on("click",function(s){s.preventDefault();var a=e("#saswp_query_message").val();""!=e.trim(a)?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_send_query_message",message:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(e(".saswp-query-success").show(),e(".saswp-query-error").hide()):(console.log("dd"),e(".saswp-query-success").hide(),e(".saswp-query-error").show())},error:function(e){console.log(e)}}):alert("Please enter the message")}),e(".saswp-import-plugins").on("click",function(s){s.preventDefault();var a=e(this);a.addClass("updating-message");var t=e(this).attr("data-id");e.get(ajaxurl,{action:"saswp_import_plugin_data",plugin_name:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){"t"==s.status?(e(a).parent().find(".saswp-imported-message").text(s.message),e(a).parent().find(".saswp-imported-message").removeClass("saswp-error"),setTimeout(function(){location.reload()},2e3)):(e(a).parent().find(".saswp-imported-message").addClass("saswp-error"),e(a).parent().find(".saswp-imported-message").text(s.message)),a.removeClass("updating-message")},"json")}),e(".saswp-feedback-no-thanks").on("click",function(s){s.preventDefault(),e.get(ajaxurl,{action:"saswp_feeback_no_thanks",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){"t"==s.status&&e(".saswp-feedback-notice").hide()},"json")}),e(".saswp-feedback-remindme").on("click",function(s){s.preventDefault(),e.get(ajaxurl,{action:"saswp_feeback_remindme",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){"t"==s.status&&e(".saswp-feedback-notice").hide()},"json")}),e(document).on("change",".saswp-local-business-type-select",function(s){s.preventDefault();var a=e(this),t=e(this).val();e.get(ajaxurl,{action:"saswp_get_sub_business_ajax",business_type:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){if("t"==s.status){e(".saswp-local-business-name-select").parents("tr").remove();var t=a.parents(".saswp-post-specific-wrapper").attr("data-id"),i='<tr><th><label for="saswp_business_name_'+t+'">Sub Business Type</label></th>';i+='<td><select class="saswp-local-business-name-select" id="saswp_business_name_'+t+'" name="saswp_business_name_'+t+'">',e.each(s.result,function(e,s){i+='<option value="'+e+'">'+s+"</option>"}),i+="</select></td>",i+="</tr>",a.parents(".form-table tr:first").after(i)}else e(".saswp-local-business-name-select").parents("tr").remove()},"json")}),saswp_item_reviewed_call(),e(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),e(document).on("click",".saswp-add-custom-schema",function(s){s.preventDefault(),e(".saswp-add-custom-schema-field").removeClass("saswp_hide"),e(this).hide()}),e(document).on("click",".saswp-delete-custom-schema",function(s){s.preventDefault(),e("#saswp_custom_schema_field").val(""),e(".saswp-add-custom-schema-field").addClass("saswp_hide"),e(".saswp-add-custom-schema").show()}),e(".saswp-modify_schema_post_enable").on("click",function(s){var a=e(this);a.addClass("updating-message"),s.preventDefault(),e.get(ajaxurl,{action:"saswp_modify_schema_post_enable",post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){a.remove(),e(".saswp-add-custom-schema-div").remove(),e("#post_specific .inside").append(s),a.removeClass("updating-message"),saswpAddTimepicker(),saswp_schema_datepicker(),saswp_enable_rating_review(),saswp_item_reviewed_call()})}),saswp_schema_datepicker(),saswp_reviews_datepicker(),e(document).on("click",".saswp-add-more-item",function(s){s.preventDefault();var a=e(".saswp-review-item-list-table tr").length;console.log(a);e(".saswp-review-item-list-table").append('<tr class="saswp-review-item-tr"><td>Review Item Feature</td><td><input type="text" name="saswp-review-item-feature[]"></td><td>Rating</td><td><input step="0.1" min="0" max="5" type="number" name="saswp-review-item-star-rating[]"></td><td><a type="button" class="saswp-remove-review-item button">x</a></td></tr>')}),e(document).on("click",".saswp-remove-review-item",function(s){s.preventDefault(),e(this).parent().parent("tr").remove()}),e(document).on("focusout",".saswp-review-item-tr input[type=number]",function(s){s.preventDefault();var a=0,t=e(".saswp-review-item-tr input[type=number]").length;e(".saswp-review-item-tr input[type=number]").each(function(s,t){""==e(t).val()?a+=parseFloat(0):a+=parseFloat(e(t).val())});var i=a/t;e("#saswp-review-item-over-all").val(i)}),e("#saswp-review-location").change(function(){var s=e(this).val();e(".saswp-review-shortcode").addClass("saswp_hide"),3==s&&e(".saswp-review-shortcode").removeClass("saswp_hide")}).change(),e("#saswp-review-item-enable").change(function(){e(this).is(":checked")?e(".saswp-review-fields").show():e(".saswp-review-fields").hide()}).change(),e(document).on("click",".saswp-restore-post-schema",function(s){s.preventDefault();var a=e(this);if(a.addClass("updating-message"),e(".saswp-post-specific-schema-ids").val())var t=JSON.parse(e(".saswp-post-specific-schema-ids").val());e.post(ajaxurl,{action:"saswp_restore_schema",schema_ids:t,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status?setTimeout(function(){location.reload()},1e3):(alert(e.msg),setTimeout(function(){location.reload()},1e3)),a.removeClass("updating-message")},"json")}),e(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(s){s.preventDefault();var a=e(this).attr("data-id");e(".saswp-post-specific-wrapper").hide(),e("#"+a).show(),e("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),e("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),e(this).addClass("selected"),e(this).parent().addClass("selected"),saswp_enable_rating_review()}),e("#saswp-global-tabs a:first").addClass("saswp-global-selected"),e(".saswp-global-container").hide(),"#saswp-default-container"==window.location.hash?e(".saswp-global-container:eq(2)").show():e(".saswp-global-container:first").show(),e("#saswp-global-tabs a").click(function(){var s=e(this).attr("data-id");e(this).hasClass("saswp-global-selected")||(e("#saswp-global-tabs a").removeClass("saswp-global-selected"),e(this).addClass("saswp-global-selected"),e(".saswp-global-container").hide(),e("#"+s).show())}),e("#saswp-tools-tabs a:first").addClass("saswp-global-selected"),e(".saswp-tools-container").hide(),e(".saswp-tools-container:first").show(),e("#saswp-tools-tabs a").click(function(){var s=e(this).attr("data-id");e(this).hasClass("saswp-global-selected")||(e("#saswp-tools-tabs a").removeClass("saswp-global-selected"),e(this).addClass("saswp-global-selected"),e(".saswp-tools-container").hide(),e("#"+s).show())}),e("#saswp-review-tabs a:first").addClass("saswp-global-selected"),e(".saswp-review-container").hide(),e(".saswp-review-container:first").show(),e("#saswp-review-tabs a").click(function(){var s=e(this).attr("data-id");e(this).hasClass("saswp-global-selected")||(e("#saswp-review-tabs a").removeClass("saswp-global-selected"),e(this).addClass("saswp-global-selected"),e(".saswp-review-container").hide(),e("#"+s).show())}),e('a[href="'+saswp_localize_data.new_url_selector+'"]').attr("href",saswp_localize_data.new_url_href),e("#saswp_enable_custom_field").change(function(){e(this).is(":checked")?e(".saswp-custom-fields-div").show():e(".saswp-custom-fields-div").hide()}),e(document).on("change",".saswp-custom-fields-name",function(){var s="text",a=e(this).parent().parent("tr"),t=e(this).val();-1==t.indexOf("image")&&-1==t.indexOf("logo")||(s="image"),saswp_get_meta_list(null,s,null,e(this).parent().parent("tr").find("td:eq(1)"),t,a)}),e(document).on("click",".saswp-skip-button",function(s){s.preventDefault(),e(this).parent().parent().hide(),e.post(ajaxurl,{action:"saswp_skip_wizard",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){},"json")}),e(document).on("click",".saswp_add_schema_fields_on_fly",function(s){s.preventDefault();var a=e(this);a.addClass("updating-message");var t=e(this).attr("data-id"),i=e(this).attr("fields_type"),n=e(this).attr("div_type"),p=e(".saswp-"+n+"-table-div").length,o=e(".saswp-"+n+"-table-div:nth-child("+p+")").attr("data-id");(o=++o)||(o=0),saswp_get_post_specific_schema_fields(a,o,i,n,t,i+"_")}),e(document).on("click",".saswp-table-close",function(){e(this).parent().remove()}),e(document).on("click",".saswp-rmv-modify_row",function(s){s.preventDefault(),e(this).parent().parent().remove()}),e(document).on("change",".saswp-custom-meta-list",function(){var s=e(this),a=e("select#schema_type option:selected").val(),t=e(this).val(),i=e(this).parent().parent("tr").find(".saswp-custom-fields-name").val(),n="",p=a.toLowerCase()+"_"+i,o="saswp_fixed_image["+i+"]";"manual_text"==t?(n+='<td><input type="text" name="saswp_fixed_text['+i+']"></td>',n+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',e(this).parent().parent("tr").find("td:gt(1)").remove(),e(this).parent().parent("tr").append(n),saswpCustomSelect2()):"taxonomy_term"==t?saswp_taxonomy_term.taxonomy?(n+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,i),s.parent().parent("tr").find("td:gt(1)").remove(),s.parent().parent("tr").append(n),saswpCustomSelect2()):e.get(ajaxurl,{action:"saswp_get_taxonomy_term_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){e&&(saswp_taxonomy_term.taxonomy=e,n+=saswp_taxonomy_term_html(e,i),s.parent().parent("tr").find("td:gt(1)").remove(),s.parent().parent("tr").append(n),saswpCustomSelect2())},"json"):"custom_field"==t?(n+='<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+i+']">',n+="</select></td>",n+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',e(this).parent().parent("tr").find("td:gt(1)").remove(),e(this).parent().parent("tr").append(n),saswpCustomSelect2()):"fixed_image"==t?(n+="<td>",n+="<fieldset>",n+='<input data-id="media" style="width: 30%;" class="button" id="'+p+'_button" name="'+p+'_button" type="button" value="Upload" />',n+='<input type="hidden" data-id="'+p+'_height" class="upload-height" name="'+o+'[height]" id="'+p+'_height" value="">',n+='<input type="hidden" data-id="'+p+'_width" class="upload-width" name="'+o+'[width]" id="'+p+'_width" value="">',n+='<input type="hidden" data-id="'+p+'_thumbnail" class="upload-thumbnail" name="'+o+'[thumbnail]" id="'+p+'_thumbnail" value="">',n+='<div class="saswp_image_div_'+p+'">',n+="</div>",n+="</fieldset>",n+="</td>",n+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',e(this).parent().parent("tr").find("td:gt(1)").remove(),e(this).parent().parent("tr").append(n),saswpCustomSelect2()):(n+="<td></td>",n+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',e(this).parent().parent("tr").find("td:gt(1)").remove(),e(this).parent().parent("tr").append(n),saswpCustomSelect2())}),e(document).on("change",".saswp-item-reivewed-list",function(){e(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[]}),e(document).on("click",".saswp-add-custom-fields",function(){var s=e(this);s.addClass("updating-message");var a=e("select#schema_type option:selected").val(),t="";"Review"==a&&(t=e("select.saswp-item-reivewed-list option:selected").val());var i=e("#post_ID").val();""!=a&&(saswp_meta_list_fields[a]?saswp_get_meta_list(s,"text",saswp_meta_list_fields[a],null,null,null):e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:i,schema_type:a,schema_subtype:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){saswp_meta_list_fields[a]=e,saswp_get_meta_list(s,"text",saswp_meta_list_fields[a],null,null,null)},error:function(e){console.log(e)}}))}),saswpCustomSelect2(),saswp_enable_rating_review(),e('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),e(document).on("click",".saswp_coonect_google_place",function(){var s=e("#saswp_google_place_id").val(),a=e("#saswp_language_list").val(),t=e("#saswp_googel_api").val();""!=s&&e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:s,language:a,google_api:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){console.log(e.status)},error:function(e){console.log(e)}})}),"saswp"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>"),"undefined"!=typeof saswp_reviews_data&&e(".saswp-rating-div").rateYo({rating:saswp_reviews_data.rating_val,halfStar:!0,readOnly:saswp_reviews_data.readonly,onSet:function(s,a){e(this).next().val(s),console.log(s)}}),e("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var s=e(this);s.parent().find(".saswp-phone-validation").remove();var a=e(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(a)?s.parent().find(".saswp-phone-validation").remove():s.after('<span style="color:red;" class="saswp-phone-validation">Invalid Phone Number</span>')})});
|
1 |
+
var saswp_meta_list=[],saswp_meta_fields=[],saswp_meta_list_fields=[],saswp_taxonomy_term=[];function saswp_taxonomy_term_html(e,s){var a="";return a+="<td>",a+='<select name="saswp_taxonomy_term['+s+']">',jQuery.each(e,function(e,s){a+='<option value="'+e+'">'+s+"</option>"}),a+="</select>",a+="</td>",a+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>'}function saswp_enable_rating_review(){var e="";jQuery("select#schema_type option:selected").val()&&(e=jQuery("select#schema_type option:selected").val()),jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")&&(e=jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")),e&&jQuery(".saswp-enable-rating-review-"+e.toLowerCase()).change(function(){jQuery(this).is(":checked")?jQuery(this).parent().parent().siblings(".saswp-rating-review-"+e.toLowerCase()).show():jQuery(this).parent().parent().siblings(".saswp-rating-review-"+e.toLowerCase()).hide()}).change()}function getParameterByName(e,s){s||(s=window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var a=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(s);return a?a[2]?decodeURIComponent(a[2].replace(/\+/g," ")):"":null}function saswpCustomSelect2(){"saswp"!=saswp_localize_data.post_type&&"saswp"!=saswp_localize_data.page_now||"saswp_page_structured_data_options"==saswp_localize_data.page_now||jQuery(".saswp-custom-fields-select2").select2({ajax:{type:"POST",url:ajaxurl,dataType:"json",delay:250,data:function(e){return{saswp_security_nonce:saswp_localize_data.saswp_security_nonce,q:e.term,action:"saswp_get_custom_meta_fields"}},processResults:function(e){return{results:e}},cache:!0},minimumInputLength:2})}function saswp_reviews_datepicker(){jQuery(".saswp-reviews-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"})}function saswp_schema_datepicker(){jQuery(".saswp-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"})}function saswpAddTimepicker(){jQuery(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"})}function saswp_item_reviewed_call(){jQuery(".saswp-item-reviewed").change(function(e){e.preventDefault();var s="";if(jQuery("select#schema_type option:selected").val()&&(s=jQuery("select#schema_type option:selected").val()),jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")&&(s=jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")),"Review"===s){var a=jQuery(this),t=jQuery(this).val(),i=saswp_localize_data.post_id,p=jQuery(a).attr("data-id"),o=jQuery(a).attr("post-specific");jQuery.get(ajaxurl,{action:"saswp_get_item_reviewed_fields",schema_id:p,post_specific:o,item:t,post_id:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){jQuery(a).parent().parent().nextAll().remove(".saswp-review-tr"),jQuery(a).parent().parent().after(e)})}}).change()}function saswp_compatibliy_notes(e,s){var a=s.replace("-checkbox",""),t=jQuery("#"+a).next("p").text();e.is(":checked")&&""!==t?jQuery("#"+a).next("p").removeClass("saswp_hide"):1==jQuery("#"+a).next("p").attr("data-id")?jQuery("#"+a).next("p").text("This feature is only available in pro version"):jQuery("#"+a).next("p").addClass("saswp_hide")}function saswp_meta_list_html(e,s,a,t,i,p){var o=t;null==o&&(o=Object.keys(a)[0]);var n="";if(n+='<select class="saswp-custom-meta-list" name="saswp_meta_list_val['+o+']">',jQuery.each(s,function(e,s){n+='<optgroup label="'+s.label+'">',jQuery.each(s["meta-list"],function(e,s){n+='<option value="'+e+'">'+s+"</option>"}),n+="</optgroup>"}),n+="</select>",a){var c="<tr>";c+="<td>",c+='<select class="saswp-custom-fields-name">',jQuery.each(a,function(e,s){c+='<option value="'+e+'">'+s+"</option>"}),c+="</select>",c+="</td>",c+="<td>",c+=n,c+="</td>",c+='<td></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td>',c+="</tr>",jQuery(".saswp-custom-fields-table").append(c),null!=e&&e.removeClass("updating-message")}else jQuery(i).html(n),null!=e&&e.removeClass("updating-message")}function saswp_get_meta_list(e,s,a,t,i,p){saswp_meta_list[s]?saswp_meta_list_html(e,saswp_meta_list[s],a,i,t,p):jQuery.get(ajaxurl,{action:"saswp_get_meta_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(o){saswp_meta_list[s]=o[s],saswp_meta_list_html(e,saswp_meta_list[s],a,i,t,p)},"json")}function saswp_get_post_specific_schema_fields(e,s,a,t,i,p){if(saswp_meta_fields[p]){var o=saswp_fields_html_generator(s,i,p,t,saswp_meta_fields[p]);o&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(o),saswp_schema_datepicker(),e.removeClass("updating-message"))}else jQuery.get(ajaxurl,{action:"saswp_get_schema_dynamic_fields_ajax",meta_name:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){saswp_meta_fields[p]=a,console.log(saswp_meta_fields);var o=saswp_fields_html_generator(s,i,p,t,a);o&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(o),saswp_schema_datepicker(),e.removeClass("updating-message"))},"json")}function saswp_fields_html_generator(e,s,a,t,i){var p="";return p+='<div class="saswp-'+t+'-table-div saswp-dynamic-properties" data-id="'+e+'"><a class="saswp-table-close">X</a><table class="form-table saswp-'+t+'-table">',jQuery.each(i,function(t,i){var o="";switch("saswp_tvseries_season_published_date"!=i.name&&"saswp_feed_element_date_created"!=i.name&&"saswp_product_reviews_created_date"!=i.name||(o="saswp-datepicker-picker"),i.type){case"number":case"text":p+="<tr><th>"+i.label+'</th><td><input class="'+o+'" style="width:100%" type="'+i.type+'" id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']"></td></tr>';break;case"textarea":p+="<tr><th>"+i.label+'</th><td><textarea style="width: 100%" id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']" rows="5"></textarea></td></tr>';break;case"select":var n="";jQuery.each(i.options,function(e,s){n+='<option value="'+e+'">'+s+"</option>"}),p+="<tr><th>"+i.label+'</th><td><select id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']">'+n+"</select></td></tr>";break;case"media":p+="<tr><th>"+i.label+'</th><td><fieldset><input style="width:80%" type="text" id="'+i.name+"_"+e+"_"+s+'" name="'+i.name+"_"+e+"_"+s+'"><input type="hidden" data-id="'+i.name+"_"+e+"_"+s+'_id" name="'+a+s+"["+e+"]["+i.name+'_id]" id="'+i.name+"_"+e+"_"+s+'_id"><input data-id="media" style="width: 19%" class="button" id="'+i.name+"_"+e+"_"+s+'_button" name="'+i.name+"_"+e+"_"+s+'_button" type="button" value="Upload"><div class="saswp_image_div_'+i.name+"_"+e+"_"+s+'"></div></fieldset></td></tr>'}}),p+="</table></div>"}jQuery(document).ready(function(e){if(e(document).on("click",".saswp-add-g-location-btn",function(s){var a="";a=e("#saswp_google_place_api_key").length?'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="5" step="5" placeholder="5" disabled="disabled">':'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="10" step="10" placeholder="10">',s.preventDefault();var t="";(t+='<tr><td style="width:12%;"><strong>Place Id</strong></td><td style="width:20%;"><input class="saswp-g-location-field" name="sd_data[saswp_reviews_location_name][]" type="text" value=""></td><td style="width:10%;"><strong>Reviews</strong></td><td style="width:10%;">'+a+'</td><td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">Fetch</a></td><td style="width:10%;"><a type="button" class="saswp-remove-review-item button">x</a></td><td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td></tr>')&&e(".saswp-g-reviews-settings-table").append(t)}),e(document).on("click",".saswp-fetch-g-reviews",function(){var s=e(this),a="free";s.addClass("updating-message");var t=e(this).parent().parent().find(".saswp-g-location-field").val(),i=e(this).parent().parent().find(".saswp-g-blocks-field").val(),p=e("#saswp_google_place_api_key").val(),o=e("#reviews_addon_license_key").val(),n=e("#reviews_addon_license_key_status").val();if("premium"==(a=e("#saswp_google_place_api_key").length?"free":"premium")){if(!(i>0))return alert("Blocks value is zero"),s.removeClass("updating-message"),!1;if(0!=i%10)return s.parent().parent().find(".saswp-rv-fetched-msg").text("Reviews count should be in step of 10"),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),s.removeClass("updating-message"),!1}""!=t&&(o||p)?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:n,reviews_api:o,location:t,blocks:i,g_api:p,premium_status:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s.parent().parent().find(".saswp-rv-fetched-msg").text("Success"),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(s.parent().parent().find(".saswp-rv-fetched-msg").text(e.message),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),s.removeClass("updating-message")},error:function(e){console.log(e)}}):(""==t&&alert("Please enter place id"),""==p&&alert("Please enter api key"),""==o&&alert("Please enter reviews api key"),s.removeClass("updating-message"))}),saswp_localize_data.do_tour){var s,a="<h3>Thanks for using Structured Data!</h3>";a+="<p>Do you want the latest on <b>Structured Data update</b> before others and some best resources on monetization in a single email? - Free just for users of Structured Data!</p>",a+='<style type="text/css">',a+=".wp-pointer-buttons{ padding:0; overflow: hidden; }",a+=".wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none}\t#afw_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }",a+="</style>",a+='<div id="afw_mc_embed_signup">',a+='<form action="//app.mailerlite.com/webforms/submit/z7t4b8" data-id="258182" data-code="z7t4b8" method="POST" target="_blank">',a+='<div id="afw_mc_embed_signup_scroll">',a+='<div class="afw-mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">',a+='<input type="text" name="fields[name]" class="form-control" placeholder="Name" hidden value="'+saswp_localize_data.current_user_name+'" style="display:none">',a+='<input type="text" value="'+saswp_localize_data.current_user_email+'" name="fields[email]" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">',a+='<input type="text" name="fields[company]" class="form-control" placeholder="Website" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="'+saswp_localize_data.get_home_url+'">',a+='<input type="hidden" name="ml-submit" value="1" />',a+="</div>",a+='<div id="mce-responses">',a+='<div class="response" id="mce-error-response" style="display:none"></div>',a+='<div class="response" id="mce-success-response" style="display:none"></div>',a+="</div>",a+='<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a631df13442f19caede5a5baf_c9a71edce6" tabindex="-1" value=""></div>',a+='<input type="submit" value="Subscribe" name="subscribe" id="pointer-close" class="button mc-newsletter-sent" style=" background: #0085ba; border-color: #006799; padding: 0px 16px; text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799; height: 30px; margin-top: 1px; color: #fff; box-shadow: 0 1px 0 #006799;">',a+="</div>",a+="</form>";var t={content:a+="</div>",position:{edge:"top",align:"left"}};s=function(){e(saswp_localize_data.displayID).pointer(t).pointer("open"),saswp_localize_data.button2&&(jQuery("#pointer-close").after('<a id="pointer-primary" class="button-primary">'+saswp_localize_data.button2+"</a>"),jQuery("#pointer-primary").click(function(){saswp_localize_data.function_name}),jQuery("#pointer-close").click(function(){e.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})}))},(t=e.extend(t,{buttons:function(e,s){return button=jQuery('<a id="pointer-close" class="button-secondary">'+saswp_localize_data.button1+"</a>"),button_2=jQuery("#pointer-close.button"),button.bind("click.pointer",function(){s.element.pointer("close")}),button_2.on("click",function(){s.element.pointer("close")}),button},close:function(){e.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})},show:function(e,s){s.pointer.css({left:"170px",top:"160px"})}})).position&&t.position.defer_loading?e(window).bind("load.wp-pointers",s):s()}e(".saswp-tabs a").click(function(s){var a=e(this).attr("href"),t=getParameterByName("tab",a);return t||(t="general"),e(this).siblings().removeClass("nav-tab-active"),e(this).addClass("nav-tab-active"),e(".form-wrap").find(".saswp-"+t).siblings().hide(),e(".form-wrap .saswp-"+t).show(),window.history.pushState("","",a),!1}),e(".saswp-schame-type-select").change(function(){e(".saswp-custom-fields-table").html("");var s=e(this).val();e(".saswp-option-table-class tr").each(function(s,a){s>0&&(e(this).hide(),e(this).find("select").attr("disabled",!0))}),"TechArticle"==s||"Article"==s||"Blogposting"==s||"NewsArticle"==s||"WebPage"==s?e(".saswp-enable-speakable").parent().parent().show():e(".saswp-enable-speakable").parent().parent().hide(),"Book"==s||"Course"==s||"HowTo"==s||"MusicPlaylist"==s||"MusicAlbum"==s||"Recipe"==s||"TVSeries"==s||"SoftwareApplication"==s||"Event"==s||"VideoGame"==s||"Service"==s||"AudioObject"==s||"VideoObject"==s||"local_business"==s||"Product"==s?e(".saswp-enable-append-reviews").parent().parent().show():e(".saswp-enable-append-reviews").parent().parent().hide(),"local_business"==s&&(e(".saswp-option-table-class tr").eq(1).show(),e(".saswp-business-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1),e(".select-post-type").val("show_globally").trigger("change")),"Service"==s&&(e(".saswp-service-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==s&&(e(".saswp-event-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Review"==s&&(e(".saswp-review-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1),saswp_item_reviewed_call()),saswp_enable_rating_review()}),e("#saswp_business_type").change(function(){var s=e(this).val(),a=e(".saswp-schame-type-select").val();e(".saswp-option-table-class tr").each(function(s,a){s>1&&(e(this).hide(),e(this).find("select").attr("disabled",!0))}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?e(".saswp-enable-speakable").parent().parent().show():e(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==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?e(".saswp-enable-append-reviews").parent().parent().show():e(".saswp-enable-append-reviews").parent().parent().hide(),"local_business"==a&&(e(".saswp-"+s+"-tr").show(),e(".saswp-business-text-field-tr").show(),e(".saswp-"+s+"-tr").find("select").attr("disabled",!1)),"Review"==a&&(e(".saswp-review-text-field-tr").show(),e(".saswp-review-text-field-tr").find("select").attr("disabled",!1)),"Event"==a&&(e(".saswp-event-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review()}).change(),e(".saswp-checkbox").change(function(){var s=e(this).attr("id"),a=e(this);switch(s){case"saswp-the-seo-framework-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-the-seo-framework").val(1):e("#saswp-the-seo-framework").val(0);break;case"saswp-seo-press-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-seo-press").val(1):e("#saswp-seo-press").val(0);break;case"saswp-aiosp-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-aiosp").val(1):e("#saswp-aiosp").val(0);break;case"saswp-smart-crawl-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-smart-crawl").val(1):e("#saswp-smart-crawl").val(0);break;case"saswp-squirrly-seo-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-squirrly-seo").val(1):e("#saswp-squirrly-seo").val(0);break;case"saswp-wp-recipe-maker-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-wp-recipe-maker").val(1):e("#saswp-wp-recipe-maker").val(0);break;case"saswp-wp-ultimate-recipe-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-wp-ultimate-recipe").val(1):e("#saswp-wp-ultimate-recipe").val(0);break;case"saswp-zip-recipes-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-zip-recipes").val(1):e("#saswp-zip-recipes").val(0);break;case"saswp-mediavine-create-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-mediavine-create").val(1):e("#saswp-mediavine-create").val(0);break;case"saswp-ht-recipes-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-ht-recipes").val(1):e("#saswp-ht-recipes").val(0);break;case"saswp-wpsso-core-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-wpsso-core").val(1):e("#saswp-wpsso-core").val(0);break;case"saswp-for-wordpress-checkbox":e(this).is(":checked")?e("#saswp-for-wordpress").val(1):e("#saswp-for-wordpress").val(0);break;case"saswp-facebook-enable-checkbox":e(this).is(":checked")?(e("#saswp-facebook-enable").val(1),e("#sd_facebook").show()):(e("#saswp-facebook-enable").val(0),e("#sd_facebook").hide());break;case"saswp-twitter-enable-checkbox":e(this).is(":checked")?(e("#saswp-twitter-enable").val(1),e("#sd_twitter").show()):(e("#saswp-twitter-enable").val(0),e("#sd_twitter").hide());break;case"saswp-google-plus-enable-checkbox":e(this).is(":checked")?(e("#saswp-google-plus-enable").val(1),e("#sd_google_plus").show()):(e("#saswp-google-plus-enable").val(0),e("#sd_google_plus").hide());break;case"saswp-instagram-enable-checkbox":e(this).is(":checked")?(e("#saswp-instagram-enable").val(1),e("#sd_instagram").show()):(e("#saswp-instagram-enable").val(0),e("#sd_instagram").hide());break;case"saswp-youtube-enable-checkbox":e(this).is(":checked")?(e("#sd_youtube").show(),e("#saswp-youtube-enable").val(1)):(e("#saswp-youtube-enable").val(0),e("#sd_youtube").hide());break;case"saswp-linkedin-enable-checkbox":e(this).is(":checked")?(e("#saswp-linkedin-enable").val(1),e("#sd_linkedin").show()):(e("#saswp-linkedin-enable").val(0),e("#sd_linkedin").hide());break;case"saswp-pinterest-enable-checkbox":e(this).is(":checked")?(e("#saswp-pinterest-enable").val(1),e("#sd_pinterest").show()):(e("#saswp-pinterest-enable").val(0),e("#sd_pinterest").hide());break;case"saswp-soundcloud-enable-checkbox":e(this).is(":checked")?(e("#saswp-soundcloud-enable").val(1),e("#sd_soundcloud").show()):(e("#saswp-soundcloud-enable").val(0),e("#sd_soundcloud").hide());break;case"saswp-tumblr-enable-checkbox":e(this).is(":checked")?(e("#saswp-tumblr-enable").val(1),e("#sd_tumblr").show()):(e("#saswp-tumblr-enable").val(0),e("#sd_tumblr").hide());break;case"saswp-yelp-enable-checkbox":e(this).is(":checked")?(e("#saswp-yelp-enable").val(1),e("#sd_yelp").show()):(e("#saswp-yelp-enable").val(0),e("#sd_yelp").hide());break;case"saswp-for-amp-checkbox":e(this).is(":checked")?e("#saswp-for-amp").val(1):e("#saswp-for-amp").val(0);break;case"saswp_kb_contact_1_checkbox":e(this).is(":checked")?(e("#saswp_kb_contact_1").val(1),e("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").removeClass("saswp-display-none")):(e("#saswp_kb_contact_1").val(0),e("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").addClass("saswp-display-none"));break;case"saswp-logo-dimensions-check":e(this).is(":checked")?(e("#saswp-logo-dimensions").val(1),e("#saswp-logo-width, #saswp-logo-height").parent().parent("li").show()):(e("#saswp-logo-dimensions").val(0),e("#saswp-logo-width, #saswp-logo-height").parent().parent("li").hide());break;case"saswp_archive_schema_checkbox":e(this).is(":checked")?(e("#saswp_archive_schema").val(1),e(".saswp_archive_schema_type_class").parent().parent().show()):(e("#saswp_archive_schema").val(0),e(".saswp_archive_schema_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":e(this).is(":checked")?(e("#saswp_website_schema").val(1),e("#saswp_search_box_schema").parent().parent().show()):(e("#saswp_website_schema").val(0),e("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":e(this).is(":checked")?e("#saswp_search_box_schema").val(1):e("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_schema_checkbox":e(this).is(":checked")?e("#saswp_breadcrumb_schema").val(1):e("#saswp_breadcrumb_schema").val(0);break;case"saswp_comments_schema_checkbox":e(this).is(":checked")?e("#saswp_comments_schema").val(1):e("#saswp_comments_schema").val(0);break;case"saswp-compativility-checkbox":e(this).is(":checked")?e("#saswp-flexmlx-compativility").val(1):e("#saswp-flexmlx-compativility").val(0);break;case"saswp-review-module-checkbox":e(this).is(":checked")?e("#saswp-review-module").val(1):e("#saswp-review-module").val(0);break;case"saswp-kk-star-raring-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-kk-star-raring").val(1):e("#saswp-kk-star-raring").val(0);break;case"saswp-woocommerce-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-woocommerce").val(1):e("#saswp-woocommerce").val(0);break;case"saswp-extra-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-extra").val(1):e("#saswp-extra").val(0);break;case"saswp-dw-question-answer-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-dw-question-answer").val(1):e("#saswp-dw-question-answer").val(0);break;case"saswp-wp-job-manager-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-wp-job-manager").val(1):e("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-yoast").val(1):e("#saswp-yoast").val(0);break;case"saswp-rankmath-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-rankmath").val(1):e("#saswp-rankmath").val(0);break;case"saswp-tagyeem-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-tagyeem").val(1):e("#saswp-tagyeem").val(0);break;case"saswp-the-events-calendar-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-the-events-calendar").val(1):e("#saswp-the-events-calendar").val(0);break;case"saswp-homeland-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-homeland").val(1):e("#saswp-homeland").val(0);break;case"saswp-realhomes-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-realhomes").val(1):e("#saswp-realhomes").val(0);break;case"saswp-learn-press-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-learn-press").val(1):e("#saswp-learn-press").val(0);break;case"saswp-learn-dash-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-learn-dash").val(1):e("#saswp-learn-dash").val(0);break;case"saswp-lifter-lms-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-lifter-lms").val(1):e("#saswp-lifter-lms").val(0);break;case"saswp-wp-event-manager-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-wp-event-manager").val(1):e("#saswp-wp-event-manager").val(0);break;case"saswp-events-manager-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-events-manager").val(1):e("#saswp-events-manager").val(0);break;case"saswp-event-calendar-wd-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-event-calendar-wd").val(1):e("#saswp-event-calendar-wd").val(0);break;case"saswp-event-organiser-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-event-organiser").val(1):e("#saswp-event-organiser").val(0);break;case"saswp-modern-events-calendar-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-modern-events-calendar").val(1):e("#saswp-modern-events-calendar").val(0);break;case"saswp-woocommerce-booking-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?(e("#saswp-woocommerce-booking").val(1),e("#saswp-woocommerce-booking-main").val(1)):(e("#saswp-woocommerce-booking").val(0),e("#saswp-woocommerce-booking-main").val(0));break;case"saswp-woocommerce-booking-main-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?(e("#saswp-woocommerce-booking-main").val(1),e("#saswp-woocommerce-booking").val(1)):(e("#saswp-woocommerce-booking-main").val(0),e("#saswp-woocommerce-booking").val(0));break;case"saswp-woocommerce-membership-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-woocommerce-membership").val(1):e("#saswp-woocommerce-membership").val(0);break;case"saswp-defragment-checkbox":e(this).is(":checked")?e("#saswp-defragment").val(1):e("#saswp-defragment").val(0);break;case"saswp-cooked-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-cooked").val(1):e("#saswp-cooked").val(0);break;case"saswp-flexmlx-compativility-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-flexmlx-compativility").val(1):e("#saswp-flexmlx-compativility").val(0);break;case"saswp-shopper-approved-review-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?(e("#saswp-shopper-approved-review").val(1),e(".saswp-s-reviews-settings-table").parent().parent().parent().show()):(e("#saswp-shopper-approved-review").val(0),e(".saswp-s-reviews-settings-table").parent().parent().parent().hide());break;case"saswp-google-review-checkbox":e(this).is(":checked")?(e("#saswp-google-review").val(1),e("#saswp-google-rv-free-checkbox").length?(e("#saswp-google-review-free").parent().parent().show(),e("#saswp-google-rv-free-checkbox").is(":checked")?e("#saswp_google_place_api_key").parent().parent().show():e("#saswp_google_place_api_key").parent().parent().hide()):e("#saswp_google_place_api_key").parent().parent().show(),e(".saswp-g-reviews-settings-table").parent().parent().parent().show()):(e("#saswp-google-review").val(0),e("#saswp_google_place_api_key").parent().parent().hide(),e(".saswp-g-reviews-settings-table").parent().parent().parent().hide(),e("#saswp-google-rv-free-checkbox").length&&e("#saswp-google-review-free").parent().parent().hide());break;case"saswp-google-rv-free-checkbox":e("#saswp-google-review-checkbox").is(":checked")&&e(this).is(":checked")?(e("#saswp-google-review-free").val(1),e("#saswp_google_place_api_key").parent().parent().show()):(e("#saswp-google-review-free").val(0),e("#saswp_google_place_api_key").parent().parent().hide());break;case"saswp-markup-footer-checkbox":e(this).is(":checked")?e("#saswp-markup-footer").val(1):e("#saswp-markup-footer").val(0);break;case"saswp-pretty-print-checkbox":e(this).is(":checked")?e("#saswp-pretty-print").val(1):e("#saswp-pretty-print").val(0);break;case"saswp-wppostratings-raring-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-wppostratings-raring").val(1):e("#saswp-wppostratings-raring").val(0);break;case"saswp-bbpress-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-bbpress").val(1):e("#saswp-bbpress").val(0);break;case"saswp-microdata-cleanup-checkbox":e(this).is(":checked")?e("#saswp-microdata-cleanup").val(1):e("#saswp-microdata-cleanup").val(0)}}).change(),e("#saswp_kb_type").change(function(){var s=e(this).val();e(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass("saswp_hide"),e(".saswp_kg_logo").parent().parent().parent().addClass("saswp_hide"),e("#sd-person-image").parent().parent().parent().addClass("saswp_hide"),"Organization"==s&&(e(".saswp_org_fields").parent().parent().removeClass("saswp_hide"),e(".saswp_person_fields").parent().parent().addClass("saswp_hide"),e(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),e("#sd-person-image").parent().parent().parent().addClass("saswp_hide")),"Person"==s&&(e(".saswp_org_fields").parent().parent().addClass("saswp_hide"),e(".saswp_person_fields").parent().parent().removeClass("saswp_hide"),e(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),e("#sd-person-image").parent().parent().parent().removeClass("saswp_hide"))}).change(),e(document).on("click","input[data-id=media]",function(s){s.preventDefault();var a=e(this),t=a.attr("id").replace("_button",""),i=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1,library:{type:"image"}}).on("select",function(){var s=i.state().get("selection").first().toJSON();e("#"+t).val(s.url),e("input[data-id='"+t+"_id']").val(s.id),e("input[data-id='"+t+"_height']").val(s.height),e("input[data-id='"+t+"_width']").val(s.width),e("input[data-id='"+t+"_thumbnail']").val(s.url),"sd_default_image_button"===a.attr("id")&&(e("#sd_default_image_width").val(s.width),e("#sd_default_image_height").val(s.height));var p="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&s.height<1200&&(p='<p class="saswp_warning">Image size is smaller than recommended size</p>'),e(".saswp_image_div_"+t).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+s.url+'"/><a data-id="'+t+'" href="#" class="saswp_prev_close">X</a></div>'+p)}).open()}),e(document).on("click",".saswp_prev_close",function(s){s.preventDefault();var a=e(this).attr("data-id");console.log(a),e(this).parent().remove(),e("#"+a).val(""),e("input[data-id='"+a+"_id']").val(""),e("input[data-id='"+a+"_height']").val(""),e("input[data-id='"+a+"_width']").val(""),e("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(e("#sd_default_image_width").val(""),e("#sd_default_image_height").val(""))}),e(document).on("change",".saswp-schema-type-toggle",function(s){var a=e(this).attr("data-schema-id"),t=e(this).attr("data-post-id");if(e(this).is(":checked"))var i=1;else i=0;e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_enable_disable_schema_on_post",status:i,schema_id:a,post_id:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){},error:function(e){console.log(e)}})}),e(document).on("click",".saswp-reset-data",function(s){s.preventDefault(),1==confirm("Are you sure?")&&e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){setTimeout(function(){location.reload()},1e3)},error:function(e){console.log(e)}})}),e(document).on("click",".saswp_license_activation",function(s){s.preventDefault();var a=e(this);a.addClass("updating-message");var t=e(this).attr("license-status"),i=e(this).attr("add-on"),p=e("#"+i+"_addon_license_key").val();t&&i&&p?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:p,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){e("#"+i+"_addon_license_key_status").val(s.status),"active"==s.status?(e(".saswp-"+i+"-dashicons").addClass("dashicons-yes"),e(".saswp-"+i+"-dashicons").removeClass("dashicons-no-alt"),e(".saswp-"+i+"-dashicons").css("color","green"),e(".saswp_license_activation[add-on='"+i+"']").attr("license-status","inactive"),e(".saswp_license_activation[add-on='"+i+"']").text("Deactivate"),e(".saswp_license_status_msg[add-on='"+i+"']").text("Activated"),e(".saswp_license_status_msg[add-on='"+i+"']").css("color","green"),e(".saswp_license_status_msg[add-on='"+i+"']").text(s.message)):(e(".saswp-"+i+"-dashicons").addClass("dashicons-no-alt"),e(".saswp-"+i+"-dashicons").removeClass("dashicons-yes"),e(".saswp-"+i+"-dashicons").css("color","red"),e(".saswp_license_activation[add-on='"+i+"']").attr("license-status","active"),e(".saswp_license_activation[add-on='"+i+"']").text("Activate"),e(".saswp_license_status_msg[add-on='"+i+"']").css("color","red"),e(".saswp_license_status_msg[add-on='"+i+"']").text(s.message)),a.removeClass("updating-message")},error:function(e){console.log(e)}}):(alert("Please enter value license key"),a.removeClass("updating-message"))}),e(".saswp-send-query").on("click",function(s){s.preventDefault();var a=e("#saswp_query_message").val();""!=e.trim(a)?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_send_query_message",message:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(e(".saswp-query-success").show(),e(".saswp-query-error").hide()):(console.log("dd"),e(".saswp-query-success").hide(),e(".saswp-query-error").show())},error:function(e){console.log(e)}}):alert("Please enter the message")}),e(".saswp-import-plugins").on("click",function(s){s.preventDefault();var a=e(this);a.addClass("updating-message");var t=e(this).attr("data-id");e.get(ajaxurl,{action:"saswp_import_plugin_data",plugin_name:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){"t"==s.status?(e(a).parent().find(".saswp-imported-message").text(s.message),e(a).parent().find(".saswp-imported-message").removeClass("saswp-error"),setTimeout(function(){location.reload()},2e3)):(e(a).parent().find(".saswp-imported-message").addClass("saswp-error"),e(a).parent().find(".saswp-imported-message").text(s.message)),a.removeClass("updating-message")},"json")}),e(".saswp-feedback-no-thanks").on("click",function(s){s.preventDefault(),e.get(ajaxurl,{action:"saswp_feeback_no_thanks",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){"t"==s.status&&e(".saswp-feedback-notice").hide()},"json")}),e(".saswp-feedback-remindme").on("click",function(s){s.preventDefault(),e.get(ajaxurl,{action:"saswp_feeback_remindme",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){"t"==s.status&&e(".saswp-feedback-notice").hide()},"json")}),e(document).on("change",".saswp-local-business-type-select",function(s){s.preventDefault();var a=e(this),t=e(this).val();e.get(ajaxurl,{action:"saswp_get_sub_business_ajax",business_type:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){if("t"==s.status){e(".saswp-local-business-name-select").parents("tr").remove();var t=a.parents(".saswp-post-specific-wrapper").attr("data-id"),i='<tr><th><label for="saswp_business_name_'+t+'">Sub Business Type</label></th>';i+='<td><select class="saswp-local-business-name-select" id="saswp_business_name_'+t+'" name="saswp_business_name_'+t+'">',e.each(s.result,function(e,s){i+='<option value="'+e+'">'+s+"</option>"}),i+="</select></td>",i+="</tr>",a.parents(".form-table tr:first").after(i)}else e(".saswp-local-business-name-select").parents("tr").remove()},"json")}),saswp_item_reviewed_call(),e(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),e(document).on("click",".saswp-add-custom-schema",function(s){s.preventDefault(),e(".saswp-add-custom-schema-field").removeClass("saswp_hide"),e(this).hide()}),e(document).on("click",".saswp-delete-custom-schema",function(s){s.preventDefault(),e("#saswp_custom_schema_field").val(""),e(".saswp-add-custom-schema-field").addClass("saswp_hide"),e(".saswp-add-custom-schema").show()}),e(".saswp-modify_schema_post_enable").on("click",function(s){var a=e(this);a.addClass("updating-message"),s.preventDefault(),e.get(ajaxurl,{action:"saswp_modify_schema_post_enable",post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){a.remove(),e(".saswp-add-custom-schema-div").remove(),e("#post_specific .inside").append(s),a.removeClass("updating-message"),saswpAddTimepicker(),saswp_schema_datepicker(),saswp_enable_rating_review(),saswp_item_reviewed_call()})}),saswp_schema_datepicker(),saswp_reviews_datepicker(),e(document).on("click",".saswp-add-more-item",function(s){s.preventDefault();var a=e(".saswp-review-item-list-table tr").length;console.log(a);e(".saswp-review-item-list-table").append('<tr class="saswp-review-item-tr"><td>Review Item Feature</td><td><input type="text" name="saswp-review-item-feature[]"></td><td>Rating</td><td><input step="0.1" min="0" max="5" type="number" name="saswp-review-item-star-rating[]"></td><td><a type="button" class="saswp-remove-review-item button">x</a></td></tr>')}),e(document).on("click",".saswp-remove-review-item",function(s){s.preventDefault(),e(this).parent().parent("tr").remove()}),e(document).on("focusout",".saswp-review-item-tr input[type=number]",function(s){s.preventDefault();var a=0,t=e(".saswp-review-item-tr input[type=number]").length;e(".saswp-review-item-tr input[type=number]").each(function(s,t){""==e(t).val()?a+=parseFloat(0):a+=parseFloat(e(t).val())});var i=a/t;e("#saswp-review-item-over-all").val(i)}),e("#saswp-review-location").change(function(){var s=e(this).val();e(".saswp-review-shortcode").addClass("saswp_hide"),3==s&&e(".saswp-review-shortcode").removeClass("saswp_hide")}).change(),e("#saswp-review-item-enable").change(function(){e(this).is(":checked")?e(".saswp-review-fields").show():e(".saswp-review-fields").hide()}).change(),e(document).on("click",".saswp-restore-post-schema",function(s){s.preventDefault();var a=e(this);if(a.addClass("updating-message"),e(".saswp-post-specific-schema-ids").val())var t=JSON.parse(e(".saswp-post-specific-schema-ids").val());e.post(ajaxurl,{action:"saswp_restore_schema",schema_ids:t,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status?setTimeout(function(){location.reload()},1e3):(alert(e.msg),setTimeout(function(){location.reload()},1e3)),a.removeClass("updating-message")},"json")}),e(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(s){s.preventDefault();var a=e(this).attr("data-id");e(".saswp-post-specific-wrapper").hide(),e("#"+a).show(),e("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),e("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),e(this).addClass("selected"),e(this).parent().addClass("selected"),saswp_enable_rating_review()}),e("#saswp-global-tabs a:first").addClass("saswp-global-selected"),e(".saswp-global-container").hide(),"#saswp-default-container"==window.location.hash?e(".saswp-global-container:eq(2)").show():e(".saswp-global-container:first").show(),e("#saswp-global-tabs a").click(function(){var s=e(this).attr("data-id");e(this).hasClass("saswp-global-selected")||(e("#saswp-global-tabs a").removeClass("saswp-global-selected"),e(this).addClass("saswp-global-selected"),e(".saswp-global-container").hide(),e("#"+s).show())}),e("#saswp-tools-tabs a:first").addClass("saswp-global-selected"),e(".saswp-tools-container").hide(),e(".saswp-tools-container:first").show(),e("#saswp-tools-tabs a").click(function(){var s=e(this).attr("data-id");e(this).hasClass("saswp-global-selected")||(e("#saswp-tools-tabs a").removeClass("saswp-global-selected"),e(this).addClass("saswp-global-selected"),e(".saswp-tools-container").hide(),e("#"+s).show())}),e("#saswp-review-tabs a:first").addClass("saswp-global-selected"),e(".saswp-review-container").hide(),e(".saswp-review-container:first").show(),e("#saswp-review-tabs a").click(function(){var s=e(this).attr("data-id");e(this).hasClass("saswp-global-selected")||(e("#saswp-review-tabs a").removeClass("saswp-global-selected"),e(this).addClass("saswp-global-selected"),e(".saswp-review-container").hide(),e("#"+s).show())}),e("#saswp-compatibility-tabs a:first").addClass("saswp-global-selected"),e(".saswp-compatibility-container").hide(),e(".saswp-compatibility-container:first").show(),e("#saswp-compatibility-tabs a").click(function(){var s=e(this).attr("data-id");e(this).hasClass("saswp-global-selected")||(e("#saswp-compatibility-tabs a").removeClass("saswp-global-selected"),e(this).addClass("saswp-global-selected"),e(".saswp-compatibility-container").hide(),e("#"+s).show())}),e('a[href="'+saswp_localize_data.new_url_selector+'"]').attr("href",saswp_localize_data.new_url_href),e("#saswp_enable_custom_field").change(function(){e(this).is(":checked")?e(".saswp-custom-fields-div").show():e(".saswp-custom-fields-div").hide()}),e(document).on("change",".saswp-custom-fields-name",function(){var s="text",a=e(this).parent().parent("tr"),t=e(this).val();-1==t.indexOf("image")&&-1==t.indexOf("logo")||(s="image"),saswp_get_meta_list(null,s,null,e(this).parent().parent("tr").find("td:eq(1)"),t,a)}),e(document).on("click",".saswp-skip-button",function(s){s.preventDefault(),e(this).parent().parent().hide(),e.post(ajaxurl,{action:"saswp_skip_wizard",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){},"json")}),e(document).on("click",".saswp_add_schema_fields_on_fly",function(s){s.preventDefault();var a=e(this);a.addClass("updating-message");var t=e(this).attr("data-id"),i=e(this).attr("fields_type"),p=e(this).attr("div_type"),o=e(".saswp-"+p+"-table-div").length,n=e(".saswp-"+p+"-table-div:nth-child("+o+")").attr("data-id");(n=++n)||(n=0),saswp_get_post_specific_schema_fields(a,n,i,p,t,i+"_")}),e(document).on("click",".saswp-table-close",function(){e(this).parent().remove()}),e(document).on("click",".saswp-rmv-modify_row",function(s){s.preventDefault(),e(this).parent().parent().remove()}),e(document).on("change",".saswp-custom-meta-list",function(){var s=e(this),a=e("select#schema_type option:selected").val(),t=e(this).val(),i=e(this).parent().parent("tr").find(".saswp-custom-fields-name").val(),p="",o=a.toLowerCase()+"_"+i,n="saswp_fixed_image["+i+"]";"manual_text"==t?(p+='<td><input type="text" name="saswp_fixed_text['+i+']"></td>',p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',e(this).parent().parent("tr").find("td:gt(1)").remove(),e(this).parent().parent("tr").append(p),saswpCustomSelect2()):"taxonomy_term"==t?saswp_taxonomy_term.taxonomy?(p+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,i),s.parent().parent("tr").find("td:gt(1)").remove(),s.parent().parent("tr").append(p),saswpCustomSelect2()):e.get(ajaxurl,{action:"saswp_get_taxonomy_term_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){e&&(saswp_taxonomy_term.taxonomy=e,p+=saswp_taxonomy_term_html(e,i),s.parent().parent("tr").find("td:gt(1)").remove(),s.parent().parent("tr").append(p),saswpCustomSelect2())},"json"):"custom_field"==t?(p+='<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+i+']">',p+="</select></td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',e(this).parent().parent("tr").find("td:gt(1)").remove(),e(this).parent().parent("tr").append(p),saswpCustomSelect2()):"fixed_image"==t?(p+="<td>",p+="<fieldset>",p+='<input data-id="media" style="width: 30%;" class="button" id="'+o+'_button" name="'+o+'_button" type="button" value="Upload" />',p+='<input type="hidden" data-id="'+o+'_height" class="upload-height" name="'+n+'[height]" id="'+o+'_height" value="">',p+='<input type="hidden" data-id="'+o+'_width" class="upload-width" name="'+n+'[width]" id="'+o+'_width" value="">',p+='<input type="hidden" data-id="'+o+'_thumbnail" class="upload-thumbnail" name="'+n+'[thumbnail]" id="'+o+'_thumbnail" value="">',p+='<div class="saswp_image_div_'+o+'">',p+="</div>",p+="</fieldset>",p+="</td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',e(this).parent().parent("tr").find("td:gt(1)").remove(),e(this).parent().parent("tr").append(p),saswpCustomSelect2()):(p+="<td></td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',e(this).parent().parent("tr").find("td:gt(1)").remove(),e(this).parent().parent("tr").append(p),saswpCustomSelect2())}),e(document).on("change",".saswp-item-reivewed-list",function(){e(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[]}),e(document).on("click",".saswp-add-custom-fields",function(){var s=e(this);s.addClass("updating-message");var a=e("select#schema_type option:selected").val(),t="";"Review"==a&&(t=e("select.saswp-item-reivewed-list option:selected").val());var i=e("#post_ID").val();""!=a&&(saswp_meta_list_fields[a]?saswp_get_meta_list(s,"text",saswp_meta_list_fields[a],null,null,null):e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:i,schema_type:a,schema_subtype:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){saswp_meta_list_fields[a]=e,saswp_get_meta_list(s,"text",saswp_meta_list_fields[a],null,null,null)},error:function(e){console.log(e)}}))}),saswpCustomSelect2(),saswp_enable_rating_review(),e('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),e(document).on("click",".saswp_coonect_google_place",function(){var s=e("#saswp_google_place_id").val(),a=e("#saswp_language_list").val(),t=e("#saswp_googel_api").val();""!=s&&e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:s,language:a,google_api:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){console.log(e.status)},error:function(e){console.log(e)}})}),"saswp"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>"),"undefined"!=typeof saswp_reviews_data&&e(".saswp-rating-div").rateYo({rating:saswp_reviews_data.rating_val,halfStar:!0,readOnly:saswp_reviews_data.readonly,onSet:function(s,a){e(this).next().val(s),console.log(s)}}),e("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var s=e(this);s.parent().find(".saswp-phone-validation").remove();var a=e(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(a)?s.parent().find(".saswp-phone-validation").remove():s.after('<span style="color:red;" class="saswp-phone-validation">Invalid Phone Number</span>')})});
|
admin_section/settings.php
CHANGED
@@ -162,6 +162,12 @@ function saswp_admin_interface_render(){
|
|
162 |
echo "<div class='saswp-compatibility' ".( $tab != 'compatibility' ? 'style="display:none;"' : '').">";
|
163 |
// Status
|
164 |
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
do_settings_sections( 'saswp_compatibility_section' ); // Page slug
|
166 |
echo "</div>";
|
167 |
|
@@ -415,7 +421,38 @@ function saswp_premium_features_callback(){ ?>
|
|
415 |
|
416 |
$cooked_active_text = '';
|
417 |
|
418 |
-
if(is_plugin_active('
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
419 |
$cooked_active_text = '<label class="saswp-sts-txt">Status :<span style="color:green;">Active</span></label>';
|
420 |
}else{
|
421 |
$cooked_active_text .='<label class="saswp-sts-txt">Status :<span>Inactive</span></label>';
|
@@ -1481,11 +1518,16 @@ function saswp_import_callback(){
|
|
1481 |
$add_on[] = 'Cs';
|
1482 |
|
1483 |
}
|
1484 |
-
if(is_plugin_active('event-schema/event-schema.php')){
|
1485 |
|
1486 |
$add_on[] = 'Es';
|
1487 |
|
1488 |
-
}
|
|
|
|
|
|
|
|
|
|
|
1489 |
|
1490 |
if(!empty($add_on)){
|
1491 |
|
@@ -1612,6 +1654,14 @@ function saswp_get_license_section_html($on, $license_key, $license_status, $lic
|
|
1612 |
$response.= '<strong>'.esc_html__('Event Schema','schema-and-structured-data-for-wp').'</strong>';
|
1613 |
$response.= '</div>';
|
1614 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1615 |
}
|
1616 |
|
1617 |
if($license_status == 'active'){
|
@@ -1795,6 +1845,7 @@ function saswp_compatibility_page_callback(){
|
|
1795 |
'name' => 'saswp-tagyeem-checkbox',
|
1796 |
'type' => 'checkbox',
|
1797 |
'class' => 'checkbox saswp-checkbox',
|
|
|
1798 |
'hidden' => array(
|
1799 |
'id' => 'saswp-tagyeem',
|
1800 |
'name' => 'sd_data[saswp-tagyeem]',
|
@@ -1830,7 +1881,8 @@ function saswp_compatibility_page_callback(){
|
|
1830 |
'id' => 'saswp-homeland-checkbox',
|
1831 |
'name' => 'saswp-homeland-checkbox',
|
1832 |
'type' => 'checkbox',
|
1833 |
-
'class' => 'checkbox saswp-checkbox',
|
|
|
1834 |
'hidden' => array(
|
1835 |
'id' => 'saswp-homeland',
|
1836 |
'name' => 'sd_data[saswp-homeland]',
|
@@ -1841,7 +1893,8 @@ function saswp_compatibility_page_callback(){
|
|
1841 |
'id' => 'saswp-realhomes-checkbox',
|
1842 |
'name' => 'saswp-realhomes-checkbox',
|
1843 |
'type' => 'checkbox',
|
1844 |
-
'class' => 'checkbox saswp-checkbox',
|
|
|
1845 |
'hidden' => array(
|
1846 |
'id' => 'saswp-realhomes',
|
1847 |
'name' => 'sd_data[saswp-realhomes]',
|
@@ -2000,6 +2053,54 @@ function saswp_compatibility_page_callback(){
|
|
2000 |
'name' => 'sd_data[saswp-wp-recipe-maker]',
|
2001 |
)
|
2002 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2003 |
|
2004 |
$the_events_calendar = array(
|
2005 |
'label' => 'The Events Calendar',
|
@@ -2013,15 +2114,14 @@ function saswp_compatibility_page_callback(){
|
|
2013 |
'name' => 'sd_data[saswp-the-events-calendar]',
|
2014 |
)
|
2015 |
);
|
2016 |
-
|
2017 |
-
|
2018 |
$kk_star = array(
|
2019 |
'label' => 'kk Star Ratings',
|
2020 |
'id' => 'saswp-kk-star-raring-checkbox',
|
2021 |
'name' => 'saswp-kk-star-raring-checkbox',
|
2022 |
'type' => 'checkbox',
|
2023 |
'class' => 'checkbox saswp-checkbox',
|
2024 |
-
'note' => saswp_get_field_note('
|
2025 |
'hidden' => array(
|
2026 |
'id' => 'saswp-kk-star-raring',
|
2027 |
'name' => 'sd_data[saswp-kk-star-raring]',
|
@@ -2033,7 +2133,7 @@ function saswp_compatibility_page_callback(){
|
|
2033 |
'name' => 'saswp-wppostratings-raring-checkbox',
|
2034 |
'type' => 'checkbox',
|
2035 |
'class' => 'checkbox saswp-checkbox',
|
2036 |
-
'note' => saswp_get_field_note('
|
2037 |
'hidden' => array(
|
2038 |
'id' => 'saswp-wppostratings-raring',
|
2039 |
'name' => 'sd_data[saswp-wppostratings-raring]',
|
@@ -2057,6 +2157,7 @@ function saswp_compatibility_page_callback(){
|
|
2057 |
'name' => 'saswp-woocommerce-booking-checkbox',
|
2058 |
'type' => 'checkbox',
|
2059 |
'class' => 'checkbox saswp-checkbox',
|
|
|
2060 |
'hidden' => array(
|
2061 |
'id' => 'saswp-woocommerce-booking',
|
2062 |
'name' => 'sd_data[saswp-woocommerce-booking]',
|
@@ -2082,6 +2183,7 @@ function saswp_compatibility_page_callback(){
|
|
2082 |
'name' => 'saswp-woocommerce-membership-checkbox',
|
2083 |
'type' => 'checkbox',
|
2084 |
'class' => 'checkbox saswp-checkbox',
|
|
|
2085 |
'hidden' => array(
|
2086 |
'id' => 'saswp-woocommerce-membership',
|
2087 |
'name' => 'sd_data[saswp-woocommerce-membership]',
|
@@ -2094,6 +2196,7 @@ function saswp_compatibility_page_callback(){
|
|
2094 |
'name' => 'saswp-extra-checkbox',
|
2095 |
'type' => 'checkbox',
|
2096 |
'class' => 'checkbox saswp-checkbox',
|
|
|
2097 |
'hidden' => array(
|
2098 |
'id' => 'saswp-extra',
|
2099 |
'name' => 'sd_data[saswp-extra]',
|
@@ -2148,39 +2251,21 @@ function saswp_compatibility_page_callback(){
|
|
2148 |
'id' => 'saswp-rankmath',
|
2149 |
'name' => 'sd_data[saswp-rankmath]',
|
2150 |
)
|
2151 |
-
);
|
2152 |
-
|
2153 |
-
|
2154 |
-
if(get_template() != 'homeland' ){
|
2155 |
-
|
2156 |
-
$homeland_theme['note'] = esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/homeland-responsive-real-estate-theme-for-wordpress/6518965">Homeland</a>';
|
2157 |
-
|
2158 |
-
}
|
2159 |
-
if(get_template() != 'realhomes' ){
|
2160 |
-
|
2161 |
-
$real_homes['note'] = esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/real-homes-wordpress-real-estate-theme/5373914">RealHomes</a>';
|
2162 |
-
|
2163 |
-
}
|
2164 |
-
|
2165 |
-
if(!is_plugin_active('taqyeem/taqyeem.php') || get_template() != 'jannah' ){
|
2166 |
-
|
2167 |
-
$tagyeem['note'] = esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://codecanyon.net/item/taqyeem-wordpress-review-plugin/4558799">Taqyeem</a>';
|
2168 |
-
|
2169 |
-
}
|
2170 |
-
|
2171 |
-
if(!is_plugin_active('woocommerce/woocommerce.php') || !is_plugin_active('woocommerce-bookings/woocommerce-bookings.php')){
|
2172 |
-
|
2173 |
-
$woocommerce_bok['note'] = esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/woocommerce/">Woocommerce</a>';
|
2174 |
-
|
2175 |
-
}
|
2176 |
-
|
2177 |
-
if(!is_plugin_active('woocommerce/woocommerce.php') || !is_plugin_active('woocommerce-memberships/woocommerce-memberships.php')){
|
2178 |
-
|
2179 |
-
$woocommerce_mem['note'] = esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/woocommerce/">Woocommerce</a>';
|
2180 |
-
|
2181 |
-
}
|
2182 |
-
|
2183 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2184 |
if(!is_plugin_active('woocommerce-compatibility-for-schema/woocommerce-compatibility-for-schema.php')){
|
2185 |
|
2186 |
$woocommerce_bok['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="http://structured-data-for-wp.com/woocommerce-compatibility-for-schema/">Woocommerce Addon</a>';
|
@@ -2208,23 +2293,25 @@ function saswp_compatibility_page_callback(){
|
|
2208 |
|
2209 |
}
|
2210 |
|
2211 |
-
if(!is_plugin_active('event-schema/event-schema.php')){
|
2212 |
|
2213 |
-
$the_events_calendar['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/
|
2214 |
-
$events_calendar_wd['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/
|
2215 |
-
$wp_event_manager['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/
|
2216 |
-
$events_manager['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/
|
2217 |
-
$event_organiser['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/
|
2218 |
-
$modern_events_calendar['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/
|
2219 |
|
2220 |
}
|
2221 |
-
|
2222 |
-
|
2223 |
-
|
2224 |
-
$
|
2225 |
-
|
|
|
|
|
2226 |
|
2227 |
-
|
2228 |
|
2229 |
$field_objs = new saswp_fields_generator();
|
2230 |
|
@@ -2246,6 +2333,10 @@ function saswp_compatibility_page_callback(){
|
|
2246 |
$aiosp,
|
2247 |
$squirrly_seo,
|
2248 |
$recipe_maker,
|
|
|
|
|
|
|
|
|
2249 |
$rankmath,
|
2250 |
$homeland_theme,
|
2251 |
$real_homes,
|
@@ -2257,109 +2348,144 @@ function saswp_compatibility_page_callback(){
|
|
2257 |
$events_manager,
|
2258 |
$events_calendar_wd,
|
2259 |
$event_organiser,
|
2260 |
-
$modern_events_calendar
|
|
|
2261 |
|
2262 |
-
);
|
2263 |
-
|
2264 |
-
|
2265 |
-
|
2266 |
-
echo '</div>';
|
2267 |
-
echo '<p>'.esc_html__('These are the list of plugin\'s name which are compatible with Schema & Structured Data For WP.','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/docs/article-categories/compatibility/">Learn More</a></p>';
|
2268 |
-
|
2269 |
-
$field_objs->saswp_field_generator($meta_fields, $settings);
|
2270 |
-
|
2271 |
-
|
2272 |
-
if ( is_plugin_active('flexmls-idx/flexmls_connect.php')) {
|
2273 |
-
$meta_fields_default = array(
|
2274 |
-
array(
|
2275 |
-
'label' => 'FlexMLS IDX Plugin',
|
2276 |
-
'id' => 'saswp-flexmlx-compativility-checkbox',
|
2277 |
-
'name' => 'saswp-flexmlx-compativility-checkbox',
|
2278 |
-
'type' => 'checkbox',
|
2279 |
-
'class' => 'checkbox saswp-checkbox',
|
2280 |
-
'hidden' => array(
|
2281 |
-
'id' => 'saswp-flexmlx-compativility',
|
2282 |
-
'name' => 'sd_data[saswp-flexmlx-compativility]',
|
2283 |
-
)
|
2284 |
-
),
|
2285 |
-
);
|
2286 |
-
}else{
|
2287 |
-
|
2288 |
-
$meta_fields_default = array(
|
2289 |
-
array(
|
2290 |
-
'label' => 'FlexMLS IDX',
|
2291 |
-
'id' => 'saswp-flexmlx-compativility-checkbox',
|
2292 |
-
'name' => 'saswp-flexmlx-compativility-checkbox',
|
2293 |
-
'type' => 'checkbox',
|
2294 |
-
'class' => 'checkbox saswp-checkbox',
|
2295 |
-
'note' => 'Requires <a target="_blank" href="https://wordpress.org/plugins/flexmls-idx/">FlexMLS IDX</a>',
|
2296 |
-
'hidden' => array(
|
2297 |
-
'id' => 'saswp-flexmlx-compativility',
|
2298 |
-
'name' => 'sd_data[saswp-flexmlx-compativility]',
|
2299 |
-
)
|
2300 |
-
),
|
2301 |
-
);
|
2302 |
-
}
|
2303 |
-
$meta_fields_text = array();
|
2304 |
-
$meta_fields_text[] = array(
|
2305 |
'label' => 'Name',
|
2306 |
'id' => 'sd-seller-name',
|
2307 |
'name' => 'sd_data[sd-seller-name]',
|
2308 |
'class' => 'regular-text',
|
2309 |
'type' => 'text',
|
2310 |
);
|
2311 |
-
$
|
2312 |
'label' => 'Addres',
|
2313 |
'id' => 'sd-seller-address',
|
2314 |
'name' => 'sd_data[sd-seller-address]',
|
2315 |
'class' => 'regular-text',
|
2316 |
'type' => 'text',
|
2317 |
);
|
2318 |
-
$
|
2319 |
'label' => 'Telephone',
|
2320 |
'id' => 'sd-seller-telephone',
|
2321 |
'name' => 'sd_data[sd-seller-telephone]',
|
2322 |
'class' => 'regular-text',
|
2323 |
'type' => 'text',
|
2324 |
);
|
2325 |
-
$
|
2326 |
'label' => 'Price Range',
|
2327 |
'id' => 'sd-seller-price-range',
|
2328 |
'name' => 'sd_data[sd-seller-price-range]',
|
2329 |
'class' => 'regular-text',
|
2330 |
'type' => 'text',
|
2331 |
);
|
2332 |
-
$
|
2333 |
'label' => 'URL',
|
2334 |
'id' => 'sd-seller-url',
|
2335 |
'name' => 'sd_data[sd-seller-url]',
|
2336 |
'class' => 'regular-text',
|
2337 |
'type' => 'text',
|
2338 |
);
|
2339 |
-
$
|
2340 |
'label' => 'Image',
|
2341 |
'id' => 'sd_seller_image',
|
2342 |
'name' => 'sd_data[sd_seller_image][url]',
|
2343 |
'class' => 'saswp-sd_seller_image',
|
2344 |
'type' => 'media',
|
2345 |
-
);
|
2346 |
-
|
2347 |
-
|
2348 |
-
|
2349 |
-
|
2350 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2351 |
|
2352 |
-
|
2353 |
-
|
|
|
|
|
2354 |
|
2355 |
-
|
|
|
|
|
|
|
|
|
|
|
2356 |
|
2357 |
-
|
2358 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2359 |
|
2360 |
}
|
2361 |
|
2362 |
-
|
2363 |
function saswp_support_page_callback(){
|
2364 |
|
2365 |
?>
|
@@ -2454,8 +2580,8 @@ add_action( 'admin_enqueue_scripts', 'saswp_enqueue_style_js' );
|
|
2454 |
function saswp_get_field_note($pname){
|
2455 |
|
2456 |
$notes = array(
|
2457 |
-
'
|
2458 |
-
'
|
2459 |
'bb_press' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/bbpress/">bbPress</a>',
|
2460 |
'woocommerce' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/woocommerce/">Woocommerce</a>',
|
2461 |
'cooked' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/cooked/">Cooked</a>',
|
@@ -2469,6 +2595,7 @@ function saswp_get_field_note($pname){
|
|
2469 |
'aiosp' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/all-in-one-seo-pack/">All in One SEO Pack</a>',
|
2470 |
'squirrly_seo' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/squirrly-seo/">Squirrly SEO</a>',
|
2471 |
'wp_recipe_maker' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-recipe-maker/">WP Recipe Maker</a>',
|
|
|
2472 |
'learn_press' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/learnpress/">Learn Press</a>',
|
2473 |
'learn_dash' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://www.learndash.com/pricing-and-purchase/">Learn Dash</a>',
|
2474 |
'lifter_lms' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/lifterlms/">LifterLMS</a>',
|
@@ -2477,9 +2604,21 @@ function saswp_get_field_note($pname){
|
|
2477 |
'event_calendar_wd' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/event-calendar-wd/">Event Calendar WD</a>',
|
2478 |
'event_organiser' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/event-organiser/">Event Organiser</a>',
|
2479 |
'modern_events_calendar' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/modern-events-calendar-lite/">Modern Events Calendar Lite</a>',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2480 |
);
|
2481 |
-
|
2482 |
-
|
|
|
|
|
2483 |
|
2484 |
return $notes[$pname];
|
2485 |
|
162 |
echo "<div class='saswp-compatibility' ".( $tab != 'compatibility' ? 'style="display:none;"' : '').">";
|
163 |
// Status
|
164 |
|
165 |
+
echo '<div id="saswp-compatibility-tabs" style="margin-top: 10px;">';
|
166 |
+
|
167 |
+
echo '<a data-id="saswp-active-compatibility-container">'.esc_html__('Active','schema-and-structured-data-for-wp').'</a> | <a data-id="saswp-inactive-compatibility-container">'.esc_html__('InActive','schema-and-structured-data-for-wp').'</a>';
|
168 |
+
|
169 |
+
echo'</div> ';
|
170 |
+
|
171 |
do_settings_sections( 'saswp_compatibility_section' ); // Page slug
|
172 |
echo "</div>";
|
173 |
|
421 |
|
422 |
$cooked_active_text = '';
|
423 |
|
424 |
+
if(is_plugin_active('recipe-schema-for-saswp/recipe-schema-for-saswp.php')){
|
425 |
+
$cooked_active_text = '<label class="saswp-sts-txt">Status :<span style="color:green;">Active</span></label>';
|
426 |
+
}else{
|
427 |
+
$cooked_active_text .='<label class="saswp-sts-txt">Status :<span>Inactive</span></label>';
|
428 |
+
$cooked_active_text .='<a target="_blank" href="http://structured-data-for-wp.com/extensions/"><span class="saswp-d-btn">Download</span></a>';
|
429 |
+
}
|
430 |
+
|
431 |
+
?>
|
432 |
+
|
433 |
+
<div class="saswp-features-ele">
|
434 |
+
<div class="saswp-ele-ic" style="background: #509207;">
|
435 |
+
<img src="<?php echo SASWP_PLUGIN_URL; ?>/admin_section/images/recipe.png">
|
436 |
+
</div>
|
437 |
+
<div class="saswp-ele-tlt">
|
438 |
+
<h3><?php echo esc_html__('Recipe Schema','schema-and-structured-data-for-wp') ?></h3>
|
439 |
+
<p><?php echo esc_html__('Recipe Schema extension is the number one solution to enhance your recipe website with the right structured data.','schema-and-structured-data-for-wp') ?></p>
|
440 |
+
</div>
|
441 |
+
</div>
|
442 |
+
<div class="saswp-sts-btn">
|
443 |
+
|
444 |
+
<?php echo $cooked_active_text; ?>
|
445 |
+
|
446 |
+
</div>
|
447 |
+
</li>
|
448 |
+
|
449 |
+
<li>
|
450 |
+
|
451 |
+
<?php
|
452 |
+
|
453 |
+
$cooked_active_text = '';
|
454 |
+
|
455 |
+
if(is_plugin_active('event-schema-for-saswp/event-schema-for-saswp.php')){
|
456 |
$cooked_active_text = '<label class="saswp-sts-txt">Status :<span style="color:green;">Active</span></label>';
|
457 |
}else{
|
458 |
$cooked_active_text .='<label class="saswp-sts-txt">Status :<span>Inactive</span></label>';
|
1518 |
$add_on[] = 'Cs';
|
1519 |
|
1520 |
}
|
1521 |
+
if(is_plugin_active('event-schema-for-saswp/event-schema-for-saswp.php')){
|
1522 |
|
1523 |
$add_on[] = 'Es';
|
1524 |
|
1525 |
+
}
|
1526 |
+
if(is_plugin_active('recipe-schema-for-saswp/recipe-schema-for-saswp.php')){
|
1527 |
+
|
1528 |
+
$add_on[] = 'Rs';
|
1529 |
+
|
1530 |
+
}
|
1531 |
|
1532 |
if(!empty($add_on)){
|
1533 |
|
1654 |
$response.= '<strong>'.esc_html__('Event Schema','schema-and-structured-data-for-wp').'</strong>';
|
1655 |
$response.= '</div>';
|
1656 |
|
1657 |
+
}
|
1658 |
+
|
1659 |
+
if($label == true && $on == 'Rs'){
|
1660 |
+
|
1661 |
+
$response.= '<div class="" style="display:inline-block">';
|
1662 |
+
$response.= '<strong>'.esc_html__('Recipe Schema','schema-and-structured-data-for-wp').'</strong>';
|
1663 |
+
$response.= '</div>';
|
1664 |
+
|
1665 |
}
|
1666 |
|
1667 |
if($license_status == 'active'){
|
1845 |
'name' => 'saswp-tagyeem-checkbox',
|
1846 |
'type' => 'checkbox',
|
1847 |
'class' => 'checkbox saswp-checkbox',
|
1848 |
+
'note' => saswp_get_field_note('jannah'),
|
1849 |
'hidden' => array(
|
1850 |
'id' => 'saswp-tagyeem',
|
1851 |
'name' => 'sd_data[saswp-tagyeem]',
|
1881 |
'id' => 'saswp-homeland-checkbox',
|
1882 |
'name' => 'saswp-homeland-checkbox',
|
1883 |
'type' => 'checkbox',
|
1884 |
+
'class' => 'checkbox saswp-checkbox',
|
1885 |
+
'note' => saswp_get_field_note('homeland'),
|
1886 |
'hidden' => array(
|
1887 |
'id' => 'saswp-homeland',
|
1888 |
'name' => 'sd_data[saswp-homeland]',
|
1893 |
'id' => 'saswp-realhomes-checkbox',
|
1894 |
'name' => 'saswp-realhomes-checkbox',
|
1895 |
'type' => 'checkbox',
|
1896 |
+
'class' => 'checkbox saswp-checkbox',
|
1897 |
+
'note' => saswp_get_field_note('realhomes'),
|
1898 |
'hidden' => array(
|
1899 |
'id' => 'saswp-realhomes',
|
1900 |
'name' => 'sd_data[saswp-realhomes]',
|
2053 |
'name' => 'sd_data[saswp-wp-recipe-maker]',
|
2054 |
)
|
2055 |
);
|
2056 |
+
$wp_ultimate_recipe = array(
|
2057 |
+
'label' => 'WP Ultimate Recipe',
|
2058 |
+
'id' => 'saswp-wp-ultimate-recipe-checkbox',
|
2059 |
+
'name' => 'saswp-wp-ultimate-recipe-checkbox',
|
2060 |
+
'type' => 'checkbox',
|
2061 |
+
'class' => 'checkbox saswp-checkbox',
|
2062 |
+
'note' => saswp_get_field_note('wp_ultimate_recipe'),
|
2063 |
+
'hidden' => array(
|
2064 |
+
'id' => 'saswp-wp-ultimate-recipe',
|
2065 |
+
'name' => 'sd_data[saswp-wp-ultimate-recipe]',
|
2066 |
+
)
|
2067 |
+
);
|
2068 |
+
$zip_recipes = array(
|
2069 |
+
'label' => 'Zip Recipes',
|
2070 |
+
'id' => 'saswp-zip-recipes-checkbox',
|
2071 |
+
'name' => 'saswp-zip-recipes-checkbox',
|
2072 |
+
'type' => 'checkbox',
|
2073 |
+
'class' => 'checkbox saswp-checkbox',
|
2074 |
+
'note' => saswp_get_field_note('zip_recipes'),
|
2075 |
+
'hidden' => array(
|
2076 |
+
'id' => 'saswp-zip-recipes',
|
2077 |
+
'name' => 'sd_data[saswp-zip-recipes]',
|
2078 |
+
)
|
2079 |
+
);
|
2080 |
+
$mediavine_create = array(
|
2081 |
+
'label' => 'Create by Mediavine',
|
2082 |
+
'id' => 'saswp-mediavine-create-checkbox',
|
2083 |
+
'name' => 'saswp-mediavine-create-checkbox',
|
2084 |
+
'type' => 'checkbox',
|
2085 |
+
'class' => 'checkbox saswp-checkbox',
|
2086 |
+
'note' => saswp_get_field_note('mediavine_create'),
|
2087 |
+
'hidden' => array(
|
2088 |
+
'id' => 'saswp-mediavine-create',
|
2089 |
+
'name' => 'sd_data[saswp-mediavine-create]',
|
2090 |
+
)
|
2091 |
+
);
|
2092 |
+
$ht_recipes = array(
|
2093 |
+
'label' => 'HT Recipes',
|
2094 |
+
'id' => 'saswp-ht-recipes-checkbox',
|
2095 |
+
'name' => 'saswp-ht-recipes-checkbox',
|
2096 |
+
'type' => 'checkbox',
|
2097 |
+
'class' => 'checkbox saswp-checkbox',
|
2098 |
+
'note' => saswp_get_field_note('ht_recipes'),
|
2099 |
+
'hidden' => array(
|
2100 |
+
'id' => 'saswp-ht-recipes',
|
2101 |
+
'name' => 'sd_data[saswp-ht-recipes]',
|
2102 |
+
)
|
2103 |
+
);
|
2104 |
|
2105 |
$the_events_calendar = array(
|
2106 |
'label' => 'The Events Calendar',
|
2114 |
'name' => 'sd_data[saswp-the-events-calendar]',
|
2115 |
)
|
2116 |
);
|
2117 |
+
|
|
|
2118 |
$kk_star = array(
|
2119 |
'label' => 'kk Star Ratings',
|
2120 |
'id' => 'saswp-kk-star-raring-checkbox',
|
2121 |
'name' => 'saswp-kk-star-raring-checkbox',
|
2122 |
'type' => 'checkbox',
|
2123 |
'class' => 'checkbox saswp-checkbox',
|
2124 |
+
'note' => saswp_get_field_note('kk_star_ratings'),
|
2125 |
'hidden' => array(
|
2126 |
'id' => 'saswp-kk-star-raring',
|
2127 |
'name' => 'sd_data[saswp-kk-star-raring]',
|
2133 |
'name' => 'saswp-wppostratings-raring-checkbox',
|
2134 |
'type' => 'checkbox',
|
2135 |
'class' => 'checkbox saswp-checkbox',
|
2136 |
+
'note' => saswp_get_field_note('wp_post_ratings'),
|
2137 |
'hidden' => array(
|
2138 |
'id' => 'saswp-wppostratings-raring',
|
2139 |
'name' => 'sd_data[saswp-wppostratings-raring]',
|
2157 |
'name' => 'saswp-woocommerce-booking-checkbox',
|
2158 |
'type' => 'checkbox',
|
2159 |
'class' => 'checkbox saswp-checkbox',
|
2160 |
+
'note' => saswp_get_field_note('woocommerce_bookings'),
|
2161 |
'hidden' => array(
|
2162 |
'id' => 'saswp-woocommerce-booking',
|
2163 |
'name' => 'sd_data[saswp-woocommerce-booking]',
|
2183 |
'name' => 'saswp-woocommerce-membership-checkbox',
|
2184 |
'type' => 'checkbox',
|
2185 |
'class' => 'checkbox saswp-checkbox',
|
2186 |
+
'note' => saswp_get_field_note('woocommerce_membership'),
|
2187 |
'hidden' => array(
|
2188 |
'id' => 'saswp-woocommerce-membership',
|
2189 |
'name' => 'sd_data[saswp-woocommerce-membership]',
|
2196 |
'name' => 'saswp-extra-checkbox',
|
2197 |
'type' => 'checkbox',
|
2198 |
'class' => 'checkbox saswp-checkbox',
|
2199 |
+
'note' => saswp_get_field_note('extra'),
|
2200 |
'hidden' => array(
|
2201 |
'id' => 'saswp-extra',
|
2202 |
'name' => 'sd_data[saswp-extra]',
|
2251 |
'id' => 'saswp-rankmath',
|
2252 |
'name' => 'sd_data[saswp-rankmath]',
|
2253 |
)
|
2254 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2255 |
|
2256 |
+
$flex_lmx = array(
|
2257 |
+
'label' => 'FlexMLS IDX Plugin',
|
2258 |
+
'id' => 'saswp-flexmlx-compativility-checkbox',
|
2259 |
+
'name' => 'saswp-flexmlx-compativility-checkbox',
|
2260 |
+
'type' => 'checkbox',
|
2261 |
+
'class' => 'checkbox saswp-checkbox',
|
2262 |
+
'note' => saswp_get_field_note('flex_mls_idx'),
|
2263 |
+
'hidden' => array(
|
2264 |
+
'id' => 'saswp-flexmlx-compativility',
|
2265 |
+
'name' => 'sd_data[saswp-flexmlx-compativility]',
|
2266 |
+
)
|
2267 |
+
);
|
2268 |
+
|
2269 |
if(!is_plugin_active('woocommerce-compatibility-for-schema/woocommerce-compatibility-for-schema.php')){
|
2270 |
|
2271 |
$woocommerce_bok['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="http://structured-data-for-wp.com/woocommerce-compatibility-for-schema/">Woocommerce Addon</a>';
|
2293 |
|
2294 |
}
|
2295 |
|
2296 |
+
if(!is_plugin_active('event-schema-for-saswp/event-schema-for-saswp.php')){
|
2297 |
|
2298 |
+
$the_events_calendar['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/event-schema/">Event Schema Addon</a>';
|
2299 |
+
$events_calendar_wd['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/event-schema/">Event Schema Addon</a>';
|
2300 |
+
$wp_event_manager['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/event-schema/">Event Schema Addon</a>';
|
2301 |
+
$events_manager['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/event-schema/">Event Schema Addon</a>';
|
2302 |
+
$event_organiser['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/event-schema/">Event Schema Addon</a>';
|
2303 |
+
$modern_events_calendar['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/event-schema/">Event Schema Addon</a>';
|
2304 |
|
2305 |
}
|
2306 |
+
|
2307 |
+
if(!is_plugin_active('recipe-schema-for-saswp/recipe-schema-for-saswp.php')){
|
2308 |
+
|
2309 |
+
$zip_recipes['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/recipe-schema/">Recipe Schema Addon</a>';
|
2310 |
+
$wp_ultimate_recipe['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/recipe-schema/">Recipe Schema Addon</a>';
|
2311 |
+
$mediavine_create['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/recipe-schema/">Recipe Schema Addon</a>';
|
2312 |
+
$ht_recipes['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/recipe-schema/">Recipe Schema Addon</a>';
|
2313 |
|
2314 |
+
}
|
2315 |
|
2316 |
$field_objs = new saswp_fields_generator();
|
2317 |
|
2333 |
$aiosp,
|
2334 |
$squirrly_seo,
|
2335 |
$recipe_maker,
|
2336 |
+
$wp_ultimate_recipe,
|
2337 |
+
$zip_recipes,
|
2338 |
+
$mediavine_create,
|
2339 |
+
$ht_recipes,
|
2340 |
$rankmath,
|
2341 |
$homeland_theme,
|
2342 |
$real_homes,
|
2348 |
$events_manager,
|
2349 |
$events_calendar_wd,
|
2350 |
$event_organiser,
|
2351 |
+
$modern_events_calendar,
|
2352 |
+
$flex_lmx
|
2353 |
|
2354 |
+
);
|
2355 |
+
|
2356 |
+
$flex_mlx_extra_fields = array();
|
2357 |
+
$flex_mlx_extra_fields[] = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2358 |
'label' => 'Name',
|
2359 |
'id' => 'sd-seller-name',
|
2360 |
'name' => 'sd_data[sd-seller-name]',
|
2361 |
'class' => 'regular-text',
|
2362 |
'type' => 'text',
|
2363 |
);
|
2364 |
+
$flex_mlx_extra_fields[] = array(
|
2365 |
'label' => 'Addres',
|
2366 |
'id' => 'sd-seller-address',
|
2367 |
'name' => 'sd_data[sd-seller-address]',
|
2368 |
'class' => 'regular-text',
|
2369 |
'type' => 'text',
|
2370 |
);
|
2371 |
+
$flex_mlx_extra_fields[] = array(
|
2372 |
'label' => 'Telephone',
|
2373 |
'id' => 'sd-seller-telephone',
|
2374 |
'name' => 'sd_data[sd-seller-telephone]',
|
2375 |
'class' => 'regular-text',
|
2376 |
'type' => 'text',
|
2377 |
);
|
2378 |
+
$flex_mlx_extra_fields[] = array(
|
2379 |
'label' => 'Price Range',
|
2380 |
'id' => 'sd-seller-price-range',
|
2381 |
'name' => 'sd_data[sd-seller-price-range]',
|
2382 |
'class' => 'regular-text',
|
2383 |
'type' => 'text',
|
2384 |
);
|
2385 |
+
$flex_mlx_extra_fields[] = array(
|
2386 |
'label' => 'URL',
|
2387 |
'id' => 'sd-seller-url',
|
2388 |
'name' => 'sd_data[sd-seller-url]',
|
2389 |
'class' => 'regular-text',
|
2390 |
'type' => 'text',
|
2391 |
);
|
2392 |
+
$flex_mlx_extra_fields[] = array(
|
2393 |
'label' => 'Image',
|
2394 |
'id' => 'sd_seller_image',
|
2395 |
'name' => 'sd_data[sd_seller_image][url]',
|
2396 |
'class' => 'saswp-sd_seller_image',
|
2397 |
'type' => 'media',
|
2398 |
+
);
|
2399 |
+
|
2400 |
+
?>
|
2401 |
+
|
2402 |
+
<div class="saswp-compatibility-container" id="saswp-active-compatibility-container">
|
2403 |
+
|
2404 |
+
<?php
|
2405 |
+
$act_meta_fields = $meta_fields;
|
2406 |
+
|
2407 |
+
$active_plugins = saswp_compatible_active_list();
|
2408 |
+
|
2409 |
+
foreach ($act_meta_fields as $key => $field){
|
2410 |
+
|
2411 |
+
if($field['hidden']['id'] == 'saswp-woocommerce-booking' || $field['hidden']['id'] == 'saswp-woocommerce-membership'){
|
2412 |
+
|
2413 |
+
if(!array_search('saswp-woocommerce', $active_plugins)){
|
2414 |
+
|
2415 |
+
unset($act_meta_fields[$key]);
|
2416 |
+
|
2417 |
+
}
|
2418 |
+
|
2419 |
+
}else{
|
2420 |
+
|
2421 |
+
if(!array_search($field['hidden']['id'], $active_plugins)){
|
2422 |
+
|
2423 |
+
unset($act_meta_fields[$key]);
|
2424 |
+
|
2425 |
+
}
|
2426 |
+
|
2427 |
+
}
|
2428 |
+
|
2429 |
+
|
2430 |
+
}
|
2431 |
+
if($act_meta_fields){
|
2432 |
+
$field_objs->saswp_field_generator($act_meta_fields, $settings);
|
2433 |
+
}
|
2434 |
+
|
2435 |
+
if ( is_plugin_active('flexmls-idx/flexmls_connect.php') && isset($settings['saswp-flexmlx-compativility']) && $settings['saswp-flexmlx-compativility'] == 1) {
|
2436 |
|
2437 |
+
echo '<div class="saswp-seller-div">';
|
2438 |
+
echo '<strong>'.esc_html__('Real estate agent info :','schema-and-structured-data-for-wp').'</strong>';
|
2439 |
+
|
2440 |
+
$field_objs->saswp_field_generator($flex_mlx_extra_fields, $settings);
|
2441 |
|
2442 |
+
echo '</div>';
|
2443 |
+
}
|
2444 |
+
|
2445 |
+
?>
|
2446 |
+
|
2447 |
+
</div>
|
2448 |
|
2449 |
+
<div class="saswp-compatibility-container" id="saswp-inactive-compatibility-container">
|
2450 |
+
|
2451 |
+
<?php
|
2452 |
+
|
2453 |
+
$ina_meta_fields = $meta_fields;
|
2454 |
+
|
2455 |
+
$active_plugins = saswp_compatible_active_list();
|
2456 |
+
|
2457 |
+
foreach ($ina_meta_fields as $key => $field){
|
2458 |
+
|
2459 |
+
if($field['hidden']['id'] == 'saswp-woocommerce-booking' || $field['hidden']['id'] == 'saswp-woocommerce-membership'){
|
2460 |
+
|
2461 |
+
if(array_search('saswp-woocommerce', $active_plugins)){
|
2462 |
+
|
2463 |
+
unset($ina_meta_fields[$key]);
|
2464 |
+
|
2465 |
+
}
|
2466 |
+
|
2467 |
+
}else{
|
2468 |
+
|
2469 |
+
if(array_search($field['hidden']['id'], $active_plugins)){
|
2470 |
+
|
2471 |
+
unset($ina_meta_fields[$key]);
|
2472 |
+
|
2473 |
+
}
|
2474 |
+
|
2475 |
+
}
|
2476 |
+
|
2477 |
+
}
|
2478 |
+
if($ina_meta_fields){
|
2479 |
+
$field_objs->saswp_field_generator($ina_meta_fields, $settings);
|
2480 |
+
}
|
2481 |
+
|
2482 |
+
?>
|
2483 |
+
|
2484 |
+
</div>
|
2485 |
+
<?php
|
2486 |
|
2487 |
}
|
2488 |
|
|
|
2489 |
function saswp_support_page_callback(){
|
2490 |
|
2491 |
?>
|
2580 |
function saswp_get_field_note($pname){
|
2581 |
|
2582 |
$notes = array(
|
2583 |
+
'kk_star_ratings' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/kk-star-ratings/">kk Star Rating</a>',
|
2584 |
+
'wp_post_ratings' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-postratings/">WP-PostRatings</a>',
|
2585 |
'bb_press' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/bbpress/">bbPress</a>',
|
2586 |
'woocommerce' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/woocommerce/">Woocommerce</a>',
|
2587 |
'cooked' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/cooked/">Cooked</a>',
|
2595 |
'aiosp' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/all-in-one-seo-pack/">All in One SEO Pack</a>',
|
2596 |
'squirrly_seo' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/squirrly-seo/">Squirrly SEO</a>',
|
2597 |
'wp_recipe_maker' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-recipe-maker/">WP Recipe Maker</a>',
|
2598 |
+
'wp_ultimate_recipe' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-ultimate-recipe/">WP Ultimate Recipe</a>',
|
2599 |
'learn_press' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/learnpress/">Learn Press</a>',
|
2600 |
'learn_dash' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://www.learndash.com/pricing-and-purchase/">Learn Dash</a>',
|
2601 |
'lifter_lms' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/lifterlms/">LifterLMS</a>',
|
2604 |
'event_calendar_wd' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/event-calendar-wd/">Event Calendar WD</a>',
|
2605 |
'event_organiser' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/event-organiser/">Event Organiser</a>',
|
2606 |
'modern_events_calendar' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/modern-events-calendar-lite/">Modern Events Calendar Lite</a>',
|
2607 |
+
'flex_mls_idx' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/flexmls-idx/">FlexMLS IDX</a>',
|
2608 |
+
'woocommerce_membership' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/woocommerce/">Woocommerce Membership</a>',
|
2609 |
+
'woocommerce_bookings' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/woocommerce/">Woocommerce Bookings</a>',
|
2610 |
+
'extra' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://www.elegantthemes.com/gallery/extra/">Extra Theme</a>',
|
2611 |
+
'homeland' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/homeland-responsive-real-estate-theme-for-wordpress/6518965">Homeland</a>',
|
2612 |
+
'realhomes' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/real-homes-wordpress-real-estate-theme/5373914">RealHomes</a>',
|
2613 |
+
'jannah' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://codecanyon.net/item/taqyeem-wordpress-review-plugin/4558799">Taqyeem</a>',
|
2614 |
+
'zip_recipes' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/zip-recipes/">Zip Recipes</a>',
|
2615 |
+
'mediavine_create' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/mediavine-create/">Create by Mediavine</a>',
|
2616 |
+
'ht_recipes' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/culinier-food-recipe-wordpress-theme/11088564/">HT-Recipes</a>'
|
2617 |
);
|
2618 |
+
|
2619 |
+
$active = saswp_compatible_active_list();
|
2620 |
+
|
2621 |
+
if(!isset($active[$pname])){
|
2622 |
|
2623 |
return $notes[$pname];
|
2624 |
|
admin_section/structure_admin.php
CHANGED
@@ -19,7 +19,7 @@ function saswp_skip_wizard(){
|
|
19 |
if ( !wp_verify_nonce( $_POST['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
|
20 |
return;
|
21 |
}
|
22 |
-
|
23 |
$sd_data = get_option('sd_data');
|
24 |
$sd_data['sd_initial_wizard_status'] = 0;
|
25 |
update_option('sd_data', $sd_data);
|
@@ -706,9 +706,11 @@ if(is_admin()){
|
|
706 |
<table class="widefat saswp-placement-table" style="border:0px;">
|
707 |
<tbody id="sdwp-repeater-tbody" class="fields-wrapper-1">
|
708 |
<?php for ($i=0; $i < $total_fields; $i++) {
|
709 |
-
|
710 |
-
|
711 |
-
$
|
|
|
|
|
712 |
$selected_val_key_4 = '';
|
713 |
if(isset($data_array[$i]['key_4'])){
|
714 |
$selected_val_key_4 = $data_array[$i]['key_4'];
|
@@ -1444,7 +1446,8 @@ function saswp_license_status($add_on, $license_status, $license_key){
|
|
1444 |
'reviews' => 'Reviews for schema',
|
1445 |
'res' => 'Real Estate Schema',
|
1446 |
'cs' => 'Course Schema',
|
1447 |
-
'es' => 'Event Schema'
|
|
|
1448 |
);
|
1449 |
|
1450 |
$edd_action = '';
|
19 |
if ( !wp_verify_nonce( $_POST['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
|
20 |
return;
|
21 |
}
|
22 |
+
|
23 |
$sd_data = get_option('sd_data');
|
24 |
$sd_data['sd_initial_wizard_status'] = 0;
|
25 |
update_option('sd_data', $sd_data);
|
706 |
<table class="widefat saswp-placement-table" style="border:0px;">
|
707 |
<tbody id="sdwp-repeater-tbody" class="fields-wrapper-1">
|
708 |
<?php for ($i=0; $i < $total_fields; $i++) {
|
709 |
+
|
710 |
+
|
711 |
+
$selected_val_key_1 = isset($data_array[$i]['key_1']) ? $data_array[$i]['key_1'] : '';
|
712 |
+
$selected_val_key_2 = isset($data_array[$i]['key_2']) ? $data_array[$i]['key_2'] : '';
|
713 |
+
$selected_val_key_3 = isset($data_array[$i]['key_3']) ? $data_array[$i]['key_3'] : '';
|
714 |
$selected_val_key_4 = '';
|
715 |
if(isset($data_array[$i]['key_4'])){
|
716 |
$selected_val_key_4 = $data_array[$i]['key_4'];
|
1446 |
'reviews' => 'Reviews for schema',
|
1447 |
'res' => 'Real Estate Schema',
|
1448 |
'cs' => 'Course Schema',
|
1449 |
+
'es' => 'Event Schema',
|
1450 |
+
'rs' => 'Recipe Schema'
|
1451 |
);
|
1452 |
|
1453 |
$edd_action = '';
|
core/array-list/compatibility-list.php
ADDED
@@ -0,0 +1,222 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Exit if accessed directly.
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
4 |
+
|
5 |
+
return array(
|
6 |
+
'plugins' => array(
|
7 |
+
'flex_mls_idx' => array(
|
8 |
+
'name' => 'FlexMLS IDX',
|
9 |
+
'free' => 'flexmls-idx/flexmls_connect.php',
|
10 |
+
'opt_name' => 'saswp-flexmlx-compativility',
|
11 |
+
'part_in' => 'free',
|
12 |
+
),
|
13 |
+
'kk_star_ratings' => array(
|
14 |
+
'name' => 'kk Star Ratings',
|
15 |
+
'free' => 'kk-star-ratings/index.php',
|
16 |
+
'opt_name' => 'saswp-kk-star-raring',
|
17 |
+
'part_in' => 'free',
|
18 |
+
),
|
19 |
+
'learn_press' => array(
|
20 |
+
'name' => 'Learn Press',
|
21 |
+
'free' => 'learnpress/learnpress.php',
|
22 |
+
'opt_name' => 'saswp-learn-press',
|
23 |
+
'part_in' => 'pro',
|
24 |
+
),
|
25 |
+
'learn_dash' => array(
|
26 |
+
'name' => 'Learn Dash',
|
27 |
+
'free' => 'learndash/learndash.php',
|
28 |
+
'opt_name' => 'saswp-learn-dash',
|
29 |
+
'part_in' => 'pro',
|
30 |
+
),
|
31 |
+
'lifter_lms' => array(
|
32 |
+
'name' => 'Lifter LMS',
|
33 |
+
'free' => 'lifterlms/lifterlms.php',
|
34 |
+
'opt_name' => 'saswp-lifter-lms',
|
35 |
+
'part_in' => 'pro',
|
36 |
+
),
|
37 |
+
'wp_post_ratings' => array(
|
38 |
+
'name' => 'WP-PostRatings',
|
39 |
+
'free' => 'wp-postratings/wp-postratings.php',
|
40 |
+
'opt_name' => 'saswp-wppostratings-raring',
|
41 |
+
'part_in' => 'free',
|
42 |
+
),
|
43 |
+
'bb_press' => array(
|
44 |
+
'name' => 'bbPress',
|
45 |
+
'free' => 'bbpress/bbpress.php',
|
46 |
+
'opt_name' => 'saswp-bbpress',
|
47 |
+
'part_in' => 'free',
|
48 |
+
),
|
49 |
+
'woocommerce' => array(
|
50 |
+
'name' => 'Woocommerce',
|
51 |
+
'free' => 'woocommerce/woocommerce.php',
|
52 |
+
'opt_name' => 'saswp-woocommerce',
|
53 |
+
'part_in' => 'free',
|
54 |
+
),
|
55 |
+
'woocommerce_bookings' => array(
|
56 |
+
'name' => 'Woocommerce Bookings',
|
57 |
+
'free' => 'woocommerce-bookings/woocommerce-bookings.php',
|
58 |
+
'opt_name' => 'saswp-woocommerce-booking',
|
59 |
+
'part_in' => 'pro',
|
60 |
+
'parent' => 'woocommerce'
|
61 |
+
),
|
62 |
+
'woocommerce_membership' => array(
|
63 |
+
'name' => 'Woocommerce Membership',
|
64 |
+
'free' => 'woocommerce-memberships/woocommerce-memberships.php',
|
65 |
+
'opt_name' => 'saswp-woocommerce-membership',
|
66 |
+
'part_in' => 'pro',
|
67 |
+
'parent' => 'woocommerce'
|
68 |
+
),
|
69 |
+
'cooked' => array(
|
70 |
+
'name' => 'Cooked',
|
71 |
+
'free' => 'cooked/cooked.php',
|
72 |
+
'pro' => 'cooked-pro/cooked-pro.php',
|
73 |
+
'opt_name' => 'saswp-cooked',
|
74 |
+
'part_in' => 'pro',
|
75 |
+
),
|
76 |
+
'the_events_calendar' => array(
|
77 |
+
'name' => 'The Events Calendar',
|
78 |
+
'free' => 'the-events-calendar/the-events-calendar.php',
|
79 |
+
'opt_name' => 'saswp-the-events-calendar',
|
80 |
+
'part_in' => 'pro',
|
81 |
+
),
|
82 |
+
'event_organiser' => array(
|
83 |
+
'name' => 'Event Organiser',
|
84 |
+
'free' => 'event-organiser/event-organiser.php',
|
85 |
+
'opt_name' => 'saswp-event-organiser',
|
86 |
+
'part_in' => 'pro',
|
87 |
+
),
|
88 |
+
'modern_events_calendar' => array(
|
89 |
+
'name' => 'Modern Events Calendar Lite',
|
90 |
+
'free' => 'modern-events-calendar-lite/modern-events-calendar-lite.php',
|
91 |
+
'opt_name' => 'saswp-modern-events-calendar',
|
92 |
+
'part_in' => 'pro',
|
93 |
+
),
|
94 |
+
'wp_event_manager' => array(
|
95 |
+
'name' => 'WP Event Manager',
|
96 |
+
'free' => 'wp-event-manager/wp-event-manager.php',
|
97 |
+
'opt_name' => 'saswp-wp-event-manager',
|
98 |
+
'part_in' => 'pro',
|
99 |
+
),
|
100 |
+
'events_manager' => array(
|
101 |
+
'name' => 'Events Manager',
|
102 |
+
'free' => 'events-manager/events-manager.php',
|
103 |
+
'opt_name' => 'saswp-events-manager',
|
104 |
+
'part_in' => 'pro',
|
105 |
+
),
|
106 |
+
'event_calendar_wd' => array(
|
107 |
+
'name' => 'Event Calendar WD',
|
108 |
+
'free' => 'event-calendar-wd/ecwd.php',
|
109 |
+
'opt_name' => 'saswp-event-calendar-wd',
|
110 |
+
'part_in' => 'pro',
|
111 |
+
),
|
112 |
+
'dw_qna' => array(
|
113 |
+
'name' => 'DW Question Answer',
|
114 |
+
'free' => 'dw-question-answer/dw-question-answer.php',
|
115 |
+
'pro' => 'dw-question-answer-pro/dw-question-answer.php',
|
116 |
+
'opt_name' => 'saswp-dw-question-answer',
|
117 |
+
'part_in' => 'free',
|
118 |
+
),
|
119 |
+
'yoast_seo' => array(
|
120 |
+
'name' => 'Yoast Seo',
|
121 |
+
'free' => 'wordpress-seo/wp-seo.php',
|
122 |
+
'pro' => 'wordpress-seo-premium/wp-seo-premium.php',
|
123 |
+
'opt_name' => 'saswp-yoast',
|
124 |
+
'part_in' => 'free',
|
125 |
+
),
|
126 |
+
'rank_math' => array(
|
127 |
+
'name' => 'Rank Math',
|
128 |
+
'free' => 'seo-by-rank-math/rank-math.php',
|
129 |
+
'pro' => 'seo-by-rank-math-premium/rank-math-premium.php',
|
130 |
+
'opt_name' => 'saswp-rankmath',
|
131 |
+
'part_in' => 'free',
|
132 |
+
),
|
133 |
+
'smart_crawl' => array(
|
134 |
+
'name' => 'SmartCrawl Seo',
|
135 |
+
'free' => 'smartcrawl-seo/wpmu-dev-seo.php',
|
136 |
+
'opt_name' => 'saswp-smart-crawl',
|
137 |
+
'part_in' => 'free',
|
138 |
+
),
|
139 |
+
'the_seo_framework' => array(
|
140 |
+
'name' => 'The SEO Framework',
|
141 |
+
'free' => 'autodescription/autodescription.php',
|
142 |
+
'opt_name' => 'saswp-the-seo-framework',
|
143 |
+
'part_in' => 'free',
|
144 |
+
),
|
145 |
+
'seo_press' => array(
|
146 |
+
'name' => 'SEOPress',
|
147 |
+
'free' => 'wp-seopress/seopress.php',
|
148 |
+
'opt_name' => 'saswp-seo-press',
|
149 |
+
'part_in' => 'free',
|
150 |
+
),
|
151 |
+
'aiosp' => array(
|
152 |
+
'name' => 'All in One SEO Pack',
|
153 |
+
'free' => 'all-in-one-seo-pack/all_in_one_seo_pack.php',
|
154 |
+
'opt_name' => 'saswp-aiosp',
|
155 |
+
'part_in' => 'free',
|
156 |
+
),
|
157 |
+
'squirrly_seo' => array(
|
158 |
+
'name' => 'Squirrly SEO',
|
159 |
+
'free' => 'squirrly-seo/squirrly.php',
|
160 |
+
'opt_name' => 'saswp-squirrly-seo',
|
161 |
+
'part_in' => 'free',
|
162 |
+
),
|
163 |
+
'wp_recipe_maker' => array(
|
164 |
+
'name' => 'WP Recipe Maker',
|
165 |
+
'free' => 'wp-recipe-maker/wp-recipe-maker.php',
|
166 |
+
'opt_name' => 'saswp-wp-recipe-maker',
|
167 |
+
'part_in' => 'free',
|
168 |
+
),
|
169 |
+
'wp_ultimate_recipe' => array(
|
170 |
+
'name' => 'WP Ultimate Recipe',
|
171 |
+
'free' => 'wp-ultimate-recipe/wp-ultimate-recipe.php',
|
172 |
+
'pro' => 'wp-ultimate-recipe-premium/wp-ultimate-recipe-premium.php',
|
173 |
+
'opt_name' => 'saswp-wp-ultimate-recipe',
|
174 |
+
'part_in' => 'pro',
|
175 |
+
),
|
176 |
+
'zip_recipes' => array(
|
177 |
+
'name' => 'Zip Recipes',
|
178 |
+
'free' => 'zip-recipes/zip-recipes.php',
|
179 |
+
'opt_name' => 'saswp-zip-recipes',
|
180 |
+
'part_in' => 'pro',
|
181 |
+
),
|
182 |
+
'mediavine_create' => array(
|
183 |
+
'name' => 'Create by Mediavine',
|
184 |
+
'free' => 'mediavine-create/mediavine-create.php',
|
185 |
+
'opt_name' => 'saswp-mediavine-create',
|
186 |
+
'part_in' => 'pro',
|
187 |
+
),
|
188 |
+
'ht_recipes' => array(
|
189 |
+
'name' => 'HT Recipes',
|
190 |
+
'free' => 'ht-recipes/ht-recipes.php',
|
191 |
+
'opt_name' => 'saswp-ht-recipes',
|
192 |
+
'part_in' => 'pro',
|
193 |
+
)
|
194 |
+
|
195 |
+
),
|
196 |
+
'themes' => array(
|
197 |
+
'jannah' => array(
|
198 |
+
'name' => 'Jannah',
|
199 |
+
'free' => 'jannah',
|
200 |
+
'opt_name' => 'saswp-tagyeem',
|
201 |
+
'part_in' => 'free',
|
202 |
+
),
|
203 |
+
'extra' => array(
|
204 |
+
'name' => 'Extra',
|
205 |
+
'free' => 'Extra',
|
206 |
+
'opt_name' => 'saswp-extra',
|
207 |
+
'part_in' => 'free',
|
208 |
+
),
|
209 |
+
'saswp_homeland' => array(
|
210 |
+
'name' => 'HomeLand Theme',
|
211 |
+
'free' => 'homeland',
|
212 |
+
'opt_name' => 'saswp-homeland',
|
213 |
+
'part_in' => 'pro',
|
214 |
+
),
|
215 |
+
'saswp_realhomes' => array(
|
216 |
+
'name' => 'RealHomes Theme',
|
217 |
+
'free' => 'realhomes',
|
218 |
+
'opt_name' => 'saswp-realhomes',
|
219 |
+
'part_in' => 'pro',
|
220 |
+
),
|
221 |
+
)
|
222 |
+
);
|
core/array-list/plugins.php
DELETED
@@ -1,132 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
// Exit if accessed directly.
|
3 |
-
if ( ! defined( 'ABSPATH' ) ) exit;
|
4 |
-
|
5 |
-
return array(
|
6 |
-
|
7 |
-
array(
|
8 |
-
'key' => 'kk_star_ratings',
|
9 |
-
'name' => 'kk Star Ratings',
|
10 |
-
'path_free' => 'kk-star-ratings/index.php',
|
11 |
-
'status_key' => 'saswp-kk-star-raring',
|
12 |
-
),
|
13 |
-
array(
|
14 |
-
'key' => 'wp_post_ratings',
|
15 |
-
'name' => 'WP-PostRatings',
|
16 |
-
'path_free' => 'wp-postratings/wp-postratings.php',
|
17 |
-
'status_key' => 'saswp-wppostratings-raring',
|
18 |
-
),
|
19 |
-
array(
|
20 |
-
'key' => 'bb_press',
|
21 |
-
'name' => 'bbPress',
|
22 |
-
'path_free' => 'bbpress/bbpress.php',
|
23 |
-
'status_key' => 'saswp-bbpress',
|
24 |
-
),
|
25 |
-
array(
|
26 |
-
'key' => 'woocommerce',
|
27 |
-
'name' => 'Woocommerce',
|
28 |
-
'path_free' => 'woocommerce/woocommerce.php',
|
29 |
-
'status_key' => 'saswp-woocommerce',
|
30 |
-
),
|
31 |
-
array(
|
32 |
-
'key' => 'cooked',
|
33 |
-
'name' => 'Cooked',
|
34 |
-
'path_free' => 'cooked/cooked.php',
|
35 |
-
'path_pro' => 'cooked-pro/cooked-pro.php',
|
36 |
-
'status_key' => 'saswp-cooked',
|
37 |
-
),
|
38 |
-
array(
|
39 |
-
'key' => 'the_events_calendar',
|
40 |
-
'name' => 'The Events Calendar',
|
41 |
-
'path_free' => 'the-events-calendar/the-events-calendar.php',
|
42 |
-
'status_key' => 'saswp-the-events-calendar',
|
43 |
-
),
|
44 |
-
array(
|
45 |
-
'key' => 'event_organiser',
|
46 |
-
'name' => 'Event Organiser',
|
47 |
-
'path_free' => 'event-organiser/event-organiser.php',
|
48 |
-
'status_key' => 'saswp-event-organiser',
|
49 |
-
),
|
50 |
-
array(
|
51 |
-
'key' => 'modern_events_calendar',
|
52 |
-
'name' => 'Modern Events Calendar Lite',
|
53 |
-
'path_free' => 'modern-events-calendar-lite/modern-events-calendar-lite.php',
|
54 |
-
'status_key' => 'saswp-modern-events-calendar',
|
55 |
-
),
|
56 |
-
array(
|
57 |
-
'key' => 'wp_event_manager',
|
58 |
-
'name' => 'WP Event Manager',
|
59 |
-
'path_free' => 'wp-event-manager/wp-event-manager.php',
|
60 |
-
'status_key' => 'saswp-wp-event-manager',
|
61 |
-
),
|
62 |
-
array(
|
63 |
-
'key' => 'events_manager',
|
64 |
-
'name' => 'Events Manager',
|
65 |
-
'path_free' => 'events-manager/events-manager.php',
|
66 |
-
'status_key' => 'saswp-events-manager',
|
67 |
-
),
|
68 |
-
array(
|
69 |
-
'key' => 'event_calendar_wd',
|
70 |
-
'name' => 'Event Calendar WD',
|
71 |
-
'path_free' => 'event-calendar-wd/ecwd.php',
|
72 |
-
'status_key' => 'saswp-event-calendar-wd',
|
73 |
-
),
|
74 |
-
array(
|
75 |
-
'key' => 'dw_qna',
|
76 |
-
'name' => 'DW Question Answer',
|
77 |
-
'path_free' => 'dw-question-answer/dw-question-answer.php',
|
78 |
-
'path_pro' => 'dw-question-answer-pro/dw-question-answer.php',
|
79 |
-
'status_key' => 'saswp-dw-question-answer',
|
80 |
-
),
|
81 |
-
array(
|
82 |
-
'key' => 'yoast_seo',
|
83 |
-
'name' => 'Yoast Seo',
|
84 |
-
'path_free' => 'wordpress-seo/wp-seo.php',
|
85 |
-
'path_pro' => 'wordpress-seo-premium/wp-seo-premium.php',
|
86 |
-
'status_key' => 'saswp-yoast',
|
87 |
-
),
|
88 |
-
array(
|
89 |
-
'key' => 'rank_math',
|
90 |
-
'name' => 'Rank Math',
|
91 |
-
'path_free' => 'seo-by-rank-math/rank-math.php',
|
92 |
-
'path_pro' => 'seo-by-rank-math-premium/rank-math-premium.php',
|
93 |
-
'status_key' => 'saswp-rankmath',
|
94 |
-
),
|
95 |
-
array(
|
96 |
-
'key' => 'smart_crawl',
|
97 |
-
'name' => 'SmartCrawl Seo',
|
98 |
-
'path_free' => 'smartcrawl-seo/wpmu-dev-seo.php',
|
99 |
-
'status_key' => 'saswp-smart-crawl',
|
100 |
-
),
|
101 |
-
array(
|
102 |
-
'key' => 'the_seo_framework',
|
103 |
-
'name' => 'The SEO Framework',
|
104 |
-
'path_free' => 'autodescription/autodescription.php',
|
105 |
-
'status_key' => 'saswp-the-seo-framework',
|
106 |
-
),
|
107 |
-
array(
|
108 |
-
'key' => 'seo_press',
|
109 |
-
'name' => 'SEOPress',
|
110 |
-
'path_free' => 'wp-seopress/seopress.php',
|
111 |
-
'status_key' => 'saswp-seo-press',
|
112 |
-
),
|
113 |
-
array(
|
114 |
-
'key' => 'aiosp',
|
115 |
-
'name' => 'All in One SEO Pack',
|
116 |
-
'path_free' => 'all-in-one-seo-pack/all_in_one_seo_pack.php',
|
117 |
-
'status_key' => 'saswp-aiosp',
|
118 |
-
),
|
119 |
-
array(
|
120 |
-
'key' => 'squirrly_seo',
|
121 |
-
'name' => 'Squirrly SEO',
|
122 |
-
'path_free' => 'squirrly-seo/squirrly.php',
|
123 |
-
'status_key' => 'saswp-squirrly-seo',
|
124 |
-
),
|
125 |
-
array(
|
126 |
-
'key' => 'wp_recipe_maker',
|
127 |
-
'name' => 'WP Recipe Maker',
|
128 |
-
'path_free' => 'wp-recipe-maker/wp-recipe-maker.php',
|
129 |
-
'status_key' => 'saswp-wp-recipe-maker',
|
130 |
-
),
|
131 |
-
|
132 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
core/array-list/pro_extensions.php
CHANGED
@@ -32,7 +32,12 @@ return array(
|
|
32 |
array(
|
33 |
'key' => 'event_schema',
|
34 |
'name' => 'Event Schema',
|
35 |
-
'path' => 'event-schema/event-schema.php',
|
36 |
-
)
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
);
|
32 |
array(
|
33 |
'key' => 'event_schema',
|
34 |
'name' => 'Event Schema',
|
35 |
+
'path' => 'event-schema-for-saswp/event-schema-for-saswp.php',
|
36 |
+
),
|
37 |
+
array(
|
38 |
+
'key' => 'recipe_schema',
|
39 |
+
'name' => 'Recipe Schema',
|
40 |
+
'path' => 'recipe-schema-for-saswp/recipe-schema-for-saswp.php',
|
41 |
+
)
|
42 |
|
43 |
);
|
output/compatibility.php
CHANGED
@@ -7,10 +7,11 @@ class saswp_output_compatibility{
|
|
7 |
|
8 |
public function __construct() {
|
9 |
|
10 |
-
$mappings_file = SASWP_DIR_NAME . '/core/array-list/
|
11 |
|
12 |
if ( file_exists( $mappings_file ) ) {
|
13 |
-
$
|
|
|
14 |
}
|
15 |
|
16 |
}
|
@@ -19,10 +20,16 @@ class saswp_output_compatibility{
|
|
19 |
|
20 |
add_action( 'init', array($this, 'saswp_override_schema_markup'));
|
21 |
add_filter( 'amp_init', array($this, 'saswp_override_schema_markup'));
|
22 |
-
add_filter( 'wpsso_json_prop_https_schema_org_graph', 'saswp_exclude_wpsso_schema_graph', 10, 5 );
|
23 |
-
|
24 |
}
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
public function saswp_exclude_wpsso_schema_graph( $prop_data, $mod, $mt_og, $page_type_id, $is_main ) {
|
27 |
|
28 |
return __return_empty_array;
|
@@ -35,13 +42,13 @@ class saswp_output_compatibility{
|
|
35 |
|
36 |
if(!empty($this->_plugins_list)){
|
37 |
|
38 |
-
foreach ($this->_plugins_list as $plugins){
|
39 |
|
40 |
-
if(isset($sd_data[$plugins['
|
41 |
|
42 |
-
if(is_plugin_active($plugins['
|
43 |
|
44 |
-
$func_name = 'saswp_'.$
|
45 |
|
46 |
if(method_exists($this, $func_name) && saswp_global_option()){
|
47 |
call_user_func(array($this, $func_name));
|
7 |
|
8 |
public function __construct() {
|
9 |
|
10 |
+
$mappings_file = SASWP_DIR_NAME . '/core/array-list/compatibility-list.php';
|
11 |
|
12 |
if ( file_exists( $mappings_file ) ) {
|
13 |
+
$plugins_arr = include $mappings_file;
|
14 |
+
$this->_plugins_list = $plugins_arr['plugins'];
|
15 |
}
|
16 |
|
17 |
}
|
20 |
|
21 |
add_action( 'init', array($this, 'saswp_override_schema_markup'));
|
22 |
add_filter( 'amp_init', array($this, 'saswp_override_schema_markup'));
|
23 |
+
add_filter( 'wpsso_json_prop_https_schema_org_graph', 'saswp_exclude_wpsso_schema_graph', 10, 5 );
|
24 |
+
add_action("mv_create_modify_card_style_hooks", array($this, 'saswp_remove_create_mediavine'),100,2);
|
25 |
}
|
26 |
|
27 |
+
public function saswp_remove_create_mediavine($attr, $type){
|
28 |
+
|
29 |
+
remove_action( 'mv_create_card_before', array( 'Mediavine\Create\Creations_Views_Hooks', 'mv_create_schema' ), 10 );
|
30 |
+
|
31 |
+
}
|
32 |
+
|
33 |
public function saswp_exclude_wpsso_schema_graph( $prop_data, $mod, $mt_og, $page_type_id, $is_main ) {
|
34 |
|
35 |
return __return_empty_array;
|
42 |
|
43 |
if(!empty($this->_plugins_list)){
|
44 |
|
45 |
+
foreach ($this->_plugins_list as $key => $plugins){
|
46 |
|
47 |
+
if(isset($sd_data[$plugins['opt_name']]) && $sd_data[$plugins['opt_name']] == 1){
|
48 |
|
49 |
+
if(is_plugin_active($plugins['free']) || (isset($plugins['pro']) && is_plugin_active($plugins['pro']))){
|
50 |
|
51 |
+
$func_name = 'saswp_'.$key.'_override';
|
52 |
|
53 |
if(method_exists($this, $func_name) && saswp_global_option()){
|
54 |
call_user_func(array($this, $func_name));
|
output/function.php
CHANGED
@@ -800,15 +800,48 @@ function saswp_remove_microdata($content){
|
|
800 |
$content = preg_replace("/itemscope[\n|\s|]*itemtype=(\'?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|EventPosting|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\'?)/", "", $content);
|
801 |
$content = preg_replace("/itemscope=(\"?)itemscope(\"?) itemtype=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|EventPosting|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
|
802 |
$content = preg_replace("/itemscope=(\"?)itemprop(\"?) itemType=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|EventPosting|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
|
803 |
-
$content = preg_replace("/itemscope itemprop=\"(.*?)\" itemType=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|EventPosting|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
|
804 |
-
|
805 |
-
|
806 |
|
807 |
//Clean json markup
|
808 |
if(isset($sd_data['saswp-aiosp']) && $sd_data['saswp-aiosp'] == 1 ){
|
809 |
$content = preg_replace('/<script type=\"application\/ld\+json" class=\"aioseop-schema"\>(.*?)<\/script>/', "", $content);
|
810 |
}
|
811 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
812 |
}
|
813 |
|
814 |
return $content;
|
@@ -909,7 +942,8 @@ function saswp_get_ids_from_content_by_type($type){
|
|
909 |
preg_match_all( '/<!--WPRM Recipe (\d+)-->.+?<!--End WPRM Recipe-->/ms', $content, $matches );
|
910 |
$classic_matches = isset( $matches[1] ) ? array_map( 'intval', $matches[1] ) : array();
|
911 |
|
912 |
-
return $gutenberg_matches + $classic_matches;
|
|
|
913 |
|
914 |
default:
|
915 |
break;
|
800 |
$content = preg_replace("/itemscope[\n|\s|]*itemtype=(\'?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|EventPosting|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\'?)/", "", $content);
|
801 |
$content = preg_replace("/itemscope=(\"?)itemscope(\"?) itemtype=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|EventPosting|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
|
802 |
$content = preg_replace("/itemscope=(\"?)itemprop(\"?) itemType=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|EventPosting|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
|
803 |
+
$content = preg_replace("/itemscope itemprop=\"(.*?)\" itemType=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|EventPosting|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
|
804 |
+
$content = preg_replace("/itemprop='logo' itemscope itemtype='https:\/\/schema.org\/ImageObject'/", "", $content);
|
805 |
+
$content = preg_replace('/itemprop="logo" itemscope="" itemtype="https:\/\/schema.org\/ImageObject"/', "", $content);
|
806 |
|
807 |
//Clean json markup
|
808 |
if(isset($sd_data['saswp-aiosp']) && $sd_data['saswp-aiosp'] == 1 ){
|
809 |
$content = preg_replace('/<script type=\"application\/ld\+json" class=\"aioseop-schema"\>(.*?)<\/script>/', "", $content);
|
810 |
}
|
811 |
|
812 |
+
if(isset($sd_data['saswp-wp-ultimate-recipe']) && $sd_data['saswp-wp-ultimate-recipe'] == 1 ){
|
813 |
+
|
814 |
+
$regex = '/<script type=\"application\/ld\+json\">(.*?)<\/script>[\s\n]*<div id=\"wpurp\-container\-recipe\-([0-9]+)\"/';
|
815 |
+
|
816 |
+
preg_match( $regex, $content, $match );
|
817 |
+
|
818 |
+
if(isset($match[2])){
|
819 |
+
|
820 |
+
$recipe_id = $match[2];
|
821 |
+
|
822 |
+
$content = preg_replace($regex, '<div id="wpurp-container-recipe-'.$recipe_id.'"', $content);
|
823 |
+
|
824 |
+
}
|
825 |
+
|
826 |
+
}
|
827 |
+
|
828 |
+
if(isset($sd_data['saswp-zip-recipes']) && $sd_data['saswp-zip-recipes'] == 1 ){
|
829 |
+
|
830 |
+
$regex = '/class=\"zlrecipe\-container\-border\"(.*?)>[\s\n]*<script type=\"application\/ld\+json\">(.*?)<\/script\>/sm';
|
831 |
+
preg_match_all( $regex, $content, $matches , PREG_SET_ORDER );
|
832 |
+
|
833 |
+
if($matches){
|
834 |
+
|
835 |
+
foreach($matches as $match){
|
836 |
+
|
837 |
+
$content = preg_replace($regex, 'class="zlrecipe-container-border" '.$match[1].'>', $content);
|
838 |
+
|
839 |
+
}
|
840 |
+
|
841 |
+
}
|
842 |
+
|
843 |
+
}
|
844 |
+
|
845 |
}
|
846 |
|
847 |
return $content;
|
942 |
preg_match_all( '/<!--WPRM Recipe (\d+)-->.+?<!--End WPRM Recipe-->/ms', $content, $matches );
|
943 |
$classic_matches = isset( $matches[1] ) ? array_map( 'intval', $matches[1] ) : array();
|
944 |
|
945 |
+
return $gutenberg_matches + $classic_matches;
|
946 |
+
|
947 |
|
948 |
default:
|
949 |
break;
|
output/output.php
CHANGED
@@ -275,8 +275,8 @@ function saswp_schema_output() {
|
|
275 |
|
276 |
$image_id = get_post_thumbnail_id();
|
277 |
$image_details = wp_get_attachment_image_src($image_id, 'full');
|
278 |
-
$date = get_the_date("
|
279 |
-
$modified_date = get_the_modified_date("
|
280 |
$author_name = get_the_author();
|
281 |
$author_id = get_the_author_meta('ID');
|
282 |
|
@@ -431,6 +431,7 @@ function saswp_schema_output() {
|
|
431 |
$service = new saswp_output_service();
|
432 |
$input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
|
433 |
}
|
|
|
434 |
|
435 |
}
|
436 |
|
@@ -445,6 +446,8 @@ function saswp_schema_output() {
|
|
445 |
$service = new saswp_output_service();
|
446 |
$input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
|
447 |
}
|
|
|
|
|
448 |
|
449 |
}
|
450 |
|
@@ -960,25 +963,18 @@ function saswp_schema_output() {
|
|
960 |
}
|
961 |
|
962 |
$input1 = array(
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
'@id' => trailingslashit(saswp_get_permalink()),
|
974 |
-
'author' => saswp_get_author_details()
|
975 |
-
),
|
976 |
-
|
977 |
);
|
978 |
-
|
979 |
-
if(!empty($publisher)){
|
980 |
-
$input1['mainEntity'] = array_merge($input1['mainEntity'], $publisher);
|
981 |
-
}
|
982 |
if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
|
983 |
$input1['comment'] = saswp_get_comments(get_the_ID());
|
984 |
}
|
@@ -990,20 +986,19 @@ function saswp_schema_output() {
|
|
990 |
}
|
991 |
|
992 |
$input1 = saswp_append_fetched_reviews($input1);
|
993 |
-
|
994 |
-
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
995 |
-
$service = new saswp_output_service();
|
996 |
-
$input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
|
997 |
-
}
|
998 |
-
|
999 |
}
|
1000 |
|
1001 |
$input1 = apply_filters('saswp_modify_recipe_schema_output', $input1 );
|
|
|
|
|
|
|
|
|
|
|
1002 |
}
|
1003 |
|
1004 |
if( 'qanda' === $schema_type){
|
1005 |
-
|
1006 |
-
|
1007 |
if(isset($sd_data['saswp-dw-question-answer']) && $sd_data['saswp-dw-question-answer'] ==1){
|
1008 |
|
1009 |
$service_object = new saswp_output_service();
|
@@ -1889,8 +1884,8 @@ function saswp_gutenberg_how_to_schema(){
|
|
1889 |
$input1['@type'] = 'HowTo';
|
1890 |
$input1['@id'] = trailingslashit(get_permalink()).'#HowTo';
|
1891 |
$input1['name'] = saswp_get_the_title();
|
1892 |
-
$input1['datePublished'] = get_the_date("
|
1893 |
-
$input1['dateModified'] = get_the_modified_date("
|
1894 |
|
1895 |
if(!empty($feature_image)){
|
1896 |
|
275 |
|
276 |
$image_id = get_post_thumbnail_id();
|
277 |
$image_details = wp_get_attachment_image_src($image_id, 'full');
|
278 |
+
$date = get_the_date("c");
|
279 |
+
$modified_date = get_the_modified_date("c");
|
280 |
$author_name = get_the_author();
|
281 |
$author_id = get_the_author_meta('ID');
|
282 |
|
431 |
$service = new saswp_output_service();
|
432 |
$input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
|
433 |
}
|
434 |
+
$input1 = apply_filters('saswp_modify_apartment_schema_sfr', $input1 );
|
435 |
|
436 |
}
|
437 |
|
446 |
$service = new saswp_output_service();
|
447 |
$input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
|
448 |
}
|
449 |
+
|
450 |
+
$input1 = apply_filters('saswp_modify_apartment_schema_house', $input1 );
|
451 |
|
452 |
}
|
453 |
|
963 |
}
|
964 |
|
965 |
$input1 = array(
|
966 |
+
'@context' => saswp_context_url(),
|
967 |
+
'@type' => $schema_type ,
|
968 |
+
'@id' => trailingslashit(saswp_get_permalink()).'#recipe',
|
969 |
+
'url' => trailingslashit(saswp_get_permalink()),
|
970 |
+
'name' => saswp_get_the_title(),
|
971 |
+
'datePublished' => esc_html($date),
|
972 |
+
'dateModified' => esc_html($modified_date),
|
973 |
+
'description' => saswp_get_the_excerpt(),
|
974 |
+
'keywords' => saswp_get_the_tags(),
|
975 |
+
'author' => saswp_get_author_details(),
|
|
|
|
|
|
|
|
|
976 |
);
|
977 |
+
|
|
|
|
|
|
|
978 |
if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
|
979 |
$input1['comment'] = saswp_get_comments(get_the_ID());
|
980 |
}
|
986 |
}
|
987 |
|
988 |
$input1 = saswp_append_fetched_reviews($input1);
|
989 |
+
|
|
|
|
|
|
|
|
|
|
|
990 |
}
|
991 |
|
992 |
$input1 = apply_filters('saswp_modify_recipe_schema_output', $input1 );
|
993 |
+
|
994 |
+
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
995 |
+
$service = new saswp_output_service();
|
996 |
+
$input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
|
997 |
+
}
|
998 |
}
|
999 |
|
1000 |
if( 'qanda' === $schema_type){
|
1001 |
+
|
|
|
1002 |
if(isset($sd_data['saswp-dw-question-answer']) && $sd_data['saswp-dw-question-answer'] ==1){
|
1003 |
|
1004 |
$service_object = new saswp_output_service();
|
1884 |
$input1['@type'] = 'HowTo';
|
1885 |
$input1['@id'] = trailingslashit(get_permalink()).'#HowTo';
|
1886 |
$input1['name'] = saswp_get_the_title();
|
1887 |
+
$input1['datePublished'] = get_the_date("c");
|
1888 |
+
$input1['dateModified'] = get_the_modified_date("c");
|
1889 |
|
1890 |
if(!empty($feature_image)){
|
1891 |
|
output/output_post_specific.php
CHANGED
@@ -2092,8 +2092,8 @@ function saswp_post_specific_schema_output() {
|
|
2092 |
$input1['@type'] = 'Review';
|
2093 |
$input1['@id'] = trailingslashit(get_permalink()).'#review';
|
2094 |
$input1['url'] = trailingslashit(get_permalink());
|
2095 |
-
$input1['datePublished'] = get_the_date("
|
2096 |
-
$input1['dateModified'] = get_the_modified_date("
|
2097 |
|
2098 |
if($review_author){
|
2099 |
|
@@ -2332,7 +2332,7 @@ function saswp_post_specific_schema_output() {
|
|
2332 |
$input1 = array(
|
2333 |
'@context' => saswp_context_url(),
|
2334 |
'@type' => $local_business ,
|
2335 |
-
'@id' => trailingslashit(get_permalink()).'#'.
|
2336 |
'name' => saswp_remove_warnings($all_post_meta, 'local_business_name_'.$schema_id, 'saswp_array'),
|
2337 |
'url' => saswp_remove_warnings($all_post_meta, 'local_business_name_url_'.$schema_id, 'saswp_array'),
|
2338 |
'description' => saswp_remove_warnings($all_post_meta, 'local_business_description_'.$schema_id, 'saswp_array'),
|
2092 |
$input1['@type'] = 'Review';
|
2093 |
$input1['@id'] = trailingslashit(get_permalink()).'#review';
|
2094 |
$input1['url'] = trailingslashit(get_permalink());
|
2095 |
+
$input1['datePublished'] = get_the_date("c");
|
2096 |
+
$input1['dateModified'] = get_the_modified_date("c");
|
2097 |
|
2098 |
if($review_author){
|
2099 |
|
2332 |
$input1 = array(
|
2333 |
'@context' => saswp_context_url(),
|
2334 |
'@type' => $local_business ,
|
2335 |
+
'@id' => ((isset($all_post_meta['saswp_business_id_'.$schema_id][0]) && $all_post_meta['saswp_business_id_'.$schema_id][0] !='') ? $all_post_meta['saswp_business_id_'.$schema_id][0] : trailingslashit(get_permalink()).'#'.strtolower($local_business)),
|
2336 |
'name' => saswp_remove_warnings($all_post_meta, 'local_business_name_'.$schema_id, 'saswp_array'),
|
2337 |
'url' => saswp_remove_warnings($all_post_meta, 'local_business_name_url_'.$schema_id, 'saswp_array'),
|
2338 |
'description' => saswp_remove_warnings($all_post_meta, 'local_business_description_'.$schema_id, 'saswp_array'),
|
output/review-output.php
CHANGED
@@ -61,8 +61,8 @@ Class saswp_review_output{
|
|
61 |
}
|
62 |
|
63 |
|
64 |
-
$date = get_the_date("
|
65 |
-
$modified_date = get_the_modified_date("
|
66 |
$aurthor_name = get_the_author();
|
67 |
|
68 |
if(!$aurthor_name){
|
61 |
}
|
62 |
|
63 |
|
64 |
+
$date = get_the_date("c");
|
65 |
+
$modified_date = get_the_modified_date("c");
|
66 |
$aurthor_name = get_the_author();
|
67 |
|
68 |
if(!$aurthor_name){
|
output/service.php
CHANGED
@@ -174,10 +174,10 @@ Class saswp_output_service{
|
|
174 |
$response = get_the_author_meta('last_name');
|
175 |
break;
|
176 |
case 'post_date':
|
177 |
-
$response = get_the_date("
|
178 |
break;
|
179 |
case 'post_modified':
|
180 |
-
$response = get_the_modified_date("
|
181 |
break;
|
182 |
case 'manual_text':
|
183 |
|
@@ -537,8 +537,11 @@ Class saswp_output_service{
|
|
537 |
|
538 |
case 'local_business':
|
539 |
|
540 |
-
if(isset($custom_fields['
|
541 |
-
|
|
|
|
|
|
|
542 |
}
|
543 |
if(isset($custom_fields['saswp_business_name'])){
|
544 |
$input1['@type'] = $custom_fields['saswp_business_name'];
|
@@ -580,10 +583,7 @@ Class saswp_output_service{
|
|
580 |
}
|
581 |
if(isset($custom_fields['local_website'])){
|
582 |
$input1['website'] = $custom_fields['local_website'];
|
583 |
-
}
|
584 |
-
if(isset($custom_fields['local_business_logo'])){
|
585 |
-
$input1['Publisher']['logo']['url'] = $custom_fields['local_business_logo'];
|
586 |
-
}
|
587 |
if(isset($custom_fields['saswp_dayofweek'])){
|
588 |
$input1['openingHours'] = $custom_fields['saswp_dayofweek'];
|
589 |
}
|
@@ -2033,13 +2033,37 @@ Class saswp_output_service{
|
|
2033 |
*/
|
2034 |
public function saswp_woocommerce_product_details($post_id){
|
2035 |
|
2036 |
-
$product_details = array();
|
|
|
2037 |
|
2038 |
if (class_exists('WC_Product')) {
|
2039 |
|
|
|
|
|
2040 |
$product = wc_get_product($post_id);
|
2041 |
|
2042 |
-
if(is_object($product)){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2043 |
|
2044 |
$gtin = get_post_meta($post_id, $key='hwp_product_gtin', true);
|
2045 |
|
@@ -2156,8 +2180,9 @@ Class saswp_output_service{
|
|
2156 |
$product_details['product_availability'] = $product->get_stock_status();
|
2157 |
}
|
2158 |
|
2159 |
-
$product_details['product_price']
|
2160 |
-
$product_details['
|
|
|
2161 |
|
2162 |
if(isset($date_on_sale)){
|
2163 |
|
@@ -2165,7 +2190,7 @@ Class saswp_output_service{
|
|
2165 |
|
2166 |
}else{
|
2167 |
|
2168 |
-
$product_details['product_priceValidUntil'] = get_the_modified_date("
|
2169 |
|
2170 |
}
|
2171 |
|
@@ -2179,10 +2204,10 @@ Class saswp_output_service{
|
|
2179 |
foreach($reviews as $review){
|
2180 |
|
2181 |
$reviews_arr[] = array(
|
2182 |
-
'author' => $review->comment_author,
|
2183 |
'datePublished' => $review->comment_date,
|
2184 |
'description' => $review->comment_content,
|
2185 |
-
'reviewRating' => get_comment_meta( $review->comment_ID, 'rating', true ),
|
2186 |
);
|
2187 |
|
2188 |
}
|
@@ -2194,7 +2219,7 @@ Class saswp_output_service{
|
|
2194 |
|
2195 |
$reviews_arr[] = array(
|
2196 |
'author' => saswp_get_the_author_name(),
|
2197 |
-
'datePublished' => get_the_date("
|
2198 |
'description' => saswp_get_the_excerpt(),
|
2199 |
'reviewRating' => 5,
|
2200 |
);
|
@@ -2253,7 +2278,7 @@ Class saswp_output_service{
|
|
2253 |
$review_data['review'] = array(
|
2254 |
'@type' => 'Review',
|
2255 |
'author' => get_the_author(),
|
2256 |
-
'datePublished' => get_the_date("
|
2257 |
'name' => $post_review_title,
|
2258 |
'reviewBody' => $post_review_desc,
|
2259 |
'reviewRating' => array(
|
@@ -2372,7 +2397,7 @@ Class saswp_output_service{
|
|
2372 |
|
2373 |
}
|
2374 |
|
2375 |
-
$dw_qa['dateCreated'] = get_the_date("
|
2376 |
$dw_qa['author'] = array(
|
2377 |
'@type' => 'Person',
|
2378 |
'name' =>saswp_get_the_author_name(),
|
@@ -2443,6 +2468,7 @@ Class saswp_output_service{
|
|
2443 |
case 'local_business':
|
2444 |
|
2445 |
$meta_field = array(
|
|
|
2446 |
'local_business_name' => 'Business Name',
|
2447 |
'local_business_name_url' => 'URL',
|
2448 |
'local_business_description' => 'Description',
|
@@ -3194,10 +3220,9 @@ Class saswp_output_service{
|
|
3194 |
|
3195 |
$image_id = get_post_thumbnail_id();
|
3196 |
$image_details = wp_get_attachment_image_src($image_id, 'full');
|
3197 |
-
$date = get_the_date("
|
3198 |
-
$modified_date = get_the_modified_date("
|
3199 |
-
|
3200 |
-
|
3201 |
switch ($schema_type) {
|
3202 |
|
3203 |
case 'TechArticle':
|
@@ -3314,17 +3339,35 @@ Class saswp_output_service{
|
|
3314 |
'url' => trailingslashit(saswp_get_permalink()),
|
3315 |
'name' => saswp_remove_warnings($product_details, 'product_name', 'saswp_string'),
|
3316 |
'sku' => saswp_remove_warnings($product_details, 'product_sku', 'saswp_string'),
|
3317 |
-
'description' => saswp_remove_warnings($product_details, 'product_description', 'saswp_string')
|
3318 |
-
'offers' => array(
|
3319 |
-
'@type' => 'Offer',
|
3320 |
-
'availability' => saswp_remove_warnings($product_details, 'product_availability', 'saswp_string'),
|
3321 |
-
'price' => saswp_remove_warnings($product_details, 'product_price', 'saswp_string'),
|
3322 |
-
'priceCurrency' => saswp_remove_warnings($product_details, 'product_currency', 'saswp_string'),
|
3323 |
-
'url' => trailingslashit(saswp_get_permalink()),
|
3324 |
-
'priceValidUntil' => saswp_remove_warnings($product_details, 'product_priceValidUntil', 'saswp_string'),
|
3325 |
-
),
|
3326 |
-
|
3327 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3328 |
|
3329 |
if(isset($product_details['product_image'])){
|
3330 |
$input1 = array_merge($input1, $product_details['product_image']);
|
@@ -3357,13 +3400,13 @@ Class saswp_output_service{
|
|
3357 |
|
3358 |
$reviews[] = array(
|
3359 |
'@type' => 'Review',
|
3360 |
-
'author' => esc_attr($review['author']),
|
3361 |
'datePublished' => esc_html($review['datePublished']),
|
3362 |
'description' => $review['description'],
|
3363 |
'reviewRating' => array(
|
3364 |
'@type' => 'Rating',
|
3365 |
'bestRating' => '5',
|
3366 |
-
'ratingValue' => esc_attr($review['reviewRating']),
|
3367 |
'worstRating' => '1',
|
3368 |
)
|
3369 |
);
|
174 |
$response = get_the_author_meta('last_name');
|
175 |
break;
|
176 |
case 'post_date':
|
177 |
+
$response = get_the_date("c");
|
178 |
break;
|
179 |
case 'post_modified':
|
180 |
+
$response = get_the_modified_date("c");
|
181 |
break;
|
182 |
case 'manual_text':
|
183 |
|
537 |
|
538 |
case 'local_business':
|
539 |
|
540 |
+
if(isset($custom_fields['local_business_id'])){
|
541 |
+
$input1['@id'] = $custom_fields['local_business_id'];
|
542 |
+
}
|
543 |
+
if(isset($custom_fields['saswp_business_type'])){
|
544 |
+
$input1['@type'] = $custom_fields['saswp_business_type'];
|
545 |
}
|
546 |
if(isset($custom_fields['saswp_business_name'])){
|
547 |
$input1['@type'] = $custom_fields['saswp_business_name'];
|
583 |
}
|
584 |
if(isset($custom_fields['local_website'])){
|
585 |
$input1['website'] = $custom_fields['local_website'];
|
586 |
+
}
|
|
|
|
|
|
|
587 |
if(isset($custom_fields['saswp_dayofweek'])){
|
588 |
$input1['openingHours'] = $custom_fields['saswp_dayofweek'];
|
589 |
}
|
2033 |
*/
|
2034 |
public function saswp_woocommerce_product_details($post_id){
|
2035 |
|
2036 |
+
$product_details = array();
|
2037 |
+
$varible_prices = array();
|
2038 |
|
2039 |
if (class_exists('WC_Product')) {
|
2040 |
|
2041 |
+
global $woocommerce;
|
2042 |
+
|
2043 |
$product = wc_get_product($post_id);
|
2044 |
|
2045 |
+
if(is_object($product)){
|
2046 |
+
|
2047 |
+
if(is_object($woocommerce)){
|
2048 |
+
|
2049 |
+
if($product->get_type() == 'variable'){
|
2050 |
+
|
2051 |
+
$product_id_some = $woocommerce->product_factory->get_product();
|
2052 |
+
|
2053 |
+
$variations = $product_id_some->get_available_variations();
|
2054 |
+
|
2055 |
+
if($variations){
|
2056 |
+
|
2057 |
+
foreach($variations as $value){
|
2058 |
+
|
2059 |
+
$varible_prices[] = $value['display_price'];
|
2060 |
+
|
2061 |
+
}
|
2062 |
+
}
|
2063 |
+
|
2064 |
+
}
|
2065 |
+
|
2066 |
+
}
|
2067 |
|
2068 |
$gtin = get_post_meta($post_id, $key='hwp_product_gtin', true);
|
2069 |
|
2180 |
$product_details['product_availability'] = $product->get_stock_status();
|
2181 |
}
|
2182 |
|
2183 |
+
$product_details['product_price'] = $product->get_price();
|
2184 |
+
$product_details['product_varible_price'] = $varible_prices;
|
2185 |
+
$product_details['product_sku'] = $product->get_sku() ? $product->get_sku(): get_the_ID();
|
2186 |
|
2187 |
if(isset($date_on_sale)){
|
2188 |
|
2190 |
|
2191 |
}else{
|
2192 |
|
2193 |
+
$product_details['product_priceValidUntil'] = get_the_modified_date("c");
|
2194 |
|
2195 |
}
|
2196 |
|
2204 |
foreach($reviews as $review){
|
2205 |
|
2206 |
$reviews_arr[] = array(
|
2207 |
+
'author' => $review->comment_author ? $review->comment_author : 'Anonymous' ,
|
2208 |
'datePublished' => $review->comment_date,
|
2209 |
'description' => $review->comment_content,
|
2210 |
+
'reviewRating' => get_comment_meta( $review->comment_ID, 'rating', true ) ? get_comment_meta( $review->comment_ID, 'rating', true ) : '5',
|
2211 |
);
|
2212 |
|
2213 |
}
|
2219 |
|
2220 |
$reviews_arr[] = array(
|
2221 |
'author' => saswp_get_the_author_name(),
|
2222 |
+
'datePublished' => get_the_date("c"),
|
2223 |
'description' => saswp_get_the_excerpt(),
|
2224 |
'reviewRating' => 5,
|
2225 |
);
|
2278 |
$review_data['review'] = array(
|
2279 |
'@type' => 'Review',
|
2280 |
'author' => get_the_author(),
|
2281 |
+
'datePublished' => get_the_date("c"),
|
2282 |
'name' => $post_review_title,
|
2283 |
'reviewBody' => $post_review_desc,
|
2284 |
'reviewRating' => array(
|
2397 |
|
2398 |
}
|
2399 |
|
2400 |
+
$dw_qa['dateCreated'] = get_the_date("c");
|
2401 |
$dw_qa['author'] = array(
|
2402 |
'@type' => 'Person',
|
2403 |
'name' =>saswp_get_the_author_name(),
|
2468 |
case 'local_business':
|
2469 |
|
2470 |
$meta_field = array(
|
2471 |
+
'local_business_id' => 'ID',
|
2472 |
'local_business_name' => 'Business Name',
|
2473 |
'local_business_name_url' => 'URL',
|
2474 |
'local_business_description' => 'Description',
|
3220 |
|
3221 |
$image_id = get_post_thumbnail_id();
|
3222 |
$image_details = wp_get_attachment_image_src($image_id, 'full');
|
3223 |
+
$date = get_the_date("c");
|
3224 |
+
$modified_date = get_the_modified_date("c");
|
3225 |
+
|
|
|
3226 |
switch ($schema_type) {
|
3227 |
|
3228 |
case 'TechArticle':
|
3339 |
'url' => trailingslashit(saswp_get_permalink()),
|
3340 |
'name' => saswp_remove_warnings($product_details, 'product_name', 'saswp_string'),
|
3341 |
'sku' => saswp_remove_warnings($product_details, 'product_sku', 'saswp_string'),
|
3342 |
+
'description' => saswp_remove_warnings($product_details, 'product_description', 'saswp_string')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3343 |
);
|
3344 |
+
|
3345 |
+
if(isset($product_details['product_price']) && $product_details['product_price'] ){
|
3346 |
+
|
3347 |
+
$input1['offers'] = array(
|
3348 |
+
'@type' => 'Offer',
|
3349 |
+
'availability' => saswp_remove_warnings($product_details, 'product_availability', 'saswp_string'),
|
3350 |
+
'price' => saswp_remove_warnings($product_details, 'product_price', 'saswp_string'),
|
3351 |
+
'priceCurrency' => saswp_remove_warnings($product_details, 'product_currency', 'saswp_string'),
|
3352 |
+
'url' => trailingslashit(saswp_get_permalink()),
|
3353 |
+
'priceValidUntil' => saswp_remove_warnings($product_details, 'product_priceValidUntil', 'saswp_string')
|
3354 |
+
);
|
3355 |
+
|
3356 |
+
|
3357 |
+
}else{
|
3358 |
+
|
3359 |
+
if(isset($product_details['product_varible_price']) && is_array($product_details['product_varible_price'])){
|
3360 |
+
|
3361 |
+
$input1['offers']['@type'] = 'AggregateOffer';
|
3362 |
+
$input1['offers']['lowPrice'] = min($product_details['product_varible_price']);
|
3363 |
+
$input1['offers']['highPrice'] = max($product_details['product_varible_price']);
|
3364 |
+
$input1['offers']['priceCurrency'] = saswp_remove_warnings($product_details, 'product_currency', 'saswp_string');
|
3365 |
+
$input1['offers']['availability'] = saswp_remove_warnings($product_details, 'product_availability', 'saswp_string');
|
3366 |
+
$input1['offers']['offerCount'] = count($product_details['product_varible_price']);
|
3367 |
+
|
3368 |
+
}
|
3369 |
+
|
3370 |
+
}
|
3371 |
|
3372 |
if(isset($product_details['product_image'])){
|
3373 |
$input1 = array_merge($input1, $product_details['product_image']);
|
3400 |
|
3401 |
$reviews[] = array(
|
3402 |
'@type' => 'Review',
|
3403 |
+
'author' => $review['author'] ? esc_attr($review['author']) : 'Anonymous',
|
3404 |
'datePublished' => esc_html($review['datePublished']),
|
3405 |
'description' => $review['description'],
|
3406 |
'reviewRating' => array(
|
3407 |
'@type' => 'Rating',
|
3408 |
'bestRating' => '5',
|
3409 |
+
'ratingValue' => $review['reviewRating'] ? esc_attr($review['reviewRating']) : '5',
|
3410 |
'worstRating' => '1',
|
3411 |
)
|
3412 |
);
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: magazine3
|
|
3 |
Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.2
|
6 |
-
Stable tag: 1.9.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -118,6 +118,16 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
|
|
118 |
|
119 |
== Changelog ==
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
= 1.9.14 (18 Oct 2019) =
|
122 |
|
123 |
* Fixed: Google icon is not visible in schema review #554
|
3 |
Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.2
|
6 |
+
Stable tag: 1.9.15
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
118 |
|
119 |
== Changelog ==
|
120 |
|
121 |
+
= 1.9.15 (23 Oct 2019) =
|
122 |
+
|
123 |
+
* Fixed: Multiple Instances of Schema Type (i.e. LocalBusiness) Merging Improperly on Same Page #537
|
124 |
+
* Fixed: Price not showing in product schema for variable product #530
|
125 |
+
* Fixed: Published and modified date needs to correct with proper timezone #562
|
126 |
+
* Fixed: ImageObject Error when using the enfold theme. #558
|
127 |
+
* Enhancement: Added default author value in review array for anonymous user #557
|
128 |
+
* Enhancement: Added two section in compatiblity tab (Active & InActive) #560
|
129 |
+
* Added: Recipe Schema Box in Premium Features tab #561
|
130 |
+
|
131 |
= 1.9.14 (18 Oct 2019) =
|
132 |
|
133 |
* Fixed: Google icon is not visible in schema review #554
|
structured-data-for-wp.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Schema & Structured Data for WP
|
4 |
Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
|
5 |
-
Version: 1.9.
|
6 |
Text Domain: schema-and-structured-data-for-wp
|
7 |
Domain Path: /languages
|
8 |
Author: Magazine3
|
@@ -13,7 +13,7 @@ License: GPL2
|
|
13 |
// Exit if accessed directly.
|
14 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
15 |
|
16 |
-
define('SASWP_VERSION', '1.9.
|
17 |
define('SASWP_DIR_NAME_FILE', __FILE__ );
|
18 |
define('SASWP_DIR_NAME', dirname( __FILE__ ));
|
19 |
define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
|
2 |
/*
|
3 |
Plugin Name: Schema & Structured Data for WP
|
4 |
Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
|
5 |
+
Version: 1.9.15
|
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.15');
|
17 |
define('SASWP_DIR_NAME_FILE', __FILE__ );
|
18 |
define('SASWP_DIR_NAME', dirname( __FILE__ ));
|
19 |
define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
|
view/post_specific.php
CHANGED
@@ -1483,7 +1483,13 @@ class saswp_post_specific {
|
|
1483 |
}
|
1484 |
|
1485 |
$meta_field = array(
|
1486 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1487 |
'label' => 'Business Type',
|
1488 |
'id' => 'saswp_business_type_'.$schema_id,
|
1489 |
'type' => 'select',
|
1483 |
}
|
1484 |
|
1485 |
$meta_field = array(
|
1486 |
+
array(
|
1487 |
+
'label' => 'ID',
|
1488 |
+
'id' => 'saswp_business_id_'.$schema_id,
|
1489 |
+
'type' => 'text',
|
1490 |
+
'default' => 'LocalBusiness'
|
1491 |
+
),
|
1492 |
+
array(
|
1493 |
'label' => 'Business Type',
|
1494 |
'id' => 'saswp_business_type_'.$schema_id,
|
1495 |
'type' => 'select',
|