Schema & Structured Data for WP & AMP - Version 1.9.69

Version Description

(24 March 2021) =

  • Added: Featured image in feed while using Summary option #1355
  • Fixed: Wrong output is coming for the "Cafe and Coffee Shop" schema type #1358
  • Fixed: The property type is not supported for an object of this type. #1359
  • Enhancement: Improve the "Photograph" schema type markup for the AMP Stories #1356
Download this release

Release Info

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

Code changes from version 1.9.68 to 1.9.69

admin_section/common-function.php CHANGED
@@ -338,8 +338,7 @@ if ( ! defined('ABSPATH') ) exit;
338
  $wpdb->query("UPDATE ".$wpdb->prefix."posts SET guid ='".esc_sql($guid)."' WHERE ID ='".esc_sql($post_id)."'");
339
 
340
  $schema_post_meta = get_post_meta($schema->ID);
341
- $schema_post_types = get_post_meta($schema->ID, $key='_schema_post_types', true );
342
- $schema_post_meta_box = get_post_meta($schema->ID, $key='_schema_post_meta_box', true );
343
 
344
  $data_group_array = array();
345
 
@@ -361,12 +360,9 @@ if ( ! defined('ABSPATH') ) exit;
361
 
362
  }
363
  }
364
- $schema_type ='';
365
- $schema_article_type ='';
366
 
367
- if(isset($schema_post_meta['_schema_type'])){
368
- $schema_type = $schema_post_meta['_schema_type'];
369
- }
370
  if(isset($schema_post_meta['_schema_article_type'])){
371
  $schema_article_type = $schema_post_meta['_schema_article_type'][0];
372
  }
@@ -387,8 +383,7 @@ if ( ! defined('ABSPATH') ) exit;
387
  //Importing settings starts here
388
 
389
  $schema_plugin_options = get_option('schema_wp_settings');
390
- $custom_logo_id = get_theme_mod( 'custom_logo' );
391
- $logo = wp_get_attachment_image_src( $custom_logo_id , 'full' );
392
 
393
  $saswp_plugin_options = array(
394
  'sd_logo' => array(
@@ -1269,8 +1264,7 @@ if ( ! defined('ABSPATH') ) exit;
1269
  $result = $post_id;
1270
  $guid = get_option('siteurl') .'/?post_type=saswp&p='.$post_id;
1271
  $wpdb->get_results("UPDATE ".$wpdb->prefix."posts SET guid ='".esc_sql($guid)."' WHERE ID ='".esc_sql($post_id)."'");
1272
-
1273
- $schema_post_meta = get_post_meta($schema->ID);
1274
  $schema_post_types = get_post_meta($schema->ID, $key='bsf-aiosrs-schema-type', true );
1275
  $schema_post_meta_box = get_post_meta($schema->ID, $key='bsf-aiosrs-'.$schema_post_types, true );
1276
  $schema_enable_location = get_post_meta($schema->ID, $key='bsf-aiosrs-schema-location', true );
@@ -1466,12 +1460,7 @@ if ( ! defined('ABSPATH') ) exit;
1466
 
1467
  }
1468
  }
1469
- $schema_type = '';
1470
- $local_name = '';
1471
- $local_image = '';
1472
- $local_phone = '';
1473
- $local_url = '';
1474
- $local_url = '';
1475
 
1476
  if(isset($schema_post_types)){
1477
 
@@ -1534,8 +1523,7 @@ if ( ! defined('ABSPATH') ) exit;
1534
 
1535
  $schema_pro_general_settings = get_option('wp-schema-pro-general-settings');
1536
  $schema_pro_social_profile = get_option('wp-schema-pro-social-profiles');
1537
- $schema_pro_global_schemas = get_option('wp-schema-pro-global-schemas');
1538
- $schema_pro_settings = get_option('aiosrs-pro-settings');
1539
  $logo = wp_get_attachment_image_src( $schema_pro_general_settings['site-logo-custom'] , 'full' );
1540
 
1541
  $saswp_plugin_options = array(
@@ -4103,4 +4091,15 @@ function saswp_get_elementor_widget_data($element_data, $widget_type){
4103
 
4104
  }
4105
  }
 
 
 
 
 
 
 
 
 
 
 
4106
  }
338
  $wpdb->query("UPDATE ".$wpdb->prefix."posts SET guid ='".esc_sql($guid)."' WHERE ID ='".esc_sql($post_id)."'");
339
 
340
  $schema_post_meta = get_post_meta($schema->ID);
341
+ $schema_post_types = get_post_meta($schema->ID, $key='_schema_post_types', true );
 
342
 
343
  $data_group_array = array();
344
 
360
 
361
  }
362
  }
 
 
363
 
364
+ $schema_article_type ='';
365
+
 
366
  if(isset($schema_post_meta['_schema_article_type'])){
367
  $schema_article_type = $schema_post_meta['_schema_article_type'][0];
368
  }
383
  //Importing settings starts here
384
 
385
  $schema_plugin_options = get_option('schema_wp_settings');
386
+ $custom_logo_id = get_theme_mod( 'custom_logo' );
 
387
 
388
  $saswp_plugin_options = array(
389
  'sd_logo' => array(
1264
  $result = $post_id;
1265
  $guid = get_option('siteurl') .'/?post_type=saswp&p='.$post_id;
1266
  $wpdb->get_results("UPDATE ".$wpdb->prefix."posts SET guid ='".esc_sql($guid)."' WHERE ID ='".esc_sql($post_id)."'");
1267
+
 
1268
  $schema_post_types = get_post_meta($schema->ID, $key='bsf-aiosrs-schema-type', true );
1269
  $schema_post_meta_box = get_post_meta($schema->ID, $key='bsf-aiosrs-'.$schema_post_types, true );
1270
  $schema_enable_location = get_post_meta($schema->ID, $key='bsf-aiosrs-schema-location', true );
1460
 
1461
  }
1462
  }
1463
+ $schema_type = '';
 
 
 
 
 
1464
 
1465
  if(isset($schema_post_types)){
1466
 
1523
 
1524
  $schema_pro_general_settings = get_option('wp-schema-pro-general-settings');
1525
  $schema_pro_social_profile = get_option('wp-schema-pro-social-profiles');
1526
+ $schema_pro_global_schemas = get_option('wp-schema-pro-global-schemas');
 
1527
  $logo = wp_get_attachment_image_src( $schema_pro_general_settings['site-logo-custom'] , 'full' );
1528
 
1529
  $saswp_plugin_options = array(
4091
 
4092
  }
4093
  }
4094
+ }
4095
+
4096
+ function saswp_isset($str){
4097
+
4098
+ $result = false;
4099
+
4100
+ if(isset($str) && $str !=''){
4101
+ $result = true;
4102
+ }
4103
+
4104
+ return $result;
4105
  }
admin_section/fields-generator.php CHANGED
@@ -15,6 +15,239 @@ if ( ! defined( 'ABSPATH' ) ) exit;
15
  Metabox to show ads type such as custom and adsense
16
  */
