Schema & Structured Data for WP & AMP - Version 1.9

Version Description

(03 Aug 2019) =

  • Major Feature: Reviews Module :- Allow users to manually add reviews from more than 80+ platforms and show it on the website with schema markup #325
  • Added: FAQ schema type #402
  • Added: Upgrade to premium as a menu item in the SD #343
  • Enhancement: If the plguins which are in compatibility section are active than respective checkbox should be checked #353
  • Enhancement: Added Post Tags inside schema markup (Urgent) #389
  • Enhancement: Sub business type should have "LocalBusiness" type as well #380
  • Enhancement: Added validation message in default data #369
  • Enhancement: Added validation message in phone number #369
  • Enhancement: Added some more fields in the product schema #360
  • Bug Fixed: Error in Breadcrumb when using custom post type #403
  • Bug Fixed: Automatically smaller titles which is created as a validation error of "Headline String Too Long" in NewsArticle #396
  • Bug Fixed: Do not need to add organization schema markup on every page #395
  • Bug Fixed: If Defragmentation is enabled "Site Navigation Element" should be included in main schema #386
  • Bug Fixed: Remove double slash // in the type id #379
  • Bug Fixed: Not compatible with Orbital theme #385
  • Bug Fixed: Any AMP extensions redux settings are not being displayed when saswp is installed #412
Download this release

Release Info

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

Code changes from version 1.8.9.1 to 1.9

Files changed (105) hide show
  1. admin_section/common-function.php +175 -71
  2. admin_section/css/jquery.rateyo.min.css +39 -0
  3. admin_section/css/main-style.css +140 -2
  4. admin_section/css/main-style.min.css +1 -1030
  5. admin_section/css/saswp-style.css +1 -0
  6. admin_section/css/saswp-style.min.css +98 -1
  7. admin_section/fields-generator.php +358 -40
  8. admin_section/images/default_user.jpg +0 -0
  9. admin_section/images/reviews_platform_icon/agoda-img.png +0 -0
  10. admin_section/images/reviews_platform_icon/airbnb-img.png +0 -0
  11. admin_section/images/reviews_platform_icon/aliexpress-img.png +0 -0
  12. admin_section/images/reviews_platform_icon/alternativeto-img.png +0 -0
  13. admin_section/images/reviews_platform_icon/amazon-img.png +0 -0
  14. admin_section/images/reviews_platform_icon/angies-list-img.png +0 -0
  15. admin_section/images/reviews_platform_icon/appstore-img.png +0 -0
  16. admin_section/images/reviews_platform_icon/avvo-img.png +0 -0
  17. admin_section/images/reviews_platform_icon/bbb-img.png +0 -0
  18. admin_section/images/reviews_platform_icon/bestbuy-img.png +0 -0
  19. admin_section/images/reviews_platform_icon/booking-img.png +0 -0
  20. admin_section/images/reviews_platform_icon/capterra-img.png +0 -0
  21. admin_section/images/reviews_platform_icon/cargurus-img.png +0 -0
  22. admin_section/images/reviews_platform_icon/cars-img.png +0 -0
  23. admin_section/images/reviews_platform_icon/citysearch-img.png +0 -0
  24. admin_section/images/reviews_platform_icon/clutch-img.png +0 -0
  25. admin_section/images/reviews_platform_icon/consumeraffairs-img.png +0 -0
  26. admin_section/images/reviews_platform_icon/creditkarma-img.png +0 -0
  27. admin_section/images/reviews_platform_icon/customerlobby-img.png +0 -0
  28. admin_section/images/reviews_platform_icon/dealerrater-img.png +0 -0
  29. admin_section/images/reviews_platform_icon/ebay-img.png +0 -0
  30. admin_section/images/reviews_platform_icon/edmunds-img.png +0 -0
  31. admin_section/images/reviews_platform_icon/etsy-img.png +0 -0
  32. admin_section/images/reviews_platform_icon/expedia-img.png +0 -0
  33. admin_section/images/reviews_platform_icon/facebook-1-img.png +0 -0
  34. admin_section/images/reviews_platform_icon/facebook-img.png +0 -0
  35. admin_section/images/reviews_platform_icon/flipkart-img.png +0 -0
  36. admin_section/images/reviews_platform_icon/foursquare-img.png +0 -0
  37. admin_section/images/reviews_platform_icon/g2crowd-img.png +0 -0
  38. admin_section/images/reviews_platform_icon/gearbest-img.png +0 -0
  39. admin_section/images/reviews_platform_icon/glassdoor-img.png +0 -0
  40. admin_section/images/reviews_platform_icon/google-1-img.png +0 -0
  41. admin_section/images/reviews_platform_icon/google-img.png +0 -0
  42. admin_section/images/reviews_platform_icon/healthgrades-img.png +0 -0
  43. admin_section/images/reviews_platform_icon/homeadvisor-img.png +0 -0
  44. admin_section/images/reviews_platform_icon/homestars-img.png +0 -0
  45. admin_section/images/reviews_platform_icon/hotels-img.png +0 -0
  46. admin_section/images/reviews_platform_icon/houzz-img.png +0 -0
  47. admin_section/images/reviews_platform_icon/hungerstation-img.png +0 -0
  48. admin_section/images/reviews_platform_icon/imdb-img.png +0 -0
  49. admin_section/images/reviews_platform_icon/indeed-img.png +0 -0
  50. admin_section/images/reviews_platform_icon/insiderpages-img.png +0 -0
  51. admin_section/images/reviews_platform_icon/jet-img.png +0 -0
  52. admin_section/images/reviews_platform_icon/lawyers-img.png +0 -0
  53. admin_section/images/reviews_platform_icon/lendingtree-img.png +0 -0
  54. admin_section/images/reviews_platform_icon/martindale-img.png +0 -0
  55. admin_section/images/reviews_platform_icon/newegg-img.png +0 -0
  56. admin_section/images/reviews_platform_icon/openrice-img.png +0 -0
  57. admin_section/images/reviews_platform_icon/opentable-img.png +0 -0
  58. admin_section/images/reviews_platform_icon/playstore-img.png +0 -0
  59. admin_section/images/reviews_platform_icon/producthunt-img.png +0 -0
  60. admin_section/images/reviews_platform_icon/ratemds-img.png +0 -0
  61. admin_section/images/reviews_platform_icon/reserveout-img.png +0 -0
  62. admin_section/images/reviews_platform_icon/rottentomatoes-img.png +0 -0
  63. admin_section/images/reviews_platform_icon/siftery-img.png +0 -0
  64. admin_section/images/reviews_platform_icon/sitejabber-img.png +0 -0
  65. admin_section/images/reviews_platform_icon/softwareadvice-img.png +0 -0
  66. admin_section/images/reviews_platform_icon/steam-img.png +0 -0
  67. admin_section/images/reviews_platform_icon/talabat-img.png +0 -0
  68. admin_section/images/reviews_platform_icon/theknot-img.png +0 -0
  69. admin_section/images/reviews_platform_icon/thumbtack-img.png +0 -0
  70. admin_section/images/reviews_platform_icon/tripadvisor-img.png +0 -0
  71. admin_section/images/reviews_platform_icon/trulia-img.png +0 -0
  72. admin_section/images/reviews_platform_icon/trustedshops-img.png +0 -0
  73. admin_section/images/reviews_platform_icon/trustpilot-img.png +0 -0
  74. admin_section/images/reviews_platform_icon/trustradius-img.png +0 -0
  75. admin_section/images/reviews_platform_icon/vitals-img.png +0 -0
  76. admin_section/images/reviews_platform_icon/walmart-img.png +0 -0
  77. admin_section/images/reviews_platform_icon/weddingwire-img.png +0 -0
  78. admin_section/images/reviews_platform_icon/wish-img.png +0 -0
  79. admin_section/images/reviews_platform_icon/yellowpages-img.png +0 -0
  80. admin_section/images/reviews_platform_icon/yelp-img.png +0 -0
  81. admin_section/images/reviews_platform_icon/zillow-img.png +0 -0
  82. admin_section/images/reviews_platform_icon/zocdoc-img.png +0 -0
  83. admin_section/images/reviews_platform_icon/zomato-img.png +0 -0
  84. admin_section/js/jquery.rateyo.min.js +4 -0
  85. admin_section/js/main-script.js +311 -371
  86. admin_section/js/main-script.min.js +1 -1
  87. admin_section/js/saswp-add-new.js +1 -1
  88. admin_section/js/saswp-add-new.min.js +1 -1
  89. admin_section/settings.php +256 -181
  90. admin_section/structure_admin.php +129 -12
  91. google_review/google_review.php +0 -303
  92. google_review/google_review_page.php +0 -400
  93. google_review/google_review_setup.php +0 -245
  94. google_review/google_review_widget.php +0 -129
  95. output/function.php +64 -13
  96. output/output.php +185 -108
  97. output/service.php +26 -7
  98. readme.txt +22 -8
  99. reviews/reviews_admin.php +329 -0
  100. reviews/reviews_service.php +543 -0
  101. reviews/reviews_setup.php +413 -0
  102. reviews/reviews_widget.php +117 -0
  103. structured-data-for-wp.php +10 -39
  104. view/post_specific.php +212 -1219
  105. view/schema_type.php +16 -3
admin_section/common-function.php CHANGED
@@ -15,7 +15,7 @@ if ( ! defined('ABSPATH') ) exit;
15
  * List of hooks used in this context
16
  */
17
  add_action('admin_init', 'saswp_import_all_settings_and_schema',9);
18
- add_action( 'wp_ajax_saswp_export_all_settings_and_schema', 'saswp_export_all_settings_and_schema');
19
  add_action('plugins_loaded', 'saswp_defaultSettings' );
20
  add_action( 'wp_enqueue_scripts', 'saswp_frontend_enqueue' );
21
  add_action('amp_post_template_css','saswp_enqueue_amp_script');
@@ -1223,6 +1223,7 @@ if ( ! defined('ABSPATH') ) exit;
1223
  }
1224
  //Function to expand html tags form allowed html tags in wordpress
1225
  function saswp_expanded_allowed_tags() {
 
1226
  $my_allowed = wp_kses_allowed_html( 'post' );
1227
  // form fields - input
1228
  $my_allowed['input'] = array(
@@ -1239,7 +1240,9 @@ if ( ! defined('ABSPATH') ) exit;
1239
  'disabled' => array(),
1240
  'width' => array(),
1241
  'data-id' => array(),
1242
- 'checked' => array()
 
 
1243
  );
1244
  $my_allowed['hidden'] = array(
1245
  'id' => array(),
@@ -1294,6 +1297,17 @@ if ( ! defined('ABSPATH') ) exit;
1294
  $my_allowed['style'] = array(
1295
  'types' => array(),
1296
  );
 
 
 
 
 
 
 
 
 
 
 
1297
  return $my_allowed;
1298
  }
1299
 
@@ -1335,17 +1349,17 @@ if ( ! defined('ABSPATH') ) exit;
1335
  * @global type $sd_data
1336
  * @return type array
1337
  * @since version 1.0
1338
- */
1339
- function saswp_defaultSettings(){
1340
-
1341
- global $sd_data;
1342
  $sd_name = 'default';
1343
  $logo = array();
1344
  $bloginfo = get_bloginfo('name', 'display');
1345
 
1346
  if($bloginfo){
1347
 
1348
- $sd_name =$bloginfo;
1349
 
1350
  }
1351
 
@@ -1366,54 +1380,41 @@ if ( ! defined('ABSPATH') ) exit;
1366
 
1367
  }
1368
  $defaults = array(
1369
- //General Block
1370
- 'sd_about_page' => '',
1371
- 'sd_contact_page' => '',
1372
- //knowledge Block
1373
  'saswp_kb_type' => 'Organization',
1374
  'sd_name' => $sd_name,
1375
  'sd_alt_name' => $sd_name,
1376
  'sd_url' => $current_url,
1377
- 'sd-person-name' => $username,
1378
- 'sd-person-job-title'=> '',
1379
- 'sd-person-url' => $current_url,
1380
- 'sd-person-image' => array(
1381
- 'url' =>'',
1382
- 'id' =>'',
1383
- 'height' =>'',
1384
- 'width' =>'',
1385
- 'thumbnail' =>''
1386
- ),
1387
- 'sd-person-phone-number' => '',
1388
- 'saswp_kb_telephone' => '',
1389
- 'saswp_contact_type' => '',
1390
- 'saswp_kb_contact_1' => 0,
1391
- //Social
1392
- 'sd_facebook' => '',
1393
- 'sd_twitter' => '',
1394
- 'sd_instagram' => '',
1395
- 'sd_youtube' => '',
1396
- 'sd_linkedin' => '',
1397
- 'sd_pinterest' => '',
1398
- 'sd_soundcloud' => '',
1399
- 'sd_tumblr' => '',
1400
-
1401
- //AMP Block
1402
- 'saswp-for-amp' => 1,
1403
- 'saswp-for-wordpress' => 1,
1404
- 'saswp-yoast' => 1,
1405
- 'saswp-logo-width' => '60',
1406
- 'saswp-logo-height' => '60',
1407
- 'sd_initial_wizard_status' => 1,
1408
-
1409
- );
1410
-
1411
- if(is_plugin_active('wordpress-seo/wp-seo.php') || is_plugin_active('wordpress-seo-premium/wp-seo-premium.php')){
1412
-
1413
- $defaults['saswp-yoast'] = 1;
1414
-
1415
  }
1416
-
1417
  if(is_array($logo)){
1418
 
1419
  $defaults['sd_logo'] = array(
@@ -1422,35 +1423,51 @@ if ( ! defined('ABSPATH') ) exit;
1422
  'height' => array_key_exists(2, $logo)? $logo[2]:'',
1423
  'width' => array_key_exists(1, $logo)? $logo[1]:'',
1424
  'thumbnail' => array_key_exists(0, $logo)? $logo[0]:''
1425
- );
 
 
 
 
 
 
1426
 
1427
- $defaults['sd-data-logo-ampforwp'] = array(
1428
 
1429
- 'url' => array_key_exists(0, $logo)? $logo[0]:'',
1430
- 'id' => $custom_logo_id,
1431
- 'height' => array_key_exists(2, $logo)? $logo[2]:'',
1432
- 'width' => array_key_exists(1, $logo)? $logo[1]:'',
1433
- 'thumbnail' => array_key_exists(0, $logo)? $logo[0]:''
1434
 
1435
- );
 
 
1436
 
1437
- $defaults['sd_default_image'] = array(
1438
- 'url' => array_key_exists(0, $logo)? $logo[0]:'',
1439
- 'id' => $custom_logo_id,
1440
- 'height' => array_key_exists(2, $logo)? $logo[2]:'',
1441
- 'width' => array_key_exists(1, $logo)? $logo[1]:'',
1442
- 'thumbnail' => array_key_exists(0, $logo)? $logo[0]:''
1443
- );
1444
 
1445
- $defaults['sd_default_image_width'] = array_key_exists(1, $logo)? $logo[1]:'';
1446
- $defaults['sd_default_image_height'] = array_key_exists(2, $logo)? $logo[2]:'';
1447
- }
1448
 
1449
- $sd_data = get_option( 'sd_data', $defaults);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1450
 
1451
  return $sd_data;
1452
 
1453
- }
1454
  /**
1455
  * Function to enqueue css and js in frontend
1456
  * @global type $sd_data
@@ -1948,7 +1965,11 @@ if ( ! defined('ABSPATH') ) exit;
1948
 
1949
  $title = get_the_title();
1950
  }
1951
-
 
 
 
 
1952
  return $title;
1953
 
1954
  }
@@ -2024,4 +2045,87 @@ if ( ! defined('ABSPATH') ) exit;
2024
  }
2025
 
2026
  return $array;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2027
  }
15
  * List of hooks used in this context
16
  */
17
  add_action('admin_init', 'saswp_import_all_settings_and_schema',9);
18
+ add_action( 'wp_ajax_saswp_export_all_settings_and_schema', 'saswp_export_all_settings_and_schema');
19
  add_action('plugins_loaded', 'saswp_defaultSettings' );
20
  add_action( 'wp_enqueue_scripts', 'saswp_frontend_enqueue' );
21
  add_action('amp_post_template_css','saswp_enqueue_amp_script');
1223
  }
1224
  //Function to expand html tags form allowed html tags in wordpress
1225
  function saswp_expanded_allowed_tags() {
1226
+
1227
  $my_allowed = wp_kses_allowed_html( 'post' );
1228
  // form fields - input
1229
  $my_allowed['input'] = array(
1240
  'disabled' => array(),
1241
  'width' => array(),
1242
  'data-id' => array(),
1243
+ 'checked' => array(),
1244
+ 'step' => array(),
1245
+ 'min' => array()
1246
  );
1247
  $my_allowed['hidden'] = array(
1248
  'id' => array(),
1297
  $my_allowed['style'] = array(
1298
  'types' => array(),
1299
  );
1300
+ $my_allowed['a'] = array(
1301
+ 'href' => array(),
1302
+ 'target' => array(),
1303
+ 'add-on' => array(),
1304
+ 'license-status' => array(),
1305
+ 'class' => array(),
1306
+ );
1307
+ $my_allowed['p'] = array(
1308
+ 'add-on' => array(),
1309
+ 'class' => array(),
1310
+ );
1311
  return $my_allowed;
1312
  }
1313
 
1349
  * @global type $sd_data
1350
  * @return type array
1351
  * @since version 1.0
1352
+ */
1353
+
1354
+ function saswp_default_settings_array(){
1355
+
1356
  $sd_name = 'default';
1357
  $logo = array();
1358
  $bloginfo = get_bloginfo('name', 'display');
1359
 
1360
  if($bloginfo){
1361
 
1362
+ $sd_name = $bloginfo;
1363
 
1364
  }
1365
 
1380
 
1381
  }
1382
  $defaults = array(
1383
+
 
 
 
1384
  'saswp_kb_type' => 'Organization',
1385
  'sd_name' => $sd_name,
1386
  'sd_alt_name' => $sd_name,
1387
  'sd_url' => $current_url,
1388
+ 'sd-person-name' => $username,
1389
+ 'sd-person-url' => $current_url,
1390
+ 'saswp_kb_contact_1' => 0,
1391
+
1392
+ 'saswp-for-wordpress' => 1,
1393
+ 'sd_initial_wizard_status' => 1,
1394
+ 'saswp-microdata-cleanup' => 1
1395
+
1396
+ );
1397
+
1398
+ $plugin_name = array(
1399
+ 'kk_star_rating' => 'saswp-kk-star-raring',
1400
+ 'wp_post_rating' => 'saswp-wppostratings-raring',
1401
+ 'bb_press' => 'saswp-bbpress',
1402
+ 'woocommerce' => 'saswp-woocommerce',
1403
+ 'cooked' => 'saswp-cooked',
1404
+ 'the_events_calendar' => 'saswp-the-events-calendar',
1405
+ 'yoast_seo' => 'saswp-yoast',
1406
+ 'rank_math' => 'saswp-rankmath',
1407
+ 'dw_qna' => 'saswp-dw-question-answer'
1408
+ );
1409
+
1410
+ foreach($plugin_name as $name => $s_key){
1411
+
1412
+ if(saswp_check_plugin_active_status($name)){
1413
+ $defaults[$s_key] = 1;
1414
+ }
1415
+
 
 
 
 
 
 
 
 
 
 
1416
  }
1417
+
1418
  if(is_array($logo)){
1419
 
1420
  $defaults['sd_logo'] = array(
1423
  'height' => array_key_exists(2, $logo)? $logo[2]:'',
1424
  'width' => array_key_exists(1, $logo)? $logo[1]:'',
1425
  'thumbnail' => array_key_exists(0, $logo)? $logo[0]:''
1426
+ );
1427
+
1428
+ }
1429
+
1430
+ if(is_plugin_active('taqyeem/taqyeem.php') && get_template() == 'jannah' ){
1431
+
1432
+ $defaults['saswp-tagyeem'] = 1;
1433
 
1434
+ }
1435
 
1436
+ if(is_plugin_active('woocommerce/woocommerce.php') && is_plugin_active('woocommerce-bookings/woocommerce-bookings.php')){
1437
+
1438
+ $defaults['saswp-woocommerce-booking'] = 1;
1439
+
1440
+ }
1441
 
1442
+ if(is_plugin_active('woocommerce/woocommerce.php') && is_plugin_active('woocommerce-memberships/woocommerce-memberships.php')){
1443
+
1444
+ $defaults['saswp-woocommerce-membership'] = 1;
1445
 
1446
+ }
 
 
 
 
 
 
1447
 
1448
+ if(get_template() == 'Extra'){
1449
+
1450
+ $defaults['saswp-extra'] = 1;
1451
 
1452
+ }
1453
+ if(is_plugin_active('flexmls-idx/flexmls_connect.php')){
1454
+
1455
+ $defaults['saswp-flexmlx-compativility'] = 1;
1456
+
1457
+ }
1458
+
1459
+ return $defaults;
1460
+
1461
+ }
1462
+
1463
+ function saswp_defaultSettings(){
1464
+
1465
+ global $sd_data;
1466
+ $sd_data = get_option( 'sd_data', saswp_default_settings_array());
1467
 
1468
  return $sd_data;
1469
 
1470
+ }
1471
  /**
1472
  * Function to enqueue css and js in frontend
1473
  * @global type $sd_data
1965
 
1966
  $title = get_the_title();
1967
  }
1968
+
1969
+ if (strlen($title) > 110){
1970
+ $title = substr($title, 0, 106) . ' ...';
1971
+ }
1972
+
1973
  return $title;
1974
 
1975
  }
2045
  }
2046
 
2047
  return $array;
2048
+ }
2049
+
2050
+ function saswp_check_plugin_active_status($pname){
2051
+
2052
+ $status = false;
2053
+ $free_status = false;
2054
+ $pro_status = false;
2055
+
2056
+ $pnamelist = array(
2057
+ 'kk_star_rating' => array(
2058
+ 'free' => 'kk-star-ratings/index.php',
2059
+ ),
2060
+ 'wp_post_rating' => array(
2061
+ 'free' => 'wp-postratings/wp-postratings.php',
2062
+ ),
2063
+ 'bb_press' => array(
2064
+ 'free' => 'bbpress/bbpress.php'
2065
+ ),
2066
+ 'woocommerce' => array(
2067
+ 'free' => 'woocommerce/woocommerce.php'
2068
+ ),
2069
+ 'the_events_calendar' => array(
2070
+ 'free' => 'the-events-calendar/the-events-calendar.php',
2071
+ ),
2072
+ 'yoast_seo' => array(
2073
+ 'free' => 'wordpress-seo/wp-seo.php',
2074
+ 'pro' => 'wordpress-seo-premium/wp-seo-premium.php',
2075
+ ),
2076
+ 'rank_math' => array(
2077
+ 'free' => 'seo-by-rank-math/rank-math.php',
2078
+ 'pro' => 'seo-by-rank-math-premium/rank-math-premium.php',
2079
+ ),
2080
+ 'cooked' => array(
2081
+ 'free' => 'cooked/cooked.php',
2082
+ 'pro' => 'cooked-pro/cooked-pro.php',
2083
+ ),
2084
+ 'dw_qna' => array(
2085
+ 'free' => 'dw-question-answer/dw-question-answer.php',
2086
+ 'pro' => 'dw-question-answer-pro/dw-question-answer.php',
2087
+ ),
2088
+
2089
+ );
2090
+
2091
+ if(array_key_exists('free', $pnamelist[$pname])){
2092
+
2093
+ if(is_plugin_active($pnamelist[$pname]['free'])){
2094
+
2095
+ $free_status = true;
2096
+
2097
+ }
2098
+
2099
+ }
2100
+
2101
+ if(array_key_exists('pro', $pnamelist[$pname])){
2102
+
2103
+ if(is_plugin_active($pnamelist[$pname]['pro'])){
2104
+
2105
+ $pro_status = true;
2106
+
2107
+ }
2108
+
2109
+ }
2110
+
2111
+ if($free_status || $pro_status){
2112
+ $status = true;
2113
+ }
2114
+
2115
+
2116
+ return $status;
2117
+
2118
+ }
2119
+
2120
+ function saswp_on_activation(){
2121
+
2122
+ $installation_date = get_option('saswp_installation_date');
2123
+
2124
+ if(!$installation_date){
2125
+
2126
+ update_option('saswp_installation_date', date("Y-m-d"));
2127
+ update_option('sd_data', saswp_default_settings_array());
2128
+
2129
+ }
2130
+
2131
  }
admin_section/css/jquery.rateyo.min.css ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .jq-ry-container {
2
+ position: relative;
3
+ padding: 0 5px;
4
+ line-height: 0;
5
+ display: block;
6
+ cursor: pointer;
7
+ -webkit-box-sizing: content-box;
8
+ -moz-box-sizing: content-box;
9
+ box-sizing: content-box;
10
+ direction: ltr;
11
+ }
12
+ .jq-ry-container[readonly="readonly"] {
13
+ cursor: default;
14
+ }
15
+ .jq-ry-container > .jq-ry-group-wrapper {
16
+ position: relative;
17
+ width: 100%;
18
+ }
19
+ .jq-ry-container > .jq-ry-group-wrapper > .jq-ry-group {
20
+ position: relative;
21
+ line-height: 0;
22
+ z-index: 10;
23
+ white-space: nowrap;
24
+ }
25
+ .jq-ry-container > .jq-ry-group-wrapper > .jq-ry-group > svg {
26
+ display: inline-block;
27
+ }
28
+ .jq-ry-container > .jq-ry-group-wrapper > .jq-ry-group.jq-ry-normal-group {
29
+ width: 100%;
30
+ }
31
+ .jq-ry-container > .jq-ry-group-wrapper > .jq-ry-group.jq-ry-rated-group {
32
+ width: 0;
33
+ z-index: 11;
34
+ position: absolute;
35
+ top: 0;
36
+ left: 0;
37
+ overflow: hidden;
38
+ }
39
+ /*# sourceMappingURL=min/jquery.rateyo.min.css.map */
admin_section/css/main-style.css CHANGED
@@ -7,6 +7,10 @@ and open the template in the editor.
7
  Created on : Jul 27, 2018, 5:36:26 PM
8
  Author : Magazine3
9
  */
 
 
 
 
10
  .saswp_hide{
11
  display: none;
12
  }
@@ -465,6 +469,7 @@ Compatibility tab css starts here
465
  }
466
  .saswp_image_thumbnail{
467
  padding-top: 5px;
 
468
  }
469
  .saswp-compatibility .saswp-knowledge-field {
470
  float: right;
@@ -642,6 +647,9 @@ Compatibility tab css ends
642
  #saswp-tools-tabs a{
643
  cursor: pointer;
644
  }
 
 
 
645
  #saswp-tools-tabs{
646
  padding-left: 5px;
647
  }
@@ -759,6 +767,7 @@ Google review module starts here
759
  }
760
  .saswp-rv-img img{
761
  max-width:100px;
 
762
  }
763
  /*
764
  Google review module ends here
@@ -840,7 +849,9 @@ Google review module ends here
840
  }
841
 
842
  /** star rating Feature CSS **/
843
-
 
 
844
  .saswp-pc-wrap{background-color:#004f74;padding:15px 15px 15px 30px;color:#fff;display:inline-flex;width:100%;flex-wrap:wrap;margin-bottom:20px}.saswp-pc-wrap .saswp-lst span{font-size:18px;font-weight:500;margin-bottom:10px;display:inline-block;line-height:1.3}.saswp-pc-wrap .saswp-lst{flex:1 0 42%}.saswp-pc-wrap .saswp-lst ul{margin:0}.saswp-pc-wrap .saswp-lst p{list-style-type:none;font-size:15px;font-weight:lighter;line-height:1.2;margin-bottom:10px;position:relative;padding-left:20px;color:#eee}.saswp-pc-wrap .saswp-lst p:before{content:'';position:absolute;width:8px;height:8px;background-color:#ccc;left:0;top:6px;border-radius:10px}.sgl .saswp-rvw{width:100%;margin-bottom:34px;font-size:13px;border-bottom:1px solid #ededed}.saswp-rvw-hd span,.saswp-rvw-sm span{background-color:#222;color:#fff;display:inline-block;font-size:15px}.saswp-rvw-hd span{line-height:1.4;padding:8px 12px 6px;margin:26px 0}.saswp-rvw td{padding:7px 14px}.saswp-rvw td,.sgl table td{border:1px solid #ededed}.saswp-rvw tbody{width:100%}.saswp-rvw-sm span{padding:8px 12px 6px;margin-bottom:13px;position:relative;line-height:1.2}.saswp-rvw-fs{line-height:1.5;font-size:48px;font-weight:600;margin-bottom:5px}.saswp-rvw-ov .ovs{font-size:11px;font-weight:600}.sgl .saswp-rvw tr td{background:#fff;width:100%}.sgl .saswp-rvw tr:hover td{background-color:#fcfcfc}.saswp-rvw .saswp-rvw-sm{padding:21px 14px}
845
  .str-ic{font-size:18px;line-height:1.2}.saswp-rvw-str{display:inline-flex;width:100%}.saswp-rvw-str .df-clr,.saswp-rvw-str .half-str,.saswp-rvw-str .str-ic{display:inline-block;width:20px;height:16px;background-repeat:no-repeat}.saswp-rvw-ov{text-align:center}.saswp-rvw-str .half-str{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNNDgyLjIwNywxODYuOTczbC0xNTkuNjk5LTMzLjcwNUwyNDEuMTA0LDExLjgwM2wtODEuNDA0LDE0MS40NjVMMCwxODYuOTczbDEwOS4zODgsMTIxLjEzNEw5Mi4wOTQsNDcwLjQwNGwxNDkuMDEtNjYuNiAgbDE0OS4wMSw2Ni42bC0xNy4yOTQtMTYyLjI5Nkw0ODIuMjA3LDE4Ni45NzN6IE0yNDEuMTA0LDM3MC45NDNWNzEuOTUzbDYyLjA5LDEwNy45TDQyNSwyMDUuNTYxbC04My40MzMsOTIuMzkzbDEzLjE5MSwxMjMuNzg4ICBMMjQxLjEwNCwzNzAuOTQzeiIgZmlsbD0iI2ZmZDcwMCIvPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K)}.saswp-rvw-str .str-ic{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiNmZmQ3MDAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-rvw-str .df-clr{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiM2MzVlNjMiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}
846
  /*** Review Design CSS ****/
@@ -1009,6 +1020,7 @@ Google review module ends here
1009
  .saswp-mc-symptom-table-div,
1010
  .saswp-mc-risk_factor-table-div,
1011
  .saswp-trip-itinerary-table-div,
 
1012
  .saswp-mc-cause-table-div
1013
  {
1014
  border: 1px solid #aaa;
@@ -1027,4 +1039,130 @@ Google review module ends here
1027
  width: 98%;
1028
  }
1029
 
1030
- /*** How to schema css ends here ***/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  Created on : Jul 27, 2018, 5:36:26 PM
8
  Author : Magazine3
9
  */
10
+ .saswp_warning{
11
+ color: #ef6c00 !important;
12
+ }
13
+
14
  .saswp_hide{
15
  display: none;
16
  }
469
  }
470
  .saswp_image_thumbnail{
471
  padding-top: 5px;
472
+ display: inline-block;
473
  }
474
  .saswp-compatibility .saswp-knowledge-field {
475
  float: right;
647
  #saswp-tools-tabs a{
648
  cursor: pointer;
649
  }
650
+ #saswp-review-tabs a{
651
+ cursor: pointer;
652
+ }
653
  #saswp-tools-tabs{
654
  padding-left: 5px;
655
  }
767
  }
768
  .saswp-rv-img img{
769
  max-width:100px;
770
+ border-radius: 100%;
771
  }
772
  /*
773
  Google review module ends here
849
  }
850
 
851
  /** star rating Feature CSS **/
852
+ .saswp_review_platform .saswp-g-plus{
853
+ float: left;
854
+ }
855
  .saswp-pc-wrap{background-color:#004f74;padding:15px 15px 15px 30px;color:#fff;display:inline-flex;width:100%;flex-wrap:wrap;margin-bottom:20px}.saswp-pc-wrap .saswp-lst span{font-size:18px;font-weight:500;margin-bottom:10px;display:inline-block;line-height:1.3}.saswp-pc-wrap .saswp-lst{flex:1 0 42%}.saswp-pc-wrap .saswp-lst ul{margin:0}.saswp-pc-wrap .saswp-lst p{list-style-type:none;font-size:15px;font-weight:lighter;line-height:1.2;margin-bottom:10px;position:relative;padding-left:20px;color:#eee}.saswp-pc-wrap .saswp-lst p:before{content:'';position:absolute;width:8px;height:8px;background-color:#ccc;left:0;top:6px;border-radius:10px}.sgl .saswp-rvw{width:100%;margin-bottom:34px;font-size:13px;border-bottom:1px solid #ededed}.saswp-rvw-hd span,.saswp-rvw-sm span{background-color:#222;color:#fff;display:inline-block;font-size:15px}.saswp-rvw-hd span{line-height:1.4;padding:8px 12px 6px;margin:26px 0}.saswp-rvw td{padding:7px 14px}.saswp-rvw td,.sgl table td{border:1px solid #ededed}.saswp-rvw tbody{width:100%}.saswp-rvw-sm span{padding:8px 12px 6px;margin-bottom:13px;position:relative;line-height:1.2}.saswp-rvw-fs{line-height:1.5;font-size:48px;font-weight:600;margin-bottom:5px}.saswp-rvw-ov .ovs{font-size:11px;font-weight:600}.sgl .saswp-rvw tr td{background:#fff;width:100%}.sgl .saswp-rvw tr:hover td{background-color:#fcfcfc}.saswp-rvw .saswp-rvw-sm{padding:21px 14px}
856
  .str-ic{font-size:18px;line-height:1.2}.saswp-rvw-str{display:inline-flex;width:100%}.saswp-rvw-str .df-clr,.saswp-rvw-str .half-str,.saswp-rvw-str .str-ic{display:inline-block;width:20px;height:16px;background-repeat:no-repeat}.saswp-rvw-ov{text-align:center}.saswp-rvw-str .half-str{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNNDgyLjIwNywxODYuOTczbC0xNTkuNjk5LTMzLjcwNUwyNDEuMTA0LDExLjgwM2wtODEuNDA0LDE0MS40NjVMMCwxODYuOTczbDEwOS4zODgsMTIxLjEzNEw5Mi4wOTQsNDcwLjQwNGwxNDkuMDEtNjYuNiAgbDE0OS4wMSw2Ni42bC0xNy4yOTQtMTYyLjI5Nkw0ODIuMjA3LDE4Ni45NzN6IE0yNDEuMTA0LDM3MC45NDNWNzEuOTUzbDYyLjA5LDEwNy45TDQyNSwyMDUuNTYxbC04My40MzMsOTIuMzkzbDEzLjE5MSwxMjMuNzg4ICBMMjQxLjEwNCwzNzAuOTQzeiIgZmlsbD0iI2ZmZDcwMCIvPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K)}.saswp-rvw-str .str-ic{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiNmZmQ3MDAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-rvw-str .df-clr{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiM2MzVlNjMiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}
857
  /*** Review Design CSS ****/
1020
  .saswp-mc-symptom-table-div,
1021
  .saswp-mc-risk_factor-table-div,
1022
  .saswp-trip-itinerary-table-div,
1023
+ .saswp-faq-question-table-div,
1024
  .saswp-mc-cause-table-div
1025
  {
1026
  border: 1px solid #aaa;
1039
  width: 98%;
1040
  }
1041
 
1042
+ /*** How to schema css ends here ***/
1043
+
1044
+ .saswp-g-reviews-settings-table input{
1045
+ width: 100%;
1046
+ }
1047
+ .saswp_rv_module_pro_notice{
1048
+ border: 1px solid #d8d8d8;
1049
+ background: #fff;
1050
+ }
1051
+
1052
+ /*** Review Module section ***/
1053
+ *, *:before, *:after{
1054
+ box-sizing:border-box;
1055
+ }
1056
+ .saswp-settings-list .saswp-rev-mod{
1057
+ width: 100%;
1058
+ display: inline-block;
1059
+ margin-top: 20px;
1060
+ }
1061
+ .saswp-rev-mod .saswp-knowledge-label{
1062
+ width: 100%;
1063
+ display: inline-block;
1064
+ padding: 10px 16px;
1065
+ font-weight: 600;
1066
+ font-size: 16px;
1067
+ color: #333;
1068
+ background: #f9f9f9;
1069
+ border: 1px solid #d8d8d8;
1070
+ border-bottom: none;
1071
+ }
1072
+ .saswp-rev-mod .saswp-knowledge-field{
1073
+ width:100%;
1074
+ display: inline-block;
1075
+ }
1076
+ .saswp-rev-mod .saswp_rv_module_pro_notice{
1077
+ padding:20px;
1078
+ }
1079
+ .saswp_cmpny_lst{
1080
+ width:100%;
1081
+ display: inline-block;
1082
+ margin-top:30px;
1083
+ }
1084
+ .saswp_rv_module_pro_notice ul{
1085
+ margin: 15px 0px 20px 0px;
1086
+ width: 100%;
1087
+ display: inline-grid;
1088
+ grid-template-columns: 1fr 1fr 1fr;
1089
+ grid-gap: 20px;
1090
+ border-bottom: 1px solid #eee;
1091
+ padding-bottom: 20px;
1092
+ }
1093
+ .saswp_rv_module_pro_notice ul li{
1094
+ position: relative;
1095
+ font-size: 15px;
1096
+ line-height: 1.5;
1097
+ color: #444;
1098
+ margin: 0;
1099
+ }
1100
+ .saswp_rv_module_pro_notice ul li span{
1101
+ padding-left:3px;
1102
+ }
1103
+ /*.saswp_rv_module_pro_notice ul li.check-img:before{
1104
+ content: "";
1105
+ background-image: url(../images/check.png);
1106
+ background-repeat: no-repeat;
1107
+ background-size: 16px;
1108
+ width: 16px;
1109
+ height: 16px;
1110
+ position: absolute;
1111
+ left: 2px;
1112
+ top: 6px;
1113
+ }*/
1114
+ .saswp_rv_module_pro_notice h2{
1115
+ text-align: center;
1116
+ font-size: 31px;
1117
+ }
1118
+ .saswp_rv_module_pro_notice .saswp_desc{
1119
+ text-align: center;
1120
+ font-size: 18px;
1121
+ font-style: normal;
1122
+ color: #000;
1123
+ }
1124
+ .saswp_rv_module_pro_notice .saswp_desc a{
1125
+ font-style: italic;
1126
+ }
1127
+ .saswp_rv_module_pro_notice .saswp_lst{
1128
+ color: #808080;
1129
+ font-family: georgia;
1130
+ font-style: italic;
1131
+ font-style: italic;
1132
+ font-size: 15px;
1133
+ font-weight: 600;
1134
+ }
1135
+ .saswp_rv_module_pro_notice .saswp_avlbl{
1136
+ color: #2a902e;
1137
+ font-family: georgia;
1138
+ font-style: italic;
1139
+ font-size: 15px;
1140
+ font-weight: 600;
1141
+ }
1142
+ .saswp_rv_module_pro_notice ul li img{
1143
+ width:20px;
1144
+ height:20px;
1145
+ position: relative;
1146
+ top: 4px;
1147
+ }
1148
+ .saswp-rev-btn{
1149
+ width:100%;
1150
+ display: inline-block;
1151
+ margin-top:20px;
1152
+ text-align: center;
1153
+ }
1154
+ .saswp-rev-btn span{
1155
+ display: block;
1156
+ font-size: 13px;
1157
+ margin-bottom: 15px;
1158
+ }
1159
+ .saswp-rev-btn a{
1160
+ padding: 12px 18px;
1161
+ display: inline-block;
1162
+ text-decoration: none;
1163
+ border-radius: 5px;
1164
+ background: #0085ba;
1165
+ color: #fff;
1166
+ font-weight: 600;
1167
+ font-size: 18px;
1168
+ }
admin_section/css/main-style.min.css CHANGED
@@ -1,1030 +1 @@
1
- /*
2
- To change this license header, choose License Headers in Project Properties.
3
- To change this template file, choose Tools | Templates
4
- and open the template in the editor.
5
- */
6
- /*
7
- Created on : Jul 27, 2018, 5:36:26 PM
8
- Author : Magazine3
9
- */
10
- .saswp_hide{
11
- display: none;
12
- }
13
- .saswp-general table th{
14
- width: auto;
15
- font-weight: 600;
16
- padding: 0px;
17
- }
18
- .saswp-general table{
19
- margin-top: 0px;
20
- }
21
- .saswp-general table td{
22
- padding: 5px;
23
- }
24
- .saswp-knowledge table th{
25
- width: auto;
26
- padding: 0px;
27
- }
28
- .saswp-knowledge table{
29
- margin-top: 0px;
30
- }
31
- .saswp-knowledge table td{
32
- padding: 5px;
33
- }
34
- .saswp-schema table th{
35
- width: auto;
36
- padding: 0px;
37
- }
38
- .saswp-schema table{
39
- margin-top: 0px;
40
- }
41
- .saswp-schema table td{
42
- padding: 5px;
43
- }
44
- .saswp-amp table th{
45
- width: auto;
46
- padding: 0px;
47
- }
48
- .saswp-amp table{
49
- margin-top: 0px;
50
- }
51
- .saswp-amp table td{
52
- padding: 5px;
53
- }
54
- .saswp-help table th{
55
- width: auto;
56
- padding: 0px;
57
- }
58
- .saswp-support table th{
59
- width: auto;
60
- padding: 0px;
61
- }
62
- .saswp-review table th{
63
- width: auto;
64
- padding: 0px;
65
- }
66
- .saswp-help table{
67
- margin-top: 0px;
68
- }
69
- .saswp-help table td{
70
- padding: 5px;
71
- }
72
- .saswp-settings-list{
73
- display:inline-block;
74
- width:100%
75
- }
76
- .saswp-settings-list li{
77
- padding-left:0px;
78
- }
79
- .saswp-settings-list li div label{
80
- font-weight: 600;
81
- }
82
- .saswp-general h2{
83
- margin-bottom: 0px;
84
- }
85
- .saswp-knowledge h2{
86
- margin-bottom: 0px;
87
- }
88
- .saswp-schema h2{
89
- margin-bottom: 0px;
90
- }
91
- .saswp-help h2{
92
- margin-bottom: 0px;
93
- }
94
- .saswp-settings-form p.submit{
95
- margin-top:0px;
96
- }
97
- .saswp_qanda_p{
98
- font-weight: 500;
99
- }
100
- .saswp-display-none{
101
- display: none !important;
102
- }
103
- .saswp-placement-groups{
104
- border: 1px solid #e5e5e5;
105
- }
106
- .saswp-query-success{
107
- color: #006600;
108
- }
109
- .saswp-query-error{
110
- color: #bf3322;
111
- }
112
- .saswp-tools table th{
113
- width: auto;
114
- padding: 0px;
115
- }
116
- .saswp-tools table{
117
- margin-top: 0px;
118
- }
119
- .saswp-tools table td{
120
- padding: 5px;
121
- }
122
- .saswp-tools-field-title strong{
123
- padding-right: 130px;
124
- }
125
- .saswp-tools .saswp-tooltip{
126
- width: 230px;
127
- }
128
- .saswp-tools .saswp-knowledge-label {
129
- float: left;
130
- }
131
- .saswp-error{
132
- color: #ff0000 !important;
133
- }
134
- /*
135
- Tooltip css starts here
136
-
137
- */
138
- .saswp-tooltip {
139
- position: relative;
140
- display: inline-block;
141
- }
142
- .saswp-tooltip .saswp-tooltiptext {
143
- visibility: hidden;
144
- width: 200px;
145
- background-color: black;
146
- color: #fff;
147
- text-align: center;
148
- border-radius: 6px;
149
- padding: 5px 0;
150
-
151
- /* Position the tooltip */
152
- position: absolute;
153
- z-index: 1;
154
- bottom: 100%;
155
- left: 50%;
156
- margin-left: -25px;
157
- }
158
- /*.saswp-tooltip:hover .saswp-tooltiptext {
159
- visibility: visible;
160
- }*/
161
-
162
- .saswp-tooltiptext::after {
163
- content: "";
164
- position: absolute;
165
- top: 100%;
166
- left: 10%;
167
- margin-left: -5px;
168
- border-width: 5px;
169
- border-style: solid;
170
- border-color: black transparent transparent transparent;
171
- }
172
-
173
- /*
174
- Tooltip css ends here
175
-
176
- */
177
- .saswp-knowledge-base .saswp-knowledge-label{
178
- width:200px;
179
- float:left;
180
- clear: both;
181
-
182
- }
183
- .saswp-knowledge-base .saswp-knowledge-field{
184
- width:75%;
185
- float:right;
186
- }
187
-
188
- .saswp-social-fileds ul{
189
- display: grid;
190
- grid-template-columns: 26.5% 1fr;
191
- }
192
- .saswp-social-fileds li{
193
- display: flex;
194
- }
195
- .saswp-social-fileds .saswp-knowledge-field{
196
- width: 100%;
197
- margin-left: 10px;
198
- }
199
- .saswp-social-fileds .saswp-knowledge-field input{
200
- float: right;
201
- margin: inherit;
202
- }
203
- .saswp-schema-type-fields .saswp-knowledge-label{
204
- width:200px;
205
- float:left;
206
- clear: both;
207
- }
208
- .saswp-schema-type-fields .saswp-knowledge-field{
209
- width:75%;
210
- float:right;
211
- }
212
- .saswp-settings-first-div{
213
- width: 70%;
214
- }
215
- .saswp-settings-container{
216
- display: inline-flex;
217
- width: 100%;
218
- }
219
- .saswp-settings-second-div{
220
- float: right;
221
- position: relative;
222
- top: 20px;
223
- margin-right: 30px;
224
- margin-top: 37px;
225
- }
226
- .saswp-feedback-panel{
227
- height: 200px;
228
- width: 280px;
229
- background: #ffffff;
230
- position: relative;
231
-
232
- }
233
- .saswp-start-quck-setup{
234
- position: relative;
235
- float: inherit;
236
- top: 7px;
237
- left:15px;
238
- }
239
- .saswp-feedback-panel ul{
240
- list-style-type: circle;
241
- list-style:decimal;
242
- padding-left: 30px;
243
- font-size: 15px;
244
-
245
- }
246
- .saswp-feedback-panel a{
247
- text-decoration: none;
248
-
249
- }
250
- .saswp-feedback-panel h2{
251
- text-align: center;
252
- padding-top: 18px;
253
-
254
- }
255
- .saswp-social-sharing-buttons {
256
- text-align: center;
257
- padding-top: 20px;
258
-
259
-
260
- }
261
- .saswp-facebook-share{
262
- background: #3B5998;
263
- box-shadow: 0 0px 0 #1b95e0 !important;
264
- color: #fff !important;
265
- line-height: 20px !important;
266
- height: 21px !important;
267
- border-radius: 3px;
268
- margin-right: 5px;
269
- }
270
- .saswp-social-sharing-buttons a{
271
- text-align: center;
272
- padding: 8px;
273
-
274
-
275
- }
276
- .twitter-share-button{
277
- background: #1b95e0 !important;
278
- box-shadow: 0 0px 0 #1b95e0 !important;
279
- color:#fff !important;
280
- line-height: 20px !important;
281
- height: 21px !important;
282
- border-radius: 3px;
283
- margin-left: 5px;
284
-
285
- }
286
- .saswp-placement-button{
287
- padding: 3px 10px;
288
- color: #0d0d0d;
289
- font-size: 14px;
290
- border: 1px solid #aaa;
291
- border-radius: 2px;
292
- background: linear-gradient(#ededed, #ffffff);
293
- }
294
- .saswp-placement-table td {
295
- padding: 5px 10px !important;
296
- }
297
- .saswp-archive-div .saswp-knowledge-field{
298
- float: right;
299
- width: 75%;
300
- padding-bottom: 10px;
301
- }
302
- .saswp-archive-div .saswp-knowledge-label{
303
- float:left;
304
- clear: both;
305
- }
306
-
307
- .saswp-amp .saswp-knowledge-field{
308
- float: right;
309
- width: 75%;
310
- padding-bottom: 10px;
311
- }
312
- .saswp-amp .saswp-knowledge-label{
313
- float:left;
314
- clear: both;
315
- }
316
-
317
- .saswp-review .saswp-knowledge-field{
318
- float: right;
319
- width: 75%;
320
- padding-bottom: 10px;
321
- }
322
- .saswp-review .saswp-knowledge-label{
323
- float:left;
324
- clear: both;
325
- }
326
-
327
- .saswp-compativility-div .saswp-knowledge-field{
328
- float: right;
329
- width: 75%;
330
- padding-bottom: 10px;
331
- }
332
- .saswp-compativility-div .saswp-knowledge-label{
333
- float:left;
334
- clear: both;
335
- }
336
- .saswp-compativility-div li {
337
- display: inline-flex;
338
- }
339
- .saswp-seller-div .saswp-knowledge-label{
340
- float: left;
341
-
342
- clear: both;
343
- }
344
- .saswp-seller-div .saswp-knowledge-field{
345
- float: left;
346
- width: 70%;
347
- }
348
- .saswp-post-specific-tab-wrapper{
349
- display: inline-block;
350
- width: 25%;
351
- vertical-align: top;
352
- box-sizing: border-box;
353
- padding-right:10px;
354
- }
355
- .saswp-post-specific-container{
356
- display: inline-block;
357
- width: calc(75% - 1px );
358
- border-left: 1px solid #eee;
359
- }
360
- .saswp-post-specific-wrapper{
361
- padding: 10px;
362
- }
363
- .saswp-tab a.selected {
364
- background-color: #ccc;
365
- }
366
- .saswp-tab-links{
367
- display: block;
368
- background-color: inherit;
369
- color: black;
370
- padding: 6px 10px;
371
- outline: none;
372
- text-align: left;
373
- cursor: pointer;
374
- transition: 0.3s;
375
- font-size: 15px;
376
- width: 130px;
377
- overflow: hidden;
378
- margin-right: 10px;
379
- }
380
- .saswp-star-rating{
381
- cursor: pointer;
382
- }
383
- .saswp-post-specific-wrapper select{
384
- width: 100%;
385
- }
386
- .saswp-review-tables{
387
- width: 100%;
388
- }
389
- .saswp-over-all-raring{
390
- float: right;
391
- }
392
-
393
- .saswp-review-pros-and-cons{
394
- position: relative;
395
- clear:both;
396
- }
397
- .saswp-review-pros-and-cons > div:first{
398
- padding-left: 10px;
399
- }
400
- .saswp-review-pros-and-cons > div{
401
- width: 49%;
402
- display: inline-block;
403
- }
404
- .saswp-review-pros-and-cons > div:nth-child(2){
405
- padding-left: 12px;
406
- }
407
- .saswp-wp-ediot-desc{
408
- margin-bottom: -23px;
409
- display: block;
410
- }
411
- .saswp-review-description{
412
- margin-top: 40px;
413
- padding-top: 10px;
414
- border-top: 1px solid #eee;
415
- }
416
- .saswp-review-pros-and-cons{
417
- margin-top: 40px;
418
- padding-top: 10px;
419
- border-top: 1px solid #eee;
420
- }
421
- .saspw-review-item-list{
422
- margin-top: 20px;
423
- border-top: 1px solid #eee;
424
- }
425
- .saswp-review-item-list-table{
426
- padding-bottom: 10px;
427
- }
428
- #sasw-review input[type=text] {
429
- width: 180px;
430
- }
431
- #sasw-review input[type=number] {
432
- width: 180px;
433
- }
434
- #saswp-review-item-enable{
435
- width: 10px;
436
- }
437
- .saswp-enable-review-on-post{
438
- padding-bottom: 10px;
439
- }
440
- .saswp-enable-review-on-post label{
441
- font-weight: 500;
442
- }
443
- /*
444
- Compatibility tab css starts here
445
- */
446
- .saswp-compatibility table th{
447
- width: auto;
448
- padding: 0px;
449
- }
450
- .saswp-compatibility .saswp-knowledge-label {
451
- float: left;
452
- clear: both;
453
- }
454
- .saswp-tools .saswp-knowledge-label {
455
- float: left;
456
- clear: both;
457
- }
458
- .saswp-tools .saswp-knowledge-field {
459
- float: right;
460
- width: 69%;
461
- padding-bottom: 10px;
462
- }
463
- .saswp_kg_logo, .saswp_person_fields{
464
- background-color: #fff !important;
465
- }
466
- .saswp_image_thumbnail{
467
- padding-top: 5px;
468
- }
469
- .saswp-compatibility .saswp-knowledge-field {
470
- float: right;
471
- width: 75%;
472
- padding-bottom: 10px;
473
- }
474
- .saswp-schem-type-note, .saswp-job-posting-note{
475
- color: chocolate;
476
- }
477
- .saswp-custom-fields-name{
478
- border: 1px solid #aaa;
479
- border-radius: 4px;
480
- }
481
- /*
482
- Compatibility tab css ends
483
- */
484
- .saswp-option-table-class p{
485
- margin: auto;
486
- font-style: italic;
487
- color: #666;
488
- }
489
- /*
490
- On/Off Buttons starts here
491
- */
492
- .saswp-switch {
493
- position: relative;
494
- display: inline-block;
495
- width: 40px;
496
- height: 22px;
497
- border: 20px;
498
- }
499
-
500
- .saswp-switch input {
501
- opacity: 0;
502
- width: 0;
503
- height: 0;
504
- }
505
-
506
- .saswp-slider {
507
- position: absolute;
508
- cursor: pointer;
509
- top: 0;
510
- left: 0;
511
- right: 0;
512
- bottom: 0;
513
- background-color: #5a6783;
514
- transition: .4s;
515
- border-radius: 20px;
516
- }
517
-
518
- .saswp-slider:before {
519
- position: absolute;
520
- content: "";
521
- height: 15px;
522
- width: 15px;
523
- left: 4px;
524
- bottom: 4px;
525
- background-color: white;
526
- transition: .4s;
527
- border-radius: 20px;
528
- }
529
-
530
- input:checked + .saswp-slider {
531
- background-color: #61bd3b;
532
- border-radius: 30px;
533
- }
534
-
535
- input:focus + .saswp-slider {
536
- box-shadow: 0 0 1px #2196F3;
537
- }
538
-
539
- input:checked + .saswp-slider:before {
540
-
541
- transform: translateX(15px);
542
- }
543
-
544
- /* Rounded sliders */
545
- .saswp-slider.saswp-round {
546
- border-radius: 34px;
547
- }
548
-
549
- .saswp-slider.saswp-round:before {
550
- border-radius: 50%;
551
- }
552
-
553
- .saswp-tab-nav li{
554
- display: flex;
555
- align-items: center;
556
- justify-content: space-between;
557
- margin-bottom:10px;
558
- border-bottom: 1px solid #eee;
559
- }
560
-
561
- .saswp-tab-nav .selected{
562
- background-color: #ccc;
563
- }
564
- .saswp-single-post-restore .saswp-switch{
565
- height: 28px;
566
- }
567
- .saswp-single-post-restore .saswp-slider:before{
568
- height: 20px;
569
- }
570
- /*
571
- On/Off Buttons ends here
572
- */
573
- .saswp-wdi-rate-stars{display:inline-block;color:#ffb900;position:relative;top:3px;}
574
- .saswp-wdi-rate-stars svg{fill:#ffb900;}
575
- .saswp-wdi-rate-stars svg:hover{fill:#ffb900}
576
- .saswp-wdi-rate-stars svg:hover ~ svg{fill:none;}
577
-
578
- .option-table-class {width:100%;}
579
- .option-table-class tr td {padding: 10px 10px 10px 10px ;}
580
- .option-table-class tr > td{width: 30%;}
581
- .option-table-class tr td:last-child{width: 60%;}
582
-
583
- .saswp-option-table-class input[type="text"], .saswp-option-table-class select{
584
- width:100%;
585
- }
586
- .saswp-paywall-table-class input[type="text"], .saswp-paywall-table-class select{
587
- width:100%;
588
- }
589
-
590
- .saswp-custom-fields-table select{
591
- width: 100%;
592
- }
593
-
594
- /*
595
- Compatibility tab css starts here
596
- */
597
- .saswp-email_schema table th{
598
- width: auto;
599
- padding: 0px;
600
- }
601
- .saswp-email_schema .saswp-knowledge-label {
602
- float: left;
603
- clear: both;
604
- }
605
- .saswp-email_schema .saswp-knowledge-field {
606
- float: right;
607
- width: 75%;
608
- padding-bottom: 10px;
609
- }
610
- /*
611
- Compatibility tab css ends
612
- */
613
- .saswp-add-on-plugin label{
614
- margin-top: 10px;
615
- }
616
- .saswp-add-on-plugin span{
617
- width: 250px;
618
- display: inline-block;
619
- }
620
- .saswp-knowledge-label label[for="saswp_search_box_schema_checkbox"] {
621
- padding-left: 10px;
622
- }
623
-
624
- .saswp-knowledge-label label[for="saswp-woocommerce-booking-checkbox"] {
625
- padding-left: 10px;
626
- }
627
-
628
- .saswp-knowledge-label label[for="saswp-woocommerce-membership-checkbox"] {
629
- padding-left: 10px;
630
- }
631
-
632
- .saswp-global-selected{
633
- color: #000000;
634
- font-weight: 500;
635
- }
636
- #saswp-global-tabs a{
637
- cursor: pointer;
638
- }
639
- #saswp-global-tabs{
640
- padding-left: 5px;
641
- }
642
- #saswp-tools-tabs a{
643
- cursor: pointer;
644
- }
645
- #saswp-tools-tabs{
646
- padding-left: 5px;
647
- }
648
- .saswp-need-help {
649
- padding-left: 60px;
650
- }
651
- .saswp-heading{
652
- display: inline-flex;
653
- align-items: baseline;
654
- }
655
- .saswp-heading h2{
656
- margin-bottom: 0px;
657
- }
658
- .saswp-view-docs a{
659
- margin-right: 5px !important;
660
- margin-top: 10px !important;
661
- }
662
- .saswp-tabs .nav-tab{
663
- margin-left: 4px;
664
- }
665
-
666
- /*
667
- Google review module starts here
668
- */
669
- .saswp-panel {
670
- padding: 7px 18px;
671
- background-color: white;
672
- box-shadow: 0px 0px 20px 1px #d2cccc;
673
- }
674
-
675
- /*** Review Design CSS ****/
676
- .saswp-g-review-header{
677
- margin-top: 50px;
678
- }
679
- .saswp-g-review-body{
680
- display:inline-grid;
681
- grid-template-columns: 1fr 300px;
682
- grid-gap:30px;
683
- margin-top:30px;
684
- }
685
- .saswp-review-list{}
686
- .saswp-channel-list{
687
- margin-right: 15px;
688
- }
689
- .saswp-input-fields{
690
- display: inline-flex;
691
- align-items: center;
692
- margin-bottom: 8px;
693
- width: 100%;
694
- }
695
- .saswp-input-fields label{
696
- width: 130px;
697
- }
698
- .saswp-input-fields select{
699
- width:100%;
700
- }
701
- .saswp-panel h3{
702
- font-size: 20px;
703
- line-height: 1.4;
704
- color: #222;
705
- text-align: center;
706
- margin: 10px 0px 20px 0px;
707
- }
708
- .saswp-input-fields a.button-primary{
709
- margin-top:10px;
710
- }
711
- .saswp-glg-review-body{
712
- display: grid;
713
- grid-template-columns: 100px 1fr;
714
- grid-gap: 20px;
715
- background: #fff;
716
- padding: 20px;
717
- box-shadow: 0px 0px 20px 1px #d2cccc;
718
- margin-bottom: 30px;
719
- }
720
- .saswp-g-plus{
721
- float: right;
722
- font-size: 15px;
723
- }
724
- .saswp-rtng{
725
- padding-left: 5px;
726
- font-size: 14px;
727
- }
728
- .saswp-pt-dt {
729
- font-size: 12px;
730
- color: #999;
731
- font-weight: 600;
732
- margin-top: 5px;
733
- display: inline-block;
734
- }
735
- .saswp-str{
736
- display: inline-block;
737
- width: 100%;
738
- vertical-align: middle;
739
- }
740
- .saswp-athr{
741
- font-size: 15px;
742
- line-height: 1.4;
743
- color: #000;
744
- font-weight: bold;
745
- display: inline-block;
746
- vertical-align: middle;
747
- }
748
- .saswp-str-rtng .saswp-rvw-str{
749
- display: inline-block;
750
- vertical-align: middle;
751
- padding-left: 10px;
752
- width: auto;
753
- }
754
- .saswp-rv-cnt p{
755
- font-size: 16px;
756
- line-height: 1.6;
757
- color: #000;
758
- margin: 10px 0px 0px 0px;
759
- }
760
- .saswp-rv-img img{
761
- max-width:100px;
762
- }
763
- /*
764
- Google review module ends here
765
- */
766
-
767
- /** Premium Feature CSS **/
768
- .saswp-premium_features table th, .saswp-services table th{
769
- width: auto;
770
- padding: 0px;
771
- }
772
- .saswp-features-blocks{
773
- display: inline-grid;
774
- grid-template-columns: 1fr 1fr;
775
- grid-gap: 20px;
776
- }
777
- .saswp-features-blocks li{
778
- background:#fff;
779
- padding: 25px;
780
- border: 1px solid #d8d8d8;
781
- }
782
- .saswp-features-blocks li a{
783
- text-decoration: none;
784
- }
785
- .saswp-ele-ic{
786
- border-radius: 256px;
787
- display: inline-block;
788
- padding:8px 10px 8px 10px;
789
- width: 70px;
790
- margin-right: 20px;
791
- float: left;
792
- }
793
- .saswp-ele-ic img{
794
- width:100%;
795
- }
796
- .saswp-ele-1{
797
- background: #96588a;
798
- }
799
- .saswp-ele-2{
800
- background: #00a97e;
801
- }
802
- .saswp-ele-3{
803
- background: #cacaca;
804
- }.saswp-ele-4{
805
- background: #9c56cc;
806
- }
807
- .saswp-ele-tlt h3{
808
- margin:0;
809
- font-size: 18px;
810
- line-height: 1.4;
811
- }
812
- .saswp-ele-tlt p{
813
- margin-top:10px;
814
- }
815
- .saswp-sts-btn{
816
- box-sizing: border-box;
817
- height: 52px;
818
- margin-top: 20px;
819
- padding: 6px 15px;
820
- border: 1px solid #e5e5e5;
821
- border-radius: 3px;
822
- display: flex;
823
- align-items: center;
824
- justify-content: space-between;
825
- }
826
- .saswp-d-btn{
827
- background: #d2150a;
828
- padding: 6px 18px;
829
- border-radius: 30px;
830
- font-size: 14px;
831
- color: #fff;
832
- }
833
- .form-wrap .saswp-sts-txt{
834
- font-size: 16px;
835
- color:#000;
836
- }
837
- .saswp-sts-txt span{
838
- color:#bebfc0;
839
- padding-left:5px;
840
- }
841
-
842
- /** star rating Feature CSS **/
843
-
844
- .saswp-pc-wrap{background-color:#004f74;padding:15px 15px 15px 30px;color:#fff;display:inline-flex;width:100%;flex-wrap:wrap;margin-bottom:20px}.saswp-pc-wrap .saswp-lst span{font-size:18px;font-weight:500;margin-bottom:10px;display:inline-block;line-height:1.3}.saswp-pc-wrap .saswp-lst{flex:1 0 42%}.saswp-pc-wrap .saswp-lst ul{margin:0}.saswp-pc-wrap .saswp-lst p{list-style-type:none;font-size:15px;font-weight:lighter;line-height:1.2;margin-bottom:10px;position:relative;padding-left:20px;color:#eee}.saswp-pc-wrap .saswp-lst p:before{content:'';position:absolute;width:8px;height:8px;background-color:#ccc;left:0;top:6px;border-radius:10px}.sgl .saswp-rvw{width:100%;margin-bottom:34px;font-size:13px;border-bottom:1px solid #ededed}.saswp-rvw-hd span,.saswp-rvw-sm span{background-color:#222;color:#fff;display:inline-block;font-size:15px}.saswp-rvw-hd span{line-height:1.4;padding:8px 12px 6px;margin:26px 0}.saswp-rvw td{padding:7px 14px}.saswp-rvw td,.sgl table td{border:1px solid #ededed}.saswp-rvw tbody{width:100%}.saswp-rvw-sm span{padding:8px 12px 6px;margin-bottom:13px;position:relative;line-height:1.2}.saswp-rvw-fs{line-height:1.5;font-size:48px;font-weight:600;margin-bottom:5px}.saswp-rvw-ov .ovs{font-size:11px;font-weight:600}.sgl .saswp-rvw tr td{background:#fff;width:100%}.sgl .saswp-rvw tr:hover td{background-color:#fcfcfc}.saswp-rvw .saswp-rvw-sm{padding:21px 14px}
845
- .str-ic{font-size:18px;line-height:1.2}.saswp-rvw-str{display:inline-flex;width:100%}.saswp-rvw-str .df-clr,.saswp-rvw-str .half-str,.saswp-rvw-str .str-ic{display:inline-block;width:20px;height:16px;background-repeat:no-repeat}.saswp-rvw-ov{text-align:center}.saswp-rvw-str .half-str{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNNDgyLjIwNywxODYuOTczbC0xNTkuNjk5LTMzLjcwNUwyNDEuMTA0LDExLjgwM2wtODEuNDA0LDE0MS40NjVMMCwxODYuOTczbDEwOS4zODgsMTIxLjEzNEw5Mi4wOTQsNDcwLjQwNGwxNDkuMDEtNjYuNiAgbDE0OS4wMSw2Ni42bC0xNy4yOTQtMTYyLjI5Nkw0ODIuMjA3LDE4Ni45NzN6IE0yNDEuMTA0LDM3MC45NDNWNzEuOTUzbDYyLjA5LDEwNy45TDQyNSwyMDUuNTYxbC04My40MzMsOTIuMzkzbDEzLjE5MSwxMjMuNzg4ICBMMjQxLjEwNCwzNzAuOTQzeiIgZmlsbD0iI2ZmZDcwMCIvPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K)}.saswp-rvw-str .str-ic{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiNmZmQ3MDAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-rvw-str .df-clr{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiM2MzVlNjMiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}
846
- /*** Review Design CSS ****/
847
- .saswp-g-review-header{
848
- margin-top: 50px;
849
- }
850
- .saswp-g-review-body{
851
- display:inline-grid;
852
- grid-template-columns: 1fr 300px;
853
- grid-gap:30px;
854
- margin-top:30px;
855
- width:100%;
856
- }
857
- .saswp-review-list{}
858
- .saswp-channel-list{
859
- margin-right: 15px;
860
- }
861
- .saswp-input-fields{
862
- display: inline-flex;
863
- align-items: center;
864
- margin-bottom: 8px;
865
- width: 100%;
866
- }
867
- .saswp-input-fields label{
868
- width: 130px;
869
- }
870
- .saswp-panel h3{
871
- font-size: 20px;
872
- line-height: 1.4;
873
- color: #222;
874
- text-align: center;
875
- margin: 10px 0px 20px 0px;
876
- }
877
- .saswp-input-fields a.button-primary{
878
- margin-top:10px;
879
- }
880
- .saswp-glg-review-body{
881
- display: grid;
882
- grid-template-columns: 100px 1fr;
883
- grid-gap: 20px;
884
- background: #fff;
885
- padding: 20px;
886
- box-shadow: 0px 0px 20px 1px #d2cccc;
887
- margin-bottom: 30px;
888
- }
889
- .saswp-g-plus{
890
- float: right;
891
- font-size: 15px;
892
- width: 20px;
893
- height: 20px;
894
- }
895
- .saswp-g-plus img{
896
- width:100%;
897
- }
898
- .saswp-rtng{
899
- padding-left: 5px;
900
- font-size: 14px;
901
- }
902
- .saswp-pt-dt {
903
- font-size: 12px;
904
- color: #999;
905
- font-weight: 600;
906
- margin-top: 5px;
907
- display: inline-block;
908
- }
909
- .saswp-athr{
910
- font-size: 15px;
911
- line-height: 1.4;
912
- color: #000;
913
- font-weight: bold;
914
- }
915
- .saswp-rv-cnt p{
916
- font-size: 16px;
917
- line-height: 1.6;
918
- color: #000;
919
- margin: 10px 0px 0px 0px;
920
- }
921
- .saswp-rv-img img{
922
- max-width:100px;
923
- }
924
- .saswp-g-review-header div{
925
- margin-top:10px;
926
- }
927
-
928
- /*** Upgrade Pro CSS ***/
929
- .saswp-upgrade-pro{
930
- background: #fff;
931
- padding: 25px;
932
- border: 1px solid #d8d8d8;
933
- display: inline-block;
934
- margin-top: 10px;
935
- width: 81%;
936
- }
937
- .saswp-upgrade-pro h2{
938
- font-size: 20px;
939
- margin: 0;
940
- color: #23282d;
941
- font-weight: 600;
942
- text-align: center;
943
- }
944
- .saswp-upgrade-pro ul{
945
- margin: 25px 0px 20px 0px;
946
- display: inline-block;
947
- }
948
- .saswp-upgrade-pro ul li{
949
- position: relative;
950
- padding-left: 30px;
951
- font-size: 14px;
952
- line-height: 1.4;
953
- margin-bottom: 10px;
954
- }
955
- .saswp-upgrade-pro ul li:before {
956
- content: "";
957
- background-image: url(../images/check.png);
958
- background-repeat: no-repeat;
959
- background-size: 20px;
960
- width: 20px;
961
- height: 20px;
962
- position: absolute;
963
- left: 2px;
964
- top: 2px;
965
- }
966
- .saswp-upgrade-pro a{
967
- background: #d2150a;
968
- padding: 10px 0px;
969
- display: block;
970
- text-align: center;
971
- color: #fff;
972
- text-decoration: none;
973
- font-size: 16px;
974
- font-weight: 600;
975
- letter-spacing: 1px;
976
- border-radius: 5px;
977
- }
978
- .saswp_image_prev{
979
- max-width: 200px;
980
- max-height: 200px;
981
- float: left;
982
- padding-left:2px;
983
- }
984
- .saswp_prev_close {
985
- position: relative;
986
- width:30px;
987
- height:30px;
988
- top: 12px;
989
- font-size: 20px;
990
- top: -5px;
991
- text-decoration:none;
992
- }
993
- .saswp-add-custom-schema-div{
994
- margin-top: 10px;
995
- border-top: 1px solid #eee;
996
- padding-top: 5px;
997
- }
998
-
999
- .saswp-nav-menu-list label{
1000
- padding-left: 10px;
1001
- }
1002
- /*** How to schema css starts here ***/
1003
-
1004
- .saswp-how-to-supply-table-div,
1005
- .saswp-how-to-tool-table-div,
1006
- .saswp-how-to-step-table-div,
1007
- .saswp-tvseries-actor-table-div,
1008
- .saswp-tvseries-season-table-div,
1009
- .saswp-mc-symptom-table-div,
1010
- .saswp-mc-risk_factor-table-div,
1011
- .saswp-trip-itinerary-table-div,
1012
- .saswp-mc-cause-table-div
1013
- {
1014
- border: 1px solid #aaa;
1015
- margin-top: 5px;
1016
- margin-bottom: 5px;
1017
-
1018
- }
1019
- .saswp-table-close{
1020
- float: right;
1021
- cursor: pointer;
1022
- }
1023
- .saswp-table-create-onajax table th, .saswp-table-create-onajax table td{
1024
- padding: 5px;
1025
- }
1026
- .saswp-table-create-onajax select{
1027
- width: 98%;
1028
- }
1029
-
1030
- /*** How to schema css ends here ***/
1
+ .saswp_warning{color:#ef6c00!important}.saswp_hide{display:none}.saswp-general table th{width:auto;font-weight:600;padding:0}.saswp-general table{margin-top:0}.saswp-general table td{padding:5px}.saswp-knowledge table th{width:auto;padding:0}.saswp-knowledge table{margin-top:0}.saswp-knowledge table td{padding:5px}.saswp-schema table th{width:auto;padding:0}.saswp-schema table{margin-top:0}.saswp-schema table td{padding:5px}.saswp-amp table th{width:auto;padding:0}.saswp-amp table{margin-top:0}.saswp-amp table td{padding:5px}.saswp-help table th{width:auto;padding:0}.saswp-support table th{width:auto;padding:0}.saswp-review table th{width:auto;padding:0}.saswp-help table{margin-top:0}.saswp-help table td{padding:5px}.saswp-settings-list{display:inline-block;width:100%}.saswp-settings-list li{padding-left:0}.saswp-settings-list li div label{font-weight:600}.saswp-general h2{margin-bottom:0}.saswp-knowledge h2{margin-bottom:0}.saswp-schema h2{margin-bottom:0}.saswp-help h2{margin-bottom:0}.saswp-settings-form p.submit{margin-top:0}.saswp_qanda_p{font-weight:500}.saswp-display-none{display:none!important}.saswp-placement-groups{border:1px solid #e5e5e5}.saswp-query-success{color:#060}.saswp-query-error{color:#bf3322}.saswp-tools table th{width:auto;padding:0}.saswp-tools table{margin-top:0}.saswp-tools table td{padding:5px}.saswp-tools-field-title strong{padding-right:130px}.saswp-tools .saswp-tooltip{width:230px}.saswp-tools .saswp-knowledge-label{float:left}.saswp-error{color:red!important}.saswp-tooltip{position:relative;display:inline-block}.saswp-tooltip .saswp-tooltiptext{visibility:hidden;width:200px;background-color:#000;color:#fff;text-align:center;border-radius:6px;padding:5px 0;position:absolute;z-index:1;bottom:100%;left:50%;margin-left:-25px}.saswp-tooltiptext::after{content:"";position:absolute;top:100%;left:10%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#000 transparent transparent transparent}.saswp-knowledge-base .saswp-knowledge-label{width:200px;float:left;clear:both}.saswp-knowledge-base .saswp-knowledge-field{width:75%;float:right}.saswp-social-fileds ul{display:grid;grid-template-columns:26.5% 1fr}.saswp-social-fileds li{display:flex}.saswp-social-fileds .saswp-knowledge-field{width:100%;margin-left:10px}.saswp-social-fileds .saswp-knowledge-field input{float:right;margin:inherit}.saswp-schema-type-fields .saswp-knowledge-label{width:200px;float:left;clear:both}.saswp-schema-type-fields .saswp-knowledge-field{width:75%;float:right}.saswp-settings-first-div{width:70%}.saswp-settings-container{display:inline-flex;width:100%}.saswp-settings-second-div{float:right;position:relative;top:20px;margin-right:30px;margin-top:37px}.saswp-feedback-panel{height:200px;width:280px;background:#fff;position:relative}.saswp-start-quck-setup{position:relative;float:inherit;top:7px;left:15px}.saswp-feedback-panel ul{list-style-type:circle;list-style:decimal;padding-left:30px;font-size:15px}.saswp-feedback-panel a{text-decoration:none}.saswp-feedback-panel h2{text-align:center;padding-top:18px}.saswp-social-sharing-buttons{text-align:center;padding-top:20px}.saswp-facebook-share{background:#3b5998;box-shadow:0 0 0 #1b95e0!important;color:#fff!important;line-height:20px!important;height:21px!important;border-radius:3px;margin-right:5px}.saswp-social-sharing-buttons a{text-align:center;padding:8px}.twitter-share-button{background:#1b95e0!important;box-shadow:0 0 0 #1b95e0!important;color:#fff!important;line-height:20px!important;height:21px!important;border-radius:3px;margin-left:5px}.saswp-placement-button{padding:3px 10px;color:#0d0d0d;font-size:14px;border:1px solid #aaa;border-radius:2px;background:linear-gradient(#ededed,#fff)}.saswp-placement-table td{padding:5px 10px!important}.saswp-archive-div .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-archive-div .saswp-knowledge-label{float:left;clear:both}.saswp-amp .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-amp .saswp-knowledge-label{float:left;clear:both}.saswp-review .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-review .saswp-knowledge-label{float:left;clear:both}.saswp-compativility-div .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-compativility-div .saswp-knowledge-label{float:left;clear:both}.saswp-compativility-div li{display:inline-flex}.saswp-seller-div .saswp-knowledge-label{float:left;clear:both}.saswp-seller-div .saswp-knowledge-field{float:left;width:70%}.saswp-post-specific-tab-wrapper{display:inline-block;width:25%;vertical-align:top;box-sizing:border-box;padding-right:10px}.saswp-post-specific-container{display:inline-block;width:calc(75% - 1px);border-left:1px solid #eee}.saswp-post-specific-wrapper{padding:10px}.saswp-tab a.selected{background-color:#ccc}.saswp-tab-links{display:block;background-color:inherit;color:#000;padding:6px 10px;outline:0;text-align:left;cursor:pointer;transition:.3s;font-size:15px;width:130px;overflow:hidden;margin-right:10px}.saswp-star-rating{cursor:pointer}.saswp-post-specific-wrapper select{width:100%}.saswp-review-tables{width:100%}.saswp-over-all-raring{float:right}.saswp-review-pros-and-cons{position:relative;clear:both}.saswp-review-pros-and-cons>div:first{padding-left:10px}.saswp-review-pros-and-cons>div{width:49%;display:inline-block}.saswp-review-pros-and-cons>div:nth-child(2){padding-left:12px}.saswp-wp-ediot-desc{margin-bottom:-23px;display:block}.saswp-review-description{margin-top:40px;padding-top:10px;border-top:1px solid #eee}.saswp-review-pros-and-cons{margin-top:40px;padding-top:10px;border-top:1px solid #eee}.saspw-review-item-list{margin-top:20px;border-top:1px solid #eee}.saswp-review-item-list-table{padding-bottom:10px}#sasw-review input[type=text]{width:180px}#sasw-review input[type=number]{width:180px}#saswp-review-item-enable{width:10px}.saswp-enable-review-on-post{padding-bottom:10px}.saswp-enable-review-on-post label{font-weight:500}.saswp-compatibility table th{width:auto;padding:0}.saswp-compatibility .saswp-knowledge-label{float:left;clear:both}.saswp-tools .saswp-knowledge-label{float:left;clear:both}.saswp-tools .saswp-knowledge-field{float:right;width:69%;padding-bottom:10px}.saswp_kg_logo,.saswp_person_fields{background-color:#fff!important}.saswp_image_thumbnail{padding-top:5px;display:inline-block}.saswp-compatibility .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-job-posting-note,.saswp-schem-type-note{color:#d2691e}.saswp-custom-fields-name{border:1px solid #aaa;border-radius:4px}.saswp-option-table-class p{margin:auto;font-style:italic;color:#666}.saswp-switch{position:relative;display:inline-block;width:40px;height:22px;border:20px}.saswp-switch input{opacity:0;width:0;height:0}.saswp-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#5a6783;transition:.4s;border-radius:20px}.saswp-slider:before{position:absolute;content:"";height:15px;width:15px;left:4px;bottom:4px;background-color:#fff;transition:.4s;border-radius:20px}input:checked+.saswp-slider{background-color:#61bd3b;border-radius:30px}input:focus+.saswp-slider{box-shadow:0 0 1px #2196f3}input:checked+.saswp-slider:before{transform:translateX(15px)}.saswp-slider.saswp-round{border-radius:34px}.saswp-slider.saswp-round:before{border-radius:50%}.saswp-tab-nav li{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;border-bottom:1px solid #eee}.saswp-tab-nav .selected{background-color:#ccc}.saswp-single-post-restore .saswp-switch{height:28px}.saswp-single-post-restore .saswp-slider:before{height:20px}.saswp-wdi-rate-stars{display:inline-block;color:#ffb900;position:relative;top:3px}.saswp-wdi-rate-stars svg{fill:#ffb900}.saswp-wdi-rate-stars svg:hover{fill:#ffb900}.saswp-wdi-rate-stars svg:hover~svg{fill:none}.option-table-class{width:100%}.option-table-class tr td{padding:10px 10px 10px 10px}.option-table-class tr>td{width:30%}.option-table-class tr td:last-child{width:60%}.saswp-option-table-class input[type=text],.saswp-option-table-class select{width:100%}.saswp-paywall-table-class input[type=text],.saswp-paywall-table-class select{width:100%}.saswp-custom-fields-table select{width:100%}.saswp-email_schema table th{width:auto;padding:0}.saswp-email_schema .saswp-knowledge-label{float:left;clear:both}.saswp-email_schema .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-add-on-plugin label{margin-top:10px}.saswp-add-on-plugin span{width:250px;display:inline-block}.saswp-knowledge-label label[for=saswp_search_box_schema_checkbox]{padding-left:10px}.saswp-knowledge-label label[for=saswp-woocommerce-booking-checkbox]{padding-left:10px}.saswp-knowledge-label label[for=saswp-woocommerce-membership-checkbox]{padding-left:10px}.saswp-global-selected{color:#000;font-weight:500}#saswp-global-tabs a{cursor:pointer}#saswp-global-tabs{padding-left:5px}#saswp-tools-tabs a{cursor:pointer}#saswp-review-tabs a{cursor:pointer}#saswp-tools-tabs{padding-left:5px}.saswp-need-help{padding-left:60px}.saswp-heading{display:inline-flex;align-items:baseline}.saswp-heading h2{margin-bottom:0}.saswp-view-docs a{margin-right:5px!important;margin-top:10px!important}.saswp-tabs .nav-tab{margin-left:4px}.saswp-panel{padding:7px 18px;background-color:#fff;box-shadow:0 0 20px 1px #d2cccc}.saswp-g-review-header{margin-top:50px}.saswp-g-review-body{display:inline-grid;grid-template-columns:1fr 300px;grid-gap:30px;margin-top:30px}.saswp-channel-list{margin-right:15px}.saswp-input-fields{display:inline-flex;align-items:center;margin-bottom:8px;width:100%}.saswp-input-fields label{width:130px}.saswp-input-fields select{width:100%}.saswp-panel h3{font-size:20px;line-height:1.4;color:#222;text-align:center;margin:10px 0 20px 0}.saswp-input-fields a.button-primary{margin-top:10px}.saswp-glg-review-body{display:grid;grid-template-columns:100px 1fr;grid-gap:20px;background:#fff;padding:20px;box-shadow:0 0 20px 1px #d2cccc;margin-bottom:30px}.saswp-g-plus{float:right;font-size:15px}.saswp-rtng{padding-left:5px;font-size:14px}.saswp-pt-dt{font-size:12px;color:#999;font-weight:600;margin-top:5px;display:inline-block}.saswp-str{display:inline-block;width:100%;vertical-align:middle}.saswp-athr{font-size:15px;line-height:1.4;color:#000;font-weight:700;display:inline-block;vertical-align:middle}.saswp-str-rtng .saswp-rvw-str{display:inline-block;vertical-align:middle;padding-left:10px;width:auto}.saswp-rv-cnt p{font-size:16px;line-height:1.6;color:#000;margin:10px 0 0 0}.saswp-rv-img img{max-width:100px;border-radius:100%}.saswp-premium_features table th,.saswp-services table th{width:auto;padding:0}.saswp-features-blocks{display:inline-grid;grid-template-columns:1fr 1fr;grid-gap:20px}.saswp-features-blocks li{background:#fff;padding:25px;border:1px solid #d8d8d8}.saswp-features-blocks li a{text-decoration:none}.saswp-ele-ic{border-radius:256px;display:inline-block;padding:8px 10px 8px 10px;width:70px;margin-right:20px;float:left}.saswp-ele-ic img{width:100%}.saswp-ele-1{background:#96588a}.saswp-ele-2{background:#00a97e}.saswp-ele-3{background:#cacaca}.saswp-ele-4{background:#9c56cc}.saswp-ele-tlt h3{margin:0;font-size:18px;line-height:1.4}.saswp-ele-tlt p{margin-top:10px}.saswp-sts-btn{box-sizing:border-box;height:52px;margin-top:20px;padding:6px 15px;border:1px solid #e5e5e5;border-radius:3px;display:flex;align-items:center;justify-content:space-between}.saswp-d-btn{background:#d2150a;padding:6px 18px;border-radius:30px;font-size:14px;color:#fff}.form-wrap .saswp-sts-txt{font-size:16px;color:#000}.saswp-sts-txt span{color:#bebfc0;padding-left:5px}.saswp_review_platform .saswp-g-plus{float:left}.saswp-pc-wrap{background-color:#004f74;padding:15px 15px 15px 30px;color:#fff;display:inline-flex;width:100%;flex-wrap:wrap;margin-bottom:20px}.saswp-pc-wrap .saswp-lst span{font-size:18px;font-weight:500;margin-bottom:10px;display:inline-block;line-height:1.3}.saswp-pc-wrap .saswp-lst{flex:1 0 42%}.saswp-pc-wrap .saswp-lst ul{margin:0}.saswp-pc-wrap .saswp-lst p{list-style-type:none;font-size:15px;font-weight:lighter;line-height:1.2;margin-bottom:10px;position:relative;padding-left:20px;color:#eee}.saswp-pc-wrap .saswp-lst p:before{content:'';position:absolute;width:8px;height:8px;background-color:#ccc;left:0;top:6px;border-radius:10px}.sgl .saswp-rvw{width:100%;margin-bottom:34px;font-size:13px;border-bottom:1px solid #ededed}.saswp-rvw-hd span,.saswp-rvw-sm span{background-color:#222;color:#fff;display:inline-block;font-size:15px}.saswp-rvw-hd span{line-height:1.4;padding:8px 12px 6px;margin:26px 0}.saswp-rvw td{padding:7px 14px}.saswp-rvw td,.sgl table td{border:1px solid #ededed}.saswp-rvw tbody{width:100%}.saswp-rvw-sm span{padding:8px 12px 6px;margin-bottom:13px;position:relative;line-height:1.2}.saswp-rvw-fs{line-height:1.5;font-size:48px;font-weight:600;margin-bottom:5px}.saswp-rvw-ov .ovs{font-size:11px;font-weight:600}.sgl .saswp-rvw tr td{background:#fff;width:100%}.sgl .saswp-rvw tr:hover td{background-color:#fcfcfc}.saswp-rvw .saswp-rvw-sm{padding:21px 14px}.str-ic{font-size:18px;line-height:1.2}.saswp-rvw-str{display:inline-flex;width:100%}.saswp-rvw-str .df-clr,.saswp-rvw-str .half-str,.saswp-rvw-str .str-ic{display:inline-block;width:20px;height:16px;background-repeat:no-repeat}.saswp-rvw-ov{text-align:center}.saswp-rvw-str .half-str{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNNDgyLjIwNywxODYuOTczbC0xNTkuNjk5LTMzLjcwNUwyNDEuMTA0LDExLjgwM2wtODEuNDA0LDE0MS40NjVMMCwxODYuOTczbDEwOS4zODgsMTIxLjEzNEw5Mi4wOTQsNDcwLjQwNGwxNDkuMDEtNjYuNiAgbDE0OS4wMSw2Ni42bC0xNy4yOTQtMTYyLjI5Nkw0ODIuMjA3LDE4Ni45NzN6IE0yNDEuMTA0LDM3MC45NDNWNzEuOTUzbDYyLjA5LDEwNy45TDQyNSwyMDUuNTYxbC04My40MzMsOTIuMzkzbDEzLjE5MSwxMjMuNzg4ICBMMjQxLjEwNCwzNzAuOTQzeiIgZmlsbD0iI2ZmZDcwMCIvPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K)}.saswp-rvw-str .str-ic{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiNmZmQ3MDAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-rvw-str .df-clr{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiM2MzVlNjMiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-g-review-header{margin-top:50px}.saswp-g-review-body{display:inline-grid;grid-template-columns:1fr 300px;grid-gap:30px;margin-top:30px;width:100%}.saswp-channel-list{margin-right:15px}.saswp-input-fields{display:inline-flex;align-items:center;margin-bottom:8px;width:100%}.saswp-input-fields label{width:130px}.saswp-panel h3{font-size:20px;line-height:1.4;color:#222;text-align:center;margin:10px 0 20px 0}.saswp-input-fields a.button-primary{margin-top:10px}.saswp-glg-review-body{display:grid;grid-template-columns:100px 1fr;grid-gap:20px;background:#fff;padding:20px;box-shadow:0 0 20px 1px #d2cccc;margin-bottom:30px}.saswp-g-plus{float:right;font-size:15px;width:20px;height:20px}.saswp-g-plus img{width:100%}.saswp-rtng{padding-left:5px;font-size:14px}.saswp-pt-dt{font-size:12px;color:#999;font-weight:600;margin-top:5px;display:inline-block}.saswp-athr{font-size:15px;line-height:1.4;color:#000;font-weight:700}.saswp-rv-cnt p{font-size:16px;line-height:1.6;color:#000;margin:10px 0 0 0}.saswp-rv-img img{max-width:100px}.saswp-g-review-header div{margin-top:10px}.saswp-upgrade-pro{background:#fff;padding:25px;border:1px solid #d8d8d8;display:inline-block;margin-top:10px;width:81%}.saswp-upgrade-pro h2{font-size:20px;margin:0;color:#23282d;font-weight:600;text-align:center}.saswp-upgrade-pro ul{margin:25px 0 20px 0;display:inline-block}.saswp-upgrade-pro ul li{position:relative;padding-left:30px;font-size:14px;line-height:1.4;margin-bottom:10px}.saswp-upgrade-pro ul li:before{content:"";background-image:url(../images/check.png);background-repeat:no-repeat;background-size:20px;width:20px;height:20px;position:absolute;left:2px;top:2px}.saswp-upgrade-pro a{background:#d2150a;padding:10px 0;display:block;text-align:center;color:#fff;text-decoration:none;font-size:16px;font-weight:600;letter-spacing:1px;border-radius:5px}.saswp_image_prev{max-width:200px;max-height:200px;float:left;padding-left:2px}.saswp_prev_close{position:relative;width:30px;height:30px;top:12px;font-size:20px;top:-5px;text-decoration:none}.saswp-add-custom-schema-div{margin-top:10px;border-top:1px solid #eee;padding-top:5px}.saswp-nav-menu-list label{padding-left:10px}.saswp-faq-question-table-div,.saswp-how-to-step-table-div,.saswp-how-to-supply-table-div,.saswp-how-to-tool-table-div,.saswp-mc-cause-table-div,.saswp-mc-risk_factor-table-div,.saswp-mc-symptom-table-div,.saswp-trip-itinerary-table-div,.saswp-tvseries-actor-table-div,.saswp-tvseries-season-table-div{border:1px solid #aaa;margin-top:5px;margin-bottom:5px}.saswp-table-close{float:right;cursor:pointer}.saswp-table-create-onajax table td,.saswp-table-create-onajax table th{padding:5px}.saswp-table-create-onajax select{width:98%}.saswp-g-reviews-settings-table input{width:100%}.saswp_rv_module_pro_notice{border:1px solid #d8d8d8;background:#fff}*,:after,:before{box-sizing:border-box}.saswp-settings-list .saswp-rev-mod{width:100%;display:inline-block;margin-top:20px}.saswp-rev-mod .saswp-knowledge-label{width:100%;display:inline-block;padding:10px 16px;font-weight:600;font-size:16px;color:#333;background:#f9f9f9;border:1px solid #d8d8d8;border-bottom:none}.saswp-rev-mod .saswp-knowledge-field{width:100%;display:inline-block}.saswp-rev-mod .saswp_rv_module_pro_notice{padding:20px}.saswp_cmpny_lst{width:100%;display:inline-block;margin-top:30px}.saswp_rv_module_pro_notice ul{margin:15px 0 20px 0;width:100%;display:inline-grid;grid-template-columns:1fr 1fr 1fr;grid-gap:20px;border-bottom:1px solid #eee;padding-bottom:20px}.saswp_rv_module_pro_notice ul li{position:relative;font-size:15px;line-height:1.5;color:#444;margin:0}.saswp_rv_module_pro_notice ul li span{padding-left:3px}.saswp_rv_module_pro_notice h2{text-align:center;font-size:31px}.saswp_rv_module_pro_notice .saswp_desc{text-align:center;font-size:18px;font-style:normal;color:#000}.saswp_rv_module_pro_notice .saswp_desc a{font-style:italic}.saswp_rv_module_pro_notice .saswp_lst{color:grey;font-family:georgia;font-style:italic;font-style:italic;font-size:15px;font-weight:600}.saswp_rv_module_pro_notice .saswp_avlbl{color:#2a902e;font-family:georgia;font-style:italic;font-size:15px;font-weight:600}.saswp_rv_module_pro_notice ul li img{width:20px;height:20px;position:relative;top:4px}.saswp-rev-btn{width:100%;display:inline-block;margin-top:20px;text-align:center}.saswp-rev-btn span{display:block;font-size:13px;margin-bottom:15px}.saswp-rev-btn a{padding:12px 18px;display:inline-block;text-decoration:none;border-radius:5px;background:#0085ba;color:#fff;font-weight:600;font-size:18px}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin_section/css/saswp-style.css CHANGED
@@ -85,6 +85,7 @@
85
  }
86
  .saswp-rv-img img{
87
  max-width:100px;
 
88
  }
89
  .widget-area .saswp-rv-img img{max-width:50px;}
90
  .widget-area .saswp-glg-review-body {
85
  }
86
  .saswp-rv-img img{
87
  max-width:100px;
88
+ border-radius: 100%;
89
  }
90
  .widget-area .saswp-rv-img img{max-width:50px;}
91
  .widget-area .saswp-glg-review-body {
admin_section/css/saswp-style.min.css CHANGED
@@ -1 +1,98 @@
1
- .saswp-pc-wrap{background-color:#004f74;padding:15px 15px 15px 30px;color:#fff;display:inline-flex;width:100%;flex-wrap:wrap;margin-bottom:20px}.saswp-pc-wrap .saswp-lst span{font-size:18px;font-weight:500;margin-bottom:10px;display:inline-block;line-height:1.3}.saswp-pc-wrap .saswp-lst{flex:1 0 42%}.saswp-pc-wrap .saswp-lst ul{margin:0}.saswp-pc-wrap .saswp-lst p{list-style-type:none;font-size:15px;font-weight:lighter;line-height:1.2;margin-bottom:10px;position:relative;padding-left:20px;color:#eee}.saswp-pc-wrap .saswp-lst p:before{content:'';position:absolute;width:8px;height:8px;background-color:#ccc;left:0;top:6px;border-radius:10px}.sgl .saswp-rvw{width:100%;margin-bottom:34px;font-size:13px;border-bottom:1px solid #ededed}.saswp-rvw-hd span,.saswp-rvw-sm span{background-color:#222;color:#fff;display:inline-block;font-size:15px}.saswp-rvw-hd span{line-height:1.4;padding:8px 12px 6px;margin:26px 0}.saswp-rvw td{padding:7px 14px}.saswp-rvw td,.sgl table td{border:1px solid #ededed}.saswp-rvw tbody{width:100%}.saswp-rvw-sm span{padding:8px 12px 6px;margin-bottom:13px;position:relative;line-height:1.2}.saswp-rvw-fs{line-height:1.5;font-size:48px;font-weight:600;margin-bottom:5px}.saswp-rvw-ov .ovs{font-size:11px;font-weight:600}.sgl .saswp-rvw tr td{background:#fff;width:100%}.sgl .saswp-rvw tr:hover td{background-color:#fcfcfc}.saswp-rvw .saswp-rvw-sm{padding:21px 14px}.str-ic{font-size:18px;line-height:1.2}.saswp-rvw-str{display:inline-flex;width:100%}.saswp-rvw-str .df-clr,.saswp-rvw-str .half-str,.saswp-rvw-str .str-ic{display:inline-block;width:20px;height:16px;background-repeat:no-repeat}.saswp-rvw-ov{text-align:center}.saswp-rvw-str .half-str{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNNDgyLjIwNywxODYuOTczbC0xNTkuNjk5LTMzLjcwNUwyNDEuMTA0LDExLjgwM2wtODEuNDA0LDE0MS40NjVMMCwxODYuOTczbDEwOS4zODgsMTIxLjEzNEw5Mi4wOTQsNDcwLjQwNGwxNDkuMDEtNjYuNiAgbDE0OS4wMSw2Ni42bC0xNy4yOTQtMTYyLjI5Nkw0ODIuMjA3LDE4Ni45NzN6IE0yNDEuMTA0LDM3MC45NDNWNzEuOTUzbDYyLjA5LDEwNy45TDQyNSwyMDUuNTYxbC04My40MzMsOTIuMzkzbDEzLjE5MSwxMjMuNzg4ICBMMjQxLjEwNCwzNzAuOTQzeiIgZmlsbD0iI2ZmZDcwMCIvPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K)}.saswp-rvw-str .str-ic{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiNmZmQ3MDAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-rvw-str .df-clr{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiM2MzVlNjMiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-g-review-header{margin-top:50px}.saswp-g-review-body{display:inline-grid;grid-template-columns:1fr 300px;grid-gap:30px;margin-top:30px;width:100%}.saswp-channel-list{margin-right:15px}.saswp-input-fields{display:inline-flex;align-items:center;margin-bottom:8px;width:100%}.saswp-input-fields label{width:130px}.saswp-panel h3{font-size:20px;line-height:1.4;color:#222;text-align:center;margin:10px 0 20px 0}.saswp-input-fields a.button-primary{margin-top:10px}.saswp-glg-review-body{display:grid;grid-template-columns:100px 1fr;grid-gap:20px;background:#fff;padding:20px;box-shadow:0 0 20px 1px #d2cccc;margin-bottom:30px}.saswp-g-plus{float:right;font-size:15px;width:20px;height:20px}.saswp-g-plus img{width:100%}.saswp-rtng{padding-left:5px;font-size:14px}.saswp-pt-dt{font-size:12px;color:#999;font-weight:600;margin-top:5px;display:inline-block}.saswp-athr{font-size:15px;line-height:1.4;color:#000;font-weight:700;display:inline-block;vertical-align:middle}.saswp-str-rtng .saswp-rvw-str{display:inline-block;vertical-align:middle;padding-left:10px;width:auto}.widget-area .saswp-str-rtng .saswp-rvw-str{padding:10px 0 0 0}.saswp-rv-cnt p{font-size:16px;line-height:1.6;color:#000;margin:10px 0 0 0}.saswp-rv-img img{max-width:100px}.widget-area .saswp-rv-img img{max-width:50px}.widget-area .saswp-glg-review-body{display:inline-block;width:100%}.widget-area .saswp-rv-img{width:60px;float:left}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .saswp-pc-wrap{background-color:#004f74;padding:15px 15px 15px 30px;color:#fff;display:inline-flex;width:100%;flex-wrap:wrap;margin-bottom:20px}.saswp-pc-wrap .saswp-lst span{font-size:18px;font-weight:500;margin-bottom:10px;display:inline-block;line-height:1.3}.saswp-pc-wrap .saswp-lst{flex:1 0 42%}.saswp-pc-wrap .saswp-lst ul{margin:0}.saswp-pc-wrap .saswp-lst p{list-style-type:none;font-size:15px;font-weight:lighter;line-height:1.2;margin-bottom:10px;position:relative;padding-left:20px;color:#eee}.saswp-pc-wrap .saswp-lst p:before{content:'';position:absolute;width:8px;height:8px;background-color:#ccc;left:0;top:6px;border-radius:10px}.sgl .saswp-rvw{width:100%;margin-bottom:34px;font-size:13px;border-bottom:1px solid #ededed}.saswp-rvw-hd span,.saswp-rvw-sm span{background-color:#222;color:#fff;display:inline-block;font-size:15px}.saswp-rvw-hd span{line-height:1.4;padding:8px 12px 6px;margin:26px 0}.saswp-rvw td{padding:7px 14px}.saswp-rvw td,.sgl table td{border:1px solid #ededed}.saswp-rvw tbody{width:100%}.saswp-rvw-sm span{padding:8px 12px 6px;margin-bottom:13px;position:relative;line-height:1.2}.saswp-rvw-fs{line-height:1.5;font-size:48px;font-weight:600;margin-bottom:5px}.saswp-rvw-ov .ovs{font-size:11px;font-weight:600}.sgl .saswp-rvw tr td{background:#fff;width:100%}.sgl .saswp-rvw tr:hover td{background-color:#fcfcfc}.saswp-rvw .saswp-rvw-sm{padding:21px 14px}.str-ic{font-size:18px;line-height:1.2}.saswp-rvw-str{display:inline-flex;width:100%}.saswp-rvw-str .df-clr,.saswp-rvw-str .half-str,.saswp-rvw-str .str-ic{display:inline-block;width:20px;height:16px;background-repeat:no-repeat}.saswp-rvw-ov{text-align:center}.saswp-rvw-str .half-str{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNNDgyLjIwNywxODYuOTczbC0xNTkuNjk5LTMzLjcwNUwyNDEuMTA0LDExLjgwM2wtODEuNDA0LDE0MS40NjVMMCwxODYuOTczbDEwOS4zODgsMTIxLjEzNEw5Mi4wOTQsNDcwLjQwNGwxNDkuMDEtNjYuNiAgbDE0OS4wMSw2Ni42bC0xNy4yOTQtMTYyLjI5Nkw0ODIuMjA3LDE4Ni45NzN6IE0yNDEuMTA0LDM3MC45NDNWNzEuOTUzbDYyLjA5LDEwNy45TDQyNSwyMDUuNTYxbC04My40MzMsOTIuMzkzbDEzLjE5MSwxMjMuNzg4ICBMMjQxLjEwNCwzNzAuOTQzeiIgZmlsbD0iI2ZmZDcwMCIvPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K)}.saswp-rvw-str .str-ic{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiNmZmQ3MDAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-rvw-str .df-clr{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiM2MzVlNjMiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}
2
+ /*** Review Design CSS ****/
3
+ .saswp-g-review-header{
4
+ margin-top: 50px;
5
+ }
6
+ .saswp-g-review-body{
7
+ display:inline-grid;
8
+ grid-template-columns: 1fr 300px;
9
+ grid-gap:30px;
10
+ margin-top:30px;
11
+ width:100%;
12
+ }
13
+ .saswp-review-list{}
14
+ .saswp-channel-list{
15
+ margin-right: 15px;
16
+ }
17
+ .saswp-input-fields{
18
+ display: inline-flex;
19
+ align-items: center;
20
+ margin-bottom: 8px;
21
+ width: 100%;
22
+ }
23
+ .saswp-input-fields label{
24
+ width: 130px;
25
+ }
26
+ .saswp-panel h3{
27
+ font-size: 20px;
28
+ line-height: 1.4;
29
+ color: #222;
30
+ text-align: center;
31
+ margin: 10px 0px 20px 0px;
32
+ }
33
+ .saswp-input-fields a.button-primary{
34
+ margin-top:10px;
35
+ }
36
+ .saswp-glg-review-body{
37
+ display: grid;
38
+ grid-template-columns: 100px 1fr;
39
+ grid-gap: 20px;
40
+ background: #fff;
41
+ padding: 20px;
42
+ box-shadow: 0px 0px 20px 1px #d2cccc;
43
+ margin-bottom: 30px;
44
+ }
45
+ .saswp-g-plus{
46
+ float: right;
47
+ font-size: 15px;
48
+ width: 20px;
49
+ height: 20px;
50
+ }
51
+ .saswp-g-plus img{
52
+ width:100%;
53
+ }
54
+ .saswp-rtng{
55
+ padding-left: 5px;
56
+ font-size: 14px;
57
+ }
58
+ .saswp-pt-dt {
59
+ font-size: 12px;
60
+ color: #999;
61
+ font-weight: 600;
62
+ margin-top: 5px;
63
+ display: inline-block;
64
+ }
65
+ .saswp-athr{
66
+ font-size: 15px;
67
+ line-height: 1.4;
68
+ color: #000;
69
+ font-weight: bold;
70
+ display: inline-block;
71
+ vertical-align: middle;
72
+ }
73
+ .saswp-str-rtng .saswp-rvw-str{
74
+ display: inline-block;
75
+ vertical-align: middle;
76
+ padding-left: 10px;
77
+ width: auto;
78
+ }
79
+ .widget-area .saswp-str-rtng .saswp-rvw-str{padding:10px 0px 0px 0px;}
80
+ .saswp-rv-cnt p{
81
+ font-size: 16px;
82
+ line-height: 1.6;
83
+ color: #000;
84
+ margin: 10px 0px 0px 0px;
85
+ }
86
+ .saswp-rv-img img{
87
+ max-width:100px;
88
+ border-radius: 100%;
89
+ }
90
+ .widget-area .saswp-rv-img img{max-width:50px;}
91
+ .widget-area .saswp-glg-review-body {
92
+ display: inline-block;
93
+ width:100%;
94
+ }
95
+ .widget-area .saswp-rv-img{
96
+ width:60px;
97
+ float:left;
98
+ }
admin_section/fields-generator.php CHANGED
@@ -39,8 +39,8 @@ class saswp_fields_generator {
39
  * @param type $field_type
40
  * @since version 1.0
41
  */
42
- public function saswp_field_generator( $meta_fields, $settings, $field_type = null ) {
43
-
44
  $output = '';
45
  $tooltip_message = '';
46
 
@@ -55,6 +55,28 @@ class saswp_fields_generator {
55
  $hidden = array();
56
  $attribute = array();
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  if(array_key_exists('class', $meta_field)){
59
 
60
  $class = $meta_field['class'];
@@ -177,8 +199,7 @@ class saswp_fields_generator {
177
  $attribute_str
178
  );
179
  $input .=$hiddenfield;
180
- break;
181
-
182
  case 'select':
183
  $input = sprintf(
184
  '<select class="%s" id="%s" name="%s">',
@@ -200,14 +221,316 @@ class saswp_fields_generator {
200
  );
201
  }
202
  $input .= '</select>';
203
- break;
204
  default:
205
-
206
- $stng_meta_field = '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
 
208
  if(isset($settings[$meta_field['id']])){
209
 
210
- $stng_meta_field = $settings[$meta_field['id']];
211
 
212
  }
213
 
@@ -220,46 +543,41 @@ class saswp_fields_generator {
220
  esc_attr(saswp_remove_warnings($meta_field, 'type', 'saswp_string')),
221
  esc_attr($stng_meta_field),
222
  $attribute_str
223
- );
 
 
 
 
 
224
 
225
  }
 
 
 
 
 
226
 
227
  $allowed_html = saswp_expanded_allowed_tags();
228
 
229
- $output .= '<li><div class="saswp-knowledge-label">'.$label.'</div><div class="saswp-knowledge-field">'.$input.'<p class="">'.$note.'</p></div></li>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
230
 
231
  }
232
- if($field_type == 'general'){
233
-
234
- $reg_menus = get_registered_nav_menus();
235
- $locations = get_nav_menu_locations();
236
-
237
- if($reg_menus){
238
-
239
- foreach ($reg_menus as $type => $title){
240
-
241
- if(array_key_exists($type, $locations) && $locations[$type]){
242
-
243
- $checked = '';
244
-
245
- if(isset($settings['saswp-'.$type])){
246
- $checked = 'checked';
247
- }
248
-
249
- $output .= '<li class="saswp-nav-menu-list"><div class="saswp-knowledge-label"><label>'.esc_attr($title).'</label></div>'
250
- . '<div class="saswp-knowledge-field">'
251
- . '<input type="checkbox" name="sd_data[saswp-'.$type.']" class="regular-text" value="1" '.$checked.'>'
252
- . '</div>'
253
- . '</li>';
254
 
255
- }
256
-
257
- }
258
-
259
- }
260
-
261
- }
262
-
263
  echo '<div><div class="saswp-settings-list"><ul>' . wp_kses($output, $allowed_html) . '</ul></div></div>';
264
  }
265
  }
39
  * @param type $field_type
40
  * @since version 1.0
41
  */
42
+ public function saswp_field_generator( $meta_fields, $settings, $field_type = null ) {
43
+
44
  $output = '';
45
  $tooltip_message = '';
46
 
55
  $hidden = array();
56
  $attribute = array();
57
 
58
+ $on = 'Reviews';
59
+ $license_key = '';
60
+ $license_status = 'inactive';
61
+ $license_status_msg = '';
62
+ $rv_limits = '';
63
+
64
+ if(isset($settings[strtolower($on).'_addon_license_key'])){
65
+ $license_key = $settings[strtolower($on).'_addon_license_key'];
66
+ }
67
+
68
+ if(isset($settings[strtolower($on).'_addon_license_key_status'])){
69
+ $license_status = $settings[strtolower($on).'_addon_license_key_status'];
70
+ }
71
+
72
+ if(isset($settings[strtolower($on).'_addon_license_key_message'])){
73
+ $license_status_msg = $settings[strtolower($on).'_addon_license_key_message'];
74
+ }
75
+
76
+ if($license_status =='active'){
77
+ $rv_limits = get_option(strtolower($on).'_addon_reviews_limits');
78
+ }
79
+
80
  if(array_key_exists('class', $meta_field)){
81
 
82
  $class = $meta_field['class'];
199
  $attribute_str
200
  );
201
  $input .=$hiddenfield;
202
+ break;
 
203
  case 'select':
204
  $input = sprintf(
205
  '<select class="%s" id="%s" name="%s">',
221
  );
222
  }
223
  $input .= '</select>';
224
+ break;
225
  default:
226
+
227
+ switch ($meta_field['id']) {
228
+
229
+ case 'saswp-reviews-pro-api':
230
+
231
+ $pro_api = '<div class="" style="display:block;">
232
+ '.saswp_get_license_section_html($on, $license_key, $license_status, $license_status_msg, $lable=false, $rv_limits).'
233
+ </div>';
234
+
235
+
236
+ $input = $pro_api;
237
+
238
+ break;
239
+
240
+ case 'saswp-reviews-module-section':
241
+
242
+ $input = '<div class="saswp_rv_module_pro_notice">
243
+ <h2>Get Your 5 Stars Reviews on Google SERPs</h2>
244
+ <p class="saswp_desc">Automatically Fetch your customer reviews from 80+ Platforms and show them on your website with proper schema support. <a target="_blank" href="https://structured-data-for-wp.com/reviews-for-schema">Learn More...</a></p>
245
+ <div class="saswp_cmpny_lst">
246
+ <span class="saswp_avlbl">Integrations Avaliable</span>
247
+ <ul>
248
+ <li class="check-img"><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/google-1-img.png">
249
+ <span class="saswp_cmpny">Google Reviews (Unlimited)</span>
250
+ </li>
251
+ </ul>
252
+ <span class="saswp_lst">Integrations Coming soon</span>
253
+ <ul>
254
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/agoda-img.png">
255
+ <span class="saswp_cmpny">Agoda</span>
256
+ </li>
257
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/airbnb-img.png">
258
+ <span class="saswp_cmpny">Airbnb</span>
259
+ </li>
260
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/alternativeto-img.png">
261
+ <span>AlternativeTo</span>
262
+ </li>
263
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/amazon-img.png">
264
+ <span>Amazon</span>
265
+ </li>
266
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/angies-list-img.png">
267
+ <span>Angies List</span>
268
+ </li>
269
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/aliexpress-img.png">
270
+ <span>Ali Express</span>
271
+ </li>
272
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/appstore-img.png">
273
+ <span>App Store</span>
274
+ </li>
275
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/avvo-img.png">
276
+ <span>Avvo</span>
277
+ </li>
278
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/bbb-img.png">
279
+ <span>BBB</span>
280
+ </li>
281
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/bestbuy-img.png">
282
+ <span>Bestbuy</span>
283
+ </li>
284
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/booking-img.png">
285
+ <span>Booking.com</span>
286
+ </li>
287
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/capterra-img.png">
288
+ <span>Capterra</span>
289
+ </li>
290
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/cars-img.png">
291
+ <span>Cars.com</span>
292
+ </li>
293
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/cargurus-img.png">
294
+ <span>Cargurus</span>
295
+ </li>
296
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/clutch-img.png">
297
+ <span>Clutch</span>
298
+ </li>
299
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/citysearch-img.png">
300
+ <span>Citysearch</span>
301
+ </li>
302
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/consumeraffairs-img.png">
303
+ <span>Consumer Affairs</span>
304
+ </li>
305
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/creditkarma-img.png">
306
+ <span>CreditKarma</span>
307
+ </li>
308
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/customerlobby-img.png">
309
+ <span>CustomerLobby</span>
310
+ </li>
311
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/dealerrater-img.png">
312
+ <span>DealerRater</span>
313
+ </li>
314
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/ebay-img.png">
315
+ <span>Ebay</span>
316
+ </li>
317
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/edmunds-img.png">
318
+ <span>Edmunds</span>
319
+ </li>
320
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/etsy-img.png">
321
+ <span>Etsy</span>
322
+ </li>
323
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/expedia-img.png">
324
+ <span>Expedia</span>
325
+ </li>
326
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/facebook-1-img.png">
327
+ <span>Facebook</span>
328
+ </li>
329
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/flipkart-img.png">
330
+ <span>Flipkart</span>
331
+ </li>
332
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/foursquare-img.png">
333
+ <span>Foursquare</span>
334
+ </li>
335
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/g2crowd-img.png">
336
+ <span>G2Crowd</span>
337
+ </li>
338
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/gearbest-img.png">
339
+ <span>Gearbest</span>
340
+ </li>
341
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/glassdoor-img.png">
342
+ <span>Glassdoor</span>
343
+ </li>
344
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/healthgrades-img.png">
345
+ <span>Healthgrades</span>
346
+ </li>
347
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/homeadvisor-img.png">
348
+ <span>HomeAdvisor</span>
349
+ </li>
350
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/homestars-img.png">
351
+ <span>Homestars</span>
352
+ </li>
353
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/houzz-img.png">
354
+ <span>Houzz</span>
355
+ </li>
356
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/hotels-img.png">
357
+ <span>Hotels.com</span>
358
+ </li>
359
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/hungerstation-img.png">
360
+ <span>Hungerstation</span>
361
+ </li>
362
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/imdb-img.png">
363
+ <span>Imdb</span>
364
+ </li>
365
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/indeed-img.png">
366
+ <span>Indeed</span>
367
+ </li>
368
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/insiderpages-img.png">
369
+ <span>Insider Pages</span>
370
+ </li>
371
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/jet-img.png">
372
+ <span>Jet</span>
373
+ </li>
374
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/lawyers-img.png">
375
+ <span>Lawyers.com</span>
376
+ </li>
377
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/lendingtree-img.png">
378
+ <span>Lending Tree</span>
379
+ </li>
380
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/martindale-img.png">
381
+ <span>Martindale</span>
382
+ </li>
383
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/newegg-img.png">
384
+ <span>Newegg</span>
385
+ </li>
386
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/openrice-img.png">
387
+ <span>OpenRice</span>
388
+ </li>
389
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/opentable-img.png">
390
+ <span>Opentable</span>
391
+ </li>
392
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/playstore-img.png">
393
+ <span>Playstore</span>
394
+ </li>
395
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/producthunt-img.png">
396
+ <span>ProductHunt</span>
397
+ </li>
398
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/ratemds-img.png">
399
+ <span>RateMDs</span>
400
+ </li>
401
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/reserveout-img.png">
402
+ <span>Reserveout</span>
403
+ </li>
404
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/rottentomatoes-img.png">
405
+ <span>Rottentomatoes</span>
406
+ </li>
407
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/siftery-img.png">
408
+ <span>Siftery</span>
409
+ </li>
410
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/sitejabber-img.png">
411
+ <span>Sitejabber</span>
412
+ </li>
413
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/softwareadvice-img.png">
414
+ <span>SoftwareAdvice</span>
415
+ </li>
416
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/steam-img.png">
417
+ <span>Steam</span>
418
+ </li>
419
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/talabat-img.png">
420
+ <span>Talabat</span>
421
+ </li>
422
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/theknot-img.png">
423
+ <span>The Knot</span>
424
+ </li>
425
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/thumbtack-img.png">
426
+ <span>Thumbtack</span>
427
+ </li>
428
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/tripadvisor-img.png">
429
+ <span>TripAdvisor</span>
430
+ </li>
431
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/trulia-img.png">
432
+ <span>Trulia</span>
433
+ </li>
434
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/trustedshops-img.png">
435
+ <span>TrustedShops</span>
436
+ </li>
437
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/trustpilot-img.png">
438
+ <span>Trustpilot</span>
439
+ </li>
440
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/trustradius-img.png">
441
+ <span>TrustRadius</span>
442
+ </li>
443
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/vitals-img.png">
444
+ <span>Vitals</span>
445
+ </li>
446
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/walmart-img.png">
447
+ <span>Walmart</span>
448
+ </li>
449
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/weddingwire-img.png">
450
+ <span>WeddingWire</span>
451
+ </li>
452
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/wish-img.png">
453
+ <span>Wish </span>
454
+ </li>
455
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/yelp-img.png">
456
+ <span>Yelp</span>
457
+ </li>
458
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/yellowpages-img.png">
459
+ <span>Yellow Pages</span>
460
+ </li>
461
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/zillow-img.png">
462
+ <span>Zillow</span>
463
+ </li>
464
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/zocdoc-img.png">
465
+ <span>ZocDoc</span>
466
+ </li>
467
+ <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/zomato-img.png">
468
+ <span>Zomato</span>
469
+ </li>
470
+ </ul>
471
+ </div>
472
+ <div class="saswp-rev-btn">
473
+ <span>With our API service, you can fetch reviews from anywhere you want! and we are always increasing the number of integrations. You can also request for an integration as well.</span>
474
+ <a target="_blank" href="https://structured-data-for-wp.com/reviews-for-schema">Get The Reviews Addon Now</a>
475
+ </div>
476
+ </div>';
477
+
478
+ break;
479
+
480
+ case 'saswp-google-place-section':
481
+
482
+ $location = '';
483
+
484
+ if(isset($settings['saswp_reviews_location_name']) && !empty($settings['saswp_reviews_location_name'])){
485
+
486
+ $rv_loc = $settings['saswp_reviews_location_name'];
487
+ $rv_blocks = isset($settings['saswp_reviews_location_blocks'])? $settings['saswp_reviews_location_blocks']:array();
488
+
489
+ $i=0;
490
+
491
+ foreach($rv_loc as $rvl){
492
+
493
+ if($rvl){
494
+
495
+ $blocks_fields = apply_filters('saswp_modify_blocks_field', '<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="5" step="5" placeholder="5" value="5" disabled="disabled">', isset($rv_blocks[$i])? $rv_blocks[$i]: 5);
496
+
497
+ $location .= '<tr>'
498
+ . '<td style="width:12%;"><strong>'.esc_html__( 'Place Id', 'schema-and-structured-data-for-wp' ).'</strong></td>'
499
+ . '<td style="width:20%;"><input class="saswp-g-location-field" name="sd_data[saswp_reviews_location_name][]" type="text" value="'. esc_attr($rvl).'"></td>'
500
+ . '<td style="width:10%;"><strong>'.esc_html__( 'Reviews', 'schema-and-structured-data-for-wp' ).'</strong></td>'
501
+ . '<td style="width:10%;">'.$blocks_fields.'</td>'
502
+ . '<td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">'.esc_html__( 'Fetch', 'schema-and-structured-data-for-wp' ).'</a></td>'
503
+ . '<td style="width:10%;"><a type="button" class="saswp-remove-review-item button">x</a></td>'
504
+ . '<td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td>'
505
+ . '</tr>';
506
+ }
507
+ $i++;
508
+ }
509
+
510
+ }
511
+
512
+ $reviews = '<div class="saswp-g-reviews-settings saswp-knowledge-label">'
513
+ . '<table class="saswp-g-reviews-settings-table" style="width:100%">'
514
+ . $location
515
+ . '</table>'
516
+ . '<div>'
517
+ . '<a class="button button-default saswp-add-g-location-btn">'.esc_html__( 'Add Location', 'schema-and-structured-data-for-wp' ).'</a>'
518
+ . '<p><a target="_blank" href="https://developers.google.com/maps/documentation/javascript/examples/places-placeid-finder">'.esc_html__( 'Place ID Finder', 'schema-and-structured-data-for-wp' ).'</a></p>'
519
+ . '</div>'
520
+ . '</div>';
521
+
522
+
523
+ $input = $reviews;
524
+
525
+ break;
526
+
527
+ default:
528
+
529
+ $stng_meta_field = '';
530
 
531
  if(isset($settings[$meta_field['id']])){
532
 
533
+ $stng_meta_field = $settings[$meta_field['id']];
534
 
535
  }
536
 
543
  esc_attr(saswp_remove_warnings($meta_field, 'type', 'saswp_string')),
544
  esc_attr($stng_meta_field),
545
  $attribute_str
546
+ );
547
+
548
+ break;
549
+ }
550
+
551
+
552
 
553
  }
554
+ $reviews = $pro_api = $toggle_button = '';
555
+
556
+ if($meta_field['id'] == 'saswp_google_place_api_key'){
557
+
558
+ }
559
 
560
  $allowed_html = saswp_expanded_allowed_tags();
561
 
562
+ if($meta_field['id'] == 'saswp-reviews-module-section'){
563
+ $output .= '<li class="saswp-rev-mod">'
564
+ . '<div class="saswp-knowledge-label">'.$label.'</div>'
565
+ . '<div class="saswp-knowledge-field">'.$input.'<p class="">'.$note.'</p></div>'
566
+
567
+ . '</li>';
568
+ }else{
569
+ $output .= '<li>'
570
+ . '<div class="saswp-knowledge-label">'.$label.'</div>'
571
+ . '<div class="saswp-knowledge-field">'.$input.'<p class="">'.$note.'</p></div>'
572
+
573
+ . '</li>';
574
+ }
575
+
576
+
577
+
578
 
579
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
580
 
 
 
 
 
 
 
 
 
581
  echo '<div><div class="saswp-settings-list"><ul>' . wp_kses($output, $allowed_html) . '</ul></div></div>';
582
  }
583
  }
admin_section/images/default_user.jpg ADDED
Binary file
admin_section/images/reviews_platform_icon/agoda-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/airbnb-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/aliexpress-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/alternativeto-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/amazon-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/angies-list-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/appstore-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/avvo-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/bbb-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/bestbuy-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/booking-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/capterra-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/cargurus-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/cars-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/citysearch-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/clutch-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/consumeraffairs-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/creditkarma-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/customerlobby-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/dealerrater-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/ebay-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/edmunds-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/etsy-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/expedia-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/facebook-1-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/facebook-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/flipkart-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/foursquare-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/g2crowd-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/gearbest-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/glassdoor-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/google-1-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/google-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/healthgrades-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/homeadvisor-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/homestars-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/hotels-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/houzz-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/hungerstation-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/imdb-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/indeed-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/insiderpages-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/jet-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/lawyers-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/lendingtree-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/martindale-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/newegg-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/openrice-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/opentable-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/playstore-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/producthunt-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/ratemds-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/reserveout-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/rottentomatoes-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/siftery-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/sitejabber-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/softwareadvice-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/steam-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/talabat-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/theknot-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/thumbtack-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/tripadvisor-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/trulia-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/trustedshops-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/trustpilot-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/trustradius-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/vitals-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/walmart-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/weddingwire-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/wish-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/yellowpages-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/yelp-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/zillow-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/zocdoc-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/zomato-img.png ADDED
Binary file
admin_section/js/jquery.rateyo.min.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ /*rateyo V2.3.4, A simple and flexible star rating plugin
2
+ prashanth pamidi (https://github.com/prrashi)*/
3
+ !function(N){"use strict";var Q='<?xml version="1.0" encoding="utf-8"?><svg version="1.1"xmlns="http://www.w3.org/2000/svg"viewBox="0 12.705 512 486.59"x="0px" y="0px"xml:space="preserve"><polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "/></svg>',n={starWidth:"32px",normalFill:"gray",ratedFill:"#f39c12",numStars:5,maxValue:5,precision:1,rating:0,fullStar:!1,halfStar:!1,readOnly:!1,spacing:"0px",rtl:!1,multiColor:null,onInit:null,onChange:null,onSet:null,starSvg:null},X={startColor:"#c0392b",endColor:"#f1c40f"};function $(t,r,e){return t===r?t=r:t===e&&(t=e),t}function D(t){return void 0!==t}var e=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,G=function(t){if(!e.test(t))return null;var r=e.exec(t);return{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)}};function H(t,r,e){var n=e/100*(r-t);return 1===(n=Math.round(t+n).toString(16)).length&&(n="0"+n),n}function J(i,d){this.node=i.get(0);var e=this;i.empty().addClass("jq-ry-container");var g,n,m,h,v,t,r=N("<div/>").addClass("jq-ry-group-wrapper").appendTo(i),y=N("<div/>").addClass("jq-ry-normal-group").addClass("jq-ry-group").appendTo(r),a=N("<div/>").addClass("jq-ry-rated-group").addClass("jq-ry-group").appendTo(r),w=0,o=d.rating,l=!1;function s(t){D(t)||(t=d.rating);var r=(o=t)/g,e=r*m;1<r&&(e+=(Math.ceil(r)-1)*v),k(d.ratedFill),(e=d.rtl?100-e:e)<0?e=0:100<e&&(e=100),a.css("width",e+"%")}function c(){t=n*d.numStars+h*(d.numStars-1),m=n/t*100,v=h/t*100,i.width(t),s()}function u(t){var r=d.starWidth=t;return n=window.parseFloat(d.starWidth.replace("px","")),y.find("svg").attr({width:d.starWidth,height:r}),a.find("svg").attr({width:d.starWidth,height:r}),c(),i}function p(t){return d.spacing=t,h=parseFloat(d.spacing.replace("px","")),y.find("svg:not(:first-child)").css({"margin-left":t}),a.find("svg:not(:first-child)").css({"margin-left":t}),c(),i}function f(t){return d.normalFill=t,(d.rtl?a:y).find("svg").attr({fill:d.normalFill}),i}var b=d.ratedFill;function k(t){if(d.multiColor){var r=(o-w)/d.maxValue*100,e=d.multiColor||{};t=function(t,r,e){if(!t||!r)return null;e=D(e)?e:0,t=G(t),r=G(r);var n=H(t.r,r.r,e),a=H(t.b,r.b,e);return"#"+n+H(t.g,r.g,e)+a}(e.startColor||X.startColor,e.endColor||X.endColor,r)}else b=t;return d.ratedFill=t,(d.rtl?y:a).find("svg").attr({fill:d.ratedFill}),i}function x(t){t=!!t,d.rtl=t,f(d.normalFill),s()}function S(t){k((d.multiColor=t)||b)}function C(t){d.numStars=t,g=d.maxValue/d.numStars,y.empty(),a.empty();for(var r=0;r<d.numStars;r++)y.append(N(d.starSvg||Q)),a.append(N(d.starSvg||Q));return u(d.starWidth),f(d.normalFill),p(d.spacing),s(),i}function F(t){return d.maxValue=t,g=d.maxValue/d.numStars,d.rating>t&&E(t),s(),i}function j(t){return d.precision=t,E(d.rating),i}function q(t){return d.halfStar=t,i}function z(t){return d.fullStar=t,i}function I(t){var r,e,n,a,i,o=y.offset().left,l=o+y.width(),s=d.maxValue,c=t.pageX,u=0;if(c<o)u=w;else if(l<c)u=s;else{var p=(c-o)/(l-o);if(0<h)for(var f=p*=100;0<f;)m<f?(u+=g,f-=m+v):(u+=f/m*g,f=0);else u=p*d.maxValue;e=(r=u)%g,n=g/2,a=d.halfStar,((i=d.fullStar)||a)&&(i||a&&n<e?r+=g-e:(r-=e,0<e&&(r+=n))),u=r}return d.rtl&&(u=s-u),parseFloat(u)}function V(t){return d.readOnly=t,i.attr("readonly",!0),L(),t||(i.removeAttr("readonly"),i.on("mousemove",M).on("mouseenter",M).on("mouseleave",T).on("click",R).on("rateyo.init",Y).on("rateyo.change",_).on("rateyo.set",B)),i}function E(t){var r=t,e=d.maxValue;return"string"==typeof r&&("%"===r[r.length-1]&&(r=r.substr(0,r.length-1),F(e=100)),r=parseFloat(r)),function(t,r,e){if(!(r<=t&&t<=e))throw Error("Invalid Rating, expected value between "+r+" and "+e)}(r,w,e),r=parseFloat(r.toFixed(d.precision)),$(parseFloat(r),w,e),d.rating=r,s(),l&&i.trigger("rateyo.set",{rating:r}),i}function W(t){return d.onInit=t,i}function A(t){return d.onSet=t,i}function O(t){return d.onChange=t,i}function M(t){var r=I(t).toFixed(d.precision),e=d.maxValue;s(r=$(parseFloat(r),w,e)),i.trigger("rateyo.change",{rating:r})}function T(){var t,r;(r=!1,t=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(r=!0),r)||(s(),i.trigger("rateyo.change",{rating:d.rating}))}function R(t){var r=I(t).toFixed(d.precision);r=parseFloat(r),e.rating(r)}function Y(t,r){d.onInit&&"function"==typeof d.onInit&&d.onInit.apply(this,[r.rating,e])}function _(t,r){d.onChange&&"function"==typeof d.onChange&&d.onChange.apply(this,[r.rating,e])}function B(t,r){d.onSet&&"function"==typeof d.onSet&&d.onSet.apply(this,[r.rating,e])}function L(){i.off("mousemove",M).off("mouseenter",M).off("mouseleave",T).off("click",R).off("rateyo.init",Y).off("rateyo.change",_).off("rateyo.set",B)}this.rating=function(t){return D(t)?(E(t),i):d.rating},this.destroy=function(){var n,a;return d.readOnly||L(),J.prototype.collection=(n=i.get(0),a=this.collection,N.each(a,function(t){if(n===this.node){var r=a.slice(0,t),e=a.slice(t+1,a.length);return a=r.concat(e),!1}}),a),i.removeClass("jq-ry-container").children().remove(),i},this.method=function(t){if(!t)throw Error("Method name not specified!");if(!D(this[t]))throw Error("Method "+t+" doesn't exist!");var r=Array.prototype.slice.apply(arguments,[]).slice(1);return this[t].apply(this,r)},this.option=function(t,r){if(!D(t))return d;var e;switch(t){case"starWidth":e=u;break;case"numStars":e=C;break;case"normalFill":e=f;break;case"ratedFill":e=k;break;case"multiColor":e=S;break;case"maxValue":e=F;break;case"precision":e=j;break;case"rating":e=E;break;case"halfStar":e=q;break;case"fullStar":e=z;break;case"readOnly":e=V;break;case"spacing":e=p;break;case"rtl":e=x;break;case"onInit":e=W;break;case"onSet":e=A;break;case"onChange":e=O;break;default:throw Error("No such option as "+t)}return D(r)?e(r):d[t]},C(d.numStars),V(d.readOnly),d.rtl&&x(d.rtl),this.collection.push(this),this.rating(d.rating,!0),l=!0,i.trigger("rateyo.init",{rating:d.rating})}function c(t,r){var e;return N.each(r,function(){if(t===this.node)return e=this,!1}),e}J.prototype.collection=[],window.RateYo=J,N.fn.rateYo=function(){return function(e){var i=J.prototype.collection,t=N(this);if(0===t.length)return t;var r=Array.prototype.slice.apply(arguments,[]);if(0===r.length)e=r[0]={};else{if(1!==r.length||"object"!=typeof r[0]){if(1<=r.length&&"string"==typeof r[0]){var o=r[0],l=r.slice(1),s=[];return N.each(t,function(t,r){var e=c(r,i);if(!e)throw Error("Trying to set options before even initialization");var n=e[o];if(!n)throw Error("Method "+o+" does not exist!");var a=n.apply(e,l);s.push(a)}),s=1===s.length?s[0]:s}throw Error("Invalid Arguments")}e=r[0]}return e=N.extend({},n,e),N.each(t,function(){var t=c(this,i);if(t)return t;var r=N(this),n={},a=N.extend({},e);return N.each(r.data(),function(t,r){if(0===t.indexOf("rateyo")){var e=t.replace(/^rateyo/,"");e=e[0].toLowerCase()+e.slice(1),n[e]=r,delete a[e]}}),new J(N(this),N.extend({},n,a))})}.apply(this,Array.prototype.slice.apply(arguments,[]))}}(window.jQuery);
4
+ //# sourceMappingURL=jquery.rateyo.min.js.map
admin_section/js/main-script.js CHANGED
@@ -10,6 +10,47 @@ function getParameterByName(name, url) {
10
  return decodeURIComponent(results[2].replace(/\+/g, " "));
11
  }
12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  function saswp_fields_html_generator(index, schema_id, fields_type, div_type, schema_fields){
14
 
15
  var html = '';
@@ -19,17 +60,49 @@ function saswp_fields_html_generator(index, schema_id, fields_type, div_type, sc
19
  + '<table class="form-table saswp-'+div_type+'-table">'
20
 
21
  $.each(schema_fields, function(eachindex, element){
22
-
 
 
 
 
 
23
  switch(element.type) {
24
 
25
  case "text":
26
 
27
  html += '<tr>'
28
- + '<th>'+element.label+'</th><td><input style="width:100%" type="text" id="'+element.name+'_'+index+'_'+schema_id+'" name="'+fields_type+schema_id+'['+index+']['+element.name+']"></td>'
29
  + '</tr>';
30
 
31
  break;
32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  case "media":
34
 
35
  html += '<tr>'
@@ -52,8 +125,8 @@ function saswp_fields_html_generator(index, schema_id, fields_type, div_type, sc
52
 
53
  });
54
  html += '</table>'
55
- + '</div>';
56
-
57
  return html;
58
 
59
  }
@@ -468,18 +541,7 @@ jQuery(document).ready(function($){
468
  $("#saswp_breadcrumb_schema").val(0);
469
  }
470
  break;
471
-
472
- case 'saswp_site_navigation_menu_checkbox':
473
-
474
- if ($(this).is(':checked')) {
475
- $("#saswp_site_navigation_menu").val(1);
476
- $(".saswp-nav-menu-list").show();
477
- }else{
478
- $("#saswp_site_navigation_menu").val(0);
479
- $(".saswp-nav-menu-list").hide();
480
- }
481
- break;
482
-
483
  case 'saswp_comments_schema_checkbox':
484
 
485
  if ($(this).is(':checked')) {
@@ -649,15 +711,62 @@ jQuery(document).ready(function($){
649
 
650
  case 'saswp-google-review-checkbox':
651
 
652
- if ($(this).is(':checked')) {
 
653
  $("#saswp-google-review").val(1);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
654
  $("#saswp_google_place_api_key").parent().parent().show();
655
  }else{
656
- $("#saswp-google-review").val(0);
657
- $("#saswp_google_place_api_key").parent().parent().hide();
658
  }
 
 
 
 
 
 
 
659
  break;
660
 
 
661
  case 'saswp-markup-footer-checkbox':
662
 
663
  if ($(this).is(':checked')) {
@@ -763,8 +872,13 @@ jQuery(document).ready(function($){
763
  $("#sd_default_image_width").val(attachment.width);
764
  $("#sd_default_image_height").val(attachment.height);
765
 
766
- }
767
- $(".saswp_image_div_"+id).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+attachment.url+'"/><a data-id="'+id+'" href="#" class="saswp_prev_close">X</a></div>');
 
 
 
 
 
768
 
769
  })
770
  .open();
@@ -846,7 +960,8 @@ jQuery(document).ready(function($){
846
  //Licensing jquery starts here
847
  $(document).on("click",".saswp_license_activation", function(e){
848
  e.preventDefault();
849
-
 
850
  var license_status = $(this).attr('license-status');
851
  var add_on = $(this).attr('add-on');
852
  var license_key = $("#"+add_on+"_addon_license_key").val();
@@ -887,13 +1002,16 @@ jQuery(document).ready(function($){
887
  $(".saswp_license_status_msg[add-on='" + add_on + "']").css("color", "red");
888
  $(".saswp_license_status_msg[add-on='" + add_on + "']").text(response['message']);
889
  }
890
-
891
  },
892
  error: function(response){
893
  console.log(response);
894
  }
895
  });
896
 
 
 
 
897
  }
898
 
899
  });
@@ -1079,17 +1197,16 @@ jQuery(document).ready(function($){
1079
  });
1080
 
1081
  });
1082
- saswp_schema_datepicker();
1083
- function saswp_schema_datepicker(){
1084
 
1085
- $('.saswp-local-schema-datepicker-picker').datepicker({
1086
- dateFormat: "yy-mm-dd",
1087
- minDate: 0
 
 
1088
  });
1089
  }
1090
 
1091
-
1092
-
1093
  //Review js starts here
1094
 
1095
  $(document).on("click", ".saswp-add-more-item",function(e){
@@ -1215,6 +1332,23 @@ jQuery(document).ready(function($){
1215
  });
1216
 
1217
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1218
  //Importer from schema plugin ends here
1219
 
1220
  //custom fields modify schema starts here
@@ -1253,355 +1387,24 @@ jQuery(document).ready(function($){
1253
  },'json');
1254
 
1255
  });
1256
-
1257
- //Trip schema starts here
1258
-
1259
- $(document).on("click", ".saswp-trip-itinerary", function(e){
1260
- e.preventDefault();
1261
-
1262
- var schema_id = $(this).attr('data-id');
1263
- var count = $(".saswp-trip-itinerary-table-div").length;
1264
- var index = $( ".saswp-trip-itinerary-table-div:nth-child("+count+")" ).attr('data-id');
1265
- index = ++index;
1266
-
1267
- if(!index){
1268
- index = 0;
1269
- }
1270
-
1271
- var html = '';
1272
-
1273
- html += '<div class="saswp-trip-itinerary-table-div" data-id="'+index+'">'
1274
- + '<a class="saswp-table-close">X</a>'
1275
- + '<table class="form-table saswp-trip-itinerary-table">'
1276
-
1277
- + '<tr>'
1278
- + '<th>Itinerary Type</th>'
1279
- + '<td>'
1280
- + '<select id="saswp_trip_itinerary_type_'+index+'_'+schema_id+'" name="trip_itinerary_'+schema_id+'['+index+'][saswp_trip_itinerary_type]">'
1281
- + '<option value="City">City</option>'
1282
- + '<option value="LandmarksOrHistoricalBuildings">LandmarksOrHistoricalBuildings</option>'
1283
- + '<option value="AdministrativeArea">AdministrativeArea</option>'
1284
- + '<option value="LakeBodyOfWater">LakeBodyOfWater</option>'
1285
- + '</select></td>'
1286
- + '</tr>'
1287
-
1288
- + '<tr>'
1289
- + '<th>Itinerary Name</th><td><input style="width:100%" type="text" id="saswp_trip_itinerary_name_'+index+'_'+schema_id+'" name="trip_itinerary_'+schema_id+'['+index+'][saswp_trip_itinerary_name]"></td>'
1290
- + '</tr>'
1291
-
1292
- + '<tr>'
1293
- + '<th>Itinerary Description</th><td><textarea placeholder="Description" style="width: 100%" id="saswp_trip_itinerary_description_'+index+'_'+schema_id+'" name="trip_itinerary_'+schema_id+'['+index+'][saswp_trip_itinerary_description]" rows="5"></textarea></td>'
1294
- + '</tr>'
1295
-
1296
- + '<tr>'
1297
- + '<th>Itinerary URL</th><td><input style="width:100%" type="text" id="saswp_trip_itinerary_url_'+index+'_'+schema_id+'" name="trip_itinerary_'+schema_id+'['+index+'][saswp_trip_itinerary_url]"></td>'
1298
- + '</tr>'
1299
-
1300
- + '</table>'
1301
- + '</div>';
1302
- if(html){
1303
- $('.saswp-trip-itinerary-section[data-id="'+schema_id+'"]').append(html);
1304
- }
1305
-
1306
-
1307
- });
1308
-
1309
- //Trip schema ends here
1310
-
1311
- //TvSeries schema starts here
1312
-
1313
- $(document).on("click", ".saswp-tvseries-actor", function(e){
1314
- e.preventDefault();
1315
-
1316
- var schema_id = $(this).attr('data-id');
1317
- var count = $(".saswp-tvseries-actor-table-div").length;
1318
- var index = $( ".saswp-tvseries-actor-table-div:nth-child("+count+")" ).attr('data-id');
1319
- index = ++index;
1320
-
1321
- if(!index){
1322
- index = 0;
1323
- }
1324
-
1325
- var html = '';
1326
-
1327
- html += '<div class="saswp-tvseries-actor-table-div" data-id="'+index+'">'
1328
- + '<a class="saswp-table-close">X</a>'
1329
- + '<table class="form-table saswp-tvseries-actor-table">'
1330
- + '<tr>'
1331
- + '<th>Actor Name</th><td><input style="width:100%" type="text" id="saswp_tvseries_actor_name_'+index+'_'+schema_id+'" name="tvseries_actor_'+schema_id+'['+index+'][saswp_tvseries_actor_name]"></td>'
1332
- + '</tr>'
1333
- + '</table>'
1334
- + '</div>';
1335
- if(html){
1336
- $('.saswp-tvseries-actor-section[data-id="'+schema_id+'"]').append(html);
1337
- }
1338
-
1339
-
1340
- });
1341
-
1342
- $(document).on("click", ".saswp-tvseries-season", function(e){
1343
- e.preventDefault();
1344
-
1345
- var schema_id = $(this).attr('data-id');
1346
- var count = $(".saswp-tvseries-season-table-div").length;
1347
- var index = $( ".saswp-tvseries-season-table-div:nth-child("+count+")" ).attr('data-id');
1348
- index = ++index;
1349
-
1350
- if(!index){
1351
- index = 0;
1352
- }
1353
-
1354
- var html = '';
1355
-
1356
- html += '<div class="saswp-tvseries-season-table-div" data-id="'+index+'">'
1357
- + '<a class="saswp-table-close">X</a>'
1358
- + '<table class="form-table saswp-tvseries-season-table">'
1359
- + '<tr>'
1360
- + '<th>Season</th><td><input style="width:100%" type="text" id="saswp_tvseries_season_name_'+index+'_'+schema_id+'" name="tvseries_season_'+schema_id+'['+index+'][saswp_tvseries_season_name]"></td>'
1361
- + '</tr>'
1362
- + '<tr>'
1363
- + '<th>Season Published Date</th><td><input class="saswp-local-schema-datepicker-picker" style="width:100%" type="text" id="saswp_tvseries_season_published_date_'+index+'_'+schema_id+'" name="tvseries_season_'+schema_id+'['+index+'][saswp_tvseries_season_published_date]"></td>'
1364
- + '</tr>'
1365
- + '<tr>'
1366
- + '<th>Number Of Episodes</th><td><input style="width:100%" type="text" id="saswp_tvseries_season_episodes_'+index+'_'+schema_id+'" name="tvseries_season_'+schema_id+'['+index+'][saswp_tvseries_season_episodes]"></td>'
1367
- + '</tr>'
1368
- + '</table>'
1369
- + '</div>';
1370
- if(html){
1371
-
1372
- $('.saswp-tvseries-season-section[data-id="'+schema_id+'"]').append(html);
1373
- saswp_schema_datepicker();
1374
-
1375
- }
1376
-
1377
-
1378
- });
1379
-
1380
- //TvSeries schema ends here
1381
-
1382
- //Medical condition schema starts here
1383
-
1384
- $(document).on("click", ".saswp-mc-cause", function(e){
1385
- e.preventDefault();
1386
-
1387
- var schema_id = $(this).attr('data-id');
1388
- var count = $(".saswp-mc-cause-table-div").length;
1389
- var index = $( ".saswp-mc-cause-table-div:nth-child("+count+")" ).attr('data-id');
1390
- index = ++index;
1391
-
1392
- if(!index){
1393
- index = 0;
1394
- }
1395
-
1396
- var html = '';
1397
-
1398
- html += '<div class="saswp-mc-cause-table-div" data-id="'+index+'">'
1399
- + '<a class="saswp-table-close">X</a>'
1400
- + '<table class="form-table saswp-mc-cause-table">'
1401
- + '<tr>'
1402
- + '<th>Cause</th><td><input style="width:100%" type="text" id="saswp_mc_cause_name_'+index+'_'+schema_id+'" name="mc_cause_'+schema_id+'['+index+'][saswp_mc_cause_name]"></td>'
1403
- + '</tr>'
1404
- + '</table>'
1405
- + '</div>';
1406
- if(html){
1407
- $('.saswp-mc-cause-section[data-id="'+schema_id+'"]').append(html);
1408
- }
1409
-
1410
-
1411
- });
1412
-
1413
- $(document).on("click", ".saswp-mc-symptom", function(e){
1414
- e.preventDefault();
1415
-
1416
- var schema_id = $(this).attr('data-id');
1417
- var count = $(".saswp-mc-symptom-table-div").length;
1418
- var index = $( ".saswp-mc-symptom-table-div:nth-child("+count+")" ).attr('data-id');
1419
- index = ++index;
1420
-
1421
- if(!index){
1422
- index = 0;
1423
- }
1424
-
1425
- var html = '';
1426
-
1427
- html += '<div class="saswp-mc-symptom-table-div" data-id="'+index+'">'
1428
- + '<a class="saswp-table-close">X</a>'
1429
- + '<table class="form-table saswp-mc-symptom-table">'
1430
- + '<tr>'
1431
- + '<th>Symptom Name</th><td><input style="width:100%" type="text" id="saswp_mc_symptom_name_'+index+'_'+schema_id+'" name="mc_symptom_'+schema_id+'['+index+'][saswp_mc_symptom_name]"></td>'
1432
- + '</tr>'
1433
- + '</table>'
1434
- + '</div>';
1435
- if(html){
1436
- $('.saswp-mc-symptom-section[data-id="'+schema_id+'"]').append(html);
1437
- }
1438
-
1439
-
1440
- });
1441
-
1442
- $(document).on("click", ".saswp-mc-risk_factor", function(e){
1443
- e.preventDefault();
1444
-
1445
- var schema_id = $(this).attr('data-id');
1446
- var count = $(".saswp-mc-risk_factor-table-div").length;
1447
- var index = $( ".saswp-mc-risk_factor-table-div:nth-child("+count+")" ).attr('data-id');
1448
- index = ++index;
1449
-
1450
- if(!index){
1451
- index = 0;
1452
- }
1453
-
1454
- var html = '';
1455
-
1456
- html += '<div class="saswp-mc-risk_factor-table-div" data-id="'+index+'">'
1457
- + '<a class="saswp-table-close">X</a>'
1458
- + '<table class="form-table saswp-mc-risk_factor-table">'
1459
- + '<tr>'
1460
- + '<th>Risk Factor Name</th><td><input style="width:100%" type="text" id="saswp_mc_risk_factor_name_'+index+'_'+schema_id+'" name="mc_risk_factor_'+schema_id+'['+index+'][saswp_mc_risk_factor_name]"></td>'
1461
- + '</tr>'
1462
- + '</table>'
1463
- + '</div>';
1464
- if(html){
1465
- $('.saswp-mc-risk_factor-section[data-id="'+schema_id+'"]').append(html);
1466
- }
1467
-
1468
-
1469
- });
1470
-
1471
- //Medical condition schema ends here
1472
-
1473
- //How to schema js starts here
1474
-
1475
- $(document).on("click", ".saswp-how-to-supply", function(e){
1476
- e.preventDefault();
1477
-
1478
- var schema_id = $(this).attr('data-id');
1479
- var count = $(".saswp-how-to-supply-table-div").length;
1480
- var index = $( ".saswp-how-to-supply-table-div:nth-child("+count+")" ).attr('data-id');
1481
- index = ++index;
1482
-
1483
- if(!index){
1484
- index = 0;
1485
- }
1486
- var fields_type = 'howto_supply_';
1487
- var div_type = 'how-to-supply';
1488
- var schema_fields = [
1489
- {
1490
- label: "Supply Name",
1491
- name : "saswp_howto_supply_name",
1492
- type : "text"
1493
- },
1494
- {
1495
- label: "Supply URL",
1496
- name : "saswp_howto_supply_url",
1497
- type : "text"
1498
- },
1499
- {
1500
- label: "Supply Image",
1501
- name : "saswp_howto_supply_image",
1502
- type : "media"
1503
- }
1504
- ];
1505
-
1506
- var html = saswp_fields_html_generator(index, schema_id, fields_type, div_type, schema_fields);
1507
-
1508
- if(html){
1509
- $('.saswp-'+div_type+'-section[data-id="'+schema_id+'"]').append(html);
1510
- }
1511
-
1512
-
1513
- });
1514
-
1515
- $(document).on("click", ".saswp-how-to-tool", function(e){
1516
- e.preventDefault();
1517
-
1518
- var schema_id = $(this).attr('data-id');
1519
- var count = $(".saswp-how-to-tool-table-div").length;
1520
- var index = $( ".saswp-how-to-tool-table-div:nth-child("+count+")" ).attr('data-id');
1521
- index = ++index;
1522
-
1523
- if(!index){
1524
- index = 0;
1525
- }
1526
-
1527
- var html = '';
1528
-
1529
- html += '<div class="saswp-how-to-tool-table-div" data-id="'+index+'">'
1530
- + '<a class="saswp-table-close">X</a>'
1531
- + '<table class="form-table saswp-how-to-tool-table">'
1532
- + '<tr>'
1533
- + '<th>Tool Name</th><td><input style="width:100%" type="text" id="saswp_howto_tool_name_'+index+'_'+schema_id+'" name="howto_tool_'+schema_id+'['+index+'][saswp_howto_tool_name]"></td>'
1534
- + '</tr>'
1535
- + '<tr>'
1536
- + '<th>Tool URL</th><td><input style="width:100%" type="text" id="saswp_howto_tool_url_'+index+'_'+schema_id+'" name="howto_tool_'+schema_id+'['+index+'][saswp_howto_tool_url]"></td>'
1537
- + '</tr>'
1538
- + '<tr>'
1539
- + '<th>Tool Image</th>'
1540
- + '<td>'
1541
- + '<fieldset>'
1542
- + '<input style="width:80%" type="text" id="saswp_howto_tool_image_'+index+'_'+schema_id+'" name="saswp_howto_tool_image_'+index+'_'+schema_id+'">'
1543
- + '<input type="hidden" data-id="saswp_howto_tool_image_'+index+'_'+schema_id+'_id" name="howto_tool_'+schema_id+'['+index+'][saswp_howto_tool_image_id]" id="saswp_howto_tool_image_'+index+'_'+schema_id+'_id">'
1544
- + '<input data-id="media" style="width: 19%" class="button" id="saswp_howto_tool_image_'+index+'_'+schema_id+'_button" name="saswp_howto_tool_image_'+index+'_'+schema_id+'_button" type="button" value="Upload">'
1545
- + '<div class="saswp_image_div_saswp_howto_tool_image_'+index+'_'+schema_id+'">'
1546
- + '</div>'
1547
- + '</fieldset>'
1548
- + '</td>'
1549
- + '</tr>'
1550
- + '</table>'
1551
- + '</div>';
1552
- if(html){
1553
- $('.saswp-how-to-tool-section[data-id="'+schema_id+'"]').append(html);
1554
- }
1555
-
1556
-
1557
- });
1558
-
1559
- $(document).on("click", ".saswp-how-to-step", function(e){
1560
  e.preventDefault();
1561
 
1562
- var schema_id = $(this).attr('data-id');
1563
- var count = $(".saswp-how-to-step-table-div").length;
1564
- var index = $( ".saswp-how-to-step-table-div:nth-child("+count+")" ).attr('data-id');
 
 
 
1565
  index = ++index;
1566
 
1567
  if(!index){
1568
  index = 0;
1569
  }
1570
-
1571
- var html = '';
1572
 
1573
- html+='<div class="saswp-how-to-step-table-div" data-id="'+index+'">'
1574
- + '<a class="saswp-table-close">X</a>'
1575
- + '<table class="form-table saswp-how-to-step-table">'
1576
- + '<tr>'
1577
- + '<th>Step Name</th><td><input style="width:100%" type="text" id="saswp_howto_step_name_'+index+'_'+schema_id+'" name="howto_step_'+schema_id+'['+index+'][saswp_howto_step_name]" ></td>'
1578
- + '</tr>'
1579
- + '<tr>'
1580
- + '<th>HowToDirection Text</th><td><input style="width:100%" type="text" id="saswp_howto_direction_text_'+index+'_'+schema_id+'" name="howto_step_'+schema_id+'['+index+'][saswp_howto_direction_text]"></td>'
1581
- + '</tr>'
1582
- + '<tr>'
1583
- + '<th>HowToTip Text</th><td><input style="width:100%" type="text" id="saswp_howto_tip_text_'+index+'_'+schema_id+'" name="howto_step_'+schema_id+'['+index+'][saswp_howto_tip_text]"></td>'
1584
- + '</tr>'
1585
- + '<tr>'
1586
- + '<th>Step Image</th>'
1587
- + '<td>'
1588
- + '<fieldset>'
1589
- + '<input style="width:80%" type="text" id="saswp_howto_step_image_'+index+'_'+schema_id+'" name="saswp_howto_step_image_'+schema_id+'['+index+']">'
1590
- + '<input type="hidden" data-id="saswp_howto_step_image_'+index+'_'+schema_id+'_id" name="howto_step_'+schema_id+'['+index+'][saswp_howto_step_image_id]" id="saswp_howto_step_image_'+index+'_'+schema_id+'_id">'
1591
- + '<input data-id="media" style="width: 19%" class="button" id="saswp_howto_step_image_'+index+'_'+schema_id+'_button" name="saswp_howto_step_image_'+index+'_'+schema_id+'_button" type="button" value="Upload">'
1592
- + '<div class="saswp_image_div_saswp_howto_step_image_'+index+'_'+schema_id+'">'
1593
- + '</div>'
1594
- + '</fieldset>'
1595
- + '</td>'
1596
- + '</tr>'
1597
- + '</table>'
1598
- + '</div>';
1599
-
1600
- if(html){
1601
- $('.saswp-how-to-step-section[data-id="'+schema_id+'"]').append(html);
1602
- }
1603
-
1604
-
1605
  });
1606
 
1607
  $(document).on("click", ".saswp-table-close", function(){
@@ -1748,6 +1551,143 @@ jQuery(document).ready(function($){
1748
  jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>");
1749
 
1750
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1751
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1752
 
1753
  });
10
  return decodeURIComponent(results[2].replace(/\+/g, " "));
11
  }
12
 
13
+ function saswp_schema_datepicker(){
14
+
15
+ jQuery('.saswp-datepicker-picker').datepicker({
16
+ dateFormat: "yy-mm-dd",
17
+ minDate: 0
18
+ });
19
+
20
+ }
21
+
22
+ var saswp_meta_fields = [];
23
+ function saswp_get_post_specific_schema_fields(index, meta_name, div_type, schema_id, fields_type){
24
+
25
+ if (!saswp_meta_fields[fields_type]) {
26
+
27
+ $.get(ajaxurl,
28
+ { action:"saswp_get_schema_dynamic_fields_ajax",meta_name:meta_name, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
29
+ function(response){
30
+ saswp_meta_fields[fields_type] = response;
31
+ console.log(saswp_meta_fields);
32
+ var html = saswp_fields_html_generator(index, schema_id, fields_type, div_type, response);
33
+
34
+ if(html){
35
+ $('.saswp-'+div_type+'-section[data-id="'+schema_id+'"]').append(html);
36
+ saswp_schema_datepicker();
37
+ }
38
+
39
+ },'json');
40
+
41
+ }else{
42
+
43
+ var html = saswp_fields_html_generator(index, schema_id, fields_type, div_type, saswp_meta_fields[fields_type]);
44
+
45
+ if(html){
46
+ $('.saswp-'+div_type+'-section[data-id="'+schema_id+'"]').append(html);
47
+ saswp_schema_datepicker();
48
+ }
49
+
50
+ }
51
+
52
+
53
+ }
54
  function saswp_fields_html_generator(index, schema_id, fields_type, div_type, schema_fields){
55
 
56
  var html = '';
60
  + '<table class="form-table saswp-'+div_type+'-table">'
61
 
62
  $.each(schema_fields, function(eachindex, element){
63
+
64
+ var meta_class = "";
65
+ if(element.name == 'saswp_tvseries_season_published_date'){
66
+ meta_class = "saswp-datepicker-picker";
67
+ }
68
+
69
  switch(element.type) {
70
 
71
  case "text":
72
 
73
  html += '<tr>'
74
+ + '<th>'+element.label+'</th><td><input class="'+meta_class+'" style="width:100%" type="text" id="'+element.name+'_'+index+'_'+schema_id+'" name="'+fields_type+schema_id+'['+index+']['+element.name+']"></td>'
75
  + '</tr>';
76
 
77
  break;
78
 
79
+ case "textarea":
80
+
81
+ html += '<tr>'
82
+ + '<th>'+element.label+'</th><td><textarea style="width: 100%" id="'+element.name+'_'+index+'_'+schema_id+'" name="'+fields_type+schema_id+'['+index+']['+element.name+']" rows="5"></textarea></td>'
83
+ + '</tr>';
84
+
85
+ break;
86
+ case "select":
87
+
88
+ var options_html = "";
89
+ $.each(element.options, function(opt_index, opt_element){
90
+ options_html += '<option value="'+opt_index+'">'+opt_element+'</option>';
91
+ });
92
+
93
+ html += '<tr>'
94
+ + '<th>'+element.label+'</th>'
95
+ + '<td>'
96
+
97
+ + '<select id="'+element.name+'_'+index+'_'+schema_id+'" name="'+fields_type+schema_id+'['+index+']['+element.name+']">'
98
+ + options_html
99
+ + '</select>'
100
+
101
+ + '</td>'
102
+ + '</tr>';
103
+
104
+ break;
105
+
106
  case "media":
107
 
108
  html += '<tr>'
125
 
126
  });
127
  html += '</table>'
128
+ + '</div>';
129
+
130
  return html;
131
 
132
  }
541
  $("#saswp_breadcrumb_schema").val(0);
542
  }
543
  break;
544
+
 
 
 
 
 
 
 
 
 
 
 
545
  case 'saswp_comments_schema_checkbox':
546
 
547
  if ($(this).is(':checked')) {
711
 
712
  case 'saswp-google-review-checkbox':
713
 
714
+ if ($(this).is(':checked')) {
715
+
716
  $("#saswp-google-review").val(1);
717
+
718
+ if($("#saswp-google-rv-free-checkbox").length){
719
+
720
+ $("#saswp-google-review-free").parent().parent().show();
721
+
722
+ if($("#saswp-google-rv-free-checkbox").is(":checked")){
723
+ $("#saswp_google_place_api_key").parent().parent().show();
724
+ }else{
725
+ $("#saswp_google_place_api_key").parent().parent().hide();
726
+ }
727
+ }else{
728
+ $("#saswp_google_place_api_key").parent().parent().show();
729
+ }
730
+ $(".saswp-g-reviews-settings-table").parent().parent().parent().show();
731
+
732
+ }else{
733
+
734
+ $("#saswp-google-review").val(0);
735
+ $("#saswp_google_place_api_key").parent().parent().hide();
736
+ $(".saswp-g-reviews-settings-table").parent().parent().parent().hide();
737
+
738
+ if($("#saswp-google-rv-free-checkbox").length){
739
+ $("#saswp-google-review-free").parent().parent().hide();
740
+
741
+ }
742
+
743
+
744
+
745
+
746
+
747
+ }
748
+ break;
749
+
750
+ case 'saswp-google-rv-free-checkbox':
751
+
752
+ if($("#saswp-google-review-checkbox").is(":checked")){
753
+ if ($(this).is(':checked')) {
754
+ $("#saswp-google-review-free").val(1);
755
  $("#saswp_google_place_api_key").parent().parent().show();
756
  }else{
757
+ $("#saswp-google-review-free").val(0);
758
+ $("#saswp_google_place_api_key").parent().parent().hide();
759
  }
760
+
761
+ }else{
762
+ $("#saswp-google-review-free").val(0);
763
+ $("#saswp_google_place_api_key").parent().parent().hide();
764
+ }
765
+
766
+
767
  break;
768
 
769
+
770
  case 'saswp-markup-footer-checkbox':
771
 
772
  if ($(this).is(':checked')) {
872
  $("#sd_default_image_width").val(attachment.width);
873
  $("#sd_default_image_height").val(attachment.height);
874
 
875
+ }
876
+ var smaller_img_notice = '';
877
+ if("saswp_image_div_"+id == 'saswp_image_div_sd_default_image' && attachment.height < 1200){
878
+ smaller_img_notice = '<p class="saswp_warning">Image size is smaller than recommended size</p>';
879
+ }
880
+
881
+ $(".saswp_image_div_"+id).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+attachment.url+'"/><a data-id="'+id+'" href="#" class="saswp_prev_close">X</a></div>'+smaller_img_notice);
882
 
883
  })
884
  .open();
960
  //Licensing jquery starts here
961
  $(document).on("click",".saswp_license_activation", function(e){
962
  e.preventDefault();
963
+ var current = $(this);
964
+ current.addClass('updating-message');
965
  var license_status = $(this).attr('license-status');
966
  var add_on = $(this).attr('add-on');
967
  var license_key = $("#"+add_on+"_addon_license_key").val();
1002
  $(".saswp_license_status_msg[add-on='" + add_on + "']").css("color", "red");
1003
  $(".saswp_license_status_msg[add-on='" + add_on + "']").text(response['message']);
1004
  }
1005
+ current.removeClass('updating-message');
1006
  },
1007
  error: function(response){
1008
  console.log(response);
1009
  }
1010
  });
1011
 
1012
+ }else{
1013
+ alert('Please enter value license key');
1014
+ current.removeClass('updating-message');
1015
  }
1016
 
1017
  });
1197
  });
1198
 
1199
  });
1200
+ saswp_schema_datepicker();
 
1201
 
1202
+ saswp_reviews_datepicker();
1203
+ function saswp_reviews_datepicker(){
1204
+
1205
+ $('.saswp-reviews-datepicker-picker').datepicker({
1206
+ dateFormat: "yy-mm-dd"
1207
  });
1208
  }
1209
 
 
 
1210
  //Review js starts here
1211
 
1212
  $(document).on("click", ".saswp-add-more-item",function(e){
1332
  });
1333
 
1334
 
1335
+ $('#saswp-review-tabs a:first').addClass('saswp-global-selected');
1336
+ $('.saswp-review-container').hide();
1337
+ $('.saswp-review-container:first').show();
1338
+
1339
+ $('#saswp-review-tabs a').click(function(){
1340
+ var t = $(this).attr('data-id');
1341
+
1342
+ if(!$(this).hasClass('saswp-global-selected')){
1343
+ $('#saswp-review-tabs a').removeClass('saswp-global-selected');
1344
+ $(this).addClass('saswp-global-selected');
1345
+
1346
+ $('.saswp-review-container').hide();
1347
+ $('#'+t).show();
1348
+ }
1349
+ });
1350
+
1351
+
1352
  //Importer from schema plugin ends here
1353
 
1354
  //custom fields modify schema starts here
1387
  },'json');
1388
 
1389
  });
1390
+
1391
+ $(document).on("click", ".saswp_add_schema_fields_on_fly", function(e){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1392
  e.preventDefault();
1393
 
1394
+ var schema_id = $(this).attr('data-id');
1395
+ var fields_type = $(this).attr('fields_type');
1396
+ var div_type = $(this).attr('div_type');
1397
+
1398
+ var count = $(".saswp-"+div_type+"-table-div").length;
1399
+ var index = $( ".saswp-"+div_type+"-table-div:nth-child("+count+")" ).attr('data-id');
1400
  index = ++index;
1401
 
1402
  if(!index){
1403
  index = 0;
1404
  }
1405
+
1406
+ saswp_get_post_specific_schema_fields(index, fields_type, div_type, schema_id, fields_type+'_');
1407
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1408
  });
1409
 
1410
  $(document).on("click", ".saswp-table-close", function(){
1551
  jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>");
1552
 
1553
  }
1554
+
1555
+ //star rating stars here
1556
+ if(typeof(saswp_reviews_data) !== 'undefined'){
1557
+
1558
+ $(".saswp-rating-div").rateYo({
1559
+
1560
+ rating: saswp_reviews_data.rating_val,
1561
+ halfStar: true,
1562
+ //normalFill: "#ffd700",
1563
+ readOnly: saswp_reviews_data.readonly,
1564
+ onSet: function (rating, rateYoInstance) {
1565
+ $(this).next().val(rating);
1566
+ console.log(rating);
1567
+ }
1568
+
1569
+ });
1570
+
1571
+ }
1572
+ $(document).on("click", ".saswp-add-g-location-btn", function(e){
1573
+
1574
+ var blocks_field = '';
1575
+
1576
+ if($("#saswp_google_place_api_key").length){
1577
+
1578
+ blocks_field = '<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="5" step="5" placeholder="5" disabled="disabled">';
1579
+ }else{
1580
+ blocks_field = '<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="10" step="10" placeholder="10">';
1581
+ }
1582
+
1583
+ e.preventDefault();
1584
+ var html = '';
1585
+ html += '<tr>'
1586
+ + '<td style="width:12%;"><strong>Place Id</strong></td>'
1587
+ + '<td style="width:20%;"><input class="saswp-g-location-field" name="sd_data[saswp_reviews_location_name][]" type="text" value=""></td>'
1588
+ + '<td style="width:10%;"><strong>Reviews</strong></td>'
1589
+ + '<td style="width:10%;">'+blocks_field+'</td>'
1590
+ + '<td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">Fetch</a></td>'
1591
+ + '<td style="width:10%;"><a type="button" class="saswp-remove-review-item button">x</a></td>'
1592
+ + '<td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td>'
1593
+ + '</tr>';
1594
+ if(html){
1595
+ $(".saswp-g-reviews-settings-table").append(html);
1596
+ }
1597
+
1598
+ });
1599
+
1600
+ $(document).on("click", '.saswp-fetch-g-reviews', function(){
1601
+
1602
+ var current = $(this);
1603
+ var premium_status = 'free';
1604
+ current.addClass('updating-message');
1605
+
1606
+ var location = $(this).parent().parent().find('.saswp-g-location-field').val();
1607
+ var blocks = $(this).parent().parent().find('.saswp-g-blocks-field').val();
1608
+ var g_api = $("#saswp_google_place_api_key").val();
1609
+ var reviews_api = $("#reviews_addon_license_key").val();
1610
+ var reviews_api_status = $("#reviews_addon_license_key_status").val();
1611
+
1612
+ if($("#saswp_google_place_api_key").length){
1613
+ premium_status = 'free';
1614
+ }else{
1615
+ premium_status = 'premium';
1616
+ }
1617
+
1618
+ if(premium_status == 'premium'){
1619
+
1620
+ if(blocks > 0){
1621
+
1622
+ var blocks_remainder = blocks % 10;
1623
+
1624
+ if(blocks_remainder != 0){
1625
+
1626
+ current.parent().parent().find('.saswp-rv-fetched-msg').text('Reviews count should be in step of 10');
1627
+ current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "#988f1b");
1628
+ current.removeClass('updating-message');
1629
+ return false;
1630
+
1631
+ }
1632
+
1633
+ }else{
1634
+ alert('Blocks value is zero');
1635
+ current.removeClass('updating-message');
1636
+ return false;
1637
+ }
1638
+
1639
+ }
1640
+
1641
+ if(location !='' && (reviews_api || g_api)){
1642
+ $.ajax({
1643
+ type: "POST",
1644
+ url:ajaxurl,
1645
+ dataType: "json",
1646
+ data:{action:"saswp_fetch_google_reviews",reviews_api_status:reviews_api_status, reviews_api:reviews_api,location:location,blocks:blocks,g_api:g_api,premium_status:premium_status, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1647
+ success:function(response){
1648
+ if(response['status'] =='t'){
1649
+ current.parent().parent().find('.saswp-rv-fetched-msg').text('Success');
1650
+ current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "green");
1651
+ }else{
1652
+ current.parent().parent().find('.saswp-rv-fetched-msg').text(response['message']);
1653
+ current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "#988f1b");
1654
+ }
1655
+ current.removeClass('updating-message');
1656
+ },
1657
+ error: function(response){
1658
+ console.log(response);
1659
+ }
1660
+ });
1661
+ }else{
1662
+ if(location ==''){
1663
+ alert('Please enter place id');
1664
+ }
1665
+ if(g_api ==''){
1666
+ alert('Please enter api key');
1667
+ }
1668
+ if(reviews_api ==''){
1669
+ alert('Please enter reviews api key');
1670
+ }
1671
+ current.removeClass('updating-message');
1672
+ }
1673
+ });
1674
+
1675
+ //rating ends here
1676
 
1677
+ $("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){
1678
+ var current = $(this);
1679
+
1680
+ current.parent().find('.saswp-phone-validation').remove();
1681
+
1682
+ var pnumber = $(this).val();
1683
+ var p_regex = /^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/;
1684
+
1685
+ if(!p_regex.test(pnumber)){
1686
+ current.after('<span style="color:red;" class="saswp-phone-validation">Invalid Phone Number</span>');
1687
+ }else{
1688
+ current.parent().find('.saswp-phone-validation').remove();
1689
+ }
1690
+
1691
+ });
1692
 
1693
  });
admin_section/js/main-script.min.js CHANGED
@@ -1 +1 @@
1
- function getParameterByName(s,e){e||(e=window.location.href),s=s.replace(/[\[\]]/g,"\\$&");var a=new RegExp("[?&]"+s+"(=([^&#]*)|&|#|$)").exec(e);return a?a[2]?decodeURIComponent(a[2].replace(/\+/g," ")):"":null}function saswp_fields_html_generator(s,e,a,t,i){var o="";return o+='<div class="saswp-'+t+'-table-div" data-id="'+s+'"><a class="saswp-table-close">X</a><table class="form-table saswp-'+t+'-table">',$.each(i,function(t,i){switch(i.type){case"text":o+="<tr><th>"+i.label+'</th><td><input style="width:100%" type="text" id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']"></td></tr>';break;case"media":o+="<tr><th>"+i.label+'</th><td><fieldset><input style="width:80%" type="text" id="'+i.name+"_"+s+"_"+e+'" name="'+i.name+"_"+s+"_"+e+'"><input type="hidden" data-id="'+i.name+"_"+s+"_"+e+'_id" name="'+a+e+"["+s+"]["+i.name+'_id]" id="'+i.name+"_"+s+"_"+e+'_id"><input data-id="media" style="width: 19%" class="button" id="'+i.name+"_"+s+"_"+e+'_button" name="'+i.name+"_"+s+"_"+e+'_button" type="button" value="Upload"><div class="saswp_image_div_'+i.name+"_"+s+"_"+e+'"></div></fieldset></td></tr>'}}),o+="</table></div>"}jQuery(document).ready(function(s){if(saswp_localize_data.do_tour){var e,a="<h3>Thanks for using Structured Data!</h3>";a+="<p>Do you want the latest on <b>Structured Data update</b> before others and some best resources on monetization in a single email? - Free just for users of Structured Data!</p>",a+='<style type="text/css">',a+=".wp-pointer-buttons{ padding:0; overflow: hidden; }",a+=".wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none}\t#afw_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }",a+="</style>",a+='<div id="afw_mc_embed_signup">',a+='<form action="//app.mailerlite.com/webforms/submit/o1s7u3" data-id="258182" data-code="o1s7u3" method="POST" target="_blank">',a+='<div id="afw_mc_embed_signup_scroll">',a+='<div class="afw-mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">',a+='<input type="text" name="fields[name]" class="form-control" placeholder="Name" hidden value="'+saswp_localize_data.current_user_name+'" style="display:none">',a+='<input type="text" value="'+saswp_localize_data.current_user_email+'" name="fields[email]" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">',a+='<input type="text" name="fields[company]" class="form-control" placeholder="Website" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="'+saswp_localize_data.get_home_url+'">',a+='<input type="hidden" name="ml-submit" value="1" />',a+="</div>",a+='<div id="mce-responses">',a+='<div class="response" id="mce-error-response" style="display:none"></div>',a+='<div class="response" id="mce-success-response" style="display:none"></div>',a+="</div>",a+='<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a631df13442f19caede5a5baf_c9a71edce6" tabindex="-1" value=""></div>',a+='<input type="submit" value="Subscribe" name="subscribe" id="pointer-close" class="button mc-newsletter-sent" style=" background: #0085ba; border-color: #006799; padding: 0px 16px; text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799; height: 30px; margin-top: 1px; color: #fff; box-shadow: 0 1px 0 #006799;">',a+="</div>",a+="</form>";var t={content:a+="</div>",position:{edge:"top",align:"left"}};e=function(){s(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(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer222",action:"dismiss-wp-pointer"})}))},(t=s.extend(t,{buttons:function(s,e){return button=jQuery('<a id="pointer-close" class="button-secondary">'+saswp_localize_data.button1+"</a>"),button_2=jQuery("#pointer-close.button"),button.bind("click.pointer",function(){e.element.pointer("close")}),button_2.on("click",function(){e.element.pointer("close")}),button},close:function(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer222",action:"dismiss-wp-pointer"})},show:function(s,e){e.pointer.css({left:"170px",top:"160px"})}})).position&&t.position.defer_loading?s(window).bind("load.wp-pointers",e):e()}function i(e,a){var t=a.replace("-checkbox",""),i=s("#"+t).next("p").text();e.is(":checked")&&""!==i?s("#"+t).next("p").removeClass("saswp_hide"):1==s("#"+t).next("p").attr("data-id")?s("#"+t).next("p").text("This feature is only available in pro version"):s("#"+t).next("p").addClass("saswp_hide")}function o(){s(".saswp-item-reviewed").change(function(e){e.preventDefault();var a="";if(s("select#schema_type option:selected").val()&&(a=s("select#schema_type option:selected").val()),s(".saswp-tab-links.selected").attr("saswp-schema-type")&&(a=s(".saswp-tab-links.selected").attr("saswp-schema-type")),"Review"===a){var t=s(this),i=s(this).val(),o=saswp_localize_data.post_id,p=s(t).attr("data-id"),n=s(t).attr("post-specific");s.get(ajaxurl,{action:"saswp_get_item_reviewed_fields",schema_id:p,post_specific:n,item:i,post_id:o,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(t).parent().parent().nextAll().remove(".saswp-review-tr"),s(t).parent().parent().after(e)})}}).change()}function p(){s(".saswp-local-schema-datepicker-picker").datepicker({dateFormat:"yy-mm-dd",minDate:0})}function n(){"saswp"!=saswp_localize_data.post_type&&"saswp"!=saswp_localize_data.page_now||"saswp_page_structured_data_options"==saswp_localize_data.page_now||s(".saswp-custom-fields-select2").select2({ajax:{type:"POST",url:ajaxurl,dataType:"json",delay:250,data:function(s){return{saswp_security_nonce:saswp_localize_data.saswp_security_nonce,q:s.term,action:"saswp_get_custom_meta_fields"}},processResults:function(s){return{results:s}},cache:!0},minimumInputLength:2})}function c(){var e="";s("select#schema_type option:selected").val()&&(e=s("select#schema_type option:selected").val()),s(".saswp-tab-links.selected").attr("saswp-schema-type")&&(e=s(".saswp-tab-links.selected").attr("saswp-schema-type")),e&&s(".saswp-enable-rating-review-"+e.toLowerCase()).change(function(){s(this).is(":checked")?s(this).parent().parent().siblings(".saswp-rating-review-"+e.toLowerCase()).show():s(this).parent().parent().siblings(".saswp-rating-review-"+e.toLowerCase()).hide()}).change()}s(".saswp-tabs a").click(function(e){var a=s(this).attr("href"),t=getParameterByName("tab",a);return t||(t="general"),s(this).siblings().removeClass("nav-tab-active"),s(this).addClass("nav-tab-active"),s(".form-wrap").find(".saswp-"+t).siblings().hide(),s(".form-wrap .saswp-"+t).show(),window.history.pushState("","",a),!1}),s(".saswp-schame-type-select").change(function(){s(".saswp-custom-fields-table").html("");var e=s(this).val();s(".saswp-option-table-class tr").each(function(e,a){e>0&&(s(this).hide(),s(this).find("select").attr("disabled",!0))}),"TechArticle"==e||"Article"==e||"Blogposting"==e||"NewsArticle"==e||"WebPage"==e?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"local_business"==e&&(s(".saswp-option-table-class tr").eq(1).show(),s(".saswp-business-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".select-post-type").val("show_globally").trigger("change")),"Service"==e&&(s(".saswp-service-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Review"==e&&(s(".saswp-review-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),o()),"Product"==e&&(s(".saswp-product-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==e&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"AudioObject"==e&&s(".saswp-audio-text-field-tr").show(),"SoftwareApplication"==e&&s(".saswp-softwareapplication-text-field-tr").show(),s(".saswp-schem-type-note").addClass("saswp_hide"),"qanda"==e&&s(".saswp-schem-type-note").removeClass("saswp_hide"),s(".saswp-job-posting-note").addClass("saswp_hide"),c()}),s("#saswp_business_type").change(function(){var e=s(this).val(),a=s(".saswp-schame-type-select").val();s(".saswp-option-table-class tr").each(function(e,a){e>1&&(s(this).hide(),s(this).find("select").attr("disabled",!0))}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"local_business"==a&&(s(".saswp-"+e+"-tr").show(),s(".saswp-business-text-field-tr").show(),s(".saswp-"+e+"-tr").find("select").attr("disabled",!1)),"Service"==a&&(s(".saswp-service-text-field-tr").show(),s(".saswp-service-text-field-tr").find("select").attr("disabled",!1)),"Product"==a&&(s(".saswp-product-text-field-tr").show(),s(".saswp-product-text-field-tr").find("select").attr("disabled",!1)),"AudioObject"==a&&s(".saswp-audio-text-field-tr").show(),"SoftwareApplication"==a&&s(".saswp-softwareapplication-text-field-tr").show(),"Review"==a&&(s(".saswp-review-text-field-tr").show(),s(".saswp-review-text-field-tr").find("select").attr("disabled",!1)),"Event"==a&&(s(".saswp-event-text-field-tr").show(),s(".saswp-event-text-field-tr").find("select").attr("disabled",!1)),c()}).change(),s(".saswp-checkbox").change(function(){var e=s(this).attr("id"),a=s(this);switch(e){case"saswp-for-wordpress-checkbox":s(this).is(":checked")?s("#saswp-for-wordpress").val(1):s("#saswp-for-wordpress").val(0);break;case"saswp-facebook-enable-checkbox":s(this).is(":checked")?(s("#saswp-facebook-enable").val(1),s("#sd_facebook").show()):(s("#saswp-facebook-enable").val(0),s("#sd_facebook").hide());break;case"saswp-twitter-enable-checkbox":s(this).is(":checked")?(s("#saswp-twitter-enable").val(1),s("#sd_twitter").show()):(s("#saswp-twitter-enable").val(0),s("#sd_twitter").hide());break;case"saswp-google-plus-enable-checkbox":s(this).is(":checked")?(s("#saswp-google-plus-enable").val(1),s("#sd_google_plus").show()):(s("#saswp-google-plus-enable").val(0),s("#sd_google_plus").hide());break;case"saswp-instagram-enable-checkbox":s(this).is(":checked")?(s("#saswp-instagram-enable").val(1),s("#sd_instagram").show()):(s("#saswp-instagram-enable").val(0),s("#sd_instagram").hide());break;case"saswp-youtube-enable-checkbox":s(this).is(":checked")?(s("#sd_youtube").show(),s("#saswp-youtube-enable").val(1)):(s("#saswp-youtube-enable").val(0),s("#sd_youtube").hide());break;case"saswp-linkedin-enable-checkbox":s(this).is(":checked")?(s("#saswp-linkedin-enable").val(1),s("#sd_linkedin").show()):(s("#saswp-linkedin-enable").val(0),s("#sd_linkedin").hide());break;case"saswp-pinterest-enable-checkbox":s(this).is(":checked")?(s("#saswp-pinterest-enable").val(1),s("#sd_pinterest").show()):(s("#saswp-pinterest-enable").val(0),s("#sd_pinterest").hide());break;case"saswp-soundcloud-enable-checkbox":s(this).is(":checked")?(s("#saswp-soundcloud-enable").val(1),s("#sd_soundcloud").show()):(s("#saswp-soundcloud-enable").val(0),s("#sd_soundcloud").hide());break;case"saswp-tumblr-enable-checkbox":s(this).is(":checked")?(s("#saswp-tumblr-enable").val(1),s("#sd_tumblr").show()):(s("#saswp-tumblr-enable").val(0),s("#sd_tumblr").hide());break;case"saswp-for-amp-checkbox":s(this).is(":checked")?s("#saswp-for-amp").val(1):s("#saswp-for-amp").val(0);break;case"saswp_kb_contact_1_checkbox":s(this).is(":checked")?(s("#saswp_kb_contact_1").val(1),s("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").removeClass("saswp-display-none")):(s("#saswp_kb_contact_1").val(0),s("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").addClass("saswp-display-none"));break;case"saswp-logo-dimensions-check":s(this).is(":checked")?(s("#saswp-logo-dimensions").val(1),s("#saswp-logo-width, #saswp-logo-height").parent().parent("li").show()):(s("#saswp-logo-dimensions").val(0),s("#saswp-logo-width, #saswp-logo-height").parent().parent("li").hide());break;case"saswp_archive_schema_checkbox":s(this).is(":checked")?(s("#saswp_archive_schema").val(1),s(".saswp_archive_schema_type_class").parent().parent().show()):(s("#saswp_archive_schema").val(0),s(".saswp_archive_schema_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":s(this).is(":checked")?(s("#saswp_website_schema").val(1),s("#saswp_search_box_schema").parent().parent().show()):(s("#saswp_website_schema").val(0),s("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":s(this).is(":checked")?s("#saswp_search_box_schema").val(1):s("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_schema_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_schema").val(1):s("#saswp_breadcrumb_schema").val(0);break;case"saswp_site_navigation_menu_checkbox":s(this).is(":checked")?(s("#saswp_site_navigation_menu").val(1),s(".saswp-nav-menu-list").show()):(s("#saswp_site_navigation_menu").val(0),s(".saswp-nav-menu-list").hide());break;case"saswp_comments_schema_checkbox":s(this).is(":checked")?s("#saswp_comments_schema").val(1):s("#saswp_comments_schema").val(0);break;case"saswp-compativility-checkbox":s(this).is(":checked")?s("#saswp-flexmlx-compativility").val(1):s("#saswp-flexmlx-compativility").val(0);break;case"saswp-review-module-checkbox":s(this).is(":checked")?s("#saswp-review-module").val(1):s("#saswp-review-module").val(0);break;case"saswp-kk-star-raring-checkbox":i(a,e),s(this).is(":checked")?s("#saswp-kk-star-raring").val(1):s("#saswp-kk-star-raring").val(0);break;case"saswp-woocommerce-checkbox":i(a,e),s(this).is(":checked")?s("#saswp-woocommerce").val(1):s("#saswp-woocommerce").val(0);break;case"saswp-extra-checkbox":i(a,e),s(this).is(":checked")?s("#saswp-extra").val(1):s("#saswp-extra").val(0);break;case"saswp-dw-question-answer-checkbox":i(a,e),s(this).is(":checked")?s("#saswp-dw-question-answer").val(1):s("#saswp-dw-question-answer").val(0);break;case"saswp-wp-job-manager-checkbox":i(a,e),s(this).is(":checked")?s("#saswp-wp-job-manager").val(1):s("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":i(a,e),s(this).is(":checked")?s("#saswp-yoast").val(1):s("#saswp-yoast").val(0);break;case"saswp-rankmath-checkbox":i(a,e),s(this).is(":checked")?s("#saswp-rankmath").val(1):s("#saswp-rankmath").val(0);break;case"saswp-tagyeem-checkbox":i(a,e),s(this).is(":checked")?s("#saswp-tagyeem").val(1):s("#saswp-tagyeem").val(0);break;case"saswp-the-events-calendar-checkbox":i(a,e),s(this).is(":checked")?s("#saswp-the-events-calendar").val(1):s("#saswp-the-events-calendar").val(0);break;case"saswp-woocommerce-booking-checkbox":i(a,e),s(this).is(":checked")?(s("#saswp-woocommerce-booking").val(1),s("#saswp-woocommerce-booking-main").val(1)):(s("#saswp-woocommerce-booking").val(0),s("#saswp-woocommerce-booking-main").val(0));break;case"saswp-woocommerce-booking-main-checkbox":i(a,e),s(this).is(":checked")?(s("#saswp-woocommerce-booking-main").val(1),s("#saswp-woocommerce-booking").val(1)):(s("#saswp-woocommerce-booking-main").val(0),s("#saswp-woocommerce-booking").val(0));break;case"saswp-woocommerce-membership-checkbox":i(a,e),s(this).is(":checked")?s("#saswp-woocommerce-membership").val(1):s("#saswp-woocommerce-membership").val(0);break;case"saswp-defragment-checkbox":s(this).is(":checked")?s("#saswp-defragment").val(1):s("#saswp-defragment").val(0);break;case"saswp-cooked-checkbox":i(a,e),s(this).is(":checked")?s("#saswp-cooked").val(1):s("#saswp-cooked").val(0);break;case"saswp-flexmlx-compativility-checkbox":i(a,e),s(this).is(":checked")?s("#saswp-flexmlx-compativility").val(1):s("#saswp-flexmlx-compativility").val(0);break;case"saswp-google-review-checkbox":s(this).is(":checked")?(s("#saswp-google-review").val(1),s("#saswp_google_place_api_key").parent().parent().show()):(s("#saswp-google-review").val(0),s("#saswp_google_place_api_key").parent().parent().hide());break;case"saswp-markup-footer-checkbox":s(this).is(":checked")?s("#saswp-markup-footer").val(1):s("#saswp-markup-footer").val(0);break;case"saswp-pretty-print-checkbox":s(this).is(":checked")?s("#saswp-pretty-print").val(1):s("#saswp-pretty-print").val(0);break;case"saswp-wppostratings-raring-checkbox":i(a,e),s(this).is(":checked")?s("#saswp-wppostratings-raring").val(1):s("#saswp-wppostratings-raring").val(0);break;case"saswp-bbpress-checkbox":i(a,e),s(this).is(":checked")?s("#saswp-bbpress").val(1):s("#saswp-bbpress").val(0);break;case"saswp-microdata-cleanup-checkbox":s(this).is(":checked")?s("#saswp-microdata-cleanup").val(1):s("#saswp-microdata-cleanup").val(0)}}).change(),s("#saswp_kb_type").change(function(){var e=s(this).val();s(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().addClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide"),"Organization"==e&&(s(".saswp_org_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide")),"Person"==e&&(s(".saswp_org_fields").parent().parent().addClass("saswp_hide"),s(".saswp_person_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().removeClass("saswp_hide"))}).change(),s(document).on("click","input[data-id=media]",function(e){e.preventDefault();var a=s(this),t=a.attr("id").replace("_button",""),i=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1,library:{type:"image"}}).on("select",function(){var e=i.state().get("selection").first().toJSON();s("#"+t).val(e.url),s("input[data-id='"+t+"_id']").val(e.id),s("input[data-id='"+t+"_height']").val(e.height),s("input[data-id='"+t+"_width']").val(e.width),s("input[data-id='"+t+"_thumbnail']").val(e.url),"sd_default_image_button"===a.attr("id")&&(s("#sd_default_image_width").val(e.width),s("#sd_default_image_height").val(e.height)),s(".saswp_image_div_"+t).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+e.url+'"/><a data-id="'+t+'" href="#" class="saswp_prev_close">X</a></div>')}).open()}),s(document).on("click",".saswp_prev_close",function(e){e.preventDefault();var a=s(this).attr("data-id");console.log(a),s(this).parent().remove(),s("#"+a).val(""),s("input[data-id='"+a+"_id']").val(""),s("input[data-id='"+a+"_height']").val(""),s("input[data-id='"+a+"_width']").val(""),s("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(s("#sd_default_image_width").val(""),s("#sd_default_image_height").val(""))}),s(document).on("change",".saswp-schema-type-toggle",function(e){var a=s(this).attr("data-schema-id"),t=s(this).attr("data-post-id");if(s(this).is(":checked"))var i=1;else i=0;s.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(s){},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-reset-data",function(e){e.preventDefault(),1==confirm("Are you sure?")&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){setTimeout(function(){location.reload()},1e3)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp_license_activation",function(e){e.preventDefault();var a=s(this).attr("license-status"),t=s(this).attr("add-on"),i=s("#"+t+"_addon_license_key").val();a&&t&&i&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:i,license_status:a,add_on:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){s("#"+t+"_addon_license_key_status").val(e.status),"active"==e.status?(s(".saswp-"+t+"-dashicons").addClass("dashicons-yes"),s(".saswp-"+t+"-dashicons").removeClass("dashicons-no-alt"),s(".saswp-"+t+"-dashicons").css("color","green"),s(".saswp_license_activation[add-on='"+t+"']").attr("license-status","inactive"),s(".saswp_license_activation[add-on='"+t+"']").text("Deactivate"),s(".saswp_license_status_msg[add-on='"+t+"']").text("Activated"),s(".saswp_license_status_msg[add-on='"+t+"']").css("color","green"),s(".saswp_license_status_msg[add-on='"+t+"']").text(e.message)):(s(".saswp-"+t+"-dashicons").addClass("dashicons-no-alt"),s(".saswp-"+t+"-dashicons").removeClass("dashicons-yes"),s(".saswp-"+t+"-dashicons").css("color","red"),s(".saswp_license_activation[add-on='"+t+"']").attr("license-status","active"),s(".saswp_license_activation[add-on='"+t+"']").text("Activate"),s(".saswp_license_status_msg[add-on='"+t+"']").css("color","red"),s(".saswp_license_status_msg[add-on='"+t+"']").text(e.message))},error:function(s){console.log(s)}})}),s(".saswp-send-query").on("click",function(e){e.preventDefault();var a=s("#saswp_query_message").val();""!=s.trim(a)?s.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(e){"t"==e.status?(s(".saswp-query-success").show(),s(".saswp-query-error").hide()):(console.log("dd"),s(".saswp-query-success").hide(),s(".saswp-query-error").show())},error:function(s){console.log(s)}}):alert("Please enter the message")}),s(".saswp-import-plugins").on("click",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("data-id");s.get(ajaxurl,{action:"saswp_import_plugin_data",plugin_name:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status?(s(a).parent().find(".saswp-imported-message").text(e.message),s(a).parent().find(".saswp-imported-message").removeClass("saswp-error"),setTimeout(function(){location.reload()},2e3)):(s(a).parent().find(".saswp-imported-message").addClass("saswp-error"),s(a).parent().find(".saswp-imported-message").text(e.message)),a.removeClass("updating-message")},"json")}),s(".saswp-feedback-no-thanks").on("click",function(e){e.preventDefault(),s.get(ajaxurl,{action:"saswp_feeback_no_thanks"},function(e){"t"==e.status&&s(".saswp-feedback-notice").hide()},"json")}),s(".saswp-feedback-remindme").on("click",function(e){e.preventDefault(),s.get(ajaxurl,{action:"saswp_feeback_remindme"},function(e){"t"==e.status&&s(".saswp-feedback-notice").hide()},"json")}),s(document).on("change",".saswp-local-business-type-select",function(e){e.preventDefault();var a=s(this),t=s(this).val();s.get(ajaxurl,{action:"saswp_get_sub_business_ajax",business_type:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){s(".saswp-local-business-name-select").parents("tr").remove();var t=a.parents(".saswp-post-specific-wrapper").attr("data-id"),i='<tr><th><label for="saswp_business_name_'+t+'">Sub Business Type</label></th>';i+='<td><select class="saswp-local-business-name-select" id="saswp_business_name_'+t+'" name="saswp_business_name_'+t+'">',s.each(e.result,function(s,e){i+='<option value="'+s+'">'+e+"</option>"}),i+="</select></td>",i+="</tr>",a.parents(".form-table tr:first").after(i)}else s(".saswp-local-business-name-select").parents("tr").remove()},"json")}),o(),s(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),s(document).on("click",".saswp-add-custom-schema",function(e){e.preventDefault(),s(".saswp-add-custom-schema-field").removeClass("saswp_hide"),s(this).hide()}),s(document).on("click",".saswp-delete-custom-schema",function(e){e.preventDefault(),s("#saswp_custom_schema_field").val(""),s(".saswp-add-custom-schema-field").addClass("saswp_hide"),s(".saswp-add-custom-schema").show()}),s(".saswp-modify_schema_post_enable").on("click",function(e){var a=s(this);a.addClass("updating-message"),e.preventDefault(),s.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(e){a.remove(),s(".saswp-add-custom-schema-div").remove(),s("#post_specific .inside").append(e),a.removeClass("updating-message"),s(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),p(),c(),o()})}),p(),s(document).on("click",".saswp-add-more-item",function(e){e.preventDefault();var a=s(".saswp-review-item-list-table tr").length;console.log(a);s(".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>')}),s(document).on("click",".saswp-remove-review-item",function(e){e.preventDefault(),s(this).parent().parent("tr").remove()}),s(document).on("focusout",".saswp-review-item-tr input[type=number]",function(e){e.preventDefault();var a=0,t=s(".saswp-review-item-tr input[type=number]").length;s(".saswp-review-item-tr input[type=number]").each(function(e,t){""==s(t).val()?a+=parseFloat(0):a+=parseFloat(s(t).val())});var i=a/t;s("#saswp-review-item-over-all").val(i)}),s("#saswp-review-location").change(function(){var e=s(this).val();s(".saswp-review-shortcode").addClass("saswp_hide"),3==e&&s(".saswp-review-shortcode").removeClass("saswp_hide")}).change(),s("#saswp-review-item-enable").change(function(){s(this).is(":checked")?s(".saswp-review-fields").show():s(".saswp-review-fields").hide()}).change(),s(document).on("click",".saswp-restore-post-schema",function(e){e.preventDefault();var a=s(this);if(a.addClass("updating-message"),s(".saswp-post-specific-schema-ids").val())var t=JSON.parse(s(".saswp-post-specific-schema-ids").val());s.post(ajaxurl,{action:"saswp_restore_schema",schema_ids:t,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){"t"==s.status?setTimeout(function(){location.reload()},1e3):(alert(s.msg),setTimeout(function(){location.reload()},1e3)),a.removeClass("updating-message")},"json")}),s(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(e){e.preventDefault();var a=s(this).attr("data-id");s(".saswp-post-specific-wrapper").hide(),s("#"+a).show(),s("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),s("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),s(this).addClass("selected"),s(this).parent().addClass("selected"),c()}),s("#saswp-global-tabs a:first").addClass("saswp-global-selected"),s(".saswp-global-container").hide(),s(".saswp-global-container:first").show(),s("#saswp-global-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-global-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-global-container").hide(),s("#"+e).show())}),s("#saswp-tools-tabs a:first").addClass("saswp-global-selected"),s(".saswp-tools-container").hide(),s(".saswp-tools-container:first").show(),s("#saswp-tools-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-tools-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-tools-container").hide(),s("#"+e).show())}),s('a[href="'+saswp_localize_data.new_url_selector+'"]').attr("href",saswp_localize_data.new_url_href),s("#saswp_enable_custom_field").change(function(){s(this).is(":checked")?s(".saswp-custom-fields-div").show():s(".saswp-custom-fields-div").hide()}),s(document).on("change",".saswp-custom-fields-name",function(){s(this).parent().parent("tr").find("td:eq(1)").html("");var e="";e+='<select class="saswp-custom-fields-select2" name="saswp_custom_fields['+s(this).val()+']">',e+="</select>",s(this).parent().parent("tr").find("td:eq(1)").html(e),n()}),s(document).on("click",".saswp-skip-button",function(e){e.preventDefault(),s(this).parent().parent().hide(),s.post(ajaxurl,{action:"saswp_skip_wizard",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){},"json")}),s(document).on("click",".saswp-trip-itinerary",function(e){e.preventDefault();var a=s(this).attr("data-id"),t=s(".saswp-trip-itinerary-table-div").length,i=s(".saswp-trip-itinerary-table-div:nth-child("+t+")").attr("data-id");(i=++i)||(i=0);var o="";(o+='<div class="saswp-trip-itinerary-table-div" data-id="'+i+'"><a class="saswp-table-close">X</a><table class="form-table saswp-trip-itinerary-table"><tr><th>Itinerary Type</th><td><select id="saswp_trip_itinerary_type_'+i+"_"+a+'" name="trip_itinerary_'+a+"["+i+'][saswp_trip_itinerary_type]"><option value="City">City</option><option value="LandmarksOrHistoricalBuildings">LandmarksOrHistoricalBuildings</option><option value="AdministrativeArea">AdministrativeArea</option><option value="LakeBodyOfWater">LakeBodyOfWater</option></select></td></tr><tr><th>Itinerary Name</th><td><input style="width:100%" type="text" id="saswp_trip_itinerary_name_'+i+"_"+a+'" name="trip_itinerary_'+a+"["+i+'][saswp_trip_itinerary_name]"></td></tr><tr><th>Itinerary Description</th><td><textarea placeholder="Description" style="width: 100%" id="saswp_trip_itinerary_description_'+i+"_"+a+'" name="trip_itinerary_'+a+"["+i+'][saswp_trip_itinerary_description]" rows="5"></textarea></td></tr><tr><th>Itinerary URL</th><td><input style="width:100%" type="text" id="saswp_trip_itinerary_url_'+i+"_"+a+'" name="trip_itinerary_'+a+"["+i+'][saswp_trip_itinerary_url]"></td></tr></table></div>')&&s('.saswp-trip-itinerary-section[data-id="'+a+'"]').append(o)}),s(document).on("click",".saswp-tvseries-actor",function(e){e.preventDefault();var a=s(this).attr("data-id"),t=s(".saswp-tvseries-actor-table-div").length,i=s(".saswp-tvseries-actor-table-div:nth-child("+t+")").attr("data-id");(i=++i)||(i=0);var o="";(o+='<div class="saswp-tvseries-actor-table-div" data-id="'+i+'"><a class="saswp-table-close">X</a><table class="form-table saswp-tvseries-actor-table"><tr><th>Actor Name</th><td><input style="width:100%" type="text" id="saswp_tvseries_actor_name_'+i+"_"+a+'" name="tvseries_actor_'+a+"["+i+'][saswp_tvseries_actor_name]"></td></tr></table></div>')&&s('.saswp-tvseries-actor-section[data-id="'+a+'"]').append(o)}),s(document).on("click",".saswp-tvseries-season",function(e){e.preventDefault();var a=s(this).attr("data-id"),t=s(".saswp-tvseries-season-table-div").length,i=s(".saswp-tvseries-season-table-div:nth-child("+t+")").attr("data-id");(i=++i)||(i=0);var o="";(o+='<div class="saswp-tvseries-season-table-div" data-id="'+i+'"><a class="saswp-table-close">X</a><table class="form-table saswp-tvseries-season-table"><tr><th>Season</th><td><input style="width:100%" type="text" id="saswp_tvseries_season_name_'+i+"_"+a+'" name="tvseries_season_'+a+"["+i+'][saswp_tvseries_season_name]"></td></tr><tr><th>Season Published Date</th><td><input class="saswp-local-schema-datepicker-picker" style="width:100%" type="text" id="saswp_tvseries_season_published_date_'+i+"_"+a+'" name="tvseries_season_'+a+"["+i+'][saswp_tvseries_season_published_date]"></td></tr><tr><th>Number Of Episodes</th><td><input style="width:100%" type="text" id="saswp_tvseries_season_episodes_'+i+"_"+a+'" name="tvseries_season_'+a+"["+i+'][saswp_tvseries_season_episodes]"></td></tr></table></div>')&&(s('.saswp-tvseries-season-section[data-id="'+a+'"]').append(o),p())}),s(document).on("click",".saswp-mc-cause",function(e){e.preventDefault();var a=s(this).attr("data-id"),t=s(".saswp-mc-cause-table-div").length,i=s(".saswp-mc-cause-table-div:nth-child("+t+")").attr("data-id");(i=++i)||(i=0);var o="";(o+='<div class="saswp-mc-cause-table-div" data-id="'+i+'"><a class="saswp-table-close">X</a><table class="form-table saswp-mc-cause-table"><tr><th>Cause</th><td><input style="width:100%" type="text" id="saswp_mc_cause_name_'+i+"_"+a+'" name="mc_cause_'+a+"["+i+'][saswp_mc_cause_name]"></td></tr></table></div>')&&s('.saswp-mc-cause-section[data-id="'+a+'"]').append(o)}),s(document).on("click",".saswp-mc-symptom",function(e){e.preventDefault();var a=s(this).attr("data-id"),t=s(".saswp-mc-symptom-table-div").length,i=s(".saswp-mc-symptom-table-div:nth-child("+t+")").attr("data-id");(i=++i)||(i=0);var o="";(o+='<div class="saswp-mc-symptom-table-div" data-id="'+i+'"><a class="saswp-table-close">X</a><table class="form-table saswp-mc-symptom-table"><tr><th>Symptom Name</th><td><input style="width:100%" type="text" id="saswp_mc_symptom_name_'+i+"_"+a+'" name="mc_symptom_'+a+"["+i+'][saswp_mc_symptom_name]"></td></tr></table></div>')&&s('.saswp-mc-symptom-section[data-id="'+a+'"]').append(o)}),s(document).on("click",".saswp-mc-risk_factor",function(e){e.preventDefault();var a=s(this).attr("data-id"),t=s(".saswp-mc-risk_factor-table-div").length,i=s(".saswp-mc-risk_factor-table-div:nth-child("+t+")").attr("data-id");(i=++i)||(i=0);var o="";(o+='<div class="saswp-mc-risk_factor-table-div" data-id="'+i+'"><a class="saswp-table-close">X</a><table class="form-table saswp-mc-risk_factor-table"><tr><th>Risk Factor Name</th><td><input style="width:100%" type="text" id="saswp_mc_risk_factor_name_'+i+"_"+a+'" name="mc_risk_factor_'+a+"["+i+'][saswp_mc_risk_factor_name]"></td></tr></table></div>')&&s('.saswp-mc-risk_factor-section[data-id="'+a+'"]').append(o)}),s(document).on("click",".saswp-how-to-supply",function(e){e.preventDefault();var a=s(this).attr("data-id"),t=s(".saswp-how-to-supply-table-div").length,i=s(".saswp-how-to-supply-table-div:nth-child("+t+")").attr("data-id");(i=++i)||(i=0);var o=saswp_fields_html_generator(i,a,"howto_supply_","how-to-supply",[{label:"Supply Name",name:"saswp_howto_supply_name",type:"text"},{label:"Supply URL",name:"saswp_howto_supply_url",type:"text"},{label:"Supply Image",name:"saswp_howto_supply_image",type:"media"}]);o&&s('.saswp-how-to-supply-section[data-id="'+a+'"]').append(o)}),s(document).on("click",".saswp-how-to-tool",function(e){e.preventDefault();var a=s(this).attr("data-id"),t=s(".saswp-how-to-tool-table-div").length,i=s(".saswp-how-to-tool-table-div:nth-child("+t+")").attr("data-id");(i=++i)||(i=0);var o="";(o+='<div class="saswp-how-to-tool-table-div" data-id="'+i+'"><a class="saswp-table-close">X</a><table class="form-table saswp-how-to-tool-table"><tr><th>Tool Name</th><td><input style="width:100%" type="text" id="saswp_howto_tool_name_'+i+"_"+a+'" name="howto_tool_'+a+"["+i+'][saswp_howto_tool_name]"></td></tr><tr><th>Tool URL</th><td><input style="width:100%" type="text" id="saswp_howto_tool_url_'+i+"_"+a+'" name="howto_tool_'+a+"["+i+'][saswp_howto_tool_url]"></td></tr><tr><th>Tool Image</th><td><fieldset><input style="width:80%" type="text" id="saswp_howto_tool_image_'+i+"_"+a+'" name="saswp_howto_tool_image_'+i+"_"+a+'"><input type="hidden" data-id="saswp_howto_tool_image_'+i+"_"+a+'_id" name="howto_tool_'+a+"["+i+'][saswp_howto_tool_image_id]" id="saswp_howto_tool_image_'+i+"_"+a+'_id"><input data-id="media" style="width: 19%" class="button" id="saswp_howto_tool_image_'+i+"_"+a+'_button" name="saswp_howto_tool_image_'+i+"_"+a+'_button" type="button" value="Upload"><div class="saswp_image_div_saswp_howto_tool_image_'+i+"_"+a+'"></div></fieldset></td></tr></table></div>')&&s('.saswp-how-to-tool-section[data-id="'+a+'"]').append(o)}),s(document).on("click",".saswp-how-to-step",function(e){e.preventDefault();var a=s(this).attr("data-id"),t=s(".saswp-how-to-step-table-div").length,i=s(".saswp-how-to-step-table-div:nth-child("+t+")").attr("data-id");(i=++i)||(i=0);var o="";(o+='<div class="saswp-how-to-step-table-div" data-id="'+i+'"><a class="saswp-table-close">X</a><table class="form-table saswp-how-to-step-table"><tr><th>Step Name</th><td><input style="width:100%" type="text" id="saswp_howto_step_name_'+i+"_"+a+'" name="howto_step_'+a+"["+i+'][saswp_howto_step_name]" ></td></tr><tr><th>HowToDirection Text</th><td><input style="width:100%" type="text" id="saswp_howto_direction_text_'+i+"_"+a+'" name="howto_step_'+a+"["+i+'][saswp_howto_direction_text]"></td></tr><tr><th>HowToTip Text</th><td><input style="width:100%" type="text" id="saswp_howto_tip_text_'+i+"_"+a+'" name="howto_step_'+a+"["+i+'][saswp_howto_tip_text]"></td></tr><tr><th>Step Image</th><td><fieldset><input style="width:80%" type="text" id="saswp_howto_step_image_'+i+"_"+a+'" name="saswp_howto_step_image_'+a+"["+i+']"><input type="hidden" data-id="saswp_howto_step_image_'+i+"_"+a+'_id" name="howto_step_'+a+"["+i+'][saswp_howto_step_image_id]" id="saswp_howto_step_image_'+i+"_"+a+'_id"><input data-id="media" style="width: 19%" class="button" id="saswp_howto_step_image_'+i+"_"+a+'_button" name="saswp_howto_step_image_'+i+"_"+a+'_button" type="button" value="Upload"><div class="saswp_image_div_saswp_howto_step_image_'+i+"_"+a+'"></div></fieldset></td></tr></table></div>')&&s('.saswp-how-to-step-section[data-id="'+a+'"]').append(o)}),s(document).on("click",".saswp-table-close",function(){s(this).parent().remove()}),s(document).on("click",".saswp-add-custom-fields",function(){var e=s("select#schema_type option:selected").val(),a=s("#post_ID").val();""!=e&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:a,schema_type:e,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if(0!=e.length){var a=0,t="",i="<tr>";i+="<td>",i+='<select class="saswp-custom-fields-name">',s.each(e,function(s,e){0==a&&(t=s),i+='<option value="'+s+'">'+e+"</option>",a++}),i+="</select>",i+="</td>",i+="<td>",i+='<select class="saswp-custom-fields-select2" name="saswp_custom_fields['+t+']">',i+="</select>",i+="</td>",i+="</tr>",s(".saswp-custom-fields-table").append(i),n()}},error:function(s){console.log(s)}})}),n(),c(),s('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),s(document).on("click",".saswp_coonect_google_place",function(){var e=s("#saswp_google_place_id").val(),a=s("#saswp_language_list").val(),t=s("#saswp_googel_api").val();""!=e&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:e,language:a,google_api:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){console.log(s.status)},error:function(s){console.log(s)}})}),"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>")});
1
+ function getParameterByName(e,s){s||(s=window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var a=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(s);return a?a[2]?decodeURIComponent(a[2].replace(/\+/g," ")):"":null}function saswp_schema_datepicker(){jQuery(".saswp-datepicker-picker").datepicker({dateFormat:"yy-mm-dd",minDate:0})}var saswp_meta_fields=[];function saswp_get_post_specific_schema_fields(e,s,a,t,i){if(saswp_meta_fields[i]){var o=saswp_fields_html_generator(e,t,i,a,saswp_meta_fields[i]);o&&($(".saswp-"+a+'-section[data-id="'+t+'"]').append(o),saswp_schema_datepicker())}else $.get(ajaxurl,{action:"saswp_get_schema_dynamic_fields_ajax",meta_name:s,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){saswp_meta_fields[i]=s,console.log(saswp_meta_fields);var o=saswp_fields_html_generator(e,t,i,a,s);o&&($(".saswp-"+a+'-section[data-id="'+t+'"]').append(o),saswp_schema_datepicker())},"json")}function saswp_fields_html_generator(e,s,a,t,i){var o="";return o+='<div class="saswp-'+t+'-table-div" data-id="'+e+'"><a class="saswp-table-close">X</a><table class="form-table saswp-'+t+'-table">',$.each(i,function(t,i){var n="";switch("saswp_tvseries_season_published_date"==i.name&&(n="saswp-datepicker-picker"),i.type){case"text":o+="<tr><th>"+i.label+'</th><td><input class="'+n+'" style="width:100%" type="text" id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']"></td></tr>';break;case"textarea":o+="<tr><th>"+i.label+'</th><td><textarea style="width: 100%" id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']" rows="5"></textarea></td></tr>';break;case"select":var c="";$.each(i.options,function(e,s){c+='<option value="'+e+'">'+s+"</option>"}),o+="<tr><th>"+i.label+'</th><td><select id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']">'+c+"</select></td></tr>";break;case"media":o+="<tr><th>"+i.label+'</th><td><fieldset><input style="width:80%" type="text" id="'+i.name+"_"+e+"_"+s+'" name="'+i.name+"_"+e+"_"+s+'"><input type="hidden" data-id="'+i.name+"_"+e+"_"+s+'_id" name="'+a+s+"["+e+"]["+i.name+'_id]" id="'+i.name+"_"+e+"_"+s+'_id"><input data-id="media" style="width: 19%" class="button" id="'+i.name+"_"+e+"_"+s+'_button" name="'+i.name+"_"+e+"_"+s+'_button" type="button" value="Upload"><div class="saswp_image_div_'+i.name+"_"+e+"_"+s+'"></div></fieldset></td></tr>'}}),o+="</table></div>"}jQuery(document).ready(function(e){if(saswp_localize_data.do_tour){var s,a="<h3>Thanks for using Structured Data!</h3>";a+="<p>Do you want the latest on <b>Structured Data update</b> before others and some best resources on monetization in a single email? - Free just for users of Structured Data!</p>",a+='<style type="text/css">',a+=".wp-pointer-buttons{ padding:0; overflow: hidden; }",a+=".wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none}\t#afw_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }",a+="</style>",a+='<div id="afw_mc_embed_signup">',a+='<form action="//app.mailerlite.com/webforms/submit/o1s7u3" data-id="258182" data-code="o1s7u3" method="POST" target="_blank">',a+='<div id="afw_mc_embed_signup_scroll">',a+='<div class="afw-mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">',a+='<input type="text" name="fields[name]" class="form-control" placeholder="Name" hidden value="'+saswp_localize_data.current_user_name+'" style="display:none">',a+='<input type="text" value="'+saswp_localize_data.current_user_email+'" name="fields[email]" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">',a+='<input type="text" name="fields[company]" class="form-control" placeholder="Website" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="'+saswp_localize_data.get_home_url+'">',a+='<input type="hidden" name="ml-submit" value="1" />',a+="</div>",a+='<div id="mce-responses">',a+='<div class="response" id="mce-error-response" style="display:none"></div>',a+='<div class="response" id="mce-success-response" style="display:none"></div>',a+="</div>",a+='<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a631df13442f19caede5a5baf_c9a71edce6" tabindex="-1" value=""></div>',a+='<input type="submit" value="Subscribe" name="subscribe" id="pointer-close" class="button mc-newsletter-sent" style=" background: #0085ba; border-color: #006799; padding: 0px 16px; text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799; height: 30px; margin-top: 1px; color: #fff; box-shadow: 0 1px 0 #006799;">',a+="</div>",a+="</form>";var t={content:a+="</div>",position:{edge:"top",align:"left"}};s=function(){e(saswp_localize_data.displayID).pointer(t).pointer("open"),saswp_localize_data.button2&&(jQuery("#pointer-close").after('<a id="pointer-primary" class="button-primary">'+saswp_localize_data.button2+"</a>"),jQuery("#pointer-primary").click(function(){saswp_localize_data.function_name}),jQuery("#pointer-close").click(function(){e.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer222",action:"dismiss-wp-pointer"})}))},(t=e.extend(t,{buttons:function(e,s){return button=jQuery('<a id="pointer-close" class="button-secondary">'+saswp_localize_data.button1+"</a>"),button_2=jQuery("#pointer-close.button"),button.bind("click.pointer",function(){s.element.pointer("close")}),button_2.on("click",function(){s.element.pointer("close")}),button},close:function(){e.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer222",action:"dismiss-wp-pointer"})},show:function(e,s){s.pointer.css({left:"170px",top:"160px"})}})).position&&t.position.defer_loading?e(window).bind("load.wp-pointers",s):s()}function i(s,a){var t=a.replace("-checkbox",""),i=e("#"+t).next("p").text();s.is(":checked")&&""!==i?e("#"+t).next("p").removeClass("saswp_hide"):1==e("#"+t).next("p").attr("data-id")?e("#"+t).next("p").text("This feature is only available in pro version"):e("#"+t).next("p").addClass("saswp_hide")}function o(){e(".saswp-item-reviewed").change(function(s){s.preventDefault();var a="";if(e("select#schema_type option:selected").val()&&(a=e("select#schema_type option:selected").val()),e(".saswp-tab-links.selected").attr("saswp-schema-type")&&(a=e(".saswp-tab-links.selected").attr("saswp-schema-type")),"Review"===a){var t=e(this),i=e(this).val(),o=saswp_localize_data.post_id,n=e(t).attr("data-id"),c=e(t).attr("post-specific");e.get(ajaxurl,{action:"saswp_get_item_reviewed_fields",schema_id:n,post_specific:c,item:i,post_id:o,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){e(t).parent().parent().nextAll().remove(".saswp-review-tr"),e(t).parent().parent().after(s)})}}).change()}function n(){"saswp"!=saswp_localize_data.post_type&&"saswp"!=saswp_localize_data.page_now||"saswp_page_structured_data_options"==saswp_localize_data.page_now||e(".saswp-custom-fields-select2").select2({ajax:{type:"POST",url:ajaxurl,dataType:"json",delay:250,data:function(e){return{saswp_security_nonce:saswp_localize_data.saswp_security_nonce,q:e.term,action:"saswp_get_custom_meta_fields"}},processResults:function(e){return{results:e}},cache:!0},minimumInputLength:2})}function c(){var s="";e("select#schema_type option:selected").val()&&(s=e("select#schema_type option:selected").val()),e(".saswp-tab-links.selected").attr("saswp-schema-type")&&(s=e(".saswp-tab-links.selected").attr("saswp-schema-type")),s&&e(".saswp-enable-rating-review-"+s.toLowerCase()).change(function(){e(this).is(":checked")?e(this).parent().parent().siblings(".saswp-rating-review-"+s.toLowerCase()).show():e(this).parent().parent().siblings(".saswp-rating-review-"+s.toLowerCase()).hide()}).change()}e(".saswp-tabs a").click(function(s){var a=e(this).attr("href"),t=getParameterByName("tab",a);return t||(t="general"),e(this).siblings().removeClass("nav-tab-active"),e(this).addClass("nav-tab-active"),e(".form-wrap").find(".saswp-"+t).siblings().hide(),e(".form-wrap .saswp-"+t).show(),window.history.pushState("","",a),!1}),e(".saswp-schame-type-select").change(function(){e(".saswp-custom-fields-table").html("");var s=e(this).val();e(".saswp-option-table-class tr").each(function(s,a){s>0&&(e(this).hide(),e(this).find("select").attr("disabled",!0))}),"TechArticle"==s||"Article"==s||"Blogposting"==s||"NewsArticle"==s||"WebPage"==s?e(".saswp-enable-speakable").parent().parent().show():e(".saswp-enable-speakable").parent().parent().hide(),"local_business"==s&&(e(".saswp-option-table-class tr").eq(1).show(),e(".saswp-business-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1),e(".select-post-type").val("show_globally").trigger("change")),"Service"==s&&(e(".saswp-service-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Review"==s&&(e(".saswp-review-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1),o()),"Product"==s&&(e(".saswp-product-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==s&&(e(".saswp-event-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"AudioObject"==s&&e(".saswp-audio-text-field-tr").show(),"SoftwareApplication"==s&&e(".saswp-softwareapplication-text-field-tr").show(),e(".saswp-schem-type-note").addClass("saswp_hide"),"qanda"==s&&e(".saswp-schem-type-note").removeClass("saswp_hide"),e(".saswp-job-posting-note").addClass("saswp_hide"),c()}),e("#saswp_business_type").change(function(){var s=e(this).val(),a=e(".saswp-schame-type-select").val();e(".saswp-option-table-class tr").each(function(s,a){s>1&&(e(this).hide(),e(this).find("select").attr("disabled",!0))}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?e(".saswp-enable-speakable").parent().parent().show():e(".saswp-enable-speakable").parent().parent().hide(),"local_business"==a&&(e(".saswp-"+s+"-tr").show(),e(".saswp-business-text-field-tr").show(),e(".saswp-"+s+"-tr").find("select").attr("disabled",!1)),"Service"==a&&(e(".saswp-service-text-field-tr").show(),e(".saswp-service-text-field-tr").find("select").attr("disabled",!1)),"Product"==a&&(e(".saswp-product-text-field-tr").show(),e(".saswp-product-text-field-tr").find("select").attr("disabled",!1)),"AudioObject"==a&&e(".saswp-audio-text-field-tr").show(),"SoftwareApplication"==a&&e(".saswp-softwareapplication-text-field-tr").show(),"Review"==a&&(e(".saswp-review-text-field-tr").show(),e(".saswp-review-text-field-tr").find("select").attr("disabled",!1)),"Event"==a&&(e(".saswp-event-text-field-tr").show(),e(".saswp-event-text-field-tr").find("select").attr("disabled",!1)),c()}).change(),e(".saswp-checkbox").change(function(){var s=e(this).attr("id"),a=e(this);switch(s){case"saswp-for-wordpress-checkbox":e(this).is(":checked")?e("#saswp-for-wordpress").val(1):e("#saswp-for-wordpress").val(0);break;case"saswp-facebook-enable-checkbox":e(this).is(":checked")?(e("#saswp-facebook-enable").val(1),e("#sd_facebook").show()):(e("#saswp-facebook-enable").val(0),e("#sd_facebook").hide());break;case"saswp-twitter-enable-checkbox":e(this).is(":checked")?(e("#saswp-twitter-enable").val(1),e("#sd_twitter").show()):(e("#saswp-twitter-enable").val(0),e("#sd_twitter").hide());break;case"saswp-google-plus-enable-checkbox":e(this).is(":checked")?(e("#saswp-google-plus-enable").val(1),e("#sd_google_plus").show()):(e("#saswp-google-plus-enable").val(0),e("#sd_google_plus").hide());break;case"saswp-instagram-enable-checkbox":e(this).is(":checked")?(e("#saswp-instagram-enable").val(1),e("#sd_instagram").show()):(e("#saswp-instagram-enable").val(0),e("#sd_instagram").hide());break;case"saswp-youtube-enable-checkbox":e(this).is(":checked")?(e("#sd_youtube").show(),e("#saswp-youtube-enable").val(1)):(e("#saswp-youtube-enable").val(0),e("#sd_youtube").hide());break;case"saswp-linkedin-enable-checkbox":e(this).is(":checked")?(e("#saswp-linkedin-enable").val(1),e("#sd_linkedin").show()):(e("#saswp-linkedin-enable").val(0),e("#sd_linkedin").hide());break;case"saswp-pinterest-enable-checkbox":e(this).is(":checked")?(e("#saswp-pinterest-enable").val(1),e("#sd_pinterest").show()):(e("#saswp-pinterest-enable").val(0),e("#sd_pinterest").hide());break;case"saswp-soundcloud-enable-checkbox":e(this).is(":checked")?(e("#saswp-soundcloud-enable").val(1),e("#sd_soundcloud").show()):(e("#saswp-soundcloud-enable").val(0),e("#sd_soundcloud").hide());break;case"saswp-tumblr-enable-checkbox":e(this).is(":checked")?(e("#saswp-tumblr-enable").val(1),e("#sd_tumblr").show()):(e("#saswp-tumblr-enable").val(0),e("#sd_tumblr").hide());break;case"saswp-for-amp-checkbox":e(this).is(":checked")?e("#saswp-for-amp").val(1):e("#saswp-for-amp").val(0);break;case"saswp_kb_contact_1_checkbox":e(this).is(":checked")?(e("#saswp_kb_contact_1").val(1),e("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").removeClass("saswp-display-none")):(e("#saswp_kb_contact_1").val(0),e("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").addClass("saswp-display-none"));break;case"saswp-logo-dimensions-check":e(this).is(":checked")?(e("#saswp-logo-dimensions").val(1),e("#saswp-logo-width, #saswp-logo-height").parent().parent("li").show()):(e("#saswp-logo-dimensions").val(0),e("#saswp-logo-width, #saswp-logo-height").parent().parent("li").hide());break;case"saswp_archive_schema_checkbox":e(this).is(":checked")?(e("#saswp_archive_schema").val(1),e(".saswp_archive_schema_type_class").parent().parent().show()):(e("#saswp_archive_schema").val(0),e(".saswp_archive_schema_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":e(this).is(":checked")?(e("#saswp_website_schema").val(1),e("#saswp_search_box_schema").parent().parent().show()):(e("#saswp_website_schema").val(0),e("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":e(this).is(":checked")?e("#saswp_search_box_schema").val(1):e("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_schema_checkbox":e(this).is(":checked")?e("#saswp_breadcrumb_schema").val(1):e("#saswp_breadcrumb_schema").val(0);break;case"saswp_comments_schema_checkbox":e(this).is(":checked")?e("#saswp_comments_schema").val(1):e("#saswp_comments_schema").val(0);break;case"saswp-compativility-checkbox":e(this).is(":checked")?e("#saswp-flexmlx-compativility").val(1):e("#saswp-flexmlx-compativility").val(0);break;case"saswp-review-module-checkbox":e(this).is(":checked")?e("#saswp-review-module").val(1):e("#saswp-review-module").val(0);break;case"saswp-kk-star-raring-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-kk-star-raring").val(1):e("#saswp-kk-star-raring").val(0);break;case"saswp-woocommerce-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-woocommerce").val(1):e("#saswp-woocommerce").val(0);break;case"saswp-extra-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-extra").val(1):e("#saswp-extra").val(0);break;case"saswp-dw-question-answer-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-dw-question-answer").val(1):e("#saswp-dw-question-answer").val(0);break;case"saswp-wp-job-manager-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-wp-job-manager").val(1):e("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-yoast").val(1):e("#saswp-yoast").val(0);break;case"saswp-rankmath-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-rankmath").val(1):e("#saswp-rankmath").val(0);break;case"saswp-tagyeem-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-tagyeem").val(1):e("#saswp-tagyeem").val(0);break;case"saswp-the-events-calendar-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-the-events-calendar").val(1):e("#saswp-the-events-calendar").val(0);break;case"saswp-woocommerce-booking-checkbox":i(a,s),e(this).is(":checked")?(e("#saswp-woocommerce-booking").val(1),e("#saswp-woocommerce-booking-main").val(1)):(e("#saswp-woocommerce-booking").val(0),e("#saswp-woocommerce-booking-main").val(0));break;case"saswp-woocommerce-booking-main-checkbox":i(a,s),e(this).is(":checked")?(e("#saswp-woocommerce-booking-main").val(1),e("#saswp-woocommerce-booking").val(1)):(e("#saswp-woocommerce-booking-main").val(0),e("#saswp-woocommerce-booking").val(0));break;case"saswp-woocommerce-membership-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-woocommerce-membership").val(1):e("#saswp-woocommerce-membership").val(0);break;case"saswp-defragment-checkbox":e(this).is(":checked")?e("#saswp-defragment").val(1):e("#saswp-defragment").val(0);break;case"saswp-cooked-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-cooked").val(1):e("#saswp-cooked").val(0);break;case"saswp-flexmlx-compativility-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-flexmlx-compativility").val(1):e("#saswp-flexmlx-compativility").val(0);break;case"saswp-google-review-checkbox":e(this).is(":checked")?(e("#saswp-google-review").val(1),e("#saswp-google-rv-free-checkbox").length?(e("#saswp-google-review-free").parent().parent().show(),e("#saswp-google-rv-free-checkbox").is(":checked")?e("#saswp_google_place_api_key").parent().parent().show():e("#saswp_google_place_api_key").parent().parent().hide()):e("#saswp_google_place_api_key").parent().parent().show(),e(".saswp-g-reviews-settings-table").parent().parent().parent().show()):(e("#saswp-google-review").val(0),e("#saswp_google_place_api_key").parent().parent().hide(),e(".saswp-g-reviews-settings-table").parent().parent().parent().hide(),e("#saswp-google-rv-free-checkbox").length&&e("#saswp-google-review-free").parent().parent().hide());break;case"saswp-google-rv-free-checkbox":e("#saswp-google-review-checkbox").is(":checked")&&e(this).is(":checked")?(e("#saswp-google-review-free").val(1),e("#saswp_google_place_api_key").parent().parent().show()):(e("#saswp-google-review-free").val(0),e("#saswp_google_place_api_key").parent().parent().hide());break;case"saswp-markup-footer-checkbox":e(this).is(":checked")?e("#saswp-markup-footer").val(1):e("#saswp-markup-footer").val(0);break;case"saswp-pretty-print-checkbox":e(this).is(":checked")?e("#saswp-pretty-print").val(1):e("#saswp-pretty-print").val(0);break;case"saswp-wppostratings-raring-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-wppostratings-raring").val(1):e("#saswp-wppostratings-raring").val(0);break;case"saswp-bbpress-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-bbpress").val(1):e("#saswp-bbpress").val(0);break;case"saswp-microdata-cleanup-checkbox":e(this).is(":checked")?e("#saswp-microdata-cleanup").val(1):e("#saswp-microdata-cleanup").val(0)}}).change(),e("#saswp_kb_type").change(function(){var s=e(this).val();e(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass("saswp_hide"),e(".saswp_kg_logo").parent().parent().parent().addClass("saswp_hide"),e("#sd-person-image").parent().parent().parent().addClass("saswp_hide"),"Organization"==s&&(e(".saswp_org_fields").parent().parent().removeClass("saswp_hide"),e(".saswp_person_fields").parent().parent().addClass("saswp_hide"),e(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),e("#sd-person-image").parent().parent().parent().addClass("saswp_hide")),"Person"==s&&(e(".saswp_org_fields").parent().parent().addClass("saswp_hide"),e(".saswp_person_fields").parent().parent().removeClass("saswp_hide"),e(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),e("#sd-person-image").parent().parent().parent().removeClass("saswp_hide"))}).change(),e(document).on("click","input[data-id=media]",function(s){s.preventDefault();var a=e(this),t=a.attr("id").replace("_button",""),i=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1,library:{type:"image"}}).on("select",function(){var s=i.state().get("selection").first().toJSON();e("#"+t).val(s.url),e("input[data-id='"+t+"_id']").val(s.id),e("input[data-id='"+t+"_height']").val(s.height),e("input[data-id='"+t+"_width']").val(s.width),e("input[data-id='"+t+"_thumbnail']").val(s.url),"sd_default_image_button"===a.attr("id")&&(e("#sd_default_image_width").val(s.width),e("#sd_default_image_height").val(s.height));var o="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&s.height<1200&&(o='<p class="saswp_warning">Image size is smaller than recommended size</p>'),e(".saswp_image_div_"+t).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+s.url+'"/><a data-id="'+t+'" href="#" class="saswp_prev_close">X</a></div>'+o)}).open()}),e(document).on("click",".saswp_prev_close",function(s){s.preventDefault();var a=e(this).attr("data-id");console.log(a),e(this).parent().remove(),e("#"+a).val(""),e("input[data-id='"+a+"_id']").val(""),e("input[data-id='"+a+"_height']").val(""),e("input[data-id='"+a+"_width']").val(""),e("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(e("#sd_default_image_width").val(""),e("#sd_default_image_height").val(""))}),e(document).on("change",".saswp-schema-type-toggle",function(s){var a=e(this).attr("data-schema-id"),t=e(this).attr("data-post-id");if(e(this).is(":checked"))var i=1;else i=0;e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_enable_disable_schema_on_post",status:i,schema_id:a,post_id:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){},error:function(e){console.log(e)}})}),e(document).on("click",".saswp-reset-data",function(s){s.preventDefault(),1==confirm("Are you sure?")&&e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){setTimeout(function(){location.reload()},1e3)},error:function(e){console.log(e)}})}),e(document).on("click",".saswp_license_activation",function(s){s.preventDefault();var a=e(this);a.addClass("updating-message");var t=e(this).attr("license-status"),i=e(this).attr("add-on"),o=e("#"+i+"_addon_license_key").val();t&&i&&o?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:o,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){e("#"+i+"_addon_license_key_status").val(s.status),"active"==s.status?(e(".saswp-"+i+"-dashicons").addClass("dashicons-yes"),e(".saswp-"+i+"-dashicons").removeClass("dashicons-no-alt"),e(".saswp-"+i+"-dashicons").css("color","green"),e(".saswp_license_activation[add-on='"+i+"']").attr("license-status","inactive"),e(".saswp_license_activation[add-on='"+i+"']").text("Deactivate"),e(".saswp_license_status_msg[add-on='"+i+"']").text("Activated"),e(".saswp_license_status_msg[add-on='"+i+"']").css("color","green"),e(".saswp_license_status_msg[add-on='"+i+"']").text(s.message)):(e(".saswp-"+i+"-dashicons").addClass("dashicons-no-alt"),e(".saswp-"+i+"-dashicons").removeClass("dashicons-yes"),e(".saswp-"+i+"-dashicons").css("color","red"),e(".saswp_license_activation[add-on='"+i+"']").attr("license-status","active"),e(".saswp_license_activation[add-on='"+i+"']").text("Activate"),e(".saswp_license_status_msg[add-on='"+i+"']").css("color","red"),e(".saswp_license_status_msg[add-on='"+i+"']").text(s.message)),a.removeClass("updating-message")},error:function(e){console.log(e)}}):(alert("Please enter value license key"),a.removeClass("updating-message"))}),e(".saswp-send-query").on("click",function(s){s.preventDefault();var a=e("#saswp_query_message").val();""!=e.trim(a)?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_send_query_message",message:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(e(".saswp-query-success").show(),e(".saswp-query-error").hide()):(console.log("dd"),e(".saswp-query-success").hide(),e(".saswp-query-error").show())},error:function(e){console.log(e)}}):alert("Please enter the message")}),e(".saswp-import-plugins").on("click",function(s){s.preventDefault();var a=e(this);a.addClass("updating-message");var t=e(this).attr("data-id");e.get(ajaxurl,{action:"saswp_import_plugin_data",plugin_name:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){"t"==s.status?(e(a).parent().find(".saswp-imported-message").text(s.message),e(a).parent().find(".saswp-imported-message").removeClass("saswp-error"),setTimeout(function(){location.reload()},2e3)):(e(a).parent().find(".saswp-imported-message").addClass("saswp-error"),e(a).parent().find(".saswp-imported-message").text(s.message)),a.removeClass("updating-message")},"json")}),e(".saswp-feedback-no-thanks").on("click",function(s){s.preventDefault(),e.get(ajaxurl,{action:"saswp_feeback_no_thanks"},function(s){"t"==s.status&&e(".saswp-feedback-notice").hide()},"json")}),e(".saswp-feedback-remindme").on("click",function(s){s.preventDefault(),e.get(ajaxurl,{action:"saswp_feeback_remindme"},function(s){"t"==s.status&&e(".saswp-feedback-notice").hide()},"json")}),e(document).on("change",".saswp-local-business-type-select",function(s){s.preventDefault();var a=e(this),t=e(this).val();e.get(ajaxurl,{action:"saswp_get_sub_business_ajax",business_type:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){if("t"==s.status){e(".saswp-local-business-name-select").parents("tr").remove();var t=a.parents(".saswp-post-specific-wrapper").attr("data-id"),i='<tr><th><label for="saswp_business_name_'+t+'">Sub Business Type</label></th>';i+='<td><select class="saswp-local-business-name-select" id="saswp_business_name_'+t+'" name="saswp_business_name_'+t+'">',e.each(s.result,function(e,s){i+='<option value="'+e+'">'+s+"</option>"}),i+="</select></td>",i+="</tr>",a.parents(".form-table tr:first").after(i)}else e(".saswp-local-business-name-select").parents("tr").remove()},"json")}),o(),e(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),e(document).on("click",".saswp-add-custom-schema",function(s){s.preventDefault(),e(".saswp-add-custom-schema-field").removeClass("saswp_hide"),e(this).hide()}),e(document).on("click",".saswp-delete-custom-schema",function(s){s.preventDefault(),e("#saswp_custom_schema_field").val(""),e(".saswp-add-custom-schema-field").addClass("saswp_hide"),e(".saswp-add-custom-schema").show()}),e(".saswp-modify_schema_post_enable").on("click",function(s){var a=e(this);a.addClass("updating-message"),s.preventDefault(),e.get(ajaxurl,{action:"saswp_modify_schema_post_enable",post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){a.remove(),e(".saswp-add-custom-schema-div").remove(),e("#post_specific .inside").append(s),a.removeClass("updating-message"),e(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),saswp_schema_datepicker(),c(),o()})}),saswp_schema_datepicker(),e(".saswp-reviews-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"}),e(document).on("click",".saswp-add-more-item",function(s){s.preventDefault();var a=e(".saswp-review-item-list-table tr").length;console.log(a);e(".saswp-review-item-list-table").append('<tr class="saswp-review-item-tr"><td>Review Item Feature</td><td><input type="text" name="saswp-review-item-feature[]"></td><td>Rating</td><td><input step="0.1" min="0" max="5" type="number" name="saswp-review-item-star-rating[]"></td><td><a type="button" class="saswp-remove-review-item button">x</a></td></tr>')}),e(document).on("click",".saswp-remove-review-item",function(s){s.preventDefault(),e(this).parent().parent("tr").remove()}),e(document).on("focusout",".saswp-review-item-tr input[type=number]",function(s){s.preventDefault();var a=0,t=e(".saswp-review-item-tr input[type=number]").length;e(".saswp-review-item-tr input[type=number]").each(function(s,t){""==e(t).val()?a+=parseFloat(0):a+=parseFloat(e(t).val())});var i=a/t;e("#saswp-review-item-over-all").val(i)}),e("#saswp-review-location").change(function(){var s=e(this).val();e(".saswp-review-shortcode").addClass("saswp_hide"),3==s&&e(".saswp-review-shortcode").removeClass("saswp_hide")}).change(),e("#saswp-review-item-enable").change(function(){e(this).is(":checked")?e(".saswp-review-fields").show():e(".saswp-review-fields").hide()}).change(),e(document).on("click",".saswp-restore-post-schema",function(s){s.preventDefault();var a=e(this);if(a.addClass("updating-message"),e(".saswp-post-specific-schema-ids").val())var t=JSON.parse(e(".saswp-post-specific-schema-ids").val());e.post(ajaxurl,{action:"saswp_restore_schema",schema_ids:t,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status?setTimeout(function(){location.reload()},1e3):(alert(e.msg),setTimeout(function(){location.reload()},1e3)),a.removeClass("updating-message")},"json")}),e(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(s){s.preventDefault();var a=e(this).attr("data-id");e(".saswp-post-specific-wrapper").hide(),e("#"+a).show(),e("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),e("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),e(this).addClass("selected"),e(this).parent().addClass("selected"),c()}),e("#saswp-global-tabs a:first").addClass("saswp-global-selected"),e(".saswp-global-container").hide(),e(".saswp-global-container:first").show(),e("#saswp-global-tabs a").click(function(){var s=e(this).attr("data-id");e(this).hasClass("saswp-global-selected")||(e("#saswp-global-tabs a").removeClass("saswp-global-selected"),e(this).addClass("saswp-global-selected"),e(".saswp-global-container").hide(),e("#"+s).show())}),e("#saswp-tools-tabs a:first").addClass("saswp-global-selected"),e(".saswp-tools-container").hide(),e(".saswp-tools-container:first").show(),e("#saswp-tools-tabs a").click(function(){var s=e(this).attr("data-id");e(this).hasClass("saswp-global-selected")||(e("#saswp-tools-tabs a").removeClass("saswp-global-selected"),e(this).addClass("saswp-global-selected"),e(".saswp-tools-container").hide(),e("#"+s).show())}),e("#saswp-review-tabs a:first").addClass("saswp-global-selected"),e(".saswp-review-container").hide(),e(".saswp-review-container:first").show(),e("#saswp-review-tabs a").click(function(){var s=e(this).attr("data-id");e(this).hasClass("saswp-global-selected")||(e("#saswp-review-tabs a").removeClass("saswp-global-selected"),e(this).addClass("saswp-global-selected"),e(".saswp-review-container").hide(),e("#"+s).show())}),e('a[href="'+saswp_localize_data.new_url_selector+'"]').attr("href",saswp_localize_data.new_url_href),e("#saswp_enable_custom_field").change(function(){e(this).is(":checked")?e(".saswp-custom-fields-div").show():e(".saswp-custom-fields-div").hide()}),e(document).on("change",".saswp-custom-fields-name",function(){e(this).parent().parent("tr").find("td:eq(1)").html("");var s="";s+='<select class="saswp-custom-fields-select2" name="saswp_custom_fields['+e(this).val()+']">',s+="</select>",e(this).parent().parent("tr").find("td:eq(1)").html(s),n()}),e(document).on("click",".saswp-skip-button",function(s){s.preventDefault(),e(this).parent().parent().hide(),e.post(ajaxurl,{action:"saswp_skip_wizard",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){},"json")}),e(document).on("click",".saswp_add_schema_fields_on_fly",function(s){s.preventDefault();var a=e(this).attr("data-id"),t=e(this).attr("fields_type"),i=e(this).attr("div_type"),o=e(".saswp-"+i+"-table-div").length,n=e(".saswp-"+i+"-table-div:nth-child("+o+")").attr("data-id");(n=++n)||(n=0),saswp_get_post_specific_schema_fields(n,t,i,a,t+"_")}),e(document).on("click",".saswp-table-close",function(){e(this).parent().remove()}),e(document).on("click",".saswp-add-custom-fields",function(){var s=e("select#schema_type option:selected").val(),a=e("#post_ID").val();""!=s&&e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:a,schema_type:s,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){if(0!=s.length){var a=0,t="",i="<tr>";i+="<td>",i+='<select class="saswp-custom-fields-name">',e.each(s,function(e,s){0==a&&(t=e),i+='<option value="'+e+'">'+s+"</option>",a++}),i+="</select>",i+="</td>",i+="<td>",i+='<select class="saswp-custom-fields-select2" name="saswp_custom_fields['+t+']">',i+="</select>",i+="</td>",i+="</tr>",e(".saswp-custom-fields-table").append(i),n()}},error:function(e){console.log(e)}})}),n(),c(),e('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),e(document).on("click",".saswp_coonect_google_place",function(){var s=e("#saswp_google_place_id").val(),a=e("#saswp_language_list").val(),t=e("#saswp_googel_api").val();""!=s&&e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:s,language:a,google_api:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){console.log(e.status)},error:function(e){console.log(e)}})}),"saswp"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>"),"undefined"!=typeof saswp_reviews_data&&e(".saswp-rating-div").rateYo({rating:saswp_reviews_data.rating_val,halfStar:!0,readOnly:saswp_reviews_data.readonly,onSet:function(s,a){e(this).next().val(s),console.log(s)}}),e(document).on("click",".saswp-add-g-location-btn",function(s){var a="";a=e("#saswp_google_place_api_key").length?'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="5" step="5" placeholder="5" disabled="disabled">':'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="10" step="10" placeholder="10">',s.preventDefault();var t="";(t+='<tr><td style="width:12%;"><strong>Place Id</strong></td><td style="width:20%;"><input class="saswp-g-location-field" name="sd_data[saswp_reviews_location_name][]" type="text" value=""></td><td style="width:10%;"><strong>Reviews</strong></td><td style="width:10%;">'+a+'</td><td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">Fetch</a></td><td style="width:10%;"><a type="button" class="saswp-remove-review-item button">x</a></td><td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td></tr>')&&e(".saswp-g-reviews-settings-table").append(t)}),e(document).on("click",".saswp-fetch-g-reviews",function(){var s=e(this),a="free";s.addClass("updating-message");var t=e(this).parent().parent().find(".saswp-g-location-field").val(),i=e(this).parent().parent().find(".saswp-g-blocks-field").val(),o=e("#saswp_google_place_api_key").val(),n=e("#reviews_addon_license_key").val(),c=e("#reviews_addon_license_key_status").val();if("premium"==(a=e("#saswp_google_place_api_key").length?"free":"premium")){if(!(i>0))return alert("Blocks value is zero"),s.removeClass("updating-message"),!1;if(0!=i%10)return s.parent().parent().find(".saswp-rv-fetched-msg").text("Reviews count should be in step of 10"),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),s.removeClass("updating-message"),!1}""!=t&&(n||o)?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:c,reviews_api:n,location:t,blocks:i,g_api:o,premium_status:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s.parent().parent().find(".saswp-rv-fetched-msg").text("Success"),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(s.parent().parent().find(".saswp-rv-fetched-msg").text(e.message),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),s.removeClass("updating-message")},error:function(e){console.log(e)}}):(""==t&&alert("Please enter place id"),""==o&&alert("Please enter api key"),""==n&&alert("Please enter reviews api key"),s.removeClass("updating-message"))}),e("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var s=e(this);s.parent().find(".saswp-phone-validation").remove();var a=e(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(a)?s.parent().find(".saswp-phone-validation").remove():s.after('<span style="color:red;" class="saswp-phone-validation">Invalid Phone Number</span>')})});
admin_section/js/saswp-add-new.js CHANGED
@@ -360,7 +360,7 @@ jQuery(document).ready(function($) {
360
  saswp_schema_datepicker();
361
  function saswp_schema_datepicker(){
362
 
363
- $('.saswp-local-schema-datepicker-picker').datepicker({
364
  dateFormat: "yy-mm-dd",
365
  minDate: 0
366
  });
360
  saswp_schema_datepicker();
361
  function saswp_schema_datepicker(){
362
 
363
+ $('.saswp-datepicker-picker').datepicker({
364
  dateFormat: "yy-mm-dd",
365
  minDate: 0
366
  });
admin_section/js/saswp-add-new.min.js CHANGED
@@ -1 +1 @@
1
- var ajaxurl=saswp_add_new_params.ajaxurl,Merlin=function(e){var t={save_logo:function(e){new a(e).init(e)},install_child:function(e){(new ChildTheme).init(e)},activate_license:function(e){(new ActivateLicense).init(e)},install_plugins:function(e){(new PluginManager).init(e)},install_content:function(e){(new ContentManager).init(e)}};function s(){var s=e(".merlin__body"),a=(e(".merlin__body--loading"),e(".merlin__body--exiting"),e("#merlin__drawer-trigger"));drawer_opened="merlin__drawer--open",setTimeout(function(){s.addClass("loaded")},100),a.on("click",function(){s.toggleClass(drawer_opened)}),e(".merlin__button--proceed:not(.merlin__button--closer)").click(function(e){e.preventDefault();var t=this.getAttribute("href");s.addClass("exiting"),setTimeout(function(){window.location=t},400)}),e(".merlin__button--closer").on("click",function(e){s.removeClass(drawer_opened),e.preventDefault();var t=this.getAttribute("href");setTimeout(function(){s.addClass("exiting")},600),setTimeout(function(){window.location=t},1100)}),e(".button-next").on("click",function(s){if(s.preventDefault(),!function(e){var t=jQuery(e);if("yes"==t.data("done-loading"))return!1;t.is("input")||t.is("button");return t.data("done-loading","yes"),t.addClass("merlin__button--loading"),{done:function(){!0,t.attr("disabled",!1)}}}(this))return!1;var a=e(this).data("callback");return!a||void 0===t[a]||(t[a](this),e(".saswp_branding").hide(),!1)})}function a(){var t,s=e(".merlin__body"),a=e("#child-theme-text");function i(e){void 0!==e.done?(setTimeout(function(){a.addClass("lead")},0),setTimeout(function(){a.addClass("success"),a.html(e.message)},600),t()):(a.addClass("lead error"),a.html(e.error))}return{init:function(a){var n;t=function(){setTimeout(function(){e(".merlin__body").addClass("js--finished")},1500),s.removeClass(drawer_opened),setTimeout(function(){e(".merlin__body").addClass("exiting")},3500),setTimeout(function(){window.location.href=a.href},4e3)},n={action:"saswp_add_new_save_steps_data",wpnonce:saswp_add_new_params.wpnonce},jQuery("ul.merlin__drawer--import-content").find("input, select, textarea").each(function(e,t){switch(jQuery(this).attr("type")){case"text":case"hidden":n[jQuery(this).attr("name")]=jQuery(this).val();break;case"checkbox":1==jQuery(this).prop("checked")?n[jQuery(this).attr("name")]=1:n[jQuery(this).attr("name")]=0;break;default:0==jQuery(this).prop("disabled")&&(n[jQuery(this).attr("name")]=jQuery(this).val())}}),jQuery.post(saswp_add_new_params.ajaxurl,n,i).fail(i)}}}return{init:function(){this,e(s)},callback:function(e){console.log(e),console.log(this)}}}(jQuery);Merlin.init(),jQuery(document).ready(function(e){function t(e){if(e.prop("checked")){var t=e.attr("name");t=t.replace("_checkbox",""),e.parent(".social-fields").find("input[type=text]").show()}else e.parent(".social-fields").find("input[type=text]").val("").hide()}function s(){var t="";e("select#schema_type option:selected").val()&&(t=e("select#schema_type option:selected").val()),e(".saswp-tab-links.selected").attr("saswp-schema-type")&&(t=e(".saswp-tab-links.selected").attr("saswp-schema-type")),t&&e(".saswp-enable-rating-review-"+t.toLowerCase()).change(function(){e(this).is(":checked")?e(this).parent().parent().siblings(".saswp-rating-review-"+t.toLowerCase()).show():e(this).parent().parent().siblings(".saswp-rating-review-"+t.toLowerCase()).hide()}).change()}e(".social-fields input[type=checkbox]").change(function(){t(e(this))}),e(".social-fields input[type=checkbox]").each(function(){t(e(this))}),e(".post-type-fields input[type=checkbox]").change(function(){var t=e(this);if(t.prop("checked")){var s=t.attr("name");s=s.replace("_checkbox",""),t.parent(".post-type-fields").find("select#schema_type").show()}else t.parent(".post-type-fields").find("select#schema_type").val("").hide()}),e(".post-type-fields").each(function(){e(this).find("select#schema_type").val("").hide()}),e(".saswp-schame-type-select").change(function(){var t=e(this).val();e(".saswp-option-table-class tr").each(function(t,s){t>0&&(e(this).hide(),e(this).find("select").attr("disabled",!0))}),"TechArticle"==t||"Article"==t||"Blogposting"==t||"NewsArticle"==t||"WebPage"==t?e(".saswp-enable-speakable").parent().parent().show():e(".saswp-enable-speakable").parent().parent().hide(),"local_business"==t&&(e(".saswp-option-table-class tr").eq(1).show(),e(".saswp-business-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1),e(".select-post-type").val("show_globally").trigger("change")),"Service"==t&&(e(".saswp-service-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==t&&(e(".saswp-event-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Product"==t&&(e(".saswp-product-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"AudioObject"==t&&e(".saswp-audio-text-field-tr").show(),"SoftwareApplication"==t&&e(".saswp-softwareapplication-text-field-tr").show(),"Review"==t&&(e(".saswp-review-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),e(".saswp-schem-type-note").addClass("saswp_hide"),"qanda"==t&&e(".saswp-schem-type-note").removeClass("saswp_hide"),e(".saswp-job-posting-note").addClass("saswp_hide"),s()}).change(),e("#saswp_business_type").change(function(){var t=e(this).val(),a=e(".saswp-schame-type-select").val();e(".saswp-option-table-class tr").each(function(t,s){t>1&&(e(this).hide(),e(this).find("select").attr("disabled",!0))}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?e(".saswp-enable-speakable").parent().parent().show():e(".saswp-enable-speakable").parent().parent().hide(),"local_business"==a&&(e(".saswp-"+t+"-tr").show(),e(".saswp-business-text-field-tr").show(),e(".saswp-"+t+"-tr").find("select").attr("disabled",!1)),"Service"==a&&(e(".saswp-service-text-field-tr").show(),e(".saswp-service-text-field-tr").find("select").attr("disabled",!1)),"Event"==a&&(e(".saswp-event-text-field-tr").show(),e(".saswp-service-text-field-tr").find("select").attr("disabled",!1)),"Product"==a&&(e(".saswp-product-text-field-tr").show(),e(".saswp-product-text-field-tr").find("select").attr("disabled",!1)),"AudioObject"==a&&e(".saswp-audio-text-field-tr").show(),"SoftwareApplication"==a&&e(".saswp-softwareapplication-text-field-tr").show(),"Review"==a&&(e(".saswp-review-text-field-tr").show(),e(".saswp-review-text-field-tr").find("select").attr("disabled",!1)),s()}).change(),e(".saswp-local-schema-datepicker-picker").datepicker({dateFormat:"yy-mm-dd",minDate:0}),e("input[data-id=media]").click(function(t){t.preventDefault();var s=e(this).attr("id").replace("_button",""),a=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1}).on("select",function(){var t=a.state().get("selection").first().toJSON();e("#"+s).val(t.url),e("input[data-id='"+s+"_id']").val(t.id),e("input[data-id='"+s+"_height']").val(t.height),e("input[data-id='"+s+"_width']").val(t.width),e("input[data-id='"+s+"_thumbnail']").val(t.url)}).open()}),e("#saswp-dayofweek-opens-time").timepicker({timeFormat:"H:i:s"}),e("#saswp-dayofweek-closes-time").timepicker({timeFormat:"H:i:s"}),s()});
1
+ var ajaxurl=saswp_add_new_params.ajaxurl,Merlin=function(e){var t={save_logo:function(e){new a(e).init(e)},install_child:function(e){(new ChildTheme).init(e)},activate_license:function(e){(new ActivateLicense).init(e)},install_plugins:function(e){(new PluginManager).init(e)},install_content:function(e){(new ContentManager).init(e)}};function s(){var s=e(".merlin__body"),a=(e(".merlin__body--loading"),e(".merlin__body--exiting"),e("#merlin__drawer-trigger"));drawer_opened="merlin__drawer--open",setTimeout(function(){s.addClass("loaded")},100),a.on("click",function(){s.toggleClass(drawer_opened)}),e(".merlin__button--proceed:not(.merlin__button--closer)").click(function(e){e.preventDefault();var t=this.getAttribute("href");s.addClass("exiting"),setTimeout(function(){window.location=t},400)}),e(".merlin__button--closer").on("click",function(e){s.removeClass(drawer_opened),e.preventDefault();var t=this.getAttribute("href");setTimeout(function(){s.addClass("exiting")},600),setTimeout(function(){window.location=t},1100)}),e(".button-next").on("click",function(s){if(s.preventDefault(),!function(e){var t=jQuery(e);if("yes"==t.data("done-loading"))return!1;t.is("input")||t.is("button");return t.data("done-loading","yes"),t.addClass("merlin__button--loading"),{done:function(){!0,t.attr("disabled",!1)}}}(this))return!1;var a=e(this).data("callback");return!a||void 0===t[a]||(t[a](this),e(".saswp_branding").hide(),!1)})}function a(){var t,s=e(".merlin__body"),a=e("#child-theme-text");function i(e){void 0!==e.done?(setTimeout(function(){a.addClass("lead")},0),setTimeout(function(){a.addClass("success"),a.html(e.message)},600),t()):(a.addClass("lead error"),a.html(e.error))}return{init:function(a){var n;t=function(){setTimeout(function(){e(".merlin__body").addClass("js--finished")},1500),s.removeClass(drawer_opened),setTimeout(function(){e(".merlin__body").addClass("exiting")},3500),setTimeout(function(){window.location.href=a.href},4e3)},n={action:"saswp_add_new_save_steps_data",wpnonce:saswp_add_new_params.wpnonce},jQuery("ul.merlin__drawer--import-content").find("input, select, textarea").each(function(e,t){switch(jQuery(this).attr("type")){case"text":case"hidden":n[jQuery(this).attr("name")]=jQuery(this).val();break;case"checkbox":1==jQuery(this).prop("checked")?n[jQuery(this).attr("name")]=1:n[jQuery(this).attr("name")]=0;break;default:0==jQuery(this).prop("disabled")&&(n[jQuery(this).attr("name")]=jQuery(this).val())}}),jQuery.post(saswp_add_new_params.ajaxurl,n,i).fail(i)}}}return{init:function(){this,e(s)},callback:function(e){console.log(e),console.log(this)}}}(jQuery);Merlin.init(),jQuery(document).ready(function(e){function t(e){if(e.prop("checked")){var t=e.attr("name");t=t.replace("_checkbox",""),e.parent(".social-fields").find("input[type=text]").show()}else e.parent(".social-fields").find("input[type=text]").val("").hide()}function s(){var t="";e("select#schema_type option:selected").val()&&(t=e("select#schema_type option:selected").val()),e(".saswp-tab-links.selected").attr("saswp-schema-type")&&(t=e(".saswp-tab-links.selected").attr("saswp-schema-type")),t&&e(".saswp-enable-rating-review-"+t.toLowerCase()).change(function(){e(this).is(":checked")?e(this).parent().parent().siblings(".saswp-rating-review-"+t.toLowerCase()).show():e(this).parent().parent().siblings(".saswp-rating-review-"+t.toLowerCase()).hide()}).change()}e(".social-fields input[type=checkbox]").change(function(){t(e(this))}),e(".social-fields input[type=checkbox]").each(function(){t(e(this))}),e(".post-type-fields input[type=checkbox]").change(function(){var t=e(this);if(t.prop("checked")){var s=t.attr("name");s=s.replace("_checkbox",""),t.parent(".post-type-fields").find("select#schema_type").show()}else t.parent(".post-type-fields").find("select#schema_type").val("").hide()}),e(".post-type-fields").each(function(){e(this).find("select#schema_type").val("").hide()}),e(".saswp-schame-type-select").change(function(){var t=e(this).val();e(".saswp-option-table-class tr").each(function(t,s){t>0&&(e(this).hide(),e(this).find("select").attr("disabled",!0))}),"TechArticle"==t||"Article"==t||"Blogposting"==t||"NewsArticle"==t||"WebPage"==t?e(".saswp-enable-speakable").parent().parent().show():e(".saswp-enable-speakable").parent().parent().hide(),"local_business"==t&&(e(".saswp-option-table-class tr").eq(1).show(),e(".saswp-business-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1),e(".select-post-type").val("show_globally").trigger("change")),"Service"==t&&(e(".saswp-service-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==t&&(e(".saswp-event-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Product"==t&&(e(".saswp-product-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"AudioObject"==t&&e(".saswp-audio-text-field-tr").show(),"SoftwareApplication"==t&&e(".saswp-softwareapplication-text-field-tr").show(),"Review"==t&&(e(".saswp-review-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),e(".saswp-schem-type-note").addClass("saswp_hide"),"qanda"==t&&e(".saswp-schem-type-note").removeClass("saswp_hide"),e(".saswp-job-posting-note").addClass("saswp_hide"),s()}).change(),e("#saswp_business_type").change(function(){var t=e(this).val(),a=e(".saswp-schame-type-select").val();e(".saswp-option-table-class tr").each(function(t,s){t>1&&(e(this).hide(),e(this).find("select").attr("disabled",!0))}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?e(".saswp-enable-speakable").parent().parent().show():e(".saswp-enable-speakable").parent().parent().hide(),"local_business"==a&&(e(".saswp-"+t+"-tr").show(),e(".saswp-business-text-field-tr").show(),e(".saswp-"+t+"-tr").find("select").attr("disabled",!1)),"Service"==a&&(e(".saswp-service-text-field-tr").show(),e(".saswp-service-text-field-tr").find("select").attr("disabled",!1)),"Event"==a&&(e(".saswp-event-text-field-tr").show(),e(".saswp-service-text-field-tr").find("select").attr("disabled",!1)),"Product"==a&&(e(".saswp-product-text-field-tr").show(),e(".saswp-product-text-field-tr").find("select").attr("disabled",!1)),"AudioObject"==a&&e(".saswp-audio-text-field-tr").show(),"SoftwareApplication"==a&&e(".saswp-softwareapplication-text-field-tr").show(),"Review"==a&&(e(".saswp-review-text-field-tr").show(),e(".saswp-review-text-field-tr").find("select").attr("disabled",!1)),s()}).change(),e(".saswp-datepicker-picker").datepicker({dateFormat:"yy-mm-dd",minDate:0}),e("input[data-id=media]").click(function(t){t.preventDefault();var s=e(this).attr("id").replace("_button",""),a=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1}).on("select",function(){var t=a.state().get("selection").first().toJSON();e("#"+s).val(t.url),e("input[data-id='"+s+"_id']").val(t.id),e("input[data-id='"+s+"_height']").val(t.height),e("input[data-id='"+s+"_width']").val(t.width),e("input[data-id='"+s+"_thumbnail']").val(t.url)}).open()}),e("#saswp-dayofweek-opens-time").timepicker({timeFormat:"H:i:s"}),e("#saswp-dayofweek-closes-time").timepicker({timeFormat:"H:i:s"}),s()});
admin_section/settings.php CHANGED
@@ -30,10 +30,17 @@ function saswp_plugin_action_links( $links ) {
30
  function saswp_add_menu_links() {
31
  // Settings page - Same as main menu page
32
  add_submenu_page( 'edit.php?post_type=saswp', esc_html__( 'Schema & Structured Data For Wp', 'schema-and-structured-data-for-wp' ), esc_html__( 'Settings', 'schema-and-structured-data-for-wp' ), 'manage_options', 'structured_data_options', 'saswp_admin_interface_render' );
 
33
 
34
  }
35
  add_action( 'admin_menu', 'saswp_add_menu_links' );
36
 
 
 
 
 
 
 
37
  function saswp_admin_interface_render(){
38
  // Authentication
39
  if ( ! current_user_can( 'manage_options' ) ) {
@@ -106,6 +113,13 @@ function saswp_admin_interface_render(){
106
  echo "</div>";
107
 
108
  echo "<div class='saswp-review' ".( $tab != 'review' ? 'style="display:none;"' : '').">";
 
 
 
 
 
 
 
109
  // Status
110
  do_settings_sections( 'saswp_review_section' ); // Page slug
111
  echo "</div>";
@@ -326,18 +340,23 @@ function saswp_handle_file_upload($option){
326
  return $option;
327
  }
328
 
329
- $fileInfo = wp_check_filetype(basename($_FILES['saswp_import_backup']['name']));
330
-
331
- if (!empty($fileInfo['ext']) && $fileInfo['ext'] == 'json') {
332
-
333
- if(!empty($_FILES["saswp_import_backup"]["tmp_name"])){
334
-
335
- $urls = wp_handle_upload($_FILES["saswp_import_backup"], array('test_form' => FALSE));
336
- $url = $urls["url"];
337
- update_option('saswp-file-upload_url',esc_url($url));
338
 
339
- }
340
- }
 
 
 
 
 
 
 
 
 
 
 
341
  return $option;
342
 
343
  }
@@ -346,7 +365,17 @@ function saswp_handle_file_upload($option){
346
  function saswp_premium_features_callback(){ ?>
347
  <div class="saswp-pre-ftrs-wrap">
348
  <ul class="saswp-features-blocks">
349
- <li><a target="_blank" href="http://structured-data-for-wp.com/extensions/woocommerce-compatibility-for-schema/">
 
 
 
 
 
 
 
 
 
 
350
  <div class="saswp-features-ele">
351
  <div class="saswp-ele-ic saswp-ele-1">
352
  <img src="<?php echo SASWP_PLUGIN_URL; ?>/admin_section/images/woocommerce-icon.png">
@@ -358,19 +387,26 @@ function saswp_premium_features_callback(){ ?>
358
  </div>
359
  <div class="saswp-sts-btn">
360
 
 
 
 
 
 
 
361
  <?php
362
 
363
- if(is_plugin_active('woocommerce-compatibility-for-schema/woocommerce-compatibility-for-schema.php')){
364
- echo '<label class="saswp-sts-txt">Status :<span>Active</span></label>';
365
- }else{
366
- echo '<label class="saswp-sts-txt">Status :<span>Inactive</span></label>';
367
- echo '<span class="saswp-d-btn">Download</span>';
 
 
368
  }
369
 
370
- ?>
371
- </div>
372
- </a></li>
373
- <li><a target="_blank" href="http://structured-data-for-wp.com/extensions/cooked-compatibility-for-schema/">
374
  <div class="saswp-features-ele">
375
  <div class="saswp-ele-ic saswp-ele-2">
376
  <img src="<?php echo SASWP_PLUGIN_URL; ?>/admin_section/images/cooked-schema-wp.png">
@@ -382,18 +418,10 @@ function saswp_premium_features_callback(){ ?>
382
  </div>
383
  <div class="saswp-sts-btn">
384
 
385
- <?php
386
-
387
- if(is_plugin_active('cooked-compatibility-for-schema/cooked-compatibility-for-schema.php')){
388
- echo '<label class="saswp-sts-txt">Status :<span>Active</span></label>';
389
- }else{
390
- echo '<label class="saswp-sts-txt">Status :<span>Inactive</span></label>';
391
- echo '<span class="saswp-d-btn">Download</span>';
392
- }
393
-
394
- ?>
395
  </div>
396
- </a></li>
397
  </ul>
398
  </div>
399
 
@@ -403,7 +431,7 @@ function saswp_premium_features_callback(){ ?>
403
  function saswp_services_callback(){ ?>
404
  <div class="saswp-pre-ftrs-wrap">
405
  <ul class="saswp-features-blocks">
406
- <li><a target="_blank" href="http://structured-data-for-wp.com/services/google-news-schema-setup/">
407
  <div class="saswp-features-ele">
408
  <div class="saswp-ele-ic saswp-ele-3">
409
  <img src="<?php echo SASWP_PLUGIN_URL; ?>/admin_section/images/news.png">
@@ -413,12 +441,14 @@ function saswp_services_callback(){ ?>
413
  <p><?php echo esc_html__('Get quick approval to Google News with our service. Our structured data experts will set up the Google News schema properly on your website.','schema-and-structured-data-for-wp') ?></p>
414
  </div>
415
  </div>
416
- <div class="saswp-sts-btn">
417
- <label class="saswp-sts-txt"><?php echo esc_html__('Staus:','schema-and-structured-data-for-wp') ?><span><?php echo esc_html__('Inactive','schema-and-structured-data-for-wp') ?></span></label>
418
- <span class="saswp-d-btn"><?php echo esc_html__('Download','schema-and-structured-data-for-wp') ?></span>
419
  </div>
420
- </a></li>
421
- <li><a target="_blank" href="http://structured-data-for-wp.com/services/structured-data-setup-error-clean-up/">
 
 
422
  <div class="saswp-features-ele">
423
  <div class="saswp-ele-ic saswp-ele-4">
424
  <img src="<?php echo SASWP_PLUGIN_URL; ?>/admin_section/images/schema-setup-icon.png">
@@ -428,11 +458,13 @@ function saswp_services_callback(){ ?>
428
  <p><?php echo esc_html__('We will help you setup Schema and Structured data on your website as per your requirements and as per recommendation by our expert developers.','schema-and-structured-data-for-wp') ?></p>
429
  </div>
430
  </div>
431
- <div class="saswp-sts-btn">
432
- <label class="saswp-sts-txt"><?php echo esc_html__('Staus:','schema-and-structured-data-for-wp') ?><span><?php echo esc_html__('Inactive','schema-and-structured-data-for-wp') ?></span></label>
433
- <span class="saswp-d-btn"><?php echo esc_html__('Download','schema-and-structured-data-for-wp') ?></span>
434
- </div>
435
- </a></li>
 
 
436
  </ul>
437
  </div>
438
 
@@ -453,8 +485,7 @@ function saswp_amp_page_callback(){
453
  'name' => 'sd_data[saswp-for-amp]',
454
  )
455
  ) ;
456
-
457
-
458
  if ( is_plugin_active('accelerated-mobile-pages/accelerated-moblie-pages.php') || is_plugin_active('amp/amp.php') ) {
459
  }else{
460
 
@@ -490,10 +521,10 @@ function saswp_amp_page_callback(){
490
  }
491
 
492
  function saswp_general_page_callback(){
493
-
494
  $settings = saswp_defaultSettings();
495
  $field_objs = new saswp_fields_generator();
496
- $locations = get_nav_menu_locations();
497
 
498
  $meta_fields_default = array(
499
  array(
@@ -566,17 +597,24 @@ function saswp_general_page_callback(){
566
  )
567
 
568
  );
569
- if($locations){
 
 
 
 
 
 
 
 
 
 
570
  $meta_fields_default[] = array(
571
  'label' => 'Site Navigation Menu',
572
- 'id' => 'saswp_site_navigation_menu_checkbox',
573
- 'name' => 'saswp_site_navigation_menu_checkbox',
574
- 'type' => 'checkbox',
575
- 'class' => 'checkbox saswp-checkbox',
576
- 'hidden' => array(
577
- 'id' => 'saswp_site_navigation_menu',
578
- 'name' => 'sd_data[saswp_site_navigation_menu]',
579
- )
580
  );
581
  }
582
  ?>
@@ -638,7 +676,7 @@ function saswp_general_page_callback(){
638
  <?php
639
 
640
  echo '<div class="saswp-archive-div">';
641
- $field_objs->saswp_field_generator($meta_fields_default, $settings, 'general');
642
  echo '</div>';
643
 
644
  ?>
@@ -1226,43 +1264,7 @@ function saswp_import_callback(){
1226
  }
1227
 
1228
  echo '<li>';
1229
- echo '<div class="saswp-tools-field-title">';
1230
-
1231
- echo '<div class="" style="display:inline-block">';
1232
- echo '<strong>'.esc_html__(''.$on.' Compatibility For Schema','schema-and-structured-data-for-wp').'</strong>';
1233
- echo '</div>';
1234
-
1235
- if($license_status == 'active'){
1236
-
1237
- echo '<span class="dashicons dashicons-yes saswp-'.strtolower($on).'-dashicons" style="color: #46b450;"></span>';
1238
-
1239
- }else{
1240
-
1241
- echo '<span class="dashicons dashicons-no-alt saswp-'.strtolower($on).'-dashicons" style="color: #dc3232;"></span>';
1242
-
1243
- }
1244
-
1245
- echo '<input type="text" placeholder="Enter License Key" id="'.strtolower($on).'_addon_license_key" name="sd_data['.strtolower($on).'_addon_license_key]" value="'.esc_attr($license_key).'">';
1246
-
1247
- echo '<input type="hidden" id="'.strtolower($on).'_addon_license_key_status" name="sd_data['.strtolower($on).'_addon_license_key_status]" value="'.esc_attr($license_status).'">';
1248
-
1249
- if($license_status == 'active'){
1250
-
1251
- echo '<a license-status="inactive" add-on="'.strtolower($on).'" class="button button-default saswp_license_activation">'.esc_html__('Deactivate', 'schema-and-structured-data-for-wp').'</a>';
1252
-
1253
- }else{
1254
-
1255
- echo '<a license-status="active" add-on="'.strtolower($on).'" class="button button-default saswp_license_activation">'.esc_html__('Activate', 'schema-and-structured-data-for-wp').'</a>';
1256
-
1257
- }
1258
-
1259
- if($license_status_msg !='active'){
1260
- echo '<p style="color:red;" add-on="'.strtolower($on).'" class="saswp_license_status_msg">'.$license_status_msg.'</p>';
1261
- }
1262
-
1263
- echo '<p>'.esc_html__('Enter your '.$on.' addon license key to activate updates & support.','schema-and-structured-data-for-wp').'</p>';
1264
-
1265
- echo '</div>';
1266
  echo '</li>';
1267
 
1268
  }
@@ -1291,8 +1293,7 @@ function saswp_import_callback(){
1291
  $translation = $settings[$key];
1292
  }else{
1293
  $translation = $val;
1294
- }
1295
-
1296
  echo '<tr>'
1297
  . '<td><strong>'.esc_attr($val).'</strong></td>'
1298
  . '<td><input class="regular-text" type="text" name="sd_data['.esc_attr($key).']" value="'. esc_attr($translation).'"></td>'
@@ -1315,23 +1316,68 @@ function saswp_import_callback(){
1315
 
1316
  }
1317
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1318
  function saswp_review_page_callback(){
1319
 
1320
  $settings = saswp_defaultSettings();
1321
  $field_objs = new saswp_fields_generator();
1322
- $meta_fields = array(
1323
- array(
1324
- 'label' => 'Review Module',
1325
- 'id' => 'saswp-review-module-checkbox',
1326
- 'name' => 'saswp-review-module-checkbox',
1327
- 'type' => 'checkbox',
1328
- 'class' => 'checkbox saswp-checkbox',
1329
- 'note' => 'This option enables the review metabox on every post/page. <a target="_blank" href="http://structured-data-for-wp.com/docs/article/how-to-use-review-in-schema-and-structure-data/">Learn More</a>',
1330
- 'hidden' => array(
1331
- 'id' => 'saswp-review-module',
1332
- 'name' => 'sd_data[saswp-review-module]',
1333
- )
1334
- ),
1335
  array(
1336
  'label' => 'Google Review',
1337
  'id' => 'saswp-google-review-checkbox',
@@ -1343,18 +1389,76 @@ function saswp_review_page_callback(){
1343
  'id' => 'saswp-google-review',
1344
  'name' => 'sd_data[saswp-google-review]',
1345
  )
1346
- ),
1347
  array(
1348
  'label' => 'Google place API Key',
1349
  'id' => 'saswp_google_place_api_key',
1350
  'name' => 'sd_data[saswp_google_place_api_key]',
1351
- 'note' => 'How to get place API Key ? <a target="_blank" href="https://structured-data-for-wp.com/docs/article/how-to-display-google-review/">Click Here</a>',
1352
  'class' => '',
1353
  'type' => 'text',
1354
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1355
 
1356
- );
1357
- $field_objs->saswp_field_generator($meta_fields, $settings);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1358
  }
1359
 
1360
  function saswp_email_schema_callback(){
@@ -1416,6 +1520,7 @@ function saswp_compatibility_page_callback(){
1416
  'name' => 'saswp-the-events-calendar-checkbox',
1417
  'type' => 'checkbox',
1418
  'class' => 'checkbox saswp-checkbox',
 
1419
  'hidden' => array(
1420
  'id' => 'saswp-the-events-calendar',
1421
  'name' => 'sd_data[saswp-the-events-calendar]',
@@ -1429,6 +1534,7 @@ function saswp_compatibility_page_callback(){
1429
  'name' => 'saswp-kk-star-raring-checkbox',
1430
  'type' => 'checkbox',
1431
  'class' => 'checkbox saswp-checkbox',
 
1432
  'hidden' => array(
1433
  'id' => 'saswp-kk-star-raring',
1434
  'name' => 'sd_data[saswp-kk-star-raring]',
@@ -1440,6 +1546,7 @@ function saswp_compatibility_page_callback(){
1440
  'name' => 'saswp-wppostratings-raring-checkbox',
1441
  'type' => 'checkbox',
1442
  'class' => 'checkbox saswp-checkbox',
 
1443
  'hidden' => array(
1444
  'id' => 'saswp-wppostratings-raring',
1445
  'name' => 'sd_data[saswp-wppostratings-raring]',
@@ -1451,6 +1558,7 @@ function saswp_compatibility_page_callback(){
1451
  'name' => 'saswp-woocommerce-checkbox',
1452
  'type' => 'checkbox',
1453
  'class' => 'checkbox saswp-checkbox',
 
1454
  'hidden' => array(
1455
  'id' => 'saswp-woocommerce',
1456
  'name' => 'sd_data[saswp-woocommerce]',
@@ -1474,6 +1582,7 @@ function saswp_compatibility_page_callback(){
1474
  'name' => 'saswp-cooked-checkbox',
1475
  'type' => 'checkbox',
1476
  'class' => 'checkbox saswp-checkbox',
 
1477
  'hidden' => array(
1478
  'id' => 'saswp-cooked',
1479
  'name' => 'sd_data[saswp-cooked]',
@@ -1509,6 +1618,7 @@ function saswp_compatibility_page_callback(){
1509
  'name' => 'saswp-dw-question-answer-checkbox',
1510
  'type' => 'checkbox',
1511
  'class' => 'checkbox saswp-checkbox',
 
1512
  'hidden' => array(
1513
  'id' => 'saswp-dw-question-answer',
1514
  'name' => 'sd_data[saswp-dw-question-answer]',
@@ -1521,6 +1631,7 @@ function saswp_compatibility_page_callback(){
1521
  'name' => 'saswp-bbpress-checkbox',
1522
  'type' => 'checkbox',
1523
  'class' => 'checkbox saswp-checkbox',
 
1524
  'hidden' => array(
1525
  'id' => 'saswp-bbpress',
1526
  'name' => 'sd_data[saswp-bbpress]',
@@ -1532,6 +1643,7 @@ function saswp_compatibility_page_callback(){
1532
  'id' => 'saswp-yoast-checkbox',
1533
  'name' => 'saswp-yoast-checkbox',
1534
  'type' => 'checkbox',
 
1535
  'class' => 'checkbox saswp-checkbox',
1536
  'hidden' => array(
1537
  'id' => 'saswp-yoast',
@@ -1544,49 +1656,20 @@ function saswp_compatibility_page_callback(){
1544
  'name' => 'saswp-rankmath-checkbox',
1545
  'type' => 'checkbox',
1546
  'class' => 'checkbox saswp-checkbox',
 
1547
  'hidden' => array(
1548
  'id' => 'saswp-rankmath',
1549
  'name' => 'sd_data[saswp-rankmath]',
1550
  )
1551
- );
1552
-
 
1553
  if(!is_plugin_active('taqyeem/taqyeem.php') || get_template() != 'jannah' ){
1554
 
1555
  $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>';
1556
 
1557
  }
1558
 
1559
- if(!is_plugin_active('bbpress/bbpress.php')){
1560
-
1561
- $bbpress['note'] = esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/bbpress/">bbPress</a>';
1562
-
1563
- }
1564
-
1565
-
1566
- if(!is_plugin_active('wordpress-seo/wp-seo.php') && !is_plugin_active('wordpress-seo-premium/wp-seo-premium.php')){
1567
-
1568
- $yoast['note'] = esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wordpress-seo/">Yoast SEO</a>';
1569
-
1570
-
1571
- }
1572
- if(!is_plugin_active('seo-by-rank-math/rank-math.php') && !is_plugin_active('seo-by-rank-math-premium/rank-math-premium.php')){
1573
-
1574
- $rankmath['note'] = esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/seo-by-rank-math/">WordPress SEO Plugin – Rank Math</a>';
1575
-
1576
-
1577
- }
1578
-
1579
- if(!is_plugin_active('kk-star-ratings/index.php')){
1580
-
1581
- $kk_star['note'] = esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/kk-star-ratings/">kk Star Rating</a>';
1582
-
1583
- }
1584
-
1585
- if(!is_plugin_active('woocommerce/woocommerce.php')){
1586
-
1587
- $woocommerce['note'] = esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/woocommerce/">Woocommerce</a>';
1588
-
1589
- }
1590
  if(!is_plugin_active('woocommerce/woocommerce.php') || !is_plugin_active('woocommerce-bookings/woocommerce-bookings.php')){
1591
 
1592
  $woocommerce_bok['note'] = esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/woocommerce/">Woocommerce</a>';
@@ -1605,24 +1688,13 @@ function saswp_compatibility_page_callback(){
1605
  $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>';
1606
 
1607
  }
1608
-
1609
- if(!is_plugin_active('woocommerce-compatibility-for-schema/woocommerce-compatibility-for-schema.php')){
1610
-
1611
- $woocommerce_mem['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>';
1612
-
1613
- }
1614
-
1615
 
1616
  if(!is_plugin_active('cooked-compatibility-for-schema/cooked-compatibility-for-schema.php')){
1617
 
1618
  $cooked['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="http://structured-data-for-wp.com/cooked-compatibility-for-schema/">Cooked Addon</a>';
1619
 
1620
  }
1621
-
1622
- if(is_plugin_active('cooked/cooked.php') || is_plugin_active('cooked-pro/cooked-pro.php')){
1623
- }else{
1624
- $cooked['note'] = esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/cooked/">Cooked</a>';
1625
- }
1626
 
1627
  if(get_template() != 'Extra'){
1628
 
@@ -1630,26 +1702,7 @@ function saswp_compatibility_page_callback(){
1630
 
1631
 
1632
  }
1633
-
1634
- if(!is_plugin_active('dw-question-answer/dw-question-answer.php') && !is_plugin_active('dw-question-answer-pro/dw-question-answer.php')){
1635
-
1636
- $dwquestiton['note'] = esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/dw-question-answer/">DW Question Answer</a>';
1637
-
1638
- }
1639
-
1640
- if(!is_plugin_active('wp-postratings/wp-postratings.php')){
1641
-
1642
- $wppostratings['note'] = esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-postratings/">WP-PostRatings</a>';
1643
-
1644
- }
1645
-
1646
- if(!is_plugin_active('the-events-calendar/the-events-calendar.php')){
1647
-
1648
- $the_events_calendar['note'] = esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/the-events-calendar/">The Events Calendar</a>';
1649
-
1650
- }
1651
-
1652
-
1653
  $field_objs = new saswp_fields_generator();
1654
 
1655
  $meta_fields = array(
@@ -1770,7 +1823,7 @@ function saswp_compatibility_page_callback(){
1770
 
1771
 
1772
  function saswp_support_page_callback(){
1773
-
1774
  ?>
1775
  <div class="saswp_support_div">
1776
  <strong><?php echo esc_html__('If you have any query, please write the query in below box or email us at', 'schema-and-structured-data-for-wp') ?> <a href="mailto:team@ampforwp.com">team@ampforwp.com</a>. <?php echo esc_html__('We will reply to your email address shortly', 'schema-and-structured-data-for-wp') ?></strong>
@@ -1855,4 +1908,26 @@ function saswp_enqueue_style_js( $hook ) {
1855
 
1856
  wp_enqueue_style( 'saswp-main-css', SASWP_PLUGIN_URL . 'admin_section/css/main-style.min.css', false , SASWP_VERSION );
1857
  }
1858
- add_action( 'admin_enqueue_scripts', 'saswp_enqueue_style_js' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  function saswp_add_menu_links() {
31
  // Settings page - Same as main menu page
32
  add_submenu_page( 'edit.php?post_type=saswp', esc_html__( 'Schema & Structured Data For Wp', 'schema-and-structured-data-for-wp' ), esc_html__( 'Settings', 'schema-and-structured-data-for-wp' ), 'manage_options', 'structured_data_options', 'saswp_admin_interface_render' );
33
+ add_submenu_page( 'edit.php?post_type=saswp', esc_html__( 'Schema & Structured Data For Wp', 'schema-and-structured-data-for-wp' ), '<span style="color:#fff176;">'.esc_html__( 'Upgrade To Premium', 'schema-and-structured-data-for-wp' ).'</span>', 'manage_options', 'structured_data_premium', 'saswp_premium_interface_render' );
34
 
35
  }
36
  add_action( 'admin_menu', 'saswp_add_menu_links' );
37
 
38
+ function saswp_premium_interface_render(){
39
+
40
+ wp_redirect( 'https://structured-data-for-wp.com/pricing/' );
41
+ exit;
42
+
43
+ }
44
  function saswp_admin_interface_render(){
45
  // Authentication
46
  if ( ! current_user_can( 'manage_options' ) ) {
113
  echo "</div>";
114
 
115
  echo "<div class='saswp-review' ".( $tab != 'review' ? 'style="display:none;"' : '').">";
116
+
117
+ echo '<div id="saswp-review-tabs" style="margin-top: 10px;">';
118
+
119
+ echo '<a data-id="saswp-review-reviews-container">'.esc_html__('Reviews Module','schema-and-structured-data-for-wp').'</a> | <a data-id="saswp-review-rating-container">'.esc_html__('Rating Module','schema-and-structured-data-for-wp').'</a>';
120
+
121
+ echo'</div> ';
122
+
123
  // Status
124
  do_settings_sections( 'saswp_review_section' ); // Page slug
125
  echo "</div>";
340
  return $option;
341
  }
342
 
343
+ if(isset($_FILES['saswp_import_backup'])){
344
+
345
+ $fileInfo = wp_check_filetype(basename($_FILES['saswp_import_backup']['name']));
 
 
 
 
 
 
346
 
347
+ if (!empty($fileInfo['ext']) && $fileInfo['ext'] == 'json') {
348
+
349
+ if(!empty($_FILES["saswp_import_backup"]["tmp_name"])){
350
+
351
+ $urls = wp_handle_upload($_FILES["saswp_import_backup"], array('test_form' => FALSE));
352
+ $url = $urls["url"];
353
+ update_option('saswp-file-upload_url',esc_url($url));
354
+
355
+ }
356
+ }
357
+
358
+ }
359
+
360
  return $option;
361
 
362
  }
365
  function saswp_premium_features_callback(){ ?>
366
  <div class="saswp-pre-ftrs-wrap">
367
  <ul class="saswp-features-blocks">
368
+ <li>
369
+ <?php
370
+ $woocommerce_active_text = '';
371
+ if(is_plugin_active('woocommerce-compatibility-for-schema/woocommerce-compatibility-for-schema.php')){
372
+ $woocommerce_active_text = '<label class="saswp-sts-txt">Status :<span style="color:green">Active</span></label>'; ;
373
+ }else{
374
+ $woocommerce_active_text .= '<label class="saswp-sts-txt">Status :<span>Inactive</span></label>';
375
+ $woocommerce_active_text .= '<a target="_blank" href="http://structured-data-for-wp.com/extensions/woocommerce-compatibility-for-schema/"><span class="saswp-d-btn">Download</span></a>';
376
+ }
377
+
378
+ ?>
379
  <div class="saswp-features-ele">
380
  <div class="saswp-ele-ic saswp-ele-1">
381
  <img src="<?php echo SASWP_PLUGIN_URL; ?>/admin_section/images/woocommerce-icon.png">
387
  </div>
388
  <div class="saswp-sts-btn">
389
 
390
+ <?php echo $woocommerce_active_text; ?>
391
+
392
+ </div>
393
+ </li>
394
+ <li>
395
+
396
  <?php
397
 
398
+ $cooked_active_text = '';
399
+
400
+ if(is_plugin_active('cooked-compatibility-for-schema/cooked-compatibility-for-schema.php')){
401
+ $cooked_active_text = '<label class="saswp-sts-txt">Status :<span style="color:green;">Active</span></label>';
402
+ }else{
403
+ $cooked_active_text .='<label class="saswp-sts-txt">Status :<span>Inactive</span></label>';
404
+ $cooked_active_text .='<a target="_blank" href="http://structured-data-for-wp.com/extensions/cooked-compatibility-for-schema/"><span class="saswp-d-btn">Download</span></a>';
405
  }
406
 
407
+ ?>
408
+
409
+
 
410
  <div class="saswp-features-ele">
411
  <div class="saswp-ele-ic saswp-ele-2">
412
  <img src="<?php echo SASWP_PLUGIN_URL; ?>/admin_section/images/cooked-schema-wp.png">
418
  </div>
419
  <div class="saswp-sts-btn">
420
 
421
+ <?php echo $cooked_active_text; ?>
422
+
 
 
 
 
 
 
 
 
423
  </div>
424
+ </li>
425
  </ul>
426
  </div>
427
 
431
  function saswp_services_callback(){ ?>
432
  <div class="saswp-pre-ftrs-wrap">
433
  <ul class="saswp-features-blocks">
434
+ <li>
435
  <div class="saswp-features-ele">
436
  <div class="saswp-ele-ic saswp-ele-3">
437
  <img src="<?php echo SASWP_PLUGIN_URL; ?>/admin_section/images/news.png">
441
  <p><?php echo esc_html__('Get quick approval to Google News with our service. Our structured data experts will set up the Google News schema properly on your website.','schema-and-structured-data-for-wp') ?></p>
442
  </div>
443
  </div>
444
+ <a target="_blank" href="http://structured-data-for-wp.com/services/google-news-schema-setup/">
445
+ <div class="saswp-sts-btn">
446
+ <span class="saswp-d-btn"><?php echo esc_html__('Try it','schema-and-structured-data-for-wp') ?></span>
447
  </div>
448
+ </a>
449
+
450
+ </li>
451
+ <li>
452
  <div class="saswp-features-ele">
453
  <div class="saswp-ele-ic saswp-ele-4">
454
  <img src="<?php echo SASWP_PLUGIN_URL; ?>/admin_section/images/schema-setup-icon.png">
458
  <p><?php echo esc_html__('We will help you setup Schema and Structured data on your website as per your requirements and as per recommendation by our expert developers.','schema-and-structured-data-for-wp') ?></p>
459
  </div>
460
  </div>
461
+ <a target="_blank" href="http://structured-data-for-wp.com/services/structured-data-setup-error-clean-up/">
462
+ <div class="saswp-sts-btn">
463
+ <span class="saswp-d-btn"><?php echo esc_html__('Try it','schema-and-structured-data-for-wp') ?></span>
464
+ </div>
465
+ </a>
466
+
467
+ </li>
468
  </ul>
469
  </div>
470
 
485
  'name' => 'sd_data[saswp-for-amp]',
486
  )
487
  ) ;
488
+
 
489
  if ( is_plugin_active('accelerated-mobile-pages/accelerated-moblie-pages.php') || is_plugin_active('amp/amp.php') ) {
490
  }else{
491
 
521
  }
522
 
523
  function saswp_general_page_callback(){
524
+
525
  $settings = saswp_defaultSettings();
526
  $field_objs = new saswp_fields_generator();
527
+ $nav_menu = wp_get_nav_menus();
528
 
529
  $meta_fields_default = array(
530
  array(
597
  )
598
 
599
  );
600
+ if($nav_menu){
601
+
602
+ $options = array();
603
+
604
+ foreach($nav_menu as $menu){
605
+
606
+ $options[$menu->term_id] = $menu->name;
607
+ }
608
+
609
+ $options = array('' => 'Select A Menu') + $options;
610
+
611
  $meta_fields_default[] = array(
612
  'label' => 'Site Navigation Menu',
613
+ 'id' => 'saswp_site_navigation_menu',
614
+ 'name' => 'sd_data[saswp_site_navigation_menu]',
615
+ 'type' => 'select',
616
+ 'options'=> $options
617
+
 
 
 
618
  );
619
  }
620
  ?>
676
  <?php
677
 
678
  echo '<div class="saswp-archive-div">';
679
+ $field_objs->saswp_field_generator($meta_fields_default, $settings);
680
  echo '</div>';
681
 
682
  ?>
1264
  }
1265
 
1266
  echo '<li>';
1267
+ echo saswp_get_license_section_html($on, $license_key, $license_status, $license_status_msg, $label=true, $limits=false);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1268
  echo '</li>';
1269
 
1270
  }
1293
  $translation = $settings[$key];
1294
  }else{
1295
  $translation = $val;
1296
+ }
 
1297
  echo '<tr>'
1298
  . '<td><strong>'.esc_attr($val).'</strong></td>'
1299
  . '<td><input class="regular-text" type="text" name="sd_data['.esc_attr($key).']" value="'. esc_attr($translation).'"></td>'
1316
 
1317
  }
1318
 
1319
+ function saswp_get_license_section_html($on, $license_key, $license_status, $license_status_msg, $label=null, $limits=null){
1320
+
1321
+ $limits_html = $response = '';
1322
+
1323
+ if($limits){
1324
+ $limits_html = '<span style="padding:10px;">Maximum Reviews Limits '. esc_attr($limits).'</span>';
1325
+ }
1326
+
1327
+ $response.= '<div class="saswp-tools-field-title">';
1328
+
1329
+ if($label == true){
1330
+
1331
+ $response.= '<div class="" style="display:inline-block">';
1332
+ $response.= '<strong>'.esc_html__(''.$on.' Compatibility For Schema','schema-and-structured-data-for-wp').'</strong>';
1333
+ $response.= '</div>';
1334
+
1335
+ }
1336
+
1337
+
1338
+ if($license_status == 'active'){
1339
+
1340
+ $response.= '<span class="dashicons dashicons-yes saswp-'.strtolower($on).'-dashicons" style="color: #46b450;"></span>';
1341
+
1342
+ }else{
1343
+
1344
+ $response.= '<span class="dashicons dashicons-no-alt saswp-'.strtolower($on).'-dashicons" style="color: #dc3232;"></span>';
1345
+
1346
+ }
1347
+
1348
+ $response.= '<input type="text" placeholder="Enter License Key" id="'.strtolower($on).'_addon_license_key" name="sd_data['.strtolower($on).'_addon_license_key]" value="'.esc_attr($license_key).'">';
1349
+
1350
+ $response.= '<input type="hidden" id="'.strtolower($on).'_addon_license_key_status" name="sd_data['.strtolower($on).'_addon_license_key_status]" value="'.esc_attr($license_status).'">';
1351
+
1352
+ if($license_status == 'active'){
1353
+
1354
+ $response.= '<a license-status="inactive" add-on="'.strtolower($on).'" class="button button-default saswp_license_activation">'.esc_html__('Deactivate', 'schema-and-structured-data-for-wp').'</a>'.$limits_html;
1355
+
1356
+ }else{
1357
+
1358
+ $response.= '<a license-status="active" add-on="'.strtolower($on).'" class="button button-default saswp_license_activation">'.esc_html__('Activate', 'schema-and-structured-data-for-wp').'</a>'.$limits_html;
1359
+
1360
+ }
1361
+
1362
+ if($license_status_msg !='active'){
1363
+
1364
+ $response.= '<p style="color:red;" add-on="'.strtolower($on).'" class="saswp_license_status_msg">'.$license_status_msg.'</p>';
1365
+ }
1366
+
1367
+ $response.= '<p>'.esc_html__('Enter your '.$on.' addon license key to activate updates & support.','schema-and-structured-data-for-wp').'</p>';
1368
+
1369
+ $response.= '</div>';
1370
+
1371
+ return $response;
1372
+
1373
+ }
1374
+
1375
  function saswp_review_page_callback(){
1376
 
1377
  $settings = saswp_defaultSettings();
1378
  $field_objs = new saswp_fields_generator();
1379
+
1380
+ $meta_fields = array(
 
 
 
 
 
 
 
 
 
 
 
1381
  array(
1382
  'label' => 'Google Review',
1383
  'id' => 'saswp-google-review-checkbox',
1389
  'id' => 'saswp-google-review',
1390
  'name' => 'sd_data[saswp-google-review]',
1391
  )
1392
+ ),
1393
  array(
1394
  'label' => 'Google place API Key',
1395
  'id' => 'saswp_google_place_api_key',
1396
  'name' => 'sd_data[saswp_google_place_api_key]',
1397
+ 'note' => '<a target="_blank" href="https://structured-data-for-wp.com/docs/article/how-to-display-google-review/">Get place API Key</a> Note : Google allows only 5 reviews per location',
1398
  'class' => '',
1399
  'type' => 'text',
1400
+ ),
1401
+ array(
1402
+ 'label' => 'Place',
1403
+ 'id' => 'saswp-google-place-section',
1404
+ 'name' => 'sd_data[saswp-google-place-section]',
1405
+ 'type' => 'text',
1406
+
1407
+ ),
1408
+ // array(
1409
+ // 'label' => 'Review Module',
1410
+ // 'id' => 'saswp-reviews-module-section',
1411
+ // 'name' => 'sd_data[saswp-reviews-module-section]',
1412
+ // 'type' => 'text',
1413
+ //
1414
+ // )
1415
+
1416
 
1417
+ );
1418
+
1419
+ ?>
1420
+
1421
+ <div class="saswp-review-container" id="saswp-review-reviews-container">
1422
+ <?php
1423
+
1424
+ $meta_fields = apply_filters('saswp_modify_reviews_settings_page', $meta_fields);
1425
+
1426
+ $field_objs->saswp_field_generator($meta_fields, $settings);
1427
+ ?>
1428
+ <div class="saswp-quick-links-div">
1429
+ <h4><?php echo esc_html__('Quick Links','schema-and-structured-data-for-wp'); ?></h4>
1430
+ <p><a href="<?php echo admin_url('edit.php?post_type=saswp_reviews'); ?>"><?php echo esc_html__('View Current Reviews','schema-and-structured-data-for-wp'); ?></a></p>
1431
+ <p><a target="_blank" href="https://structured-data-for-wp.com/docs/article/how-to-show-reviews-on-the-website/"><?php echo esc_html__('How to show reviews on the website','schema-and-structured-data-for-wp'); ?></a></p>
1432
+ </div>
1433
+
1434
+ </div>
1435
+
1436
+ <div class="saswp-review-container" id="saswp-review-rating-container">
1437
+
1438
+ <?php
1439
+
1440
+ $meta_fields = array(
1441
+ array(
1442
+ 'label' => 'Rating Module',
1443
+ 'id' => 'saswp-review-module-checkbox',
1444
+ 'name' => 'saswp-review-module-checkbox',
1445
+ 'type' => 'checkbox',
1446
+ 'class' => 'checkbox saswp-checkbox',
1447
+ 'note' => 'This option enables the review metabox on every post/page. <a target="_blank" href="http://structured-data-for-wp.com/docs/article/how-to-use-review-in-schema-and-structure-data/">Learn More</a>',
1448
+ 'hidden' => array(
1449
+ 'id' => 'saswp-review-module',
1450
+ 'name' => 'sd_data[saswp-review-module]',
1451
+ )
1452
+ )
1453
+ );
1454
+
1455
+ $field_objs->saswp_field_generator($meta_fields, $settings);
1456
+ ?>
1457
+ </div>
1458
+
1459
+ <?php
1460
+
1461
+
1462
  }
1463
 
1464
  function saswp_email_schema_callback(){
1520
  'name' => 'saswp-the-events-calendar-checkbox',
1521
  'type' => 'checkbox',
1522
  'class' => 'checkbox saswp-checkbox',
1523
+ 'note' => saswp_get_field_note('the_events_calendar'),
1524
  'hidden' => array(
1525
  'id' => 'saswp-the-events-calendar',
1526
  'name' => 'sd_data[saswp-the-events-calendar]',
1534
  'name' => 'saswp-kk-star-raring-checkbox',
1535
  'type' => 'checkbox',
1536
  'class' => 'checkbox saswp-checkbox',
1537
+ 'note' => saswp_get_field_note('kk_star_rating'),
1538
  'hidden' => array(
1539
  'id' => 'saswp-kk-star-raring',
1540
  'name' => 'sd_data[saswp-kk-star-raring]',
1546
  'name' => 'saswp-wppostratings-raring-checkbox',
1547
  'type' => 'checkbox',
1548
  'class' => 'checkbox saswp-checkbox',
1549
+ 'note' => saswp_get_field_note('wp_post_rating'),
1550
  'hidden' => array(
1551
  'id' => 'saswp-wppostratings-raring',
1552
  'name' => 'sd_data[saswp-wppostratings-raring]',
1558
  'name' => 'saswp-woocommerce-checkbox',
1559
  'type' => 'checkbox',
1560
  'class' => 'checkbox saswp-checkbox',
1561
+ 'note' => saswp_get_field_note('woocommerce'),
1562
  'hidden' => array(
1563
  'id' => 'saswp-woocommerce',
1564
  'name' => 'sd_data[saswp-woocommerce]',
1582
  'name' => 'saswp-cooked-checkbox',
1583
  'type' => 'checkbox',
1584
  'class' => 'checkbox saswp-checkbox',
1585
+ 'note' => saswp_get_field_note('cooked'),
1586
  'hidden' => array(
1587
  'id' => 'saswp-cooked',
1588
  'name' => 'sd_data[saswp-cooked]',
1618
  'name' => 'saswp-dw-question-answer-checkbox',
1619
  'type' => 'checkbox',
1620
  'class' => 'checkbox saswp-checkbox',
1621
+ 'note' => saswp_get_field_note('dw_qna'),
1622
  'hidden' => array(
1623
  'id' => 'saswp-dw-question-answer',
1624
  'name' => 'sd_data[saswp-dw-question-answer]',
1631
  'name' => 'saswp-bbpress-checkbox',
1632
  'type' => 'checkbox',
1633
  'class' => 'checkbox saswp-checkbox',
1634
+ 'note' => saswp_get_field_note('bb_press'),
1635
  'hidden' => array(
1636
  'id' => 'saswp-bbpress',
1637
  'name' => 'sd_data[saswp-bbpress]',
1643
  'id' => 'saswp-yoast-checkbox',
1644
  'name' => 'saswp-yoast-checkbox',
1645
  'type' => 'checkbox',
1646
+ 'note' => saswp_get_field_note('yoast_seo'),
1647
  'class' => 'checkbox saswp-checkbox',
1648
  'hidden' => array(
1649
  'id' => 'saswp-yoast',
1656
  'name' => 'saswp-rankmath-checkbox',
1657
  'type' => 'checkbox',
1658
  'class' => 'checkbox saswp-checkbox',
1659
+ 'note' => saswp_get_field_note('rank_math'),
1660
  'hidden' => array(
1661
  'id' => 'saswp-rankmath',
1662
  'name' => 'sd_data[saswp-rankmath]',
1663
  )
1664
+ );
1665
+
1666
+
1667
  if(!is_plugin_active('taqyeem/taqyeem.php') || get_template() != 'jannah' ){
1668
 
1669
  $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>';
1670
 
1671
  }
1672
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1673
  if(!is_plugin_active('woocommerce/woocommerce.php') || !is_plugin_active('woocommerce-bookings/woocommerce-bookings.php')){
1674
 
1675
  $woocommerce_bok['note'] = esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/woocommerce/">Woocommerce</a>';
1688
  $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>';
1689
 
1690
  }
 
 
 
 
 
 
 
1691
 
1692
  if(!is_plugin_active('cooked-compatibility-for-schema/cooked-compatibility-for-schema.php')){
1693
 
1694
  $cooked['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="http://structured-data-for-wp.com/cooked-compatibility-for-schema/">Cooked Addon</a>';
1695
 
1696
  }
1697
+
 
 
 
 
1698
 
1699
  if(get_template() != 'Extra'){
1700
 
1702
 
1703
 
1704
  }
1705
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1706
  $field_objs = new saswp_fields_generator();
1707
 
1708
  $meta_fields = array(
1823
 
1824
 
1825
  function saswp_support_page_callback(){
1826
+
1827
  ?>
1828
  <div class="saswp_support_div">
1829
  <strong><?php echo esc_html__('If you have any query, please write the query in below box or email us at', 'schema-and-structured-data-for-wp') ?> <a href="mailto:team@ampforwp.com">team@ampforwp.com</a>. <?php echo esc_html__('We will reply to your email address shortly', 'schema-and-structured-data-for-wp') ?></strong>
1908
 
1909
  wp_enqueue_style( 'saswp-main-css', SASWP_PLUGIN_URL . 'admin_section/css/main-style.min.css', false , SASWP_VERSION );
1910
  }
1911
+ add_action( 'admin_enqueue_scripts', 'saswp_enqueue_style_js' );
1912
+
1913
+ function saswp_get_field_note($pname){
1914
+
1915
+ $notes = array(
1916
+ 'kk_star_rating' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/kk-star-ratings/">kk Star Rating</a>',
1917
+ 'wp_post_rating' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-postratings/">WP-PostRatings</a>',
1918
+ 'bb_press' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/bbpress/">bbPress</a>',
1919
+ 'woocommerce' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/woocommerce/">Woocommerce</a>',
1920
+ 'cooked' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/cooked/">Cooked</a>',
1921
+ 'the_events_calendar' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/the-events-calendar/">The Events Calendar</a>',
1922
+ 'yoast_seo' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wordpress-seo/">Yoast SEO</a>',
1923
+ 'rank_math' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/seo-by-rank-math/">WordPress SEO Plugin – Rank Math</a>',
1924
+ 'dw_qna' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/dw-question-answer/">DW Question Answer</a>'
1925
+ );
1926
+
1927
+ if(!saswp_check_plugin_active_status($pname)){
1928
+
1929
+ return $notes[$pname];
1930
+
1931
+ }
1932
+
1933
+ }
admin_section/structure_admin.php CHANGED
@@ -964,6 +964,11 @@ function saswp_custom_breadcrumbs() {
964
 
965
  $post_type_object = get_post_type_object($post_type);
966
  $post_type_archive = get_post_type_archive_link($post_type);
 
 
 
 
 
967
  $variables1_titles[] = $post_type_object->labels->name;
968
  $variables2_links[] = $post_type_archive;
969
 
@@ -981,7 +986,12 @@ function saswp_custom_breadcrumbs() {
981
  if($post_type != 'post') {
982
 
983
  $post_type_object = get_post_type_object($post_type);
984
- $post_type_archive = get_post_type_archive_link($post_type);
 
 
 
 
 
985
  $variables1_titles[]= $post_type_object->labels->name;
986
  $variables2_links[] = $post_type_archive;
987
  }
@@ -1135,7 +1145,13 @@ function saswp_custom_column_set( $column, $post_id ) {
1135
  case 'saswp_schema_type' :
1136
 
1137
  $schema_type = get_post_meta( $post_id, $key='schema_type', true);
1138
- echo esc_attr($schema_type);
 
 
 
 
 
 
1139
 
1140
  break;
1141
  case 'saswp_target_location' :
@@ -1363,14 +1379,14 @@ add_action('wp_ajax_saswp_feeback_remindme', 'saswp_feeback_remindme');
1363
  * Licensing code starts here
1364
  */
1365
 
1366
-
1367
  function saswp_license_status($add_on, $license_status, $license_key){
1368
-
1369
  $item_name = array(
1370
- 'cooked' => 'Cooked compatibility for Schema',
1371
- 'woocommerce' => 'Woocommerce compatibility for Schema'
 
1372
  );
1373
-
1374
  $edd_action = '';
1375
  if($license_status =='active'){
1376
  $edd_action = 'activate_license';
@@ -1388,9 +1404,10 @@ function saswp_license_status($add_on, $license_status, $license_key){
1388
  'url' => home_url(),
1389
  'beta' => false,
1390
  );
 
1391
  $message = '';
1392
  $current_status = '';
1393
- $response = wp_remote_post( SASWP_EDD_STORE_URL, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
1394
 
1395
  // make sure the response came back okay
1396
  if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {
@@ -1438,12 +1455,30 @@ function saswp_license_status($add_on, $license_status, $license_key){
1438
  $license[strtolower($add_on).'_addon_license_key_message']= $message;
1439
 
1440
  }else{
1441
-
1442
  if($license_status == 'active'){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1443
 
1444
  $license[strtolower($add_on).'_addon_license_key_status'] = 'active';
1445
  $license[strtolower($add_on).'_addon_license_key'] = $license_key;
1446
  $license[strtolower($add_on).'_addon_license_key_message'] = 'active';
 
1447
  $current_status = 'active';
1448
  $message = 'Activated';
1449
  }
@@ -1473,10 +1508,10 @@ function saswp_license_status_check(){
1473
  return;
1474
  }
1475
  if ( ! isset( $_POST['saswp_security_nonce'] ) ){
1476
- return;
1477
  }
1478
  if ( !wp_verify_nonce( $_POST['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
1479
- return;
1480
  }
1481
 
1482
  $add_on = sanitize_text_field($_POST['add_on']);
@@ -1497,4 +1532,86 @@ function saswp_license_status_check(){
1497
  add_action('wp_ajax_saswp_license_status_check', 'saswp_license_status_check');
1498
  /**
1499
  * Licensing code ends here
1500
- */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
964
 
965
  $post_type_object = get_post_type_object($post_type);
966
  $post_type_archive = get_post_type_archive_link($post_type);
967
+
968
+ if(!$post_type_archive){
969
+ $post_type_archive = get_permalink();
970
+ }
971
+
972
  $variables1_titles[] = $post_type_object->labels->name;
973
  $variables2_links[] = $post_type_archive;
974
 
986
  if($post_type != 'post') {
987
 
988
  $post_type_object = get_post_type_object($post_type);
989
+ $post_type_archive = get_post_type_archive_link($post_type);
990
+
991
+ if(!$post_type_archive){
992
+ $post_type_archive = get_permalink();
993
+ }
994
+
995
  $variables1_titles[]= $post_type_object->labels->name;
996
  $variables2_links[] = $post_type_archive;
997
  }
1145
  case 'saswp_schema_type' :
1146
 
1147
  $schema_type = get_post_meta( $post_id, $key='schema_type', true);
1148
+
1149
+ if($schema_type == 'local_business'){
1150
+ echo 'LocalBusiness';
1151
+ }else{
1152
+ echo esc_attr($schema_type);
1153
+ }
1154
+
1155
 
1156
  break;
1157
  case 'saswp_target_location' :
1379
  * Licensing code starts here
1380
  */
1381
 
 
1382
  function saswp_license_status($add_on, $license_status, $license_key){
1383
+
1384
  $item_name = array(
1385
+ 'cooked' => 'Cooked compatibility for Schema',
1386
+ 'woocommerce' => 'Woocommerce compatibility for Schema',
1387
+ 'reviews' => 'Reviews for schema'
1388
  );
1389
+
1390
  $edd_action = '';
1391
  if($license_status =='active'){
1392
  $edd_action = 'activate_license';
1404
  'url' => home_url(),
1405
  'beta' => false,
1406
  );
1407
+
1408
  $message = '';
1409
  $current_status = '';
1410
+ $response = @wp_remote_post( SASWP_EDD_STORE_URL, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
1411
 
1412
  // make sure the response came back okay
1413
  if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {
1455
  $license[strtolower($add_on).'_addon_license_key_message']= $message;
1456
 
1457
  }else{
1458
+
1459
  if($license_status == 'active'){
1460
+
1461
+ if(strtolower($add_on) == 'reviews'){
1462
+
1463
+ if(function_exists('saswp_create_reviews_user')){
1464
+
1465
+ $user_create = saswp_create_reviews_user($license_key, strtolower($add_on));
1466
+
1467
+ if($user_create['status']){
1468
+
1469
+ update_option(strtolower($add_on).'_addon_user_id', intval($user_create['user_id']));
1470
+ update_option(strtolower($add_on).'_addon_reviews_limits', intval($user_create['remains_limit']));
1471
+
1472
+ }
1473
+
1474
+ }
1475
+
1476
+ }
1477
 
1478
  $license[strtolower($add_on).'_addon_license_key_status'] = 'active';
1479
  $license[strtolower($add_on).'_addon_license_key'] = $license_key;
1480
  $license[strtolower($add_on).'_addon_license_key_message'] = 'active';
1481
+
1482
  $current_status = 'active';
1483
  $message = 'Activated';
1484
  }
1508
  return;
1509
  }
1510
  if ( ! isset( $_POST['saswp_security_nonce'] ) ){
1511
+ return;
1512
  }
1513
  if ( !wp_verify_nonce( $_POST['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
1514
+ return;
1515
  }
1516
 
1517
  $add_on = sanitize_text_field($_POST['add_on']);
1532
  add_action('wp_ajax_saswp_license_status_check', 'saswp_license_status_check');
1533
  /**
1534
  * Licensing code ends here
1535
+ */
1536
+
1537
+ add_action( 'upgrader_process_complete', 'saswp_upgrade_function',10, 2);
1538
+
1539
+ function saswp_upgrade_function( $upgrader_object, $options ) {
1540
+
1541
+ $current_plugin_path_name = SASWP_PLUGIN_BASENAME;
1542
+
1543
+ if ($options['action'] == 'update' && $options['type'] == 'plugin' ){
1544
+
1545
+ foreach($options['plugins'] as $each_plugin){
1546
+
1547
+ if ($each_plugin==$current_plugin_path_name){
1548
+
1549
+ saswp_review_module_upgradation();
1550
+
1551
+ }
1552
+ }
1553
+ }
1554
+ }
1555
+
1556
+
1557
+ function saswp_review_module_upgradation(){
1558
+
1559
+ $upgrade_option = get_option('saswp_google_upgrade');
1560
+
1561
+ if(!$upgrade_option){
1562
+
1563
+ global $sd_data;
1564
+
1565
+ $g_review_status = $g_review_api = '';
1566
+
1567
+ if(isset($sd_data['saswp-google-review']) && $sd_data['saswp-google-review'] == 1){
1568
+ $g_review_status = $sd_data['saswp-google-review'];
1569
+ }
1570
+
1571
+ if(isset($sd_data['saswp_google_place_api_key']) && $sd_data['saswp_google_place_api_key'] != ''){
1572
+ $g_review_api = $sd_data['saswp_google_place_api_key'];
1573
+ }
1574
+
1575
+ if($g_review_status && $g_review_api){
1576
+
1577
+ $posts_list = get_posts(
1578
+ array(
1579
+ 'post_type' => 'saswp-google-review',
1580
+ 'posts_per_page' => -1,
1581
+ 'post_status' => 'publish',
1582
+ 'meta_query' => array(
1583
+ array(
1584
+ 'key' => 'saswp_google_place_id',
1585
+ 'compare' => 'EXISTS',
1586
+ )
1587
+ )
1588
+
1589
+ ) );
1590
+
1591
+ if($posts_list){
1592
+
1593
+ if(class_exists('saswp_reviews_service')){
1594
+
1595
+ $service = new saswp_reviews_service();
1596
+
1597
+ foreach($posts_list as $list){
1598
+
1599
+ $g_place_id = get_post_meta($list->ID, $key='saswp_google_place_id', true);
1600
+
1601
+ if($g_place_id){
1602
+ $service->saswp_get_free_reviews_data($g_place_id, $g_review_api);
1603
+ }
1604
+
1605
+ }
1606
+
1607
+ }
1608
+
1609
+ }
1610
+
1611
+ }
1612
+
1613
+ update_option('saswp_google_upgrade', date("Y-m-d"));
1614
+
1615
+ }
1616
+
1617
+ }
google_review/google_review.php DELETED
@@ -1,303 +0,0 @@
1
- <?php
2
- /**
3
- * Google Review Class
4
- *
5
- * @author Magazine3
6
- * @category Admin
7
- * @path google_review/google_review
8
- * @Version 1.8
9
- */
10
-
11
- // Exit if accessed directly.
12
- if ( ! defined( 'ABSPATH' ) ) exit;
13
-
14
- class saswp_google_review{
15
-
16
- public function __construct() {
17
-
18
- }
19
- /**
20
- * List of hooks used in google review class
21
- * since @version 1.8
22
- */
23
- public function saswp_google_review_hooks(){
24
-
25
- add_action( 'init', array($this, 'saswp_add_google_review_menu_links'),20);
26
-
27
- add_shortcode('saswp_google_review', array($this,'saswp_google_review_shortcode'));
28
-
29
- if(is_admin()){
30
-
31
- add_filter('get_edit_post_link', array($this, 'saswp_get_edit_post_link'), 99, 3);
32
-
33
- }
34
-
35
- }
36
-
37
- public function saswp_get_edit_post_link($link, $post_id, $context){
38
-
39
- $scr = get_current_screen();
40
-
41
- $id = '';
42
-
43
- if(is_object($scr)){
44
- $id = $scr->id;
45
- }
46
-
47
- if ($id == 'edit-saswp-google-review' && $context == 'display') {
48
-
49
- return wp_nonce_url(admin_url('admin.php?post_id='.$post_id.'&page=collection'), '_wpnonce');
50
-
51
- } else {
52
-
53
- return $link;
54
-
55
- }
56
- }
57
- /**
58
- * Function to register google review post type
59
- * @since version 1.8
60
- */
61
- public function saswp_add_google_review_menu_links() {
62
-
63
- $collection_post_type = array(
64
- 'labels' => array(
65
- 'name' => esc_html__( 'Google Review', 'schema-and-structured-data-for-wp' ),
66
- 'add_new' => esc_html__( 'Add Place', 'schema-and-structured-data-for-wp' ),
67
- 'add_new_item' => esc_html__( 'Edit Collection', 'schema-and-structured-data-for-wp' ),
68
- 'edit_item' => esc_html__( 'Edit AD','schema-and-structured-data-for-wp'),
69
- ),
70
- 'public' => true,
71
- 'has_archive' => false,
72
- 'exclude_from_search' => true,
73
- 'publicly_queryable' => false,
74
- 'show_in_menu' => 'edit.php?post_type=saswp',
75
- 'show_ui' => true,
76
- 'show_in_nav_menus' => false,
77
- 'show_admin_column' => true,
78
- 'rewrite' => false,
79
- );
80
- register_post_type( 'saswp-google-review', $collection_post_type );
81
-
82
- }
83
- /**
84
- * Function to fetch all the google place post
85
- * @return type array
86
- * @since version 1.8
87
- */
88
- public function saswp_fetch_all_google_review_post(){
89
-
90
- $all_post = get_posts(
91
- array(
92
- 'post_type' => 'saswp-google-review',
93
- 'posts_per_page' => -1,
94
- 'post_status' => 'publish',
95
- )
96
- );
97
-
98
- return $all_post;
99
- }
100
- /**
101
- * Function to get google review list by using shortcode
102
- * @param type $attr
103
- * @return string
104
- * @since @version 1.8
105
- */
106
- public function saswp_google_review_shortcode($attr){
107
-
108
- $post_id = $attr['id'];
109
-
110
- if($post_id){
111
-
112
- if(saswp_global_option()){
113
-
114
- $schema_markup = $this->saswp_get_google_review_schema_markup($post_id);
115
-
116
- }
117
- $output = $this->saswp_google_review_front_output($post_id);
118
-
119
- if($schema_markup){
120
- $output = $output.$schema_markup;
121
- }
122
- return $output;
123
-
124
- }
125
-
126
- }
127
- /**
128
- * Function to generate google review schema markup
129
- * @global type $wpdb
130
- * @global type $sd_data
131
- * @param type $post_id
132
- * @return string
133
- * @since Version 1.8
134
- *
135
- */
136
- public function saswp_get_google_review_schema_markup($post_id){
137
-
138
- global $wpdb;
139
- global $sd_data;
140
- $html = '';
141
-
142
- $place_id = get_post_meta($post_id, $key='saswp_google_place_id', true );
143
-
144
- if($place_id){
145
-
146
- $place = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "saswp_google_place WHERE place_id = %s", $place_id));
147
-
148
- }
149
-
150
- $date = get_the_date("Y-m-d\TH:i:s\Z");
151
- $modified_date = get_the_modified_date("Y-m-d\TH:i:s\Z");
152
-
153
- if($place->rating && isset($sd_data['saswp-google-review']) && $sd_data['saswp-google-review'] == 1){
154
-
155
- $total_score = esc_attr(number_format((float)$place->rating, 2, '.', ''));
156
-
157
- $input1 = array(
158
- '@context' => 'http://schema.org',
159
- '@type' => 'Review',
160
- 'dateCreated' => esc_html($date),
161
- 'datePublished' => esc_html($date),
162
- 'dateModified' => esc_html($modified_date),
163
- 'headline' => saswp_get_the_title(),
164
- 'name' => saswp_get_the_title(),
165
- 'url' => get_permalink(),
166
- 'description' => saswp_get_the_excerpt(),
167
- 'copyrightYear' => get_the_time( 'Y' ),
168
- 'author' => saswp_get_author_details()
169
- );
170
-
171
- $input1['itemReviewed'] = array(
172
- '@type' => 'Thing',
173
- 'name' => saswp_get_the_title(),
174
- );
175
-
176
- $input1['reviewRating'] = array(
177
- '@type' => 'Rating',
178
- 'worstRating' => 1,
179
- 'bestRating' => 5,
180
- 'ratingValue' => esc_attr($total_score),
181
- );
182
-
183
- if(!empty($input1)){
184
-
185
- $html .= "\n";
186
- $html .= '<!-- Schema & Structured Data For Google Review v'.esc_attr(SASWP_VERSION).' - -->';
187
- $html .= "\n";
188
- $html .= '<script type="application/ld+json">';
189
- $html .= "\n";
190
- $html .= saswp_json_print_format($input1);
191
- $html .= "\n";
192
- $html .= '</script>';
193
- $html .= "\n\n";
194
-
195
- }
196
-
197
- }
198
-
199
- return $html;
200
- }
201
- /**
202
- * Function to show google review list at user end
203
- * @global type $wpdb
204
- * @param type $post_id
205
- * @return string
206
- * @since version 1.8
207
- */
208
- public function saswp_google_review_front_output($post_id){
209
-
210
- global $wpdb;
211
- $reviews = null;
212
- $output = '';
213
-
214
- $place_id = get_post_meta($post_id, $key='saswp_google_place_id', true );
215
-
216
- if($place_id){
217
-
218
- $place = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "saswp_google_place WHERE place_id = %s", $place_id));
219
-
220
- if($place->id){
221
-
222
- $reviews = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "saswp_google_review WHERE google_place_id = %d ORDER BY time DESC", $place->id));
223
-
224
- if($reviews){
225
-
226
- foreach ($reviews as $review){
227
-
228
- $review_rating = $review->rating;
229
-
230
- $starating = '';
231
-
232
- $starating .= '<div class="saswp-rvw-str">';
233
- for($j=0; $j<5; $j++){
234
-
235
- if($review_rating >$j){
236
-
237
- $explod = explode('.', $review_rating);
238
-
239
- if(isset($explod[1])){
240
-
241
- if($j <$explod[0]){
242
-
243
- $starating.='<span class="str-ic"></span>';
244
-
245
- }else{
246
-
247
- $starating.='<span class="half-str"></span>';
248
-
249
- }
250
- }else{
251
-
252
- $starating.='<span class="str-ic"></span>';
253
-
254
- }
255
-
256
- } else{
257
- $starating.='<span class="df-clr"></span>';
258
- }
259
- }
260
- $starating .= '</div>';
261
-
262
- $output.= '<div class="saswp-g-review-panel">
263
- <div class="saswp-glg-review-body">
264
- <div class="saswp-rv-img">
265
- <img src="'.esc_url($review->profile_photo_url).'" alt="'.$review->author_name.'">
266
- </div>
267
- <div class="saswp-rv-cnt">
268
- <div class="saswp-str-rtng">
269
- <div class="saswp-str">
270
- <span class="saswp-athr">'.$review->author_name.'</span>
271
- '.$starating.'
272
- </div>
273
- <span class="saswp-g-plus">
274
- <a href="#"><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/google-img.png'.'"></a>
275
- </span>
276
- </div>
277
- <span class="saswp-pt-dt">'.gmdate("H:i d M y", $review->time).'</span>
278
- <p>'.substr($review->text,0,300).'</p>
279
- </div>
280
- </div>
281
- </div>';
282
-
283
- }
284
-
285
- }
286
-
287
- }
288
-
289
- }
290
-
291
- return $output;
292
-
293
- }
294
-
295
- }
296
-
297
- if (class_exists('saswp_google_review')) {
298
-
299
- $object = new saswp_google_review;
300
- $object->saswp_google_review_hooks();
301
-
302
- };
303
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
google_review/google_review_page.php DELETED
@@ -1,400 +0,0 @@
1
- <?php
2
- /**
3
- * Google Review Page
4
- *
5
- * @author Magazine3
6
- * @category Admin
7
- * @path google_review/google_review_page
8
- * @Version 1.8
9
- */
10
-
11
- // Exit if accessed directly.
12
- if ( ! defined( 'ABSPATH' ) ) exit;
13
-
14
- add_action('admin_init', 'saswp_add_google_places');
15
-
16
- /**
17
- * Function to save google place review by place id
18
- * Since @version 1.8
19
- */
20
- function saswp_add_google_places(){
21
-
22
- if(!function_exists('wp_get_current_user')) {
23
- include(ABSPATH . "wp-includes/pluggable.php");
24
- }
25
-
26
- if(isset($_POST['place_post_ID'])){
27
-
28
- $post_id = sanitize_text_field($_POST['place_post_ID']);
29
- $post_title = sanitize_text_field($_POST['saswp_g_review_title']);
30
-
31
- $post = array(
32
- 'ID' => $post_id,
33
- 'post_title' => $post_title,
34
- 'post_status' => 'publish',
35
- 'post_name' => $post_title,
36
- 'post_type' => 'saswp-google-review',
37
- );
38
-
39
- wp_update_post($post);
40
-
41
- $post_meta = array();
42
-
43
- $post_meta['saswp_google_place_id'] = sanitize_text_field($_POST['saswp_google_place_id']);
44
- $post_meta['saswp_language_list'] = sanitize_text_field($_POST['saswp_language_list']);
45
- $post_meta['saswp_googel_api'] = sanitize_text_field($_POST['saswp_googel_api']);
46
-
47
- if(!empty($post_meta)){
48
-
49
- foreach($post_meta as $meta_key => $meta_val){
50
-
51
- update_post_meta($post_id, $meta_key, $meta_val);
52
-
53
- }
54
-
55
- }
56
-
57
- if($_POST['saswp-page'] == 'collection'){
58
-
59
- $current_url = htmlspecialchars_decode(wp_nonce_url(admin_url('admin.php?post_id='.$post_id.'&page=collection'), '_wpnonce'));
60
- wp_redirect( $current_url );
61
- exit;
62
- }
63
-
64
- }
65
-
66
- }
67
-
68
- class saswp_google_review_page{
69
-
70
- public function __construct() {
71
-
72
- add_action( 'admin_menu', array($this, 'saswp_add_google_review_links'),20);
73
- add_action( 'wp_ajax_saswp_connect_google_place', array($this,'saswp_connect_google_place'));
74
-
75
- }
76
- /**
77
- * Ajax Function to connect google place api with place id
78
- * @return type json
79
- * Since @version 1.8
80
- */
81
- public function saswp_connect_google_place(){
82
-
83
- if ( ! isset( $_POST['saswp_security_nonce'] ) ){
84
- return;
85
- }
86
- if ( !wp_verify_nonce( $_POST['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
87
- return;
88
- }
89
-
90
- $place_id = '';
91
- $language = '';
92
- $google_api = '';
93
-
94
- if(isset($_POST['place_id'])){
95
- $place_id = sanitize_text_field($_POST['place_id']);
96
- }
97
- if(isset($_POST['language'])){
98
- $language = sanitize_text_field($_POST['language']);
99
- }
100
- if(isset($_POST['google_api'])){
101
- $google_api = sanitize_text_field($_POST['google_api']);
102
- }
103
-
104
- if($place_id){
105
-
106
- $result = saswp_get_google_review_data($place_id, $language);
107
-
108
- if($result){
109
-
110
- echo json_encode(array('status' => 't'));
111
-
112
- }else{
113
-
114
- echo json_encode(array('status' => 'f'));
115
-
116
- }
117
-
118
- }
119
-
120
- wp_die();
121
-
122
- }
123
-
124
- public function saswp_add_google_review_links() {
125
-
126
- add_submenu_page( 'edit.php?post_type=saswp',
127
- esc_html__( 'Structured Data', 'schema-and-structured-data-for-wp' ),
128
- esc_html__( '', 'schema-and-structured-data-for-wp' ),
129
- 'manage_options',
130
- 'collection',
131
- array($this, 'saswp_admin_google_review_interface_render'));
132
-
133
- }
134
- /**
135
- * Function to create google review page in admin area
136
- * @global type $wpdb
137
- * Since @version 1.8
138
- */
139
- public function saswp_admin_google_review_interface_render(){
140
-
141
- global $wpdb;
142
-
143
- $language = array(
144
- 'af' => 'Afrikanns',
145
- 'sq' => 'Albanian',
146
- 'ar' => 'Arabic',
147
- 'hy' => 'Armenian',
148
- 'eu' => 'Basque',
149
- 'bn' => 'Bengali',
150
- 'bg' => 'Bulgarian',
151
- 'ca' => 'Catalan',
152
- 'km' => 'Cambodian',
153
- 'zh' => 'Chinese (Mandarin)',
154
- 'hr' => 'Croation',
155
- 'cs' => 'Czech',
156
- 'da' => 'Danish',
157
- 'nl' => 'Dutch',
158
- 'en' => 'English',
159
- 'et' => 'Estonian',
160
- 'fj' => 'Fiji',
161
- 'fi' => 'Finnish',
162
- 'fr' => 'French',
163
- 'ka' => 'Georgian',
164
- 'de' => 'German',
165
- 'el' => 'Greek',
166
- 'gu' => 'Gujarati',
167
- 'he' => 'Hebrew',
168
- 'hi' => 'Hindi',
169
- 'hu' => 'Hungarian',
170
- 'is' => 'Icelandic',
171
- 'id' => 'Indonesian',
172
- 'ga' => 'Irish',
173
- 'it' => 'Italian',
174
- 'ja' => 'Japanese',
175
- 'jw' => 'Javanese',
176
- 'ko' => 'Korean',
177
- 'la' => 'Latin',
178
- 'lv' => 'Latvian',
179
- 'lt' => 'Lithuanian',
180
- 'mk' => 'Macedonian',
181
- 'ms' => 'Malay',
182
- 'ml' => 'Malayalam',
183
- 'mt' => 'Maltese',
184
- 'mi' => 'Maori',
185
- 'mr' => 'Marathi',
186
- 'mn' => 'Mongolian',
187
- 'ne' => 'Nepali',
188
- 'no' => 'Norwegian',
189
- 'fa' => 'Persian',
190
- 'pl' => 'Polish',
191
- 'pt' => 'Portuguese',
192
- 'pa' => 'Punjabi',
193
- 'qu' => 'Quechua',
194
- 'ro' => 'Romanian',
195
- 'ru' => 'Russian',
196
- 'sm' => 'Samoan',
197
- 'sr' => 'Serbian',
198
- 'sk' => 'Slovak',
199
- 'sl' => 'Slovenian',
200
- 'es' => 'Spanish',
201
- 'sw' => 'Swahili',
202
- 'sv' => 'Swedish ',
203
- 'ta' => 'Tamil',
204
- 'tt' => 'Tatar',
205
- 'te' => 'Telugu',
206
- 'th' => 'Thai',
207
- 'bo' => 'Tibetan',
208
- 'to' => 'Tonga',
209
- 'tr' => 'Turkish',
210
- 'uk' => 'Ukranian',
211
- 'ur' => 'Urdu',
212
- 'uz' => 'Uzbek',
213
- 'vi' => 'Vietnamese',
214
- 'cy' => 'Welsh',
215
- 'xh' => 'Xhosa'
216
- );
217
-
218
- $post_meta = array();
219
- $post_id = '';
220
- $reviews = null;
221
-
222
- if(isset($_GET['post_id'])){
223
-
224
- $post_id = intval($_GET['post_id']);
225
-
226
-
227
- $post_meta = get_post_meta($post_id, $key='', true );
228
-
229
-
230
- } else{
231
-
232
- $post = get_default_post_to_edit( 'saswp-google-review', true );
233
- $post_id = $post->ID;
234
- }
235
-
236
- if(isset($post_meta['saswp_google_place_id'])){
237
-
238
- $place_id = trim($post_meta['saswp_google_place_id'][0]);
239
- $place = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "saswp_google_place WHERE place_id = %s", $place_id));
240
-
241
- if(is_object($place)){
242
-
243
- $reviews = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "saswp_google_review WHERE google_place_id = %d ORDER BY time DESC", $place->id));
244
-
245
- }
246
-
247
- }
248
-
249
- ?>
250
- <div class="saswp-heading">
251
- <h1 class="wp-heading-inline"><?php echo esc_html__('Google Review','schema-and-structured-data-for-wp'); ?> </h1><span class="saswp-need-help"><a target="_blank" href="http://structured-data-for-wp.com/docs/article/how-to-display-google-review/"><?php echo esc_html__('Need Help?','schema-and-structured-data-for-wp'); ?></a></span>
252
- </div>
253
-
254
- <div class="saswp-g-review-container">
255
- <form method="post" action="post.php">
256
- <div class="saswp-g-review-header">
257
-
258
- <input type="hidden" name="post_type" value="saswp-google-review">
259
- <input type="hidden" name="saswp-page" value="collection">
260
- <input type="hidden" id="place_post_ID" name="place_post_ID" value="<?php echo $post_id; ?>">
261
- <input type="text" value="<?php if(get_the_title($post_id) == 'Auto Draft'){ echo 'Untitled'; }else{ echo get_the_title($post_id); } ?>" id="saswp_g_review_title" name="saswp_g_review_title" style="width: 30%;">
262
-
263
- <button type="submit" class="btn btn-success button-primary" > <?php echo esc_html__('Save','schema-and-structured-data-for-wp'); ?> </button>
264
- <div>Use ShortCode [saswp_google_review id="<?php echo $post_id; ?>"]</div>
265
-
266
- </div>
267
-
268
- <div class="saswp-g-review-body">
269
-
270
- <div class="saswp-review-list">
271
-
272
- <?php
273
-
274
- if($reviews){
275
-
276
- foreach ($reviews as $review){
277
-
278
- $review_rating = $review->rating;
279
-
280
- $starating = '';
281
-
282
- $starating .= '<div class="saswp-rvw-str">';
283
-
284
- for($j=0; $j<5; $j++){
285
-
286
- if($review_rating >$j){
287
-
288
- $explod = explode('.', $review_rating);
289
-
290
- if(isset($explod[1])){
291
-
292
- if($j <$explod[0]){
293
-
294
- $starating.='<span class="str-ic"></span>';
295
-
296
- }else{
297
-
298
- $starating.='<span class="half-str"></span>';
299
-
300
- }
301
- }else{
302
-
303
- $starating.='<span class="str-ic"></span>';
304
-
305
- }
306
-
307
- } else{
308
- $starating.='<span class="df-clr"></span>';
309
- }
310
- }
311
- $starating .= '</div>';
312
-
313
-
314
- echo '<div class="saswp-g-review-panel">
315
- <div class="saswp-glg-review-body">
316
- <div class="saswp-rv-img">
317
- <img src="'.esc_url($review->profile_photo_url).'" alt="'.esc_attr($review->author_name).'">
318
- </div>
319
- <div class="saswp-rv-cnt">
320
- <div class="saswp-str-rtng">
321
- <div class="saswp-str">
322
- <span class="saswp-athr">'.esc_attr($review->author_name).'</span>
323
- '.$starating.'
324
- </div>
325
- <span class="saswp-g-plus">
326
- <a href="#"><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/google-img.png'.'"></a>
327
- </span>
328
- </div>
329
- <span class="saswp-pt-dt">'.gmdate("H:i d M y", $review->time).'</span>
330
- <p>'.substr($review->text,0,300).'</p>
331
- </div>
332
- </div>
333
- </div>';
334
-
335
- }
336
-
337
- }
338
-
339
- ?>
340
-
341
- </div>
342
-
343
- <div class="saswp-channel-list">
344
- <div class="saswp-panel">
345
- <h3><?php echo esc_html__('Google Review Settings','schema-and-structured-data-for-wp'); ?></h3>
346
- <div class="saswp-input-fields">
347
- <label><?php echo esc_html__('Place ID','schema-and-structured-data-for-wp'); ?>:</label><input value="<?php if(isset($post_meta['saswp_google_place_id'])){ echo $post_meta['saswp_google_place_id'][0];} ?>" type="text" id="saswp_google_place_id" name="saswp_google_place_id" placeholder="<?php echo esc_html__('Place Id', 'schema-and-structured-data-for-wp' ); ?>">
348
- </div>
349
-
350
- <div class="saswp-input-fields">
351
- <label><?php echo esc_html__('Languages','schema-and-structured-data-for-wp'); ?>:</label>
352
- <select name="saswp_language_list" id="saswp_language_list">
353
- <?php
354
-
355
- foreach ($language as $key => $value) {
356
-
357
- $sel = '';
358
-
359
- if(saswp_remove_warnings($post_meta, 'saswp_language_list', 'saswp_array')==$key){
360
-
361
- $sel = 'selected';
362
-
363
- }
364
-
365
- echo "<option value='".esc_attr($key)."' ".esc_attr($sel).">".esc_html__($value, 'schema-and-structured-data-for-wp' )."</option>";
366
-
367
- }
368
- ?>
369
- </select>
370
-
371
- </div>
372
-
373
- <div class="saswp-input-fields">
374
- <label><?php echo esc_html__('Goolge API','schema-and-structured-data-for-wp'); ?></label>
375
- <input value="<?php if(isset($post_meta['saswp_googel_api'])){ echo $post_meta['saswp_googel_api'][0];} ?>" type="text" id="saswp_googel_api" name="saswp_googel_api" placeholder="<?php echo esc_html__('Google API', 'schema-and-structured-data-for-wp' ); ?>">
376
- </div>
377
-
378
- <div class="saswp-input-fields">
379
- <a class="saswp_coonect_google_place btn btn-success button-primary" ><?php echo esc_html__('Connect Google','schema-and-structured-data-for-wp'); ?></a>
380
- </div>
381
-
382
- </div>
383
-
384
- </div>
385
-
386
-
387
- </div>
388
-
389
- </form>
390
- </div>
391
-
392
- <?php
393
- }
394
-
395
- }
396
-
397
- if (class_exists('saswp_google_review_page')) {
398
- new saswp_google_review_page;
399
- };
400
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
google_review/google_review_setup.php DELETED
@@ -1,245 +0,0 @@
1
- <?php
2
- /**
3
- * Google Review Setup Page
4
- *
5
- * @author Magazine3
6
- * @category Admin
7
- * @path google_review/google_review_setup
8
- * @Version 1.8
9
- */
10
-
11
- // Exit if accessed directly.
12
- if ( ! defined( 'ABSPATH' ) ) exit;
13
-
14
- add_action('admin_init', 'saswp_create_database_for_existing_users');
15
- add_action('the_post', 'saswp_create_database_for_existing_users');
16
-
17
- /**
18
- * Function to initiate database installation
19
- * @return type null
20
- * @Since version 1.8
21
- */
22
- function saswp_create_database_for_existing_users(){
23
-
24
- if ( ! current_user_can( 'manage_options' ) ) {
25
- return;
26
- }
27
- $status = get_option('saswp-database-on-first-load');
28
-
29
- if($status != 'enable'){
30
-
31
- saswp_google_review_database_install();
32
- update_option('saswp-database-on-first-load', 'enable');
33
-
34
- }
35
-
36
- }
37
- /**
38
- * Function to install database tables for google review
39
- * @global type $wpdb
40
- * @Since version 1.8
41
- */
42
- function saswp_google_review_database_install() {
43
-
44
- global $wpdb;
45
-
46
- require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
47
-
48
- $charset_collate = $engine = '';
49
-
50
-
51
- if(!empty($wpdb->charset)) {
52
- $charset_collate .= " DEFAULT CHARACTER SET {$wpdb->charset}";
53
- }
54
- if($wpdb->has_cap('collation') AND !empty($wpdb->collate)) {
55
- $charset_collate .= " COLLATE {$wpdb->collate}";
56
- }
57
-
58
- $found_engine = $wpdb->get_var("SELECT ENGINE FROM `information_schema`.`TABLES` WHERE `TABLE_SCHEMA` = '".DB_NAME."' AND `TABLE_NAME` = '{$wpdb->prefix}posts';");
59
-
60
- if(strtolower($found_engine) == 'innodb') {
61
- $engine = ' ENGINE=InnoDB';
62
- }
63
-
64
- $found_tables = $wpdb->get_col("SHOW TABLES LIKE '{$wpdb->prefix}saswp%';");
65
-
66
- if(!in_array("{$wpdb->prefix}saswp_google_place", $found_tables)) {
67
-
68
- dbDelta("CREATE TABLE `{$wpdb->prefix}saswp_google_place` (".
69
- "id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,".
70
- "place_id VARCHAR(80) NOT NULL,".
71
- "name VARCHAR(255) NOT NULL,".
72
- "photo VARCHAR(425),".
73
- "icon VARCHAR(255),".
74
- "address VARCHAR(255),".
75
- "rating DOUBLE PRECISION,".
76
- "url VARCHAR(255),".
77
- "website VARCHAR(255),".
78
- "updated BIGINT(20),".
79
- "PRIMARY KEY (`id`),".
80
- "UNIQUE INDEX saswp_place_id (`place_id`)".
81
- ") ".$charset_collate.$engine.";");
82
-
83
- }
84
-
85
- if(!in_array("{$wpdb->prefix}saswp_google_review", $found_tables)) {
86
-
87
- dbDelta("CREATE TABLE `{$wpdb->prefix}saswp_google_review` (".
88
- "id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,".
89
- "google_place_id BIGINT(20) UNSIGNED NOT NULL,".
90
- "hash VARCHAR(40) NOT NULL,".
91
- "rating INTEGER NOT NULL,".
92
- "text VARCHAR(10000),".
93
- "time INTEGER NOT NULL,".
94
- "language VARCHAR(10),".
95
- "author_name VARCHAR(255),".
96
- "author_url VARCHAR(255),".
97
- "profile_photo_url VARCHAR(255),".
98
- "PRIMARY KEY (`id`),".
99
- "UNIQUE INDEX saswp_google_review_hash (`hash`),".
100
- "INDEX saswp_google_place_id (`google_place_id`)".
101
- ") ".$charset_collate.$engine.";");
102
-
103
- }
104
-
105
- }
106
- /**
107
- * Function to retrive google review data from google with maps api
108
- * @param type $place_id
109
- * @param string $language
110
- * @return type array
111
- * @Since version 1.8
112
- */
113
- function saswp_get_google_review_data($place_id, $language=null){
114
-
115
- if($language){
116
-
117
- $language = '&language='.$language;
118
-
119
- }
120
-
121
- if($place_id){
122
-
123
- $result = wp_remote_get('https://maps.googleapis.com/maps/api/place/details/json?placeid='.$place_id.'&key=AIzaSyAQ1j_iD1npoqTRuhrIx-ADeVZjQddUqKs'.$language);
124
-
125
- if($result){
126
-
127
- $result = json_decode($result['body']);
128
- $result->result->business_photo = saswp_business_image($result->result);
129
- $response = saswp_save_google_reviews($result->result);
130
- return $response;
131
- }
132
-
133
- }
134
-
135
- }
136
- /**
137
- * Function to save retrived google review data from google place
138
- * @global type $wpdb
139
- * @param type $place
140
- * @return type string
141
- * @Since version 1.8
142
- */
143
- function saswp_save_google_reviews($place) {
144
-
145
- global $wpdb;
146
- $response = null;
147
-
148
- $google_place_id = $wpdb->get_var($wpdb->prepare("SELECT id FROM " . $wpdb->prefix . "saswp_google_place WHERE place_id = %s", $place->place_id));
149
-
150
- if ($google_place_id) {
151
-
152
- $response = $wpdb->update($wpdb->prefix . 'saswp_google_place', array(
153
- 'name' => $place->name,
154
- 'photo' => $place->business_photo,
155
- 'rating' => $place->rating
156
- ), array('ID' => $google_place_id));
157
-
158
- } else {
159
-
160
- $response = $wpdb->insert($wpdb->prefix . 'saswp_google_place', array(
161
- 'place_id' => $place->place_id,
162
- 'name' => $place->name,
163
- 'photo' => $place->business_photo,
164
- 'icon' => $place->icon,
165
- 'address' => $place->formatted_address,
166
- 'rating' => isset($place->rating) ? $place->rating : null,
167
- 'url' => isset($place->url) ? $place->url : null,
168
- 'website' => isset($place->website) ? $place->website : null
169
- ));
170
-
171
- $google_place_id = $wpdb->insert_id;
172
-
173
- }
174
-
175
- if ($place->reviews) {
176
-
177
- $reviews = $place->reviews;
178
-
179
- foreach ($reviews as $review) {
180
-
181
- $google_review_id = $wpdb->get_var($wpdb->prepare("SELECT id FROM " . $wpdb->prefix . "saswp_google_review WHERE time = %s", $review->time));
182
-
183
- if ($google_review_id) {
184
-
185
- $update_params = array(
186
- 'rating' => $review->rating,
187
- 'text' => $review->text
188
- );
189
-
190
- if (isset($review->profile_photo_url)) {
191
-
192
- $update_params['profile_photo_url'] = $review->profile_photo_url;
193
-
194
- }
195
-
196
- $response = $wpdb->update($wpdb->prefix . 'saswp_google_review', $update_params, array('id' => $google_review_id));
197
-
198
- } else {
199
-
200
- $response = $wpdb->insert($wpdb->prefix . 'saswp_google_review', array(
201
- 'google_place_id' => $google_place_id,
202
- 'hash' => $review->time,
203
- 'rating' => $review->rating,
204
- 'text' => $review->text,
205
- 'time' => $review->time,
206
- 'language' => $review->language,
207
- 'author_name' => $review->author_name,
208
- 'author_url' => isset($review->author_url) ? $review->author_url : null,
209
- 'profile_photo_url' => isset($review->profile_photo_url) ? $review->profile_photo_url : null
210
- ));
211
-
212
- }
213
- }
214
- }
215
-
216
- return $response;
217
- }
218
- /**
219
- * Function to retrive image from google place
220
- * @global type $sd_data
221
- * @param type $result_json
222
- * @return type string
223
- * @Since version 1.8
224
- */
225
- function saswp_business_image($result_json) {
226
-
227
- global $sd_data;
228
-
229
- if (isset($result_json->photos)) {
230
-
231
- $request_url = add_query_arg(
232
- array(
233
- 'photoreference' => $result_json->photos[0]->photo_reference,
234
- 'key' => isset($sd_data['google_place_api_key']) ? $sd_data['google_place_api_key']:'',
235
- 'maxwidth' => '300',
236
- 'maxheight' => '300',
237
- ),
238
- 'https://maps.googleapis.com/maps/api/place/photo'
239
- );
240
-
241
- return $request_url;
242
-
243
- }
244
- return null;
245
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
google_review/google_review_widget.php DELETED
@@ -1,129 +0,0 @@
1
- <?php
2
- /**
3
- * Google Review Widget Class
4
- *
5
- * @author Magazine3
6
- * @category Admin
7
- * @path google_review/google_review_widget
8
- * @Version 1.8
9
- */
10
-
11
- // Exit if accessed directly.
12
- if ( ! defined( 'ABSPATH' ) ) exit;
13
-
14
- /*
15
- * To change this license header, choose License Headers in Project Properties.
16
- * To change this template file, choose Tools | Templates
17
- * and open the template in the editor.
18
- */
19
- /**
20
- * Adds Saswp_Google_Review_Widget widget.
21
- */
22
- class Saswp_Google_Review_Widget extends WP_Widget {
23
-
24
- /**
25
- * Register widget with WordPress.
26
- */
27
- function __construct() {
28
- parent::__construct(
29
- 'saswp_google_review_widget', // Base ID
30
- esc_html__( 'Schema Google Review', 'schema-and-structured-data-for-wp' ), // Name
31
- array( 'description' => esc_html__( 'Widget to display google reviews', 'schema-and-structured-data-for-wp' ), ) // Args
32
- );
33
- }
34
-
35
- /**
36
- * Front-end display of widget.
37
- *
38
- * @see WP_Widget::widget()
39
- *
40
- * @param array $args Widget arguments.
41
- * @param array $instance Saved values from database.
42
- */
43
- public function widget( $args, $instance ) {
44
-
45
- echo html_entity_decode(esc_attr($args['before_widget']));
46
-
47
- if ( ! class_exists('saswp_google_review')) {
48
- require_once SASWP_DIR_NAME.'/google_review/google_review.php';
49
- }
50
-
51
- $object = new saswp_google_review();
52
- $all_ads = $object->saswp_fetch_all_google_review_post();
53
- $goolge_review_obj = new saswp_google_review();
54
-
55
- foreach($all_ads as $ad){
56
-
57
- if($ad->ID == $instance['g_review']){
58
-
59
- $ad_code = $object->saswp_google_review_front_output($instance['g_review']);
60
- $goolge_review = $goolge_review_obj->saswp_get_google_review_schema_markup($instance['g_review']);
61
-
62
- if($goolge_review){
63
- echo $ad_code . $goolge_review;
64
- } else {
65
- echo $ad_code;
66
- }
67
- }
68
- }
69
- echo html_entity_decode(esc_attr($args['after_widget']));
70
- }
71
-
72
- /**
73
- * Back-end widget form.
74
- *
75
- * @see WP_Widget::form()
76
- *
77
- * @param array $instance Previously saved values from database.
78
- */
79
- public function form( $instance ) {
80
-
81
- $title = ! empty( $instance['title'] ) ? $instance['title'] : esc_html__( 'Review Title', 'schema-and-structured-data-for-wp' );
82
- $ads = ! empty( $instance['g_review'] ) ? $instance['g_review'] : esc_html__( 'review list to be display', 'schema-and-structured-data-for-wp' );?>
83
- <p>
84
- <label for="<?php echo esc_attr( $this->get_field_id( 'g_review' ) ); ?>">
85
- <?php esc_attr_e( 'Places :', 'schema-and-structured-data-for-wp' ); ?></label><?php
86
-
87
- $ads_select_html = '';
88
- if ( ! class_exists('saswp_google_review')) {
89
- require_once SASWP_DIR_NAME.'/google_review/google_review.php';
90
- }
91
- $object = new saswp_google_review();
92
- $all_ads = $object->saswp_fetch_all_google_review_post();
93
- foreach($all_ads as $ad){
94
- $ads_select_html .= '<option '. esc_attr(selected( $ads, $ad->ID, false)).' value="'.esc_attr($ad->ID).'">'.esc_html__($ad->post_title, 'schema-and-structured-data-for-wp').'</option>';
95
- }
96
- echo '<select id="'.esc_attr( $this->get_field_id( 'g_review' )).'" name="'.esc_attr( $this->get_field_name( 'g_review' )).'">'
97
- .$ads_select_html.
98
- '</select>';?>
99
- </p><?php
100
- }
101
-
102
- /**
103
- * Sanitize widget form values as they are saved.
104
- *
105
- * @see WP_Widget::update()
106
- *
107
- * @param array $new_instance Values just sent to be saved.
108
- * @param array $old_instance Previously saved values from database.
109
- *
110
- * @return array Updated safe values to be saved.
111
- */
112
- public function update( $new_instance, $old_instance ) {
113
-
114
- $instance = array();
115
- $instance['g_review'] = ( ! empty( $new_instance['g_review'] ) ) ? sanitize_text_field( $new_instance['g_review'] ) : '';
116
- return $instance;
117
-
118
- }
119
-
120
- } // class Saswp_Google_Review_Widget
121
-
122
- /**
123
- * We are registering our widget here in wordpress
124
- */
125
- function register_saswp_google_review_widget(){
126
- register_widget('Saswp_Google_Review_Widget');
127
- }
128
-
129
- add_action('widgets_init', 'register_saswp_google_review_widget');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
output/function.php CHANGED
@@ -29,7 +29,8 @@ function saswp_schema_markup_hook_on_init() {
29
  }
30
  saswp_remove_yoast_product_schema();
31
  remove_action( 'amp_post_template_head', 'amp_post_template_add_schemaorg_metadata',99,1);
32
- remove_action( 'amp_post_template_footer', 'amp_post_template_add_schemaorg_metadata',99,1);
 
33
  add_action('cooked_amp_head', 'saswp_schema_markup_output');
34
 
35
  if(isset($sd_data['saswp-wppostratings-raring']) && $sd_data['saswp-wppostratings-raring'] == 1){
@@ -60,6 +61,7 @@ function saswp_schema_markup_output() {
60
  $output = '';
61
  $post_specific_enable = '';
62
  $schema_output = array();
 
63
 
64
  $site_navigation = saswp_site_navigation_output();
65
  $contact_page_output = saswp_contact_page_output();
@@ -68,7 +70,10 @@ function saswp_schema_markup_output() {
68
  $archive_output = saswp_archive_output();
69
  $schema_breadcrumb_output = saswp_schema_breadcrumb_output();
70
  $kb_website_output = saswp_kb_website_output();
71
- $kb_schema_output = saswp_kb_schema_output();
 
 
 
72
 
73
  if(is_singular()){
74
 
@@ -111,13 +116,7 @@ function saswp_schema_markup_output() {
111
  $output .= saswp_json_print_format($archive_output);
112
  $output .= ",";
113
  $output .= "\n\n";
114
- }
115
- if(!empty($site_navigation)){
116
-
117
- $output .= saswp_json_print_format($site_navigation);
118
- $output .= ",";
119
- $output .= "\n\n";
120
- }
121
 
122
  if(isset($sd_data['saswp-defragment']) && $sd_data['saswp-defragment'] == 1){
123
 
@@ -141,7 +140,6 @@ function saswp_schema_markup_output() {
141
  unset($webpage['mainEntity']);
142
  unset($kb_schema_output['@context']);
143
  unset($kb_website_output['@context']);
144
-
145
 
146
  if($webpage){
147
 
@@ -153,6 +151,12 @@ function saswp_schema_markup_output() {
153
  '@id' => get_permalink().'#primaryimage'
154
  );
155
 
 
 
 
 
 
 
156
  }
157
 
158
  $soutput['mainEntityOfPage'] = $webpage['@id'];
@@ -236,7 +240,14 @@ function saswp_schema_markup_output() {
236
 
237
 
238
  }else{
239
-
 
 
 
 
 
 
 
240
  if(!empty($kb_website_output)){
241
 
242
  $output .= saswp_json_print_format($kb_website_output);
@@ -822,7 +833,12 @@ function saswp_remove_rank_math_schema($entry){
822
 
823
  add_action( 'rank_math/json_ld', 'saswp_remove_rank_math_schema',99 );
824
 
825
-
 
 
 
 
 
826
  function saswp_json_print_format($output_array){
827
 
828
  global $sd_data;
@@ -856,7 +872,12 @@ function saswp_remove_microdata($content){
856
  return $content;
857
  }
858
 
859
-
 
 
 
 
 
860
  function saswp_global_option(){
861
 
862
  global $sd_data;
@@ -874,3 +895,33 @@ function saswp_global_option(){
874
  }
875
 
876
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  }
30
  saswp_remove_yoast_product_schema();
31
  remove_action( 'amp_post_template_head', 'amp_post_template_add_schemaorg_metadata',99,1);
32
+ remove_action( 'amp_post_template_footer', 'amp_post_template_add_schemaorg_metadata',99,1);
33
+ remove_action('wp_footer', 'orbital_markup_site');
34
  add_action('cooked_amp_head', 'saswp_schema_markup_output');
35
 
36
  if(isset($sd_data['saswp-wppostratings-raring']) && $sd_data['saswp-wppostratings-raring'] == 1){
61
  $output = '';
62
  $post_specific_enable = '';
63
  $schema_output = array();
64
+ $kb_schema_output = array();
65
 
66
  $site_navigation = saswp_site_navigation_output();
67
  $contact_page_output = saswp_contact_page_output();
70
  $archive_output = saswp_archive_output();
71
  $schema_breadcrumb_output = saswp_schema_breadcrumb_output();
72
  $kb_website_output = saswp_kb_website_output();
73
+
74
+ if((is_home() || is_front_page() || ( function_exists('ampforwp_is_home') && ampforwp_is_home())) || isset($sd_data['saswp-defragment']) && $sd_data['saswp-defragment'] == 1 ){
75
+ $kb_schema_output = saswp_kb_schema_output();
76
+ }
77
 
78
  if(is_singular()){
79
 
116
  $output .= saswp_json_print_format($archive_output);
117
  $output .= ",";
118
  $output .= "\n\n";
119
+ }
 
 
 
 
 
 
120
 
121
  if(isset($sd_data['saswp-defragment']) && $sd_data['saswp-defragment'] == 1){
122
 
140
  unset($webpage['mainEntity']);
141
  unset($kb_schema_output['@context']);
142
  unset($kb_website_output['@context']);
 
143
 
144
  if($webpage){
145
 
151
  '@id' => get_permalink().'#primaryimage'
152
  );
153
 
154
+ if($site_navigation){
155
+ unset($site_navigation['@context']);
156
+ $site_navigation = $site_navigation['@graph'];
157
+ $webpage['mainContentOfPage'] = array($site_navigation);
158
+ }
159
+
160
  }
161
 
162
  $soutput['mainEntityOfPage'] = $webpage['@id'];
240
 
241
 
242
  }else{
243
+
244
+ if(!empty($site_navigation)){
245
+
246
+ $output .= saswp_json_print_format($site_navigation);
247
+ $output .= ",";
248
+ $output .= "\n\n";
249
+ }
250
+
251
  if(!empty($kb_website_output)){
252
 
253
  $output .= saswp_json_print_format($kb_website_output);
833
 
834
  add_action( 'rank_math/json_ld', 'saswp_remove_rank_math_schema',99 );
835
 
836
+ /**
837
+ * Function to format json output
838
+ * @global type $sd_data
839
+ * @param type $output_array
840
+ * @return type json
841
+ */
842
  function saswp_json_print_format($output_array){
843
 
844
  global $sd_data;
872
  return $content;
873
  }
874
 
875
+ /**
876
+ * This is a global option to hide and show all the features of this plugin.
877
+ * @global type $sd_data
878
+ * @return boolean
879
+ *
880
+ */
881
  function saswp_global_option(){
882
 
883
  global $sd_data;
895
  }
896
 
897
  }
898
+ /**
899
+ * Function to get post tags as a comma separated string.
900
+ * @global type $post
901
+ * @return string
902
+ * @since version 1.9
903
+ */
904
+ function saswp_get_the_tags(){
905
+
906
+ global $post;
907
+ $tag_str = '';
908
+
909
+ if(is_object($post)){
910
+
911
+ $tags = get_the_tags($post->ID);
912
+
913
+ if($tags){
914
+
915
+ foreach($tags as $tag){
916
+
917
+ $tag_str .= $tag->name.', ';
918
+
919
+ }
920
+
921
+ }
922
+
923
+
924
+ }
925
+ return $tag_str;
926
+
927
+ }
output/output.php CHANGED
@@ -122,7 +122,7 @@ function saswp_kb_schema_output() {
122
  $input = array(
123
  '@context' =>'http://schema.org',
124
  '@type' => 'Organization',
125
- '@id' => $site_url.'/#Organization',
126
  'name' => saswp_remove_warnings($sd_data, 'sd_name', 'saswp_string'),
127
  'url' => saswp_remove_warnings($sd_data, 'sd_url', 'saswp_string'),
128
  'sameAs' => $platform,
@@ -215,11 +215,11 @@ function saswp_schema_output() {
215
  $schema_type = saswp_remove_warnings($schemaConditionals, 'schema_type', 'saswp_string');
216
  $schema_post_id = saswp_remove_warnings($schemaConditionals, 'post_id', 'saswp_string');
217
 
218
-
219
  $logo = '';
220
  $height = '';
221
- $width = '';
222
- $site_name = '';
223
 
224
  $service_object = new saswp_output_service();
225
  $default_logo = $service_object->saswp_get_publisher(true);
@@ -233,15 +233,9 @@ function saswp_schema_output() {
233
 
234
  }
235
 
236
- if(isset($sd_data['sd_name']) && $sd_data['sd_name'] !=''){
237
-
238
- $site_name = $sd_data['sd_name'];
239
-
240
- }else{
241
-
242
- $site_name = get_bloginfo();
243
-
244
- }
245
 
246
 
247
  $image_id = get_post_thumbnail_id();
@@ -300,6 +294,7 @@ function saswp_schema_output() {
300
  $schema_type == 'HowTo' ||
301
  $schema_type == 'TVSeries' ||
302
  $schema_type == 'MedicalCondition' ||
 
303
  $schema_type == 'Apartment' ||
304
  $schema_type == 'House' ||
305
  $schema_type == 'TouristDestination' ||
@@ -327,10 +322,10 @@ function saswp_schema_output() {
327
  $input1 = array(
328
  '@context' => 'http://schema.org',
329
  '@type' => $schema_type ,
330
- '@id' => get_permalink().'/#course',
331
  'name' => saswp_get_the_title(),
332
  'description' => $description,
333
- 'url' => get_permalink(),
334
  'datePublished' => esc_html($date),
335
  'dateModified' => esc_html($modified_date),
336
  'provider' => array(
@@ -363,7 +358,7 @@ function saswp_schema_output() {
363
  $input1 = array(
364
  '@context' => 'http://schema.org',
365
  '@type' => 'DiscussionForumPosting' ,
366
- '@id' => bbp_get_topic_permalink().'/#discussionforumposting',
367
  'headline' => bbp_get_topic_title(get_the_ID()),
368
  'description' => saswp_get_the_excerpt(),
369
  "articleSection" => bbp_get_forum_title(),
@@ -384,10 +379,10 @@ function saswp_schema_output() {
384
  $input1 = array(
385
  '@context' => 'http://schema.org',
386
  '@type' => 'DiscussionForumPosting' ,
387
- '@id' => get_permalink().'/#blogposting',
388
  'headline' => saswp_get_the_title(),
389
  'description' => saswp_get_the_excerpt(),
390
- 'url' => get_permalink(),
391
  'datePublished' => esc_html($date),
392
  'dateModified' => esc_html($modified_date),
393
  'author' => saswp_get_author_details()
@@ -422,13 +417,14 @@ function saswp_schema_output() {
422
  $input1 = array(
423
  '@context' => 'http://schema.org',
424
  '@type' => 'BlogPosting' ,
425
- '@id' => get_permalink().'/#blogposting',
426
- 'mainEntityOfPage' => get_permalink(),
427
  'headline' => saswp_get_the_title(),
428
  'description' => saswp_get_the_excerpt(),
429
- 'articleBody' => saswp_get_the_content(),
 
430
  'name' => saswp_get_the_title(),
431
- 'url' => get_permalink(),
432
  'datePublished' => esc_html($date),
433
  'dateModified' => esc_html($modified_date),
434
  'author' => saswp_get_author_details()
@@ -443,6 +439,7 @@ function saswp_schema_output() {
443
  $service = new saswp_output_service();
444
  $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
445
  }
 
446
  if(!empty($aggregateRating)){
447
  $input1['aggregateRating'] = $aggregateRating;
448
  }
@@ -463,7 +460,7 @@ function saswp_schema_output() {
463
  $input1 = array(
464
  '@context' => 'http://schema.org',
465
  '@type' => $schema_type ,
466
- '@id' => get_permalink().'/#audioobject',
467
  'name' => saswp_remove_warnings($schema_data, 'saswp_audio_schema_name', 'saswp_string'),
468
  'description' => saswp_remove_warnings($schema_data, 'saswp_audio_schema_description', 'saswp_string'),
469
  'contentUrl' => saswp_remove_warnings($schema_data, 'saswp_audio_schema_contenturl', 'saswp_string'),
@@ -520,7 +517,7 @@ function saswp_schema_output() {
520
  $input1 = array(
521
  '@context' => 'http://schema.org',
522
  '@type' => $schema_type ,
523
- '@id' => get_permalink().'/#event',
524
  'name' => saswp_remove_warnings($schema_data, 'saswp_event_schema_name', 'saswp_string'),
525
  'description' => saswp_remove_warnings($schema_data, 'saswp_event_schema_description', 'saswp_string'),
526
  'startDate' => isset($schema_data['saswp_event_schema_start_date']) && $schema_data['saswp_event_schema_start_date'] !='' ? date('Y-m-d\TH:i:s\Z',strtotime($schema_data['saswp_event_schema_start_date'])):'',
@@ -585,7 +582,7 @@ function saswp_schema_output() {
585
  $input1 = array(
586
  '@context' => 'http://schema.org',
587
  '@type' => $schema_type ,
588
- '@id' => get_permalink().'/#softwareapplication',
589
  'name' => saswp_remove_warnings($schema_data, 'saswp_software_schema_name', 'saswp_string'),
590
  'description' => saswp_remove_warnings($schema_data, 'saswp_software_schema_description', 'saswp_string'),
591
  'operatingSystem' => saswp_remove_warnings($schema_data, 'saswp_software_schema_operating_system', 'saswp_string'),
@@ -699,15 +696,15 @@ function saswp_schema_output() {
699
  $input1 = array(
700
  '@context' => 'http://schema.org',
701
  '@type' => $schema_type ,
702
- '@id' => get_permalink().'/#recipe',
703
- 'url' => get_permalink(),
704
  'name' => saswp_get_the_title(),
705
  'datePublished' => esc_html($date),
706
  'dateModified' => esc_html($modified_date),
707
  'description' => saswp_get_the_excerpt(),
708
  'mainEntity' => array(
709
  '@type' => 'WebPage',
710
- '@id' => get_permalink(),
711
  'author' => saswp_get_author_details()
712
  ),
713
 
@@ -758,8 +755,8 @@ function saswp_schema_output() {
758
  $input1 = array(
759
  '@context' => 'http://schema.org',
760
  '@type' => 'Product',
761
- '@id' => get_permalink().'/#product',
762
- 'url' => get_permalink(),
763
  'name' => saswp_remove_warnings($product_details, 'product_name', 'saswp_string'),
764
  'sku' => saswp_remove_warnings($product_details, 'product_sku', 'saswp_string'),
765
  'description' => saswp_remove_warnings($product_details, 'product_description', 'saswp_string'),
@@ -768,7 +765,7 @@ function saswp_schema_output() {
768
  'availability' => saswp_remove_warnings($product_details, 'product_availability', 'saswp_string'),
769
  'price' => saswp_remove_warnings($product_details, 'product_price', 'saswp_string'),
770
  'priceCurrency' => saswp_remove_warnings($product_details, 'product_currency', 'saswp_string'),
771
- 'url' => get_permalink(),
772
  'priceValidUntil' => saswp_remove_warnings($product_details, 'product_priceValidUntil', 'saswp_string'),
773
  ),
774
 
@@ -849,22 +846,23 @@ function saswp_schema_output() {
849
  $input1 = array(
850
  '@context' => 'http://schema.org',
851
  '@type' => $schema_type ,
852
- '@id' => get_permalink().'/#newsarticle',
853
- 'url' => get_permalink(),
854
  'headline' => saswp_get_the_title(),
855
  'mainEntityOfPage' => get_the_permalink(),
856
  'datePublished' => esc_html($date),
857
  'dateModified' => esc_html($modified_date),
858
  'description' => saswp_get_the_excerpt(),
859
  'articleSection' => $article_section,
860
- 'articleBody' => saswp_get_the_content(),
 
861
  'name' => saswp_get_the_title(),
862
  'thumbnailUrl' => saswp_remove_warnings($image_details, 0, 'saswp_string'),
863
  'wordCount' => saswp_remove_warnings($word_count, 'word_count', 'saswp_string'),
864
  'timeRequired' => saswp_remove_warnings($word_count, 'timerequired', 'saswp_string'),
865
  'mainEntity' => array(
866
  '@type' => 'WebPage',
867
- '@id' => get_permalink(),
868
  ),
869
  'author' => saswp_get_author_details()
870
  );
@@ -904,7 +902,7 @@ function saswp_schema_output() {
904
  $input1 = array(
905
  '@context' => 'http://schema.org',
906
  '@type' => $schema_type ,
907
- '@id' => get_permalink().'/#service',
908
  'name' => saswp_remove_warnings($schema_data, 'saswp_service_schema_name', 'saswp_string'),
909
  'serviceType' => saswp_remove_warnings($schema_data, 'saswp_service_schema_type', 'saswp_string'),
910
  'provider' => array(
@@ -916,7 +914,7 @@ function saswp_schema_output() {
916
  'width' => isset($schema_data['saswp_service_schema_image']) ? esc_attr($schema_data['saswp_service_schema_image']['width']):'' ,
917
  'height' => isset($schema_data['saswp_service_schema_image']) ? esc_attr($schema_data['saswp_service_schema_image']['height']):'' ,
918
  ),
919
- '@id' => get_permalink(),
920
  'address' => array(
921
  '@type' => 'PostalAddress',
922
  'addressLocality' => saswp_remove_warnings($schema_data, 'saswp_service_schema_locality', 'saswp_string'),
@@ -992,14 +990,14 @@ function saswp_schema_output() {
992
  $input1 = array(
993
  '@context' => 'http://schema.org',
994
  '@type' => 'Review',
995
- '@id' => get_permalink().'/#review',
996
  'dateCreated' => esc_html($date),
997
  'datePublished' => esc_html($date),
998
  'dateModified' => esc_html($modified_date),
999
  'headline' => saswp_get_the_title(),
1000
  'name' => saswp_get_the_title(),
1001
  'keywords' => tie_get_plain_terms( get_the_ID(), 'post_tag' ),
1002
- 'url' => get_permalink(),
1003
  'description' => saswp_get_the_excerpt(),
1004
  'articleBody' => saswp_get_the_content(),
1005
  'copyrightYear' => get_the_time( 'Y' ),
@@ -1044,7 +1042,7 @@ function saswp_schema_output() {
1044
 
1045
  $input1['@context'] = 'http://schema.org';
1046
  $input1['@type'] = esc_attr($schema_type);
1047
- $input1['url'] = get_permalink();
1048
  $input1['datePublished'] = esc_html($date);
1049
  $input1['dateModified'] = esc_html($modified_date);
1050
 
@@ -1180,7 +1178,7 @@ function saswp_schema_output() {
1180
 
1181
  if($review_author){
1182
 
1183
- $input1['author']['sameAs'] = get_permalink();
1184
 
1185
  }
1186
 
@@ -1257,8 +1255,8 @@ function saswp_schema_output() {
1257
  $input1 = array(
1258
  '@context' => 'http://schema.org',
1259
  '@type' => 'VideoObject',
1260
- '@id' => get_permalink().'/#videoobject',
1261
- 'url' => get_permalink(),
1262
  'headline' => saswp_get_the_title(),
1263
  'datePublished' => esc_html($date),
1264
  'dateModified' => esc_html($modified_date),
@@ -1268,7 +1266,7 @@ function saswp_schema_output() {
1268
  'thumbnailUrl' => isset($image_details[0]) ? esc_url($image_details[0]):'',
1269
  'mainEntity' => array(
1270
  '@type' => 'WebPage',
1271
- '@id' => get_permalink(),
1272
  ),
1273
  'author' => saswp_get_author_details()
1274
  );
@@ -1306,18 +1304,20 @@ function saswp_schema_output() {
1306
 
1307
  $local_business = $business_name;
1308
 
1309
- }else{
1310
 
1311
  $local_business = $business_type;
1312
 
 
 
1313
  }
1314
 
1315
  $input1 = array(
1316
  '@context' => 'http://schema.org',
1317
  '@type' => esc_attr($local_business),
1318
- '@id' => get_permalink().'/#'. strtolower(esc_attr($local_business)),
1319
  'name' => saswp_remove_warnings($business_details, 'local_business_name', 'saswp_string'),
1320
- 'url' => get_permalink(),
1321
  'description' => saswp_remove_warnings($business_details, 'local_business_description', 'saswp_string'),
1322
  'image' => array(
1323
  '@type' => 'ImageObject',
@@ -1428,8 +1428,7 @@ function saswp_schema_output() {
1428
 
1429
  $input1 = apply_filters('saswp_modify_local_business_schema_output', $input1 );
1430
  }
1431
-
1432
-
1433
  //Speakable schema
1434
 
1435
  if($schema_type == 'TechArticle' || $schema_type == 'Article' || $schema_type == 'Blogposting' || $schema_type == 'NewsArticle' || $schema_type == 'WebPage'){
@@ -1514,8 +1513,7 @@ function saswp_schema_output() {
1514
 
1515
  if(!empty($input1)){
1516
  $all_schema_output[] = $input1;
1517
- }
1518
- //}
1519
  }
1520
 
1521
  return apply_filters('saswp_modify_schema_output', $all_schema_output);
@@ -1616,16 +1614,15 @@ function saswp_post_specific_schema_output() {
1616
  if( 'Person' === $schema_type){
1617
 
1618
  $image = get_post_meta( get_the_ID(), 'saswp_trip_schema_image_'.$schema_id.'_detail',true);
1619
-
1620
-
1621
  $input1['@context'] = 'http://schema.org';
1622
  $input1['@type'] = 'Person';
1623
- $input1['@id'] = get_permalink().'/#Person';
1624
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_url_'.$schema_id, 'saswp_array');
1625
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_name_'.$schema_id, 'saswp_array');
1626
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_description_'.$schema_id, 'saswp_array');
1627
  $input1['gender'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_gender_'.$schema_id, 'saswp_array');
1628
- $input1['birthDate'] = isset($all_post_meta['saswp_person_schema_date_of_birth_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_person_schema_date_of_birth_'.$schema_id][0])):'';
1629
  $input1['nationality'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_nationality_'.$schema_id, 'saswp_array');
1630
  $input1['jobTitle'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_job_title_'.$schema_id, 'saswp_array');
1631
 
@@ -1657,7 +1654,7 @@ function saswp_post_specific_schema_output() {
1657
 
1658
  $input1['@context'] = 'http://schema.org';
1659
  $input1['@type'] = 'Trip';
1660
- $input1['@id'] = get_permalink().'/#Trip';
1661
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_trip_schema_url_'.$schema_id, 'saswp_array');
1662
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_trip_schema_name_'.$schema_id, 'saswp_array');
1663
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_trip_schema_description_'.$schema_id, 'saswp_array');
@@ -1694,6 +1691,33 @@ function saswp_post_specific_schema_output() {
1694
 
1695
  }
1696
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1697
  if( 'JobPosting' === $schema_type){
1698
 
1699
  $howto_image = get_post_meta( get_the_ID(), 'saswp_jobposting_schema_ho_logo_'.$schema_id.'_detail',true);
@@ -1701,7 +1725,7 @@ function saswp_post_specific_schema_output() {
1701
 
1702
  $input1['@context'] = 'http://schema.org';
1703
  $input1['@type'] = 'JobPosting';
1704
- $input1['@id'] = get_permalink().'/#JobPosting';
1705
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_url_'.$schema_id, 'saswp_array');
1706
  $input1['title'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_title_'.$schema_id, 'saswp_array');
1707
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_description_'.$schema_id, 'saswp_array');
@@ -1746,7 +1770,7 @@ function saswp_post_specific_schema_output() {
1746
 
1747
  $input1['@context'] = 'http://schema.org';
1748
  $input1['@type'] = 'Mosque';
1749
- $input1['@id'] = get_permalink().'/#Mosque';
1750
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_mosque_schema_url_'.$schema_id, 'saswp_array');
1751
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_mosque_schema_name_'.$schema_id, 'saswp_array');
1752
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_mosque_schema_description_'.$schema_id, 'saswp_array');
@@ -1779,7 +1803,7 @@ function saswp_post_specific_schema_output() {
1779
 
1780
  $input1['@context'] = 'http://schema.org';
1781
  $input1['@type'] = 'Church';
1782
- $input1['@id'] = get_permalink().'/#Church';
1783
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_church_schema_url_'.$schema_id, 'saswp_array');
1784
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_church_schema_name_'.$schema_id, 'saswp_array');
1785
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_church_schema_description_'.$schema_id, 'saswp_array');
@@ -1812,7 +1836,7 @@ function saswp_post_specific_schema_output() {
1812
 
1813
  $input1['@context'] = 'http://schema.org';
1814
  $input1['@type'] = 'HinduTemple';
1815
- $input1['@id'] = get_permalink().'/#HinduTemple';
1816
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_url_'.$schema_id, 'saswp_array');
1817
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_name_'.$schema_id, 'saswp_array');
1818
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_description_'.$schema_id, 'saswp_array');
@@ -1845,7 +1869,7 @@ function saswp_post_specific_schema_output() {
1845
 
1846
  $input1['@context'] = 'http://schema.org';
1847
  $input1['@type'] = 'LandmarksOrHistoricalBuildings';
1848
- $input1['@id'] = get_permalink().'/#LandmarksOrHistoricalBuildings';
1849
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_lorh_schema_url_'.$schema_id, 'saswp_array');
1850
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_lorh_schema_name_'.$schema_id, 'saswp_array');
1851
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_lorh_schema_description_'.$schema_id, 'saswp_array');
@@ -1878,7 +1902,7 @@ function saswp_post_specific_schema_output() {
1878
 
1879
  $input1['@context'] = 'http://schema.org';
1880
  $input1['@type'] = 'TouristAttraction';
1881
- $input1['@id'] = get_permalink().'/#TouristAttraction';
1882
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_url_'.$schema_id, 'saswp_array');
1883
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_name_'.$schema_id, 'saswp_array');
1884
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_description_'.$schema_id, 'saswp_array');
@@ -1912,7 +1936,7 @@ function saswp_post_specific_schema_output() {
1912
 
1913
  $input1['@context'] = 'http://schema.org';
1914
  $input1['@type'] = 'TouristDestination';
1915
- $input1['@id'] = get_permalink().'/#TouristDestination';
1916
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_td_schema_url_'.$schema_id, 'saswp_array');
1917
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_td_schema_name_'.$schema_id, 'saswp_array');
1918
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_td_schema_description_'.$schema_id, 'saswp_array');
@@ -1942,7 +1966,7 @@ function saswp_post_specific_schema_output() {
1942
 
1943
  $input1['@context'] = 'http://schema.org';
1944
  $input1['@type'] = 'Apartment';
1945
- $input1['@id'] = get_permalink().'/#Apartment';
1946
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_schema_url_'.$schema_id, 'saswp_array');
1947
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_schema_name_'.$schema_id, 'saswp_array');
1948
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_schema_description_'.$schema_id, 'saswp_array');
@@ -1975,7 +1999,7 @@ function saswp_post_specific_schema_output() {
1975
 
1976
  $input1['@context'] = 'http://schema.org';
1977
  $input1['@type'] = 'House';
1978
- $input1['@id'] = get_permalink().'/#House';
1979
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_house_schema_url_'.$schema_id, 'saswp_array');
1980
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_house_schema_name_'.$schema_id, 'saswp_array');
1981
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_house_schema_description_'.$schema_id, 'saswp_array');
@@ -2007,7 +2031,7 @@ function saswp_post_specific_schema_output() {
2007
 
2008
  $input1['@context'] = 'http://schema.org';
2009
  $input1['@type'] = 'SingleFamilyResidence';
2010
- $input1['@id'] = get_permalink().'/#SingleFamilyResidence';
2011
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_url_'.$schema_id, 'saswp_array');
2012
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_name_'.$schema_id, 'saswp_array');
2013
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_description_'.$schema_id, 'saswp_array');
@@ -2045,7 +2069,7 @@ function saswp_post_specific_schema_output() {
2045
 
2046
  $input1['@context'] = 'http://schema.org';
2047
  $input1['@type'] = 'HowTo';
2048
- $input1['@id'] = get_permalink().'/#HowTo';
2049
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_howto_schema_name_'.$schema_id, 'saswp_array');
2050
  $input1['datePublished'] = isset($all_post_meta['saswp_howto_ec_schema_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_howto_ec_schema_date_published_'.$schema_id][0])):'';
2051
  $input1['dateModified'] = isset($all_post_meta['saswp_howto_ec_schema_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_howto_ec_schema_date_modified_'.$schema_id][0])):'';
@@ -2137,7 +2161,7 @@ function saswp_post_specific_schema_output() {
2137
 
2138
 
2139
  $supply_data['@type'] = 'HowToStep';
2140
- $supply_data['url'] = get_permalink().'#step'.++$key;
2141
  $supply_data['name'] = $val['saswp_howto_step_name'];
2142
  $supply_data['itemListElement'] = array($direction, $tip);
2143
 
@@ -2176,7 +2200,7 @@ function saswp_post_specific_schema_output() {
2176
 
2177
  $input1['@context'] = 'http://schema.org';
2178
  $input1['@type'] = 'TVSeries';
2179
- $input1['@id'] = get_permalink().'/#TVSeries';
2180
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_tvseries_schema_name_'.$schema_id, 'saswp_array');
2181
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_tvseries_schema_description_'.$schema_id, 'saswp_array');
2182
 
@@ -2235,7 +2259,7 @@ function saswp_post_specific_schema_output() {
2235
 
2236
  $input1['@context'] = 'http://schema.org';
2237
  $input1['@type'] = 'MedicalCondition';
2238
- $input1['@id'] = get_permalink().'/#MedicalCondition';
2239
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_mc_schema_name_'.$schema_id, 'saswp_array');
2240
  $input1['alternateName'] = saswp_remove_warnings($all_post_meta, 'saswp_mc_schema_alternate_name_'.$schema_id, 'saswp_array');
2241
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_mc_schema_description_'.$schema_id, 'saswp_array');
@@ -2307,7 +2331,7 @@ function saswp_post_specific_schema_output() {
2307
 
2308
  $input1['@context'] = 'http://schema.org';
2309
  $input1['@type'] = 'VideoGame';
2310
- $input1['@id'] = get_permalink().'/#VideoGame';
2311
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_name_'.$schema_id, 'saswp_array');
2312
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_url_'.$schema_id, 'saswp_array');
2313
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_description_'.$schema_id, 'saswp_array');
@@ -2366,7 +2390,7 @@ function saswp_post_specific_schema_output() {
2366
  $input1 = array(
2367
  '@context' => 'http://schema.org',
2368
  '@type' => 'QAPage',
2369
- '@id' => get_permalink().'/#qapage',
2370
  'mainEntity' => array(
2371
  '@type' => 'Question' ,
2372
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_qa_question_title_'.$schema_id, 'saswp_array'),
@@ -2403,7 +2427,7 @@ function saswp_post_specific_schema_output() {
2403
  $input1 = array(
2404
  '@context' => 'http://schema.org',
2405
  '@type' => 'Event' ,
2406
- '@id' => get_permalink().'/#event',
2407
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_name_'.$schema_id, 'saswp_array'),
2408
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_description_'.$schema_id, 'saswp_array'),
2409
  'startDate' => isset($all_post_meta['saswp_event_schema_start_date_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_event_schema_start_date_'.$schema_id][0])):'',
@@ -2453,7 +2477,7 @@ function saswp_post_specific_schema_output() {
2453
  $input1 = array(
2454
  '@context' => 'http://schema.org',
2455
  '@type' => 'DiscussionForumPosting' ,
2456
- '@id' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_url_'.$schema_id, 'saswp_array').'/#blogposting',
2457
  'headline' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_headline_'.$schema_id, 'saswp_array'),
2458
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_description_'.$schema_id, 'saswp_array'),
2459
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_url_'.$schema_id, 'saswp_array'),
@@ -2472,7 +2496,7 @@ function saswp_post_specific_schema_output() {
2472
  $input1 = array(
2473
  '@context' => 'http://schema.org',
2474
  '@type' => 'Course' ,
2475
- '@id' => get_permalink().'/#course',
2476
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_course_name_'.$schema_id, 'saswp_array'),
2477
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_course_description_'.$schema_id, 'saswp_array'),
2478
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_course_url_'.$schema_id, 'saswp_array'),
@@ -2504,10 +2528,11 @@ function saswp_post_specific_schema_output() {
2504
  $input1 = array(
2505
  '@context' => 'http://schema.org',
2506
  '@type' => 'Blogposting' ,
2507
- '@id' => get_permalink().'/#Blogposting',
2508
  'mainEntityOfPage' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_main_entity_of_page_'.$schema_id, 'saswp_array'),
2509
  'headline' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_headline_'.$schema_id, 'saswp_array'),
2510
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_description_'.$schema_id, 'saswp_array'),
 
2511
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_name_'.$schema_id, 'saswp_array'),
2512
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_url_'.$schema_id, 'saswp_array'),
2513
  'datePublished' => isset($all_post_meta['saswp_blogposting_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_blogposting_date_published_'.$schema_id][0])):'',
@@ -2562,7 +2587,7 @@ function saswp_post_specific_schema_output() {
2562
  $input1 = array(
2563
  '@context' => 'http://schema.org',
2564
  '@type' => $schema_type,
2565
- '@id' => get_permalink().'/#audioobject',
2566
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_audio_schema_name_'.$schema_id, 'saswp_array'),
2567
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_audio_schema_description_'.$schema_id, 'saswp_array'),
2568
  'contentUrl' => saswp_remove_warnings($all_post_meta, 'saswp_audio_schema_contenturl_'.$schema_id, 'saswp_array'),
@@ -2590,7 +2615,7 @@ function saswp_post_specific_schema_output() {
2590
  $input1 = array(
2591
  '@context' => 'http://schema.org',
2592
  '@type' => 'SoftwareApplication',
2593
- '@id' => get_permalink().'/#softwareapplication',
2594
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_software_schema_name_'.$schema_id, 'saswp_array'),
2595
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_software_schema_description_'.$schema_id, 'saswp_array'),
2596
  'operatingSystem' => saswp_remove_warnings($all_post_meta, 'saswp_software_schema_operating_system_'.$schema_id, 'saswp_array'),
@@ -2628,7 +2653,7 @@ function saswp_post_specific_schema_output() {
2628
  $input1 = array(
2629
  '@context' => 'http://schema.org',
2630
  '@type' => 'WebPage' ,
2631
- '@id' => get_permalink().'/#webpage',
2632
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_name_'.$schema_id, 'saswp_array'),
2633
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_url_'.$schema_id, 'saswp_array'),
2634
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_description_'.$schema_id, 'saswp_array'),
@@ -2638,6 +2663,7 @@ function saswp_post_specific_schema_output() {
2638
  'image' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_image_'.$schema_id, 'saswp_array'),
2639
  'headline' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_headline_'.$schema_id, 'saswp_array'),
2640
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_description_'.$schema_id, 'saswp_array'),
 
2641
  'datePublished' => isset($all_post_meta['saswp_webpage_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_webpage_date_published_'.$schema_id][0])):'',
2642
  'dateModified' => isset($all_post_meta['saswp_webpage_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_webpage_date_modified_'.$schema_id][0])):'',
2643
  'author' => array(
@@ -2691,11 +2717,12 @@ function saswp_post_specific_schema_output() {
2691
  $input1 = array(
2692
  '@context' => 'http://schema.org',
2693
  '@type' => 'Article',
2694
- '@id' => get_permalink().'/#article',
2695
  'mainEntityOfPage' => saswp_remove_warnings($all_post_meta, 'saswp_article_main_entity_of_page_'.$schema_id, 'saswp_array'),
2696
  'image' => saswp_remove_warnings($all_post_meta, 'saswp_article_image_'.$schema_id, 'saswp_array'),
2697
  'headline' => saswp_remove_warnings($all_post_meta, 'saswp_article_headline_'.$schema_id, 'saswp_array'),
2698
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_article_description_'.$schema_id, 'saswp_array'),
 
2699
  'datePublished' => isset($all_post_meta['saswp_article_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_article_date_published_'.$schema_id][0])):'',
2700
  'dateModified' => isset($all_post_meta['saswp_article_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_article_date_modified_'.$schema_id][0])):'',
2701
  'author' => array(
@@ -2749,11 +2776,12 @@ function saswp_post_specific_schema_output() {
2749
  $input1 = array(
2750
  '@context' => 'http://schema.org',
2751
  '@type' => 'TechArticle',
2752
- '@id' => get_permalink().'/#techarticle',
2753
  'mainEntityOfPage' => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_main_entity_of_page_'.$schema_id, 'saswp_array'),
2754
  'image' => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_image_'.$schema_id, 'saswp_array'),
2755
  'headline' => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_headline_'.$schema_id, 'saswp_array'),
2756
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_description_'.$schema_id, 'saswp_array'),
 
2757
  'datePublished' => isset($all_post_meta['saswp_tech_article_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_tech_article_date_published_'.$schema_id][0])):'',
2758
  'dateModified' => isset($all_post_meta['saswp_tech_article_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_tech_article_date_modified_'.$schema_id][0])):'',
2759
  'author' => array(
@@ -2850,7 +2878,7 @@ function saswp_post_specific_schema_output() {
2850
  $input1 = array(
2851
  '@context' => 'http://schema.org',
2852
  '@type' => $schema_type ,
2853
- '@id' => get_permalink().'/#recipe',
2854
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_url_'.$schema_id, 'saswp_array'),
2855
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_name_'.$schema_id, 'saswp_array'),
2856
  'image' =>array(
@@ -2939,8 +2967,8 @@ function saswp_post_specific_schema_output() {
2939
  $input1 = array(
2940
  '@context' => 'http://schema.org',
2941
  '@type' => 'Product',
2942
- '@id' => get_permalink().'/#product',
2943
- 'url' => get_permalink(),
2944
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_name_'.$schema_id, 'saswp_array'),
2945
  'sku' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_sku_'.$schema_id, 'saswp_array'),
2946
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_description_'.$schema_id, 'saswp_array'),
@@ -2956,7 +2984,7 @@ function saswp_post_specific_schema_output() {
2956
  'itemCondition' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_condition_'.$schema_id, 'saswp_array'),
2957
  'price' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_price_'.$schema_id, 'saswp_array'),
2958
  'priceCurrency' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_currency_'.$schema_id, 'saswp_array'),
2959
- 'url' => get_permalink(),
2960
  'priceValidUntil' => isset($all_post_meta['saswp_product_schema_priceValidUntil_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_product_schema_priceValidUntil_'.$schema_id][0])):'',
2961
  ),
2962
  'brand' => array('@type' => 'Thing',
@@ -3036,7 +3064,7 @@ function saswp_post_specific_schema_output() {
3036
  $input1 = array(
3037
  '@context' => 'http://schema.org',
3038
  '@type' => 'NewsArticle' ,
3039
- '@id' => get_permalink().'/#newsarticle',
3040
  'mainEntityOfPage' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_main_entity_of_page_'.$schema_id, 'saswp_array'),
3041
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_URL_'.$schema_id, 'saswp_array'),
3042
  'image' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_image_'.$schema_id, 'saswp_array'),
@@ -3044,6 +3072,7 @@ function saswp_post_specific_schema_output() {
3044
  'datePublished' => isset($all_post_meta['saswp_newsarticle_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_newsarticle_date_published_'.$schema_id][0])):'',
3045
  'dateModified' => isset($all_post_meta['saswp_newsarticle_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_newsarticle_date_modified_'.$schema_id][0])):'',
3046
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_description_'.$schema_id, 'saswp_array'),
 
3047
  'articleSection' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_section_'.$schema_id, 'saswp_array'),
3048
  'articleBody' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_body_'.$schema_id, 'saswp_array'),
3049
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_name_'.$schema_id, 'saswp_array'),
@@ -3108,7 +3137,7 @@ function saswp_post_specific_schema_output() {
3108
  $input1 = array(
3109
  '@context' => 'http://schema.org',
3110
  '@type' => 'VideoObject',
3111
- '@id' => get_permalink().'/#videoobject',
3112
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_url_'.$schema_id, 'saswp_array'),
3113
  'headline' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_headline_'.$schema_id, 'saswp_array'),
3114
  'datePublished' => isset($all_post_meta['saswp_video_object_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_video_object_date_published_'.$schema_id][0])):'',
@@ -3165,14 +3194,14 @@ function saswp_post_specific_schema_output() {
3165
  $input1 = array(
3166
  '@context' => 'http://schema.org',
3167
  '@type' => $schema_type ,
3168
- '@id' => get_permalink().'/#service',
3169
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_service_schema_name_'.$schema_id, 'saswp_array'),
3170
  'serviceType' => saswp_remove_warnings($all_post_meta, 'saswp_service_schema_type_'.$schema_id, 'saswp_array'),
3171
  'provider' => array(
3172
  '@type' => saswp_remove_warnings($all_post_meta, 'saswp_service_schema_provider_type_'.$schema_id, 'saswp_array'),
3173
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_service_schema_provider_name_'.$schema_id, 'saswp_array'),
3174
  'image' => saswp_remove_warnings($all_post_meta, 'saswp_service_schema_image_'.$schema_id, 'saswp_array'),
3175
- '@id' => get_permalink(),
3176
  'address' => array(
3177
  '@type' => 'PostalAddress',
3178
  'addressLocality' => saswp_remove_warnings($all_post_meta, 'saswp_service_schema_locality_'.$schema_id, 'saswp_array'),
@@ -3239,8 +3268,8 @@ function saswp_post_specific_schema_output() {
3239
 
3240
  $input1['@context'] = 'http://schema.org';
3241
  $input1['@type'] = 'Review';
3242
- $input1['@id'] = get_permalink().'/#review';
3243
- $input1['url'] = get_permalink();
3244
  $input1['datePublished'] = get_the_date("Y-m-d\TH:i:s\Z");
3245
  $input1['dateModified'] = get_the_modified_date("Y-m-d\TH:i:s\Z");
3246
 
@@ -3396,7 +3425,7 @@ function saswp_post_specific_schema_output() {
3396
 
3397
  if($review_author){
3398
 
3399
- $input1['author']['sameAs'] = get_permalink();
3400
 
3401
  }
3402
 
@@ -3461,10 +3490,14 @@ function saswp_post_specific_schema_output() {
3461
 
3462
  $local_business = $business_sub_name;
3463
 
3464
- }else{
3465
 
3466
  $local_business = $business_type;
3467
 
 
 
 
 
3468
  }
3469
 
3470
  $local_image = get_post_meta( get_the_ID(), 'local_business_logo_'.$schema_id.'_detail',true);
@@ -3472,7 +3505,7 @@ function saswp_post_specific_schema_output() {
3472
  $input1 = array(
3473
  '@context' => 'http://schema.org',
3474
  '@type' => $local_business ,
3475
- '@id' => get_permalink().'/#'. strtolower($local_business),
3476
  'name' => saswp_remove_warnings($all_post_meta, 'local_business_name_'.$schema_id, 'saswp_array'),
3477
  'url' => saswp_remove_warnings($all_post_meta, 'local_business_name_url_'.$schema_id, 'saswp_array'),
3478
  'description' => saswp_remove_warnings($all_post_meta, 'local_business_description_'.$schema_id, 'saswp_array'),
@@ -3645,7 +3678,7 @@ function saswp_schema_breadcrumb_output(){
3645
  $input = array(
3646
  '@context' => 'http://schema.org',
3647
  '@type' => 'BreadcrumbList' ,
3648
- '@id' => get_permalink().'#breadcrumb' ,
3649
  'itemListElement' => $bread_crumb_list,
3650
  );
3651
 
@@ -3678,7 +3711,7 @@ function saswp_kb_website_output(){
3678
  $input = array(
3679
  '@context' => 'http://schema.org',
3680
  '@type' => 'WebSite',
3681
- '@id' => $site_url.'/#website',
3682
  'url' => $site_url,
3683
  'name' => $site_name,
3684
  );
@@ -3749,8 +3782,7 @@ function saswp_archive_output(){
3749
  $archive_image['width'] = esc_attr($sd_data['sd_default_image_width']);
3750
  $archive_image['height'] = esc_attr($sd_data['sd_default_image_height']);
3751
  }
3752
-
3753
-
3754
  }
3755
 
3756
  $publisher_info = array(
@@ -3890,9 +3922,9 @@ function saswp_about_page_output(){
3890
  "@type" => "AboutPage",
3891
  "mainEntityOfPage" => array(
3892
  "@type" => "WebPage",
3893
- "@id" => get_permalink(),
3894
  ),
3895
- "url" => get_permalink(),
3896
  "headline" => saswp_get_the_title(),
3897
  'description' => saswp_get_the_excerpt(),
3898
  );
@@ -3935,9 +3967,9 @@ function saswp_contact_page_output(){
3935
  "@type" => "ContactPage",
3936
  "mainEntityOfPage" => array(
3937
  "@type" => "WebPage",
3938
- "@id" => get_permalink(),
3939
  ),
3940
- "url" => get_permalink(),
3941
  "headline" => saswp_get_the_title(),
3942
  'description' => saswp_get_the_excerpt(),
3943
  );
@@ -3966,11 +3998,56 @@ function saswp_contact_page_output(){
3966
  */
3967
  function saswp_site_navigation_output(){
3968
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3969
  global $sd_data;
3970
  $input = array();
3971
-
3972
- if(isset($sd_data['saswp_site_navigation_menu']) && $sd_data['saswp_site_navigation_menu'] == 1 ){
3973
-
3974
  $navObj = array();
3975
 
3976
  $menuLocations = get_nav_menu_locations();
@@ -4038,7 +4115,7 @@ function saswp_site_navigation_output(){
4038
 
4039
  }
4040
 
4041
- }
4042
 
4043
- return apply_filters('saswp_modify_sitenavigation_output', $input);
4044
- }
122
  $input = array(
123
  '@context' =>'http://schema.org',
124
  '@type' => 'Organization',
125
+ '@id' => $site_url.'#Organization',
126
  'name' => saswp_remove_warnings($sd_data, 'sd_name', 'saswp_string'),
127
  'url' => saswp_remove_warnings($sd_data, 'sd_url', 'saswp_string'),
128
  'sameAs' => $platform,
215
  $schema_type = saswp_remove_warnings($schemaConditionals, 'schema_type', 'saswp_string');
216
  $schema_post_id = saswp_remove_warnings($schemaConditionals, 'post_id', 'saswp_string');
217
 
218
+ $input1 = array();
219
  $logo = '';
220
  $height = '';
221
+ $width = '';
222
+ $site_name = get_bloginfo();
223
 
224
  $service_object = new saswp_output_service();
225
  $default_logo = $service_object->saswp_get_publisher(true);
233
 
234
  }
235
 
236
+ if(isset($sd_data['sd_name']) && $sd_data['sd_name'] !=''){
237
+ $site_name = $sd_data['sd_name'];
238
+ }
 
 
 
 
 
 
239
 
240
 
241
  $image_id = get_post_thumbnail_id();
294
  $schema_type == 'HowTo' ||
295
  $schema_type == 'TVSeries' ||
296
  $schema_type == 'MedicalCondition' ||
297
+ $schema_type == 'FAQ' ||
298
  $schema_type == 'Apartment' ||
299
  $schema_type == 'House' ||
300
  $schema_type == 'TouristDestination' ||
322
  $input1 = array(
323
  '@context' => 'http://schema.org',
324
  '@type' => $schema_type ,
325
+ '@id' => trailingslashit(get_permalink()).'#course',
326
  'name' => saswp_get_the_title(),
327
  'description' => $description,
328
+ 'url' => trailingslashit(get_permalink()),
329
  'datePublished' => esc_html($date),
330
  'dateModified' => esc_html($modified_date),
331
  'provider' => array(
358
  $input1 = array(
359
  '@context' => 'http://schema.org',
360
  '@type' => 'DiscussionForumPosting' ,
361
+ '@id' => bbp_get_topic_permalink().'#discussionforumposting',
362
  'headline' => bbp_get_topic_title(get_the_ID()),
363
  'description' => saswp_get_the_excerpt(),
364
  "articleSection" => bbp_get_forum_title(),
379
  $input1 = array(
380
  '@context' => 'http://schema.org',
381
  '@type' => 'DiscussionForumPosting' ,
382
+ '@id' => trailingslashit(get_permalink()).'#blogposting',
383
  'headline' => saswp_get_the_title(),
384
  'description' => saswp_get_the_excerpt(),
385
+ 'url' => trailingslashit(get_permalink()),
386
  'datePublished' => esc_html($date),
387
  'dateModified' => esc_html($modified_date),
388
  'author' => saswp_get_author_details()
417
  $input1 = array(
418
  '@context' => 'http://schema.org',
419
  '@type' => 'BlogPosting' ,
420
+ '@id' => trailingslashit(get_permalink()).'#blogposting',
421
+ 'mainEntityOfPage' => trailingslashit(get_permalink()),
422
  'headline' => saswp_get_the_title(),
423
  'description' => saswp_get_the_excerpt(),
424
+ 'articleBody' => saswp_get_the_content(),
425
+ 'keywords' => saswp_get_the_tags(),
426
  'name' => saswp_get_the_title(),
427
+ 'url' => trailingslashit(get_permalink()),
428
  'datePublished' => esc_html($date),
429
  'dateModified' => esc_html($modified_date),
430
  'author' => saswp_get_author_details()
439
  $service = new saswp_output_service();
440
  $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
441
  }
442
+
443
  if(!empty($aggregateRating)){
444
  $input1['aggregateRating'] = $aggregateRating;
445
  }
460
  $input1 = array(
461
  '@context' => 'http://schema.org',
462
  '@type' => $schema_type ,
463
+ '@id' => trailingslashit(get_permalink()).'#audioobject',
464
  'name' => saswp_remove_warnings($schema_data, 'saswp_audio_schema_name', 'saswp_string'),
465
  'description' => saswp_remove_warnings($schema_data, 'saswp_audio_schema_description', 'saswp_string'),
466
  'contentUrl' => saswp_remove_warnings($schema_data, 'saswp_audio_schema_contenturl', 'saswp_string'),
517
  $input1 = array(
518
  '@context' => 'http://schema.org',
519
  '@type' => $schema_type ,
520
+ '@id' => trailingslashit(get_permalink()).'#event',
521
  'name' => saswp_remove_warnings($schema_data, 'saswp_event_schema_name', 'saswp_string'),
522
  'description' => saswp_remove_warnings($schema_data, 'saswp_event_schema_description', 'saswp_string'),
523
  'startDate' => isset($schema_data['saswp_event_schema_start_date']) && $schema_data['saswp_event_schema_start_date'] !='' ? date('Y-m-d\TH:i:s\Z',strtotime($schema_data['saswp_event_schema_start_date'])):'',
582
  $input1 = array(
583
  '@context' => 'http://schema.org',
584
  '@type' => $schema_type ,
585
+ '@id' => trailingslashit(get_permalink()).'#softwareapplication',
586
  'name' => saswp_remove_warnings($schema_data, 'saswp_software_schema_name', 'saswp_string'),
587
  'description' => saswp_remove_warnings($schema_data, 'saswp_software_schema_description', 'saswp_string'),
588
  'operatingSystem' => saswp_remove_warnings($schema_data, 'saswp_software_schema_operating_system', 'saswp_string'),
696
  $input1 = array(
697
  '@context' => 'http://schema.org',
698
  '@type' => $schema_type ,
699
+ '@id' => trailingslashit(get_permalink()).'#recipe',
700
+ 'url' => trailingslashit(get_permalink()),
701
  'name' => saswp_get_the_title(),
702
  'datePublished' => esc_html($date),
703
  'dateModified' => esc_html($modified_date),
704
  'description' => saswp_get_the_excerpt(),
705
  'mainEntity' => array(
706
  '@type' => 'WebPage',
707
+ '@id' => trailingslashit(get_permalink()),
708
  'author' => saswp_get_author_details()
709
  ),
710
 
755
  $input1 = array(
756
  '@context' => 'http://schema.org',
757
  '@type' => 'Product',
758
+ '@id' => trailingslashit(get_permalink()).'#product',
759
+ 'url' => trailingslashit(get_permalink()),
760
  'name' => saswp_remove_warnings($product_details, 'product_name', 'saswp_string'),
761
  'sku' => saswp_remove_warnings($product_details, 'product_sku', 'saswp_string'),
762
  'description' => saswp_remove_warnings($product_details, 'product_description', 'saswp_string'),
765
  'availability' => saswp_remove_warnings($product_details, 'product_availability', 'saswp_string'),
766
  'price' => saswp_remove_warnings($product_details, 'product_price', 'saswp_string'),
767
  'priceCurrency' => saswp_remove_warnings($product_details, 'product_currency', 'saswp_string'),
768
+ 'url' => trailingslashit(get_permalink()),
769
  'priceValidUntil' => saswp_remove_warnings($product_details, 'product_priceValidUntil', 'saswp_string'),
770
  ),
771
 
846
  $input1 = array(
847
  '@context' => 'http://schema.org',
848
  '@type' => $schema_type ,
849
+ '@id' => trailingslashit(get_permalink()).'#newsarticle',
850
+ 'url' => trailingslashit(get_permalink()),
851
  'headline' => saswp_get_the_title(),
852
  'mainEntityOfPage' => get_the_permalink(),
853
  'datePublished' => esc_html($date),
854
  'dateModified' => esc_html($modified_date),
855
  'description' => saswp_get_the_excerpt(),
856
  'articleSection' => $article_section,
857
+ 'articleBody' => saswp_get_the_content(),
858
+ 'keywords' => saswp_get_the_tags(),
859
  'name' => saswp_get_the_title(),
860
  'thumbnailUrl' => saswp_remove_warnings($image_details, 0, 'saswp_string'),
861
  'wordCount' => saswp_remove_warnings($word_count, 'word_count', 'saswp_string'),
862
  'timeRequired' => saswp_remove_warnings($word_count, 'timerequired', 'saswp_string'),
863
  'mainEntity' => array(
864
  '@type' => 'WebPage',
865
+ '@id' => trailingslashit(get_permalink()),
866
  ),
867
  'author' => saswp_get_author_details()
868
  );
902
  $input1 = array(
903
  '@context' => 'http://schema.org',
904
  '@type' => $schema_type ,
905
+ '@id' => trailingslashit(get_permalink()).'#service',
906
  'name' => saswp_remove_warnings($schema_data, 'saswp_service_schema_name', 'saswp_string'),
907
  'serviceType' => saswp_remove_warnings($schema_data, 'saswp_service_schema_type', 'saswp_string'),
908
  'provider' => array(
914
  'width' => isset($schema_data['saswp_service_schema_image']) ? esc_attr($schema_data['saswp_service_schema_image']['width']):'' ,
915
  'height' => isset($schema_data['saswp_service_schema_image']) ? esc_attr($schema_data['saswp_service_schema_image']['height']):'' ,
916
  ),
917
+ '@id' => trailingslashit(get_permalink()),
918
  'address' => array(
919
  '@type' => 'PostalAddress',
920
  'addressLocality' => saswp_remove_warnings($schema_data, 'saswp_service_schema_locality', 'saswp_string'),
990
  $input1 = array(
991
  '@context' => 'http://schema.org',
992
  '@type' => 'Review',
993
+ '@id' => trailingslashit(get_permalink()).'#review',
994
  'dateCreated' => esc_html($date),
995
  'datePublished' => esc_html($date),
996
  'dateModified' => esc_html($modified_date),
997
  'headline' => saswp_get_the_title(),
998
  'name' => saswp_get_the_title(),
999
  'keywords' => tie_get_plain_terms( get_the_ID(), 'post_tag' ),
1000
+ 'url' => trailingslashit(get_permalink()),
1001
  'description' => saswp_get_the_excerpt(),
1002
  'articleBody' => saswp_get_the_content(),
1003
  'copyrightYear' => get_the_time( 'Y' ),
1042
 
1043
  $input1['@context'] = 'http://schema.org';
1044
  $input1['@type'] = esc_attr($schema_type);
1045
+ $input1['url'] = trailingslashit(get_permalink());
1046
  $input1['datePublished'] = esc_html($date);
1047
  $input1['dateModified'] = esc_html($modified_date);
1048
 
1178
 
1179
  if($review_author){
1180
 
1181
+ $input1['author']['sameAs'] = trailingslashit(get_permalink());
1182
 
1183
  }
1184
 
1255
  $input1 = array(
1256
  '@context' => 'http://schema.org',
1257
  '@type' => 'VideoObject',
1258
+ '@id' => trailingslashit(get_permalink()).'#videoobject',
1259
+ 'url' => trailingslashit(get_permalink()),
1260
  'headline' => saswp_get_the_title(),
1261
  'datePublished' => esc_html($date),
1262
  'dateModified' => esc_html($modified_date),
1266
  'thumbnailUrl' => isset($image_details[0]) ? esc_url($image_details[0]):'',
1267
  'mainEntity' => array(
1268
  '@type' => 'WebPage',
1269
+ '@id' => trailingslashit(get_permalink()),
1270
  ),
1271
  'author' => saswp_get_author_details()
1272
  );
1304
 
1305
  $local_business = $business_name;
1306
 
1307
+ }else if($business_type){
1308
 
1309
  $local_business = $business_type;
1310
 
1311
+ }else{
1312
+ $local_business = 'LocalBusiness';
1313
  }
1314
 
1315
  $input1 = array(
1316
  '@context' => 'http://schema.org',
1317
  '@type' => esc_attr($local_business),
1318
+ '@id' => trailingslashit(get_permalink()).'#'. strtolower(esc_attr($local_business)),
1319
  'name' => saswp_remove_warnings($business_details, 'local_business_name', 'saswp_string'),
1320
+ 'url' => trailingslashit(get_permalink()),
1321
  'description' => saswp_remove_warnings($business_details, 'local_business_description', 'saswp_string'),
1322
  'image' => array(
1323
  '@type' => 'ImageObject',
1428
 
1429
  $input1 = apply_filters('saswp_modify_local_business_schema_output', $input1 );
1430
  }
1431
+
 
1432
  //Speakable schema
1433
 
1434
  if($schema_type == 'TechArticle' || $schema_type == 'Article' || $schema_type == 'Blogposting' || $schema_type == 'NewsArticle' || $schema_type == 'WebPage'){
1513
 
1514
  if(!empty($input1)){
1515
  $all_schema_output[] = $input1;
1516
+ }
 
1517
  }
1518
 
1519
  return apply_filters('saswp_modify_schema_output', $all_schema_output);
1614
  if( 'Person' === $schema_type){
1615
 
1616
  $image = get_post_meta( get_the_ID(), 'saswp_trip_schema_image_'.$schema_id.'_detail',true);
1617
+
 
1618
  $input1['@context'] = 'http://schema.org';
1619
  $input1['@type'] = 'Person';
1620
+ $input1['@id'] = trailingslashit(get_permalink()).'#Person';
1621
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_url_'.$schema_id, 'saswp_array');
1622
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_name_'.$schema_id, 'saswp_array');
1623
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_description_'.$schema_id, 'saswp_array');
1624
  $input1['gender'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_gender_'.$schema_id, 'saswp_array');
1625
+ $input1['birthDate'] = isset($all_post_meta['saswp_person_schema_date_of_birth_'.$schema_id][0])&& $all_post_meta['saswp_person_schema_date_of_birth_'.$schema_id][0] !='' ? date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_person_schema_date_of_birth_'.$schema_id][0])):'';
1626
  $input1['nationality'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_nationality_'.$schema_id, 'saswp_array');
1627
  $input1['jobTitle'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_job_title_'.$schema_id, 'saswp_array');
1628
 
1654
 
1655
  $input1['@context'] = 'http://schema.org';
1656
  $input1['@type'] = 'Trip';
1657
+ $input1['@id'] = trailingslashit(get_permalink()).'#Trip';
1658
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_trip_schema_url_'.$schema_id, 'saswp_array');
1659
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_trip_schema_name_'.$schema_id, 'saswp_array');
1660
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_trip_schema_description_'.$schema_id, 'saswp_array');
1691
 
1692
  }
1693
 
1694
+ if( 'FAQ' === $schema_type){
1695
+
1696
+ $input1['@context'] = 'http://schema.org';
1697
+ $input1['@type'] = 'FAQPage';
1698
+ $input1['@id'] = trailingslashit(get_permalink()).'#FAQPage';
1699
+
1700
+ $faq_question = esc_sql ( get_post_meta($schema_post_id, 'faq_question_'.$schema_id, true) );
1701
+
1702
+ $faq_question_arr = array();
1703
+
1704
+ if(!empty($faq_question)){
1705
+
1706
+ foreach($faq_question as $val){
1707
+
1708
+ $supply_data = array();
1709
+ $supply_data['@type'] = 'Question';
1710
+ $supply_data['name'] = $val['saswp_faq_question_name'];
1711
+ $supply_data['acceptedAnswer']['@type'] = 'Answer';
1712
+ $supply_data['acceptedAnswer']['text'] = $val['saswp_faq_question_answer'];
1713
+
1714
+ $faq_question_arr[] = $supply_data;
1715
+ }
1716
+ $input1['mainEntity'] = $faq_question_arr;
1717
+ }
1718
+
1719
+ }
1720
+
1721
  if( 'JobPosting' === $schema_type){
1722
 
1723
  $howto_image = get_post_meta( get_the_ID(), 'saswp_jobposting_schema_ho_logo_'.$schema_id.'_detail',true);
1725
 
1726
  $input1['@context'] = 'http://schema.org';
1727
  $input1['@type'] = 'JobPosting';
1728
+ $input1['@id'] = trailingslashit(get_permalink()).'#JobPosting';
1729
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_url_'.$schema_id, 'saswp_array');
1730
  $input1['title'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_title_'.$schema_id, 'saswp_array');
1731
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_description_'.$schema_id, 'saswp_array');
1770
 
1771
  $input1['@context'] = 'http://schema.org';
1772
  $input1['@type'] = 'Mosque';
1773
+ $input1['@id'] = trailingslashit(get_permalink()).'#Mosque';
1774
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_mosque_schema_url_'.$schema_id, 'saswp_array');
1775
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_mosque_schema_name_'.$schema_id, 'saswp_array');
1776
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_mosque_schema_description_'.$schema_id, 'saswp_array');
1803
 
1804
  $input1['@context'] = 'http://schema.org';
1805
  $input1['@type'] = 'Church';
1806
+ $input1['@id'] = trailingslashit(get_permalink()).'#Church';
1807
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_church_schema_url_'.$schema_id, 'saswp_array');
1808
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_church_schema_name_'.$schema_id, 'saswp_array');
1809
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_church_schema_description_'.$schema_id, 'saswp_array');
1836
 
1837
  $input1['@context'] = 'http://schema.org';
1838
  $input1['@type'] = 'HinduTemple';
1839
+ $input1['@id'] = trailingslashit(get_permalink()).'#HinduTemple';
1840
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_url_'.$schema_id, 'saswp_array');
1841
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_name_'.$schema_id, 'saswp_array');
1842
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_description_'.$schema_id, 'saswp_array');
1869
 
1870
  $input1['@context'] = 'http://schema.org';
1871
  $input1['@type'] = 'LandmarksOrHistoricalBuildings';
1872
+ $input1['@id'] = trailingslashit(get_permalink()).'#LandmarksOrHistoricalBuildings';
1873
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_lorh_schema_url_'.$schema_id, 'saswp_array');
1874
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_lorh_schema_name_'.$schema_id, 'saswp_array');
1875
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_lorh_schema_description_'.$schema_id, 'saswp_array');
1902
 
1903
  $input1['@context'] = 'http://schema.org';
1904
  $input1['@type'] = 'TouristAttraction';
1905
+ $input1['@id'] = trailingslashit(get_permalink()).'#TouristAttraction';
1906
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_url_'.$schema_id, 'saswp_array');
1907
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_name_'.$schema_id, 'saswp_array');
1908
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_description_'.$schema_id, 'saswp_array');
1936
 
1937
  $input1['@context'] = 'http://schema.org';
1938
  $input1['@type'] = 'TouristDestination';
1939
+ $input1['@id'] = trailingslashit(get_permalink()).'#TouristDestination';
1940
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_td_schema_url_'.$schema_id, 'saswp_array');
1941
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_td_schema_name_'.$schema_id, 'saswp_array');
1942
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_td_schema_description_'.$schema_id, 'saswp_array');
1966
 
1967
  $input1['@context'] = 'http://schema.org';
1968
  $input1['@type'] = 'Apartment';
1969
+ $input1['@id'] = trailingslashit(get_permalink()).'#Apartment';
1970
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_schema_url_'.$schema_id, 'saswp_array');
1971
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_schema_name_'.$schema_id, 'saswp_array');
1972
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_schema_description_'.$schema_id, 'saswp_array');
1999
 
2000
  $input1['@context'] = 'http://schema.org';
2001
  $input1['@type'] = 'House';
2002
+ $input1['@id'] = trailingslashit(get_permalink()).'#House';
2003
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_house_schema_url_'.$schema_id, 'saswp_array');
2004
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_house_schema_name_'.$schema_id, 'saswp_array');
2005
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_house_schema_description_'.$schema_id, 'saswp_array');
2031
 
2032
  $input1['@context'] = 'http://schema.org';
2033
  $input1['@type'] = 'SingleFamilyResidence';
2034
+ $input1['@id'] = trailingslashit(get_permalink()).'#SingleFamilyResidence';
2035
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_url_'.$schema_id, 'saswp_array');
2036
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_name_'.$schema_id, 'saswp_array');
2037
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_description_'.$schema_id, 'saswp_array');
2069
 
2070
  $input1['@context'] = 'http://schema.org';
2071
  $input1['@type'] = 'HowTo';
2072
+ $input1['@id'] = trailingslashit(get_permalink()).'#HowTo';
2073
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_howto_schema_name_'.$schema_id, 'saswp_array');
2074
  $input1['datePublished'] = isset($all_post_meta['saswp_howto_ec_schema_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_howto_ec_schema_date_published_'.$schema_id][0])):'';
2075
  $input1['dateModified'] = isset($all_post_meta['saswp_howto_ec_schema_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_howto_ec_schema_date_modified_'.$schema_id][0])):'';
2161
 
2162
 
2163
  $supply_data['@type'] = 'HowToStep';
2164
+ $supply_data['url'] = trailingslashit(get_permalink()).'#step'.++$key;
2165
  $supply_data['name'] = $val['saswp_howto_step_name'];
2166
  $supply_data['itemListElement'] = array($direction, $tip);
2167
 
2200
 
2201
  $input1['@context'] = 'http://schema.org';
2202
  $input1['@type'] = 'TVSeries';
2203
+ $input1['@id'] = trailingslashit(get_permalink()).'#TVSeries';
2204
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_tvseries_schema_name_'.$schema_id, 'saswp_array');
2205
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_tvseries_schema_description_'.$schema_id, 'saswp_array');
2206
 
2259
 
2260
  $input1['@context'] = 'http://schema.org';
2261
  $input1['@type'] = 'MedicalCondition';
2262
+ $input1['@id'] = trailingslashit(get_permalink()).'#MedicalCondition';
2263
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_mc_schema_name_'.$schema_id, 'saswp_array');
2264
  $input1['alternateName'] = saswp_remove_warnings($all_post_meta, 'saswp_mc_schema_alternate_name_'.$schema_id, 'saswp_array');
2265
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_mc_schema_description_'.$schema_id, 'saswp_array');
2331
 
2332
  $input1['@context'] = 'http://schema.org';
2333
  $input1['@type'] = 'VideoGame';
2334
+ $input1['@id'] = trailingslashit(get_permalink()).'#VideoGame';
2335
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_name_'.$schema_id, 'saswp_array');
2336
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_url_'.$schema_id, 'saswp_array');
2337
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_description_'.$schema_id, 'saswp_array');
2390
  $input1 = array(
2391
  '@context' => 'http://schema.org',
2392
  '@type' => 'QAPage',
2393
+ '@id' => trailingslashit(get_permalink()).'#qapage',
2394
  'mainEntity' => array(
2395
  '@type' => 'Question' ,
2396
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_qa_question_title_'.$schema_id, 'saswp_array'),
2427
  $input1 = array(
2428
  '@context' => 'http://schema.org',
2429
  '@type' => 'Event' ,
2430
+ '@id' => trailingslashit(get_permalink()).'#event',
2431
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_name_'.$schema_id, 'saswp_array'),
2432
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_description_'.$schema_id, 'saswp_array'),
2433
  'startDate' => isset($all_post_meta['saswp_event_schema_start_date_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_event_schema_start_date_'.$schema_id][0])):'',
2477
  $input1 = array(
2478
  '@context' => 'http://schema.org',
2479
  '@type' => 'DiscussionForumPosting' ,
2480
+ '@id' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_url_'.$schema_id, 'saswp_array').'#blogposting',
2481
  'headline' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_headline_'.$schema_id, 'saswp_array'),
2482
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_description_'.$schema_id, 'saswp_array'),
2483
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_url_'.$schema_id, 'saswp_array'),
2496
  $input1 = array(
2497
  '@context' => 'http://schema.org',
2498
  '@type' => 'Course' ,
2499
+ '@id' => trailingslashit(get_permalink()).'#course',
2500
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_course_name_'.$schema_id, 'saswp_array'),
2501
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_course_description_'.$schema_id, 'saswp_array'),
2502
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_course_url_'.$schema_id, 'saswp_array'),
2528
  $input1 = array(
2529
  '@context' => 'http://schema.org',
2530
  '@type' => 'Blogposting' ,
2531
+ '@id' => trailingslashit(get_permalink()).'#Blogposting',
2532
  'mainEntityOfPage' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_main_entity_of_page_'.$schema_id, 'saswp_array'),
2533
  'headline' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_headline_'.$schema_id, 'saswp_array'),
2534
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_description_'.$schema_id, 'saswp_array'),
2535
+ 'keywords' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_keywords_'.$schema_id, 'saswp_array'),
2536
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_name_'.$schema_id, 'saswp_array'),
2537
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_url_'.$schema_id, 'saswp_array'),
2538
  'datePublished' => isset($all_post_meta['saswp_blogposting_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_blogposting_date_published_'.$schema_id][0])):'',
2587
  $input1 = array(
2588
  '@context' => 'http://schema.org',
2589
  '@type' => $schema_type,
2590
+ '@id' => trailingslashit(get_permalink()).'#audioobject',
2591
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_audio_schema_name_'.$schema_id, 'saswp_array'),
2592
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_audio_schema_description_'.$schema_id, 'saswp_array'),
2593
  'contentUrl' => saswp_remove_warnings($all_post_meta, 'saswp_audio_schema_contenturl_'.$schema_id, 'saswp_array'),
2615
  $input1 = array(
2616
  '@context' => 'http://schema.org',
2617
  '@type' => 'SoftwareApplication',
2618
+ '@id' => trailingslashit(get_permalink()).'#softwareapplication',
2619
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_software_schema_name_'.$schema_id, 'saswp_array'),
2620
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_software_schema_description_'.$schema_id, 'saswp_array'),
2621
  'operatingSystem' => saswp_remove_warnings($all_post_meta, 'saswp_software_schema_operating_system_'.$schema_id, 'saswp_array'),
2653
  $input1 = array(
2654
  '@context' => 'http://schema.org',
2655
  '@type' => 'WebPage' ,
2656
+ '@id' => trailingslashit(get_permalink()).'#webpage',
2657
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_name_'.$schema_id, 'saswp_array'),
2658
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_url_'.$schema_id, 'saswp_array'),
2659
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_description_'.$schema_id, 'saswp_array'),
2663
  'image' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_image_'.$schema_id, 'saswp_array'),
2664
  'headline' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_headline_'.$schema_id, 'saswp_array'),
2665
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_description_'.$schema_id, 'saswp_array'),
2666
+ 'keywords' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_keywords_'.$schema_id, 'saswp_array'),
2667
  'datePublished' => isset($all_post_meta['saswp_webpage_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_webpage_date_published_'.$schema_id][0])):'',
2668
  'dateModified' => isset($all_post_meta['saswp_webpage_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_webpage_date_modified_'.$schema_id][0])):'',
2669
  'author' => array(
2717
  $input1 = array(
2718
  '@context' => 'http://schema.org',
2719
  '@type' => 'Article',
2720
+ '@id' => trailingslashit(get_permalink()).'#article',
2721
  'mainEntityOfPage' => saswp_remove_warnings($all_post_meta, 'saswp_article_main_entity_of_page_'.$schema_id, 'saswp_array'),
2722
  'image' => saswp_remove_warnings($all_post_meta, 'saswp_article_image_'.$schema_id, 'saswp_array'),
2723
  'headline' => saswp_remove_warnings($all_post_meta, 'saswp_article_headline_'.$schema_id, 'saswp_array'),
2724
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_article_description_'.$schema_id, 'saswp_array'),
2725
+ 'keywords' => saswp_remove_warnings($all_post_meta, 'saswp_article_keywords_'.$schema_id, 'saswp_array'),
2726
  'datePublished' => isset($all_post_meta['saswp_article_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_article_date_published_'.$schema_id][0])):'',
2727
  'dateModified' => isset($all_post_meta['saswp_article_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_article_date_modified_'.$schema_id][0])):'',
2728
  'author' => array(
2776
  $input1 = array(
2777
  '@context' => 'http://schema.org',
2778
  '@type' => 'TechArticle',
2779
+ '@id' => trailingslashit(get_permalink()).'#techarticle',
2780
  'mainEntityOfPage' => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_main_entity_of_page_'.$schema_id, 'saswp_array'),
2781
  'image' => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_image_'.$schema_id, 'saswp_array'),
2782
  'headline' => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_headline_'.$schema_id, 'saswp_array'),
2783
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_description_'.$schema_id, 'saswp_array'),
2784
+ 'keywords' => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_keywords_'.$schema_id, 'saswp_array'),
2785
  'datePublished' => isset($all_post_meta['saswp_tech_article_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_tech_article_date_published_'.$schema_id][0])):'',
2786
  'dateModified' => isset($all_post_meta['saswp_tech_article_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_tech_article_date_modified_'.$schema_id][0])):'',
2787
  'author' => array(
2878
  $input1 = array(
2879
  '@context' => 'http://schema.org',
2880
  '@type' => $schema_type ,
2881
+ '@id' => trailingslashit(get_permalink()).'#recipe',
2882
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_url_'.$schema_id, 'saswp_array'),
2883
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_name_'.$schema_id, 'saswp_array'),
2884
  'image' =>array(
2967
  $input1 = array(
2968
  '@context' => 'http://schema.org',
2969
  '@type' => 'Product',
2970
+ '@id' => trailingslashit(get_permalink()).'#product',
2971
+ 'url' => trailingslashit(get_permalink()),
2972
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_name_'.$schema_id, 'saswp_array'),
2973
  'sku' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_sku_'.$schema_id, 'saswp_array'),
2974
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_description_'.$schema_id, 'saswp_array'),
2984
  'itemCondition' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_condition_'.$schema_id, 'saswp_array'),
2985
  'price' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_price_'.$schema_id, 'saswp_array'),
2986
  'priceCurrency' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_currency_'.$schema_id, 'saswp_array'),
2987
+ 'url' => trailingslashit(get_permalink()),
2988
  'priceValidUntil' => isset($all_post_meta['saswp_product_schema_priceValidUntil_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_product_schema_priceValidUntil_'.$schema_id][0])):'',
2989
  ),
2990
  'brand' => array('@type' => 'Thing',
3064
  $input1 = array(
3065
  '@context' => 'http://schema.org',
3066
  '@type' => 'NewsArticle' ,
3067
+ '@id' => trailingslashit(get_permalink()).'#newsarticle',
3068
  'mainEntityOfPage' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_main_entity_of_page_'.$schema_id, 'saswp_array'),
3069
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_URL_'.$schema_id, 'saswp_array'),
3070
  'image' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_image_'.$schema_id, 'saswp_array'),
3072
  'datePublished' => isset($all_post_meta['saswp_newsarticle_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_newsarticle_date_published_'.$schema_id][0])):'',
3073
  'dateModified' => isset($all_post_meta['saswp_newsarticle_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_newsarticle_date_modified_'.$schema_id][0])):'',
3074
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_description_'.$schema_id, 'saswp_array'),
3075
+ 'keywords' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_keywords_'.$schema_id, 'saswp_array'),
3076
  'articleSection' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_section_'.$schema_id, 'saswp_array'),
3077
  'articleBody' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_body_'.$schema_id, 'saswp_array'),
3078
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_name_'.$schema_id, 'saswp_array'),
3137
  $input1 = array(
3138
  '@context' => 'http://schema.org',
3139
  '@type' => 'VideoObject',
3140
+ '@id' => trailingslashit(get_permalink()).'#videoobject',
3141
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_url_'.$schema_id, 'saswp_array'),
3142
  'headline' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_headline_'.$schema_id, 'saswp_array'),
3143
  'datePublished' => isset($all_post_meta['saswp_video_object_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_video_object_date_published_'.$schema_id][0])):'',
3194
  $input1 = array(
3195
  '@context' => 'http://schema.org',
3196
  '@type' => $schema_type ,
3197
+ '@id' => trailingslashit(get_permalink()).'#service',
3198
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_service_schema_name_'.$schema_id, 'saswp_array'),
3199
  'serviceType' => saswp_remove_warnings($all_post_meta, 'saswp_service_schema_type_'.$schema_id, 'saswp_array'),
3200
  'provider' => array(
3201
  '@type' => saswp_remove_warnings($all_post_meta, 'saswp_service_schema_provider_type_'.$schema_id, 'saswp_array'),
3202
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_service_schema_provider_name_'.$schema_id, 'saswp_array'),
3203
  'image' => saswp_remove_warnings($all_post_meta, 'saswp_service_schema_image_'.$schema_id, 'saswp_array'),
3204
+ '@id' => trailingslashit(get_permalink()),
3205
  'address' => array(
3206
  '@type' => 'PostalAddress',
3207
  'addressLocality' => saswp_remove_warnings($all_post_meta, 'saswp_service_schema_locality_'.$schema_id, 'saswp_array'),
3268
 
3269
  $input1['@context'] = 'http://schema.org';
3270
  $input1['@type'] = 'Review';
3271
+ $input1['@id'] = trailingslashit(get_permalink()).'#review';
3272
+ $input1['url'] = trailingslashit(get_permalink());
3273
  $input1['datePublished'] = get_the_date("Y-m-d\TH:i:s\Z");
3274
  $input1['dateModified'] = get_the_modified_date("Y-m-d\TH:i:s\Z");
3275
 
3425
 
3426
  if($review_author){
3427
 
3428
+ $input1['author']['sameAs'] = trailingslashit(get_permalink());
3429
 
3430
  }
3431
 
3490
 
3491
  $local_business = $business_sub_name;
3492
 
3493
+ }else if($business_type){
3494
 
3495
  $local_business = $business_type;
3496
 
3497
+ }else{
3498
+
3499
+ $local_business = 'LocalBusiness';
3500
+
3501
  }
3502
 
3503
  $local_image = get_post_meta( get_the_ID(), 'local_business_logo_'.$schema_id.'_detail',true);
3505
  $input1 = array(
3506
  '@context' => 'http://schema.org',
3507
  '@type' => $local_business ,
3508
+ '@id' => trailingslashit(get_permalink()).'#'. strtolower($local_business),
3509
  'name' => saswp_remove_warnings($all_post_meta, 'local_business_name_'.$schema_id, 'saswp_array'),
3510
  'url' => saswp_remove_warnings($all_post_meta, 'local_business_name_url_'.$schema_id, 'saswp_array'),
3511
  'description' => saswp_remove_warnings($all_post_meta, 'local_business_description_'.$schema_id, 'saswp_array'),
3678
  $input = array(
3679
  '@context' => 'http://schema.org',
3680
  '@type' => 'BreadcrumbList' ,
3681
+ '@id' => trailingslashit(get_permalink()).'#breadcrumb' ,
3682
  'itemListElement' => $bread_crumb_list,
3683
  );
3684
 
3711
  $input = array(
3712
  '@context' => 'http://schema.org',
3713
  '@type' => 'WebSite',
3714
+ '@id' => $site_url.'#website',
3715
  'url' => $site_url,
3716
  'name' => $site_name,
3717
  );
3782
  $archive_image['width'] = esc_attr($sd_data['sd_default_image_width']);
3783
  $archive_image['height'] = esc_attr($sd_data['sd_default_image_height']);
3784
  }
3785
+
 
3786
  }
3787
 
3788
  $publisher_info = array(
3922
  "@type" => "AboutPage",
3923
  "mainEntityOfPage" => array(
3924
  "@type" => "WebPage",
3925
+ "@id" => trailingslashit(get_permalink()),
3926
  ),
3927
+ "url" => trailingslashit(get_permalink()),
3928
  "headline" => saswp_get_the_title(),
3929
  'description' => saswp_get_the_excerpt(),
3930
  );
3967
  "@type" => "ContactPage",
3968
  "mainEntityOfPage" => array(
3969
  "@type" => "WebPage",
3970
+ "@id" => trailingslashit(get_permalink()),
3971
  ),
3972
+ "url" => trailingslashit(get_permalink()),
3973
  "headline" => saswp_get_the_title(),
3974
  'description' => saswp_get_the_excerpt(),
3975
  );
3998
  */
3999
  function saswp_site_navigation_output(){
4000
 
4001
+ global $sd_data;
4002
+ $input = array();
4003
+
4004
+ $navObj = array();
4005
+
4006
+ if(isset($sd_data['saswp_site_navigation_menu']) && $sd_data['saswp_site_navigation_menu'] == 1 ){
4007
+
4008
+ $input = saswp_site_navigation_fallback();
4009
+
4010
+ }else{
4011
+
4012
+ if(isset($sd_data['saswp_site_navigation_menu'])){
4013
+
4014
+ $menu_id = $sd_data['saswp_site_navigation_menu'];
4015
+ $menuItems = wp_get_nav_menu_items($menu_id);
4016
+ $menu_name = wp_get_nav_menu_object($menu_id);
4017
+
4018
+ if($menuItems){
4019
+
4020
+ foreach($menuItems as $items){
4021
+
4022
+ $navObj[] = array(
4023
+ "@context" => "https://schema.org",
4024
+ "@type" => "SiteNavigationElement",
4025
+ "@id" => trailingslashit(get_home_url()).'#'.$menu_name->name,
4026
+ "name" => esc_attr($items->title),
4027
+ "url" => esc_url($items->url)
4028
+ );
4029
+
4030
+ }
4031
+ }
4032
+ }
4033
+
4034
+ if($navObj){
4035
+
4036
+ $input['@context'] = 'https://schema.org';
4037
+ $input['@graph'] = $navObj;
4038
+
4039
+ }
4040
+
4041
+ }
4042
+
4043
+ return apply_filters('saswp_modify_sitenavigation_output', $input);
4044
+ }
4045
+
4046
+ function saswp_site_navigation_fallback(){
4047
+
4048
  global $sd_data;
4049
  $input = array();
4050
+
 
 
4051
  $navObj = array();
4052
 
4053
  $menuLocations = get_nav_menu_locations();
4115
 
4116
  }
4117
 
4118
+
4119
 
4120
+ return $input;
4121
+ }
output/service.php CHANGED
@@ -955,7 +955,11 @@ Class saswp_output_service{
955
  }
956
 
957
  }
958
-
 
 
 
 
959
  $product_image_id = $product->get_image_id();
960
 
961
  $image_list = array();
@@ -999,7 +1003,7 @@ Class saswp_output_service{
999
  }
1000
 
1001
  $product_details['product_price'] = $product->get_price();
1002
- $product_details['product_sku'] = $product->get_sku();
1003
 
1004
  if(isset($date_on_sale)){
1005
 
@@ -1029,10 +1033,22 @@ Class saswp_output_service{
1029
 
1030
  }
1031
 
1032
- }
1033
-
1034
  $product_details['product_review_count'] = $product->get_review_count();
1035
  $product_details['product_average_rating'] = $product->get_average_rating();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1036
  $product_details['product_reviews'] = $reviews_arr;
1037
 
1038
  }
@@ -1612,12 +1628,13 @@ Class saswp_output_service{
1612
  $input1 = array(
1613
  '@context' => 'http://schema.org',
1614
  '@type' => 'TechArticle',
1615
- '@id' => get_permalink().'/#techarticle',
1616
  'url' => get_permalink(),
1617
  'mainEntityOfPage' => get_permalink(),
1618
  'headline' => saswp_get_the_title(),
1619
  'description' => saswp_get_the_excerpt(),
1620
  'articleBody' => saswp_get_the_content(),
 
1621
  'datePublished' => esc_html($date),
1622
  'dateModified' => esc_html($modified_date),
1623
  'author' => saswp_get_author_details(),
@@ -1640,12 +1657,13 @@ Class saswp_output_service{
1640
  $input1 = array(
1641
  '@context' => 'http://schema.org',
1642
  '@type' => 'Article',
1643
- '@id' => get_permalink().'/#article',
1644
  'url' => get_permalink(),
1645
  'mainEntityOfPage' => get_permalink(),
1646
  'headline' => saswp_get_the_title(),
1647
  'description' => saswp_get_the_excerpt(),
1648
  'articleBody' => saswp_get_the_content(),
 
1649
  'datePublished' => esc_html($date),
1650
  'dateModified' => esc_html($modified_date),
1651
  'author' => saswp_get_author_details(),
@@ -1673,7 +1691,7 @@ Class saswp_output_service{
1673
  $input1 = array(
1674
  '@context' => 'http://schema.org',
1675
  '@type' => 'WebPage' ,
1676
- '@id' => get_permalink().'/#webpage',
1677
  'name' => saswp_get_the_title(),
1678
  'url' => get_permalink(),
1679
  'description' => saswp_get_the_excerpt(),
@@ -1684,6 +1702,7 @@ Class saswp_output_service{
1684
  'headline' => saswp_get_the_title(),
1685
  'description' => saswp_get_the_excerpt(),
1686
  'articleBody' => saswp_get_the_content(),
 
1687
  'datePublished' => esc_html($date),
1688
  'dateModified' => esc_html($modified_date),
1689
  'author' => saswp_get_author_details(),
955
  }
956
 
957
  }
958
+
959
+ if(!isset($product_details['product_mpn'])){
960
+ $product_details['product_mpn'] = get_the_ID();
961
+ }
962
+
963
  $product_image_id = $product->get_image_id();
964
 
965
  $image_list = array();
1003
  }
1004
 
1005
  $product_details['product_price'] = $product->get_price();
1006
+ $product_details['product_sku'] = $product->get_sku() ? $product->get_sku(): get_the_ID();
1007
 
1008
  if(isset($date_on_sale)){
1009
 
1033
 
1034
  }
1035
 
 
 
1036
  $product_details['product_review_count'] = $product->get_review_count();
1037
  $product_details['product_average_rating'] = $product->get_average_rating();
1038
+
1039
+ }else{
1040
+
1041
+ $reviews_arr[] = array(
1042
+ 'author' => saswp_get_the_author_name(),
1043
+ 'datePublished' => get_the_date("Y-m-d\TH:i:s\Z"),
1044
+ 'description' => saswp_get_the_excerpt(),
1045
+ 'reviewRating' => 5,
1046
+ );
1047
+
1048
+ $product_details['product_review_count'] = 1;
1049
+ $product_details['product_average_rating'] = 5;
1050
+ }
1051
+
1052
  $product_details['product_reviews'] = $reviews_arr;
1053
 
1054
  }
1628
  $input1 = array(
1629
  '@context' => 'http://schema.org',
1630
  '@type' => 'TechArticle',
1631
+ '@id' => trailingslashit(get_permalink()).'#techarticle',
1632
  'url' => get_permalink(),
1633
  'mainEntityOfPage' => get_permalink(),
1634
  'headline' => saswp_get_the_title(),
1635
  'description' => saswp_get_the_excerpt(),
1636
  'articleBody' => saswp_get_the_content(),
1637
+ 'keywords' => saswp_get_the_tags(),
1638
  'datePublished' => esc_html($date),
1639
  'dateModified' => esc_html($modified_date),
1640
  'author' => saswp_get_author_details(),
1657
  $input1 = array(
1658
  '@context' => 'http://schema.org',
1659
  '@type' => 'Article',
1660
+ '@id' => trailingslashit(get_permalink()).'#article',
1661
  'url' => get_permalink(),
1662
  'mainEntityOfPage' => get_permalink(),
1663
  'headline' => saswp_get_the_title(),
1664
  'description' => saswp_get_the_excerpt(),
1665
  'articleBody' => saswp_get_the_content(),
1666
+ 'keywords' => saswp_get_the_tags(),
1667
  'datePublished' => esc_html($date),
1668
  'dateModified' => esc_html($modified_date),
1669
  'author' => saswp_get_author_details(),
1691
  $input1 = array(
1692
  '@context' => 'http://schema.org',
1693
  '@type' => 'WebPage' ,
1694
+ '@id' => trailingslashit(get_permalink()).'#webpage',
1695
  'name' => saswp_get_the_title(),
1696
  'url' => get_permalink(),
1697
  'description' => saswp_get_the_excerpt(),
1702
  'headline' => saswp_get_the_title(),
1703
  'description' => saswp_get_the_excerpt(),
1704
  'articleBody' => saswp_get_the_content(),
1705
+ 'keywords' => saswp_get_the_tags(),
1706
  'datePublished' => esc_html($date),
1707
  'dateModified' => esc_html($modified_date),
1708
  'author' => saswp_get_author_details(),
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.8.9.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -84,8 +84,9 @@ Bug reports for Schema & Structured Data for WP & AMP are [welcomed on GitHub](h
84
 
85
  ### Credits
86
 
87
- Merlin WP used https://github.com/richtabor/MerlinWP - License URI: https://github.com/richtabor/MerlinWP/blob/master/LICENSE,
88
- jquery-timepicker used https://github.com/jonthornton/jquery-timepicker
 
89
 
90
 
91
 
@@ -109,11 +110,24 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
109
 
110
  == Changelog ==
111
 
112
- = 1.8.9.1 (09 July 2019) =
113
-
114
- * Bug Fixed: Undefined variable: schema in /view/post_specific.php #376
115
- * Bug Fixed: URL Field is Recommended in How to supply schema. #375
116
- * Bug Fixed: The text inside tag 'script type=application/ld+json' contains 'html comments', which is disallowed. #374
 
 
 
 
 
 
 
 
 
 
 
 
 
117
 
118
  = 1.8.9 (08 July 2019) =
119
 
3
  Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
4
  Requires at least: 3.0
5
  Tested up to: 5.2
6
+ Stable tag: 1.9
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
84
 
85
  ### Credits
86
 
87
+ * Merlin WP used https://github.com/richtabor/MerlinWP - License URI: https://github.com/richtabor/MerlinWP/blob/master/LICENSE,
88
+ * jquery-timepicker used https://github.com/jonthornton/jquery-timepicker
89
+ * Rate Yo! used https://github.com/prrashi/rateYo - License URI: https://github.com/prrashi/rateYo/commit/f3812fe96c38b08627d209795176053550fb1427
90
 
91
 
92
 
110
 
111
  == Changelog ==
112
 
113
+ = 1.9 (03 Aug 2019) =
114
+
115
+ * Major Feature: Reviews Module :- Allow users to manually add reviews from more than 80+ platforms and show it on the website with schema markup #325
116
+ * Added: FAQ schema type #402
117
+ * Added: Upgrade to premium as a menu item in the SD #343
118
+ * Enhancement: If the plguins which are in compatibility section are active than respective checkbox should be checked #353
119
+ * Enhancement: Added Post Tags inside schema markup (Urgent) #389
120
+ * Enhancement: Sub business type should have "LocalBusiness" type as well #380
121
+ * Enhancement: Added validation message in default data #369
122
+ * Enhancement: Added validation message in phone number #369
123
+ * Enhancement: Added some more fields in the product schema #360
124
+ * Bug Fixed: Error in Breadcrumb when using custom post type #403
125
+ * Bug Fixed: Automatically smaller titles which is created as a validation error of "Headline String Too Long" in NewsArticle #396
126
+ * Bug Fixed: Do not need to add organization schema markup on every page #395
127
+ * Bug Fixed: If Defragmentation is enabled "Site Navigation Element" should be included in main schema #386
128
+ * Bug Fixed: Remove double slash // in the type id #379
129
+ * Bug Fixed: Not compatible with Orbital theme #385
130
+ * Bug Fixed: Any AMP extensions redux settings are not being displayed when saswp is installed #412
131
 
132
  = 1.8.9 (08 July 2019) =
133
 
reviews/reviews_admin.php ADDED
@@ -0,0 +1,329 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Post Specific Class
4
+ *
5
+ * @author Magazine3
6
+ * @category Admin
7
+ * @path reviews/reviews_admin
8
+ * @version 1.9
9
+ */
10
+
11
+ // Exit if accessed directly.
12
+ if ( ! defined( 'ABSPATH' ) ) exit;
13
+
14
+ class saswp_reviews_admin {
15
+
16
+ private $screen = array(
17
+ 'saswp_reviews'
18
+ );
19
+ private $meta_fields = array(
20
+ array(
21
+ 'label' => 'Reviewer Image',
22
+ 'id' => 'saswp_reviewer_image',
23
+ 'type' => 'media',
24
+ ),
25
+ array(
26
+ 'label' => 'Reviewer Name',
27
+ 'id' => 'saswp_reviewer_name',
28
+ 'type' => 'text',
29
+ ),
30
+ array(
31
+ 'label' => 'Rating',
32
+ 'id' => 'saswp_review_rating',
33
+ 'type' => 'star',
34
+ ),
35
+ array(
36
+ 'label' => 'Review Date',
37
+ 'id' => 'saswp_review_date',
38
+ 'type' => 'text',
39
+ ),
40
+ array(
41
+ 'label' => 'Review Text',
42
+ 'id' => 'saswp_review_text',
43
+ 'type' => 'textarea',
44
+ ),
45
+ array(
46
+ 'label' => 'Review Link',
47
+ 'id' => 'saswp_review_link',
48
+ 'type' => 'text',
49
+ ),
50
+ array(
51
+ 'label' => 'Review Platform',
52
+ 'id' => 'saswp_review_platform',
53
+ 'type' => 'select',
54
+
55
+ ),
56
+
57
+ );
58
+
59
+ public function __construct() {
60
+
61
+ add_action( 'add_meta_boxes', array( $this, 'saswp_add_meta_boxes' ) );
62
+ add_action( 'save_post', array( $this, 'saswp_save_fields' ) );
63
+ add_action( 'admin_init', array( $this, 'saswp_removing_reviews_wysiwig' ) );
64
+
65
+ }
66
+
67
+ /**
68
+ * Function to disable default wordpress editor
69
+ * @since version 1.9
70
+ */
71
+ public function saswp_removing_reviews_wysiwig(){
72
+
73
+ remove_post_type_support( 'saswp_reviews', 'editor');
74
+
75
+ }
76
+
77
+ /**
78
+ * Function to add review_content metabox
79
+ * @since version 1.9
80
+ */
81
+ public function saswp_add_meta_boxes() {
82
+
83
+ foreach ( $this->screen as $single_screen ) {
84
+ add_meta_box(
85
+ 'review_content',
86
+ esc_html__( 'Review Content', 'schema-and-structured-data-for-wp' ),
87
+ array( $this, 'saswp_meta_box_callback' ),
88
+ $single_screen,
89
+ 'normal',
90
+ 'high'
91
+ );
92
+ }
93
+
94
+ }
95
+
96
+ public function saswp_meta_box_callback( $post ) {
97
+
98
+ wp_nonce_field( 'saswp_reviews_data', 'saswp_reviews_nonce' );
99
+ $this->saswp_field_generator( $post );
100
+
101
+ }
102
+
103
+ /**
104
+ * Function to generate html elements based on passed array as a parameter
105
+ * @param type $post
106
+ * @since version 1.9
107
+ */
108
+ public function saswp_field_generator( $post ) {
109
+
110
+ $this->meta_fields[6]['options'] = saswp_get_terms_as_array();
111
+
112
+ $output = '';
113
+ foreach ( $this->meta_fields as $meta_field ) {
114
+
115
+ $attributes = $label = '';
116
+
117
+ if(isset($meta_field['label'])){
118
+ $label = $meta_field['label'];
119
+ }
120
+ $label = '<label for="' . $meta_field['id'] . '">' . esc_html__( $label, 'schema-and-structured-data-for-wp' ) . '</label>';
121
+ $meta_value = get_post_meta( $post->ID, $meta_field['id'], true );
122
+
123
+ if ( empty( $meta_value ) ) {
124
+ $meta_value = isset($meta_field['default']);
125
+
126
+ }
127
+
128
+ if(isset($meta_field['attributes'])){
129
+
130
+ if(array_key_exists('provider_type', $meta_field['attributes'])){
131
+
132
+ $provider_type = $meta_field['attributes']['provider_type'];
133
+
134
+ }
135
+
136
+
137
+ }
138
+
139
+ switch ( $meta_field['type'] ) {
140
+
141
+ case 'select':
142
+
143
+ $input = sprintf(
144
+ '<select class="afw_select" id="%s" name="%s" %s>',
145
+ esc_attr($meta_field['id']),
146
+ esc_attr($meta_field['id']),
147
+ $attributes
148
+ );
149
+ foreach ( $meta_field['options'] as $key => $value ) {
150
+
151
+ $input .= sprintf(
152
+ '<option %s value="%s">%s</option>',
153
+ $meta_value == $key ? 'selected' : '',
154
+ $key,
155
+ esc_html__($value, 'schema-and-structured-data-for-wp')
156
+ );
157
+ }
158
+ $input .= '</select>';
159
+
160
+ break;
161
+ case 'textarea':
162
+ $input = sprintf(
163
+ '<textarea class="afw_textarea" id="%s" name="%s" rows="5">%s</textarea>',
164
+ esc_attr($meta_field['id']),
165
+ esc_attr($meta_field['id']),
166
+ $meta_value
167
+ );
168
+ break;
169
+
170
+ case 'checkbox':
171
+ $input = sprintf(
172
+ '<input %s id="%s" name="%s" type="checkbox" value="1">',
173
+ $meta_value === '1' ? 'checked' : '',
174
+ esc_attr($meta_field['id']),
175
+ esc_attr($meta_field['id'])
176
+ );
177
+ break;
178
+ case 'media':
179
+ $media_value = array();
180
+ $media_key = $meta_field['id'].'_detail';
181
+
182
+ $media_value_meta = get_post_meta( $post->ID, $media_key, true );
183
+
184
+ if(!empty($media_value_meta)){
185
+ $media_value = $media_value_meta;
186
+ }
187
+
188
+ $media_height = '';
189
+ $media_width = '';
190
+ $media_thumbnail = '';
191
+
192
+ if(isset($media_value['thumbnail'])){
193
+ $media_thumbnail =$media_value['thumbnail'];
194
+ }
195
+ if(isset($media_value['height'])){
196
+ $media_height =$media_value['height'];
197
+ }
198
+ if(isset($media_value['width'])){
199
+ $media_width =$media_value['width'];
200
+ }
201
+
202
+ $image_pre = '';
203
+ if($media_thumbnail){
204
+
205
+ $image_pre = '<div class="saswp_image_thumbnail">
206
+ <img class="saswp_image_prev" src="'.esc_attr($media_thumbnail).'" />
207
+ <a data-id="'.esc_attr($meta_field['id']).'" href="#" class="saswp_prev_close">X</a>
208
+ </div>';
209
+
210
+ }
211
+ $input = sprintf(
212
+ '<fieldset><input style="width: 80%%" id="%s" name="%s" type="text" value="%s">'
213
+ . '<input data-id="media" style="width: 19%%" class="button" id="%s_button" name="%s_button" type="button" value="Upload" />'
214
+ . '<input type="hidden" data-id="'.esc_attr($meta_field['id']).'_height" class="upload-height" name="'.esc_attr($meta_field['id']).'_height" id="'.esc_attr($meta_field['id']).'_height" value="'.esc_attr($media_height).'">'
215
+ . '<input type="hidden" data-id="'.esc_attr($meta_field['id']).'_width" class="upload-width" name="'.esc_attr($meta_field['id']).'_width" id="'.esc_attr($meta_field['id']).'_width" value="'.esc_attr($media_width).'">'
216
+ . '<input type="hidden" data-id="'.esc_attr($meta_field['id']).'_thumbnail" class="upload-thumbnail" name="'.esc_attr($meta_field['id']).'_thumbnail" id="'.esc_attr($meta_field['id']).'_thumbnail" value="'.esc_attr($media_thumbnail).'">'
217
+ . '<div class="saswp_image_div_'.esc_attr($meta_field['id']).'">'
218
+ . $image_pre
219
+ . '</div>'
220
+ .'</fieldset>',
221
+ $meta_field['id'],
222
+ $meta_field['id'],
223
+ $media_thumbnail,
224
+ $meta_field['id'],
225
+ $meta_field['id']
226
+ );
227
+ break;
228
+ case 'star':
229
+
230
+ $input = sprintf(
231
+ '<div class="saswp-rating-div"></div>'
232
+ . '<input id="%s" name="%s" type="hidden" value="%s">',
233
+ esc_attr($meta_field['id']),
234
+ esc_attr($meta_field['id']),
235
+ esc_attr($meta_value),
236
+ $attributes
237
+ );
238
+
239
+ break;
240
+ default:
241
+ $class = '';
242
+ if (strpos($meta_field['id'], 'saswp_review_date') !== false ){
243
+
244
+ $class='saswp-reviews-datepicker-picker';
245
+
246
+ }
247
+
248
+ $input = sprintf(
249
+ '<input class="%s" %s id="%s" name="%s" type="%s" value="%s" %s>',
250
+ $class,
251
+ $meta_field['type'] !== 'color' ? '' : '',
252
+ esc_attr($meta_field['id']),
253
+ esc_attr($meta_field['id']),
254
+ esc_attr($meta_field['type']),
255
+ esc_attr($meta_value),
256
+ $attributes
257
+ );
258
+
259
+
260
+ }
261
+
262
+ $output .= '<tr><th>'.$label.'</th><td>'.$input.'</td></tr>';
263
+ }
264
+
265
+ $allowed_html = saswp_expanded_allowed_tags();
266
+ echo '<table class="form-table saswp-ad-type-table"><tbody>' . wp_kses($output, $allowed_html) . '</tbody></table>';
267
+ }
268
+
269
+ /**
270
+ * Function to save current metabox elements value into database
271
+ * @param type $post_id
272
+ * @return type
273
+ * @since version 1.9
274
+ */
275
+ public function saswp_save_fields( $post_id ) {
276
+
277
+ if ( ! isset( $_POST['saswp_reviews_nonce'] ) )
278
+ return $post_id;
279
+ if ( !wp_verify_nonce( $_POST['saswp_reviews_nonce'], 'saswp_reviews_data' ) )
280
+ return $post_id;
281
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
282
+ return $post_id;
283
+ if ( !current_user_can( 'manage_options' ) )
284
+ return $post_id;
285
+
286
+ $post_meta = array();
287
+ $post_meta = (array) $_POST; // Sanitized below before saving
288
+
289
+ $this->meta_fields[6]['options'] = saswp_get_terms_as_array();
290
+
291
+ foreach ( $this->meta_fields as $meta_field ) {
292
+
293
+ if ( isset( $post_meta[ $meta_field['id'] ] ) ) {
294
+ switch ( $meta_field['type'] ) {
295
+ case 'text':
296
+ $post_meta[ $meta_field['id'] ] = sanitize_text_field( $post_meta[ $meta_field['id'] ] );
297
+ break;
298
+ case 'textarea':
299
+ $post_meta[ $meta_field['id'] ] = esc_html( $post_meta[ $meta_field['id'] ] );
300
+ break;
301
+ case 'media':
302
+ $media_key = $meta_field['id'].'_detail';
303
+ $media_height = sanitize_text_field( $post_meta[ $meta_field['id'].'_height' ] );
304
+ $media_width = sanitize_text_field( $post_meta[ $meta_field['id'].'_width' ] );
305
+ $media_thumbnail = sanitize_text_field( $post_meta[ $meta_field['id'].'_thumbnail' ] );
306
+
307
+ $media_detail = array(
308
+ 'height' => $media_height,
309
+ 'width' => $media_width,
310
+ 'thumbnail' => $media_thumbnail,
311
+ );
312
+
313
+ update_post_meta( $post_id, $media_key, $media_detail);
314
+ break;
315
+ default:
316
+ $post_meta[ $meta_field['id'] ] = sanitize_text_field( $post_meta[ $meta_field['id'] ] );
317
+ }
318
+ update_post_meta( $post_id, $meta_field['id'], $post_meta[ $meta_field['id'] ] );
319
+
320
+ } else if ( $meta_field['type'] === 'checkbox' ) {
321
+ update_post_meta( $post_id, $meta_field['id'], '0' );
322
+ }
323
+ }
324
+
325
+ }
326
+ }
327
+ if (class_exists('saswp_reviews_admin')) {
328
+ new saswp_reviews_admin;
329
+ };
reviews/reviews_service.php ADDED
@@ -0,0 +1,543 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Newsletter class
4
+ *
5
+ * @author Magazine3
6
+ * @category Admin
7
+ * @path reviews/reviews_service
8
+ * @Version 1.9
9
+ */
10
+
11
+ // Exit if accessed directly.
12
+ if ( ! defined( 'ABSPATH' ) ) exit;
13
+
14
+ class saswp_reviews_service {
15
+
16
+ /**
17
+ * List of hooks used in this context
18
+ */
19
+ public function saswp_service_hooks(){
20
+ add_action( 'wp_ajax_saswp_fetch_google_reviews', array($this,'saswp_fetch_google_reviews'));
21
+ add_shortcode( 'saswp-reviews', array($this, 'saswp_reviews_shortcode' ));
22
+ }
23
+
24
+ /**
25
+ * Function to get reviews schema markup
26
+ * @global type $sd_data
27
+ * @return string
28
+ */
29
+ public function saswp_get_reviews_schema_markup($reviews){
30
+
31
+ global $sd_data;
32
+
33
+ $sumofrating = 0;
34
+ $avg_rating = 1;
35
+
36
+ if($reviews){
37
+
38
+ foreach($reviews as $rv){
39
+ $sumofrating += $rv['saswp_review_rating'];
40
+ }
41
+
42
+ if($sumofrating> 0){
43
+ $avg_rating = $sumofrating / count($reviews);
44
+ }
45
+
46
+ }
47
+
48
+ $html = '';
49
+ $date = get_the_date("Y-m-d\TH:i:s\Z");
50
+ $modified_date = get_the_modified_date("Y-m-d\TH:i:s\Z");
51
+
52
+ $input1 = array(
53
+ '@context' => 'http://schema.org',
54
+ '@type' => 'Review',
55
+ 'dateCreated' => esc_html($date),
56
+ 'datePublished' => esc_html($date),
57
+ 'dateModified' => esc_html($modified_date),
58
+ 'headline' => saswp_get_the_title(),
59
+ 'name' => saswp_get_the_title(),
60
+ 'url' => get_permalink(),
61
+ 'description' => saswp_get_the_excerpt(),
62
+ 'copyrightYear' => get_the_time( 'Y' ),
63
+ 'author' => saswp_get_author_details()
64
+ );
65
+
66
+ $input1['itemReviewed'] = array(
67
+ '@type' => 'Thing',
68
+ 'name' => saswp_get_the_title(),
69
+ );
70
+
71
+ $input1['reviewRating'] = array(
72
+ '@type' => 'Rating',
73
+ 'worstRating' => 1,
74
+ 'bestRating' => 5,
75
+ 'ratingValue' => esc_attr($avg_rating),
76
+ );
77
+
78
+ if(!empty($input1)){
79
+
80
+ $html .= "\n";
81
+ $html .= '<!-- Schema & Structured Data For Reviews v'.esc_attr(SASWP_VERSION).' - -->';
82
+ $html .= "\n";
83
+ $html .= '<script type="application/ld+json" class="saswp-reviews-markup">';
84
+ $html .= "\n";
85
+ $html .= saswp_json_print_format($input1);
86
+ $html .= "\n";
87
+ $html .= '</script>';
88
+ $html .= "\n\n";
89
+
90
+ }
91
+
92
+ return $html;
93
+ }
94
+
95
+ /**
96
+ * Function to generate reviews html
97
+ * @param type $reviews
98
+ * @return string
99
+ */
100
+ public function saswp_reviews_html_markup($reviews){
101
+
102
+ $output = '';
103
+ if($reviews){
104
+
105
+ foreach ($reviews as $review){
106
+
107
+ $review_rating = $review['saswp_review_rating'];
108
+
109
+ $starating = saswp_get_rating_html_by_value($review_rating);
110
+
111
+ $term = get_term( $review['saswp_review_platform'], 'platform' );
112
+ $term_slug = '';
113
+
114
+ if(is_object($term)){
115
+ $term_slug = $term->slug;
116
+ }
117
+ if($term_slug == ''){
118
+ $term_slug = 'google';
119
+ }
120
+
121
+ $output.= '<div class="saswp-g-review-panel">
122
+ <div class="saswp-glg-review-body">
123
+ <div class="saswp-rv-img">
124
+ <img src="'.esc_url($review['saswp_reviewer_image']).'" alt="'.$review['saswp_reviewer_name'].'">
125
+ </div>
126
+ <div class="saswp-rv-cnt">
127
+ <div class="saswp-str-rtng">
128
+ <div class="saswp-str">
129
+ <span class="saswp-athr">'.$review['saswp_reviewer_name'].'</span>
130
+ '.$starating.'
131
+ </div>
132
+ <span class="saswp-g-plus">
133
+ <a href="#"><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/'.esc_attr($term_slug).'-img.png'.'"></a>
134
+ </span>
135
+ </div>
136
+ <p>'.substr($review['saswp_review_text'],0,300).'</p>
137
+ </div>
138
+ </div>
139
+ </div>';
140
+
141
+ }
142
+
143
+ wp_enqueue_style( 'saswp-style', SASWP_PLUGIN_URL . 'admin_section/css/saswp-style.min.css', false , SASWP_VERSION );
144
+
145
+ }
146
+ return $output;
147
+
148
+ }
149
+
150
+ public function saswp_fetch_google_reviews(){
151
+
152
+ if ( ! current_user_can( 'manage_options' ) ) {
153
+ return;
154
+ }
155
+
156
+ if ( ! isset( $_POST['saswp_security_nonce'] ) ){
157
+ return;
158
+ }
159
+
160
+ if ( !wp_verify_nonce( $_POST['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
161
+ return;
162
+ }
163
+
164
+ global $sd_data;
165
+
166
+ $location = $blocks = $premium_status = $g_api = $reviews_api = $reviews_api_status = '';
167
+
168
+ if(isset($_POST['reviews_api'])){
169
+ $reviews_api = sanitize_text_field($_POST['reviews_api']);
170
+ }
171
+
172
+ if(isset($_POST['reviews_api_status'])){
173
+ $reviews_api_status = sanitize_text_field($_POST['reviews_api_status']);
174
+ }
175
+
176
+ if(isset($_POST['location'])){
177
+ $location = sanitize_text_field($_POST['location']);
178
+ }
179
+
180
+ if(isset($_POST['g_api'])){
181
+ $g_api = sanitize_text_field($_POST['g_api']);
182
+ }
183
+
184
+ if(isset($_POST['premium_status'])){
185
+ $premium_status = sanitize_text_field($_POST['premium_status']);
186
+ }
187
+
188
+ if(isset($_POST['blocks'])){
189
+ $blocks = intval($_POST['blocks']);
190
+ }
191
+
192
+ if($location){
193
+
194
+ if(isset($sd_data['saswp_reviews_location_name'])){
195
+
196
+ if(!in_array($location, $sd_data['saswp_reviews_location_name'])){
197
+ array_push($sd_data['saswp_reviews_location_name'], $location);
198
+ }
199
+
200
+ }else{
201
+ $sd_data['saswp_reviews_location_name'] = array($location);
202
+
203
+ }
204
+
205
+ if(isset($sd_data['saswp_reviews_location_blocks'])){
206
+
207
+ if(!in_array($blocks, $sd_data['saswp_reviews_location_blocks'])){
208
+ array_push($sd_data['saswp_reviews_location_blocks'], $blocks);
209
+ }
210
+
211
+ }else{
212
+
213
+ $sd_data['saswp_reviews_location_blocks'] = array($blocks);
214
+
215
+ }
216
+
217
+ $sd_data['saswp-google-review'] = 1;
218
+ $sd_data['saswp_google_place_api_key'] = $g_api;
219
+ update_option('sd_data', $sd_data);
220
+
221
+ $result = null;
222
+ $user_id = get_option('reviews_addon_user_id');
223
+
224
+ if($reviews_api){
225
+
226
+ if($premium_status == 'premium'){
227
+
228
+ if($reviews_api_status == 'active'){
229
+
230
+ if($user_id){
231
+
232
+ if(function_exists('saswp_get_paid_reviews_data')){
233
+
234
+ $result = saswp_get_paid_reviews_data($location, $reviews_api, $user_id, $blocks);
235
+
236
+ if($result['status'] && is_numeric($result['message'])){
237
+
238
+ $rv_limits = get_option('reviews_addon_reviews_limits');
239
+
240
+ $result['message'] = 'Reviews fetched : '. $rv_limits - $result['message']. ', Remains Limit : '.$result['message'];
241
+
242
+ update_option('reviews_addon_reviews_limits', intval($result['message']));
243
+ }
244
+
245
+ }else{
246
+ $result['status'] = false;
247
+ $result['message'] = esc_html__( 'Reviews for schema plugin is not activated', 'schema-and-structured-data-for-wp' );
248
+ }
249
+
250
+ }else{
251
+ $result['status'] = false;
252
+ $result['message'] = esc_html__( 'User is not register', 'schema-and-structured-data-for-wp' );
253
+ }
254
+
255
+ }else{
256
+ $result['status'] = false;
257
+ $result['message'] = esc_html__( 'License key is not active', 'schema-and-structured-data-for-wp' );
258
+ }
259
+
260
+
261
+ }else{
262
+
263
+ if($g_api){
264
+
265
+ $result = $this->saswp_get_free_reviews_data($location, $g_api);
266
+
267
+ }
268
+
269
+ }
270
+
271
+ }else{
272
+
273
+ if($g_api){
274
+
275
+ $result = $this->saswp_get_free_reviews_data($location, $g_api);
276
+ }
277
+
278
+ }
279
+
280
+ echo json_encode($result);
281
+
282
+ }else{
283
+
284
+ echo json_encode(array('status' => false, 'message' => esc_html__( 'Place id is empty', 'schema-and-structured-data-for-wp' )));
285
+
286
+ }
287
+
288
+ wp_die();
289
+
290
+ }
291
+
292
+ /**
293
+ * Function to show value using shortcode "saswp-reviews"
294
+ * @param type $attr
295
+ * @return type
296
+ */
297
+ public function saswp_reviews_front_output($attr){
298
+
299
+
300
+ $arg = array();
301
+ $arg['post_type'] = 'saswp_reviews';
302
+ $arg['posts_per_page'] = -1;
303
+ $arg['post_status'] = 'publish';
304
+
305
+ if(isset($attr['id'])){
306
+ $arg['attachment_id'] = $attr['id'];
307
+ }
308
+ if(isset($attr['title'])){
309
+ $arg['title'] = $attr['title'];
310
+ }
311
+ if(isset($attr['count'])){
312
+ $arg['posts_per_page'] = $attr['count'];
313
+ }
314
+
315
+ $meta_query = array();
316
+
317
+ if(isset($attr['rating'])){
318
+ $meta_query[] = array(
319
+ 'key' => 'saswp_review_rating',
320
+ 'value' => $attr['rating'],
321
+ 'compare' => '='
322
+ );
323
+ }
324
+ if(isset($attr['platform'])){
325
+ $term = get_term_by( 'slug', $attr['platform'], 'platform' );
326
+
327
+ $meta_query[] = array(
328
+ 'key' => 'saswp_review_platform',
329
+ 'value' => $term->term_id,
330
+ 'compare' => '='
331
+ );
332
+ }
333
+
334
+ $meta_query_args = array(
335
+ array(
336
+ 'relation' => 'AND',
337
+ $meta_query
338
+ )
339
+ );
340
+
341
+ $arg['meta_query'] = $meta_query_args;
342
+
343
+ $posts_list = get_posts($arg);
344
+
345
+ $reviews = array();
346
+
347
+ $post_meta = array(
348
+ 'saswp_reviewer_image',
349
+ 'saswp_reviewer_name',
350
+ 'saswp_review_rating',
351
+ 'saswp_review_date',
352
+ 'saswp_review_text',
353
+ 'saswp_review_link',
354
+ 'saswp_review_platform',
355
+ );
356
+
357
+ if($posts_list){
358
+
359
+ foreach($posts_list as $post){
360
+
361
+ $review_data = array();
362
+ $post_id = $post->ID;
363
+
364
+ foreach($post_meta as $meta_key){
365
+
366
+ $review_data[$meta_key] = get_post_meta($post_id, $meta_key, true );
367
+
368
+ }
369
+ $reviews[] = $review_data;
370
+ }
371
+ }
372
+ $output = $schema_markup = '';
373
+
374
+ if($reviews){
375
+
376
+ $output = $this->saswp_reviews_html_markup($reviews);
377
+
378
+ if(saswp_global_option()){
379
+
380
+ $schema_markup = $this->saswp_get_reviews_schema_markup($reviews);
381
+
382
+ if($schema_markup){
383
+ $output = $output.$schema_markup;
384
+
385
+ }
386
+
387
+ }
388
+
389
+ }
390
+
391
+ return $output;
392
+
393
+ }
394
+
395
+ public function saswp_reviews_shortcode($attr){
396
+
397
+ $response = $this->saswp_reviews_front_output($attr);
398
+
399
+ return $response;
400
+
401
+ }
402
+
403
+ public function saswp_save_free_reviews_data($result, $place_id) {
404
+
405
+ $place_saved = array();
406
+ $reviews_saved = array();
407
+
408
+ if (isset($result['place_id']) && $result['place_id'] != '') {
409
+
410
+ $user_id = get_current_user_id();
411
+ $postarr = array(
412
+ 'post_author' => $user_id,
413
+ 'post_title' => $result['name'],
414
+ 'post_status' => 'publish',
415
+ 'post_name' => $result['name'],
416
+ 'post_type' => 'saswp_rvs_location',
417
+
418
+ );
419
+
420
+ $post_id = wp_insert_post( $postarr );
421
+ $place_saved[] = $post_id;
422
+ $review_meta = array(
423
+ 'saswp_rvs_loc_id' => $result['place_id'],
424
+ 'saswp_rvs_loc_review_count' => $result['user_ratings_total'],
425
+ 'saswp_rvs_loc_avg_rating' => $result['rating'],
426
+ 'saswp_rvs_loc_icon' => $result['icon'],
427
+ 'saswp_rvs_loc_address' => $result['formatted_address'],
428
+ );
429
+
430
+ if($post_id && !empty($review_meta) && is_array($review_meta)){
431
+
432
+ foreach ($review_meta as $key => $val){
433
+ update_post_meta($post_id, $key, $val);
434
+ }
435
+
436
+ }
437
+
438
+ }
439
+
440
+
441
+ if (isset($result['reviews'])) {
442
+
443
+ $reviews = $result['reviews'];
444
+
445
+ foreach ($reviews as $review) {
446
+
447
+ $user_id = get_current_user_id();
448
+ $postarr = array(
449
+ 'post_author' => $user_id,
450
+ 'post_title' => $review['author_name'],
451
+ 'post_status' => 'publish',
452
+ 'post_name' => 'Default Review',
453
+ 'post_type' => 'saswp_reviews',
454
+
455
+ );
456
+
457
+ $post_id = wp_insert_post( $postarr );
458
+ $reviews_saved[] = $post_id;
459
+ $term = get_term_by( 'slug','google', 'platform' );
460
+
461
+ $media_detail = array();
462
+
463
+ if(isset($review['profile_photo_url'])){
464
+
465
+ $image_details = saswp_get_attachment_details(array($review['profile_photo_url']));
466
+
467
+ $media_detail = array(
468
+ 'width' => $image_details[0][0],
469
+ 'height' => $image_details[0][1],
470
+ 'thumbnail' => $review['profile_photo_url'],
471
+ );
472
+
473
+ }
474
+
475
+ $review_meta = array(
476
+ 'saswp_review_platform' => $term->term_id,
477
+ 'saswp_review_location_id' => $place_id,
478
+ 'saswp_review_time' => $review['time'],
479
+ 'saswp_review_rating' => $review['rating'],
480
+ 'saswp_review_text' => $review['text'],
481
+ 'saswp_reviewer_lang' => $review['language'],
482
+ 'saswp_reviewer_name' => $review['author_name'],
483
+ 'saswp_review_link' => isset($review['author_url']) ? $review['author_url'] : null,
484
+ 'saswp_reviewer_image' => isset($review['profile_photo_url']) ? $review['profile_photo_url'] : null,
485
+ 'saswp_reviewer_image_detail' => $media_detail
486
+ );
487
+
488
+ if($post_id && !empty($review_meta) && is_array($review_meta)){
489
+
490
+ foreach ($review_meta as $key => $val){
491
+ update_post_meta($post_id, $key, $val);
492
+ }
493
+
494
+ }
495
+
496
+ }
497
+ }
498
+
499
+ if(!empty($place_saved) || !empty($reviews_saved)){
500
+ return true;
501
+ }else{
502
+ return false;
503
+ }
504
+
505
+ }
506
+
507
+ public function saswp_get_free_reviews_data($place_id, $g_api){
508
+
509
+ $result = @wp_remote_get('https://maps.googleapis.com/maps/api/place/details/json?placeid='.trim($place_id).'&key='.trim($g_api));
510
+
511
+ if(isset($result['body'])){
512
+
513
+ $result = json_decode($result['body'],true);
514
+
515
+ if($result['result']){
516
+
517
+ $response = $this->saswp_save_free_reviews_data($result['result'], $place_id);
518
+
519
+ if($response){
520
+ return array('status' => true, 'message' => esc_html__( 'Fetched Successfully', 'schema-and-structured-data-for-wp' ));
521
+ }else{
522
+ return array('status' => false, 'message' => esc_html__( 'Not fetched', 'schema-and-structured-data-for-wp' ));
523
+ }
524
+
525
+ }else{
526
+ if($result['error_message']){
527
+ return array('status' => false, 'message' => $result['error_message']);
528
+ }else{
529
+ return array('status' => false, 'message' => esc_html__( 'Something went wrong', 'schema-and-structured-data-for-wp' ));
530
+ }
531
+ }
532
+
533
+ }else{
534
+ return null;
535
+ }
536
+
537
+ }
538
+
539
+ }
540
+
541
+ $saswp_service_obj = new saswp_reviews_service();
542
+ $saswp_service_obj->saswp_service_hooks();
543
+ ?>
reviews/reviews_setup.php ADDED
@@ -0,0 +1,413 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Post Specific Class
4
+ *
5
+ * @author Magazine3
6
+ * @category Admin
7
+ * @path reviews/reviews_setup
8
+ * @version 1.9
9
+ */
10
+
11
+ // Exit if accessed directly.
12
+ if ( ! defined( 'ABSPATH' ) ) exit;
13
+
14
+ add_action( 'init', 'saswp_register_saswp_reviews',20);
15
+ add_action( 'init', 'saswp_register_saswp_reviews_location',20);
16
+
17
+ add_action( 'manage_saswp_reviews_posts_custom_column' , 'saswp_reviews_custom_columns_set', 10, 2 );
18
+ add_filter( 'manage_saswp_reviews_posts_columns', 'saswp_reviews_custom_columns' );
19
+
20
+ /**
21
+ * Function to register reviews post type
22
+ * since @version 1.9
23
+ */
24
+ function saswp_register_saswp_reviews_location() {
25
+
26
+ $post_type = array(
27
+ 'labels' => array(
28
+ 'name' => esc_html__( 'Location', 'schema-and-structured-data-for-wp' ),
29
+ 'add_new' => esc_html__( 'Add Location', 'schema-and-structured-data-for-wp' ),
30
+ 'add_new_item' => esc_html__( 'Edit Location', 'schema-and-structured-data-for-wp' ),
31
+ 'edit_item' => esc_html__( 'Edit Location','schema-and-structured-data-for-wp'),
32
+ ),
33
+ 'public' => false,
34
+ 'has_archive' => false,
35
+ 'exclude_from_search' => true,
36
+ 'publicly_queryable' => false,
37
+ // 'show_in_menu' => 'edit.php?post_type=saswp',
38
+ 'show_ui' => false,
39
+ 'show_in_nav_menus' => false,
40
+ 'show_admin_column' => true,
41
+ 'rewrite' => false,
42
+ );
43
+
44
+ register_post_type( 'saswp_rvs_location', $post_type );
45
+
46
+ }
47
+
48
+ /**
49
+ * Function to register reviews post type
50
+ * since @version 1.9
51
+ */
52
+ function saswp_register_saswp_reviews() {
53
+
54
+ $post_type = array(
55
+ 'labels' => array(
56
+ 'name' => esc_html__( 'Reviews', 'schema-and-structured-data-for-wp' ),
57
+ 'add_new' => esc_html__( 'Add Review', 'schema-and-structured-data-for-wp' ),
58
+ 'add_new_item' => esc_html__( 'Edit Review', 'schema-and-structured-data-for-wp' ),
59
+ 'edit_item' => esc_html__( 'Edit Review','schema-and-structured-data-for-wp'),
60
+ ),
61
+ 'public' => true,
62
+ 'has_archive' => false,
63
+ 'exclude_from_search' => true,
64
+ 'publicly_queryable' => false,
65
+ 'show_in_menu' => 'edit.php?post_type=saswp',
66
+ 'show_ui' => true,
67
+ 'show_in_nav_menus' => false,
68
+ 'show_admin_column' => true,
69
+ 'rewrite' => false,
70
+ );
71
+
72
+ register_post_type( 'saswp_reviews', $post_type );
73
+
74
+ }
75
+
76
+
77
+ function saswp_reviews_custom_columns_set( $column, $post_id ) {
78
+
79
+ switch ( $column ) {
80
+
81
+ case 'saswp_reviewer_image' :
82
+
83
+ $name = get_post_meta( $post_id, $key='saswp_reviewer_name', true);
84
+
85
+ $image_url = get_post_meta( $post_id, $key='saswp_reviewer_image', true);
86
+ if(!$image_url){
87
+ $image_url = SASWP_PLUGIN_URL.'/admin_section/images/default_user.jpg';
88
+ }
89
+ $url = admin_url( 'post.php?post='.$post_id.'&action=edit' );
90
+ echo '<div class="saswp-rv-img">'
91
+ . '<a href="'.esc_url($url).'">'
92
+ . '<span><img height="65" width="65" src="'.esc_url($image_url).'" alt="Reviewer"></span>'
93
+ . '<span><strong>'.esc_attr($name).'</strong></span>'
94
+ . '</a>'
95
+ . '</div>';
96
+
97
+ break;
98
+ case 'saswp_review_rating' :
99
+
100
+ $rating_val = get_post_meta( $post_id, $key='saswp_review_rating', true);
101
+ echo saswp_get_rating_html_by_value($rating_val);
102
+
103
+ break;
104
+ case 'saswp_review_platform' :
105
+
106
+ $platform = get_post_meta( $post_id, $key='saswp_review_platform', true);
107
+ $term = get_term( $platform, 'platform' );
108
+ if(isset($term->slug)){
109
+ echo '<span class="saswp-g-plus"><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/'.esc_attr($term->slug).'-img.png'.'" alt="Icon" /></span>';
110
+ }
111
+
112
+ break;
113
+ case 'saswp_review_date' :
114
+
115
+ $name = get_post_meta( $post_id, $key='saswp_review_date', true);
116
+ echo esc_attr($name);
117
+
118
+ break;
119
+ case 'saswp_review_place_id' :
120
+
121
+ $name = get_post_meta( $post_id, $key='saswp_review_location_id', true);
122
+ echo esc_attr($name);
123
+
124
+ break;
125
+ case 'saswp_review_shortcode' :
126
+
127
+ echo '[saswp-reviews id="'. esc_attr($post_id).'"]';
128
+
129
+ break;
130
+
131
+ }
132
+ }
133
+
134
+ function saswp_reviews_custom_columns($columns) {
135
+
136
+ unset($columns);
137
+
138
+ $columns['cb'] = '<input type="checkbox" />';
139
+ $columns['saswp_reviewer_image'] = '<a>'.esc_html__( 'Image', 'schema-and-structured-data-for-wp' ).'<a>';
140
+ $columns['title'] = esc_html__( 'Title', 'schema-and-structured-data-for-wp' );
141
+ $columns['saswp_review_rating'] = '<a>'.esc_html__( 'Rating', 'schema-and-structured-data-for-wp' ).'<a>';
142
+ $columns['saswp_review_platform'] = '<a>'.esc_html__( 'Platform', 'schema-and-structured-data-for-wp' ).'<a>';
143
+ $columns['saswp_review_date'] = '<a>'.esc_html__( 'Review Date', 'schema-and-structured-data-for-wp' ).'<a>';
144
+ $columns['saswp_review_place_id'] = '<a>'.esc_html__( 'Place ID', 'schema-and-structured-data-for-wp' ).'<a>';
145
+ $columns['saswp_review_shortcode'] = '<a>'.esc_html__( 'Shortcode', 'schema-and-structured-data-for-wp' ).'<a>';
146
+
147
+ return $columns;
148
+ }
149
+
150
+ function saswp_get_rating_html_by_value($rating_val){
151
+
152
+ $starating = '';
153
+
154
+ $starating .= '<div class="saswp-rvw-str">';
155
+ for($j=0; $j<5; $j++){
156
+
157
+ if($rating_val >$j){
158
+
159
+ $explod = explode('.', $rating_val);
160
+
161
+ if(isset($explod[1])){
162
+
163
+ if($j <$explod[0]){
164
+
165
+ $starating.='<span class="str-ic"></span>';
166
+
167
+ }else{
168
+
169
+ $starating.='<span class="half-str"></span>';
170
+
171
+ }
172
+ }else{
173
+
174
+ $starating.='<span class="str-ic"></span>';
175
+
176
+ }
177
+
178
+ } else{
179
+ $starating.='<span class="df-clr"></span>';
180
+ }
181
+ }
182
+ $starating .= '</div>';
183
+
184
+ return $starating;
185
+
186
+ }
187
+
188
+ /**
189
+ * Enqueue CSS and JS
190
+ */
191
+ function saswp_enqueue_rateyo_script( $hook ) {
192
+
193
+
194
+ $post_type = '';
195
+
196
+ $current_screen = get_current_screen();
197
+
198
+ if(isset($current_screen->post_type)){
199
+ $post_type = $current_screen->post_type;
200
+ }
201
+
202
+ if($post_type =='saswp_reviews'){
203
+
204
+ $rating_val= 0;
205
+ $rv_rating = get_post_meta( get_the_ID(), $key='saswp_review_rating', true);
206
+ if($rv_rating){
207
+ $rating_val = $rv_rating;
208
+ }
209
+
210
+ $data = array(
211
+ 'rating_val' => $rating_val,
212
+ 'readonly' => false,
213
+ );
214
+
215
+ $data = apply_filters('saswp_reviews_filter',$data,'saswp_reviews_data');
216
+
217
+ wp_register_script( 'saswp-rateyo-js', SASWP_PLUGIN_URL . 'admin_section/js/jquery.rateyo.min.js', array('jquery'), SASWP_VERSION , true );
218
+ wp_localize_script( 'saswp-rateyo-js', 'saswp_reviews_data', $data );
219
+ wp_enqueue_script( 'saswp-rateyo-js' );
220
+
221
+ wp_enqueue_style( 'saswp-rateyo-css', SASWP_PLUGIN_URL . 'admin_section/css/jquery.rateyo.min.css', false , SASWP_VERSION );
222
+
223
+ }
224
+
225
+ }
226
+ add_action( 'admin_enqueue_scripts', 'saswp_enqueue_rateyo_script' );
227
+
228
+
229
+
230
+ add_action( 'init', 'saswp_create_platform_custom_taxonomy', 21 );
231
+
232
+
233
+ function saswp_create_platform_custom_taxonomy() {
234
+
235
+ $labels = array(
236
+ 'name' => _x( 'Platforms', 'taxonomy general name' ),
237
+ 'singular_name' => _x( 'Platform', 'taxonomy singular name' ),
238
+ 'search_items' => __( 'Search Types' ),
239
+ 'all_items' => __( 'All Platform' ),
240
+ 'edit_item' => __( 'Edit Platform' ),
241
+ 'update_item' => __( 'Update Platform' ),
242
+ 'add_new_item' => __( 'Add New Platform' ),
243
+ 'new_item_name' => __( 'New Platform Name' ),
244
+ 'menu_name' => __( 'Platforms' ),
245
+ );
246
+
247
+ register_taxonomy(
248
+
249
+ 'platform',
250
+ array('saswp'),
251
+ array(
252
+ 'hierarchical' => false,
253
+ 'labels' => $labels,
254
+ 'public' => false,
255
+ 'show_ui' => false,
256
+ 'show_admin_column' => true,
257
+ 'query_var' => true,
258
+ 'rewrite' => array( 'slug' => 'platform' ),
259
+ )
260
+ );
261
+
262
+ $term_array = array(
263
+ 'Agoda',
264
+ 'Avvo',
265
+ 'Expedia',
266
+ 'Facebook',
267
+ 'Google',
268
+ 'TripAdvisor',
269
+ 'Yelp',
270
+ 'Zillow',
271
+ 'Zomato',
272
+ 'Tier',
273
+ 'Airbnb',
274
+ 'AliExpress',
275
+ 'AlternativeTo',
276
+ 'Amazon',
277
+ 'BBB',
278
+ 'Booking.com',
279
+ 'Capterra',
280
+ 'CarGurus',
281
+ 'Cars.com',
282
+ 'Citysearch',
283
+ 'Classpass',
284
+ 'Consumer Affairs',
285
+ 'CreditKarma',
286
+ 'CustomerLobby',
287
+ 'DealerRater',
288
+ 'Ebay',
289
+ 'Edmunds',
290
+ 'Etsy',
291
+ 'Foursquare',
292
+ 'G2Crowd',
293
+ 'Glassdoor',
294
+ 'Healthgrades',
295
+ 'HomeAdvisor',
296
+ 'Homestars',
297
+ 'Houzz',
298
+ 'Hotels.com',
299
+ 'HungerStation',
300
+ 'Indeed',
301
+ 'Insider Pages',
302
+ 'Jet',
303
+ 'Lawyers.com',
304
+ 'Lending Tree',
305
+ 'Mardindale',
306
+ 'Newegg',
307
+ 'OpenRice',
308
+ 'Opentable',
309
+ 'ProductHunt',
310
+ 'RateMDs',
311
+ 'ReserveOut',
312
+ 'Sitejabber',
313
+ 'Siftery',
314
+ 'SoftwareAdvice',
315
+ 'Talabat',
316
+ 'The Knot',
317
+ 'Thumbtack',
318
+ 'Trulia',
319
+ 'TrustedShops',
320
+ 'Trustpilot',
321
+ 'TrustRadius',
322
+ 'Vitals',
323
+ 'Walmart',
324
+ 'WeddingWire',
325
+ 'Yell',
326
+ 'YellowPages',
327
+ 'ZocDoc'
328
+ );
329
+
330
+ foreach($term_array as $term){
331
+
332
+ if(!term_exists( $term, 'platform' )){
333
+
334
+ wp_insert_term(
335
+ $term,
336
+ 'platform',
337
+ array(
338
+ 'slug' => $term,
339
+ )
340
+ );
341
+
342
+ }
343
+
344
+ }
345
+
346
+ }
347
+
348
+ function saswp_get_terms_as_array(){
349
+
350
+ $terms_array = array();
351
+ $terms = get_terms( 'platform', array( 'hide_empty' => false ) );
352
+
353
+ if($terms){
354
+ foreach ($terms as $val){
355
+ $terms_array[$val->term_id] = $val->name;
356
+
357
+ }
358
+ }
359
+
360
+ return $terms_array;
361
+
362
+ }
363
+
364
+
365
+ /**
366
+ * Filter slugs
367
+ * @global type $typenow
368
+ * @global type $wp_query
369
+ */
370
+ function saswp_reviews_filter() {
371
+
372
+ global $typenow;
373
+ global $wp_query;
374
+ if ( $typenow == 'saswp_reviews' ) { // Your custom post type slug
375
+ $plugins = saswp_get_terms_as_array();
376
+ $current_plugin = '';
377
+ if( isset( $_GET['slug'] ) ) {
378
+ $current_plugin = esc_attr($_GET['slug']); // Check if option has been selected
379
+ } ?>
380
+ <select name="slug" id="slug">
381
+ <option value="all" <?php selected( 'all', $current_plugin ); ?>><?php esc_html_e( 'All', 'schema-and-structured-data-for-wp' ); ?></option>
382
+ <?php foreach( $plugins as $key=>$value ) { ?>
383
+ <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $key, $current_plugin ); ?>><?php echo esc_attr( $value ); ?></option>
384
+ <?php } ?>
385
+ </select>
386
+ <?php }
387
+ }
388
+
389
+ add_action( 'restrict_manage_posts', 'saswp_reviews_filter' );
390
+
391
+
392
+ /**
393
+ * Function to add display type filter in ads list dashboard
394
+ * @global type $pagenow
395
+ * @param type $query
396
+ */
397
+ function saswp_sort_reviews_by_platform( $query ) {
398
+
399
+ global $pagenow;
400
+ // Get the post type
401
+ $post_type = isset( $_GET['post_type'] ) ? $_GET['post_type'] : '';
402
+
403
+ if ( is_admin() && $pagenow == 'edit.php' && $post_type == 'saswp_reviews' && isset( $_GET['slug'] ) && $_GET['slug'] !='all' ) {
404
+
405
+ $query->query_vars['meta_key'] = 'saswp_review_platform';
406
+ $query->query_vars['meta_value'] = esc_attr($_GET['slug']);
407
+ $query->query_vars['meta_compare'] = '=';
408
+
409
+ }
410
+
411
+ }
412
+
413
+ add_filter( 'parse_query', 'saswp_sort_reviews_by_platform' );
reviews/reviews_widget.php ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Google Review Widget Class
4
+ *
5
+ * @author Magazine3
6
+ * @category Admin
7
+ * @path reviews/reviews_widget
8
+ * @Version 1.9
9
+ */
10
+
11
+ // Exit if accessed directly.
12
+ if ( ! defined( 'ABSPATH' ) ) exit;
13
+
14
+ /*
15
+ * To change this license header, choose License Headers in Project Properties.
16
+ * To change this template file, choose Tools | Templates
17
+ * and open the template in the editor.
18
+ */
19
+ /**
20
+ * Adds Saswp_Google_Review_Widget widget.
21
+ */
22
+ class Saswp_Reviews_Widget extends WP_Widget {
23
+
24
+ private $_serviceClass = null;
25
+ /**
26
+ * Register widget with WordPress.
27
+ */
28
+ function __construct() {
29
+
30
+ if($this->_serviceClass == null){
31
+ $this->_serviceClass = new saswp_reviews_service();
32
+ }
33
+
34
+ parent::__construct(
35
+ 'saswp_google_review_widget', // Base ID
36
+ esc_html__( 'Reviews', 'schema-and-structured-data-for-wp' ), // Name
37
+ array( 'description' => esc_html__( 'Widget to display Reviews', 'schema-and-structured-data-for-wp' ), ) // Args
38
+ );
39
+ }
40
+
41
+ /**
42
+ * Front-end display of widget.
43
+ *
44
+ * @see WP_Widget::widget()
45
+ *
46
+ * @param array $args Widget arguments.
47
+ * @param array $instance Saved values from database.
48
+ */
49
+ public function widget( $args, $instance ) {
50
+
51
+ echo html_entity_decode(esc_attr($args['before_widget']));
52
+
53
+
54
+ if(saswp_global_option()){
55
+
56
+ $attr = array(
57
+ 'count' => $instance['g_review']
58
+ );
59
+
60
+ $response = $this->_serviceClass->saswp_reviews_front_output($attr);
61
+
62
+ }
63
+
64
+ echo $response;
65
+
66
+ echo html_entity_decode(esc_attr($args['after_widget']));
67
+ }
68
+
69
+ /**
70
+ * Back-end widget form.
71
+ *
72
+ * @see WP_Widget::form()
73
+ *
74
+ * @param array $instance Previously saved values from database.
75
+ */
76
+ public function form( $instance ) {
77
+
78
+
79
+ $title = ! empty( $instance['title'] ) ? $instance['title'] : esc_html__( 'Review Title', 'schema-and-structured-data-for-wp' );
80
+ $ads = ! empty( $instance['g_review'] ) ? $instance['g_review'] : esc_html__( 'review list to be display', 'schema-and-structured-data-for-wp' );?>
81
+ <p>
82
+ <label for="<?php echo esc_attr( $this->get_field_id( 'g_review' ) ); ?>">
83
+ <?php esc_attr_e( 'Reviews :', 'schema-and-structured-data-for-wp' ); ?>
84
+ </label>
85
+ <input id="<?php echo esc_attr( $this->get_field_id( 'g_review' )); ?>" name="<?php echo esc_attr( $this->get_field_name( 'g_review' ) ); ?>" type="text" placeholder="review count" value="<?php echo (isset($instance['g_review']) ? $instance['g_review'] : 5); ?>">
86
+ </p>
87
+ <?php
88
+ }
89
+
90
+ /**
91
+ * Sanitize widget form values as they are saved.
92
+ *
93
+ * @see WP_Widget::update()
94
+ *
95
+ * @param array $new_instance Values just sent to be saved.
96
+ * @param array $old_instance Previously saved values from database.
97
+ *
98
+ * @return array Updated safe values to be saved.
99
+ */
100
+ public function update( $new_instance, $old_instance ) {
101
+
102
+ $instance = array();
103
+ $instance['g_review'] = ( ! empty( $new_instance['g_review'] ) ) ? sanitize_text_field( $new_instance['g_review'] ) : '';
104
+ return $instance;
105
+
106
+ }
107
+
108
+ } // class Saswp_Google_Review_Widget
109
+
110
+ /**
111
+ * We are registering our widget here in wordpress
112
+ */
113
+ function register_saswp_reviews_widget(){
114
+ register_widget('Saswp_Reviews_Widget');
115
+ }
116
+
117
+ add_action('widgets_init', 'register_saswp_reviews_widget');
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.8.9.1
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.8.9.1');
17
  define('SASWP_DIR_NAME_FILE', __FILE__ );
18
  define('SASWP_DIR_NAME', dirname( __FILE__ ));
19
  define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
@@ -63,7 +63,7 @@ require_once SASWP_DIR_NAME.'/admin_section/common-function.php';
63
  require_once SASWP_DIR_NAME.'/admin_section/fields-generator.php';
64
  require_once SASWP_DIR_NAME.'/admin_section/newsletter.php';
65
  require_once SASWP_DIR_NAME.'/admin_section/plugin-installer/install.php';
66
- //Loading Metaboxes
67
  require_once SASWP_DIR_NAME.'/view/help.php';
68
  require_once SASWP_DIR_NAME.'/view/schema_type.php';
69
  require_once SASWP_DIR_NAME.'/view/paywall.php';
@@ -72,44 +72,15 @@ require_once SASWP_DIR_NAME.'/view/post_specific.php';
72
  require_once SASWP_DIR_NAME.'/view/review.php';
73
  require_once SASWP_DIR_NAME.'/output/review-output.php';
74
  require_once SASWP_DIR_NAME.'/output/service.php';
75
- require_once SASWP_DIR_NAME.'/google_review/google_review_widget.php';
76
- //Google Review Files
77
-
78
- function saswp_include_require_files(){
79
-
80
- global $sd_data;
81
-
82
- if(isset($sd_data['saswp-google-review']) && $sd_data['saswp-google-review'] == 1){
83
-
84
- require_once SASWP_DIR_NAME.'/google_review/google_review.php';
85
- require_once SASWP_DIR_NAME.'/google_review/google_review_page.php';
86
- require_once SASWP_DIR_NAME.'/google_review/google_review_setup.php';
87
-
88
- }
89
-
90
- }
91
-
92
- add_action( 'init', 'saswp_include_require_files' );
93
  /**
94
  * set user defined message on plugin activate
95
  */
96
- register_activation_hook( __FILE__, 'saswp_admin_notice_activation_hook' );
97
-
98
- function saswp_admin_notice_activation_hook() {
99
-
100
- update_option( "saswp_activation_date", date("Y-m-d"));
101
-
102
- //Save first installation date
103
-
104
- $installation_date = get_option('saswp_installation_date');
105
-
106
- if(!$installation_date){
107
-
108
- update_option('saswp_installation_date', date("Y-m-d"));
109
-
110
- }
111
-
112
- }
113
 
114
  add_action( 'admin_notices', 'saswp_admin_notice' );
115
 
@@ -119,7 +90,7 @@ function saswp_admin_notice(){
119
  $current_screen = get_current_screen();
120
 
121
  if(is_object($current_screen)){
122
- $screen_id = $current_screen->id;
123
  }
124
 
125
  $nonce = wp_create_nonce( 'saswp_install_wizard_nonce' );
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
  // 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__));
63
  require_once SASWP_DIR_NAME.'/admin_section/fields-generator.php';
64
  require_once SASWP_DIR_NAME.'/admin_section/newsletter.php';
65
  require_once SASWP_DIR_NAME.'/admin_section/plugin-installer/install.php';
66
+ //Loading View files
67
  require_once SASWP_DIR_NAME.'/view/help.php';
68
  require_once SASWP_DIR_NAME.'/view/schema_type.php';
69
  require_once SASWP_DIR_NAME.'/view/paywall.php';
72
  require_once SASWP_DIR_NAME.'/view/review.php';
73
  require_once SASWP_DIR_NAME.'/output/review-output.php';
74
  require_once SASWP_DIR_NAME.'/output/service.php';
75
+ //Loading Reviews files
76
+ require_once SASWP_DIR_NAME.'/reviews/reviews_admin.php';
77
+ require_once SASWP_DIR_NAME.'/reviews/reviews_setup.php';
78
+ require_once SASWP_DIR_NAME.'/reviews/reviews_service.php';
79
+ require_once SASWP_DIR_NAME.'/reviews/reviews_widget.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  /**
81
  * set user defined message on plugin activate
82
  */
83
+ register_activation_hook( __FILE__, 'saswp_on_activation' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
 
85
  add_action( 'admin_notices', 'saswp_admin_notice' );
86
 
90
  $current_screen = get_current_screen();
91
 
92
  if(is_object($current_screen)){
93
+ $screen_id = $current_screen->id;
94
  }
95
 
96
  $nonce = wp_create_nonce( 'saswp_install_wizard_nonce' );
view/post_specific.php CHANGED
@@ -19,6 +19,30 @@ class saswp_post_specific {
19
  protected $options_response = array();
20
  protected $modify_schema_post_enable = false;
21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  /**
23
  * List of hooks used in this context
24
  */
@@ -30,6 +54,8 @@ class saswp_post_specific {
30
  add_action( 'save_post', array( $this, 'saswp_post_specific_save_fields' ) );
31
  add_action( 'wp_ajax_saswp_get_sub_business_ajax', array($this,'saswp_get_sub_business_ajax'));
32
 
 
 
33
  add_action( 'wp_ajax_saswp_modify_schema_post_enable', array($this,'saswp_modify_schema_post_enable'));
34
 
35
  add_action( 'wp_ajax_saswp_restore_schema', array($this,'saswp_restore_schema'));
@@ -125,7 +151,10 @@ class saswp_post_specific {
125
  $post_title = '';
126
  if($schema_count == 1 && $custom_option !='enable'){
127
  $all_schemas = $this->all_schema;
128
- $post_title = '('.get_post_meta($all_schemas[0]->ID, 'schema_type', true).')';
 
 
 
129
  }
130
 
131
  add_meta_box(
@@ -143,9 +172,29 @@ class saswp_post_specific {
143
  }
144
  }
145
 
146
- public function saswp_get_dynamic_html($schema_id, $meta_name, $index, $data){
147
-
148
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
  switch ($meta_name) {
150
 
151
  case 'howto_supply':
@@ -338,11 +387,35 @@ class saswp_post_specific {
338
 
339
  break;
340
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
341
 
342
  default:
343
  break;
344
  }
345
-
 
 
 
 
 
 
346
 
347
  $output = '';
348
  foreach ( $meta_fields as $meta_field ) {
@@ -419,7 +492,7 @@ class saswp_post_specific {
419
 
420
  if (strpos($meta_field['name'].'_'.$index.'_'.$schema_id, 'published_date') !== false){
421
 
422
- $class = 'class="saswp-local-schema-datepicker-picker"';
423
  }
424
 
425
  $input = sprintf(
@@ -443,17 +516,67 @@ class saswp_post_specific {
443
 
444
  }
445
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
446
  public function saswp_post_meta_box_fields($post){
447
 
448
  $tabs = '';
449
  $tabs_fields = '';
450
  $schema_ids = array();
451
-
452
- $howto_data = array();
453
- $mc_data = array();
454
- $tvseries_data = array();
455
- $trip_data = array();
456
-
457
  $schema_enable = get_post_meta($post->ID, 'saswp_enable_disable_schema', true);
458
 
459
  if(count($this->all_schema)>1){
@@ -471,37 +594,8 @@ class saswp_post_specific {
471
  $this->meta_fields = $response;
472
 
473
  $output = $this->saswp_saswp_post_specific( $post, $schema->ID );
474
- $schema_type = esc_sql ( get_post_meta($schema->ID, 'schema_type', true) );
475
-
476
- if($schema_type == 'HowTo'){
477
-
478
- $howto_data['howto_tool_'.$schema->ID] = esc_sql ( get_post_meta($post->ID, 'howto_tool_'.$schema->ID, true) );
479
- $howto_data['howto_step_'.$schema->ID] = esc_sql ( get_post_meta($post->ID, 'howto_step_'.$schema->ID, true) );
480
- $howto_data['howto_supply_'.$schema->ID] = esc_sql ( get_post_meta($post->ID, 'howto_supply_'.$schema->ID, true) );
481
-
482
- }
483
-
484
- if($schema_type == 'MedicalCondition'){
485
-
486
- $mc_data['mc_cause_'.$schema->ID] = esc_sql ( get_post_meta($post->ID, 'mc_cause_'.$schema->ID, true) );
487
- $mc_data['mc_symptom_'.$schema->ID] = esc_sql ( get_post_meta($post->ID, 'mc_symptom_'.$schema->ID, true) );
488
- $mc_data['mc_risk_factor_'.$schema->ID] = esc_sql ( get_post_meta($post->ID, 'mc_risk_factor_'.$schema->ID, true) );
489
-
490
- }
491
-
492
- if($schema_type == 'TVSeries'){
493
-
494
- $tvseries_data['tvseries_actor_'.$schema->ID] = esc_sql ( get_post_meta($post->ID, 'tvseries_actor_'.$schema->ID, true) );
495
- $tvseries_data['tvseries_season_'.$schema->ID] = esc_sql ( get_post_meta($post->ID, 'tvseries_season_'.$schema->ID, true) );
496
-
497
- }
498
-
499
- if($schema_type == 'Trip'){
500
-
501
- $trip_data['trip_itinerary_'.$schema->ID] = esc_sql ( get_post_meta($post->ID, 'trip_itinerary_'.$schema->ID, true) );
502
-
503
- }
504
-
505
  if($key==0){
506
 
507
  $tabs .='<li class="selected"><a saswp-schema-type="'.esc_attr($schema_type).'" data-id="saswp_specific_'.esc_attr($schema->ID).'" class="saswp-tab-links selected">'.esc_attr($schema->post_title).'</a>'
@@ -515,346 +609,9 @@ class saswp_post_specific {
515
  //varible $output has been escapped while creating it
516
  $tabs_fields .= '<table class="form-table"><tbody>' . $output . '</tbody></table>';
517
  $tabs_fields .= '</div>';
518
-
519
- //How to schema starts here
520
- if($schema_type == 'HowTo'){
521
-
522
- $schema_id = $schema->ID;
523
-
524
- $tabs_fields .= '<div class="saswp-table-create-onajax">';
525
-
526
-
527
- //supply section starts here
528
- $tabs_fields .= '<div class="saswp-how-to-supply-section-main">';
529
- $tabs_fields .= '<div class="saswp-how-to-supply-section" data-id="'.esc_attr($schema_id).'">';
530
- if(isset($howto_data['howto_supply_'.$schema_id])){
531
-
532
- $howto_supply = $howto_data['howto_supply_'.$schema_id];
533
- $supply_html = '';
534
-
535
- if(!empty($howto_supply)){
536
-
537
- $i = 0;
538
- foreach ($howto_supply as $supply){
539
-
540
- $supply_html .= '<div class="saswp-how-to-supply-table-div" data-id="'.$i.'">';
541
- $supply_html .= '<a class="saswp-table-close">X</a>';
542
- $supply_html .= $this->saswp_get_dynamic_html($schema_id, 'howto_supply', $i, $supply);
543
- $supply_html .= '</div>';
544
-
545
- $i++;
546
- }
547
-
548
- }
549
-
550
- $tabs_fields .= $supply_html;
551
-
552
- }
553
- $tabs_fields .= '</div>';
554
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-how-to-supply">'.esc_html__( 'Add HowTo Supply', 'schema-and-structured-data-for-wp' ).'</a>';
555
- $tabs_fields .= '</div>';
556
- //supply section ends here here
557
-
558
- //tool section starts here
559
- $tabs_fields .= '<div class="saswp-how-to-tool-section-main">';
560
- $tabs_fields .= '<div class="saswp-how-to-tool-section" data-id="'.esc_attr($schema_id).'">';
561
- if(isset($howto_data['howto_tool_'.$schema_id])){
562
-
563
- $howto_tool = $howto_data['howto_tool_'.$schema_id];
564
- $tool_html = '';
565
-
566
- if(!empty($howto_tool)){
567
-
568
- $i = 0;
569
- foreach ($howto_tool as $tool){
570
-
571
- $tool_html .= '<div class="saswp-how-to-tool-table-div" data-id="'.$i.'">';
572
- $tool_html .= '<a class="saswp-table-close">X</a>';
573
- $tool_html .= $this->saswp_get_dynamic_html($schema_id, 'howto_tool', $i, $tool);
574
- $tool_html .= '</div>';
575
-
576
- $i++;
577
- }
578
-
579
- }
580
-
581
- $tabs_fields .= $tool_html;
582
-
583
- }
584
- $tabs_fields .= '</div>';
585
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-how-to-tool">'.esc_html__( 'Add HowTo Tool', 'schema-and-structured-data-for-wp' ).'</a>';
586
- $tabs_fields .= '</div>';
587
- //tool section ends here here
588
-
589
- //step section starts here here
590
- $tabs_fields .= '<div class="saswp-how-to-step-section-main">';
591
- $tabs_fields .= '<div class="saswp-how-to-step-section" data-id="'.esc_attr($schema_id).'">';
592
- if(isset($howto_data['howto_step_'.$schema_id])){
593
-
594
- $howto_step = $howto_data['howto_step_'.$schema_id];
595
- $step_html = '';
596
-
597
- if(!empty($howto_step)){
598
-
599
- $i = 0;
600
- foreach ($howto_step as $step){
601
-
602
- $step_html .= '<div class="saswp-how-to-step-table-div" data-id="'.$i.'">';
603
- $step_html .= '<a class="saswp-table-close">X</a>';
604
- $step_html .= $this->saswp_get_dynamic_html($schema_id, 'howto_step', $i, $step);
605
- $step_html .= '</div>';
606
-
607
- $i++;
608
- }
609
-
610
- }
611
-
612
- $tabs_fields .= $step_html;
613
-
614
- }
615
- $tabs_fields .= '</div>';
616
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-how-to-step">'.esc_html__( 'Add HowTo Step', 'schema-and-structured-data-for-wp' ).'</a>';
617
- $tabs_fields .= '</div>';
618
- //step section ends here here
619
-
620
-
621
- $tabs_fields .= '</div>';
622
- }
623
- //How to schema ends here
624
-
625
- //Medical condition schema starts here
626
- if($schema_type == 'MedicalCondition'){
627
-
628
- $schema_id = $schema->ID;
629
-
630
- $tabs_fields .= '<div class="saswp-table-create-onajax">';
631
-
632
-
633
- //cause section starts here
634
-
635
- $tabs_fields .= '<div class="saswp-mc-cause-section-main">';
636
- $tabs_fields .= '<div class="saswp-mc-cause-section" data-id="'.esc_attr($schema_id).'">';
637
- if(isset($mc_data['mc_cause_'.$schema_id])){
638
-
639
- $mc_cause = $mc_data['mc_cause_'.$schema_id];
640
-
641
- $cause_html = '';
642
-
643
- if(!empty($mc_cause)){
644
-
645
- $i = 0;
646
- foreach ($mc_cause as $cause){
647
-
648
- $cause_html .= '<div class="saswp-mc-cause-table-div" data-id="'.$i.'">';
649
- $cause_html .= '<a class="saswp-table-close">X</a>';
650
- $cause_html .= $this->saswp_get_dynamic_html($schema_id, 'mc_cause', $i, $cause);
651
- $cause_html .= '</div>';
652
-
653
- $i++;
654
- }
655
-
656
- }
657
-
658
- $tabs_fields .= $cause_html;
659
-
660
- }
661
- $tabs_fields .= '</div>';
662
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-mc-cause">'.esc_html__( 'Add MC Cause', 'schema-and-structured-data-for-wp' ).'</a>';
663
- $tabs_fields .= '</div>';
664
-
665
- //cause section ends here here
666
-
667
- //symptom section starts here
668
- $tabs_fields .= '<div class="saswp-mc-symptom-section-main">';
669
- $tabs_fields .= '<div class="saswp-mc-symptom-section" data-id="'.esc_attr($schema_id).'">';
670
- if(isset($mc_data['mc_symptom_'.$schema_id])){
671
-
672
- $mc_symptom = $mc_data['mc_symptom_'.$schema_id];
673
- $symptom_html = '';
674
-
675
- if(!empty($mc_symptom)){
676
-
677
- $i = 0;
678
- foreach ($mc_symptom as $symptom){
679
-
680
- $symptom_html .= '<div class="saswp-mc-symptom-table-div" data-id="'.$i.'">';
681
- $symptom_html .= '<a class="saswp-table-close">X</a>';
682
- $symptom_html .= $this->saswp_get_dynamic_html($schema_id, 'mc_symptom', $i, $symptom);
683
- $symptom_html .= '</div>';
684
-
685
- $i++;
686
- }
687
-
688
- }
689
-
690
- $tabs_fields .= $symptom_html;
691
-
692
- }
693
- $tabs_fields .= '</div>';
694
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-mc-symptom">'.esc_html__( 'Add MC Symptom', 'schema-and-structured-data-for-wp' ).'</a>';
695
- $tabs_fields .= '</div>';
696
- //symptom section ends here
697
-
698
- //risk factor starts here
699
- $tabs_fields .= '<div class="saswp-mc-risk_factor-section-main">';
700
- $tabs_fields .= '<div class="saswp-mc-risk_factor-section" data-id="'.esc_attr($schema_id).'">';
701
- if(isset($mc_data['mc_risk_factor_'.$schema_id])){
702
-
703
- $mc_risk_factor = $mc_data['mc_risk_factor_'.$schema_id];
704
- $risk_factor_html = '';
705
-
706
- if(!empty($mc_risk_factor)){
707
-
708
- $i = 0;
709
- foreach ($mc_risk_factor as $risk_factor){
710
-
711
- $risk_factor_html .= '<div class="saswp-mc-risk_factor-table-div" data-id="'.$i.'">';
712
- $risk_factor_html .= '<a class="saswp-table-close">X</a>';
713
- $risk_factor_html .= $this->saswp_get_dynamic_html($schema_id, 'mc_risk_factor', $i, $risk_factor);
714
- $risk_factor_html .= '</div>';
715
-
716
- $i++;
717
- }
718
-
719
- }
720
-
721
- $tabs_fields .= $risk_factor_html;
722
-
723
- }
724
- $tabs_fields .= '</div>';
725
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-mc-risk_factor">'.esc_html__( 'Add MC Risk Factor', 'schema-and-structured-data-for-wp' ).'</a>';
726
- $tabs_fields .= '</div>';
727
- //risk factor ends here
728
-
729
- $tabs_fields .= '</div>';
730
- }
731
- //Medical condition schema ends here
732
-
733
- //TVSeries schema starts herre
734
- if($schema_type == 'TVSeries'){
735
-
736
- $schema_id = $schema->ID;
737
-
738
- $tabs_fields .= '<div class="saswp-table-create-onajax">';
739
-
740
- //actor section starts here
741
- $tabs_fields .= '<div class="saswp-tvseries-actor-section-main">';
742
- $tabs_fields .= '<div class="saswp-tvseries-actor-section" data-id="'.esc_attr($schema_id).'">';
743
- if(isset($tvseries_data['tvseries_actor_'.$schema_id])){
744
-
745
- $tvseries_actor = $tvseries_data['tvseries_actor_'.$schema_id];
746
-
747
- $actor_html = '';
748
-
749
- if(!empty($tvseries_actor)){
750
-
751
- $i = 0;
752
- foreach ($tvseries_actor as $actor){
753
-
754
- $actor_html .= '<div class="saswp-tvseries-actor-table-div" data-id="'.$i.'">';
755
- $actor_html .= '<a class="saswp-table-close">X</a>';
756
- $actor_html .= $this->saswp_get_dynamic_html($schema_id, 'tvseries_actor', $i, $actor);
757
- $actor_html .= '</div>';
758
-
759
- $i++;
760
- }
761
-
762
- }
763
-
764
- $tabs_fields .= $actor_html;
765
-
766
- }
767
- $tabs_fields .= '</div>';
768
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-tvseries-actor">'.esc_html__( 'Add TVSeries Actor', 'schema-and-structured-data-for-wp' ).'</a>';
769
- $tabs_fields .= '</div>';
770
- //actor section ends here here
771
-
772
- //season section starts here
773
-
774
- $tabs_fields .= '<div class="saswp-tvseries-season-section-main">';
775
- $tabs_fields .= '<div class="saswp-tvseries-season-section" data-id="'.esc_attr($schema_id).'">';
776
- if(isset($tvseries_data['tvseries_season_'.$schema_id])){
777
-
778
- $tvseries_season = $tvseries_data['tvseries_season_'.$schema_id];
779
-
780
- $season_html = '';
781
-
782
- if(!empty($tvseries_season)){
783
-
784
- $i = 0;
785
- foreach ($tvseries_season as $season){
786
-
787
- $season_html .= '<div class="saswp-tvseries-season-table-div" data-id="'.$i.'">';
788
- $season_html .= '<a class="saswp-table-close">X</a>';
789
- $season_html .= $this->saswp_get_dynamic_html($schema_id, 'tvseries_season', $i, $season);
790
- $season_html .= '</div>';
791
-
792
- $i++;
793
- }
794
-
795
- }
796
-
797
- $tabs_fields .= $season_html;
798
-
799
- }
800
- $tabs_fields .= '</div>';
801
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-tvseries-season">'.esc_html__( 'Add TVSeries Season', 'schema-and-structured-data-for-wp' ).'</a>';
802
- $tabs_fields .= '</div>';
803
-
804
- //season section ends here
805
-
806
-
807
- $tabs_fields .= '</div>';
808
- }
809
- //TvSeries schema ends here
810
-
811
-
812
- //Trip schema starts herre
813
- if($schema_type == 'Trip'){
814
-
815
- $schema_id = $schema->ID;
816
-
817
- $tabs_fields .= '<div class="saswp-table-create-onajax">';
818
-
819
- //itinerary section starts here
820
-
821
- $tabs_fields .= '<div class="saswp-trip-itinerary-section-main">';
822
- $tabs_fields .= '<div class="saswp-trip-itinerary-section" data-id="'.esc_attr($schema_id).'">';
823
- if(isset($trip_data['trip_itinerary_'.$schema_id])){
824
-
825
- $trip_itinerary = $trip_data['trip_itinerary_'.$schema_id];
826
-
827
- $itinerary_html = '';
828
-
829
- if(!empty($trip_itinerary)){
830
-
831
- $i = 0;
832
- foreach ($trip_itinerary as $itinerary){
833
-
834
- $itinerary_html .= '<div class="saswp-trip-itinerary-table-div" data-id="'.$i.'">';
835
- $itinerary_html .= '<a class="saswp-table-close">X</a>';
836
- $itinerary_html .= $this->saswp_get_dynamic_html($schema_id, 'trip_itinerary', $i, $itinerary);
837
- $itinerary_html .= '</div>';
838
-
839
- $i++;
840
- }
841
-
842
- }
843
-
844
- $tabs_fields .= $itinerary_html;
845
-
846
- }
847
- $tabs_fields .= '</div>';
848
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-trip-itinerary">'.esc_html__( 'Add Trip Itinerary', 'schema-and-structured-data-for-wp' ).'</a>';
849
- $tabs_fields .= '</div>';
850
-
851
- //itinerary section ends here
852
-
853
-
854
- $tabs_fields .= '</div>';
855
- }
856
- //Trip schema ends here
857
-
858
  $tabs_fields .= '</div>';
859
 
860
  }else{
@@ -870,343 +627,7 @@ class saswp_post_specific {
870
  $tabs_fields .= '<table class="form-table"><tbody>' . $output . '</tbody></table>';
871
  $tabs_fields .= '</div>';
872
 
873
- //How to schema starts here
874
- if($schema_type == 'HowTo'){
875
-
876
- $schema_id = $schema->ID;
877
-
878
- $tabs_fields .= '<div class="saswp-table-create-onajax">';
879
-
880
-
881
- //supply section starts here
882
- $tabs_fields .= '<div class="saswp-how-to-supply-section-main">';
883
- $tabs_fields .= '<div class="saswp-how-to-supply-section" data-id="'.esc_attr($schema_id).'">';
884
- if(isset($howto_data['howto_supply_'.$schema_id])){
885
-
886
- $howto_supply = $howto_data['howto_supply_'.$schema_id];
887
- $supply_html = '';
888
-
889
- if(!empty($howto_supply)){
890
-
891
- $i = 0;
892
- foreach ($howto_supply as $supply){
893
-
894
- $supply_html .= '<div class="saswp-how-to-supply-table-div" data-id="'.$i.'">';
895
- $supply_html .= '<a class="saswp-table-close">X</a>';
896
- $supply_html .= $this->saswp_get_dynamic_html($schema_id, 'howto_supply', $i, $supply);
897
- $supply_html .= '</div>';
898
-
899
- $i++;
900
- }
901
-
902
- }
903
-
904
- $tabs_fields .= $supply_html;
905
-
906
- }
907
- $tabs_fields .= '</div>';
908
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-how-to-supply">'.esc_html__( 'Add HowTo Supply', 'schema-and-structured-data-for-wp' ).'</a>';
909
- $tabs_fields .= '</div>';
910
- //supply section ends here here
911
-
912
- //tool section starts here
913
- $tabs_fields .= '<div class="saswp-how-to-tool-section-main">';
914
- $tabs_fields .= '<div class="saswp-how-to-tool-section" data-id="'.esc_attr($schema_id).'">';
915
- if(isset($howto_data['howto_tool_'.$schema_id])){
916
-
917
- $howto_tool = $howto_data['howto_tool_'.$schema_id];
918
- $tool_html = '';
919
-
920
- if(!empty($howto_tool)){
921
-
922
- $i = 0;
923
- foreach ($howto_tool as $tool){
924
-
925
- $tool_html .= '<div class="saswp-how-to-tool-table-div" data-id="'.$i.'">';
926
- $tool_html .= '<a class="saswp-table-close">X</a>';
927
- $tool_html .= $this->saswp_get_dynamic_html($schema_id, 'howto_tool', $i, $tool);
928
- $tool_html .= '</div>';
929
-
930
- $i++;
931
- }
932
-
933
- }
934
-
935
- $tabs_fields .= $tool_html;
936
-
937
- }
938
- $tabs_fields .= '</div>';
939
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-how-to-tool">'.esc_html__( 'Add HowTo Tool', 'schema-and-structured-data-for-wp' ).'</a>';
940
- $tabs_fields .= '</div>';
941
- //tool section ends here here
942
-
943
- //step section starts here here
944
- $tabs_fields .= '<div class="saswp-how-to-step-section-main">';
945
- $tabs_fields .= '<div class="saswp-how-to-step-section" data-id="'.esc_attr($schema_id).'">';
946
- if(isset($howto_data['howto_step_'.$schema_id])){
947
-
948
- $howto_step = $howto_data['howto_step_'.$schema_id];
949
- $step_html = '';
950
-
951
- if(!empty($howto_step)){
952
-
953
- $i = 0;
954
- foreach ($howto_step as $step){
955
-
956
- $step_html .= '<div class="saswp-how-to-step-table-div" data-id="'.$i.'">';
957
- $step_html .= '<a class="saswp-table-close">X</a>';
958
- $step_html .= $this->saswp_get_dynamic_html($schema_id, 'howto_step', $i, $step);
959
- $step_html .= '</div>';
960
-
961
- $i++;
962
- }
963
-
964
- }
965
-
966
- $tabs_fields .= $step_html;
967
-
968
- }
969
- $tabs_fields .= '</div>';
970
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-how-to-step">'.esc_html__( 'Add HowTo Step', 'schema-and-structured-data-for-wp' ).'</a>';
971
- $tabs_fields .= '</div>';
972
- //step section ends here here
973
-
974
-
975
- $tabs_fields .= '</div>';
976
- }
977
- //How to schema ends here
978
-
979
- //Medical condition schema starts here
980
- if($schema_type == 'MedicalCondition'){
981
-
982
- $schema_id = $schema->ID;
983
-
984
- $tabs_fields .= '<div class="saswp-table-create-onajax">';
985
-
986
-
987
- //cause section starts here
988
-
989
- $tabs_fields .= '<div class="saswp-mc-cause-section-main">';
990
- $tabs_fields .= '<div class="saswp-mc-cause-section" data-id="'.esc_attr($schema_id).'">';
991
- if(isset($mc_data['mc_cause_'.$schema_id])){
992
-
993
- $mc_cause = $mc_data['mc_cause_'.$schema_id];
994
-
995
- $cause_html = '';
996
-
997
- if(!empty($mc_cause)){
998
-
999
- $i = 0;
1000
- foreach ($mc_cause as $cause){
1001
-
1002
- $cause_html .= '<div class="saswp-mc-cause-table-div" data-id="'.$i.'">';
1003
- $cause_html .= '<a class="saswp-table-close">X</a>';
1004
- $cause_html .= $this->saswp_get_dynamic_html($schema_id, 'mc_cause', $i, $cause);
1005
- $cause_html .= '</div>';
1006
-
1007
- $i++;
1008
- }
1009
-
1010
- }
1011
-
1012
- $tabs_fields .= $cause_html;
1013
-
1014
- }
1015
- $tabs_fields .= '</div>';
1016
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-mc-cause">Add MC Cause</a>';
1017
- $tabs_fields .= '</div>';
1018
-
1019
- //cause section ends here here
1020
-
1021
- //symptom section starts here
1022
- $tabs_fields .= '<div class="saswp-mc-symptom-section-main">';
1023
- $tabs_fields .= '<div class="saswp-mc-symptom-section" data-id="'.esc_attr($schema_id).'">';
1024
- if(isset($mc_data['mc_symptom_'.$schema_id])){
1025
-
1026
- $mc_symptom = $mc_data['mc_symptom_'.$schema_id];
1027
- $symptom_html = '';
1028
-
1029
- if(!empty($mc_symptom)){
1030
-
1031
- $i = 0;
1032
- foreach ($mc_symptom as $symptom){
1033
-
1034
- $symptom_html .= '<div class="saswp-mc-symptom-table-div" data-id="'.$i.'">';
1035
- $symptom_html .= '<a class="saswp-table-close">X</a>';
1036
- $symptom_html .= $this->saswp_get_dynamic_html($schema_id, 'mc_symptom', $i, $symptom);
1037
- $symptom_html .= '</div>';
1038
-
1039
- $i++;
1040
- }
1041
-
1042
- }
1043
-
1044
- $tabs_fields .= $symptom_html;
1045
-
1046
- }
1047
- $tabs_fields .= '</div>';
1048
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-mc-symptom">'.esc_html__( 'Add MC Symptom', 'schema-and-structured-data-for-wp' ).'</a>';
1049
- $tabs_fields .= '</div>';
1050
- //symptom section ends here
1051
-
1052
- //risk factor starts here
1053
- $tabs_fields .= '<div class="saswp-mc-risk_factor-section-main">';
1054
- $tabs_fields .= '<div class="saswp-mc-risk_factor-section" data-id="'.esc_attr($schema_id).'">';
1055
- if(isset($mc_data['mc_risk_factor_'.$schema_id])){
1056
-
1057
- $mc_risk_factor = $mc_data['mc_risk_factor_'.$schema_id];
1058
- $risk_factor_html = '';
1059
-
1060
- if(!empty($mc_risk_factor)){
1061
-
1062
- $i = 0;
1063
- foreach ($mc_risk_factor as $risk_factor){
1064
-
1065
- $risk_factor_html .= '<div class="saswp-mc-risk_factor-table-div" data-id="'.$i.'">';
1066
- $risk_factor_html .= '<a class="saswp-table-close">X</a>';
1067
- $risk_factor_html .= $this->saswp_get_dynamic_html($schema_id, 'mc_risk_factor', $i, $risk_factor);
1068
- $risk_factor_html .= '</div>';
1069
-
1070
- $i++;
1071
- }
1072
-
1073
- }
1074
-
1075
- $tabs_fields .= $risk_factor_html;
1076
-
1077
- }
1078
- $tabs_fields .= '</div>';
1079
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-mc-risk_factor">'.esc_html__( 'Add MC Risk Factor', 'schema-and-structured-data-for-wp' ).'</a>';
1080
- $tabs_fields .= '</div>';
1081
- //risk factor ends here
1082
-
1083
- $tabs_fields .= '</div>';
1084
- }
1085
- //Medical condition schema ends here
1086
-
1087
- //TVSeries schema starts herre
1088
- if($schema_type == 'TVSeries'){
1089
-
1090
- $schema_id = $schema->ID;
1091
-
1092
- $tabs_fields .= '<div class="saswp-table-create-onajax">';
1093
-
1094
- //actor section starts here
1095
- $tabs_fields .= '<div class="saswp-tvseries-actor-section-main">';
1096
- $tabs_fields .= '<div class="saswp-tvseries-actor-section" data-id="'.esc_attr($schema_id).'">';
1097
- if(isset($tvseries_data['tvseries_actor_'.$schema_id])){
1098
-
1099
- $tvseries_actor = $tvseries_data['tvseries_actor_'.$schema_id];
1100
-
1101
- $actor_html = '';
1102
-
1103
- if(!empty($tvseries_actor)){
1104
-
1105
- $i = 0;
1106
- foreach ($tvseries_actor as $actor){
1107
-
1108
- $actor_html .= '<div class="saswp-tvseries-actor-table-div" data-id="'.$i.'">';
1109
- $actor_html .= '<a class="saswp-table-close">X</a>';
1110
- $actor_html .= $this->saswp_get_dynamic_html($schema_id, 'tvseries_actor', $i, $actor);
1111
- $actor_html .= '</div>';
1112
-
1113
- $i++;
1114
- }
1115
-
1116
- }
1117
-
1118
- $tabs_fields .= $actor_html;
1119
-
1120
- }
1121
- $tabs_fields .= '</div>';
1122
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-tvseries-actor">'.esc_html__( 'Add TVSeries Actor', 'schema-and-structured-data-for-wp' ).'</a>';
1123
- $tabs_fields .= '</div>';
1124
- //actor section ends here here
1125
-
1126
- //season section starts here
1127
-
1128
- $tabs_fields .= '<div class="saswp-tvseries-season-section-main">';
1129
- $tabs_fields .= '<div class="saswp-tvseries-season-section" data-id="'.esc_attr($schema_id).'">';
1130
- if(isset($tvseries_data['tvseries_season_'.$schema_id])){
1131
-
1132
- $tvseries_season = $tvseries_data['tvseries_season_'.$schema_id];
1133
-
1134
- $season_html = '';
1135
-
1136
- if(!empty($tvseries_season)){
1137
-
1138
- $i = 0;
1139
- foreach ($tvseries_season as $season){
1140
-
1141
- $season_html .= '<div class="saswp-tvseries-season-table-div" data-id="'.$i.'">';
1142
- $season_html .= '<a class="saswp-table-close">X</a>';
1143
- $season_html .= $this->saswp_get_dynamic_html($schema_id, 'tvseries_season', $i, $season);
1144
- $season_html .= '</div>';
1145
-
1146
- $i++;
1147
- }
1148
-
1149
- }
1150
-
1151
- $tabs_fields .= $season_html;
1152
-
1153
- }
1154
- $tabs_fields .= '</div>';
1155
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-tvseries-season">'.esc_html__( 'Add TVSeries Season', 'schema-and-structured-data-for-wp' ).'</a>';
1156
- $tabs_fields .= '</div>';
1157
-
1158
- //season section ends here
1159
-
1160
-
1161
- $tabs_fields .= '</div>';
1162
- }
1163
- //TvSeries schema ends here
1164
-
1165
- //Trip schema starts herre
1166
- if($schema_type == 'Trip'){
1167
-
1168
- $schema_id = $schema->ID;
1169
-
1170
- $tabs_fields .= '<div class="saswp-table-create-onajax">';
1171
-
1172
- //itinerary section starts here
1173
-
1174
- $tabs_fields .= '<div class="saswp-trip-itinerary-section-main">';
1175
- $tabs_fields .= '<div class="saswp-trip-itinerary-section" data-id="'.esc_attr($schema_id).'">';
1176
- if(isset($trip_data['trip_itinerary_'.$schema_id])){
1177
-
1178
- $trip_itinerary = $trip_data['trip_itinerary_'.$schema_id];
1179
-
1180
- $itinerary_html = '';
1181
-
1182
- if(!empty($trip_itinerary)){
1183
-
1184
- $i = 0;
1185
- foreach ($trip_itinerary as $itinerary){
1186
-
1187
- $itinerary_html .= '<div class="saswp-trip-itinerary-table-div" data-id="'.$i.'">';
1188
- $itinerary_html .= '<a class="saswp-table-close">X</a>';
1189
- $itinerary_html .= $this->saswp_get_dynamic_html($schema_id, 'trip_itinerary', $i, $itinerary);
1190
- $itinerary_html .= '</div>';
1191
-
1192
- $i++;
1193
- }
1194
-
1195
- }
1196
-
1197
- $tabs_fields .= $itinerary_html;
1198
-
1199
- }
1200
- $tabs_fields .= '</div>';
1201
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-trip-itinerary">'.esc_html__( 'Add Trip Itinerary', 'schema-and-structured-data-for-wp' ).'</a>';
1202
- $tabs_fields .= '</div>';
1203
-
1204
- //itinerary section ends here
1205
-
1206
-
1207
- $tabs_fields .= '</div>';
1208
- }
1209
- //Trip schema ends here
1210
 
1211
  $tabs_fields .= '</div>';
1212
 
@@ -1269,33 +690,7 @@ class saswp_post_specific {
1269
  if(isset($schema_enable[$all_schema[0]->ID]) && $schema_enable[$all_schema[0]->ID] == 1){
1270
  $checked = 'checked';
1271
  }
1272
-
1273
- if($schema_type == 'HowTo'){
1274
-
1275
- $howto_data['howto_tool_'.$all_schema[0]->ID] = esc_sql ( get_post_meta($post->ID, 'howto_tool_'.$all_schema[0]->ID, true) );
1276
- $howto_data['howto_step_'.$all_schema[0]->ID] = esc_sql ( get_post_meta($post->ID, 'howto_step_'.$all_schema[0]->ID, true) );
1277
- $howto_data['howto_supply_'.$all_schema[0]->ID] = esc_sql ( get_post_meta($post->ID, 'howto_supply_'.$all_schema[0]->ID, true) );
1278
- }
1279
- if($schema_type == 'MedicalCondition'){
1280
-
1281
- $mc_data['mc_cause_'.$all_schema[0]->ID] = esc_sql ( get_post_meta($post->ID, 'mc_cause_'.$all_schema[0]->ID, true) );
1282
- $mc_data['mc_symptom_'.$all_schema[0]->ID] = esc_sql ( get_post_meta($post->ID, 'mc_symptom_'.$all_schema[0]->ID, true) );
1283
- $mc_data['mc_risk_factor_'.$all_schema[0]->ID] = esc_sql ( get_post_meta($post->ID, 'mc_risk_factor_'.$all_schema[0]->ID, true) );
1284
-
1285
- }
1286
- if($schema_type == 'TVSeries'){
1287
-
1288
- $tvseries_data['tvseries_actor_'.$all_schema[0]->ID] = esc_sql ( get_post_meta($post->ID, 'tvseries_actor_'.$all_schema[0]->ID, true) );
1289
- $tvseries_data['tvseries_season_'.$all_schema[0]->ID] = esc_sql ( get_post_meta($post->ID, 'tvseries_season_'.$all_schema[0]->ID, true) );
1290
-
1291
- }
1292
-
1293
- if($schema_type == 'Trip'){
1294
-
1295
- $trip_data['trip_itinerary_'.$all_schema[0]->ID] = esc_sql ( get_post_meta($post->ID, 'trip_itinerary_'.$all_schema[0]->ID, true) );
1296
-
1297
- }
1298
-
1299
  $this->meta_fields = $response;
1300
  $output = $this->saswp_saswp_post_specific( $post, $all_schema[0]->ID );
1301
  $tabs_fields .= '<div>';
@@ -1308,344 +703,8 @@ class saswp_post_specific {
1308
  $tabs_fields .= '<div class="saswp-table-create-onload">';
1309
  $tabs_fields .= '<table class="form-table"><tbody>' . $output . '</tbody></table>';
1310
  $tabs_fields .= '</div>';
1311
-
1312
-
1313
- //How to schema starts here
1314
- if($schema_type == 'HowTo'){
1315
-
1316
- $schema_id = $all_schema[0]->ID;
1317
-
1318
- $tabs_fields .= '<div class="saswp-table-create-onajax">';
1319
-
1320
-
1321
- //supply section starts here
1322
- $tabs_fields .= '<div class="saswp-how-to-supply-section-main">';
1323
- $tabs_fields .= '<div class="saswp-how-to-supply-section" data-id="'.esc_attr($schema_id).'">';
1324
- if(isset($howto_data['howto_supply_'.$schema_id])){
1325
-
1326
- $howto_supply = $howto_data['howto_supply_'.$schema_id];
1327
- $supply_html = '';
1328
-
1329
- if(!empty($howto_supply)){
1330
-
1331
- $i = 0;
1332
- foreach ($howto_supply as $supply){
1333
-
1334
- $supply_html .= '<div class="saswp-how-to-supply-table-div" data-id="'.$i.'">';
1335
- $supply_html .= '<a class="saswp-table-close">X</a>';
1336
- $supply_html .= $this->saswp_get_dynamic_html($schema_id, 'howto_supply', $i, $supply);
1337
- $supply_html .= '</div>';
1338
-
1339
- $i++;
1340
- }
1341
-
1342
- }
1343
-
1344
- $tabs_fields .= $supply_html;
1345
-
1346
- }
1347
- $tabs_fields .= '</div>';
1348
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-how-to-supply">Add HowTo Supply</a>';
1349
- $tabs_fields .= '</div>';
1350
- //supply section ends here here
1351
-
1352
- //tool section starts here
1353
- $tabs_fields .= '<div class="saswp-how-to-tool-section-main">';
1354
- $tabs_fields .= '<div class="saswp-how-to-tool-section" data-id="'.esc_attr($schema_id).'">';
1355
- if(isset($howto_data['howto_tool_'.$schema_id])){
1356
-
1357
- $howto_tool = $howto_data['howto_tool_'.$schema_id];
1358
- $tool_html = '';
1359
-
1360
- if(!empty($howto_tool)){
1361
-
1362
- $i = 0;
1363
- foreach ($howto_tool as $tool){
1364
-
1365
- $tool_html .= '<div class="saswp-how-to-tool-table-div" data-id="'.$i.'">';
1366
- $tool_html .= '<a class="saswp-table-close">X</a>';
1367
- $tool_html .= $this->saswp_get_dynamic_html($schema_id, 'howto_tool', $i, $tool);
1368
- $tool_html .= '</div>';
1369
-
1370
- $i++;
1371
- }
1372
-
1373
- }
1374
-
1375
- $tabs_fields .= $tool_html;
1376
-
1377
- }
1378
- $tabs_fields .= '</div>';
1379
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-how-to-tool">Add HowTo Tool</a>';
1380
- $tabs_fields .= '</div>';
1381
- //tool section ends here here
1382
-
1383
- //step section starts here here
1384
- $tabs_fields .= '<div class="saswp-how-to-step-section-main">';
1385
- $tabs_fields .= '<div class="saswp-how-to-step-section" data-id="'.esc_attr($schema_id).'">';
1386
- if(isset($howto_data['howto_step_'.$schema_id])){
1387
-
1388
- $howto_step = $howto_data['howto_step_'.$schema_id];
1389
- $step_html = '';
1390
-
1391
- if(!empty($howto_step)){
1392
-
1393
- $i = 0;
1394
- foreach ($howto_step as $step){
1395
-
1396
- $step_html .= '<div class="saswp-how-to-step-table-div" data-id="'.$i.'">';
1397
- $step_html .= '<a class="saswp-table-close">X</a>';
1398
- $step_html .= $this->saswp_get_dynamic_html($schema_id, 'howto_step', $i, $step);
1399
- $step_html .= '</div>';
1400
-
1401
- $i++;
1402
- }
1403
-
1404
- }
1405
-
1406
- $tabs_fields .= $step_html;
1407
-
1408
- }
1409
- $tabs_fields .= '</div>';
1410
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-how-to-step">Add HowTo Step</a>';
1411
- $tabs_fields .= '</div>';
1412
- //step section ends here here
1413
-
1414
-
1415
- $tabs_fields .= '</div>';
1416
- }
1417
- //How to schema ends here
1418
-
1419
- //Medical condition schema starts here
1420
- if($schema_type == 'MedicalCondition'){
1421
-
1422
- $schema_id = $all_schema[0]->ID;
1423
-
1424
- $tabs_fields .= '<div class="saswp-table-create-onajax">';
1425
-
1426
- //cause section starts here
1427
-
1428
- $tabs_fields .= '<div class="saswp-mc-cause-section-main">';
1429
- $tabs_fields .= '<div class="saswp-mc-cause-section" data-id="'.esc_attr($schema_id).'">';
1430
- if(isset($mc_data['mc_cause_'.$schema_id])){
1431
-
1432
- $mc_cause = $mc_data['mc_cause_'.$schema_id];
1433
-
1434
- $cause_html = '';
1435
-
1436
- if(!empty($mc_cause)){
1437
-
1438
- $i = 0;
1439
- foreach ($mc_cause as $cause){
1440
-
1441
- $cause_html .= '<div class="saswp-mc-cause-table-div" data-id="'.$i.'">';
1442
- $cause_html .= '<a class="saswp-table-close">X</a>';
1443
- $cause_html .= $this->saswp_get_dynamic_html($schema_id, 'mc_cause', $i, $cause);
1444
- $cause_html .= '</div>';
1445
-
1446
- $i++;
1447
- }
1448
-
1449
- }
1450
-
1451
- $tabs_fields .= $cause_html;
1452
-
1453
- }
1454
- $tabs_fields .= '</div>';
1455
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-mc-cause">Add MC Cause</a>';
1456
- $tabs_fields .= '</div>';
1457
-
1458
- //cause section ends here here
1459
-
1460
- //symptom section starts here
1461
- $tabs_fields .= '<div class="saswp-mc-symptom-section-main">';
1462
- $tabs_fields .= '<div class="saswp-mc-symptom-section" data-id="'.esc_attr($schema_id).'">';
1463
- if(isset($mc_data['mc_symptom_'.$schema_id])){
1464
-
1465
- $mc_symptom = $mc_data['mc_symptom_'.$schema_id];
1466
- $symptom_html = '';
1467
-
1468
- if(!empty($mc_symptom)){
1469
-
1470
- $i = 0;
1471
- foreach ($mc_symptom as $symptom){
1472
-
1473
- $symptom_html .= '<div class="saswp-mc-symptom-table-div" data-id="'.$i.'">';
1474
- $symptom_html .= '<a class="saswp-table-close">X</a>';
1475
- $symptom_html .= $this->saswp_get_dynamic_html($schema_id, 'mc_symptom', $i, $symptom);
1476
- $symptom_html .= '</div>';
1477
-
1478
- $i++;
1479
- }
1480
-
1481
- }
1482
-
1483
- $tabs_fields .= $symptom_html;
1484
-
1485
- }
1486
- $tabs_fields .= '</div>';
1487
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-mc-symptom">'.esc_html__( 'Add MC Symptom', 'schema-and-structured-data-for-wp' ).'</a>';
1488
- $tabs_fields .= '</div>';
1489
- //symptom section ends here
1490
-
1491
- //risk factor starts here
1492
- $tabs_fields .= '<div class="saswp-mc-risk_factor-section-main">';
1493
- $tabs_fields .= '<div class="saswp-mc-risk_factor-section" data-id="'.esc_attr($schema_id).'">';
1494
- if(isset($mc_data['mc_risk_factor_'.$schema_id])){
1495
-
1496
- $mc_risk_factor = $mc_data['mc_risk_factor_'.$schema_id];
1497
- $risk_factor_html = '';
1498
-
1499
- if(!empty($mc_risk_factor)){
1500
-
1501
- $i = 0;
1502
- foreach ($mc_risk_factor as $risk_factor){
1503
-
1504
- $risk_factor_html .= '<div class="saswp-mc-risk_factor-table-div" data-id="'.$i.'">';
1505
- $risk_factor_html .= '<a class="saswp-table-close">X</a>';
1506
- $risk_factor_html .= $this->saswp_get_dynamic_html($schema_id, 'mc_risk_factor', $i, $risk_factor);
1507
- $risk_factor_html .= '</div>';
1508
-
1509
- $i++;
1510
- }
1511
-
1512
- }
1513
-
1514
- $tabs_fields .= $risk_factor_html;
1515
-
1516
- }
1517
- $tabs_fields .= '</div>';
1518
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-mc-risk_factor">'.esc_html__( 'Add MC Risk Factor', 'schema-and-structured-data-for-wp' ).'</a>';
1519
- $tabs_fields .= '</div>';
1520
- //risk factor ends here
1521
-
1522
- $tabs_fields .= '</div>';
1523
- }
1524
- //Medical condition schema ends here
1525
-
1526
- //TVSeries schema starts herre
1527
- if($schema_type == 'TVSeries'){
1528
-
1529
- $schema_id = $all_schema[0]->ID;
1530
-
1531
- $tabs_fields .= '<div class="saswp-table-create-onajax">';
1532
-
1533
- //actor section starts here
1534
- $tabs_fields .= '<div class="saswp-tvseries-actor-section-main">';
1535
- $tabs_fields .= '<div class="saswp-tvseries-actor-section" data-id="'.esc_attr($schema_id).'">';
1536
- if(isset($tvseries_data['tvseries_actor_'.$schema_id])){
1537
-
1538
- $tvseries_actor = $tvseries_data['tvseries_actor_'.$schema_id];
1539
-
1540
- $actor_html = '';
1541
-
1542
- if(!empty($tvseries_actor)){
1543
-
1544
- $i = 0;
1545
- foreach ($tvseries_actor as $actor){
1546
-
1547
- $actor_html .= '<div class="saswp-tvseries-actor-table-div" data-id="'.$i.'">';
1548
- $actor_html .= '<a class="saswp-table-close">X</a>';
1549
- $actor_html .= $this->saswp_get_dynamic_html($schema_id, 'tvseries_actor', $i, $actor);
1550
- $actor_html .= '</div>';
1551
-
1552
- $i++;
1553
- }
1554
-
1555
- }
1556
-
1557
- $tabs_fields .= $actor_html;
1558
-
1559
- }
1560
- $tabs_fields .= '</div>';
1561
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-tvseries-actor">'.esc_html__( 'Add TVSeries Actor', 'schema-and-structured-data-for-wp' ).'</a>';
1562
- $tabs_fields .= '</div>';
1563
- //actor section ends here here
1564
-
1565
- //season section starts here
1566
-
1567
- $tabs_fields .= '<div class="saswp-tvseries-season-section-main">';
1568
- $tabs_fields .= '<div class="saswp-tvseries-season-section" data-id="'.esc_attr($schema_id).'">';
1569
- if(isset($tvseries_data['tvseries_season_'.$schema_id])){
1570
-
1571
- $tvseries_season = $tvseries_data['tvseries_season_'.$schema_id];
1572
-
1573
- $season_html = '';
1574
-
1575
- if(!empty($tvseries_season)){
1576
-
1577
- $i = 0;
1578
- foreach ($tvseries_season as $season){
1579
-
1580
- $season_html .= '<div class="saswp-tvseries-season-table-div" data-id="'.$i.'">';
1581
- $season_html .= '<a class="saswp-table-close">X</a>';
1582
- $season_html .= $this->saswp_get_dynamic_html($schema_id, 'tvseries_season', $i, $season);
1583
- $season_html .= '</div>';
1584
-
1585
- $i++;
1586
- }
1587
-
1588
- }
1589
-
1590
- $tabs_fields .= $season_html;
1591
-
1592
- }
1593
- $tabs_fields .= '</div>';
1594
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-tvseries-season">'.esc_html__( 'Add TVSeries Season', 'schema-and-structured-data-for-wp' ).'</a>';
1595
- $tabs_fields .= '</div>';
1596
-
1597
- //season section ends here
1598
-
1599
-
1600
- $tabs_fields .= '</div>';
1601
- }
1602
- //TvSeries schema ends here
1603
-
1604
- //Trip schema starts herre
1605
- if($schema_type == 'Trip'){
1606
-
1607
- $schema_id = $all_schema[0]->ID;
1608
-
1609
- $tabs_fields .= '<div class="saswp-table-create-onajax">';
1610
-
1611
- //itinerary section starts here
1612
-
1613
- $tabs_fields .= '<div class="saswp-trip-itinerary-section-main">';
1614
- $tabs_fields .= '<div class="saswp-trip-itinerary-section" data-id="'.esc_attr($schema_id).'">';
1615
- if(isset($trip_data['trip_itinerary_'.$schema_id])){
1616
-
1617
- $trip_itinerary = $trip_data['trip_itinerary_'.$schema_id];
1618
-
1619
- $itinerary_html = '';
1620
-
1621
- if(!empty($trip_itinerary)){
1622
-
1623
- $i = 0;
1624
- foreach ($trip_itinerary as $itinerary){
1625
-
1626
- $itinerary_html .= '<div class="saswp-trip-itinerary-table-div" data-id="'.$i.'">';
1627
- $itinerary_html .= '<a class="saswp-table-close">X</a>';
1628
- $itinerary_html .= $this->saswp_get_dynamic_html($schema_id, 'trip_itinerary', $i, $itinerary);
1629
- $itinerary_html .= '</div>';
1630
-
1631
- $i++;
1632
- }
1633
-
1634
- }
1635
-
1636
- $tabs_fields .= $itinerary_html;
1637
-
1638
- }
1639
- $tabs_fields .= '</div>';
1640
- $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" class="button saswp-trip-itinerary">'.esc_html__( 'Add Trip Itinerary', 'schema-and-structured-data-for-wp' ).'</a>';
1641
- $tabs_fields .= '</div>';
1642
-
1643
- //itinerary section ends here
1644
-
1645
-
1646
- $tabs_fields .= '</div>';
1647
- }
1648
- //Trip schema ends here
1649
 
1650
  $tabs_fields .= '</div>';
1651
 
@@ -1674,8 +733,7 @@ class saswp_post_specific {
1674
  $tabs_fields.= '</div>';
1675
 
1676
  //custom schema ends here
1677
-
1678
-
1679
  $tabs_fields .= '<input class="saswp-post-specific-schema-ids" type="hidden" value="'. json_encode($schema_ids).'">';
1680
  $tabs_fields .= '</div>';
1681
  echo $tabs_fields;
@@ -2095,7 +1153,7 @@ class saswp_post_specific {
2095
  || strpos($meta_field['id'], 'validthrough') !== false
2096
  || strpos($meta_field['id'], 'date_of_birth') !== false
2097
  ) {
2098
- $class='saswp-local-schema-datepicker-picker';
2099
  }
2100
 
2101
  $input = sprintf(
@@ -2201,137 +1259,24 @@ class saswp_post_specific {
2201
  if($schema_count > 0){
2202
 
2203
  foreach($this->all_schema as $schema){
2204
-
2205
- //How to schema starts here
2206
- $howto_tool = array();
2207
- $howto_step = array();
2208
- $howto_supply = array();
2209
-
2210
- if( isset($_POST['howto_step_'.$schema->ID]) && is_array($_POST['howto_step_'.$schema->ID])){
2211
-
2212
- $data = $_POST['howto_step_'.$schema->ID];
2213
-
2214
- foreach ($data as $step){
2215
-
2216
- $howto_step[] = array_map( 'sanitize_text_field', $step );
2217
- }
2218
- }
2219
-
2220
- if(isset($_POST['howto_tool_'.$schema->ID]) && is_array($_POST['howto_tool_'.$schema->ID])){
2221
-
2222
- $data = $_POST['howto_tool_'.$schema->ID];
2223
-
2224
- foreach ($data as $tool){
2225
-
2226
- $howto_tool[] = array_map( 'sanitize_text_field', $tool );
2227
- }
2228
-
2229
- }
2230
- if(isset($_POST['howto_supply_'.$schema->ID]) && is_array($_POST['howto_supply_'.$schema->ID])){
2231
-
2232
- $data = $_POST['howto_supply_'.$schema->ID];
2233
-
2234
- foreach ($data as $supply){
2235
-
2236
- $howto_supply[] = array_map( 'sanitize_text_field', $supply );
2237
- }
2238
- }
2239
-
2240
- update_post_meta( $post_id, 'howto_step_'.intval($schema->ID), $howto_step);
2241
- update_post_meta( $post_id, 'howto_tool_'.intval($schema->ID), $howto_tool);
2242
- update_post_meta( $post_id, 'howto_supply_'.intval($schema->ID), $howto_supply);
2243
-
2244
- //How to schema ends here
2245
-
2246
-
2247
- //MedicalCondition schema starts here
2248
- $mc_cause = array();
2249
- $mc_symptom = array();
2250
- $mc_r_factor = array();
2251
-
2252
- if(isset($_POST['mc_cause_'.$schema->ID]) && is_array($_POST['mc_cause_'.$schema->ID])){
2253
-
2254
- $data = $_POST['mc_cause_'.$schema->ID];
2255
-
2256
- foreach ($data as $supply){
2257
-
2258
- $mc_cause[] = array_map( 'sanitize_text_field', $supply );
2259
- }
2260
- }
2261
- if(isset($_POST['mc_symptom_'.$schema->ID]) && is_array($_POST['mc_symptom_'.$schema->ID])){
2262
-
2263
- $data = $_POST['mc_symptom_'.$schema->ID];
2264
-
2265
- foreach ($data as $supply){
2266
-
2267
- $mc_symptom[] = array_map( 'sanitize_text_field', $supply );
2268
- }
2269
- }
2270
- if(isset($_POST['mc_risk_factor_'.$schema->ID]) && is_array($_POST['mc_risk_factor_'.$schema->ID])){
2271
-
2272
- $data = $_POST['mc_risk_factor_'.$schema->ID];
2273
-
2274
- foreach ($data as $supply){
2275
-
2276
- $mc_r_factor[] = array_map( 'sanitize_text_field', $supply );
2277
- }
2278
- }
2279
-
2280
- update_post_meta( $post_id, 'mc_cause_'.intval($schema->ID), $mc_cause);
2281
- update_post_meta( $post_id, 'mc_symptom_'.intval($schema->ID), $mc_symptom);
2282
- update_post_meta( $post_id, 'mc_risk_factor_'.intval($schema->ID), $mc_r_factor);
2283
-
2284
- //MedicalCondition schema ends here
2285
-
2286
-
2287
- //TVSeries schema starts here
2288
- $tv_actor = array();
2289
- $tv_season = array();
2290
-
2291
- if(isset($_POST['tvseries_actor_'.$schema->ID]) && is_array($_POST['tvseries_actor_'.$schema->ID])){
2292
-
2293
- $data = $_POST['tvseries_actor_'.$schema->ID];
2294
-
2295
- foreach ($data as $supply){
2296
-
2297
- $tv_actor[] = array_map( 'sanitize_text_field', $supply );
2298
- }
2299
- }
2300
- if(isset($_POST['tvseries_season_'.$schema->ID]) && is_array($_POST['tvseries_season_'.$schema->ID])){
2301
-
2302
- $data = $_POST['tvseries_season_'.$schema->ID];
2303
-
2304
- foreach ($data as $supply){
2305
-
2306
- $tv_season[] = array_map( 'sanitize_text_field', $supply );
2307
- }
2308
- }
2309
-
2310
-
2311
- update_post_meta( $post_id, 'tvseries_actor_'.intval($schema->ID), $tv_actor);
2312
- update_post_meta( $post_id, 'tvseries_season_'.intval($schema->ID), $tv_season);
2313
-
2314
- //TVSeries schema ends here
2315
-
2316
-
2317
- //Trip schema starts here
2318
-
2319
- $trip_itinerary = array();
2320
-
2321
- if(isset($_POST['trip_itinerary_'.$schema->ID]) && is_array($_POST['trip_itinerary_'.$schema->ID])){
2322
-
2323
- $data = $_POST['trip_itinerary_'.$schema->ID];
2324
 
2325
- foreach ($data as $supply){
2326
-
2327
- $trip_itinerary[] = array_map( 'sanitize_text_field', $supply );
2328
- }
 
 
 
 
 
 
 
 
 
2329
 
2330
- }
2331
-
2332
- update_post_meta( $post_id, 'trip_itinerary_'.$schema->ID, $trip_itinerary);
2333
-
2334
- //Trip schema ends here
2335
 
2336
  $response = $this->saswp_get_fields_by_schema_type($schema->ID);
2337
 
@@ -2410,6 +1355,7 @@ class saswp_post_specific {
2410
  switch ($business_type) {
2411
  case 'automotivebusiness':
2412
  $sub_business_options = array(
 
2413
  'autobodyshop' => 'Auto Body Shop',
2414
  'autodealer' => 'Auto Dealer',
2415
  'autopartsstore' => 'Auto Parts Store',
@@ -2423,6 +1369,7 @@ class saswp_post_specific {
2423
  break;
2424
  case 'emergencyservice':
2425
  $sub_business_options = array(
 
2426
  'firestation' => 'Fire Station',
2427
  'hospital' => 'Hospital',
2428
  'policestation' => 'Police Station',
@@ -2430,6 +1377,7 @@ class saswp_post_specific {
2430
  break;
2431
  case 'entertainmentbusiness':
2432
  $sub_business_options = array(
 
2433
  'adultentertainment' => 'Adult Entertainment',
2434
  'amusementpark' => 'Amusement Park',
2435
  'artgallery' => 'Art Gallery',
@@ -2442,6 +1390,7 @@ class saswp_post_specific {
2442
  break;
2443
  case 'financialservice':
2444
  $sub_business_options = array(
 
2445
  'accountingservice' => 'Accounting Service',
2446
  'automatedteller' => 'Automated Teller',
2447
  'bankorcredit_union' => 'Bank Or Credit Union',
@@ -2451,6 +1400,7 @@ class saswp_post_specific {
2451
  break;
2452
  case 'foodestablishment':
2453
  $sub_business_options = array(
 
2454
  'bakery' => 'Bakery',
2455
  'barorpub' => 'Bar Or Pub',
2456
  'brewery' => 'Brewery',
@@ -2464,6 +1414,7 @@ class saswp_post_specific {
2464
  break;
2465
  case 'healthandbeautybusiness':
2466
  $sub_business_options = array(
 
2467
  'beautysalon' => 'Beauty Salon',
2468
  'dayspa' => 'DaySpa',
2469
  'hairsalon' => 'Hair Salon',
@@ -2474,7 +1425,8 @@ class saswp_post_specific {
2474
  break;
2475
  case 'homeandconstructionbusiness':
2476
  $sub_business_options = array(
2477
- 'electrician' => 'Electrician',
 
2478
  'generalcontractor' => 'General Contractor',
2479
  'hvacbusiness' => 'HVAC Business',
2480
  'locksmith' => 'Locksmith',
@@ -2486,12 +1438,14 @@ class saswp_post_specific {
2486
  break;
2487
  case 'legalservice':
2488
  $sub_business_options = array(
 
2489
  'attorney' => 'Attorney',
2490
  'notary' => 'Notary',
2491
  );
2492
  break;
2493
  case 'lodgingbusiness':
2494
  $sub_business_options = array(
 
2495
  'bedandbreakfast' => 'Bed And Breakfast',
2496
  'campground' => 'Campground',
2497
  'hostel' => 'Hostel',
@@ -2502,6 +1456,7 @@ class saswp_post_specific {
2502
  break;
2503
  case 'sportsactivitylocation':
2504
  $sub_business_options = array(
 
2505
  'bowlingalley' => 'Bowling Alley',
2506
  'exercisegym' => 'Exercise Gym',
2507
  'golfcourse' => 'Golf Course',
@@ -2515,6 +1470,7 @@ class saswp_post_specific {
2515
  break;
2516
  case 'store':
2517
  $sub_business_options = array(
 
2518
  'autopartsstore' => 'Auto Parts Store',
2519
  'bikestore' => 'Bike Store',
2520
  'bookstore' => 'Book Store',
@@ -2666,6 +1622,7 @@ class saswp_post_specific {
2666
  'type' => 'select',
2667
  'default' => $business_type,
2668
  'options' => array(
 
2669
  'animalshelter' => 'Animal Shelter',
2670
  'automotivebusiness' => 'Automotive Business',
2671
  'childcare' => 'ChildCare',
@@ -2890,6 +1847,12 @@ class saswp_post_specific {
2890
  'type' => 'textarea',
2891
  'default' => get_the_excerpt()
2892
  ),
 
 
 
 
 
 
2893
  array(
2894
  'label' => 'Name',
2895
  'id' => 'saswp_blogposting_name_'.$schema_id,
@@ -3016,6 +1979,12 @@ class saswp_post_specific {
3016
  'type' => 'textarea',
3017
  'default' => get_the_excerpt()
3018
  ),
 
 
 
 
 
 
3019
  array(
3020
  'label' => 'Article Section',
3021
  'id' => 'saswp_newsarticle_section_'.$schema_id,
@@ -3131,6 +2100,12 @@ class saswp_post_specific {
3131
  'type' => 'textarea',
3132
  'default' => get_the_excerpt()
3133
  ),
 
 
 
 
 
 
3134
  array(
3135
  'label' => 'Main Entity Of Page',
3136
  'id' => 'saswp_webpage_main_entity_of_page_'.$schema_id,
@@ -3224,7 +2199,13 @@ class saswp_post_specific {
3224
  'id' => 'saswp_article_description_'.$schema_id,
3225
  'type' => 'textarea',
3226
  'default' => get_the_excerpt()
3227
- ) ,
 
 
 
 
 
 
3228
  array(
3229
  'label' => 'Date Published',
3230
  'id' => 'saswp_article_date_published_'.$schema_id,
@@ -3420,6 +2401,12 @@ class saswp_post_specific {
3420
  'type' => 'textarea',
3421
  'default' => get_the_excerpt()
3422
  ) ,
 
 
 
 
 
 
3423
  array(
3424
  'label' => 'Date Published',
3425
  'id' => 'saswp_tech_article_date_published_'.$schema_id,
@@ -5479,6 +4466,12 @@ class saswp_post_specific {
5479
  );
5480
  break;
5481
 
 
 
 
 
 
 
5482
  case 'Person':
5483
 
5484
  $meta_field = array(
19
  protected $options_response = array();
20
  protected $modify_schema_post_enable = false;
21
 
22
+ private $schema_type_element = array(
23
+ 'FAQ' => array(
24
+ 'faq-question' => 'faq_question',
25
+ ),
26
+ 'HowTo' => array(
27
+ 'how-to-supply' => 'howto_supply',
28
+ 'how-to-tool' => 'howto_tool',
29
+ 'how-to-step' => 'howto_step',
30
+ ),
31
+ 'MedicalCondition' => array(
32
+ 'mc-cause' => 'mc_cause',
33
+ 'mc-symptom' => 'mc_symptom',
34
+ 'mc-risk_factor' => 'mc_risk_factor',
35
+
36
+ ),
37
+ 'TVSeries' => array(
38
+ 'tvseries-actor' => 'tvseries_actor',
39
+ 'tvseries-season' => 'tvseries_season',
40
+ ),
41
+ 'Trip' => array(
42
+ 'trip-itinerary' => 'trip_itinerary'
43
+ )
44
+ );
45
+
46
  /**
47
  * List of hooks used in this context
48
  */
54
  add_action( 'save_post', array( $this, 'saswp_post_specific_save_fields' ) );
55
  add_action( 'wp_ajax_saswp_get_sub_business_ajax', array($this,'saswp_get_sub_business_ajax'));
56
 
57
+ add_action( 'wp_ajax_saswp_get_schema_dynamic_fields_ajax', array($this,'saswp_get_schema_dynamic_fields_ajax'));
58
+
59
  add_action( 'wp_ajax_saswp_modify_schema_post_enable', array($this,'saswp_modify_schema_post_enable'));
60
 
61
  add_action( 'wp_ajax_saswp_restore_schema', array($this,'saswp_restore_schema'));
151
  $post_title = '';
152
  if($schema_count == 1 && $custom_option !='enable'){
153
  $all_schemas = $this->all_schema;
154
+ $post_title = '('.get_post_meta($all_schemas[0]->ID, 'schema_type', true).')';
155
+ if($post_title == '(local_business)'){
156
+ $post_title = '(LocalBusiness)';
157
+ }
158
  }
159
 
160
  add_meta_box(
172
  }
173
  }
174
 
175
+ public function saswp_get_schema_dynamic_fields_ajax(){
176
+
177
+ if ( ! isset( $_GET['saswp_security_nonce'] ) ){
178
+ return;
179
+ }
180
+ if ( !wp_verify_nonce( $_GET['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
181
+ return;
182
+ }
183
+ $meta_name = '';
184
+ $meta_array = array();
185
+ if(isset($_GET['meta_name'])){
186
+ $meta_name = sanitize_text_field($_GET['meta_name']);
187
+ $meta_array = $this->saswp_get_schema_dynamic_fields($meta_name);
188
+ }
189
+ if(!empty($meta_array)){
190
+ echo json_encode($meta_array);
191
+ }
192
+ wp_die();
193
+ }
194
+
195
+ public function saswp_get_schema_dynamic_fields($meta_name){
196
+
197
+ $meta_fields = array();
198
  switch ($meta_name) {
199
 
200
  case 'howto_supply':
387
 
388
  break;
389
 
390
+ case 'faq_question':
391
+
392
+ $meta_fields = array(
393
+
394
+ array(
395
+ 'label' => 'Question',
396
+ 'name' => 'saswp_faq_question_name',
397
+ 'type' => 'text'
398
+ ),
399
+ array(
400
+ 'label' => 'Accepted Answer',
401
+ 'name' => 'saswp_faq_question_answer',
402
+ 'type' => 'textarea'
403
+ )
404
+ );
405
+
406
+ break;
407
+
408
 
409
  default:
410
  break;
411
  }
412
+
413
+ return $meta_fields;
414
+ }
415
+
416
+ public function saswp_get_dynamic_html($schema_id, $meta_name, $index, $data){
417
+
418
+ $meta_fields = $this->saswp_get_schema_dynamic_fields($meta_name);
419
 
420
  $output = '';
421
  foreach ( $meta_fields as $meta_field ) {
492
 
493
  if (strpos($meta_field['name'].'_'.$index.'_'.$schema_id, 'published_date') !== false){
494
 
495
+ $class = 'class="saswp-datepicker-picker"';
496
  }
497
 
498
  $input = sprintf(
516
 
517
  }
518
 
519
+ public function saswp_schema_fields_html_on_the_fly($schema_type, $schema_id, $post_id){
520
+
521
+ $howto_data = array();
522
+ $tabs_fields = '';
523
+
524
+ $schema_type_fields = $this->schema_type_element;
525
+
526
+ $type_fields = array_key_exists($schema_type, $schema_type_fields) ? $schema_type_fields[$schema_type]:'';
527
+
528
+ if($type_fields){
529
+
530
+ $tabs_fields .= '<div class="saswp-table-create-onajax">';
531
+
532
+ foreach($type_fields as $key => $value){
533
+
534
+ $howto_data[$value.'_'.$schema_id] = esc_sql ( get_post_meta($post_id, $value.'_'.$schema_id, true) );
535
+
536
+ $tabs_fields .= '<div class="saswp-'.$key.'-section-main">';
537
+ $tabs_fields .= '<div class="saswp-'.$key.'-section" data-id="'.esc_attr($schema_id).'">';
538
+ if(isset($howto_data[$value.'_'.$schema_id])){
539
+
540
+ $howto_supply = $howto_data[$value.'_'.$schema_id];
541
+ $supply_html = '';
542
+
543
+ if(!empty($howto_supply)){
544
+
545
+ $i = 0;
546
+ foreach ($howto_supply as $supply){
547
+
548
+ $supply_html .= '<div class="saswp-'.$key.'-table-div" data-id="'.$i.'">';
549
+ $supply_html .= '<a class="saswp-table-close">X</a>';
550
+ $supply_html .= $this->saswp_get_dynamic_html($schema_id, $value, $i, $supply);
551
+ $supply_html .= '</div>';
552
+
553
+ $i++;
554
+ }
555
+
556
+ }
557
+
558
+ $tabs_fields .= $supply_html;
559
+
560
+ }
561
+ $tabs_fields .= '</div>';
562
+ $tabs_fields .= '<a data-id="'.esc_attr($schema_id).'" div_type="'.$key.'" fields_type="'.$value.'" class="button saswp_add_schema_fields_on_fly saswp-'.$key.'">'.esc_html__( 'Add '.$value, 'schema-and-structured-data-for-wp' ).'</a>';
563
+ $tabs_fields .= '</div>';
564
+
565
+ }
566
+
567
+ $tabs_fields .= '</div>';
568
+
569
+ }
570
+
571
+ return $tabs_fields;
572
+
573
+ }
574
  public function saswp_post_meta_box_fields($post){
575
 
576
  $tabs = '';
577
  $tabs_fields = '';
578
  $schema_ids = array();
579
+
 
 
 
 
 
580
  $schema_enable = get_post_meta($post->ID, 'saswp_enable_disable_schema', true);
581
 
582
  if(count($this->all_schema)>1){
594
  $this->meta_fields = $response;
595
 
596
  $output = $this->saswp_saswp_post_specific( $post, $schema->ID );
597
+ $schema_type = esc_sql ( get_post_meta($schema->ID, 'schema_type', true) );
598
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
599
  if($key==0){
600
 
601
  $tabs .='<li class="selected"><a saswp-schema-type="'.esc_attr($schema_type).'" data-id="saswp_specific_'.esc_attr($schema->ID).'" class="saswp-tab-links selected">'.esc_attr($schema->post_title).'</a>'
609
  //varible $output has been escapped while creating it
610
  $tabs_fields .= '<table class="form-table"><tbody>' . $output . '</tbody></table>';
611
  $tabs_fields .= '</div>';
612
+
613
+ $tabs_fields .= $this->saswp_schema_fields_html_on_the_fly($schema_type, $schema->ID, $post->ID);
614
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
615
  $tabs_fields .= '</div>';
616
 
617
  }else{
627
  $tabs_fields .= '<table class="form-table"><tbody>' . $output . '</tbody></table>';
628
  $tabs_fields .= '</div>';
629
 
630
+ $tabs_fields .= $this->saswp_schema_fields_html_on_the_fly($schema_type, $schema->ID, $post->ID);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
631
 
632
  $tabs_fields .= '</div>';
633
 
690
  if(isset($schema_enable[$all_schema[0]->ID]) && $schema_enable[$all_schema[0]->ID] == 1){
691
  $checked = 'checked';
692
  }
693
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
694
  $this->meta_fields = $response;
695
  $output = $this->saswp_saswp_post_specific( $post, $all_schema[0]->ID );
696
  $tabs_fields .= '<div>';
703
  $tabs_fields .= '<div class="saswp-table-create-onload">';
704
  $tabs_fields .= '<table class="form-table"><tbody>' . $output . '</tbody></table>';
705
  $tabs_fields .= '</div>';
706
+
707
+ $tabs_fields .= $this->saswp_schema_fields_html_on_the_fly($schema_type, $all_schema[0]->ID, $post->ID);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
708
 
709
  $tabs_fields .= '</div>';
710
 
733
  $tabs_fields.= '</div>';
734
 
735
  //custom schema ends here
736
+
 
737
  $tabs_fields .= '<input class="saswp-post-specific-schema-ids" type="hidden" value="'. json_encode($schema_ids).'">';
738
  $tabs_fields .= '</div>';
739
  echo $tabs_fields;
1153
  || strpos($meta_field['id'], 'validthrough') !== false
1154
  || strpos($meta_field['id'], 'date_of_birth') !== false
1155
  ) {
1156
+ $class='saswp-datepicker-picker';
1157
  }
1158
 
1159
  $input = sprintf(
1259
  if($schema_count > 0){
1260
 
1261
  foreach($this->all_schema as $schema){
1262
+
1263
+ foreach ($this->schema_type_element as $element){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1264
 
1265
+ foreach($element as $key => $val){
1266
+
1267
+ $element_val = array();
1268
+ $data = (array) $_POST[$val.'_'.$schema->ID];
1269
+
1270
+ foreach ($data as $supply){
1271
+
1272
+ $element_val[] = array_map( 'sanitize_text_field', $supply );
1273
+
1274
+ }
1275
+ update_post_meta( $post_id, $val.'_'.intval($schema->ID), $element_val);
1276
+
1277
+ }
1278
 
1279
+ }
 
 
 
 
1280
 
1281
  $response = $this->saswp_get_fields_by_schema_type($schema->ID);
1282
 
1355
  switch ($business_type) {
1356
  case 'automotivebusiness':
1357
  $sub_business_options = array(
1358
+ '' => 'Select Sub Business Type ( optional )',
1359
  'autobodyshop' => 'Auto Body Shop',
1360
  'autodealer' => 'Auto Dealer',
1361
  'autopartsstore' => 'Auto Parts Store',
1369
  break;
1370
  case 'emergencyservice':
1371
  $sub_business_options = array(
1372
+ '' => 'Select Sub Business Type ( optional )',
1373
  'firestation' => 'Fire Station',
1374
  'hospital' => 'Hospital',
1375
  'policestation' => 'Police Station',
1377
  break;
1378
  case 'entertainmentbusiness':
1379
  $sub_business_options = array(
1380
+ '' => 'Select Sub Business Type ( optional )',
1381
  'adultentertainment' => 'Adult Entertainment',
1382
  'amusementpark' => 'Amusement Park',
1383
  'artgallery' => 'Art Gallery',
1390
  break;
1391
  case 'financialservice':
1392
  $sub_business_options = array(
1393
+ '' => 'Select Sub Business Type ( optional )',
1394
  'accountingservice' => 'Accounting Service',
1395
  'automatedteller' => 'Automated Teller',
1396
  'bankorcredit_union' => 'Bank Or Credit Union',
1400
  break;
1401
  case 'foodestablishment':
1402
  $sub_business_options = array(
1403
+ '' => 'Select Sub Business Type ( optional )',
1404
  'bakery' => 'Bakery',
1405
  'barorpub' => 'Bar Or Pub',
1406
  'brewery' => 'Brewery',
1414
  break;
1415
  case 'healthandbeautybusiness':
1416
  $sub_business_options = array(
1417
+ '' => 'Select Sub Business Type ( optional )',
1418
  'beautysalon' => 'Beauty Salon',
1419
  'dayspa' => 'DaySpa',
1420
  'hairsalon' => 'Hair Salon',
1425
  break;
1426
  case 'homeandconstructionbusiness':
1427
  $sub_business_options = array(
1428
+ '' => 'Select Sub Business Type ( optional )',
1429
+ 'electrician' => 'Electrician',
1430
  'generalcontractor' => 'General Contractor',
1431
  'hvacbusiness' => 'HVAC Business',
1432
  'locksmith' => 'Locksmith',
1438
  break;
1439
  case 'legalservice':
1440
  $sub_business_options = array(
1441
+ '' => 'Select Sub Business Type ( optional )',
1442
  'attorney' => 'Attorney',
1443
  'notary' => 'Notary',
1444
  );
1445
  break;
1446
  case 'lodgingbusiness':
1447
  $sub_business_options = array(
1448
+ '' => 'Select Sub Business Type ( optional )',
1449
  'bedandbreakfast' => 'Bed And Breakfast',
1450
  'campground' => 'Campground',
1451
  'hostel' => 'Hostel',
1456
  break;
1457
  case 'sportsactivitylocation':
1458
  $sub_business_options = array(
1459
+ '' => 'Select Sub Business Type ( optional )',
1460
  'bowlingalley' => 'Bowling Alley',
1461
  'exercisegym' => 'Exercise Gym',
1462
  'golfcourse' => 'Golf Course',
1470
  break;
1471
  case 'store':
1472
  $sub_business_options = array(
1473
+ '' => 'Select Sub Business Type ( optional )',
1474
  'autopartsstore' => 'Auto Parts Store',
1475
  'bikestore' => 'Bike Store',
1476
  'bookstore' => 'Book Store',
1622
  'type' => 'select',
1623
  'default' => $business_type,
1624
  'options' => array(
1625
+ '' => 'Select Business Type (Optional)',
1626
  'animalshelter' => 'Animal Shelter',
1627
  'automotivebusiness' => 'Automotive Business',
1628
  'childcare' => 'ChildCare',
1847
  'type' => 'textarea',
1848
  'default' => get_the_excerpt()
1849
  ),
1850
+ array(
1851
+ 'label' => 'Keywords',
1852
+ 'id' => 'saswp_blogposting_keywords_'.$schema_id,
1853
+ 'type' => 'text',
1854
+ 'default' => saswp_get_the_tags()
1855
+ ),
1856
  array(
1857
  'label' => 'Name',
1858
  'id' => 'saswp_blogposting_name_'.$schema_id,
1979
  'type' => 'textarea',
1980
  'default' => get_the_excerpt()
1981
  ),
1982
+ array(
1983
+ 'label' => 'Keywords',
1984
+ 'id' => 'saswp_newsarticle_keywords_'.$schema_id,
1985
+ 'type' => 'text',
1986
+ 'default' => saswp_get_the_tags()
1987
+ ),
1988
  array(
1989
  'label' => 'Article Section',
1990
  'id' => 'saswp_newsarticle_section_'.$schema_id,
2100
  'type' => 'textarea',
2101
  'default' => get_the_excerpt()
2102
  ),
2103
+ array(
2104
+ 'label' => 'Keywords',
2105
+ 'id' => 'saswp_webpage_keywords_'.$schema_id,
2106
+ 'type' => 'text',
2107
+ 'default' => saswp_get_the_tags()
2108
+ ),
2109
  array(
2110
  'label' => 'Main Entity Of Page',
2111
  'id' => 'saswp_webpage_main_entity_of_page_'.$schema_id,
2199
  'id' => 'saswp_article_description_'.$schema_id,
2200
  'type' => 'textarea',
2201
  'default' => get_the_excerpt()
2202
+ ),
2203
+ array(
2204
+ 'label' => 'Keywords',
2205
+ 'id' => 'saswp_article_keywords_'.$schema_id,
2206
+ 'type' => 'text',
2207
+ 'default' => saswp_get_the_tags()
2208
+ ),
2209
  array(
2210
  'label' => 'Date Published',
2211
  'id' => 'saswp_article_date_published_'.$schema_id,
2401
  'type' => 'textarea',
2402
  'default' => get_the_excerpt()
2403
  ) ,
2404
+ array(
2405
+ 'label' => 'Keywords',
2406
+ 'id' => 'saswp_tech_article_keywords_'.$schema_id,
2407
+ 'type' => 'text',
2408
+ 'default' => saswp_get_the_tags()
2409
+ ),
2410
  array(
2411
  'label' => 'Date Published',
2412
  'id' => 'saswp_tech_article_date_published_'.$schema_id,
4466
  );
4467
  break;
4468
 
4469
+ case 'FAQ':
4470
+
4471
+ $meta_field = array();
4472
+
4473
+ break;
4474
+
4475
  case 'Person':
4476
 
4477
  $meta_field = array(
view/schema_type.php CHANGED
@@ -716,6 +716,7 @@ function saswp_schema_type_meta_box_callback( $post) {
716
  'Blogposting' => 'Blogposting',
717
  'Course' => 'Course',
718
  'DiscussionForumPosting' => 'DiscussionForumPosting',
 
719
  'HowTo' => 'HowTo',
720
  'NewsArticle' => 'NewsArticle',
721
  'qanda' => 'Q&A',
@@ -766,6 +767,7 @@ function saswp_schema_type_meta_box_callback( $post) {
766
  )
767
  );
768
  $all_business_type = array(
 
769
  'animalshelter' => 'Animal Shelter',
770
  'automotivebusiness' => 'Automotive Business',
771
  'childcare' => 'ChildCare',
@@ -797,6 +799,7 @@ function saswp_schema_type_meta_box_callback( $post) {
797
  );
798
 
799
  $all_automotive_array = array(
 
800
  'autobodyshop' => 'Auto Body Shop',
801
  'autodealer' => 'Auto Dealer',
802
  'autopartsstore' => 'Auto Parts Store',
@@ -809,11 +812,13 @@ function saswp_schema_type_meta_box_callback( $post) {
809
  );
810
 
811
  $all_emergency_array = array(
 
812
  'firestation' => 'Fire Station',
813
  'hospital' => 'Hospital',
814
  'policestation' => 'Police Station',
815
  );
816
  $all_entertainment_array = array(
 
817
  'adultentertainment' => 'Adult Entertainment',
818
  'amusementpark' => 'Amusement Park',
819
  'artgallery' => 'Art Gallery',
@@ -824,6 +829,7 @@ function saswp_schema_type_meta_box_callback( $post) {
824
 
825
  );
826
  $all_financial_array = array(
 
827
  'accountingservice' => 'Accounting Service',
828
  'automatedteller' => 'Automated Teller',
829
  'bankorcredit_union' => 'Bank Or Credit Union',
@@ -832,6 +838,7 @@ function saswp_schema_type_meta_box_callback( $post) {
832
  );
833
 
834
  $all_food_establishment_array = array(
 
835
  'bakery' => 'Bakery',
836
  'barorpub' => 'Bar Or Pub',
837
  'brewery' => 'Brewery',
@@ -843,6 +850,7 @@ function saswp_schema_type_meta_box_callback( $post) {
843
 
844
  );
845
  $all_health_and_beauty_array = array(
 
846
  'beautysalon' => 'Beauty Salon',
847
  'dayspa' => 'DaySpa',
848
  'hairsalon' => 'Hair Salon',
@@ -852,6 +860,7 @@ function saswp_schema_type_meta_box_callback( $post) {
852
  );
853
 
854
  $all_home_and_construction_array = array(
 
855
  'electrician' => 'Electrician',
856
  'generalcontractor' => 'General Contractor',
857
  'hvacbusiness' => 'HVAC Business',
@@ -863,11 +872,13 @@ function saswp_schema_type_meta_box_callback( $post) {
863
  );
864
 
865
  $all_legal_service_array = array(
 
866
  'attorney' => 'Attorney',
867
  'notary' => 'Notary',
868
  );
869
 
870
  $all_lodging_array = array(
 
871
  'bedandbreakfast' => 'Bed And Breakfast',
872
  'campground' => 'Campground',
873
  'hostel' => 'Hostel',
@@ -877,6 +888,7 @@ function saswp_schema_type_meta_box_callback( $post) {
877
  );
878
 
879
  $all_sports_activity_location = array(
 
880
  'bowlingalley' => 'Bowling Alley',
881
  'exercisegym' => 'Exercise Gym',
882
  'golfcourse' => 'Golf Course',
@@ -888,6 +900,7 @@ function saswp_schema_type_meta_box_callback( $post) {
888
  'tenniscomplex' => 'Tennis Complex'
889
  );
890
  $all_store = array(
 
891
  'autopartsstore' => 'Auto Parts Store',
892
  'bikestore' => 'Bike Store',
893
  'bookstore' => 'Book Store',
@@ -1556,12 +1569,12 @@ function saswp_schema_type_meta_box_callback( $post) {
1556
 
1557
  <tr class="saswp-event-text-field-tr">
1558
  <td><?php echo esc_html__('Start Date', 'schema-and-structured-data-for-wp' ); ?></td>
1559
- <td><input class="saswp-local-schema-datepicker-picker" value="<?php if(isset($event_details['saswp_event_schema_start_date'])){echo esc_attr($event_details['saswp_event_schema_start_date']); } ?>" type="text" name="saswp_event_schema_start_date" placeholder="<?php echo esc_html__('2018-12-12', 'schema-and-structured-data-for-wp' ); ?>" ></td>
1560
  </tr>
1561
 
1562
  <tr class="saswp-event-text-field-tr">
1563
  <td><?php echo esc_html__('End Date', 'schema-and-structured-data-for-wp' ); ?></td>
1564
- <td><input class="saswp-local-schema-datepicker-picker" value="<?php if(isset($event_details['saswp_event_schema_end_date'])){echo esc_attr($event_details['saswp_event_schema_end_date']); } ?>" type="text" name="saswp_event_schema_end_date" placeholder="<?php echo esc_html__('2018-12-12', 'schema-and-structured-data-for-wp' ); ?>" ></td>
1565
  </tr>
1566
 
1567
  <tr class="saswp-event-text-field-tr">
@@ -1609,7 +1622,7 @@ function saswp_schema_type_meta_box_callback( $post) {
1609
 
1610
  <tr class="saswp-event-text-field-tr">
1611
  <td><?php echo esc_html__('Valid From', 'schema-and-structured-data-for-wp' ); ?></td>
1612
- <td><input class="saswp-local-schema-datepicker-picker" value="<?php if(isset($event_details['saswp_event_schema_validfrom'])){echo esc_attr($event_details['saswp_event_schema_validfrom']); } ?>" type="text" name="saswp_event_schema_validfrom"></td>
1613
  </tr>
1614
 
1615
  <tr class="saswp-event-text-field-tr">
716
  'Blogposting' => 'Blogposting',
717
  'Course' => 'Course',
718
  'DiscussionForumPosting' => 'DiscussionForumPosting',
719
+ 'FAQ' => 'FAQ',
720
  'HowTo' => 'HowTo',
721
  'NewsArticle' => 'NewsArticle',
722
  'qanda' => 'Q&A',
767
  )
768
  );
769
  $all_business_type = array(
770
+ '' => 'Select Business Type (Optional)',
771
  'animalshelter' => 'Animal Shelter',
772
  'automotivebusiness' => 'Automotive Business',
773
  'childcare' => 'ChildCare',
799
  );
800
 
801
  $all_automotive_array = array(
802
+ '' => 'Select Sub Business Type ( optional )',
803
  'autobodyshop' => 'Auto Body Shop',
804
  'autodealer' => 'Auto Dealer',
805
  'autopartsstore' => 'Auto Parts Store',
812
  );
813
 
814
  $all_emergency_array = array(
815
+ '' => 'Select Sub Business Type ( optional )',
816
  'firestation' => 'Fire Station',
817
  'hospital' => 'Hospital',
818
  'policestation' => 'Police Station',
819
  );
820
  $all_entertainment_array = array(
821
+ '' => 'Select Sub Business Type ( optional )',
822
  'adultentertainment' => 'Adult Entertainment',
823
  'amusementpark' => 'Amusement Park',
824
  'artgallery' => 'Art Gallery',
829
 
830
  );
831
  $all_financial_array = array(
832
+ '' => 'Select Sub Business Type ( optional )',
833
  'accountingservice' => 'Accounting Service',
834
  'automatedteller' => 'Automated Teller',
835
  'bankorcredit_union' => 'Bank Or Credit Union',
838
  );
839
 
840
  $all_food_establishment_array = array(
841
+ '' => 'Select Sub Business Type ( optional )',
842
  'bakery' => 'Bakery',
843
  'barorpub' => 'Bar Or Pub',
844
  'brewery' => 'Brewery',
850
 
851
  );
852
  $all_health_and_beauty_array = array(
853
+ '' => 'Select Sub Business Type ( optional )',
854
  'beautysalon' => 'Beauty Salon',
855
  'dayspa' => 'DaySpa',
856
  'hairsalon' => 'Hair Salon',
860
  );
861
 
862
  $all_home_and_construction_array = array(
863
+ '' => 'Select Sub Business Type ( optional )',
864
  'electrician' => 'Electrician',
865
  'generalcontractor' => 'General Contractor',
866
  'hvacbusiness' => 'HVAC Business',
872
  );
873
 
874
  $all_legal_service_array = array(
875
+ '' => 'Select Sub Business Type ( optional )',
876
  'attorney' => 'Attorney',
877
  'notary' => 'Notary',
878
  );
879
 
880
  $all_lodging_array = array(
881
+ '' => 'Select Sub Business Type ( optional )',
882
  'bedandbreakfast' => 'Bed And Breakfast',
883
  'campground' => 'Campground',
884
  'hostel' => 'Hostel',
888
  );
889
 
890
  $all_sports_activity_location = array(
891
+ '' => 'Select Sub Business Type ( optional )',
892
  'bowlingalley' => 'Bowling Alley',
893
  'exercisegym' => 'Exercise Gym',
894
  'golfcourse' => 'Golf Course',
900
  'tenniscomplex' => 'Tennis Complex'
901
  );
902
  $all_store = array(
903
+ '' => 'Select Sub Business Type ( optional )',
904
  'autopartsstore' => 'Auto Parts Store',
905
  'bikestore' => 'Bike Store',
906
  'bookstore' => 'Book Store',
1569
 
1570
  <tr class="saswp-event-text-field-tr">
1571
  <td><?php echo esc_html__('Start Date', 'schema-and-structured-data-for-wp' ); ?></td>
1572
+ <td><input class="saswp-datepicker-picker" value="<?php if(isset($event_details['saswp_event_schema_start_date'])){echo esc_attr($event_details['saswp_event_schema_start_date']); } ?>" type="text" name="saswp_event_schema_start_date" placeholder="<?php echo esc_html__('2018-12-12', 'schema-and-structured-data-for-wp' ); ?>" ></td>
1573
  </tr>
1574
 
1575
  <tr class="saswp-event-text-field-tr">
1576
  <td><?php echo esc_html__('End Date', 'schema-and-structured-data-for-wp' ); ?></td>
1577
+ <td><input class="saswp-datepicker-picker" value="<?php if(isset($event_details['saswp_event_schema_end_date'])){echo esc_attr($event_details['saswp_event_schema_end_date']); } ?>" type="text" name="saswp_event_schema_end_date" placeholder="<?php echo esc_html__('2018-12-12', 'schema-and-structured-data-for-wp' ); ?>" ></td>
1578
  </tr>
1579
 
1580
  <tr class="saswp-event-text-field-tr">
1622
 
1623
  <tr class="saswp-event-text-field-tr">
1624
  <td><?php echo esc_html__('Valid From', 'schema-and-structured-data-for-wp' ); ?></td>
1625
+ <td><input class="saswp-datepicker-picker" value="<?php if(isset($event_details['saswp_event_schema_validfrom'])){echo esc_attr($event_details['saswp_event_schema_validfrom']); } ?>" type="text" name="saswp_event_schema_validfrom"></td>
1626
  </tr>
1627
 
1628
  <tr class="saswp-event-text-field-tr">