17
  class saswp_fields_generator {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
  public function saswp_tooltip_message($meta_field_id){
20
 
@@ -50,8 +283,7 @@ class saswp_fields_generator {
50
  $tooltip_message = $this->saswp_tooltip_message($meta_field['id']);
51
 
52
  $class = "";
53
- $note = "";
54
- $proversion = false;
55
  $hidden = array();
56
  $attribute = array();
57
 
@@ -81,12 +313,7 @@ class saswp_fields_generator {
81
 
82
  $class = $meta_field['class'];
83
 
84
- }
85
- if(array_key_exists('proversion', $meta_field)){
86
-
87
- $proversion = $meta_field['proversion'];
88
-
89
- }
90
  if(array_key_exists('note', $meta_field)){
91
 
92
  $note = $meta_field['note'];
@@ -273,251 +500,32 @@ class saswp_fields_generator {
273
 
274
  case 'saswp-reviews-module-section':
275
 
276
- $input = '<div class="saswp_rv_module_pro_notice">
277
- <h2>Get Your 5 Stars Reviews on Google SERPs</h2>
278
- <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>
279
- <div class="saswp_cmpny_lst">
280
- <span class="saswp_lst saswp_avlbl">Integrations Available</span>
281
- <ul>
282
- <li class="check-img"><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/google-1-img.png">
283
- <span class="saswp_cmpny">Google Reviews</span>
284
- </li>
285
- <li class="check-img"><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/shopper-approved-img.png">
286
- <span class="saswp_cmpny">Shopper Approved</span>
287
- </li>
288
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/agoda-img.png">
289
- <span class="saswp_cmpny">Agoda</span>
290
- </li>
291
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/airbnb-img.png">
292
- <span class="saswp_cmpny">Airbnb</span>
293
- </li>
294
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/alternativeto-img.png">
295
- <span>AlternativeTo</span>
296
- </li>
297
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/amazon-img.png">
298
- <span>Amazon</span>
299
- </li>
300
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/angies-list-img.png">
301
- <span>Angies List</span>
302
- </li>
303
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/aliexpress-img.png">
304
- <span>Ali Express</span>
305
- </li>
306
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/appstore-img.png">
307
- <span>App Store</span>
308
- </li>
309
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/avvo-img.png">
310
- <span>Avvo</span>
311
- </li>
312
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/bbb-img.png">
313
- <span>BBB</span>
314
- </li>
315
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/bestbuy-img.png">
316
- <span>Bestbuy</span>
317
- </li>
318
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/booking-com-img.png">
319
- <span>Booking.com</span>
320
- </li>
321
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/capterra-img.png">
322
- <span>Capterra</span>
323
- </li>
324
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/cars-com-img.png">
325
- <span>Cars.com</span>
326
- </li>
327
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/cargurus-img.png">
328
- <span>Cargurus</span>
329
- </li>
330
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/clutch-img.png">
331
- <span>Clutch</span>
332
- </li>
333
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/citysearch-img.png">
334
- <span>Citysearch</span>
335
- </li>
336
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/consumer-affairs-img.png">
337
- <span>Consumer Affairs</span>
338
- </li>
339
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/creditkarma-img.png">
340
- <span>CreditKarma</span>
341
- </li>
342
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/customerlobby-img.png">
343
- <span>CustomerLobby</span>
344
- </li>
345
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/dealerrater-img.png">
346
- <span>DealerRater</span>
347
- </li>
348
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/ebay-img.png">
349
- <span>Ebay</span>
350
- </li>
351
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/edmunds-img.png">
352
- <span>Edmunds</span>
353
- </li>
354
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/etsy-img.png">
355
- <span>Etsy</span>
356
- </li>
357
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/expedia-img.png">
358
- <span>Expedia</span>
359
- </li>
360
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/facebook-img.png">
361
- <span>Facebook</span>
362
- </li>
363
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/flipkart-img.png">
364
- <span>Flipkart</span>
365
- </li>
366
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/foursquare-img.png">
367
- <span>Foursquare</span>
368
- </li>
369
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/g2crowd-img.png">
370
- <span>G2Crowd</span>
371
- </li>
372
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/gearbest-img.png">
373
- <span>Gearbest</span>
374
- </li>
375
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/glassdoor-img.png">
376
- <span>Glassdoor</span>
377
- </li>
378
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/healthgrades-img.png">
379
- <span>Healthgrades</span>
380
- </li>
381
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/homeadvisor-img.png">
382
- <span>HomeAdvisor</span>
383
- </li>
384
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/homestars-img.png">
385
- <span>Homestars</span>
386
- </li>
387
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/houzz-img.png">
388
- <span>Houzz</span>
389
- </li>
390
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/hotels-com-img.png">
391
- <span>Hotels.com</span>
392
- </li>
393
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/hungerstation-img.png">
394
- <span>Hungerstation</span>
395
- </li>
396
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/imdb-img.png">
397
- <span>Imdb</span>
398
- </li>
399
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/indeed-img.png">
400
- <span>Indeed</span>
401
- </li>
402
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/insiderpages-img.png">
403
- <span>Insider Pages</span>
404
- </li>
405
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/jet-img.png">
406
- <span>Jet</span>
407
- </li>
408
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/lawyers-com-img.png">
409
- <span>Lawyers.com</span>
410
- </li>
411
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/lendingtree-img.png">
412
- <span>Lending Tree</span>
413
- </li>
414
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/martindale-img.png">
415
- <span>Martindale</span>
416
- </li>
417
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/newegg-img.png">
418
- <span>Newegg</span>
419
- </li>
420
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/openrice-img.png">
421
- <span>OpenRice</span>
422
- </li>
423
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/opentable-img.png">
424
- <span>Opentable</span>
425
- </li>
426
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/playstore-img.png">
427
- <span>Playstore</span>
428
- </li>
429
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/producthunt-img.png">
430
- <span>ProductHunt</span>
431
- </li>
432
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/ratemds-img.png">
433
- <span>RateMDs</span>
434
- </li>
435
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/reserveout-img.png">
436
- <span>Reserveout</span>
437
- </li>
438
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/rottentomatoes-img.png">
439
- <span>Rottentomatoes</span>
440
- </li>
441
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/siftery-img.png">
442
- <span>Siftery</span>
443
- </li>
444
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/sitejabber-img.png">
445
- <span>Sitejabber</span>
446
- </li>
447
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/softwareadvice-img.png">
448
- <span>SoftwareAdvice</span>
449
- </li>
450
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/steam-img.png">
451
- <span>Steam</span>
452
- </li>
453
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/talabat-img.png">
454
- <span>Talabat</span>
455
- </li>
456
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/theknot-img.png">
457
- <span>The Knot</span>
458
- </li>
459
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/thumbtack-img.png">
460
- <span>Thumbtack</span>
461
- </li>
462
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/tripadvisor-img.png">
463
- <span>TripAdvisor</span>
464
- </li>
465
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/trulia-img.png">
466
- <span>Trulia</span>
467
- </li>
468
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/trustedshops-img.png">
469
- <span>TrustedShops</span>
470
- </li>
471
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/trustpilot-img.png">
472
- <span>Trustpilot</span>
473
- </li>
474
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/trustradius-img.png">
475
- <span>TrustRadius</span>
476
- </li>
477
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/vitals-img.png">
478
- <span>Vitals</span>
479
- </li>
480
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/walmart-img.png">
481
- <span>Walmart</span>
482
- </li>
483
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/weddingwire-img.png">
484
- <span>WeddingWire</span>
485
- </li>
486
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/wish-img.png">
487
- <span>Wish </span>
488
- </li>
489
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/yelp-img.png">
490
- <span>Yelp</span>
491
- </li>
492
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/yellowpages-img.png">
493
- <span>Yellow Pages</span>
494
- </li>
495
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/zillow-img.png">
496
- <span>Zillow</span>
497
- </li>
498
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/zocdoc-img.png">
499
- <span>ZocDoc</span>
500
- </li>
501
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/zomato-img.png">
502
- <span>Zomato</span>
503
- </li>
504
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/judge-me-img.png">
505
- <span>Judge.me</span>
506
- </li>
507
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/shopify-app-store-img.png">
508
- <span>Shopify App Store</span>
509
- </li>
510
- <li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/goodreads-img.png">
511
- <span>Goodreads</span>
512
- </li>
513
- </ul>
514
  </div>
515
  <div class="saswp-rev-btn">
516
  <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>
517
  <a target="_blank" href="https://structured-data-for-wp.com/reviews-for-schema">Get The Reviews Addon Now</a>
518
  </div>
519
  </div>';
520
-
 
 
521
  break;
522
 
523
  case 'saswp-google-place-section':
@@ -617,7 +625,7 @@ class saswp_fields_generator {
617
 
618
 
619
  }
620
- $reviews = $pro_api = $toggle_button = '';
621
 
622
  $subfields = '';
623
 
15
  Metabox to show ads type such as custom and adsense
16
  */
17
  class saswp_fields_generator {
18
+
19
+ public $platforms = array(
20
+ array(
21
+ "image" => "/admin_section/images/reviews_platform_icon/google-1-img.png",
22
+ "name" => "Google Reviews"),
23
+ array(
24
+ "image" => "/admin_section/images/reviews_platform_icon/shopper-approved-img.png",
25
+ "name" => "Shopper Approved"),
26
+ array(
27
+ "image" => "/admin_section/images/reviews_platform_icon/agoda-img.png",
28
+ "name" => "Agoda"),
29
+ array(
30
+ "image" => "/admin_section/images/reviews_platform_icon/airbnb-img.png",
31
+ "name" => "Airbnb"),
32
+ array(
33
+ "image" => "/admin_section/images/reviews_platform_icon/alternativeto-img.png",
34
+ "name" => "AlternativeTo"),
35
+ array(
36
+ "image" => "/admin_section/images/reviews_platform_icon/amazon-img.png",
37
+ "name" => "Amazon"),
38
+ array(
39
+ "image" => "/admin_section/images/reviews_platform_icon/angies-list-img.png",
40
+ "name" => "Angies List"),
41
+ array(
42
+ "image" => "/admin_section/images/reviews_platform_icon/aliexpress-img.png",
43
+ "name" => "Ali Express"),
44
+ array(
45
+ "image" => "/admin_section/images/reviews_platform_icon/appstore-img.png",
46
+ "name" => "App Store"),
47
+ array(
48
+ "image" => "/admin_section/images/reviews_platform_icon/avvo-img.png",
49
+ "name" => "Avvo"),
50
+ array(
51
+ "image" => "/admin_section/images/reviews_platform_icon/bbb-img.png",
52
+ "name" => "BBB"),
53
+ array(
54
+ "image" => "/admin_section/images/reviews_platform_icon/bestbuy-img.png",
55
+ "name" => "Bestbuy"),
56
+ array(
57
+ "image" => "/admin_section/images/reviews_platform_icon/booking-com-img.png",
58
+ "name" => "Booking.com"),
59
+ array(
60
+ "image" => "/admin_section/images/reviews_platform_icon/capterra-img.png",
61
+ "name" => "Capterra"),
62
+ array(
63
+ "image" => "/admin_section/images/reviews_platform_icon/cars-com-img.png",
64
+ "name" => "Cars.com"),
65
+ array(
66
+ "image" => "/admin_section/images/reviews_platform_icon/cargurus-img.png",
67
+ "name" => "Cargurus"),
68
+ array(
69
+ "image" => "/admin_section/images/reviews_platform_icon/clutch-img.png",
70
+ "name" => "Clutch"),
71
+ array("image" => "/admin_section/images/reviews_platform_icon/citysearch-img.png",
72
+ "name" => "Citysearch"),
73
+ array(
74
+ "image" => "/admin_section/images/reviews_platform_icon/consumer-affairs-img.png",
75
+ "name" => "Consumer Affairs"),
76
+ array(
77
+ "image" => "/admin_section/images/reviews_platform_icon/creditkarma-img.png",
78
+ "name" => "CreditKarma"),
79
+ array(
80
+ "image" => "/admin_section/images/reviews_platform_icon/customerlobby-img.png",
81
+ "name" => "CustomerLobby"),
82
+ array(
83
+ "image" => "/admin_section/images/reviews_platform_icon/dealerrater-img.png",
84
+ "name" => "DealerRater"),
85
+ array(
86
+ "image" => "/admin_section/images/reviews_platform_icon/ebay-img.png",
87
+ "name" => "Ebay"),
88
+ array(
89
+ "image" => "/admin_section/images/reviews_platform_icon/edmunds-img.png",
90
+ "name" => "Edmunds"),
91
+ array(
92
+ "image" => "/admin_section/images/reviews_platform_icon/etsy-img.png",
93
+ "name" => "Etsy"),
94
+ array(
95
+ "image" => "/admin_section/images/reviews_platform_icon/expedia-img.png",
96
+ "name" => "Expedia"),
97
+ array(
98
+ "image" => "/admin_section/images/reviews_platform_icon/facebook-img.png",
99
+ "name" => "Facebook"),
100
+ array(
101
+ "image" => "/admin_section/images/reviews_platform_icon/flipkart-img.png",
102
+ "name" => "Flipkart"),
103
+ array(
104
+ "image" => "/admin_section/images/reviews_platform_icon/foursquare-img.png",
105
+ "name" => "Foursquare"),
106
+ array(
107
+ "image" => "/admin_section/images/reviews_platform_icon/g2crowd-img.png",
108
+ "name" => "G2Crowd"),
109
+ array(
110
+ "image" => "/admin_section/images/reviews_platform_icon/gearbest-img.png",
111
+ "name" => "Gearbest"),
112
+ array(
113
+ "image" => "/admin_section/images/reviews_platform_icon/glassdoor-img.png",
114
+ "name" => "Glassdoor "),
115
+ array(
116
+ "image" => "/admin_section/images/reviews_platform_icon/healthgrades-img.png",
117
+ "name" => "Healthgrades"),
118
+ array(
119
+ "image" => "/admin_section/images/reviews_platform_icon/homeadvisor-img.png",
120
+ "name" => "HomeAdvisor"),
121
+ array(
122
+ "image" => "/admin_section/images/reviews_platform_icon/homestars-img.png",
123
+ "name" => "Homestars"),
124
+ array(
125
+ "image" => "/admin_section/images/reviews_platform_icon/houzz-img.png",
126
+ "name" => "Houzz"),
127
+ array(
128
+ "image" => "/admin_section/images/reviews_platform_icon/hotels-com-img.png",
129
+ "name" => "Hotels.com"),
130
+ array(
131
+ "image" => "/admin_section/images/reviews_platform_icon/hungerstation-img.png",
132
+ "name" => "Hungerstation"),
133
+ array(
134
+ "image" => "/admin_section/images/reviews_platform_icon/imdb-img.png",
135
+ "name" => "Imdb"),
136
+ array(
137
+ "image" => "/admin_section/images/reviews_platform_icon/indeed-img.png",
138
+ "name" => "Indeed"),
139
+ array(
140
+ "image" => "/admin_section/images/reviews_platform_icon/insiderpages-img.png",
141
+ "name" => "Insider Pages"),
142
+ array(
143
+ "image" => "/admin_section/images/reviews_platform_icon/jet-img.png",
144
+ "name" => "Jet"),
145
+ array(
146
+ "image" => "/admin_section/images/reviews_platform_icon/lawyers-com-img.png",
147
+ "name" => "Lawyers.com"),
148
+ array(
149
+ "image" => "/admin_section/images/reviews_platform_icon/lendingtree-img.png",
150
+ "name" => "Lending Tree"),
151
+ array(
152
+ "image" => "/admin_section/images/reviews_platform_icon/martindale-img.png",
153
+ "name" => "Martindale"),
154
+ array(
155
+ "image" => "/admin_section/images/reviews_platform_icon/newegg-img.png",
156
+ "name" => "Newegg"),
157
+ array(
158
+ "image" => "/admin_section/images/reviews_platform_icon/openrice-img.png",
159
+ "name" => "OpenRice"),
160
+ array(
161
+ "image" => "/admin_section/images/reviews_platform_icon/opentable-img.png",
162
+ "name" => "Opentable"),
163
+ array(
164
+ "image" => "/admin_section/images/reviews_platform_icon/playstore-img.png",
165
+ "name" => "Playstore"),
166
+ array(
167
+ "image" => "/admin_section/images/reviews_platform_icon/producthunt-img.png",
168
+ "name" => "ProductHunt"),
169
+ array(
170
+ "image" => "/admin_section/images/reviews_platform_icon/ratemds-img.png",
171
+ "name" => "RateMDs"),
172
+ array(
173
+ "image" => "/admin_section/images/reviews_platform_icon/reserveout-img.png",
174
+ "name" => "Reserveout"),
175
+ array(
176
+ "image" => "/admin_section/images/reviews_platform_icon/rottentomatoes-img.png",
177
+ "name" => "Rottentomatoes"),
178
+ array(
179
+ "image" => "/admin_section/images/reviews_platform_icon/siftery-img.png",
180
+ "name" => "Siftery"),
181
+ array(
182
+ "image" => "/admin_section/images/reviews_platform_icon/sitejabber-img.png",
183
+ "name" => "Sitejabber"),
184
+ array(
185
+ "image" => "/admin_section/images/reviews_platform_icon/softwareadvice-img.png",
186
+ "name" => "SoftwareAdvice"),
187
+ array(
188
+ "image" => "/admin_section/images/reviews_platform_icon/steam-img.png",
189
+ "name" => "Steam"),
190
+ array(
191
+ "image" => "/admin_section/images/reviews_platform_icon/talabat-img.png",
192
+ "name" => "Talabat"),
193
+ array(
194
+ "image" => "/admin_section/images/reviews_platform_icon/theknot-img.png",
195
+ "name" => "The Knot"),
196
+ array(
197
+ "image" => "/admin_section/images/reviews_platform_icon/thumbtack-img.png",
198
+ "name" => "Thumbtack"),
199
+ array(
200
+ "image" => "/admin_section/images/reviews_platform_icon/tripadvisor-img.png",
201
+ "name" => "TripAdvisor"),
202
+ array(
203
+ "image" => "/admin_section/images/reviews_platform_icon/trulia-img.png",
204
+ "name" => "Trulia"),
205
+ array(
206
+ "image" => "/admin_section/images/reviews_platform_icon/trustedshops-img.png",
207
+ "name" => "TrustedShops"),
208
+ array(
209
+ "image" => "/admin_section/images/reviews_platform_icon/trustpilot-img.png",
210
+ "name" => "Trustpilot"),
211
+ array(
212
+ "image" => "/admin_section/images/reviews_platform_icon/trustradius-img.png",
213
+ "name" => "TrustRadius"),
214
+ array(
215
+ "image" => "/admin_section/images/reviews_platform_icon/vitals-img.png",
216
+ "name" => "Vitals"),
217
+ array(
218
+ "image" => "/admin_section/images/reviews_platform_icon/walmart-img.png",
219
+ "name" => "Walmart"),
220
+ array(
221
+ "image" => "/admin_section/images/reviews_platform_icon/weddingwire-img.png",
222
+ "name" => "WeddingWire"),
223
+ array(
224
+ "image" => "/admin_section/images/reviews_platform_icon/wish-img.png",
225
+ "name" => "Wish "),
226
+ array(
227
+ "image" => "/admin_section/images/reviews_platform_icon/yelp-img.png",
228
+ "name" => "Yelp"),
229
+ array(
230
+ "image" => "/admin_section/images/reviews_platform_icon/yellowpages-img.png",
231
+ "name" => "Yellow Pages"),
232
+ array(
233
+ "image" => "/admin_section/images/reviews_platform_icon/zillow-img.png",
234
+ "name" => "Zillow"),
235
+ array(
236
+ "image" => "/admin_section/images/reviews_platform_icon/zocdoc-img.png",
237
+ "name" => "ZocDoc"),
238
+ array(
239
+ "image" => "/admin_section/images/reviews_platform_icon/zomato-img.png",
240
+ "name" => "Zomato"),
241
+ array(
242
+ "image" => "/admin_section/images/reviews_platform_icon/judge-me-img.png",
243
+ "name" => "Judge.me"),
244
+ array(
245
+ "image" => "/admin_section/images/reviews_platform_icon/shopify-app-store-img.png",
246
+ "name" => "Shopify App Store"),
247
+ array(
248
+ "image" => "/admin_section/images/reviews_platform_icon/goodreads-img.png",
249
+ "name" => "Goodreads")
250
+ );
251
 
252
  public function saswp_tooltip_message($meta_field_id){
253
 
283
  $tooltip_message = $this->saswp_tooltip_message($meta_field['id']);
284
 
285
  $class = "";
286
+ $note = "";
 
287
  $hidden = array();
288
  $attribute = array();
289
 
313
 
314
  $class = $meta_field['class'];
315
 
316
+ }
 
 
 
 
 
317
  if(array_key_exists('note', $meta_field)){
318
 
319
  $note = $meta_field['note'];
500
 
501
  case 'saswp-reviews-module-section':
502
 
503
+ if($this->platforms){
504
+
505
+ $input = '<div class="saswp_rv_module_pro_notice">
506
+ <h2>Get Your 5 Stars Reviews on Google SERPs</h2>
507
+ <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>
508
+ <div class="saswp_cmpny_lst">
509
+ <span class="saswp_lst saswp_avlbl">Integrations Available</span>
510
+ <ul>';
511
+
512
+ foreach ($this->platforms as $platform) {
513
+
514
+ $input .= '<li class=""><img src="'.esc_url(SASWP_PLUGIN_URL.$platform['image']).'">
515
+ <span class="saswp_cmpny">'.esc_html($platform['name']).'</span>
516
+ </li>';
517
+ }
518
+
519
+ $input .= '</ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
520
  </div>
521
  <div class="saswp-rev-btn">
522
  <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>
523
  <a target="_blank" href="https://structured-data-for-wp.com/reviews-for-schema">Get The Reviews Addon Now</a>
524
  </div>
525
  </div>';
526
+
527
+ }
528
+
529
  break;
530
 
531
  case 'saswp-google-place-section':
625
 
626
 
627
  }
628
+ $reviews = $pro_api = '';
629
 
630
  $subfields = '';
631
 
admin_section/settings.php CHANGED
@@ -422,10 +422,10 @@ function saswp_premium_features_callback(){ ?>
422
  $cooked_active_text = '';
423
 
424
  if(is_plugin_active('1-click-indexing-api-integration-for-saswp/1-click-indexing-api-integration-for-saswp.php')){
425
- $cooked_active_text = '<label class="saswp-sts-txt">Status :<span style="color:green;">Active</span></label>';
426
  }else{
427
- $cooked_active_text .='<label class="saswp-sts-txt">Status :<span>Inactive</span></label>';
428
- $cooked_active_text .='<a target="_blank" href="http://structured-data-for-wp.com/extensions/"><span class="saswp-d-btn">Download</span></a>';
429
  }
430
 
431
  ?>
@@ -453,10 +453,10 @@ function saswp_premium_features_callback(){ ?>
453
  $cooked_active_text = '';
454
 
455
  if(is_plugin_active('polylang-compatibility-for-saswp/polylang-compatibility-for-saswp.php')){
456
- $cooked_active_text = '<label class="saswp-sts-txt">Status :<span style="color:green;">Active</span></label>';
457
  }else{
458
- $cooked_active_text .='<label class="saswp-sts-txt">Status :<span>Inactive</span></label>';
459
- $cooked_active_text .='<a target="_blank" href="http://structured-data-for-wp.com/extensions/"><span class="saswp-d-btn">Download</span></a>';
460
  }
461
 
462
  ?>
@@ -484,10 +484,10 @@ function saswp_premium_features_callback(){ ?>
484
  $cooked_active_text = '';
485
 
486
  if(is_plugin_active('reviews-for-schema/reviews-for-schema.php')){
487
- $cooked_active_text = '<label class="saswp-sts-txt">Status :<span style="color:green;">Active</span></label>';
488
  }else{
489
- $cooked_active_text .='<label class="saswp-sts-txt">Status :<span>Inactive</span></label>';
490
- $cooked_active_text .='<a target="_blank" href="http://structured-data-for-wp.com/extensions/"><span class="saswp-d-btn">Download</span></a>';
491
  }
492
 
493
  ?>
@@ -515,10 +515,10 @@ function saswp_premium_features_callback(){ ?>
515
  $cooked_active_text = '';
516
 
517
  if(is_plugin_active('jobposting-schema-compatibility/jobposting-schema-compatibility.php')){
518
- $cooked_active_text = '<label class="saswp-sts-txt">Status :<span style="color:green;">Active</span></label>';
519
  }else{
520
- $cooked_active_text .='<label class="saswp-sts-txt">Status :<span>Inactive</span></label>';
521
- $cooked_active_text .='<a target="_blank" href="http://structured-data-for-wp.com/extensions/"><span class="saswp-d-btn">Download</span></a>';
522
  }
523
 
524
  ?>
@@ -546,10 +546,10 @@ function saswp_premium_features_callback(){ ?>
546
  $cooked_active_text = '';
547
 
548
  if(is_plugin_active('faq-schema-compatibility/faq-schema-compatibility.php')){
549
- $cooked_active_text = '<label class="saswp-sts-txt">Status :<span style="color:green;">Active</span></label>';
550
  }else{
551
- $cooked_active_text .='<label class="saswp-sts-txt">Status :<span>Inactive</span></label>';
552
- $cooked_active_text .='<a target="_blank" href="http://structured-data-for-wp.com/extensions/"><span class="saswp-d-btn">Download</span></a>';
553
  }
554
 
555
  ?>
@@ -578,10 +578,10 @@ function saswp_premium_features_callback(){ ?>
578
  $cooked_active_text = '';
579
 
580
  if(is_plugin_active('qanda-schema-for-saswp/qanda-schema-for-saswp.php')){
581
- $cooked_active_text = '<label class="saswp-sts-txt">Status :<span style="color:green;">Active</span></label>';
582
  }else{
583
- $cooked_active_text .='<label class="saswp-sts-txt">Status :<span>Inactive</span></label>';
584
- $cooked_active_text .='<a target="_blank" href="http://structured-data-for-wp.com/extensions/"><span class="saswp-d-btn">Download</span></a>';
585
  }
586
 
587
  ?>
@@ -609,10 +609,10 @@ function saswp_premium_features_callback(){ ?>
609
  $cooked_active_text = '';
610
 
611
  if(is_plugin_active('recipe-schema-for-saswp/recipe-schema-for-saswp.php')){
612
- $cooked_active_text = '<label class="saswp-sts-txt">Status :<span style="color:green;">Active</span></label>';
613
  }else{
614
- $cooked_active_text .='<label class="saswp-sts-txt">Status :<span>Inactive</span></label>';
615
- $cooked_active_text .='<a target="_blank" href="http://structured-data-for-wp.com/extensions/"><span class="saswp-d-btn">Download</span></a>';
616
  }
617
 
618
  ?>
@@ -640,10 +640,10 @@ function saswp_premium_features_callback(){ ?>
640
  $cooked_active_text = '';
641
 
642
  if(is_plugin_active('event-schema-for-saswp/event-schema-for-saswp.php')){
643
- $cooked_active_text = '<label class="saswp-sts-txt">Status :<span style="color:green;">Active</span></label>';
644
  }else{
645
- $cooked_active_text .='<label class="saswp-sts-txt">Status :<span>Inactive</span></label>';
646
- $cooked_active_text .='<a target="_blank" href="http://structured-data-for-wp.com/extensions/"><span class="saswp-d-btn">Download</span></a>';
647
  }
648
 
649
  ?>
@@ -670,10 +670,10 @@ function saswp_premium_features_callback(){ ?>
670
  $cooked_active_text = '';
671
 
672
  if(is_plugin_active('course-schema-for-saswp/course-schema-for-saswp.php')){
673
- $cooked_active_text = '<label class="saswp-sts-txt">Status :<span style="color:green;">Active</span></label>';
674
  }else{
675
- $cooked_active_text .='<label class="saswp-sts-txt">Status :<span>Inactive</span></label>';
676
- $cooked_active_text .='<a target="_blank" href="http://structured-data-for-wp.com/extensions/"><span class="saswp-d-btn">Download</span></a>';
677
  }
678
 
679
  ?>
@@ -697,10 +697,10 @@ function saswp_premium_features_callback(){ ?>
697
  <?php
698
  $woocommerce_active_text = '';
699
  if(is_plugin_active('woocommerce-compatibility-for-schema/woocommerce-compatibility-for-schema.php')){
700
- $woocommerce_active_text = '<label class="saswp-sts-txt">Status :<span style="color:green">Active</span></label>'; ;
701
  }else{
702
- $woocommerce_active_text .= '<label class="saswp-sts-txt">Status :<span>Inactive</span></label>';
703
- $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>';
704
  }
705
 
706
  ?>
@@ -726,10 +726,10 @@ function saswp_premium_features_callback(){ ?>
726
  $cooked_active_text = '';
727
 
728
  if(is_plugin_active('real-estate-schema/real-estate-schema.php')){
729
- $cooked_active_text = '<label class="saswp-sts-txt">Status :<span style="color:green;">Active</span></label>';
730
  }else{
731
- $cooked_active_text .='<label class="saswp-sts-txt">Status :<span>Inactive</span></label>';
732
- $cooked_active_text .='<a target="_blank" href="http://structured-data-for-wp.com/extensions/real-estate-schema/"><span class="saswp-d-btn">Download</span></a>';
733
  }
734
 
735
  ?>
422
  $cooked_active_text = '';
423
 
424
  if(is_plugin_active('1-click-indexing-api-integration-for-saswp/1-click-indexing-api-integration-for-saswp.php')){
425
+ $cooked_active_text = '<label class="saswp-sts-txt">'.saswp_t_string('Status').' :<span style="color:green;">'.saswp_t_string('Active').'</span></label>';
426
  }else{
427
+ $cooked_active_text .='<label class="saswp-sts-txt">'.saswp_t_string('Status').' :<span>'.saswp_t_string('Inactive').'</span></label>';
428
+ $cooked_active_text .='<a target="_blank" href="http://structured-data-for-wp.com/extensions/"><span class="saswp-d-btn">'.saswp_t_string('Download').'</span></a>';
429
  }
430
 
431
  ?>
453
  $cooked_active_text = '';
454
 
455
  if(is_plugin_active('polylang-compatibility-for-saswp/polylang-compatibility-for-saswp.php')){
456
+ $cooked_active_text = '<label class="saswp-sts-txt">'.saswp_t_string('Status').' :<span style="color:green;">'.saswp_t_string('Active').'</span></label>';
457
  }else{
458
+ $cooked_active_text .='<label class="saswp-sts-txt">'.saswp_t_string('Status').' :<span>'.saswp_t_string('Inactive').'</span></label>';
459
+ $cooked_active_text .='<a target="_blank" href="http://structured-data-for-wp.com/extensions/"><span class="saswp-d-btn">'.saswp_t_string('Download').'</span></a>';
460
  }
461
 
462
  ?>
484
  $cooked_active_text = '';
485
 
486
  if(is_plugin_active('reviews-for-schema/reviews-for-schema.php')){
487
+ $cooked_active_text = '<label class="saswp-sts-txt">'.saswp_t_string('Status').' :<span style="color:green;">'.saswp_t_string('Active').'</span></label>';
488
  }else{
489
+ $cooked_active_text .='<label class="saswp-sts-txt">'.saswp_t_string('Status').' :<span>'.saswp_t_string('Inactive').'</span></label>';
490
+ $cooked_active_text .='<a target="_blank" href="http://structured-data-for-wp.com/extensions/"><span class="saswp-d-btn">'.saswp_t_string('Download').'</span></a>';
491
  }
492
 
493
  ?>
515
  $cooked_active_text = '';
516
 
517
  if(is_plugin_active('jobposting-schema-compatibility/jobposting-schema-compatibility.php')){
518
+ $cooked_active_text = '<label class="saswp-sts-txt">'.saswp_t_string('Status').' :<span style="color:green;">'.saswp_t_string('Active').'</span></label>';
519
  }else{
520
+ $cooked_active_text .='<label class="saswp-sts-txt">'.saswp_t_string('Status').' :<span>'.saswp_t_string('Inactive').'</span></label>';
521
+ $cooked_active_text .='<a target="_blank" href="http://structured-data-for-wp.com/extensions/"><span class="saswp-d-btn">'.saswp_t_string('Download').'</span></a>';
522
  }
523
 
524
  ?>
546
  $cooked_active_text = '';
547
 
548
  if(is_plugin_active('faq-schema-compatibility/faq-schema-compatibility.php')){
549
+ $cooked_active_text = '<label class="saswp-sts-txt">'.saswp_t_string('Status').' :<span style="color:green;">'.saswp_t_string('Active').'</span></label>';
550
  }else{
551
+ $cooked_active_text .='<label class="saswp-sts-txt">'.saswp_t_string('Status').' :<span>'.saswp_t_string('Inactive').'</span></label>';
552
+ $cooked_active_text .='<a target="_blank" href="http://structured-data-for-wp.com/extensions/"><span class="saswp-d-btn">'.saswp_t_string('Download').'</span></a>';
553
  }
554
 
555
  ?>
578
  $cooked_active_text = '';
579
 
580
  if(is_plugin_active('qanda-schema-for-saswp/qanda-schema-for-saswp.php')){
581
+ $cooked_active_text = '<label class="saswp-sts-txt">'.saswp_t_string('Status').' :<span style="color:green;">'.saswp_t_string('Active').'</span></label>';
582
  }else{
583
+ $cooked_active_text .='<label class="saswp-sts-txt">'.saswp_t_string('Status').' :<span>'.saswp_t_string('Inactive').'</span></label>';
584
+ $cooked_active_text .='<a target="_blank" href="http://structured-data-for-wp.com/extensions/"><span class="saswp-d-btn">'.saswp_t_string('Download').'</span></a>';
585
  }
586
 
587
  ?>
609
  $cooked_active_text = '';
610
 
611
  if(is_plugin_active('recipe-schema-for-saswp/recipe-schema-for-saswp.php')){
612
+ $cooked_active_text = '<label class="saswp-sts-txt">'.saswp_t_string('Status').' :<span style="color:green;">'.saswp_t_string('Active').'</span></label>';
613
  }else{
614
+ $cooked_active_text .='<label class="saswp-sts-txt">'.saswp_t_string('Status').' :<span>'.saswp_t_string('Inactive').'</span></label>';
615
+ $cooked_active_text .='<a target="_blank" href="http://structured-data-for-wp.com/extensions/"><span class="saswp-d-btn">'.saswp_t_string('Download').'</span></a>';
616
  }
617
 
618
  ?>
640
  $cooked_active_text = '';
641
 
642
  if(is_plugin_active('event-schema-for-saswp/event-schema-for-saswp.php')){
643
+ $cooked_active_text = '<label class="saswp-sts-txt">'.saswp_t_string('Status').' :<span style="color:green;">'.saswp_t_string('Active').'</span></label>';
644
  }else{
645
+ $cooked_active_text .='<label class="saswp-sts-txt">'.saswp_t_string('Status').' :<span>'.saswp_t_string('Inactive').'</span></label>';
646
+ $cooked_active_text .='<a target="_blank" href="http://structured-data-for-wp.com/extensions/"><span class="saswp-d-btn">'.saswp_t_string('Download').'</span></a>';
647
  }
648
 
649
  ?>
670
  $cooked_active_text = '';
671
 
672
  if(is_plugin_active('course-schema-for-saswp/course-schema-for-saswp.php')){
673
+ $cooked_active_text = '<label class="saswp-sts-txt">'.saswp_t_string('Status').' :<span style="color:green;">'.saswp_t_string('Active').'</span></label>';
674
  }else{
675
+ $cooked_active_text .='<label class="saswp-sts-txt">'.saswp_t_string('Status').' :<span>'.saswp_t_string('Inactive').'</span></label>';
676
+ $cooked_active_text .='<a target="_blank" href="http://structured-data-for-wp.com/extensions/"><span class="saswp-d-btn">'.saswp_t_string('Download').'</span></a>';
677
  }
678
 
679
  ?>
697
  <?php
698
  $woocommerce_active_text = '';
699
  if(is_plugin_active('woocommerce-compatibility-for-schema/woocommerce-compatibility-for-schema.php')){
700
+ $woocommerce_active_text = '<label class="saswp-sts-txt">'.saswp_t_string('Status').' :<span style="color:green">'.saswp_t_string('Active').'</span></label>'; ;
701
  }else{
702
+ $woocommerce_active_text .= '<label class="saswp-sts-txt">'.saswp_t_string('Status').' :<span>'.saswp_t_string('Inactive').'</span></label>';
703
+ $woocommerce_active_text .= '<a target="_blank" href="http://structured-data-for-wp.com/extensions/woocommerce-compatibility-for-schema/"><span class="saswp-d-btn">'.saswp_t_string('Download').'</span></a>';
704
  }
705
 
706
  ?>
726
  $cooked_active_text = '';
727
 
728
  if(is_plugin_active('real-estate-schema/real-estate-schema.php')){
729
+ $cooked_active_text = '<label class="saswp-sts-txt">'.saswp_t_string('Status').' :<span style="color:green;">'.saswp_t_string('Active').'</span></label>';
730
  }else{
731
+ $cooked_active_text .='<label class="saswp-sts-txt">'.saswp_t_string('Status').' :<span>'.saswp_t_string('Inactive').'</span></label>';
732
+ $cooked_active_text .='<a target="_blank" href="http://structured-data-for-wp.com/extensions/real-estate-schema/"><span class="saswp-d-btn">'.saswp_t_string('Download').'</span></a>';
733
  }
734
 
735
  ?>
admin_section/structure_admin.php CHANGED
@@ -2025,8 +2025,7 @@ function saswp_create_resized_image_folder(){
2025
  $upload_info = wp_upload_dir();
2026
  $upload_dir = $upload_info['basedir'];
2027
  $upload_url = $upload_info['baseurl'];
2028
-
2029
- $upload_main_url = $upload_info['url'];
2030
  $make_new_dir = $upload_dir . '/schema-and-structured-data-for-wp';
2031
 
2032
  if (! is_dir($make_new_dir)) {
2025
  $upload_info = wp_upload_dir();
2026
  $upload_dir = $upload_info['basedir'];
2027
  $upload_url = $upload_info['baseurl'];
2028
+
 
2029
  $make_new_dir = $upload_dir . '/schema-and-structured-data-for-wp';
2030
 
2031
  if (! is_dir($make_new_dir)) {
core/3rd-party/aqua_resizer.php CHANGED
@@ -98,8 +98,7 @@ if(!class_exists('SASWP_Aq_Resize')) {
98
  global $sd_data;
99
 
100
  if( isset($sd_data['saswp-resized-image-folder']) && $sd_data['saswp-resized-image-folder'] == 1 ){
101
-
102
- $upload_main_url = $upload_info['url'];
103
  $make_new_dir = $upload_dir . '/schema-and-structured-data-for-wp';
104
 
105
  if (! is_dir($make_new_dir)) {
98
  global $sd_data;
99
 
100
  if( isset($sd_data['saswp-resized-image-folder']) && $sd_data['saswp-resized-image-folder'] == 1 ){
101
+
 
102
  $make_new_dir = $upload_dir . '/schema-and-structured-data-for-wp';
103
 
104
  if (! is_dir($make_new_dir)) {
core/array-list/local-sub-business.php CHANGED
@@ -77,7 +77,7 @@ return array(
77
  'bakery' => 'Bakery',
78
  'barorpub' => 'Bar Or Pub',
79
  'brewery' => 'Brewery',
80
- 'cafeorcoffee_shop' => 'Cafe Or Coffee Shop',
81
  'fastfoodrestaurant' => 'Fast Food Restaurant',
82
  'icecreamshop' => 'Ice Cream Shop',
83
  'restaurant' => 'Restaurant',
@@ -124,7 +124,7 @@ return array(
124
  'exercisegym' => 'Exercise Gym',
125
  'golfcourse' => 'Golf Course',
126
  'healthclub' => 'Health Club',
127
- 'publicswimming_pool' => 'Public Swimming Pool',
128
  'skiresort' => 'Ski Resort',
129
  'sportsclub' => 'Sports Club',
130
  'stadiumorarena' => 'Stadium Or Arena',
77
  'bakery' => 'Bakery',
78
  'barorpub' => 'Bar Or Pub',
79
  'brewery' => 'Brewery',
80
+ 'cafeorcoffeeshop' => 'Cafe Or Coffee Shop',
81
  'fastfoodrestaurant' => 'Fast Food Restaurant',
82
  'icecreamshop' => 'Ice Cream Shop',
83
  'restaurant' => 'Restaurant',
124
  'exercisegym' => 'Exercise Gym',
125
  'golfcourse' => 'Golf Course',
126
  'healthclub' => 'Health Club',
127
+ 'publicswimmingpool' => 'Public Swimming Pool',
128
  'skiresort' => 'Ski Resort',
129
  'sportsclub' => 'Sports Club',
130
  'stadiumorarena' => 'Stadium Or Arena',
modules/rating-box/frontend.php CHANGED
@@ -149,9 +149,7 @@ Class saswp_rating_box_frontend{
149
  $saswp_review_details = array();
150
  $saswp_review_item_feature = array();
151
  $saswp_review_item_star_rating = array();
152
- $saswp_review_title = '';
153
- $saswp_review_description_title = '';
154
-
155
  $saswp_review_details = get_post_meta(get_the_ID(), 'saswp_review_details', true);
156
  $saswp_review_description = get_post_meta( get_the_ID(), 'saswp-review-item-description', true );
157
  $saswp_review_props = get_post_meta( get_the_ID(), 'saswp-review-item-props', true );
@@ -163,14 +161,7 @@ Class saswp_rating_box_frontend{
163
  }
164
  if(isset($saswp_review_details['saswp-review-item-star-rating'])){
165
  $saswp_review_item_star_rating = $saswp_review_details['saswp-review-item-star-rating'];
166
- }
167
- if(isset($saswp_review_details['saswp-review-item-title'])){
168
- $saswp_review_title = $saswp_review_details['saswp-review-item-title'];
169
- }
170
- if(isset($saswp_review_details['saswp-review-item-description-title'])){
171
- $saswp_review_description_title = $saswp_review_details['saswp-review-item-description-title'];
172
- }
173
-
174
  if(isset($saswp_review_details['saswp-review-item-over-all'])){
175
  $saswp_over_all_rating = (float)$saswp_review_details['saswp-review-item-over-all'];
176
  }
149
  $saswp_review_details = array();
150
  $saswp_review_item_feature = array();
151
  $saswp_review_item_star_rating = array();
152
+
 
 
153
  $saswp_review_details = get_post_meta(get_the_ID(), 'saswp_review_details', true);
154
  $saswp_review_description = get_post_meta( get_the_ID(), 'saswp-review-item-description', true );
155
  $saswp_review_props = get_post_meta( get_the_ID(), 'saswp-review-item-props', true );
161
  }
162
  if(isset($saswp_review_details['saswp-review-item-star-rating'])){
163
  $saswp_review_item_star_rating = $saswp_review_details['saswp-review-item-star-rating'];
164
+ }
 
 
 
 
 
 
 
165
  if(isset($saswp_review_details['saswp-review-item-over-all'])){
166
  $saswp_over_all_rating = (float)$saswp_review_details['saswp-review-item-over-all'];
167
  }
modules/reviews/reviews_admin.php CHANGED
@@ -131,18 +131,7 @@ class saswp_reviews_admin {
131
  $meta_value = isset($meta_field['default']);
132
 
133
  }
134
-
135
- if(isset($meta_field['attributes'])){
136
-
137
- if(array_key_exists('provider_type', $meta_field['attributes'])){
138
-
139
- $provider_type = $meta_field['attributes']['provider_type'];
140
-
141
- }
142
-
143
-
144
- }
145
-
146
  switch ( $meta_field['type'] ) {
147
 
148
  case 'select':
131
  $meta_value = isset($meta_field['default']);
132
 
133
  }
134
+
 
 
 
 
 
 
 
 
 
 
 
135
  switch ( $meta_field['type'] ) {
136
 
137
  case 'select':
modules/reviews/reviews_service.php CHANGED
@@ -196,17 +196,10 @@ class saswp_reviews_service {
196
 
197
  foreach ($reviews as $review){
198
 
199
- $review_rating = $review['saswp_review_rating'];
200
 
201
- $starating = saswp_get_rating_html_by_value($review_rating);
202
-
203
- $term = get_term( $review['saswp_review_platform'], 'platform' );
204
- $term_slug = '';
205
-
206
- if(is_object($term)){
207
- $term_slug = $term->slug;
208
- }
209
-
210
  $img_src = SASWP_DIR_URI.'/admin_section/images/default_user.jpg';
211
 
212
  if(isset($review['saswp_reviewer_image']) && $review['saswp_reviewer_image'] !=''){
196
 
197
  foreach ($reviews as $review){
198
 
199
+ $review_rating = $review['saswp_review_rating'];
200
 
201
+ $starating = saswp_get_rating_html_by_value($review_rating);
202
+
 
 
 
 
 
 
 
203
  $img_src = SASWP_DIR_URI.'/admin_section/images/default_user.jpg';
204
 
205
  if(isset($review['saswp_reviewer_image']) && $review['saswp_reviewer_image'] !=''){
modules/reviews/reviews_setup.php CHANGED
@@ -538,13 +538,13 @@ add_filter( 'parse_query', 'saswp_sort_reviews_by_platform' );
538
 
539
  function saswp_reviews_form_shortcode_metabox($post){
540
 
541
- echo '<p>'.esc_html__( 'Use Below shortcode to show reviews form in your website. Using this you can collect reviews from your website directly.' , 'schema-and-structured-data-for-wp').'</p>';
542
  echo '<input type="text" value="[saswp-reviews-form]" readonly>';
543
  }
544
 
545
  function saswp_reviews_usage_metabox ($post) {
546
 
547
- echo '<p>'.esc_html__( 'Use these reviews to create a collection and use them to show on frontend.' , 'schema-and-structured-data-for-wp').'</p>';
548
- echo '<div><a href="'.esc_url( admin_url("edit.php?post_type=saswp-collections") ).'">'.esc_html__( 'Add to collection' , 'schema-and-structured-data-for-wp').'</a></div>';
549
 
550
  }
538
 
539
  function saswp_reviews_form_shortcode_metabox($post){
540
 
541
+ echo '<p>'.saswp_t_string( 'Use Below shortcode to show reviews form in your website. Using this you can collect reviews from your website directly.').'</p>';
542
  echo '<input type="text" value="[saswp-reviews-form]" readonly>';
543
  }
544
 
545
  function saswp_reviews_usage_metabox ($post) {
546
 
547
+ echo '<p>'.saswp_t_string( 'Use these reviews to create a collection and use them to show on frontend.').'</p>';
548
+ echo '<div><a href="'.esc_url( admin_url("edit.php?post_type=saswp-collections") ).'">'.saswp_t_string( 'Add to collection').'</a></div>';
549
 
550
  }
modules/reviews/reviews_widget.php CHANGED
@@ -77,18 +77,15 @@ class Saswp_Reviews_Widget extends WP_Widget {
77
  *
78
  * @param array $instance Previously saved values from database.
79
  */
80
- public function form( $instance ) {
81
-
82
-
83
- $title = ! empty( $instance['title'] ) ? $instance['title'] : saswp_t_string( 'Review Title' );
84
- $ads = ! empty( $instance['g_review'] ) ? $instance['g_review'] : saswp_t_string( 'review list to be display' );?>
85
- <p>
86
- <label for="<?php echo esc_attr( $this->get_field_id( 'g_review' ) ); ?>">
87
- <?php esc_attr_e( 'Reviews :' ); ?>
88
- </label>
89
- <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); ?>">
90
- </p>
91
- <?php
92
  }
93
 
94
  /**
77
  *
78
  * @param array $instance Previously saved values from database.
79
  */
80
+ public function form( $instance ) {
81
+ ?>
82
+ <p>
83
+ <label for="<?php echo esc_attr( $this->get_field_id( 'g_review' ) ); ?>">
84
+ <?php esc_attr_e( 'Reviews :' ); ?>
85
+ </label>
86
+ <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); ?>">
87
+ </p>
88
+ <?php
 
 
 
89
  }
90
 
91
  /**
output/function.php CHANGED
@@ -1213,7 +1213,7 @@ function saswp_get_comments($post_id){
1213
  */
1214
  function saswp_get_comments_with_rating(){
1215
 
1216
- global $sd_data, $post;
1217
 
1218
  $comments = array();
1219
  $ratings = array();
@@ -2798,9 +2798,7 @@ function saswp_get_reviews_wp_theme(){
2798
  $comment_meta = explode( ',', $comment_meta );
2799
 
2800
  $user_overall = 0;
2801
- $user_rates = 0;
2802
- $counter = 0;
2803
-
2804
 
2805
  $criterias = get_post_meta( get_the_ID(), 'reviews_score' );
2806
  $rate_criterias = array();
@@ -2880,59 +2878,80 @@ function saswp_get_reviews_wp_theme(){
2880
  return $response_rv;
2881
 
2882
  }
2883
- add_filter( 'the_content', 'saswp_featured_image_in_feed' );
2884
 
2885
- function saswp_featured_image_in_feed( $content ) {
 
 
2886
 
2887
  global $post, $sd_data;
 
 
 
 
 
 
 
 
 
 
 
2888
 
2889
- if( is_feed() && isset($sd_data['saswp-rss-feed-image']) && $sd_data['saswp-rss-feed-image'] == 1 ) {
2890
- if ( has_post_thumbnail( $post->ID ) ){
2891
- $image = get_the_post_thumbnail( $post->ID, 'full', array( 'style' => 'float:right; margin:0 0 10px 10px;' ) );
2892
- $content = $image . $content;
2893
  }
 
2894
  }
2895
 
2896
  return $content;
2897
 
2898
  }
2899
- function saswp_get_loop_markup($i) {
2900
 
2901
- global $sd_data;
2902
 
2903
- $response = array();
2904
- $site_name ='';
 
2905
 
2906
- $schema_type = $sd_data['saswp_archive_schema_type'];
2907
 
2908
- if(isset($sd_data['sd_name']) && $sd_data['sd_name'] !=''){
2909
- $site_name = $sd_data['sd_name'];
2910
- }else{
2911
- $site_name = get_bloginfo();
 
 
 
 
 
 
 
2912
  }
2913
 
2914
- $schema_properties = array();
 
 
 
 
 
 
 
 
2915
 
2916
- $service_object = new saswp_output_service();
2917
- $logo = $service_object->saswp_get_publisher(true);
 
2918
  $feature_image = $service_object->saswp_get_fetaure_image();
2919
-
2920
- $publisher_info['type'] = 'Organization';
2921
- $publisher_info['name'] = esc_attr($site_name);
2922
- $publisher_info['logo']['@type'] = 'ImageObject';
2923
- $publisher_info['logo']['url'] = isset($logo['url']) ? esc_attr($logo['url']):'';
2924
- $publisher_info['logo']['width'] = isset($logo['width']) ? esc_attr($logo['width']):'';
2925
- $publisher_info['logo']['height'] = isset($logo['height']) ? esc_attr($logo['height']):'';
2926
-
2927
  $schema_properties['@type'] = esc_attr($schema_type);
2928
  $schema_properties['headline'] = saswp_get_the_title();
2929
  $schema_properties['url'] = get_the_permalink();
2930
  $schema_properties['datePublished'] = get_the_date('c');
2931
  $schema_properties['dateModified'] = get_the_modified_date('c');
2932
  $schema_properties['mainEntityOfPage'] = get_the_permalink();
2933
- $schema_properties['author'] = get_the_author();
2934
- $schema_properties['publisher'] = $publisher_info;
2935
-
 
 
 
2936
  if(!empty($feature_image)){
2937
  $schema_properties = array_merge($schema_properties, $feature_image);
2938
  }
@@ -3127,4 +3146,41 @@ function saswp_get_stamped_reviews($product_id){
3127
  }
3128
 
3129
  return $response;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3130
  }
1213
  */
1214
  function saswp_get_comments_with_rating(){
1215
 
1216
+ global $post;
1217
 
1218
  $comments = array();
1219
  $ratings = array();
2798
  $comment_meta = explode( ',', $comment_meta );
2799
 
2800
  $user_overall = 0;
2801
+ $user_rates = 0;
 
 
2802
 
2803
  $criterias = get_post_meta( get_the_ID(), 'reviews_score' );
2804
  $rate_criterias = array();
2878
  return $response_rv;
2879
 
2880
  }
 
2881
 
2882
+ add_filter( 'the_excerpt_rss', 'saswp_featured_image_in_feed_excerpt' );
2883
+
2884
+ function saswp_featured_image_in_feed_excerpt( $content ) {
2885
 
2886
  global $post, $sd_data;
2887
+
2888
+ if( is_feed() ) {
2889
+
2890
+ $use_excerpt = get_option('rss_use_excerpt');
2891
+
2892
+ if( $use_excerpt == 1 && (isset($sd_data['saswp-rss-feed-image']) && $sd_data['saswp-rss-feed-image'] == 1) ){
2893
+
2894
+ if ( has_post_thumbnail( $post->ID ) ){
2895
+ $image = get_the_post_thumbnail( $post->ID, 'full', array( 'style' => 'float:right; margin:0 0 10px 10px;' ) );
2896
+ $content = $image . $content;
2897
+ }
2898
 
 
 
 
 
2899
  }
2900
+
2901
  }
2902
 
2903
  return $content;
2904
 
2905
  }
 
2906
 
2907
+ add_filter( 'the_content', 'saswp_featured_image_in_feed_content' );
2908
 
2909
+ function saswp_featured_image_in_feed_content( $content ) {
2910
+
2911
+ global $post, $sd_data;
2912
 
2913
+ if( is_feed() ) {
2914
 
2915
+ $use_excerpt = get_option('rss_use_excerpt');
2916
+
2917
+ if( $use_excerpt != 1 && (isset($sd_data['saswp-rss-feed-image']) && $sd_data['saswp-rss-feed-image'] == 1) ){
2918
+
2919
+ if ( has_post_thumbnail( $post->ID ) ){
2920
+ $image = get_the_post_thumbnail( $post->ID, 'full', array( 'style' => 'float:right; margin:0 0 10px 10px;' ) );
2921
+ $content = $image . $content;
2922
+ }
2923
+
2924
+ }
2925
+
2926
  }
2927
 
2928
+ return $content;
2929
+
2930
+ }
2931
+ function saswp_get_loop_markup($i) {
2932
+
2933
+ global $sd_data;
2934
+
2935
+ $response = array();
2936
+ $schema_properties = array();
2937
 
2938
+ $schema_type = $sd_data['saswp_archive_schema_type'];
2939
+ $service_object = new saswp_output_service();
2940
+ $publisher_info = $service_object->saswp_get_publisher();
2941
  $feature_image = $service_object->saswp_get_fetaure_image();
2942
+
 
 
 
 
 
 
 
2943
  $schema_properties['@type'] = esc_attr($schema_type);
2944
  $schema_properties['headline'] = saswp_get_the_title();
2945
  $schema_properties['url'] = get_the_permalink();
2946
  $schema_properties['datePublished'] = get_the_date('c');
2947
  $schema_properties['dateModified'] = get_the_modified_date('c');
2948
  $schema_properties['mainEntityOfPage'] = get_the_permalink();
2949
+ $schema_properties['author'] = saswp_get_author_details();
2950
+
2951
+ if( isset($publisher_info['publisher']) ){
2952
+ $schema_properties['publisher'] = $publisher_info['publisher'];
2953
+ }
2954
+
2955
  if(!empty($feature_image)){
2956
  $schema_properties = array_merge($schema_properties, $feature_image);
2957
  }
3146
  }
3147
 
3148
  return $response;
3149
+ }
3150
+
3151
+ function saswp_get_ampforwp_story_images(){
3152
+
3153
+ $image_arr = array();
3154
+
3155
+ if(class_exists('Ampforwp_Stories_Post_Type')){
3156
+
3157
+ $amp_story_meta = get_post_meta( get_the_ID(), 'ampforwp_stories', true );
3158
+ $post_type = get_post_type(get_the_ID());
3159
+
3160
+ if( !empty($amp_story_meta) && is_array($amp_story_meta) && $post_type == 'ampforwp_story' ) {
3161
+
3162
+ foreach ($amp_story_meta as $value) {
3163
+
3164
+ if( isset($value['design_type']) ){
3165
+
3166
+ if( $value['design_type'] == 'design1'){
3167
+ $image_arr[] = saswp_get_image_by_url($value['dsg1_image_url']);
3168
+ }
3169
+ if($value['design_type'] == 'design2'){
3170
+ $image_arr[] = saswp_get_image_by_url($value['dsg2_image_url']);
3171
+ }
3172
+ if($value['design_type'] == 'design3'){
3173
+ $image_arr[] = saswp_get_image_by_url($value['dsg3_image_url']);
3174
+ }
3175
+
3176
+ }
3177
+
3178
+ }
3179
+
3180
+ }
3181
+
3182
+ }
3183
+
3184
+ return $image_arr;
3185
+
3186
  }
output/markup.php CHANGED
@@ -84,12 +84,31 @@ function saswp_get_reviews_schema_markup($reviews){
84
 
85
  }
86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  function saswp_book_schema_markup($schema_id, $schema_post_id, $all_post_meta){
88
 
89
  $input1 = array();
90
-
91
- $howto_image = get_post_meta( get_the_ID(), 'saswp_book_image_'.$schema_id.'_detail',true);
92
-
93
  $input1['@context'] = saswp_context_url();
94
  $input1['@type'] = 'Book';
95
  $input1['@id'] = trailingslashit(get_permalink()).'#Book';
@@ -97,15 +116,8 @@ function saswp_book_schema_markup($schema_id, $schema_post_id, $all_post_meta){
97
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_book_name_'.$schema_id, 'saswp_array');
98
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_book_description_'.$schema_id, 'saswp_array');
99
 
100
- if(!(empty($howto_image))){
101
-
102
- $input1['image']['@type'] = 'ImageObject';
103
- $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
104
- $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
105
- $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
106
-
107
- }
108
-
109
  if( isset($all_post_meta['saswp_book_author_'.$schema_id][0]) && !empty($all_post_meta['saswp_book_author_'.$schema_id][0]) ){
110
 
111
  $input1['author']['@type'] = 'Person';
@@ -135,11 +147,11 @@ function saswp_book_schema_markup($schema_id, $schema_post_id, $all_post_meta){
135
  $input1['offers']['price'] = $all_post_meta['saswp_book_price_'.$schema_id];
136
  $input1['offers']['priceCurrency'] = $all_post_meta['saswp_book_price_currency_'.$schema_id];
137
  }
138
-
139
- if(isset($all_post_meta['saswp_book_enable_rating_'.$schema_id]) && isset($all_post_meta['saswp_book_rating_value_'.$schema_id]) && isset($all_post_meta['saswp_book_rating_count_'.$schema_id])){
140
  $input1['aggregateRating']['@type'] = 'aggregateRating';
141
- $input1['aggregateRating']['ratingValue'] = $all_post_meta['saswp_book_rating_value_'.$schema_id];
142
- $input1['aggregateRating']['ratingCount'] = $all_post_meta['saswp_book_rating_count_'.$schema_id];
143
  }
144
 
145
  return $input1;
@@ -147,10 +159,8 @@ function saswp_book_schema_markup($schema_id, $schema_post_id, $all_post_meta){
147
 
148
  function saswp_movie_schema_markup($schema_id, $schema_post_id, $all_post_meta){
149
 
150
- $input1 = array();
151
 
152
- $howto_image = get_post_meta($schema_post_id, 'saswp_movie_image_'.$schema_id.'_detail',true);
153
-
154
  $tool = get_post_meta($schema_post_id, 'movie_actor_'.$schema_id, true);
155
 
156
  $input1['@context'] = saswp_context_url();
@@ -162,14 +172,7 @@ function saswp_movie_schema_markup($schema_id, $schema_post_id, $all_post_meta){
162
  $input1['dateCreated'] = isset($all_post_meta['saswp_movie_date_created_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_movie_date_created_'.$schema_id][0])):'';
163
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_movie_description_'.$schema_id, 'saswp_array');
164
 
165
- if(!(empty($howto_image))){
166
-
167
- $input1['image']['@type'] = 'ImageObject';
168
- $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
169
- $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
170
- $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
171
-
172
- }
173
 
174
  if(isset($all_post_meta['saswp_movie_director_'.$schema_id][0])){
175
 
@@ -212,8 +215,7 @@ function saswp_movie_schema_markup($schema_id, $schema_post_id, $all_post_meta){
212
  function saswp_howto_schema_markup($schema_id, $schema_post_id, $all_post_meta){
213
 
214
  $input1 = array();
215
- $howto_image = get_post_meta( get_the_ID(), 'saswp_howto_schema_image_'.$schema_id.'_detail',true);
216
-
217
  $tool = get_post_meta($schema_post_id, 'howto_tool_'.$schema_id, true);
218
  $step = get_post_meta($schema_post_id, 'howto_step_'.$schema_id, true);
219
  $supply = get_post_meta($schema_post_id, 'howto_supply_'.$schema_id, true);
@@ -226,14 +228,7 @@ function saswp_howto_schema_markup($schema_id, $schema_post_id, $all_post_meta){
226
  $input1['dateModified'] = isset($all_post_meta['saswp_howto_ec_schema_date_modified_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_howto_ec_schema_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')) : '';
227
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_howto_schema_description_'.$schema_id, 'saswp_array');
228
 
229
- if(!(empty($howto_image))){
230
-
231
- $input1['image']['@type'] = 'ImageObject';
232
- $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
233
- $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
234
- $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
235
-
236
- }
237
 
238
  if(saswp_remove_warnings($all_post_meta, 'saswp_howto_ec_schema_currency_'.$schema_id, 'saswp_array') !='' && saswp_remove_warnings($all_post_meta, 'saswp_howto_ec_schema_value_'.$schema_id, 'saswp_array') !='')
239
  {
@@ -354,22 +349,16 @@ function saswp_howto_schema_markup($schema_id, $schema_post_id, $all_post_meta){
354
  function saswp_event_schema_markup($schema_id, $schema_post_id, $all_post_meta){
355
 
356
  $input1 = array();
357
-
358
- $event_image = get_post_meta( get_the_ID(), 'saswp_event_schema_image_'.$schema_id.'_detail',true);
359
-
360
  $input1 = array(
361
  '@context' => saswp_context_url(),
362
  '@type' => (isset($all_post_meta['saswp_event_schema_type_'.$schema_id][0]) && $all_post_meta['saswp_event_schema_type_'.$schema_id][0] !='') ? $all_post_meta['saswp_event_schema_type_'.$schema_id][0] : 'Event' ,
363
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_name_'.$schema_id, 'saswp_array'),
364
- 'description' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_description_'.$schema_id, 'saswp_array'),
365
- 'image' => array(
366
- '@type' =>'ImageObject',
367
- 'url' => isset($event_image['thumbnail']) ? esc_url($event_image['thumbnail']):'' ,
368
- 'width' => isset($event_image['width']) ? esc_attr($event_image['width']) :'' ,
369
- 'height' => isset($event_image['height']) ? esc_attr($event_image['height']) :'' ,
370
- )
371
  );
372
 
 
 
373
 
374
  if(isset($all_post_meta['saswp_event_schema_high_price_'.$schema_id][0]) && isset($all_post_meta['saswp_event_schema_low_price_'.$schema_id][0])){
375
 
@@ -617,17 +606,8 @@ function saswp_mobile_app_schema_markup($schema_id, $schema_post_id, $all_post_m
617
  'dateModified' => isset($all_post_meta['saswp_mobile_app_schema_date_modified_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_mobile_app_schema_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')) : '',
618
 
619
  );
620
-
621
- $soft_image = get_post_meta( get_the_ID(), 'saswp_mobile_app_schema_image_'.$schema_id.'_detail',true);
622
-
623
- if(!(empty($soft_image))){
624
-
625
- $input1['image']['@type'] = 'ImageObject';
626
- $input1['image']['url'] = isset($soft_image['thumbnail']) ? esc_url($soft_image['thumbnail']):'';
627
- $input1['image']['height'] = isset($soft_image['width']) ? esc_attr($soft_image['width']) :'';
628
- $input1['image']['width'] = isset($soft_image['height']) ? esc_attr($soft_image['height']) :'';
629
-
630
- }
631
 
632
  if(saswp_remove_warnings($all_post_meta, 'saswp_mobile_app_schema_enable_rating_'.$schema_id, 'saswp_array') == 1){
633
 
@@ -663,17 +643,8 @@ function saswp_software_app_schema_markup($schema_id, $schema_post_id, $all_post
663
  'dateModified' => isset($all_post_meta['saswp_software_schema_date_modified_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_software_schema_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')) : '',
664
 
665
  );
666
-
667
- $soft_image = get_post_meta( get_the_ID(), 'saswp_software_schema_image_'.$schema_id.'_detail',true);
668
-
669
- if(!(empty($soft_image))){
670
-
671
- $input1['image']['@type'] = 'ImageObject';
672
- $input1['image']['url'] = isset($soft_image['thumbnail']) ? esc_url($soft_image['thumbnail']):'';
673
- $input1['image']['height'] = isset($soft_image['width']) ? esc_attr($soft_image['width']) :'';
674
- $input1['image']['width'] = isset($soft_image['height']) ? esc_attr($soft_image['height']) :'';
675
-
676
- }
677
 
678
  if(saswp_remove_warnings($all_post_meta, 'saswp_software_schema_enable_rating_'.$schema_id, 'saswp_array') == 1){
679
 
@@ -693,8 +664,7 @@ function saswp_recipe_schema_markup($schema_id, $schema_post_id, $all_post_meta)
693
 
694
  $input1 = array();
695
 
696
- $recipe_logo = get_post_meta( get_the_ID(), 'saswp_recipe_organization_logo_'.$schema_id.'_detail',true);
697
- $recipe_image = get_post_meta( get_the_ID(), 'saswp_recipe_image_'.$schema_id.'_detail',true);
698
  $recipe_author_image = get_post_meta( get_the_ID(), 'saswp_recipe_author_image_'.$schema_id.'_detail',true);
699
 
700
  $step = get_post_meta($schema_post_id, 'recipe_instructions_'.$schema_id, true);
@@ -720,18 +690,13 @@ function saswp_recipe_schema_markup($schema_id, $schema_post_id, $all_post_meta)
720
  }
721
  }
722
 
 
723
  $input1 = array(
724
  '@context' => saswp_context_url(),
725
  '@type' => 'Recipe' ,
726
  '@id' => trailingslashit(get_permalink()).'#recipe',
727
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_url_'.$schema_id, 'saswp_array'),
728
- 'name' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_name_'.$schema_id, 'saswp_array'),
729
- 'image' => array(
730
- '@type' => 'ImageObject',
731
- 'url' => saswp_remove_warnings( $recipe_image, 'thumbnail', 'saswp_string'),
732
- 'width' => saswp_remove_warnings( $recipe_image, 'width', 'saswp_string'),
733
- 'height' => saswp_remove_warnings( $recipe_image , 'height', 'saswp_string'),
734
- ),
735
  'prepTime' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_preptime_'.$schema_id, 'saswp_array'),
736
  'cookTime' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_cooktime_'.$schema_id, 'saswp_array'),
737
  'totalTime' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_totaltime_'.$schema_id, 'saswp_array'),
@@ -762,6 +727,8 @@ function saswp_recipe_schema_markup($schema_id, $schema_post_id, $all_post_meta)
762
 
763
  );
764
 
 
 
765
  //Recipe instruction improved version
766
 
767
  $step_arr = array();
@@ -889,9 +856,7 @@ function saswp_recipe_schema_markup($schema_id, $schema_post_id, $all_post_meta)
889
  function saswp_product_schema_markup($schema_id, $schema_post_id, $all_post_meta){
890
 
891
  $input1 = array();
892
-
893
- $product_image = get_post_meta( get_the_ID(), 'saswp_product_schema_image_'.$schema_id.'_detail',true);
894
-
895
  $input1 = array(
896
  '@context' => saswp_context_url(),
897
  '@type' => 'Product',
@@ -905,14 +870,7 @@ function saswp_product_schema_markup($schema_id, $schema_post_id, $all_post_meta
905
  )
906
  );
907
 
908
- if(isset($product_image['thumbnail']) && $product_image['thumbnail']){
909
-
910
- $input1['image']['@type'] = 'ImageObject';
911
- $input1['image']['url'] = $product_image['thumbnail'];
912
- $input1['image']['width'] = $product_image['width'];
913
- $input1['image']['height'] = $product_image['height'];
914
-
915
- }
916
 
917
  if( (isset($all_post_meta['saswp_product_schema_price_'.$schema_id][0]) && $all_post_meta['saswp_product_schema_price_'.$schema_id][0]) || (isset($all_post_meta['saswp_product_schema_high_price_'.$schema_id][0]) && isset($all_post_meta['saswp_product_schema_low_price_'.$schema_id][0]) ) ){
918
 
@@ -1075,9 +1033,7 @@ function saswp_rent_action_schema_markup($schema_id, $schema_post_id, $all_post_
1075
  }
1076
 
1077
  function saswp_real_estate_listing_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1078
-
1079
- $product_image = get_post_meta( get_the_ID(), 'saswp_real_estate_listing_image_'.$schema_id.'_detail',true);
1080
-
1081
  $input1 = array(
1082
  '@context' => saswp_context_url(),
1083
  '@type' => 'RealEstateListing',
@@ -1089,14 +1045,7 @@ function saswp_real_estate_listing_schema_markup($schema_id, $schema_post_id, $a
1089
 
1090
  $input1['datePosted'] = isset($all_post_meta['saswp_real_estate_listing_date_posted_'.$schema_id][0])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_real_estate_listing_date_posted_'.$schema_id][0])):'';
1091
 
1092
- if(isset($product_image['thumbnail']) && $product_image['thumbnail']){
1093
-
1094
- $input1['image']['@type'] = 'ImageObject';
1095
- $input1['image']['url'] = $product_image['thumbnail'];
1096
- $input1['image']['width'] = $product_image['width'];
1097
- $input1['image']['height'] = $product_image['height'];
1098
-
1099
- }
1100
 
1101
  if(isset($all_post_meta['saswp_real_estate_listing_price_'.$schema_id][0]) && $all_post_meta['saswp_real_estate_listing_price_'.$schema_id][0]){
1102
 
@@ -1133,10 +1082,8 @@ function saswp_real_estate_listing_schema_markup($schema_id, $schema_post_id, $a
1133
  }
1134
 
1135
  function saswp_psychological_treatment_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1136
-
1137
- $product_image = get_post_meta( get_the_ID(), 'saswp_psychological_treatment_image_'.$schema_id.'_detail',true);
1138
-
1139
- $input1 = array(
1140
  '@context' => saswp_context_url(),
1141
  '@type' => 'PsychologicalTreatment',
1142
  '@id' => trailingslashit(get_permalink()).'#PsychologicalTreatment',
@@ -1144,15 +1091,9 @@ function saswp_psychological_treatment_schema_markup($schema_id, $schema_post_id
1144
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_psychological_treatment_name_'.$schema_id, 'saswp_array'),
1145
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_psychological_treatment_description_'.$schema_id, 'saswp_array'),
1146
  );
1147
-
1148
- if(isset($product_image['thumbnail']) && $product_image['thumbnail']){
1149
-
1150
- $input1['image']['@type'] = 'ImageObject';
1151
- $input1['image']['url'] = $product_image['thumbnail'];
1152
- $input1['image']['width'] = $product_image['width'];
1153
- $input1['image']['height'] = $product_image['height'];
1154
-
1155
- }
1156
  if(isset($all_post_meta['saswp_psychological_treatment_drug_'.$schema_id][0])){
1157
  $input1['drug'] = $all_post_meta['saswp_psychological_treatment_drug_'.$schema_id][0];
1158
  }
@@ -1219,22 +1160,14 @@ function saswp_local_business_schema_markup($schema_id, $schema_post_id, $all_po
1219
  $local_business = 'LocalBusiness';
1220
 
1221
  }
1222
-
1223
- $local_image = get_post_meta( $schema_post_id, 'local_business_logo_'.$schema_id.'_detail',true);
1224
-
1225
  $input1 = array(
1226
  '@context' => saswp_context_url(),
1227
  '@type' => $local_business ,
1228
  '@id' => ((isset($all_post_meta['local_business_id_'.$schema_id][0]) && $all_post_meta['local_business_id_'.$schema_id][0] !='') ? $all_post_meta['local_business_id_'.$schema_id][0] : trailingslashit(get_permalink()).'#'.strtolower($local_business)),
1229
  'name' => saswp_remove_warnings($all_post_meta, 'local_business_name_'.$schema_id, 'saswp_array'),
1230
  'url' => saswp_remove_warnings($all_post_meta, 'local_business_name_url_'.$schema_id, 'saswp_array'),
1231
- 'description' => saswp_remove_warnings($all_post_meta, 'local_business_description_'.$schema_id, 'saswp_array'),
1232
- 'image' => array(
1233
- '@type' => 'ImageObject',
1234
- 'url' => saswp_remove_warnings($local_image, 'thumbnail', 'saswp_string'),
1235
- 'width' => saswp_remove_warnings($local_image, 'width', 'saswp_string'),
1236
- 'height' => saswp_remove_warnings($local_image, 'height', 'saswp_string'),
1237
- ),
1238
  'address' => array(
1239
  "@type" => "PostalAddress",
1240
  "streetAddress" => saswp_remove_warnings($all_post_meta, 'local_street_address_'.$schema_id, 'saswp_array'),
@@ -1245,6 +1178,8 @@ function saswp_local_business_schema_markup($schema_id, $schema_post_id, $all_po
1245
  'telephone' => saswp_remove_warnings($all_post_meta, 'local_phone_'.$schema_id, 'saswp_array'),
1246
  'openingHours' => $operation_days,
1247
  );
 
 
1248
 
1249
  if(isset($all_post_meta['local_additional_type_'.$schema_id][0])){
1250
  $input1['additionalType'] = $all_post_meta['local_additional_type_'.$schema_id][0];
@@ -1583,9 +1518,7 @@ function saswp_educational_occupational_credential_schema_markup($schema_id, $sc
1583
  function saswp_video_game_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1584
 
1585
  $input1 = array();
1586
-
1587
- $howto_image = get_post_meta( get_the_ID(), 'saswp_vg_schema_image_'.$schema_id.'_detail',true);
1588
-
1589
  $input1['@context'] = saswp_context_url();
1590
  $input1['@type'] = 'VideoGame';
1591
  $input1['@id'] = trailingslashit(get_permalink()).'#VideoGame';
@@ -1593,15 +1526,8 @@ function saswp_video_game_schema_markup($schema_id, $schema_post_id, $all_post_m
1593
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_url_'.$schema_id, 'saswp_array');
1594
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_description_'.$schema_id, 'saswp_array');
1595
 
1596
- if(!(empty($howto_image))){
1597
-
1598
- $input1['image']['@type'] = 'ImageObject';
1599
- $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
1600
- $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
1601
- $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
1602
-
1603
- }
1604
-
1605
  $input1['operatingSystem'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_operating_system_'.$schema_id, 'saswp_array');
1606
  $input1['applicationCategory'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_application_category_'.$schema_id, 'saswp_array');
1607
 
@@ -1699,17 +1625,8 @@ function saswp_music_composition_schema_markup($schema_id, $schema_post_id, $all
1699
  $input1['publisher']['@type'] = 'Organization';
1700
  $input1['publisher']['name'] = $all_post_meta['saswp_music_composition_publisher_'.$schema_id][0];
1701
  }
1702
-
1703
- $image = get_post_meta( get_the_ID(), 'saswp_music_composition_image_'.$schema_id.'_detail',true);
1704
-
1705
- if(!(empty($image))){
1706
-
1707
- $input1['image']['@type'] = 'ImageObject';
1708
- $input1['image']['url'] = isset($image['thumbnail']) ? esc_url($image['thumbnail']):'';
1709
- $input1['image']['height'] = isset($image['width']) ? esc_attr($image['width']) :'';
1710
- $input1['image']['width'] = isset($image['height']) ? esc_attr($image['height']) :'';
1711
-
1712
- }
1713
 
1714
  $faq_question = get_post_meta($schema_post_id, 'music_composer_'.$schema_id, true);
1715
 
@@ -1735,9 +1652,7 @@ function saswp_music_composition_schema_markup($schema_id, $schema_post_id, $all
1735
  function saswp_person_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1736
 
1737
  $input1 = array();
1738
-
1739
- $image = get_post_meta( get_the_ID(), 'saswp_trip_schema_image_'.$schema_id.'_detail',true);
1740
-
1741
  $input1['@context'] = saswp_context_url();
1742
  $input1['@type'] = 'Person';
1743
 
@@ -1773,14 +1688,7 @@ function saswp_person_schema_markup($schema_id, $schema_post_id, $all_post_meta)
1773
  $input1['telephone'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_telephone_'.$schema_id, 'saswp_array');
1774
  $input1['email'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_email_'.$schema_id, 'saswp_array');
1775
 
1776
- if(!(empty($image))){
1777
-
1778
- $input1['image']['@type'] = 'ImageObject';
1779
- $input1['image']['url'] = isset($image['thumbnail']) ? esc_url($image['thumbnail']):'';
1780
- $input1['image']['height'] = isset($image['width']) ? esc_attr($image['width']) :'';
1781
- $input1['image']['width'] = isset($image['height']) ? esc_attr($image['height']) :'';
1782
-
1783
- }
1784
 
1785
  if(isset($all_post_meta['saswp_person_schema_award_'.$schema_id][0])){
1786
  $input1['award'] = $all_post_meta['saswp_person_schema_award_'.$schema_id][0];
@@ -1858,9 +1766,7 @@ function saswp_person_schema_markup($schema_id, $schema_post_id, $all_post_meta)
1858
  function saswp_trip_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1859
 
1860
  $input1 = array();
1861
-
1862
- $howto_image = get_post_meta( get_the_ID(), 'saswp_trip_schema_image_'.$schema_id.'_detail',true);
1863
-
1864
  $input1['@context'] = saswp_context_url();
1865
  $input1['@type'] = 'Trip';
1866
  $input1['@id'] = trailingslashit(get_permalink()).'#Trip';
@@ -1868,14 +1774,7 @@ function saswp_trip_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1868
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_trip_schema_name_'.$schema_id, 'saswp_array');
1869
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_trip_schema_description_'.$schema_id, 'saswp_array');
1870
 
1871
- if(!(empty($howto_image))){
1872
-
1873
- $input1['image']['@type'] = 'ImageObject';
1874
- $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
1875
- $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
1876
- $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
1877
-
1878
- }
1879
 
1880
  $itinerary = get_post_meta($schema_post_id, 'trip_itinerary_'.$schema_id, true);
1881
 
@@ -1904,9 +1803,7 @@ function saswp_trip_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1904
  function saswp_boat_trip_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1905
 
1906
  $input1 = array();
1907
-
1908
- $howto_image = get_post_meta( get_the_ID(), 'saswp_boat_trip_schema_image_'.$schema_id.'_detail',true);
1909
-
1910
  $input1['@context'] = saswp_context_url();
1911
  $input1['@type'] = 'BoatTrip';
1912
  $input1['@id'] = trailingslashit(get_permalink()).'#BoatTrip';
@@ -1914,14 +1811,7 @@ function saswp_boat_trip_schema_markup($schema_id, $schema_post_id, $all_post_me
1914
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_boat_trip_schema_name_'.$schema_id, 'saswp_array');
1915
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_boat_trip_schema_description_'.$schema_id, 'saswp_array');
1916
 
1917
- if(!(empty($howto_image))){
1918
-
1919
- $input1['image']['@type'] = 'ImageObject';
1920
- $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
1921
- $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
1922
- $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
1923
-
1924
- }
1925
 
1926
  $itinerary = get_post_meta($schema_post_id, 'boat_trip_itinerary_'.$schema_id, true);
1927
 
@@ -2086,17 +1976,8 @@ function saswp_music_album_schema_markup($schema_id, $schema_post_id, $all_post_
2086
  $input1['byArtist']['name'] = $all_post_meta['saswp_music_album_artist_'.$schema_id][0];
2087
 
2088
  }
2089
-
2090
- $howto_image = get_post_meta( get_the_ID(), 'saswp_music_album_image_'.$schema_id.'_detail',true);
2091
-
2092
- if(!(empty($howto_image))){
2093
-
2094
- $input1['image']['@type'] = 'ImageObject';
2095
- $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
2096
- $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
2097
- $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
2098
-
2099
- }
2100
 
2101
  $faq_question = get_post_meta($schema_post_id, 'music_album_track_'.$schema_id, true);
2102
 
@@ -2191,9 +2072,7 @@ function saswp_job_posting_schema_markup($schema_id, $schema_post_id, $all_post_
2191
  function saswp_mosque_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2192
 
2193
  $input1 = array();
2194
-
2195
- $howto_image = get_post_meta( get_the_ID(), 'saswp_mosque_schema_image_'.$schema_id.'_detail',true);
2196
-
2197
  $input1['@context'] = saswp_context_url();
2198
  $input1['@type'] = 'Mosque';
2199
  $input1['@id'] = trailingslashit(get_permalink()).'#Mosque';
@@ -2201,14 +2080,7 @@ function saswp_mosque_schema_markup($schema_id, $schema_post_id, $all_post_meta)
2201
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_mosque_schema_name_'.$schema_id, 'saswp_array');
2202
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_mosque_schema_description_'.$schema_id, 'saswp_array');
2203
 
2204
- if(!(empty($howto_image))){
2205
-
2206
- $input1['image']['@type'] = 'ImageObject';
2207
- $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
2208
- $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
2209
- $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
2210
-
2211
- }
2212
 
2213
  $input1['isAccessibleForFree'] = saswp_remove_warnings($all_post_meta, 'saswp_mosque_schema_is_accesible_free_'.$schema_id, 'saswp_array');
2214
  $input1['maximumAttendeeCapacity'] = saswp_remove_warnings($all_post_meta, 'saswp_mosque_schema_maximum_a_capacity_'.$schema_id, 'saswp_array');
@@ -2227,9 +2099,7 @@ function saswp_mosque_schema_markup($schema_id, $schema_post_id, $all_post_meta)
2227
  function saswp_church_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2228
 
2229
  $input1 = array();
2230
-
2231
- $howto_image = get_post_meta( get_the_ID(), 'saswp_church_schema_image_'.$schema_id.'_detail',true);
2232
-
2233
  $input1['@context'] = saswp_context_url();
2234
  $input1['@type'] = 'Church';
2235
  $input1['@id'] = trailingslashit(get_permalink()).'#Church';
@@ -2237,14 +2107,7 @@ function saswp_church_schema_markup($schema_id, $schema_post_id, $all_post_meta)
2237
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_church_schema_name_'.$schema_id, 'saswp_array');
2238
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_church_schema_description_'.$schema_id, 'saswp_array');
2239
 
2240
- if(!(empty($howto_image))){
2241
-
2242
- $input1['image']['@type'] = 'ImageObject';
2243
- $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
2244
- $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
2245
- $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
2246
-
2247
- }
2248
 
2249
  $input1['isAccessibleForFree'] = saswp_remove_warnings($all_post_meta, 'saswp_church_schema_is_acceesible_free_'.$schema_id, 'saswp_array');
2250
  $input1['maximumAttendeeCapacity'] = saswp_remove_warnings($all_post_meta, 'saswp_church_schema_maximum_a_capacity_'.$schema_id, 'saswp_array');
@@ -2263,9 +2126,7 @@ function saswp_church_schema_markup($schema_id, $schema_post_id, $all_post_meta)
2263
  function saswp_buddhist_temple_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2264
 
2265
  $input1 = array();
2266
-
2267
- $howto_image = get_post_meta( get_the_ID(), 'saswp_buddhisttemple_schema_image_'.$schema_id.'_detail',true);
2268
-
2269
  $input1['@context'] = saswp_context_url();
2270
  $input1['@type'] = 'BuddhistTemple';
2271
  $input1['@id'] = trailingslashit(get_permalink()).'#BuddhistTemple';
@@ -2273,14 +2134,7 @@ function saswp_buddhist_temple_schema_markup($schema_id, $schema_post_id, $all_p
2273
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_buddhisttemple_schema_name_'.$schema_id, 'saswp_array');
2274
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_buddhisttemple_schema_description_'.$schema_id, 'saswp_array');
2275
 
2276
- if(!(empty($howto_image))){
2277
-
2278
- $input1['image']['@type'] = 'ImageObject';
2279
- $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
2280
- $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
2281
- $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
2282
-
2283
- }
2284
 
2285
  $input1['isAccessibleForFree'] = saswp_remove_warnings($all_post_meta, 'saswp_buddhisttemple_schema_is_accesible_free_'.$schema_id, 'saswp_array');
2286
  $input1['maximumAttendeeCapacity'] = saswp_remove_warnings($all_post_meta, 'saswp_buddhisttemple_schema_maximum_a_capacity_'.$schema_id, 'saswp_array');
@@ -2299,9 +2153,7 @@ function saswp_buddhist_temple_schema_markup($schema_id, $schema_post_id, $all_p
2299
  function saswp_hindu_temple_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2300
 
2301
  $input1 = array();
2302
-
2303
- $howto_image = get_post_meta( get_the_ID(), 'saswp_hindutemple_schema_image_'.$schema_id.'_detail',true);
2304
-
2305
  $input1['@context'] = saswp_context_url();
2306
  $input1['@type'] = 'HinduTemple';
2307
  $input1['@id'] = trailingslashit(get_permalink()).'#HinduTemple';
@@ -2309,15 +2161,8 @@ function saswp_hindu_temple_schema_markup($schema_id, $schema_post_id, $all_post
2309
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_name_'.$schema_id, 'saswp_array');
2310
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_description_'.$schema_id, 'saswp_array');
2311
 
2312
- if(!(empty($howto_image))){
2313
-
2314
- $input1['image']['@type'] = 'ImageObject';
2315
- $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
2316
- $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
2317
- $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
2318
-
2319
- }
2320
-
2321
  $input1['isAccessibleForFree'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_is_accesible_free_'.$schema_id, 'saswp_array');
2322
  $input1['maximumAttendeeCapacity'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_maximum_a_capacity_'.$schema_id, 'saswp_array');
2323
  $input1['hasMap'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_hasmap_'.$schema_id, 'saswp_array');
@@ -2335,9 +2180,7 @@ function saswp_hindu_temple_schema_markup($schema_id, $schema_post_id, $all_post
2335
  function saswp_lorh_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2336
 
2337
  $input1 = array();
2338
-
2339
- $howto_image = get_post_meta( get_the_ID(), 'saswp_lorh_schema_image_'.$schema_id.'_detail',true);
2340
-
2341
  $input1['@context'] = saswp_context_url();
2342
  $input1['@type'] = 'LandmarksOrHistoricalBuildings';
2343
  $input1['@id'] = trailingslashit(get_permalink()).'#LandmarksOrHistoricalBuildings';
@@ -2345,14 +2188,7 @@ function saswp_lorh_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2345
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_lorh_schema_name_'.$schema_id, 'saswp_array');
2346
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_lorh_schema_description_'.$schema_id, 'saswp_array');
2347
 
2348
- if(!(empty($howto_image))){
2349
-
2350
- $input1['image']['@type'] = 'ImageObject';
2351
- $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
2352
- $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
2353
- $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
2354
-
2355
- }
2356
 
2357
  $input1['hasMap'] = saswp_remove_warnings($all_post_meta, 'saswp_lorh_schema_hasmap_'.$schema_id, 'saswp_array');
2358
  $input1['isAccessibleForFree'] = saswp_remove_warnings($all_post_meta, 'saswp_lorh_schema_is_acceesible_free_'.$schema_id, 'saswp_array');
@@ -2378,9 +2214,7 @@ function saswp_lorh_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2378
  function saswp_tourist_attraction_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2379
 
2380
  $input1 = array();
2381
-
2382
- $howto_image = get_post_meta( get_the_ID(), 'saswp_ta_schema_image_'.$schema_id.'_detail',true);
2383
-
2384
  $input1['@context'] = saswp_context_url();
2385
  $input1['@type'] = 'TouristAttraction';
2386
  $input1['@id'] = trailingslashit(get_permalink()).'#TouristAttraction';
@@ -2388,14 +2222,7 @@ function saswp_tourist_attraction_schema_markup($schema_id, $schema_post_id, $al
2388
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_name_'.$schema_id, 'saswp_array');
2389
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_description_'.$schema_id, 'saswp_array');
2390
 
2391
- if(!(empty($howto_image))){
2392
-
2393
- $input1['image']['@type'] = 'ImageObject';
2394
- $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
2395
- $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
2396
- $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
2397
-
2398
- }
2399
 
2400
  $input1['isAccessibleForFree'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_is_acceesible_free_'.$schema_id, 'saswp_array');
2401
 
@@ -2420,9 +2247,7 @@ function saswp_tourist_attraction_schema_markup($schema_id, $schema_post_id, $al
2420
  function saswp_tourist_destination_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2421
 
2422
  $input1 = array();
2423
-
2424
- $howto_image = get_post_meta( get_the_ID(), 'saswp_td_schema_image_'.$schema_id.'_detail',true);
2425
-
2426
  $input1['@context'] = saswp_context_url();
2427
  $input1['@type'] = 'TouristDestination';
2428
  $input1['@id'] = trailingslashit(get_permalink()).'#TouristDestination';
@@ -2430,14 +2255,7 @@ function saswp_tourist_destination_schema_markup($schema_id, $schema_post_id, $a
2430
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_td_schema_name_'.$schema_id, 'saswp_array');
2431
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_td_schema_description_'.$schema_id, 'saswp_array');
2432
 
2433
- if(!(empty($howto_image))){
2434
-
2435
- $input1['image']['@type'] = 'ImageObject';
2436
- $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
2437
- $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
2438
- $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
2439
-
2440
- }
2441
 
2442
 
2443
  $input1['address']['@type'] = 'PostalAddress';
@@ -2459,9 +2277,7 @@ function saswp_tourist_destination_schema_markup($schema_id, $schema_post_id, $a
2459
  function saswp_apartment_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2460
 
2461
  $input1 = array();
2462
-
2463
- $howto_image = get_post_meta( get_the_ID(), 'saswp_apartment_schema_image_'.$schema_id.'_detail',true);
2464
-
2465
  $input1['@context'] = saswp_context_url();
2466
  $input1['@type'] = 'Apartment';
2467
  $input1['@id'] = trailingslashit(get_permalink()).'#Apartment';
@@ -2470,15 +2286,8 @@ function saswp_apartment_schema_markup($schema_id, $schema_post_id, $all_post_me
2470
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_schema_description_'.$schema_id, 'saswp_array');
2471
  $input1['floorSize'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_schema_floor_size_'.$schema_id, 'saswp_array');
2472
 
2473
- if(!(empty($howto_image))){
2474
-
2475
- $input1['image']['@type'] = 'ImageObject';
2476
- $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
2477
- $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
2478
- $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
2479
-
2480
- }
2481
-
2482
  $input1['numberOfRooms'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_schema_numberofrooms_'.$schema_id, 'saswp_array');
2483
 
2484
  $input1['address']['@type'] = 'PostalAddress';
@@ -2542,9 +2351,7 @@ function saswp_apartment_schema_markup($schema_id, $schema_post_id, $all_post_me
2542
  function saswp_apartment_complex_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2543
 
2544
  $input1 = array();
2545
-
2546
- $howto_image = get_post_meta( get_the_ID(), 'saswp_apartment_complex_image_'.$schema_id.'_detail',true);
2547
-
2548
  $input1['@context'] = saswp_context_url();
2549
  $input1['@type'] = 'ApartmentComplex';
2550
  $input1['@id'] = trailingslashit(get_permalink()).'#ApartmentComplex';
@@ -2552,14 +2359,7 @@ function saswp_apartment_complex_schema_markup($schema_id, $schema_post_id, $all
2552
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_complex_name_'.$schema_id, 'saswp_array');
2553
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_complex_description_'.$schema_id, 'saswp_array');
2554
 
2555
- if(!(empty($howto_image))){
2556
-
2557
- $input1['image']['@type'] = 'ImageObject';
2558
- $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
2559
- $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
2560
- $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
2561
-
2562
- }
2563
 
2564
  $input1['numberOfBedrooms'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_complex_no_of_bedrooms_'.$schema_id, 'saswp_array');
2565
  $input1['petsAllowed'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_complex_pets_allowed_'.$schema_id, 'saswp_array');
@@ -2579,9 +2379,7 @@ function saswp_apartment_complex_schema_markup($schema_id, $schema_post_id, $all
2579
  function saswp_house_schema_makrup($schema_id, $schema_post_id, $all_post_meta){
2580
 
2581
  $input1 = array();
2582
-
2583
- $howto_image = get_post_meta( get_the_ID(), 'saswp_house_schema_image_'.$schema_id.'_detail',true);
2584
-
2585
  $input1['@context'] = saswp_context_url();
2586
  $input1['@type'] = 'House';
2587
  $input1['@id'] = trailingslashit(get_permalink()).'#House';
@@ -2589,14 +2387,7 @@ function saswp_house_schema_makrup($schema_id, $schema_post_id, $all_post_meta){
2589
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_house_schema_name_'.$schema_id, 'saswp_array');
2590
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_house_schema_description_'.$schema_id, 'saswp_array');
2591
 
2592
- if(!(empty($howto_image))){
2593
-
2594
- $input1['image']['@type'] = 'ImageObject';
2595
- $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
2596
- $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
2597
- $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
2598
-
2599
- }
2600
 
2601
  $input1['petsAllowed'] = saswp_remove_warnings($all_post_meta, 'saswp_house_schema_pets_allowed_'.$schema_id, 'saswp_array');
2602
 
@@ -2619,24 +2410,14 @@ function saswp_house_schema_makrup($schema_id, $schema_post_id, $all_post_meta){
2619
  function saswp_single_family_residence_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2620
 
2621
  $input1 = array();
2622
-
2623
- $howto_image = get_post_meta( get_the_ID(), 'saswp_sfr_schema_image_'.$schema_id.'_detail',true);
2624
-
2625
  $input1['@context'] = saswp_context_url();
2626
  $input1['@type'] = 'SingleFamilyResidence';
2627
  $input1['@id'] = trailingslashit(get_permalink()).'#SingleFamilyResidence';
2628
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_url_'.$schema_id, 'saswp_array');
2629
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_name_'.$schema_id, 'saswp_array');
2630
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_description_'.$schema_id, 'saswp_array');
2631
-
2632
- if(!(empty($howto_image))){
2633
-
2634
- $input1['image']['@type'] = 'ImageObject';
2635
- $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
2636
- $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
2637
- $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
2638
-
2639
- }
2640
  $input1['numberOfRooms'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_numberofrooms_'.$schema_id, 'saswp_array');
2641
  $input1['petsAllowed'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_pets_allowed_'.$schema_id, 'saswp_array');
2642
 
@@ -2658,9 +2439,7 @@ function saswp_single_family_residence_schema_markup($schema_id, $schema_post_id
2658
  function saswp_tv_series_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2659
 
2660
  $input1 = array();
2661
-
2662
- $howto_image = get_post_meta( get_the_ID(), 'saswp_tvseries_schema_image_'.$schema_id.'_detail',true);
2663
-
2664
  $actor = get_post_meta($schema_post_id, 'tvseries_actor_'.$schema_id, true);
2665
  $season = get_post_meta($schema_post_id, 'tvseries_season_'.$schema_id, true);
2666
 
@@ -2670,14 +2449,7 @@ function saswp_tv_series_schema_markup($schema_id, $schema_post_id, $all_post_me
2670
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_tvseries_schema_name_'.$schema_id, 'saswp_array');
2671
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_tvseries_schema_description_'.$schema_id, 'saswp_array');
2672
 
2673
- if(!(empty($howto_image))){
2674
-
2675
- $input1['image']['@type'] = 'ImageObject';
2676
- $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
2677
- $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
2678
- $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
2679
-
2680
- }
2681
 
2682
  $input1['author']['@type'] = 'Person';
2683
 
@@ -2724,9 +2496,7 @@ function saswp_tv_series_schema_markup($schema_id, $schema_post_id, $all_post_me
2724
  function saswp_medical_condition_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2725
 
2726
  $input1 = array();
2727
-
2728
- $howto_image = get_post_meta( get_the_ID(), 'saswp_mc_schema_image_'.$schema_id.'_detail',true);
2729
-
2730
  $cause = get_post_meta($schema_post_id, 'mc_cause_'.$schema_id, true);
2731
  $symptom = get_post_meta($schema_post_id, 'mc_symptom_'.$schema_id, true);
2732
  $riskfactro = get_post_meta($schema_post_id, 'mc_risk_factor_'.$schema_id, true);
@@ -2738,14 +2508,7 @@ function saswp_medical_condition_schema_markup($schema_id, $schema_post_id, $all
2738
  $input1['alternateName'] = saswp_remove_warnings($all_post_meta, 'saswp_mc_schema_alternate_name_'.$schema_id, 'saswp_array');
2739
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_mc_schema_description_'.$schema_id, 'saswp_array');
2740
 
2741
- if(!(empty($howto_image))){
2742
-
2743
- $input1['image']['@type'] = 'ImageObject';
2744
- $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
2745
- $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
2746
- $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
2747
-
2748
- }
2749
 
2750
  if( isset($all_post_meta['saswp_mc_schema_drug_'.$schema_id][0]) ){
2751
  $input1['drug'] = $all_post_meta['saswp_mc_schema_drug_'.$schema_id][0];
@@ -2949,8 +2712,7 @@ function saswp_data_feed_schema_markup($schema_id, $schema_post_id, $all_post_me
2949
  function saswp_dfp_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2950
 
2951
  $input1 = array();
2952
-
2953
- $event_image = get_post_meta( get_the_ID(), 'saswp_dfp_image_'.$schema_id.'_detail',true);
2954
  $slogo = get_post_meta( get_the_ID(), 'saswp_dfp_organization_logo_'.$schema_id.'_detail',true);
2955
  $input1 = array(
2956
  '@context' => saswp_context_url(),
@@ -2959,13 +2721,7 @@ function saswp_dfp_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2959
  'mainEntityOfPage' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_main_entity_of_page_'.$schema_id, 'saswp_array'),
2960
  'headline' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_headline_'.$schema_id, 'saswp_array'),
2961
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_description_'.$schema_id, 'saswp_array'),
2962
- 'url' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_url_'.$schema_id, 'saswp_array'),
2963
- 'image' => array(
2964
- '@type' =>'ImageObject',
2965
- 'url' => isset($event_image['thumbnail']) ? esc_url($event_image['thumbnail']):'' ,
2966
- 'width' => isset($event_image['width']) ? esc_attr($event_image['width']) :'' ,
2967
- 'height' => isset($event_image['height']) ? esc_attr($event_image['height']) :'' ,
2968
- ),
2969
  'datePublished' => isset($all_post_meta['saswp_dfp_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_dfp_date_published_'.$schema_id][0])):'',
2970
  'dateModified' => isset($all_post_meta['saswp_dfp_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_dfp_date_modified_'.$schema_id][0])):'',
2971
  'publisher' => array(
@@ -2979,6 +2735,8 @@ function saswp_dfp_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2979
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_organization_name_'.$schema_id, 'saswp_array'),
2980
  ),
2981
  );
 
 
2982
 
2983
  $input1['author']['@type'] = 'Person';
2984
 
@@ -3074,9 +2832,7 @@ function saswp_blogposting_schema_markup($schema_id, $schema_post_id, $all_post_
3074
  function saswp_vehicle_schema_markup($schema_id, $schema_post_id, $all_post_meta){
3075
 
3076
  $input1 = array();
3077
-
3078
- $car_image = get_post_meta( get_the_ID(), 'saswp_vehicle_schema_image_'.$schema_id.'_detail',true);
3079
-
3080
  $input1 = array(
3081
  '@context' => saswp_context_url(),
3082
  '@type' => ['Product','Vehicle'],
@@ -3084,19 +2840,12 @@ function saswp_vehicle_schema_markup($schema_id, $schema_post_id, $all_post_meta
3084
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_vehicle_schema_name_'.$schema_id, 'saswp_array'),
3085
  'sku' => saswp_remove_warnings($all_post_meta, 'saswp_vehicle_schema_sku_'.$schema_id, 'saswp_array'),
3086
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_vehicle_schema_description_'.$schema_id, 'saswp_array'),
3087
- 'brand' => array('@type' => 'Thing',
3088
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_vehicle_schema_brand_name_'.$schema_id, 'saswp_array'),
3089
  )
3090
  );
3091
 
3092
- if(isset($car_image['thumbnail']) && $car_image['thumbnail']){
3093
-
3094
- $input1['image']['@type'] = 'ImageObject';
3095
- $input1['image']['url'] = $car_image['thumbnail'];
3096
- $input1['image']['width'] = $car_image['width'];
3097
- $input1['image']['height'] = $car_image['height'];
3098
-
3099
- }
3100
 
3101
  if( (isset($all_post_meta['saswp_vehicle_schema_price_'.$schema_id][0]) && $all_post_meta['saswp_vehicle_schema_price_'.$schema_id][0]) || (isset($all_post_meta['saswp_vehicle_schema_high_price_'.$schema_id][0]) && isset($all_post_meta['saswp_vehicle_schema_low_price_'.$schema_id][0]) ) ){
3102
 
@@ -3240,9 +2989,7 @@ function saswp_vehicle_schema_markup($schema_id, $schema_post_id, $all_post_meta
3240
  function saswp_car_schema_markup($schema_id, $schema_post_id, $all_post_meta){
3241
 
3242
  $input1 = array();
3243
-
3244
- $car_image = get_post_meta( get_the_ID(), 'saswp_car_schema_image_'.$schema_id.'_detail',true);
3245
-
3246
  $input1 = array(
3247
  '@context' => saswp_context_url(),
3248
  '@type' => ['Product','Car'],
@@ -3255,14 +3002,7 @@ function saswp_car_schema_markup($schema_id, $schema_post_id, $all_post_meta){
3255
  )
3256
  );
3257
 
3258
- if(isset($car_image['thumbnail']) && $car_image['thumbnail']){
3259
-
3260
- $input1['image']['@type'] = 'ImageObject';
3261
- $input1['image']['url'] = $car_image['thumbnail'];
3262
- $input1['image']['width'] = $car_image['width'];
3263
- $input1['image']['height'] = $car_image['height'];
3264
-
3265
- }
3266
 
3267
  if( (isset($all_post_meta['saswp_car_schema_price_'.$schema_id][0]) && $all_post_meta['saswp_car_schema_price_'.$schema_id][0]) || (isset($all_post_meta['saswp_car_schema_high_price_'.$schema_id][0]) && isset($all_post_meta['saswp_car_schema_low_price_'.$schema_id][0]) ) ){
3268
 
@@ -3961,8 +3701,7 @@ function saswp_audiobook_schema_markup($schema_id, $schema_post_id, $all_post_me
3961
  $input1 = array();
3962
 
3963
  $author_image = get_post_meta( get_the_ID(), 'saswp_audiobook_author_image_'.$schema_id.'_detail',true);
3964
- $image = get_post_meta( get_the_ID(), 'saswp_audiobook_image_'.$schema_id.'_detail',true);
3965
-
3966
  $input1 = array(
3967
  '@context' => saswp_context_url(),
3968
  '@type' => 'Audiobook' ,
@@ -3999,14 +3738,7 @@ function saswp_audiobook_schema_markup($schema_id, $schema_post_id, $all_post_me
3999
  $input1['author']['image']['height'] = $author_image['height'];
4000
  $input1['author']['image']['width'] = $author_image['width'];
4001
 
4002
- if(!(empty($image))){
4003
-
4004
- $input1['image']['@type'] = 'ImageObject';
4005
- $input1['image']['url'] = isset($image['thumbnail']) ? esc_url($image['thumbnail']):'';
4006
- $input1['image']['height'] = isset($image['width']) ? esc_attr($image['width']) :'';
4007
- $input1['image']['width'] = isset($image['height']) ? esc_attr($image['height']) :'';
4008
-
4009
- }
4010
 
4011
  return $input1;
4012
 
@@ -4015,9 +3747,7 @@ function saswp_audiobook_schema_markup($schema_id, $schema_post_id, $all_post_me
4015
  function saswp_podcast_episode_schema_markup($schema_id, $schema_post_id, $all_post_meta){
4016
 
4017
  $input1 = array();
4018
-
4019
- $image = get_post_meta( get_the_ID(), 'saswp_podcast_episode_image_'.$schema_id.'_detail',true);
4020
-
4021
  $input1 = array(
4022
  '@context' => saswp_context_url(),
4023
  '@type' => 'PodcastEpisode' ,
@@ -4046,14 +3776,7 @@ function saswp_podcast_episode_schema_markup($schema_id, $schema_post_id, $all_p
4046
  $input1['partOfSeries']['url'] = $all_post_meta['saswp_podcast_episode_series_url_'.$schema_id][0];
4047
  }
4048
 
4049
- if(!(empty($image))){
4050
-
4051
- $input1['image']['@type'] = 'ImageObject';
4052
- $input1['image']['url'] = isset($image['thumbnail']) ? esc_url($image['thumbnail']):'';
4053
- $input1['image']['height'] = isset($image['width']) ? esc_attr($image['width']) :'';
4054
- $input1['image']['width'] = isset($image['height']) ? esc_attr($image['height']) :'';
4055
-
4056
- }
4057
 
4058
  return $input1;
4059
 
@@ -4063,9 +3786,7 @@ function saswp_podcast_episode_schema_markup($schema_id, $schema_post_id, $all_p
4063
  function saswp_podcast_season_schema_markup($schema_id, $schema_post_id, $all_post_meta){
4064
 
4065
  $input1 = array();
4066
-
4067
- $image = get_post_meta( get_the_ID(), 'saswp_podcast_season_image_'.$schema_id.'_detail',true);
4068
-
4069
  $input1 = array(
4070
  '@context' => saswp_context_url(),
4071
  '@type' => 'PodcastSeason' ,
@@ -4098,14 +3819,7 @@ function saswp_podcast_season_schema_markup($schema_id, $schema_post_id, $all_po
4098
  $input1['partOfSeries']['url'] = $all_post_meta['saswp_podcast_season_series_url_'.$schema_id][0];
4099
  }
4100
 
4101
- if(!(empty($image))){
4102
-
4103
- $input1['image']['@type'] = 'ImageObject';
4104
- $input1['image']['url'] = isset($image['thumbnail']) ? esc_url($image['thumbnail']):'';
4105
- $input1['image']['height'] = isset($image['width']) ? esc_attr($image['width']) :'';
4106
- $input1['image']['width'] = isset($image['height']) ? esc_attr($image['height']) :'';
4107
-
4108
- }
4109
 
4110
  return $input1;
4111
 
84
 
85
  }
86
 
87
+ function saswp_get_modified_image( $key, $input1 ){
88
+
89
+ $image = get_post_meta( get_the_ID(), $key ,true);
90
+
91
+ if( !(empty($image)) && is_array($image) ){
92
+
93
+ if(isset($image['thumbnail']) && $image['thumbnail'] != ''){
94
+
95
+ $input1['image']['@type'] = 'ImageObject';
96
+ $input1['image']['url'] = $image['thumbnail'];
97
+ $input1['image']['height'] = isset($image['width']) ? esc_attr($image['width']) :'';
98
+ $input1['image']['width'] = isset($image['height']) ? esc_attr($image['height']) :'';
99
+
100
+ }
101
+
102
+ }
103
+
104
+ return $input1;
105
+
106
+ }
107
+
108
  function saswp_book_schema_markup($schema_id, $schema_post_id, $all_post_meta){
109
 
110
  $input1 = array();
111
+
 
 
112
  $input1['@context'] = saswp_context_url();
113
  $input1['@type'] = 'Book';
114
  $input1['@id'] = trailingslashit(get_permalink()).'#Book';
116
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_book_name_'.$schema_id, 'saswp_array');
117
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_book_description_'.$schema_id, 'saswp_array');
118
 
119
+ $input1 = saswp_get_modified_image('saswp_book_image_'.$schema_id.'_detail', $input1);
120
+
 
 
 
 
 
 
 
121
  if( isset($all_post_meta['saswp_book_author_'.$schema_id][0]) && !empty($all_post_meta['saswp_book_author_'.$schema_id][0]) ){
122
 
123
  $input1['author']['@type'] = 'Person';
147
  $input1['offers']['price'] = $all_post_meta['saswp_book_price_'.$schema_id];
148
  $input1['offers']['priceCurrency'] = $all_post_meta['saswp_book_price_currency_'.$schema_id];
149
  }
150
+
151
+ if(saswp_isset($all_post_meta['saswp_book_enable_rating_'.$schema_id][0]) && saswp_isset($all_post_meta['saswp_book_rating_value_'.$schema_id][0]) && saswp_isset($all_post_meta['saswp_book_rating_count_'.$schema_id][0])){
152
  $input1['aggregateRating']['@type'] = 'aggregateRating';
153
+ $input1['aggregateRating']['ratingValue'] = $all_post_meta['saswp_book_rating_value_'.$schema_id][0];
154
+ $input1['aggregateRating']['ratingCount'] = $all_post_meta['saswp_book_rating_count_'.$schema_id][0];
155
  }
156
 
157
  return $input1;
159
 
160
  function saswp_movie_schema_markup($schema_id, $schema_post_id, $all_post_meta){
161
 
162
+ $input1 = array();
163
 
 
 
164
  $tool = get_post_meta($schema_post_id, 'movie_actor_'.$schema_id, true);
165
 
166
  $input1['@context'] = saswp_context_url();
172
  $input1['dateCreated'] = isset($all_post_meta['saswp_movie_date_created_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_movie_date_created_'.$schema_id][0])):'';
173
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_movie_description_'.$schema_id, 'saswp_array');
174
 
175
+ $input1 = saswp_get_modified_image('saswp_movie_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
176
 
177
  if(isset($all_post_meta['saswp_movie_director_'.$schema_id][0])){
178
 
215
  function saswp_howto_schema_markup($schema_id, $schema_post_id, $all_post_meta){
216
 
217
  $input1 = array();
218
+
 
219
  $tool = get_post_meta($schema_post_id, 'howto_tool_'.$schema_id, true);
220
  $step = get_post_meta($schema_post_id, 'howto_step_'.$schema_id, true);
221
  $supply = get_post_meta($schema_post_id, 'howto_supply_'.$schema_id, true);
228
  $input1['dateModified'] = isset($all_post_meta['saswp_howto_ec_schema_date_modified_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_howto_ec_schema_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')) : '';
229
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_howto_schema_description_'.$schema_id, 'saswp_array');
230
 
231
+ $input1 = saswp_get_modified_image('saswp_howto_schema_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
232
 
233
  if(saswp_remove_warnings($all_post_meta, 'saswp_howto_ec_schema_currency_'.$schema_id, 'saswp_array') !='' && saswp_remove_warnings($all_post_meta, 'saswp_howto_ec_schema_value_'.$schema_id, 'saswp_array') !='')
234
  {
349
  function saswp_event_schema_markup($schema_id, $schema_post_id, $all_post_meta){
350
 
351
  $input1 = array();
352
+
 
 
353
  $input1 = array(
354
  '@context' => saswp_context_url(),
355
  '@type' => (isset($all_post_meta['saswp_event_schema_type_'.$schema_id][0]) && $all_post_meta['saswp_event_schema_type_'.$schema_id][0] !='') ? $all_post_meta['saswp_event_schema_type_'.$schema_id][0] : 'Event' ,
356
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_name_'.$schema_id, 'saswp_array'),
357
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_description_'.$schema_id, 'saswp_array')
 
 
 
 
 
 
358
  );
359
 
360
+ $input1 = saswp_get_modified_image('saswp_event_schema_image_'.$schema_id.'_detail', $input1);
361
+
362
 
363
  if(isset($all_post_meta['saswp_event_schema_high_price_'.$schema_id][0]) && isset($all_post_meta['saswp_event_schema_low_price_'.$schema_id][0])){
364
 
606
  'dateModified' => isset($all_post_meta['saswp_mobile_app_schema_date_modified_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_mobile_app_schema_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')) : '',
607
 
608
  );
609
+
610
+ $input1 = saswp_get_modified_image('saswp_mobile_app_schema_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
 
 
611
 
612
  if(saswp_remove_warnings($all_post_meta, 'saswp_mobile_app_schema_enable_rating_'.$schema_id, 'saswp_array') == 1){
613
 
643
  'dateModified' => isset($all_post_meta['saswp_software_schema_date_modified_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_software_schema_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')) : '',
644
 
645
  );
646
+
647
+ $input1 = saswp_get_modified_image('saswp_software_schema_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
 
 
648
 
649
  if(saswp_remove_warnings($all_post_meta, 'saswp_software_schema_enable_rating_'.$schema_id, 'saswp_array') == 1){
650
 
664
 
665
  $input1 = array();
666
 
667
+ $recipe_logo = get_post_meta( get_the_ID(), 'saswp_recipe_organization_logo_'.$schema_id.'_detail',true);
 
668
  $recipe_author_image = get_post_meta( get_the_ID(), 'saswp_recipe_author_image_'.$schema_id.'_detail',true);
669
 
670
  $step = get_post_meta($schema_post_id, 'recipe_instructions_'.$schema_id, true);
690
  }
691
  }
692
 
693
+
694
  $input1 = array(
695
  '@context' => saswp_context_url(),
696
  '@type' => 'Recipe' ,
697
  '@id' => trailingslashit(get_permalink()).'#recipe',
698
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_url_'.$schema_id, 'saswp_array'),
699
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_name_'.$schema_id, 'saswp_array'),
 
 
 
 
 
 
700
  'prepTime' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_preptime_'.$schema_id, 'saswp_array'),
701
  'cookTime' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_cooktime_'.$schema_id, 'saswp_array'),
702
  'totalTime' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_totaltime_'.$schema_id, 'saswp_array'),
727
 
728
  );
729
 
730
+ $input1 = saswp_get_modified_image('saswp_recipe_image_'.$schema_id.'_detail', $input1);
731
+
732
  //Recipe instruction improved version
733
 
734
  $step_arr = array();
856
  function saswp_product_schema_markup($schema_id, $schema_post_id, $all_post_meta){
857
 
858
  $input1 = array();
859
+
 
 
860
  $input1 = array(
861
  '@context' => saswp_context_url(),
862
  '@type' => 'Product',
870
  )
871
  );
872
 
873
+ $input1 = saswp_get_modified_image('saswp_product_schema_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
874
 
875
  if( (isset($all_post_meta['saswp_product_schema_price_'.$schema_id][0]) && $all_post_meta['saswp_product_schema_price_'.$schema_id][0]) || (isset($all_post_meta['saswp_product_schema_high_price_'.$schema_id][0]) && isset($all_post_meta['saswp_product_schema_low_price_'.$schema_id][0]) ) ){
876
 
1033
  }
1034
 
1035
  function saswp_real_estate_listing_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1036
+
 
 
1037
  $input1 = array(
1038
  '@context' => saswp_context_url(),
1039
  '@type' => 'RealEstateListing',
1045
 
1046
  $input1['datePosted'] = isset($all_post_meta['saswp_real_estate_listing_date_posted_'.$schema_id][0])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_real_estate_listing_date_posted_'.$schema_id][0])):'';
1047
 
1048
+ $input1 = saswp_get_modified_image('saswp_real_estate_listing_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
1049
 
1050
  if(isset($all_post_meta['saswp_real_estate_listing_price_'.$schema_id][0]) && $all_post_meta['saswp_real_estate_listing_price_'.$schema_id][0]){
1051
 
1082
  }
1083
 
1084
  function saswp_psychological_treatment_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1085
+
1086
+ $input1 = array(
 
 
1087
  '@context' => saswp_context_url(),
1088
  '@type' => 'PsychologicalTreatment',
1089
  '@id' => trailingslashit(get_permalink()).'#PsychologicalTreatment',
1091
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_psychological_treatment_name_'.$schema_id, 'saswp_array'),
1092
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_psychological_treatment_description_'.$schema_id, 'saswp_array'),
1093
  );
1094
+
1095
+ $input1 = saswp_get_modified_image('saswp_psychological_treatment_image_'.$schema_id.'_detail', $input1);
1096
+
 
 
 
 
 
 
1097
  if(isset($all_post_meta['saswp_psychological_treatment_drug_'.$schema_id][0])){
1098
  $input1['drug'] = $all_post_meta['saswp_psychological_treatment_drug_'.$schema_id][0];
1099
  }
1160
  $local_business = 'LocalBusiness';
1161
 
1162
  }
1163
+
 
 
1164
  $input1 = array(
1165
  '@context' => saswp_context_url(),
1166
  '@type' => $local_business ,
1167
  '@id' => ((isset($all_post_meta['local_business_id_'.$schema_id][0]) && $all_post_meta['local_business_id_'.$schema_id][0] !='') ? $all_post_meta['local_business_id_'.$schema_id][0] : trailingslashit(get_permalink()).'#'.strtolower($local_business)),
1168
  'name' => saswp_remove_warnings($all_post_meta, 'local_business_name_'.$schema_id, 'saswp_array'),
1169
  'url' => saswp_remove_warnings($all_post_meta, 'local_business_name_url_'.$schema_id, 'saswp_array'),
1170
+ 'description' => saswp_remove_warnings($all_post_meta, 'local_business_description_'.$schema_id, 'saswp_array'),
 
 
 
 
 
 
1171
  'address' => array(
1172
  "@type" => "PostalAddress",
1173
  "streetAddress" => saswp_remove_warnings($all_post_meta, 'local_street_address_'.$schema_id, 'saswp_array'),
1178
  'telephone' => saswp_remove_warnings($all_post_meta, 'local_phone_'.$schema_id, 'saswp_array'),
1179
  'openingHours' => $operation_days,
1180
  );
1181
+
1182
+ $input1 = saswp_get_modified_image('local_business_logo_'.$schema_id.'_detail', $input1);
1183
 
1184
  if(isset($all_post_meta['local_additional_type_'.$schema_id][0])){
1185
  $input1['additionalType'] = $all_post_meta['local_additional_type_'.$schema_id][0];
1518
  function saswp_video_game_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1519
 
1520
  $input1 = array();
1521
+
 
 
1522
  $input1['@context'] = saswp_context_url();
1523
  $input1['@type'] = 'VideoGame';
1524
  $input1['@id'] = trailingslashit(get_permalink()).'#VideoGame';
1526
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_url_'.$schema_id, 'saswp_array');
1527
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_description_'.$schema_id, 'saswp_array');
1528
 
1529
+ $input1 = saswp_get_modified_image('saswp_vg_schema_image_'.$schema_id.'_detail', $input1);
1530
+
 
 
 
 
 
 
 
1531
  $input1['operatingSystem'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_operating_system_'.$schema_id, 'saswp_array');
1532
  $input1['applicationCategory'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_application_category_'.$schema_id, 'saswp_array');
1533
 
1625
  $input1['publisher']['@type'] = 'Organization';
1626
  $input1['publisher']['name'] = $all_post_meta['saswp_music_composition_publisher_'.$schema_id][0];
1627
  }
1628
+
1629
+ $input1 = saswp_get_modified_image('saswp_music_composition_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
 
 
1630
 
1631
  $faq_question = get_post_meta($schema_post_id, 'music_composer_'.$schema_id, true);
1632
 
1652
  function saswp_person_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1653
 
1654
  $input1 = array();
1655
+
 
 
1656
  $input1['@context'] = saswp_context_url();
1657
  $input1['@type'] = 'Person';
1658
 
1688
  $input1['telephone'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_telephone_'.$schema_id, 'saswp_array');
1689
  $input1['email'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_email_'.$schema_id, 'saswp_array');
1690
 
1691
+ $input1 = saswp_get_modified_image('saswp_trip_schema_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
1692
 
1693
  if(isset($all_post_meta['saswp_person_schema_award_'.$schema_id][0])){
1694
  $input1['award'] = $all_post_meta['saswp_person_schema_award_'.$schema_id][0];
1766
  function saswp_trip_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1767
 
1768
  $input1 = array();
1769
+
 
 
1770
  $input1['@context'] = saswp_context_url();
1771
  $input1['@type'] = 'Trip';
1772
  $input1['@id'] = trailingslashit(get_permalink()).'#Trip';
1774
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_trip_schema_name_'.$schema_id, 'saswp_array');
1775
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_trip_schema_description_'.$schema_id, 'saswp_array');
1776
 
1777
+ $input1 = saswp_get_modified_image('saswp_trip_schema_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
1778
 
1779
  $itinerary = get_post_meta($schema_post_id, 'trip_itinerary_'.$schema_id, true);
1780
 
1803
  function saswp_boat_trip_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1804
 
1805
  $input1 = array();
1806
+
 
 
1807
  $input1['@context'] = saswp_context_url();
1808
  $input1['@type'] = 'BoatTrip';
1809
  $input1['@id'] = trailingslashit(get_permalink()).'#BoatTrip';
1811
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_boat_trip_schema_name_'.$schema_id, 'saswp_array');
1812
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_boat_trip_schema_description_'.$schema_id, 'saswp_array');
1813
 
1814
+ $input1 = saswp_get_modified_image('saswp_boat_trip_schema_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
1815
 
1816
  $itinerary = get_post_meta($schema_post_id, 'boat_trip_itinerary_'.$schema_id, true);
1817
 
1976
  $input1['byArtist']['name'] = $all_post_meta['saswp_music_album_artist_'.$schema_id][0];
1977
 
1978
  }
1979
+
1980
+ $input1 = saswp_get_modified_image('saswp_music_album_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
 
 
1981
 
1982
  $faq_question = get_post_meta($schema_post_id, 'music_album_track_'.$schema_id, true);
1983
 
2072
  function saswp_mosque_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2073
 
2074
  $input1 = array();
2075
+
 
 
2076
  $input1['@context'] = saswp_context_url();
2077
  $input1['@type'] = 'Mosque';
2078
  $input1['@id'] = trailingslashit(get_permalink()).'#Mosque';
2080
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_mosque_schema_name_'.$schema_id, 'saswp_array');
2081
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_mosque_schema_description_'.$schema_id, 'saswp_array');
2082
 
2083
+ $input1 = saswp_get_modified_image('saswp_mosque_schema_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
2084
 
2085
  $input1['isAccessibleForFree'] = saswp_remove_warnings($all_post_meta, 'saswp_mosque_schema_is_accesible_free_'.$schema_id, 'saswp_array');
2086
  $input1['maximumAttendeeCapacity'] = saswp_remove_warnings($all_post_meta, 'saswp_mosque_schema_maximum_a_capacity_'.$schema_id, 'saswp_array');
2099
  function saswp_church_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2100
 
2101
  $input1 = array();
2102
+
 
 
2103
  $input1['@context'] = saswp_context_url();
2104
  $input1['@type'] = 'Church';
2105
  $input1['@id'] = trailingslashit(get_permalink()).'#Church';
2107
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_church_schema_name_'.$schema_id, 'saswp_array');
2108
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_church_schema_description_'.$schema_id, 'saswp_array');
2109
 
2110
+ $input1 = saswp_get_modified_image('saswp_church_schema_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
2111
 
2112
  $input1['isAccessibleForFree'] = saswp_remove_warnings($all_post_meta, 'saswp_church_schema_is_acceesible_free_'.$schema_id, 'saswp_array');
2113
  $input1['maximumAttendeeCapacity'] = saswp_remove_warnings($all_post_meta, 'saswp_church_schema_maximum_a_capacity_'.$schema_id, 'saswp_array');
2126
  function saswp_buddhist_temple_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2127
 
2128
  $input1 = array();
2129
+
 
 
2130
  $input1['@context'] = saswp_context_url();
2131
  $input1['@type'] = 'BuddhistTemple';
2132
  $input1['@id'] = trailingslashit(get_permalink()).'#BuddhistTemple';
2134
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_buddhisttemple_schema_name_'.$schema_id, 'saswp_array');
2135
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_buddhisttemple_schema_description_'.$schema_id, 'saswp_array');
2136
 
2137
+ $input1 = saswp_get_modified_image('saswp_buddhisttemple_schema_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
2138
 
2139
  $input1['isAccessibleForFree'] = saswp_remove_warnings($all_post_meta, 'saswp_buddhisttemple_schema_is_accesible_free_'.$schema_id, 'saswp_array');
2140
  $input1['maximumAttendeeCapacity'] = saswp_remove_warnings($all_post_meta, 'saswp_buddhisttemple_schema_maximum_a_capacity_'.$schema_id, 'saswp_array');
2153
  function saswp_hindu_temple_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2154
 
2155
  $input1 = array();
2156
+
 
 
2157
  $input1['@context'] = saswp_context_url();
2158
  $input1['@type'] = 'HinduTemple';
2159
  $input1['@id'] = trailingslashit(get_permalink()).'#HinduTemple';
2161
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_name_'.$schema_id, 'saswp_array');
2162
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_description_'.$schema_id, 'saswp_array');
2163
 
2164
+ $input1 = saswp_get_modified_image('saswp_hindutemple_schema_image_'.$schema_id.'_detail', $input1);
2165
+
 
 
 
 
 
 
 
2166
  $input1['isAccessibleForFree'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_is_accesible_free_'.$schema_id, 'saswp_array');
2167
  $input1['maximumAttendeeCapacity'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_maximum_a_capacity_'.$schema_id, 'saswp_array');
2168
  $input1['hasMap'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_hasmap_'.$schema_id, 'saswp_array');
2180
  function saswp_lorh_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2181
 
2182
  $input1 = array();
2183
+
 
 
2184
  $input1['@context'] = saswp_context_url();
2185
  $input1['@type'] = 'LandmarksOrHistoricalBuildings';
2186
  $input1['@id'] = trailingslashit(get_permalink()).'#LandmarksOrHistoricalBuildings';
2188
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_lorh_schema_name_'.$schema_id, 'saswp_array');
2189
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_lorh_schema_description_'.$schema_id, 'saswp_array');
2190
 
2191
+ $input1 = saswp_get_modified_image('saswp_lorh_schema_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
2192
 
2193
  $input1['hasMap'] = saswp_remove_warnings($all_post_meta, 'saswp_lorh_schema_hasmap_'.$schema_id, 'saswp_array');
2194
  $input1['isAccessibleForFree'] = saswp_remove_warnings($all_post_meta, 'saswp_lorh_schema_is_acceesible_free_'.$schema_id, 'saswp_array');
2214
  function saswp_tourist_attraction_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2215
 
2216
  $input1 = array();
2217
+
 
 
2218
  $input1['@context'] = saswp_context_url();
2219
  $input1['@type'] = 'TouristAttraction';
2220
  $input1['@id'] = trailingslashit(get_permalink()).'#TouristAttraction';
2222
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_name_'.$schema_id, 'saswp_array');
2223
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_description_'.$schema_id, 'saswp_array');
2224
 
2225
+ $input1 = saswp_get_modified_image('saswp_ta_schema_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
2226
 
2227
  $input1['isAccessibleForFree'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_is_acceesible_free_'.$schema_id, 'saswp_array');
2228
 
2247
  function saswp_tourist_destination_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2248
 
2249
  $input1 = array();
2250
+
 
 
2251
  $input1['@context'] = saswp_context_url();
2252
  $input1['@type'] = 'TouristDestination';
2253
  $input1['@id'] = trailingslashit(get_permalink()).'#TouristDestination';
2255
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_td_schema_name_'.$schema_id, 'saswp_array');
2256
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_td_schema_description_'.$schema_id, 'saswp_array');
2257
 
2258
+ $input1 = saswp_get_modified_image('saswp_td_schema_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
2259
 
2260
 
2261
  $input1['address']['@type'] = 'PostalAddress';
2277
  function saswp_apartment_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2278
 
2279
  $input1 = array();
2280
+
 
 
2281
  $input1['@context'] = saswp_context_url();
2282
  $input1['@type'] = 'Apartment';
2283
  $input1['@id'] = trailingslashit(get_permalink()).'#Apartment';
2286
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_schema_description_'.$schema_id, 'saswp_array');
2287
  $input1['floorSize'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_schema_floor_size_'.$schema_id, 'saswp_array');
2288
 
2289
+ $input1 = saswp_get_modified_image('saswp_apartment_schema_image_'.$schema_id.'_detail', $input1);
2290
+
 
 
 
 
 
 
 
2291
  $input1['numberOfRooms'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_schema_numberofrooms_'.$schema_id, 'saswp_array');
2292
 
2293
  $input1['address']['@type'] = 'PostalAddress';
2351
  function saswp_apartment_complex_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2352
 
2353
  $input1 = array();
2354
+
 
 
2355
  $input1['@context'] = saswp_context_url();
2356
  $input1['@type'] = 'ApartmentComplex';
2357
  $input1['@id'] = trailingslashit(get_permalink()).'#ApartmentComplex';
2359
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_complex_name_'.$schema_id, 'saswp_array');
2360
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_complex_description_'.$schema_id, 'saswp_array');
2361
 
2362
+ $input1 = saswp_get_modified_image('saswp_apartment_complex_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
2363
 
2364
  $input1['numberOfBedrooms'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_complex_no_of_bedrooms_'.$schema_id, 'saswp_array');
2365
  $input1['petsAllowed'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_complex_pets_allowed_'.$schema_id, 'saswp_array');
2379
  function saswp_house_schema_makrup($schema_id, $schema_post_id, $all_post_meta){
2380
 
2381
  $input1 = array();
2382
+
 
 
2383
  $input1['@context'] = saswp_context_url();
2384
  $input1['@type'] = 'House';
2385
  $input1['@id'] = trailingslashit(get_permalink()).'#House';
2387
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_house_schema_name_'.$schema_id, 'saswp_array');
2388
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_house_schema_description_'.$schema_id, 'saswp_array');
2389
 
2390
+ $input1 = saswp_get_modified_image('saswp_house_schema_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
2391
 
2392
  $input1['petsAllowed'] = saswp_remove_warnings($all_post_meta, 'saswp_house_schema_pets_allowed_'.$schema_id, 'saswp_array');
2393
 
2410
  function saswp_single_family_residence_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2411
 
2412
  $input1 = array();
2413
+
 
 
2414
  $input1['@context'] = saswp_context_url();
2415
  $input1['@type'] = 'SingleFamilyResidence';
2416
  $input1['@id'] = trailingslashit(get_permalink()).'#SingleFamilyResidence';
2417
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_url_'.$schema_id, 'saswp_array');
2418
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_name_'.$schema_id, 'saswp_array');
2419
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_description_'.$schema_id, 'saswp_array');
2420
+ $input1 = saswp_get_modified_image('saswp_sfr_schema_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
 
2421
  $input1['numberOfRooms'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_numberofrooms_'.$schema_id, 'saswp_array');
2422
  $input1['petsAllowed'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_pets_allowed_'.$schema_id, 'saswp_array');
2423
 
2439
  function saswp_tv_series_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2440
 
2441
  $input1 = array();
2442
+
 
 
2443
  $actor = get_post_meta($schema_post_id, 'tvseries_actor_'.$schema_id, true);
2444
  $season = get_post_meta($schema_post_id, 'tvseries_season_'.$schema_id, true);
2445
 
2449
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_tvseries_schema_name_'.$schema_id, 'saswp_array');
2450
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_tvseries_schema_description_'.$schema_id, 'saswp_array');
2451
 
2452
+ $input1 = saswp_get_modified_image('saswp_tvseries_schema_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
2453
 
2454
  $input1['author']['@type'] = 'Person';
2455
 
2496
  function saswp_medical_condition_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2497
 
2498
  $input1 = array();
2499
+
 
 
2500
  $cause = get_post_meta($schema_post_id, 'mc_cause_'.$schema_id, true);
2501
  $symptom = get_post_meta($schema_post_id, 'mc_symptom_'.$schema_id, true);
2502
  $riskfactro = get_post_meta($schema_post_id, 'mc_risk_factor_'.$schema_id, true);
2508
  $input1['alternateName'] = saswp_remove_warnings($all_post_meta, 'saswp_mc_schema_alternate_name_'.$schema_id, 'saswp_array');
2509
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_mc_schema_description_'.$schema_id, 'saswp_array');
2510
 
2511
+ $input1 = saswp_get_modified_image('saswp_mc_schema_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
2512
 
2513
  if( isset($all_post_meta['saswp_mc_schema_drug_'.$schema_id][0]) ){
2514
  $input1['drug'] = $all_post_meta['saswp_mc_schema_drug_'.$schema_id][0];
2712
  function saswp_dfp_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2713
 
2714
  $input1 = array();
2715
+
 
2716
  $slogo = get_post_meta( get_the_ID(), 'saswp_dfp_organization_logo_'.$schema_id.'_detail',true);
2717
  $input1 = array(
2718
  '@context' => saswp_context_url(),
2721
  'mainEntityOfPage' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_main_entity_of_page_'.$schema_id, 'saswp_array'),
2722
  'headline' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_headline_'.$schema_id, 'saswp_array'),
2723
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_description_'.$schema_id, 'saswp_array'),
2724
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_url_'.$schema_id, 'saswp_array'),
 
 
 
 
 
 
2725
  'datePublished' => isset($all_post_meta['saswp_dfp_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_dfp_date_published_'.$schema_id][0])):'',
2726
  'dateModified' => isset($all_post_meta['saswp_dfp_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_dfp_date_modified_'.$schema_id][0])):'',
2727
  'publisher' => array(
2735
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_organization_name_'.$schema_id, 'saswp_array'),
2736
  ),
2737
  );
2738
+
2739
+ $input1 = saswp_get_modified_image('saswp_dfp_image_'.$schema_id.'_detail', $input1);
2740
 
2741
  $input1['author']['@type'] = 'Person';
2742
 
2832
  function saswp_vehicle_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2833
 
2834
  $input1 = array();
2835
+
 
 
2836
  $input1 = array(
2837
  '@context' => saswp_context_url(),
2838
  '@type' => ['Product','Vehicle'],
2840
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_vehicle_schema_name_'.$schema_id, 'saswp_array'),
2841
  'sku' => saswp_remove_warnings($all_post_meta, 'saswp_vehicle_schema_sku_'.$schema_id, 'saswp_array'),
2842
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_vehicle_schema_description_'.$schema_id, 'saswp_array'),
2843
+ 'brand' => array('@type' => 'Brand',
2844
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_vehicle_schema_brand_name_'.$schema_id, 'saswp_array'),
2845
  )
2846
  );
2847
 
2848
+ $input1 = saswp_get_modified_image('saswp_vehicle_schema_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
2849
 
2850
  if( (isset($all_post_meta['saswp_vehicle_schema_price_'.$schema_id][0]) && $all_post_meta['saswp_vehicle_schema_price_'.$schema_id][0]) || (isset($all_post_meta['saswp_vehicle_schema_high_price_'.$schema_id][0]) && isset($all_post_meta['saswp_vehicle_schema_low_price_'.$schema_id][0]) ) ){
2851
 
2989
  function saswp_car_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2990
 
2991
  $input1 = array();
2992
+
 
 
2993
  $input1 = array(
2994
  '@context' => saswp_context_url(),
2995
  '@type' => ['Product','Car'],
3002
  )
3003
  );
3004
 
3005
+ $input1 = saswp_get_modified_image('saswp_car_schema_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
3006
 
3007
  if( (isset($all_post_meta['saswp_car_schema_price_'.$schema_id][0]) && $all_post_meta['saswp_car_schema_price_'.$schema_id][0]) || (isset($all_post_meta['saswp_car_schema_high_price_'.$schema_id][0]) && isset($all_post_meta['saswp_car_schema_low_price_'.$schema_id][0]) ) ){
3008
 
3701
  $input1 = array();
3702
 
3703
  $author_image = get_post_meta( get_the_ID(), 'saswp_audiobook_author_image_'.$schema_id.'_detail',true);
3704
+
 
3705
  $input1 = array(
3706
  '@context' => saswp_context_url(),
3707
  '@type' => 'Audiobook' ,
3738
  $input1['author']['image']['height'] = $author_image['height'];
3739
  $input1['author']['image']['width'] = $author_image['width'];
3740
 
3741
+ $input1 = saswp_get_modified_image('saswp_audiobook_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
3742
 
3743
  return $input1;
3744
 
3747
  function saswp_podcast_episode_schema_markup($schema_id, $schema_post_id, $all_post_meta){
3748
 
3749
  $input1 = array();
3750
+
 
 
3751
  $input1 = array(
3752
  '@context' => saswp_context_url(),
3753
  '@type' => 'PodcastEpisode' ,
3776
  $input1['partOfSeries']['url'] = $all_post_meta['saswp_podcast_episode_series_url_'.$schema_id][0];
3777
  }
3778
 
3779
+ $input1 = saswp_get_modified_image('saswp_podcast_episode_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
3780
 
3781
  return $input1;
3782
 
3786
  function saswp_podcast_season_schema_markup($schema_id, $schema_post_id, $all_post_meta){
3787
 
3788
  $input1 = array();
3789
+
 
 
3790
  $input1 = array(
3791
  '@context' => saswp_context_url(),
3792
  '@type' => 'PodcastSeason' ,
3819
  $input1['partOfSeries']['url'] = $all_post_meta['saswp_podcast_season_series_url_'.$schema_id][0];
3820
  }
3821
 
3822
+ $input1 = saswp_get_modified_image('saswp_podcast_season_image_'.$schema_id.'_detail', $input1);
 
 
 
 
 
 
 
3823
 
3824
  return $input1;
3825
 
output/other-schema.php CHANGED
@@ -358,4 +358,4 @@ function saswp_wpecommerce_product_schema($input1){
358
 
359
  return $input1;
360
 
361
- }
358
 
359
  return $input1;
360
 
361
+ }
output/output.php CHANGED
@@ -793,46 +793,22 @@ function saswp_schema_output() {
793
  case 'Blogposting':
794
  case 'BlogPosting':
795
 
796
- $input1 = array(
797
- '@context' => saswp_context_url(),
798
- '@type' => 'BlogPosting' ,
799
- '@id' => trailingslashit(saswp_get_permalink()).'#BlogPosting',
800
- 'url' => trailingslashit(saswp_get_permalink()),
801
- 'inLanguage' => get_bloginfo('language'),
802
- 'mainEntityOfPage' => trailingslashit(saswp_get_permalink()),
803
- 'headline' => saswp_get_the_title(),
804
- 'description' => saswp_get_the_excerpt(),
805
- 'articleBody' => saswp_get_the_content(),
806
- 'keywords' => saswp_get_the_tags(),
807
- 'name' => saswp_get_the_title(),
808
- 'datePublished' => esc_html($date),
809
- 'dateModified' => esc_html($modified_date),
810
- 'author' => saswp_get_author_details()
811
- );
812
-
813
- $mainentity = saswp_get_mainEntity($schema_post_id);
814
-
815
- if($mainentity){
816
- $input1['mainEntity'] = $mainentity;
817
- }
818
- if(!empty($publisher)){
819
-
820
- $input1 = array_merge($input1, $publisher);
821
-
822
- }
823
- if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] == 1){
824
- $input1['comment'] = saswp_get_comments(get_the_ID());
825
- }
826
 
827
- $input1 = apply_filters('saswp_modify_blogposting_schema_output', $input1 );
 
 
 
 
828
 
829
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
830
-
831
- if($modified_schema == 1){
832
 
833
- $input1 = saswp_blogposting_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
834
- }
835
-
 
836
 
837
  break;
838
 
@@ -1312,10 +1288,7 @@ function saswp_schema_output() {
1312
  if($mainentity){
1313
  $input1['mainEntity'] = $mainentity;
1314
  }
1315
-
1316
- if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1317
- $input1['comment'] = saswp_get_comments(get_the_ID());
1318
- }
1319
  $input1 = apply_filters('saswp_modify_article_schema_output', $input1 );
1320
 
1321
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
@@ -1351,10 +1324,7 @@ function saswp_schema_output() {
1351
  if($mainentity){
1352
  $input1['mainEntity'] = $mainentity;
1353
  }
1354
-
1355
- if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1356
- $input1['comment'] = saswp_get_comments(get_the_ID());
1357
- }
1358
  if(!empty($extra_theme_review)){
1359
  $input1 = array_merge($input1, $extra_theme_review);
1360
  }
793
  case 'Blogposting':
794
  case 'BlogPosting':
795
 
796
+ $input1 = $service_object->saswp_schema_markup_generator($schema_type);
797
+
798
+ $mainentity = saswp_get_mainEntity($schema_post_id);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
799
 
800
+ if($mainentity){
801
+ $input1['mainEntity'] = $mainentity;
802
+ }
803
+
804
+ $input1 = apply_filters('saswp_modify_blogposting_schema_output', $input1 );
805
 
806
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
807
 
808
+ if($modified_schema == 1){
809
+
810
+ $input1 = saswp_blogposting_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
811
+ }
812
 
813
  break;
814
 
1288
  if($mainentity){
1289
  $input1['mainEntity'] = $mainentity;
1290
  }
1291
+
 
 
 
1292
  $input1 = apply_filters('saswp_modify_article_schema_output', $input1 );
1293
 
1294
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
1324
  if($mainentity){
1325
  $input1['mainEntity'] = $mainentity;
1326
  }
1327
+
 
 
 
1328
  if(!empty($extra_theme_review)){
1329
  $input1 = array_merge($input1, $extra_theme_review);
1330
  }
output/service.php CHANGED
@@ -4375,139 +4375,73 @@ Class saswp_output_service{
4375
  public function saswp_schema_markup_generator($schema_type){
4376
 
4377
  global $post, $sd_data;
4378
-
4379
- $logo = '';
4380
- $height = '';
4381
- $width = '';
4382
- $site_name = '';
4383
-
4384
- $default_logo = $this->saswp_get_publisher(true);
4385
-
4386
- if(!empty($default_logo)){
4387
-
4388
- $logo = $default_logo['url'];
4389
- $height = $default_logo['height'];
4390
- $width = $default_logo['width'];
4391
-
4392
- }
4393
-
4394
- if(isset($sd_data['sd_name']) && $sd_data['sd_name'] !=''){
4395
-
4396
- $site_name = $sd_data['sd_name'];
4397
-
4398
- }else{
4399
-
4400
- $site_name = get_bloginfo();
4401
-
4402
- }
4403
 
 
 
4404
  $input1 = array();
4405
  $date = get_the_date("c");
4406
  $modified_date = get_the_modified_date("c");
4407
 
4408
  switch ($schema_type) {
4409
-
4410
- case 'TechArticle':
4411
-
4412
- $input1 = array(
4413
- '@context' => saswp_context_url(),
4414
- '@type' => 'TechArticle',
4415
- '@id' => trailingslashit(saswp_get_permalink()).'#techarticle',
4416
- 'url' => saswp_get_permalink(),
4417
- 'inLanguage' => get_bloginfo('language'),
4418
- 'mainEntityOfPage' => saswp_get_permalink(),
4419
- 'headline' => saswp_get_the_title(),
4420
- 'description' => saswp_get_the_excerpt(),
4421
- 'articleBody' => saswp_get_the_content(),
4422
- 'keywords' => saswp_get_the_tags(),
4423
- 'datePublished' => esc_html($date),
4424
- 'dateModified' => esc_html($modified_date),
4425
- 'author' => saswp_get_author_details(),
4426
- 'publisher' => array(
4427
- '@type' => 'Organization',
4428
- 'logo' => array(
4429
- '@type' => 'ImageObject',
4430
- 'url' => esc_url($logo),
4431
- 'width' => esc_attr($width),
4432
- 'height' => esc_attr($height),
4433
- ),
4434
- 'name' => esc_attr($site_name),
4435
- ),
4436
-
4437
- );
4438
-
4439
- break;
4440
-
4441
- case 'Article':
4442
  $input1 = array(
4443
  '@context' => saswp_context_url(),
4444
- '@type' => 'Article',
4445
- '@id' => trailingslashit(saswp_get_permalink()).'#article',
4446
- 'url' => saswp_get_permalink(),
4447
- 'inLanguage' => get_bloginfo('language'),
4448
- 'mainEntityOfPage' => saswp_get_permalink(),
4449
  'headline' => saswp_get_the_title(),
4450
- 'description' => saswp_get_the_excerpt(),
4451
- 'articleBody' => saswp_get_the_content(),
4452
- 'keywords' => saswp_get_the_tags(),
4453
- 'datePublished' => esc_html($date),
4454
- 'dateModified' => esc_html($modified_date),
4455
- 'author' => saswp_get_author_details(),
4456
- 'publisher' => array(
4457
- '@type' => 'Organization',
4458
- 'logo' => array(
4459
- '@type' => 'ImageObject',
4460
- 'url' => esc_url($logo),
4461
- 'width' => esc_attr($width),
4462
- 'height' => esc_attr($height),
4463
- ),
4464
- 'name' => esc_attr($site_name),
4465
- ),
4466
-
4467
  );
4468
 
4469
- break;
4470
-
4471
- case 'Photograph':
4472
- $input1 = array(
4473
- '@context' => saswp_context_url(),
4474
- '@type' => 'Photograph',
4475
- '@id' => trailingslashit(saswp_get_permalink()).'#Photograph',
4476
- 'url' => saswp_get_permalink(),
4477
- 'inLanguage' => get_bloginfo('language'),
4478
- 'headline' => saswp_get_the_title(),
4479
- 'description' => saswp_get_the_excerpt(),
4480
- 'datePublished' => esc_html($date),
4481
- 'dateModified' => esc_html($modified_date),
4482
- 'author' => saswp_get_author_details(),
4483
- 'publisher' => array(
4484
- '@type' => 'Organization',
4485
- 'logo' => array(
4486
- '@type' => 'ImageObject',
4487
- 'url' => esc_url($logo),
4488
- 'width' => esc_attr($width),
4489
- 'height' => esc_attr($height),
4490
- ),
4491
- 'name' => esc_attr($site_name),
4492
- ),
4493
-
4494
- );
4495
-
4496
  $block_data = saswp_get_gutenberg_block_data('core/gallery');
4497
 
4498
  if(isset($block_data['attrs']['ids']) && is_array($block_data['attrs']['ids']) && !empty($block_data['attrs']['ids']) ){
4499
-
4500
- $image_arr = array();
4501
-
4502
  foreach($block_data['attrs']['ids'] as $image_id){
4503
  $image_arr[] = saswp_get_image_by_id($image_id);
4504
  }
4505
-
 
 
 
 
4506
  $input1['mainEntityOfPage']['@type'] = 'ImageGallery';
4507
  $input1['mainEntityOfPage']['image'] = $image_arr;
4508
  }
4509
-
4510
- break;
 
 
 
 
 
 
 
 
 
 
 
4511
  case 'SpecialAnnouncement':
4512
  $input1 = array(
4513
  '@context' => saswp_context_url(),
@@ -4516,25 +4450,18 @@ Class saswp_output_service{
4516
  'url' => saswp_get_permalink(),
4517
  'inLanguage' => get_bloginfo('language'),
4518
  'name' => saswp_get_the_title(),
4519
- 'text' => saswp_get_the_excerpt(),
4520
- 'keywords' => saswp_get_the_tags(),
4521
- 'datePublished' => esc_html($date),
4522
- 'datePosted' => esc_html($date),
4523
- 'dateModified' => esc_html($modified_date),
4524
- 'expires' => esc_html($modified_date),
4525
- 'author' => saswp_get_author_details(),
4526
- 'publisher' => array(
4527
- '@type' => 'Organization',
4528
- 'logo' => array(
4529
- '@type' => 'ImageObject',
4530
- 'url' => esc_url($logo),
4531
- 'width' => esc_attr($width),
4532
- 'height' => esc_attr($height),
4533
- ),
4534
- 'name' => esc_attr($site_name),
4535
- ),
4536
-
4537
  );
 
 
 
 
4538
  break;
4539
 
4540
  case 'WebPage':
@@ -4545,17 +4472,7 @@ Class saswp_output_service{
4545
  '@id' => trailingslashit(saswp_get_permalink()).'#webpage',
4546
  'name' => saswp_get_the_title(),
4547
  'url' => saswp_get_permalink(),
4548
- 'lastReviewed' => esc_html($modified_date),
4549
- 'reviewedBy' => array(
4550
- '@type' => 'Organization',
4551
- 'logo' => array(
4552
- '@type' => 'ImageObject',
4553
- 'url' => esc_url($logo),
4554
- 'width' => esc_attr($width),
4555
- 'height' => esc_attr($height),
4556
- ),
4557
- 'name' => esc_attr($site_name),
4558
- ),
4559
  'inLanguage' => get_bloginfo('language'),
4560
  'description' => saswp_get_the_excerpt(),
4561
  'mainEntity' => array(
@@ -4567,22 +4484,14 @@ Class saswp_output_service{
4567
  'keywords' => saswp_get_the_tags(),
4568
  'datePublished' => esc_html($date),
4569
  'dateModified' => esc_html($modified_date),
4570
- 'author' => saswp_get_author_details(),
4571
- 'publisher' => array(
4572
- '@type' => 'Organization',
4573
- 'logo' => array(
4574
- '@type' => 'ImageObject',
4575
- 'url' => esc_url($logo),
4576
- 'width' => esc_attr($width),
4577
- 'height' => esc_attr($height),
4578
- ),
4579
- 'name' => esc_attr($site_name),
4580
- ),
4581
-
4582
- ),
4583
-
4584
-
4585
  );
 
 
 
 
 
4586
 
4587
  break;
4588
 
4375
  public function saswp_schema_markup_generator($schema_type){
4376
 
4377
  global $post, $sd_data;
4378
+
4379
+ $publisher = array();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4380
 
4381
+ $publisher = $this->saswp_get_publisher();
4382
+
4383
  $input1 = array();
4384
  $date = get_the_date("c");
4385
  $modified_date = get_the_modified_date("c");
4386
 
4387
  switch ($schema_type) {
4388
+
4389
+ case 'Article':
4390
+ case 'TechArticle':
4391
+ case 'Photograph':
4392
+ case 'Blogposting':
4393
+ case 'BlogPosting':
4394
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4395
  $input1 = array(
4396
  '@context' => saswp_context_url(),
4397
+ '@type' => $schema_type,
4398
+ '@id' => trailingslashit(saswp_get_permalink()).'#'.$schema_type,
4399
+ 'url' => saswp_get_permalink(),
4400
+ 'inLanguage' => get_bloginfo('language'),
4401
+ 'mainEntityOfPage' => saswp_get_permalink(),
4402
  'headline' => saswp_get_the_title(),
4403
+ 'description' => saswp_get_the_excerpt(),
4404
+ 'articleBody' => saswp_get_the_content(),
4405
+ 'keywords' => saswp_get_the_tags(),
4406
+ 'datePublished' => esc_html($date),
4407
+ 'dateModified' => esc_html($modified_date),
4408
+ 'author' => saswp_get_author_details()
 
 
 
 
 
 
 
 
 
 
 
4409
  );
4410
 
4411
+ if($schema_type == 'Photograph'){
4412
+ unset($input1['articleBody']);
4413
+ $image_arr = array();
4414
+
4415
+ $image_arr = saswp_get_ampforwp_story_images();
4416
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4417
  $block_data = saswp_get_gutenberg_block_data('core/gallery');
4418
 
4419
  if(isset($block_data['attrs']['ids']) && is_array($block_data['attrs']['ids']) && !empty($block_data['attrs']['ids']) ){
4420
+
 
 
4421
  foreach($block_data['attrs']['ids'] as $image_id){
4422
  $image_arr[] = saswp_get_image_by_id($image_id);
4423
  }
4424
+
4425
+ }
4426
+
4427
+ if( !empty($image_arr) ){
4428
+ unset($input1['mainEntityOfPage']);
4429
  $input1['mainEntityOfPage']['@type'] = 'ImageGallery';
4430
  $input1['mainEntityOfPage']['image'] = $image_arr;
4431
  }
4432
+
4433
+ }
4434
+
4435
+ if(!empty($publisher)){
4436
+ $input1 = array_merge($input1, $publisher);
4437
+ }
4438
+
4439
+ if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] == 1){
4440
+ $input1['comment'] = saswp_get_comments(get_the_ID());
4441
+ }
4442
+
4443
+ break;
4444
+
4445
  case 'SpecialAnnouncement':
4446
  $input1 = array(
4447
  '@context' => saswp_context_url(),
4450
  'url' => saswp_get_permalink(),
4451
  'inLanguage' => get_bloginfo('language'),
4452
  'name' => saswp_get_the_title(),
4453
+ 'text' => saswp_get_the_excerpt(),
4454
+ 'keywords' => saswp_get_the_tags(),
4455
+ 'datePublished' => esc_html($date),
4456
+ 'datePosted' => esc_html($date),
4457
+ 'dateModified' => esc_html($modified_date),
4458
+ 'expires' => esc_html($modified_date),
4459
+ 'author' => saswp_get_author_details()
 
 
 
 
 
 
 
 
 
 
 
4460
  );
4461
+
4462
+ if(!empty($publisher)){
4463
+ $input1 = array_merge($input1, $publisher);
4464
+ }
4465
  break;
4466
 
4467
  case 'WebPage':
4472
  '@id' => trailingslashit(saswp_get_permalink()).'#webpage',
4473
  'name' => saswp_get_the_title(),
4474
  'url' => saswp_get_permalink(),
4475
+ 'lastReviewed' => esc_html($modified_date),
 
 
 
 
 
 
 
 
 
 
4476
  'inLanguage' => get_bloginfo('language'),
4477
  'description' => saswp_get_the_excerpt(),
4478
  'mainEntity' => array(
4484
  'keywords' => saswp_get_the_tags(),
4485
  'datePublished' => esc_html($date),
4486
  'dateModified' => esc_html($modified_date),
4487
+ 'author' => saswp_get_author_details()
4488
+ )
 
 
 
 
 
 
 
 
 
 
 
 
 
4489
  );
4490
+
4491
+ if(!empty($publisher)){
4492
+ $input1['reviewedBy'] = $publisher['publisher'];
4493
+ $input1['mainEntity']['publisher'] = $publisher['publisher'];
4494
+ }
4495
 
4496
  break;
4497
 
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.7
6
- Stable tag: 1.9.68
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -120,6 +120,13 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
120
 
121
  == Changelog ==
122
 
 
 
 
 
 
 
 
123
  = 1.9.68 (18 March 2021) =
124
 
125
  * Fixed: Call to undefined function wp_get_current_user in /admin_section/settings.php(4060) #1347
3
  Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
4
  Requires at least: 3.0
5
  Tested up to: 5.7
6
+ Stable tag: 1.9.69
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
120
 
121
  == Changelog ==
122
 
123
+ = 1.9.69 (24 March 2021) =
124
+
125
+ * Added: Featured image in feed while using Summary option #1355
126
+ * Fixed: Wrong output is coming for the "Cafe and Coffee Shop" schema type #1358
127
+ * Fixed: The property type is not supported for an object of this type. #1359
128
+ * Enhancement: Improve the "Photograph" schema type markup for the AMP Stories #1356
129
+
130
  = 1.9.68 (18 March 2021) =
131
 
132
  * Fixed: Call to undefined function wp_get_current_user in /admin_section/settings.php(4060) #1347
structured-data-for-wp.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Schema & Structured Data for WP & AMP
4
  Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
5
- Version: 1.9.68
6
  Text Domain: schema-and-structured-data-for-wp
7
  Domain Path: /languages
8
  Author: Magazine3
@@ -13,7 +13,7 @@ License: GPL2
13
  // Exit if accessed directly.
14
  if ( ! defined( 'ABSPATH' ) ) exit;
15
 
16
- define('SASWP_VERSION', '1.9.68');
17
  define('SASWP_DIR_NAME_FILE', __FILE__ );
18
  define('SASWP_DIR_NAME', dirname( __FILE__ ));
19
  define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
2
  /*
3
  Plugin Name: Schema & Structured Data for WP & AMP
4
  Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
5
+ Version: 1.9.69
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.69');
17
  define('SASWP_DIR_NAME_FILE', __FILE__ );
18
  define('SASWP_DIR_NAME', dirname( __FILE__ ));
19
  define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
view/paywall.php CHANGED
@@ -73,8 +73,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
73
  $notAccessibleForFree = '';
74
  $isAccessibleForFree = '';
75
  $paywall_class_name = '';
76
- $enable_custom_field = '';
77
- $custom_fields = '';
78
  $fixed_text = '';
79
  $taxonomy_term = '';
80
  $fixed_image = '';
73
  $notAccessibleForFree = '';
74
  $isAccessibleForFree = '';
75
  $paywall_class_name = '';
76
+ $enable_custom_field = '';
 
77
  $fixed_text = '';
78
  $taxonomy_term = '';
79
  $fixed_image = '';
view/post_specific.php CHANGED
@@ -81,7 +81,7 @@ class saswp_post_specific {
81
 
82
  if($meta_field){
83
  foreach($meta_field as $field){
84
- $result = delete_post_meta($post_id, $field['id']);
85
  }
86
  }
87
  echo json_encode(array('status'=> 't', 'msg'=>saswp_t_string( 'Schema has been restored' )));
@@ -260,13 +260,7 @@ class saswp_post_specific {
260
  public function saswp_post_specifc_add_meta_boxes() {
261
 
262
  global $post, $saswp_metaboxes;
263
-
264
- $post_specific_id = '';
265
-
266
- if(is_object($post)){
267
- $post_specific_id = $post->ID;
268
- }
269
-
270
  $show_post_types = get_post_types();
271
  unset($show_post_types['adsforwp'],$show_post_types['saswp'],$show_post_types['attachment'], $show_post_types['revision'], $show_post_types['nav_menu_item'], $show_post_types['user_request'], $show_post_types['custom_css']);
272
 
@@ -302,13 +296,9 @@ class saswp_post_specific {
302
  return;
303
  }
304
  $meta_name = '';
305
- $meta_array = array();
306
- $schema_id = null;
307
  $schema_type = '';
308
-
309
- if(isset($_GET['schema_id'])){
310
- $schema_id = intval($_GET['schema_id']);
311
- }
312
  if(isset($_GET['schema_type'])){
313
  $schema_type = sanitize_text_field($_GET['schema_type']);
314
  }
@@ -544,42 +534,12 @@ class saswp_post_specific {
544
 
545
  return $response_html;
546
  }
547
-
548
- public function saswp_post_meta_box_html($std_post){
549
-
550
- global $post;
551
-
552
- if(!is_object($post)){
553
- $post = $std_post;
554
- }
555
-
556
- $response_html = '';
557
- $schema_avail = false;
558
- if($this->all_schema){
559
-
560
- foreach ($this->all_schema as $schema){
561
-
562
- $advnace_status = saswp_check_advance_display_status($schema->ID);
563
-
564
- if($advnace_status == 1){
565
- $schema_avail = true;
566
- break;
567
- }
568
-
569
- }
570
-
571
- }
572
-
573
- $response_html .= $this->saswp_post_meta_box_fields($post);
574
 
575
- return $response_html;
576
- }
577
-
578
  public function saswp_post_meta_box_callback() {
579
 
580
  global $post;
581
  wp_nonce_field( 'post_specific_data', 'post_specific_nonce' );
582
- echo $this->saswp_post_meta_box_html($post);
583
 
584
  }
585
 
81
 
82
  if($meta_field){
83
  foreach($meta_field as $field){
84
+ delete_post_meta($post_id, $field['id']);
85
  }
86
  }
87
  echo json_encode(array('status'=> 't', 'msg'=>saswp_t_string( 'Schema has been restored' )));
260
  public function saswp_post_specifc_add_meta_boxes() {
261
 
262
  global $post, $saswp_metaboxes;
263
+
 
 
 
 
 
 
264
  $show_post_types = get_post_types();
265
  unset($show_post_types['adsforwp'],$show_post_types['saswp'],$show_post_types['attachment'], $show_post_types['revision'], $show_post_types['nav_menu_item'], $show_post_types['user_request'], $show_post_types['custom_css']);
266
 
296
  return;
297
  }
298
  $meta_name = '';
299
+ $meta_array = array();
 
300
  $schema_type = '';
301
+
 
 
 
302
  if(isset($_GET['schema_type'])){
303
  $schema_type = sanitize_text_field($_GET['schema_type']);
304
  }
534
 
535
  return $response_html;
536
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
537
 
 
 
 
538
  public function saswp_post_meta_box_callback() {
539
 
540
  global $post;
541
  wp_nonce_field( 'post_specific_data', 'post_specific_nonce' );
542
+ echo $this->saswp_post_meta_box_fields($post);
543
 
544
  }
545