Version Description
(11 Sept 2019) =
- Enhancement: Remove all the global static fields and migrate its data to modify schema output #465
- Enhancement: Other images should also get resized as like the featured image #371
- Bug Fixed: Website layout is break when microdata clean up option enable #461
- Bug Fixed: Post specific modify schema option should also show when a post is drafted #335
- Bug Fixed: NOTICE: PHP message: PHP Fatal error ( Call to undefined method WP_Image_Editor_Imagick::get_error_message() ) #467
- Bug Fixed: Default product data is not loading in fields of product at Modify current schema #432
- Bug Fixed: When WordPress installed in sub folder, Schema takes the path of subfolder instead of root #406
- Bug Fixed: AMP should be added if it is amp url in mainEntityOfPage #392
- Bug Fixed: WP Recipe Maker (Compatibility), the image is smaller than the recommended size error should not get appeared. #382
- Added: Importer for Schema- AIORS ( https://wordpress.org/plugins/all-in-one-schemaorg-rich-snippets) #160
Download this release
Release Info
Developer | magazine3 |
Plugin | Schema & Structured Data for WP & AMP |
Version | 1.9.6 |
Comparing to | |
See all releases |
Code changes from version 1.9.5 to 1.9.6
- admin_section/common-function.php +170 -0
- admin_section/css/main-style.css +35 -0
- admin_section/css/main-style.min.css +1 -1218
- admin_section/fields-generator.php +1 -4
- admin_section/js/main-script.js +3 -2
- admin_section/js/main-script.min.js +1 -1944
- admin_section/settings.php +13 -0
- admin_section/structure_admin.php +7 -1
- core/3rd-party/aqua_resizer.php +104 -23
- output/function.php +39 -6
- output/output.php +116 -485
- output/review-output.php +3 -3
- output/service.php +95 -39
- readme.txt +14 -1
- structured-data-for-wp.php +2 -2
- view/paywall.php +2 -3
- view/post_specific.php +355 -514
- view/review.php +1 -1
- view/schema_type.php +220 -957
admin_section/common-function.php
CHANGED
@@ -476,6 +476,159 @@ if ( ! defined('ABSPATH') ) exit;
|
|
476 |
}
|
477 |
|
478 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
479 |
function saswp_import_wpsso_core_plugin_data(){
|
480 |
|
481 |
global $wpdb;
|
@@ -2398,5 +2551,22 @@ function saswp_context_url(){
|
|
2398 |
$url = 'https://schema.org';
|
2399 |
}
|
2400 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2401 |
return $url;
|
2402 |
}
|
476 |
}
|
477 |
|
478 |
}
|
479 |
+
|
480 |
+
function saswp_import_aiors_plugin_data(){
|
481 |
+
|
482 |
+
global $wpdb;
|
483 |
+
|
484 |
+
$schema_types = array('Event', 'Person', 'Product', 'Recipe', 'Article', 'Service', 'VideoObject', 'SoftwareApplication');
|
485 |
+
|
486 |
+
$args_event = get_option('bsf_event');
|
487 |
+
$args_person = get_option('bsf_person');
|
488 |
+
$args_product = get_option('bsf_product');
|
489 |
+
$args_recipe = get_option('bsf_recipe');
|
490 |
+
$args_soft = get_option('bsf_software');
|
491 |
+
$args_video = get_option('bsf_video');
|
492 |
+
$args_article = get_option('bsf_article');
|
493 |
+
$args_service = get_option('bsf_service');
|
494 |
+
|
495 |
+
$wpdb->query('START TRANSACTION');
|
496 |
+
$errorDesc = array();
|
497 |
+
|
498 |
+
foreach($schema_types as $schema){
|
499 |
+
|
500 |
+
$schema_post = array(
|
501 |
+
'post_title' => $schema,
|
502 |
+
'post_status' => 'publish',
|
503 |
+
'post_type' => 'saswp',
|
504 |
+
);
|
505 |
+
|
506 |
+
$data_group_array = array();
|
507 |
+
|
508 |
+
$data_group_array['group-0'] = array(
|
509 |
+
'data_array' => array(
|
510 |
+
array(
|
511 |
+
'key_1' => 'post_type',
|
512 |
+
'key_2' => 'equal',
|
513 |
+
'key_3' => 'post',
|
514 |
+
)
|
515 |
+
)
|
516 |
+
);
|
517 |
+
|
518 |
+
$saswp_meta_key = array(
|
519 |
+
'schema_type' => $schema,
|
520 |
+
'data_group_array' => $data_group_array,
|
521 |
+
'imported_from' => 'aiors',
|
522 |
+
);
|
523 |
+
|
524 |
+
$post_id = wp_insert_post($schema_post);
|
525 |
+
$guid = get_option('siteurl') .'/?post_type=saswp&p='.$post_id;
|
526 |
+
$wpdb->query("UPDATE ".$wpdb->prefix."posts SET guid ='".esc_sql($guid)."' WHERE ID ='".esc_sql($post_id)."'");
|
527 |
+
|
528 |
+
foreach ($saswp_meta_key as $key => $val){
|
529 |
+
update_post_meta($post_id, $key, $val);
|
530 |
+
}
|
531 |
+
|
532 |
+
$schema_options = array();
|
533 |
+
$meta_list = saswp_migrate_global_static_data($schema);
|
534 |
+
$schema_options['enable_custom_field'] = 1;
|
535 |
+
$fixed_text = array();
|
536 |
+
|
537 |
+
switch ($schema) {
|
538 |
+
|
539 |
+
case 'Event':
|
540 |
+
|
541 |
+
$fixed_text['saswp_event_schema_name'] = $args_event["event_title"];
|
542 |
+
$fixed_text['saswp_event_schema_location_name'] = $args_event["event_location"];
|
543 |
+
$fixed_text['saswp_event_schema_start_date'] = $args_event["start_time"];
|
544 |
+
$fixed_text['saswp_event_schema_end_date'] = $args_event["end_time"];
|
545 |
+
$fixed_text['saswp_event_schema_price'] = $args_event["events_price"];
|
546 |
+
$fixed_text['saswp_event_schema_description'] = $args_event["event_desc"];
|
547 |
+
|
548 |
+
break;
|
549 |
+
case 'Person':
|
550 |
+
|
551 |
+
$fixed_text['saswp_person_schema_name'] = $args_person["person_name"];
|
552 |
+
$fixed_text['saswp_person_schema_street_address'] = $args_person["person_address"];
|
553 |
+
$fixed_text['saswp_person_schema_job_title'] = $args_person["person_job_title"];
|
554 |
+
$fixed_text['saswp_person_schema_company'] = $args_person["person_company"];
|
555 |
+
$fixed_text['saswp_person_schema_website'] = $args_person["person_website"];
|
556 |
+
|
557 |
+
break;
|
558 |
+
case 'Product':
|
559 |
+
|
560 |
+
$fixed_text['saswp_product_name'] = $args_product["product_name"];
|
561 |
+
$fixed_text['saswp_product_brand'] = $args_product["product_brand"];
|
562 |
+
$fixed_text['saswp_product_price'] = $args_product["product_price"];
|
563 |
+
$fixed_text['saswp_product_availability'] = $args_product["product_avail"];
|
564 |
+
|
565 |
+
break;
|
566 |
+
case 'Recipe':
|
567 |
+
|
568 |
+
$fixed_text['saswp_recipe_name'] = $args_recipe["recipe_name"];
|
569 |
+
$fixed_text['saswp_recipe_author_name'] = $args_recipe["author_name"];
|
570 |
+
$fixed_text['saswp_recipe_date_published'] = $args_recipe["recipe_pub"];
|
571 |
+
$fixed_text['saswp_recipe_preptime'] = $args_recipe["recipe_prep"];
|
572 |
+
$fixed_text['saswp_recipe_cooktime'] = $args_recipe["recipe_cook"];
|
573 |
+
$fixed_text['saswp_recipe_totaltime'] = $args_recipe["recipe_time"];
|
574 |
+
$fixed_text['saswp_recipe_description'] = $args_recipe["recipe_desc"];
|
575 |
+
|
576 |
+
break;
|
577 |
+
case 'Article':
|
578 |
+
|
579 |
+
$fixed_text['saswp_article_image'] = $args_article["article_name"];
|
580 |
+
$fixed_text['saswp_article_headline'] = $args_article["snippet_title"];
|
581 |
+
$fixed_text['saswp_article_description'] = $args_article["article_desc"];
|
582 |
+
$fixed_text['saswp_article_author_name'] = $args_article["article_author"];
|
583 |
+
$fixed_text['saswp_article_organization_name'] = $args_article["article_publisher"];
|
584 |
+
$fixed_text['saswp_article_organization_logo'] = $args_article["article_publisher_logo"];
|
585 |
+
|
586 |
+
break;
|
587 |
+
case 'Service':
|
588 |
+
|
589 |
+
$fixed_text['saswp_service_schema_name'] = $args_service["snippet_title"];
|
590 |
+
$fixed_text['saswp_service_schema_type'] = $args_service["service_type"];
|
591 |
+
$fixed_text['saswp_service_schema_provider_name'] = $args_service["service_provider_name"];
|
592 |
+
$fixed_text['saswp_service_schema_area_served'] = $args_service["service_area"];
|
593 |
+
$fixed_text['saswp_service_schema_description'] = $args_service["service_desc"];
|
594 |
+
$fixed_text['saswp_service_schema_url'] = $args_service["service_url_link"];
|
595 |
+
|
596 |
+
break;
|
597 |
+
case 'VideoObject':
|
598 |
+
|
599 |
+
$fixed_text['saswp_video_object_headline'] = $args_video["video_title"];
|
600 |
+
$fixed_text['saswp_video_object_description'] = $args_video["video_desc"];
|
601 |
+
$fixed_text['saswp_video_object_upload_date'] = $args_video["video_date"];
|
602 |
+
$fixed_text['saswp_video_object_description'] = $args_video["video_desc"];
|
603 |
+
$fixed_text['saswp_video_object_duration'] = $args_video["video_time"];
|
604 |
+
|
605 |
+
break;
|
606 |
+
case 'SoftwareApplication':
|
607 |
+
|
608 |
+
$fixed_text['saswp_software_schema_name'] = $args_soft["software_name"];
|
609 |
+
$fixed_text['saswp_software_schema_operating_system'] = $args_soft["software_os"];
|
610 |
+
$fixed_text['saswp_software_schema_price'] = $args_soft["software_price"];
|
611 |
+
break;
|
612 |
+
default:
|
613 |
+
break;
|
614 |
+
}
|
615 |
+
|
616 |
+
update_post_meta( $post_id, 'schema_options', $schema_options);
|
617 |
+
update_post_meta( $post_id, 'saswp_meta_list_val', $meta_list);
|
618 |
+
update_post_meta( $post_id, 'saswp_fixed_text', $fixed_text);
|
619 |
+
|
620 |
+
}
|
621 |
+
|
622 |
+
if ( count($errorDesc) ){
|
623 |
+
echo implode("\n<br/>", $errorDesc);
|
624 |
+
$wpdb->query('ROLLBACK');
|
625 |
+
}else{
|
626 |
+
$wpdb->query('COMMIT');
|
627 |
+
return true;
|
628 |
+
}
|
629 |
+
|
630 |
+
}
|
631 |
+
|
632 |
function saswp_import_wpsso_core_plugin_data(){
|
633 |
|
634 |
global $wpdb;
|
2551 |
$url = 'https://schema.org';
|
2552 |
}
|
2553 |
|
2554 |
+
return $url;
|
2555 |
+
}
|
2556 |
+
|
2557 |
+
function saswp_get_permalink(){
|
2558 |
+
|
2559 |
+
$url = get_permalink();
|
2560 |
+
|
2561 |
+
if ((function_exists( 'ampforwp_is_amp_endpoint' ) && ampforwp_is_amp_endpoint()) || function_exists( 'is_amp_endpoint' ) && is_amp_endpoint()) {
|
2562 |
+
|
2563 |
+
if(function_exists('ampforwp_url_controller')){
|
2564 |
+
|
2565 |
+
$url = ampforwp_url_controller( $url );
|
2566 |
+
|
2567 |
+
}
|
2568 |
+
|
2569 |
+
}
|
2570 |
+
|
2571 |
return $url;
|
2572 |
}
|
admin_section/css/main-style.css
CHANGED
@@ -1181,3 +1181,38 @@ Google review module ends here
|
|
1181 |
border: 1px solid #aaa;
|
1182 |
border-radius: 4px;
|
1183 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1181 |
border: 1px solid #aaa;
|
1182 |
border-radius: 4px;
|
1183 |
}
|
1184 |
+
/** Notification CSS **/
|
1185 |
+
.updated.notice p{
|
1186 |
+
display: flex;
|
1187 |
+
width: 100%;
|
1188 |
+
align-items: center;
|
1189 |
+
}
|
1190 |
+
.updated.notice .dashicons-thumbs-up{
|
1191 |
+
margin-right:10px;
|
1192 |
+
}
|
1193 |
+
a.saswp-feedback-remindme, a.saswp-feedback-no-thanks{
|
1194 |
+
display: inline-block;
|
1195 |
+
cursor: pointer;
|
1196 |
+
}
|
1197 |
+
.saswp-feedback-remindme:after{
|
1198 |
+
content:",";
|
1199 |
+
display: inline-block;
|
1200 |
+
margin-right:5px;
|
1201 |
+
padding-left: 5px
|
1202 |
+
}
|
1203 |
+
a.saswp-revws-lnk{
|
1204 |
+
display: inline-block;
|
1205 |
+
background: #0085ba;
|
1206 |
+
padding: 12px 20px;
|
1207 |
+
color: #fff;
|
1208 |
+
text-decoration: none;
|
1209 |
+
border-radius: 3px;
|
1210 |
+
margin-left: 20px;
|
1211 |
+
font-size: 14px;
|
1212 |
+
line-height: 0.6;
|
1213 |
+
}
|
1214 |
+
.saswp-update-notice-btns{
|
1215 |
+
display: inline-block;
|
1216 |
+
width: 100%;
|
1217 |
+
margin-bottom: 5px;
|
1218 |
+
}
|
admin_section/css/main-style.min.css
CHANGED
@@ -1,1218 +1 @@
|
|
1 |
-
/*
|
2 |
-
To change this license header, choose License Headers in Project Properties.
|
3 |
-
To change this template file, choose Tools | Templates
|
4 |
-
and open the template in the editor.
|
5 |
-
*/
|
6 |
-
/*
|
7 |
-
Created on : Jul 27, 2018, 5:36:26 PM
|
8 |
-
Author : Magazine3
|
9 |
-
*/
|
10 |
-
.saswp_warning{
|
11 |
-
color: #ef6c00 !important;
|
12 |
-
}
|
13 |
-
|
14 |
-
.saswp_hide{
|
15 |
-
display: none;
|
16 |
-
}
|
17 |
-
.saswp-general table th{
|
18 |
-
width: auto;
|
19 |
-
font-weight: 600;
|
20 |
-
padding: 0px;
|
21 |
-
}
|
22 |
-
.saswp-general table{
|
23 |
-
margin-top: 0px;
|
24 |
-
}
|
25 |
-
.saswp-general table td{
|
26 |
-
padding: 5px;
|
27 |
-
}
|
28 |
-
.saswp-knowledge table th{
|
29 |
-
width: auto;
|
30 |
-
padding: 0px;
|
31 |
-
}
|
32 |
-
.saswp-knowledge table{
|
33 |
-
margin-top: 0px;
|
34 |
-
}
|
35 |
-
.saswp-knowledge table td{
|
36 |
-
padding: 5px;
|
37 |
-
}
|
38 |
-
.saswp-schema table th{
|
39 |
-
width: auto;
|
40 |
-
padding: 0px;
|
41 |
-
}
|
42 |
-
.saswp-schema table{
|
43 |
-
margin-top: 0px;
|
44 |
-
}
|
45 |
-
.saswp-schema table td{
|
46 |
-
padding: 5px;
|
47 |
-
}
|
48 |
-
.saswp-amp table th{
|
49 |
-
width: auto;
|
50 |
-
padding: 0px;
|
51 |
-
}
|
52 |
-
.saswp-amp table{
|
53 |
-
margin-top: 0px;
|
54 |
-
}
|
55 |
-
.saswp-amp table td{
|
56 |
-
padding: 5px;
|
57 |
-
}
|
58 |
-
.saswp-help table th{
|
59 |
-
width: auto;
|
60 |
-
padding: 0px;
|
61 |
-
}
|
62 |
-
.saswp-support table th{
|
63 |
-
width: auto;
|
64 |
-
padding: 0px;
|
65 |
-
}
|
66 |
-
.saswp-review table th{
|
67 |
-
width: auto;
|
68 |
-
padding: 0px;
|
69 |
-
}
|
70 |
-
.saswp-help table{
|
71 |
-
margin-top: 0px;
|
72 |
-
}
|
73 |
-
.saswp-help table td{
|
74 |
-
padding: 5px;
|
75 |
-
}
|
76 |
-
.saswp-settings-list{
|
77 |
-
display:inline-block;
|
78 |
-
width:100%
|
79 |
-
}
|
80 |
-
.saswp-settings-list li{
|
81 |
-
padding-left:0px;
|
82 |
-
}
|
83 |
-
.saswp-settings-list li div label{
|
84 |
-
font-weight: 600;
|
85 |
-
}
|
86 |
-
.saswp-general h2{
|
87 |
-
margin-bottom: 0px;
|
88 |
-
}
|
89 |
-
.saswp-knowledge h2{
|
90 |
-
margin-bottom: 0px;
|
91 |
-
}
|
92 |
-
.saswp-schema h2{
|
93 |
-
margin-bottom: 0px;
|
94 |
-
}
|
95 |
-
.saswp-help h2{
|
96 |
-
margin-bottom: 0px;
|
97 |
-
}
|
98 |
-
.saswp-settings-form p.submit{
|
99 |
-
margin-top:0px;
|
100 |
-
}
|
101 |
-
.saswp_qanda_p{
|
102 |
-
font-weight: 500;
|
103 |
-
}
|
104 |
-
.saswp-display-none{
|
105 |
-
display: none !important;
|
106 |
-
}
|
107 |
-
.saswp-placement-groups{
|
108 |
-
border: 1px solid #e5e5e5;
|
109 |
-
}
|
110 |
-
.saswp-query-success{
|
111 |
-
color: #006600;
|
112 |
-
}
|
113 |
-
.saswp-query-error{
|
114 |
-
color: #bf3322;
|
115 |
-
}
|
116 |
-
.saswp-tools table th{
|
117 |
-
width: auto;
|
118 |
-
padding: 0px;
|
119 |
-
}
|
120 |
-
.saswp-tools table{
|
121 |
-
margin-top: 0px;
|
122 |
-
}
|
123 |
-
.saswp-tools table td{
|
124 |
-
padding: 5px;
|
125 |
-
}
|
126 |
-
.saswp-tools-field-title strong{
|
127 |
-
padding-right: 130px;
|
128 |
-
}
|
129 |
-
.saswp-tools .saswp-tooltip{
|
130 |
-
width: 230px;
|
131 |
-
}
|
132 |
-
.saswp-tools .saswp-knowledge-label {
|
133 |
-
float: left;
|
134 |
-
}
|
135 |
-
.saswp-error{
|
136 |
-
color: #ff0000 !important;
|
137 |
-
}
|
138 |
-
/*
|
139 |
-
Tooltip css starts here
|
140 |
-
|
141 |
-
*/
|
142 |
-
.saswp-tooltip {
|
143 |
-
position: relative;
|
144 |
-
display: inline-block;
|
145 |
-
}
|
146 |
-
.saswp-tooltip .saswp-tooltiptext {
|
147 |
-
visibility: hidden;
|
148 |
-
width: 200px;
|
149 |
-
background-color: black;
|
150 |
-
color: #fff;
|
151 |
-
text-align: center;
|
152 |
-
border-radius: 6px;
|
153 |
-
padding: 5px 0;
|
154 |
-
|
155 |
-
/* Position the tooltip */
|
156 |
-
position: absolute;
|
157 |
-
z-index: 1;
|
158 |
-
bottom: 100%;
|
159 |
-
left: 50%;
|
160 |
-
margin-left: -25px;
|
161 |
-
}
|
162 |
-
/*.saswp-tooltip:hover .saswp-tooltiptext {
|
163 |
-
visibility: visible;
|
164 |
-
}*/
|
165 |
-
|
166 |
-
.saswp-tooltiptext::after {
|
167 |
-
content: "";
|
168 |
-
position: absolute;
|
169 |
-
top: 100%;
|
170 |
-
left: 10%;
|
171 |
-
margin-left: -5px;
|
172 |
-
border-width: 5px;
|
173 |
-
border-style: solid;
|
174 |
-
border-color: black transparent transparent transparent;
|
175 |
-
}
|
176 |
-
|
177 |
-
/*
|
178 |
-
Tooltip css ends here
|
179 |
-
|
180 |
-
*/
|
181 |
-
.saswp-knowledge-base .saswp-knowledge-label{
|
182 |
-
width:200px;
|
183 |
-
float:left;
|
184 |
-
clear: both;
|
185 |
-
|
186 |
-
}
|
187 |
-
.saswp-knowledge-base .saswp-knowledge-field{
|
188 |
-
width:75%;
|
189 |
-
float:right;
|
190 |
-
}
|
191 |
-
|
192 |
-
.saswp-social-fileds ul{
|
193 |
-
display: grid;
|
194 |
-
grid-template-columns: 26.5% 1fr;
|
195 |
-
}
|
196 |
-
.saswp-social-fileds li{
|
197 |
-
display: flex;
|
198 |
-
}
|
199 |
-
.saswp-social-fileds .saswp-knowledge-field{
|
200 |
-
width: 100%;
|
201 |
-
margin-left: 10px;
|
202 |
-
}
|
203 |
-
.saswp-social-fileds .saswp-knowledge-field input{
|
204 |
-
float: right;
|
205 |
-
margin: inherit;
|
206 |
-
}
|
207 |
-
.saswp-schema-type-fields .saswp-knowledge-label{
|
208 |
-
width:200px;
|
209 |
-
float:left;
|
210 |
-
clear: both;
|
211 |
-
}
|
212 |
-
.saswp-schema-type-fields .saswp-knowledge-field{
|
213 |
-
width:75%;
|
214 |
-
float:right;
|
215 |
-
}
|
216 |
-
.saswp-settings-first-div{
|
217 |
-
width: 70%;
|
218 |
-
}
|
219 |
-
.saswp-settings-container{
|
220 |
-
display: inline-flex;
|
221 |
-
width: 100%;
|
222 |
-
}
|
223 |
-
.saswp-settings-second-div{
|
224 |
-
float: right;
|
225 |
-
position: relative;
|
226 |
-
top: 20px;
|
227 |
-
margin-right: 30px;
|
228 |
-
margin-top: 37px;
|
229 |
-
}
|
230 |
-
.saswp-feedback-panel{
|
231 |
-
height: 200px;
|
232 |
-
width: 280px;
|
233 |
-
background: #ffffff;
|
234 |
-
position: relative;
|
235 |
-
|
236 |
-
}
|
237 |
-
.saswp-start-quck-setup{
|
238 |
-
position: relative;
|
239 |
-
float: inherit;
|
240 |
-
top: 7px;
|
241 |
-
left:15px;
|
242 |
-
}
|
243 |
-
.saswp-feedback-panel ul{
|
244 |
-
list-style-type: circle;
|
245 |
-
list-style:decimal;
|
246 |
-
padding-left: 30px;
|
247 |
-
font-size: 15px;
|
248 |
-
|
249 |
-
}
|
250 |
-
.saswp-feedback-panel a{
|
251 |
-
text-decoration: none;
|
252 |
-
|
253 |
-
}
|
254 |
-
.saswp-feedback-panel h2{
|
255 |
-
text-align: center;
|
256 |
-
padding-top: 18px;
|
257 |
-
|
258 |
-
}
|
259 |
-
.saswp-social-sharing-buttons {
|
260 |
-
text-align: center;
|
261 |
-
padding-top: 20px;
|
262 |
-
|
263 |
-
|
264 |
-
}
|
265 |
-
.saswp-facebook-share{
|
266 |
-
background: #3B5998;
|
267 |
-
box-shadow: 0 0px 0 #1b95e0 !important;
|
268 |
-
color: #fff !important;
|
269 |
-
line-height: 20px !important;
|
270 |
-
height: 21px !important;
|
271 |
-
border-radius: 3px;
|
272 |
-
margin-right: 5px;
|
273 |
-
}
|
274 |
-
.saswp-social-sharing-buttons a{
|
275 |
-
text-align: center;
|
276 |
-
padding: 8px;
|
277 |
-
|
278 |
-
|
279 |
-
}
|
280 |
-
.twitter-share-button{
|
281 |
-
background: #1b95e0 !important;
|
282 |
-
box-shadow: 0 0px 0 #1b95e0 !important;
|
283 |
-
color:#fff !important;
|
284 |
-
line-height: 20px !important;
|
285 |
-
height: 21px !important;
|
286 |
-
border-radius: 3px;
|
287 |
-
margin-left: 5px;
|
288 |
-
|
289 |
-
}
|
290 |
-
.saswp-placement-button{
|
291 |
-
padding: 3px 10px;
|
292 |
-
color: #0d0d0d;
|
293 |
-
font-size: 14px;
|
294 |
-
border: 1px solid #aaa;
|
295 |
-
border-radius: 2px;
|
296 |
-
background: linear-gradient(#ededed, #ffffff);
|
297 |
-
}
|
298 |
-
.saswp-placement-table td {
|
299 |
-
padding: 5px 10px !important;
|
300 |
-
}
|
301 |
-
.saswp-archive-div .saswp-knowledge-field{
|
302 |
-
float: right;
|
303 |
-
width: 75%;
|
304 |
-
padding-bottom: 10px;
|
305 |
-
}
|
306 |
-
.saswp-archive-div .saswp-knowledge-label{
|
307 |
-
float:left;
|
308 |
-
clear: both;
|
309 |
-
}
|
310 |
-
|
311 |
-
.saswp-amp .saswp-knowledge-field{
|
312 |
-
float: right;
|
313 |
-
width: 75%;
|
314 |
-
padding-bottom: 10px;
|
315 |
-
}
|
316 |
-
.saswp-amp .saswp-knowledge-label{
|
317 |
-
float:left;
|
318 |
-
clear: both;
|
319 |
-
}
|
320 |
-
|
321 |
-
.saswp-review .saswp-knowledge-field{
|
322 |
-
float: right;
|
323 |
-
width: 75%;
|
324 |
-
padding-bottom: 10px;
|
325 |
-
}
|
326 |
-
.saswp-review .saswp-knowledge-label{
|
327 |
-
float:left;
|
328 |
-
clear: both;
|
329 |
-
}
|
330 |
-
|
331 |
-
.saswp-compativility-div .saswp-knowledge-field{
|
332 |
-
float: right;
|
333 |
-
width: 75%;
|
334 |
-
padding-bottom: 10px;
|
335 |
-
}
|
336 |
-
.saswp-compativility-div .saswp-knowledge-label{
|
337 |
-
float:left;
|
338 |
-
clear: both;
|
339 |
-
}
|
340 |
-
.saswp-compativility-div li {
|
341 |
-
display: inline-flex;
|
342 |
-
}
|
343 |
-
.saswp-seller-div .saswp-knowledge-label{
|
344 |
-
float: left;
|
345 |
-
|
346 |
-
clear: both;
|
347 |
-
}
|
348 |
-
.saswp-seller-div .saswp-knowledge-field{
|
349 |
-
float: left;
|
350 |
-
width: 70%;
|
351 |
-
}
|
352 |
-
.saswp-post-specific-tab-wrapper{
|
353 |
-
display: inline-block;
|
354 |
-
width: 25%;
|
355 |
-
vertical-align: top;
|
356 |
-
box-sizing: border-box;
|
357 |
-
padding-right:10px;
|
358 |
-
}
|
359 |
-
.saswp-post-specific-container{
|
360 |
-
display: inline-block;
|
361 |
-
width: calc(75% - 1px );
|
362 |
-
border-left: 1px solid #eee;
|
363 |
-
}
|
364 |
-
.saswp-post-specific-wrapper{
|
365 |
-
padding: 10px;
|
366 |
-
}
|
367 |
-
.saswp-tab a.selected {
|
368 |
-
background-color: #ccc;
|
369 |
-
}
|
370 |
-
.saswp-tab-links{
|
371 |
-
display: block;
|
372 |
-
background-color: inherit;
|
373 |
-
color: black;
|
374 |
-
padding: 6px 10px;
|
375 |
-
outline: none;
|
376 |
-
text-align: left;
|
377 |
-
cursor: pointer;
|
378 |
-
transition: 0.3s;
|
379 |
-
font-size: 15px;
|
380 |
-
width: 130px;
|
381 |
-
overflow: hidden;
|
382 |
-
margin-right: 10px;
|
383 |
-
}
|
384 |
-
.saswp-star-rating{
|
385 |
-
cursor: pointer;
|
386 |
-
}
|
387 |
-
.saswp-post-specific-wrapper select{
|
388 |
-
width: 100%;
|
389 |
-
}
|
390 |
-
.saswp-review-tables{
|
391 |
-
width: 100%;
|
392 |
-
}
|
393 |
-
.saswp-over-all-raring{
|
394 |
-
float: right;
|
395 |
-
}
|
396 |
-
|
397 |
-
.saswp-review-pros-and-cons{
|
398 |
-
position: relative;
|
399 |
-
clear:both;
|
400 |
-
}
|
401 |
-
.saswp-review-pros-and-cons > div:first{
|
402 |
-
padding-left: 10px;
|
403 |
-
}
|
404 |
-
.saswp-review-pros-and-cons > div{
|
405 |
-
width: 49%;
|
406 |
-
display: inline-block;
|
407 |
-
}
|
408 |
-
.saswp-review-pros-and-cons > div:nth-child(2){
|
409 |
-
padding-left: 12px;
|
410 |
-
}
|
411 |
-
.saswp-wp-ediot-desc{
|
412 |
-
margin-bottom: -23px;
|
413 |
-
display: block;
|
414 |
-
}
|
415 |
-
.saswp-review-description{
|
416 |
-
margin-top: 40px;
|
417 |
-
padding-top: 10px;
|
418 |
-
border-top: 1px solid #eee;
|
419 |
-
}
|
420 |
-
.saswp-review-pros-and-cons{
|
421 |
-
margin-top: 40px;
|
422 |
-
padding-top: 10px;
|
423 |
-
border-top: 1px solid #eee;
|
424 |
-
}
|
425 |
-
.saspw-review-item-list{
|
426 |
-
margin-top: 20px;
|
427 |
-
border-top: 1px solid #eee;
|
428 |
-
}
|
429 |
-
.saswp-review-item-list-table{
|
430 |
-
padding-bottom: 10px;
|
431 |
-
}
|
432 |
-
#sasw-review input[type=text] {
|
433 |
-
width: 180px;
|
434 |
-
}
|
435 |
-
#sasw-review input[type=number] {
|
436 |
-
width: 180px;
|
437 |
-
}
|
438 |
-
#saswp-review-item-enable{
|
439 |
-
width: 10px;
|
440 |
-
}
|
441 |
-
.saswp-enable-review-on-post{
|
442 |
-
padding-bottom: 10px;
|
443 |
-
}
|
444 |
-
.saswp-enable-review-on-post label{
|
445 |
-
font-weight: 500;
|
446 |
-
}
|
447 |
-
/*
|
448 |
-
Compatibility tab css starts here
|
449 |
-
*/
|
450 |
-
.saswp-compatibility table th{
|
451 |
-
width: auto;
|
452 |
-
padding: 0px;
|
453 |
-
}
|
454 |
-
.saswp-compatibility .saswp-knowledge-label {
|
455 |
-
float: left;
|
456 |
-
clear: both;
|
457 |
-
}
|
458 |
-
.saswp-tools .saswp-knowledge-label {
|
459 |
-
float: left;
|
460 |
-
clear: both;
|
461 |
-
}
|
462 |
-
.saswp-tools .saswp-knowledge-field {
|
463 |
-
float: right;
|
464 |
-
width: 69%;
|
465 |
-
padding-bottom: 10px;
|
466 |
-
}
|
467 |
-
.saswp_kg_logo, .saswp_person_fields{
|
468 |
-
background-color: #fff !important;
|
469 |
-
}
|
470 |
-
.saswp_image_thumbnail{
|
471 |
-
padding-top: 5px;
|
472 |
-
display: inline-block;
|
473 |
-
}
|
474 |
-
.saswp-compatibility .saswp-knowledge-field {
|
475 |
-
float: right;
|
476 |
-
width: 75%;
|
477 |
-
padding-bottom: 10px;
|
478 |
-
}
|
479 |
-
.saswp-schem-type-note, .saswp-job-posting-note{
|
480 |
-
color: chocolate;
|
481 |
-
}
|
482 |
-
.saswp-custom-fields-name{
|
483 |
-
border: 1px solid #aaa;
|
484 |
-
border-radius: 4px;
|
485 |
-
}
|
486 |
-
/*
|
487 |
-
Compatibility tab css ends
|
488 |
-
*/
|
489 |
-
.saswp-option-table-class p{
|
490 |
-
margin: auto;
|
491 |
-
font-style: italic;
|
492 |
-
color: #666;
|
493 |
-
}
|
494 |
-
/*
|
495 |
-
On/Off Buttons starts here
|
496 |
-
*/
|
497 |
-
.saswp-switch {
|
498 |
-
position: relative;
|
499 |
-
display: inline-block;
|
500 |
-
width: 40px;
|
501 |
-
height: 22px;
|
502 |
-
border: 20px;
|
503 |
-
}
|
504 |
-
|
505 |
-
.saswp-switch input {
|
506 |
-
opacity: 0;
|
507 |
-
width: 0;
|
508 |
-
height: 0;
|
509 |
-
}
|
510 |
-
|
511 |
-
.saswp-slider {
|
512 |
-
position: absolute;
|
513 |
-
cursor: pointer;
|
514 |
-
top: 0;
|
515 |
-
left: 0;
|
516 |
-
right: 0;
|
517 |
-
bottom: 0;
|
518 |
-
background-color: #5a6783;
|
519 |
-
transition: .4s;
|
520 |
-
border-radius: 20px;
|
521 |
-
}
|
522 |
-
|
523 |
-
.saswp-slider:before {
|
524 |
-
position: absolute;
|
525 |
-
content: "";
|
526 |
-
height: 15px;
|
527 |
-
width: 15px;
|
528 |
-
left: 4px;
|
529 |
-
bottom: 4px;
|
530 |
-
background-color: white;
|
531 |
-
transition: .4s;
|
532 |
-
border-radius: 20px;
|
533 |
-
}
|
534 |
-
|
535 |
-
input:checked + .saswp-slider {
|
536 |
-
background-color: #61bd3b;
|
537 |
-
border-radius: 30px;
|
538 |
-
}
|
539 |
-
|
540 |
-
input:focus + .saswp-slider {
|
541 |
-
box-shadow: 0 0 1px #2196F3;
|
542 |
-
}
|
543 |
-
|
544 |
-
input:checked + .saswp-slider:before {
|
545 |
-
|
546 |
-
transform: translateX(15px);
|
547 |
-
}
|
548 |
-
|
549 |
-
/* Rounded sliders */
|
550 |
-
.saswp-slider.saswp-round {
|
551 |
-
border-radius: 34px;
|
552 |
-
}
|
553 |
-
|
554 |
-
.saswp-slider.saswp-round:before {
|
555 |
-
border-radius: 50%;
|
556 |
-
}
|
557 |
-
|
558 |
-
.saswp-tab-nav li{
|
559 |
-
display: flex;
|
560 |
-
align-items: center;
|
561 |
-
justify-content: space-between;
|
562 |
-
margin-bottom:10px;
|
563 |
-
border-bottom: 1px solid #eee;
|
564 |
-
}
|
565 |
-
|
566 |
-
.saswp-tab-nav .selected{
|
567 |
-
background-color: #ccc;
|
568 |
-
}
|
569 |
-
.saswp-single-post-restore .saswp-switch{
|
570 |
-
height: 28px;
|
571 |
-
}
|
572 |
-
.saswp-single-post-restore .saswp-slider:before{
|
573 |
-
height: 20px;
|
574 |
-
}
|
575 |
-
/*
|
576 |
-
On/Off Buttons ends here
|
577 |
-
*/
|
578 |
-
.saswp-wdi-rate-stars{display:inline-block;color:#ffb900;position:relative;top:3px;}
|
579 |
-
.saswp-wdi-rate-stars svg{fill:#ffb900;}
|
580 |
-
.saswp-wdi-rate-stars svg:hover{fill:#ffb900}
|
581 |
-
.saswp-wdi-rate-stars svg:hover ~ svg{fill:none;}
|
582 |
-
|
583 |
-
.option-table-class {width:100%;}
|
584 |
-
.option-table-class tr td {padding: 10px 10px 10px 10px ;}
|
585 |
-
.option-table-class tr > td{width: 30%;}
|
586 |
-
.option-table-class tr td:last-child{width: 60%;}
|
587 |
-
|
588 |
-
.saswp-custom-fields-table{
|
589 |
-
width: 100%;
|
590 |
-
}
|
591 |
-
.saswp-custom-fields-table input{
|
592 |
-
width: 100%;
|
593 |
-
}
|
594 |
-
.saswp-custom-fields-table tr td {padding: 10px 10px 10px 10px ;}
|
595 |
-
.saswp-custom-fields-table td{
|
596 |
-
width: 30%;
|
597 |
-
}
|
598 |
-
|
599 |
-
.saswp-option-table-class input[type="text"], .saswp-option-table-class select{
|
600 |
-
width:100%;
|
601 |
-
}
|
602 |
-
.saswp-paywall-table-class input[type="text"], .saswp-paywall-table-class select{
|
603 |
-
width:100%;
|
604 |
-
}
|
605 |
-
|
606 |
-
/*
|
607 |
-
Compatibility tab css starts here
|
608 |
-
*/
|
609 |
-
.saswp-email_schema table th{
|
610 |
-
width: auto;
|
611 |
-
padding: 0px;
|
612 |
-
}
|
613 |
-
.saswp-email_schema .saswp-knowledge-label {
|
614 |
-
float: left;
|
615 |
-
clear: both;
|
616 |
-
}
|
617 |
-
.saswp-email_schema .saswp-knowledge-field {
|
618 |
-
float: right;
|
619 |
-
width: 75%;
|
620 |
-
padding-bottom: 10px;
|
621 |
-
}
|
622 |
-
/*
|
623 |
-
Compatibility tab css ends
|
624 |
-
*/
|
625 |
-
.saswp-add-on-plugin label{
|
626 |
-
margin-top: 10px;
|
627 |
-
}
|
628 |
-
.saswp-add-on-plugin span{
|
629 |
-
width: 250px;
|
630 |
-
display: inline-block;
|
631 |
-
}
|
632 |
-
.saswp-knowledge-label label[for="saswp_search_box_schema_checkbox"] {
|
633 |
-
padding-left: 10px;
|
634 |
-
}
|
635 |
-
|
636 |
-
.saswp-knowledge-label label[for="saswp-woocommerce-booking-checkbox"] {
|
637 |
-
padding-left: 10px;
|
638 |
-
}
|
639 |
-
|
640 |
-
.saswp-knowledge-label label[for="saswp-woocommerce-membership-checkbox"] {
|
641 |
-
padding-left: 10px;
|
642 |
-
}
|
643 |
-
|
644 |
-
.saswp-global-selected{
|
645 |
-
color: #000000;
|
646 |
-
font-weight: 500;
|
647 |
-
}
|
648 |
-
#saswp-global-tabs a{
|
649 |
-
cursor: pointer;
|
650 |
-
}
|
651 |
-
#saswp-global-tabs{
|
652 |
-
padding-left: 5px;
|
653 |
-
}
|
654 |
-
#saswp-tools-tabs a{
|
655 |
-
cursor: pointer;
|
656 |
-
}
|
657 |
-
#saswp-review-tabs a{
|
658 |
-
cursor: pointer;
|
659 |
-
}
|
660 |
-
#saswp-tools-tabs{
|
661 |
-
padding-left: 5px;
|
662 |
-
}
|
663 |
-
.saswp-need-help {
|
664 |
-
padding-left: 60px;
|
665 |
-
}
|
666 |
-
.saswp-heading{
|
667 |
-
display: inline-flex;
|
668 |
-
align-items: baseline;
|
669 |
-
}
|
670 |
-
.saswp-heading h2{
|
671 |
-
margin-bottom: 0px;
|
672 |
-
}
|
673 |
-
.saswp-view-docs a{
|
674 |
-
margin-right: 5px !important;
|
675 |
-
margin-top: 10px !important;
|
676 |
-
}
|
677 |
-
.saswp-tabs .nav-tab{
|
678 |
-
margin-left: 4px;
|
679 |
-
}
|
680 |
-
|
681 |
-
/*
|
682 |
-
Google review module starts here
|
683 |
-
*/
|
684 |
-
.saswp-panel {
|
685 |
-
padding: 7px 18px;
|
686 |
-
background-color: white;
|
687 |
-
box-shadow: 0px 0px 20px 1px #d2cccc;
|
688 |
-
}
|
689 |
-
|
690 |
-
/*** Review Design CSS ****/
|
691 |
-
.saswp-g-review-header{
|
692 |
-
margin-top: 50px;
|
693 |
-
}
|
694 |
-
.saswp-g-review-body{
|
695 |
-
display:inline-grid;
|
696 |
-
grid-template-columns: 1fr 300px;
|
697 |
-
grid-gap:30px;
|
698 |
-
margin-top:30px;
|
699 |
-
}
|
700 |
-
.saswp-review-list{}
|
701 |
-
.saswp-channel-list{
|
702 |
-
margin-right: 15px;
|
703 |
-
}
|
704 |
-
.saswp-input-fields{
|
705 |
-
display: inline-flex;
|
706 |
-
align-items: center;
|
707 |
-
margin-bottom: 8px;
|
708 |
-
width: 100%;
|
709 |
-
}
|
710 |
-
.saswp-input-fields label{
|
711 |
-
width: 130px;
|
712 |
-
}
|
713 |
-
.saswp-input-fields select{
|
714 |
-
width:100%;
|
715 |
-
}
|
716 |
-
.saswp-panel h3{
|
717 |
-
font-size: 20px;
|
718 |
-
line-height: 1.4;
|
719 |
-
color: #222;
|
720 |
-
text-align: center;
|
721 |
-
margin: 10px 0px 20px 0px;
|
722 |
-
}
|
723 |
-
.saswp-input-fields a.button-primary{
|
724 |
-
margin-top:10px;
|
725 |
-
}
|
726 |
-
.saswp-glg-review-body{
|
727 |
-
display: grid;
|
728 |
-
grid-template-columns: 100px 1fr;
|
729 |
-
grid-gap: 20px;
|
730 |
-
background: #fff;
|
731 |
-
padding: 20px;
|
732 |
-
box-shadow: 0px 0px 20px 1px #d2cccc;
|
733 |
-
margin-bottom: 30px;
|
734 |
-
}
|
735 |
-
.saswp-g-plus{
|
736 |
-
float: right;
|
737 |
-
font-size: 15px;
|
738 |
-
}
|
739 |
-
.saswp-rtng{
|
740 |
-
padding-left: 5px;
|
741 |
-
font-size: 14px;
|
742 |
-
}
|
743 |
-
.saswp-pt-dt {
|
744 |
-
font-size: 12px;
|
745 |
-
color: #999;
|
746 |
-
font-weight: 600;
|
747 |
-
margin-top: 5px;
|
748 |
-
display: inline-block;
|
749 |
-
}
|
750 |
-
.saswp-str{
|
751 |
-
display: inline-block;
|
752 |
-
width: 100%;
|
753 |
-
vertical-align: middle;
|
754 |
-
}
|
755 |
-
.saswp-athr{
|
756 |
-
font-size: 15px;
|
757 |
-
line-height: 1.4;
|
758 |
-
color: #000;
|
759 |
-
font-weight: bold;
|
760 |
-
display: inline-block;
|
761 |
-
vertical-align: middle;
|
762 |
-
}
|
763 |
-
.saswp-str-rtng .saswp-rvw-str{
|
764 |
-
display: inline-block;
|
765 |
-
vertical-align: middle;
|
766 |
-
padding-left: 10px;
|
767 |
-
width: auto;
|
768 |
-
}
|
769 |
-
.saswp-rv-cnt p{
|
770 |
-
font-size: 16px;
|
771 |
-
line-height: 1.6;
|
772 |
-
color: #000;
|
773 |
-
margin: 10px 0px 0px 0px;
|
774 |
-
}
|
775 |
-
.saswp-rv-img img{
|
776 |
-
max-width:100px;
|
777 |
-
border-radius: 100%;
|
778 |
-
}
|
779 |
-
/*
|
780 |
-
Google review module ends here
|
781 |
-
*/
|
782 |
-
|
783 |
-
/** Premium Feature CSS **/
|
784 |
-
.saswp-premium_features table th, .saswp-services table th{
|
785 |
-
width: auto;
|
786 |
-
padding: 0px;
|
787 |
-
}
|
788 |
-
.saswp-features-blocks{
|
789 |
-
display: inline-grid;
|
790 |
-
grid-template-columns: 1fr 1fr;
|
791 |
-
grid-gap: 20px;
|
792 |
-
}
|
793 |
-
.saswp-features-blocks li{
|
794 |
-
background:#fff;
|
795 |
-
padding: 25px;
|
796 |
-
border: 1px solid #d8d8d8;
|
797 |
-
}
|
798 |
-
.saswp-features-blocks li a{
|
799 |
-
text-decoration: none;
|
800 |
-
}
|
801 |
-
.saswp-ele-ic{
|
802 |
-
border-radius: 256px;
|
803 |
-
display: inline-block;
|
804 |
-
padding:8px 10px 8px 10px;
|
805 |
-
width: 70px;
|
806 |
-
margin-right: 20px;
|
807 |
-
float: left;
|
808 |
-
}
|
809 |
-
.saswp-ele-ic img{
|
810 |
-
width:100%;
|
811 |
-
}
|
812 |
-
.saswp-ele-1{
|
813 |
-
background: #96588a;
|
814 |
-
}
|
815 |
-
.saswp-ele-2{
|
816 |
-
background: #00a97e;
|
817 |
-
}
|
818 |
-
.saswp-ele-3{
|
819 |
-
background: #cacaca;
|
820 |
-
}.saswp-ele-4{
|
821 |
-
background: #9c56cc;
|
822 |
-
}
|
823 |
-
.saswp-ele-tlt h3{
|
824 |
-
margin:0;
|
825 |
-
font-size: 18px;
|
826 |
-
line-height: 1.4;
|
827 |
-
}
|
828 |
-
.saswp-ele-tlt p{
|
829 |
-
margin-top:10px;
|
830 |
-
}
|
831 |
-
.saswp-sts-btn{
|
832 |
-
box-sizing: border-box;
|
833 |
-
height: 52px;
|
834 |
-
margin-top: 20px;
|
835 |
-
padding: 6px 15px;
|
836 |
-
border: 1px solid #e5e5e5;
|
837 |
-
border-radius: 3px;
|
838 |
-
display: flex;
|
839 |
-
align-items: center;
|
840 |
-
justify-content: space-between;
|
841 |
-
}
|
842 |
-
.saswp-d-btn{
|
843 |
-
background: #d2150a;
|
844 |
-
padding: 6px 18px;
|
845 |
-
border-radius: 30px;
|
846 |
-
font-size: 14px;
|
847 |
-
color: #fff;
|
848 |
-
}
|
849 |
-
.form-wrap .saswp-sts-txt{
|
850 |
-
font-size: 16px;
|
851 |
-
color:#000;
|
852 |
-
}
|
853 |
-
.saswp-sts-txt span{
|
854 |
-
color:#bebfc0;
|
855 |
-
padding-left:5px;
|
856 |
-
}
|
857 |
-
|
858 |
-
/** star rating Feature CSS **/
|
859 |
-
.saswp_review_platform .saswp-g-plus{
|
860 |
-
float: left;
|
861 |
-
}
|
862 |
-
.saswp-pc-wrap{background-color:#004f74;padding:15px 15px 15px 30px;color:#fff;display:inline-flex;width:100%;flex-wrap:wrap;margin-bottom:20px}.saswp-pc-wrap .saswp-lst span{font-size:18px;font-weight:500;margin-bottom:10px;display:inline-block;line-height:1.3}.saswp-pc-wrap .saswp-lst{flex:1 0 42%}.saswp-pc-wrap .saswp-lst ul{margin:0}.saswp-pc-wrap .saswp-lst p{list-style-type:none;font-size:15px;font-weight:lighter;line-height:1.2;margin-bottom:10px;position:relative;padding-left:20px;color:#eee}.saswp-pc-wrap .saswp-lst p:before{content:'';position:absolute;width:8px;height:8px;background-color:#ccc;left:0;top:6px;border-radius:10px}.sgl .saswp-rvw{width:100%;margin-bottom:34px;font-size:13px;border-bottom:1px solid #ededed}.saswp-rvw-hd span,.saswp-rvw-sm span{background-color:#222;color:#fff;display:inline-block;font-size:15px}.saswp-rvw-hd span{line-height:1.4;padding:8px 12px 6px;margin:26px 0}.saswp-rvw td{padding:7px 14px}.saswp-rvw td,.sgl table td{border:1px solid #ededed}.saswp-rvw tbody{width:100%}.saswp-rvw-sm span{padding:8px 12px 6px;margin-bottom:13px;position:relative;line-height:1.2}.saswp-rvw-fs{line-height:1.5;font-size:48px;font-weight:600;margin-bottom:5px}.saswp-rvw-ov .ovs{font-size:11px;font-weight:600}.sgl .saswp-rvw tr td{background:#fff;width:100%}.sgl .saswp-rvw tr:hover td{background-color:#fcfcfc}.saswp-rvw .saswp-rvw-sm{padding:21px 14px}
|
863 |
-
.str-ic{font-size:18px;line-height:1.2}.saswp-rvw-str{display:inline-flex;width:100%}.saswp-rvw-str .df-clr,.saswp-rvw-str .half-str,.saswp-rvw-str .str-ic{display:inline-block;width:20px;height:16px;background-repeat:no-repeat}.saswp-rvw-ov{text-align:center}.saswp-rvw-str .half-str{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNNDgyLjIwNywxODYuOTczbC0xNTkuNjk5LTMzLjcwNUwyNDEuMTA0LDExLjgwM2wtODEuNDA0LDE0MS40NjVMMCwxODYuOTczbDEwOS4zODgsMTIxLjEzNEw5Mi4wOTQsNDcwLjQwNGwxNDkuMDEtNjYuNiAgbDE0OS4wMSw2Ni42bC0xNy4yOTQtMTYyLjI5Nkw0ODIuMjA3LDE4Ni45NzN6IE0yNDEuMTA0LDM3MC45NDNWNzEuOTUzbDYyLjA5LDEwNy45TDQyNSwyMDUuNTYxbC04My40MzMsOTIuMzkzbDEzLjE5MSwxMjMuNzg4ICBMMjQxLjEwNCwzNzAuOTQzeiIgZmlsbD0iI2ZmZDcwMCIvPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K)}.saswp-rvw-str .str-ic{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiNmZmQ3MDAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-rvw-str .df-clr{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiM2MzVlNjMiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}
|
864 |
-
/*** Review Design CSS ****/
|
865 |
-
.saswp-g-review-header{
|
866 |
-
margin-top: 50px;
|
867 |
-
}
|
868 |
-
.saswp-g-review-body{
|
869 |
-
display:inline-grid;
|
870 |
-
grid-template-columns: 1fr 300px;
|
871 |
-
grid-gap:30px;
|
872 |
-
margin-top:30px;
|
873 |
-
width:100%;
|
874 |
-
}
|
875 |
-
.saswp-review-list{}
|
876 |
-
.saswp-channel-list{
|
877 |
-
margin-right: 15px;
|
878 |
-
}
|
879 |
-
.saswp-input-fields{
|
880 |
-
display: inline-flex;
|
881 |
-
align-items: center;
|
882 |
-
margin-bottom: 8px;
|
883 |
-
width: 100%;
|
884 |
-
}
|
885 |
-
.saswp-input-fields label{
|
886 |
-
width: 130px;
|
887 |
-
}
|
888 |
-
.saswp-panel h3{
|
889 |
-
font-size: 20px;
|
890 |
-
line-height: 1.4;
|
891 |
-
color: #222;
|
892 |
-
text-align: center;
|
893 |
-
margin: 10px 0px 20px 0px;
|
894 |
-
}
|
895 |
-
.saswp-input-fields a.button-primary{
|
896 |
-
margin-top:10px;
|
897 |
-
}
|
898 |
-
.saswp-glg-review-body{
|
899 |
-
display: grid;
|
900 |
-
grid-template-columns: 100px 1fr;
|
901 |
-
grid-gap: 20px;
|
902 |
-
background: #fff;
|
903 |
-
padding: 20px;
|
904 |
-
box-shadow: 0px 0px 20px 1px #d2cccc;
|
905 |
-
margin-bottom: 30px;
|
906 |
-
}
|
907 |
-
.saswp-g-plus{
|
908 |
-
float: right;
|
909 |
-
font-size: 15px;
|
910 |
-
width: 20px;
|
911 |
-
height: 20px;
|
912 |
-
}
|
913 |
-
.saswp-g-plus img{
|
914 |
-
max-width:100%;
|
915 |
-
}
|
916 |
-
.saswp-rtng{
|
917 |
-
padding-left: 5px;
|
918 |
-
font-size: 14px;
|
919 |
-
}
|
920 |
-
.saswp-pt-dt {
|
921 |
-
font-size: 12px;
|
922 |
-
color: #999;
|
923 |
-
font-weight: 600;
|
924 |
-
margin-top: 5px;
|
925 |
-
display: inline-block;
|
926 |
-
}
|
927 |
-
.saswp-athr{
|
928 |
-
font-size: 15px;
|
929 |
-
line-height: 1.4;
|
930 |
-
color: #000;
|
931 |
-
font-weight: bold;
|
932 |
-
}
|
933 |
-
.saswp-rv-cnt p{
|
934 |
-
font-size: 16px;
|
935 |
-
line-height: 1.6;
|
936 |
-
color: #000;
|
937 |
-
margin: 10px 0px 0px 0px;
|
938 |
-
}
|
939 |
-
.saswp-rv-img img{
|
940 |
-
max-width:100px;
|
941 |
-
}
|
942 |
-
.saswp-g-review-header div{
|
943 |
-
margin-top:10px;
|
944 |
-
}
|
945 |
-
|
946 |
-
/*** Upgrade Pro CSS ***/
|
947 |
-
.saswp-upgrade-pro{
|
948 |
-
background: #fff;
|
949 |
-
padding: 25px;
|
950 |
-
border: 1px solid #d8d8d8;
|
951 |
-
display: inline-block;
|
952 |
-
margin-top: 10px;
|
953 |
-
width: 81%;
|
954 |
-
}
|
955 |
-
.saswp-upgrade-pro h2{
|
956 |
-
font-size: 20px;
|
957 |
-
margin: 0;
|
958 |
-
color: #23282d;
|
959 |
-
font-weight: 600;
|
960 |
-
text-align: center;
|
961 |
-
}
|
962 |
-
.saswp-upgrade-pro ul{
|
963 |
-
margin: 25px 0px 20px 0px;
|
964 |
-
display: inline-block;
|
965 |
-
}
|
966 |
-
.saswp-upgrade-pro ul li{
|
967 |
-
position: relative;
|
968 |
-
padding-left: 30px;
|
969 |
-
font-size: 14px;
|
970 |
-
line-height: 1.4;
|
971 |
-
margin-bottom: 10px;
|
972 |
-
}
|
973 |
-
.saswp-upgrade-pro ul li:before {
|
974 |
-
content: "";
|
975 |
-
background-image: url(../images/check.png);
|
976 |
-
background-repeat: no-repeat;
|
977 |
-
background-size: 20px;
|
978 |
-
width: 20px;
|
979 |
-
height: 20px;
|
980 |
-
position: absolute;
|
981 |
-
left: 2px;
|
982 |
-
top: 2px;
|
983 |
-
}
|
984 |
-
.saswp-upgrade-pro a{
|
985 |
-
background: #d2150a;
|
986 |
-
padding: 10px 0px;
|
987 |
-
display: block;
|
988 |
-
text-align: center;
|
989 |
-
color: #fff;
|
990 |
-
text-decoration: none;
|
991 |
-
font-size: 16px;
|
992 |
-
font-weight: 600;
|
993 |
-
letter-spacing: 1px;
|
994 |
-
border-radius: 5px;
|
995 |
-
}
|
996 |
-
.saswp_image_prev{
|
997 |
-
max-width: 200px;
|
998 |
-
max-height: 200px;
|
999 |
-
float: left;
|
1000 |
-
padding-left:2px;
|
1001 |
-
}
|
1002 |
-
.saswp_prev_close {
|
1003 |
-
position: relative;
|
1004 |
-
width:30px;
|
1005 |
-
height:30px;
|
1006 |
-
top: 12px;
|
1007 |
-
font-size: 20px;
|
1008 |
-
top: -5px;
|
1009 |
-
text-decoration:none;
|
1010 |
-
}
|
1011 |
-
.saswp-add-custom-schema-div{
|
1012 |
-
margin-top: 10px;
|
1013 |
-
border-top: 1px solid #eee;
|
1014 |
-
padding-top: 5px;
|
1015 |
-
}
|
1016 |
-
|
1017 |
-
.saswp-nav-menu-list label{
|
1018 |
-
padding-left: 10px;
|
1019 |
-
}
|
1020 |
-
/*** How to schema css starts here ***/
|
1021 |
-
|
1022 |
-
.saswp-dynamic-properties
|
1023 |
-
{
|
1024 |
-
border: 1px solid #aaa;
|
1025 |
-
margin-top: 5px;
|
1026 |
-
margin-bottom: 5px;
|
1027 |
-
|
1028 |
-
}
|
1029 |
-
.saswp-table-close{
|
1030 |
-
float: right;
|
1031 |
-
cursor: pointer;
|
1032 |
-
}
|
1033 |
-
.saswp-table-create-onajax table th, .saswp-table-create-onajax table td{
|
1034 |
-
padding: 5px;
|
1035 |
-
}
|
1036 |
-
.saswp-table-create-onajax select{
|
1037 |
-
width: 98%;
|
1038 |
-
}
|
1039 |
-
|
1040 |
-
/*** How to schema css ends here ***/
|
1041 |
-
|
1042 |
-
.saswp-g-reviews-settings-table input{
|
1043 |
-
width: 100%;
|
1044 |
-
}
|
1045 |
-
.saswp-s-reviews-settings-table input{
|
1046 |
-
width: 100%;
|
1047 |
-
}
|
1048 |
-
.saswp_rv_module_pro_notice{
|
1049 |
-
border: 1px solid #d8d8d8;
|
1050 |
-
background: #fff;
|
1051 |
-
}
|
1052 |
-
|
1053 |
-
/*** Review Module section ***/
|
1054 |
-
|
1055 |
-
.saswp-settings-list .saswp-rev-mod{
|
1056 |
-
width: 100%;
|
1057 |
-
display: inline-block;
|
1058 |
-
margin-top: 20px;
|
1059 |
-
}
|
1060 |
-
.saswp-rev-mod .saswp-knowledge-label{
|
1061 |
-
width: 100%;
|
1062 |
-
display: inline-block;
|
1063 |
-
padding: 10px 16px;
|
1064 |
-
font-weight: 600;
|
1065 |
-
font-size: 16px;
|
1066 |
-
color: #333;
|
1067 |
-
background: #f9f9f9;
|
1068 |
-
border: 1px solid #d8d8d8;
|
1069 |
-
border-bottom: none;
|
1070 |
-
}
|
1071 |
-
.saswp-rev-mod .saswp-knowledge-field{
|
1072 |
-
width:100%;
|
1073 |
-
display: inline-block;
|
1074 |
-
}
|
1075 |
-
.saswp-rev-mod .saswp_rv_module_pro_notice{
|
1076 |
-
padding:20px;
|
1077 |
-
}
|
1078 |
-
.saswp_cmpny_lst{
|
1079 |
-
width:100%;
|
1080 |
-
display: inline-block;
|
1081 |
-
margin-top:30px;
|
1082 |
-
}
|
1083 |
-
.saswp_rv_module_pro_notice ul{
|
1084 |
-
margin: 15px 0px 20px 0px;
|
1085 |
-
width: 100%;
|
1086 |
-
display: inline-grid;
|
1087 |
-
grid-template-columns: 1fr 1fr 1fr;
|
1088 |
-
grid-gap: 20px;
|
1089 |
-
border-bottom: 1px solid #eee;
|
1090 |
-
padding-bottom: 20px;
|
1091 |
-
}
|
1092 |
-
.saswp_rv_module_pro_notice ul li{
|
1093 |
-
position: relative;
|
1094 |
-
font-size: 15px;
|
1095 |
-
line-height: 1.5;
|
1096 |
-
color: #444;
|
1097 |
-
margin: 0;
|
1098 |
-
}
|
1099 |
-
.saswp_rv_module_pro_notice ul li span{
|
1100 |
-
padding-left:3px;
|
1101 |
-
}
|
1102 |
-
/*.saswp_rv_module_pro_notice ul li.check-img:before{
|
1103 |
-
content: "";
|
1104 |
-
background-image: url(../images/check.png);
|
1105 |
-
background-repeat: no-repeat;
|
1106 |
-
background-size: 16px;
|
1107 |
-
width: 16px;
|
1108 |
-
height: 16px;
|
1109 |
-
position: absolute;
|
1110 |
-
left: 2px;
|
1111 |
-
top: 6px;
|
1112 |
-
}*/
|
1113 |
-
.saswp_rv_module_pro_notice h2{
|
1114 |
-
text-align: center;
|
1115 |
-
font-size: 31px;
|
1116 |
-
}
|
1117 |
-
.saswp_rv_module_pro_notice .saswp_desc{
|
1118 |
-
text-align: center;
|
1119 |
-
font-size: 18px;
|
1120 |
-
font-style: normal;
|
1121 |
-
color: #000;
|
1122 |
-
}
|
1123 |
-
.saswp_rv_module_pro_notice .saswp_desc a{
|
1124 |
-
font-style: italic;
|
1125 |
-
}
|
1126 |
-
.saswp_rv_module_pro_notice .saswp_lst{
|
1127 |
-
color: #808080;
|
1128 |
-
font-family: georgia;
|
1129 |
-
font-style: italic;
|
1130 |
-
font-style: italic;
|
1131 |
-
font-size: 15px;
|
1132 |
-
font-weight: 600;
|
1133 |
-
}
|
1134 |
-
.saswp_rv_module_pro_notice .saswp_avlbl{
|
1135 |
-
color: #2a902e;
|
1136 |
-
font-family: georgia;
|
1137 |
-
font-style: italic;
|
1138 |
-
font-size: 15px;
|
1139 |
-
font-weight: 600;
|
1140 |
-
}
|
1141 |
-
.saswp_rv_module_pro_notice ul li img{
|
1142 |
-
width:20px;
|
1143 |
-
height:20px;
|
1144 |
-
position: relative;
|
1145 |
-
top: 4px;
|
1146 |
-
}
|
1147 |
-
.saswp-rev-btn{
|
1148 |
-
width:100%;
|
1149 |
-
display: inline-block;
|
1150 |
-
margin-top:20px;
|
1151 |
-
text-align: center;
|
1152 |
-
}
|
1153 |
-
.saswp-rev-btn span{
|
1154 |
-
display: block;
|
1155 |
-
font-size: 13px;
|
1156 |
-
margin-bottom: 15px;
|
1157 |
-
}
|
1158 |
-
.saswp-rev-btn a{
|
1159 |
-
padding: 12px 18px;
|
1160 |
-
display: inline-block;
|
1161 |
-
text-decoration: none;
|
1162 |
-
border-radius: 5px;
|
1163 |
-
background: #0085ba;
|
1164 |
-
color: #fff;
|
1165 |
-
font-weight: 600;
|
1166 |
-
font-size: 18px;
|
1167 |
-
}
|
1168 |
-
.select2-container{
|
1169 |
-
width:100% !important;
|
1170 |
-
}
|
1171 |
-
.saswp-schema-modify-section{
|
1172 |
-
margin-top: 15px;
|
1173 |
-
border-top: 1px solid #eee;
|
1174 |
-
padding-top: 15px;
|
1175 |
-
}
|
1176 |
-
.saswp-custom-meta-list{
|
1177 |
-
border: 1px solid #aaa;
|
1178 |
-
border-radius: 4px;
|
1179 |
-
}
|
1180 |
-
.saswp-custom-fields-table tr td:nth-child(3n+3) input{
|
1181 |
-
border: 1px solid #aaa;
|
1182 |
-
border-radius: 4px;
|
1183 |
-
}
|
1184 |
-
/** Notification CSS **/
|
1185 |
-
.updated.notice p{
|
1186 |
-
display: flex;
|
1187 |
-
width: 100%;
|
1188 |
-
align-items: center;
|
1189 |
-
}
|
1190 |
-
.updated.notice .dashicons-thumbs-up{
|
1191 |
-
margin-right:10px;
|
1192 |
-
}
|
1193 |
-
a.saswp-feedback-remindme, a.saswp-feedback-no-thanks{
|
1194 |
-
display: inline-block;
|
1195 |
-
cursor: pointer;
|
1196 |
-
}
|
1197 |
-
.saswp-feedback-remindme:after{
|
1198 |
-
content:",";
|
1199 |
-
display: inline-block;
|
1200 |
-
margin-right:5px;
|
1201 |
-
padding-left: 5px
|
1202 |
-
}
|
1203 |
-
a.saswp-revws-lnk{
|
1204 |
-
display: inline-block;
|
1205 |
-
background: #0085ba;
|
1206 |
-
padding: 12px 20px;
|
1207 |
-
color: #fff;
|
1208 |
-
text-decoration: none;
|
1209 |
-
border-radius: 3px;
|
1210 |
-
margin-left: 20px;
|
1211 |
-
font-size: 14px;
|
1212 |
-
line-height: 0.6;
|
1213 |
-
}
|
1214 |
-
.saswp-update-notice-btns{
|
1215 |
-
display: inline-block;
|
1216 |
-
width: 100%;
|
1217 |
-
margin-bottom: 5px;
|
1218 |
-
}
|
1 |
+
.saswp_warning{color:#ef6c00!important}.saswp_hide{display:none}.saswp-general table th{width:auto;font-weight:600;padding:0}.saswp-general table{margin-top:0}.saswp-general table td{padding:5px}.saswp-knowledge table th{width:auto;padding:0}.saswp-knowledge table{margin-top:0}.saswp-knowledge table td{padding:5px}.saswp-schema table th{width:auto;padding:0}.saswp-schema table{margin-top:0}.saswp-schema table td{padding:5px}.saswp-amp table th{width:auto;padding:0}.saswp-amp table{margin-top:0}.saswp-amp table td{padding:5px}.saswp-help table th{width:auto;padding:0}.saswp-support table th{width:auto;padding:0}.saswp-review table th{width:auto;padding:0}.saswp-help table{margin-top:0}.saswp-help table td{padding:5px}.saswp-settings-list{display:inline-block;width:100%}.saswp-settings-list li{padding-left:0}.saswp-settings-list li div label{font-weight:600}.saswp-general h2{margin-bottom:0}.saswp-knowledge h2{margin-bottom:0}.saswp-schema h2{margin-bottom:0}.saswp-help h2{margin-bottom:0}.saswp-settings-form p.submit{margin-top:0}.saswp_qanda_p{font-weight:500}.saswp-display-none{display:none!important}.saswp-placement-groups{border:1px solid #e5e5e5}.saswp-query-success{color:#060}.saswp-query-error{color:#bf3322}.saswp-tools table th{width:auto;padding:0}.saswp-tools table{margin-top:0}.saswp-tools table td{padding:5px}.saswp-tools-field-title strong{padding-right:130px}.saswp-tools .saswp-tooltip{width:230px}.saswp-tools .saswp-knowledge-label{float:left}.saswp-error{color:red!important}.saswp-tooltip{position:relative;display:inline-block}.saswp-tooltip .saswp-tooltiptext{visibility:hidden;width:200px;background-color:#000;color:#fff;text-align:center;border-radius:6px;padding:5px 0;position:absolute;z-index:1;bottom:100%;left:50%;margin-left:-25px}.saswp-tooltiptext::after{content:"";position:absolute;top:100%;left:10%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#000 transparent transparent transparent}.saswp-knowledge-base .saswp-knowledge-label{width:200px;float:left;clear:both}.saswp-knowledge-base .saswp-knowledge-field{width:75%;float:right}.saswp-social-fileds ul{display:grid;grid-template-columns:26.5% 1fr}.saswp-social-fileds li{display:flex}.saswp-social-fileds .saswp-knowledge-field{width:100%;margin-left:10px}.saswp-social-fileds .saswp-knowledge-field input{float:right;margin:inherit}.saswp-schema-type-fields .saswp-knowledge-label{width:200px;float:left;clear:both}.saswp-schema-type-fields .saswp-knowledge-field{width:75%;float:right}.saswp-settings-first-div{width:70%}.saswp-settings-container{display:inline-flex;width:100%}.saswp-settings-second-div{float:right;position:relative;top:20px;margin-right:30px;margin-top:37px}.saswp-feedback-panel{height:200px;width:280px;background:#fff;position:relative}.saswp-start-quck-setup{position:relative;float:inherit;top:7px;left:15px}.saswp-feedback-panel ul{list-style-type:circle;list-style:decimal;padding-left:30px;font-size:15px}.saswp-feedback-panel a{text-decoration:none}.saswp-feedback-panel h2{text-align:center;padding-top:18px}.saswp-social-sharing-buttons{text-align:center;padding-top:20px}.saswp-facebook-share{background:#3b5998;box-shadow:0 0 0 #1b95e0!important;color:#fff!important;line-height:20px!important;height:21px!important;border-radius:3px;margin-right:5px}.saswp-social-sharing-buttons a{text-align:center;padding:8px}.twitter-share-button{background:#1b95e0!important;box-shadow:0 0 0 #1b95e0!important;color:#fff!important;line-height:20px!important;height:21px!important;border-radius:3px;margin-left:5px}.saswp-placement-button{padding:3px 10px;color:#0d0d0d;font-size:14px;border:1px solid #aaa;border-radius:2px;background:linear-gradient(#ededed,#fff)}.saswp-placement-table td{padding:5px 10px!important}.saswp-archive-div .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-archive-div .saswp-knowledge-label{float:left;clear:both}.saswp-amp .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-amp .saswp-knowledge-label{float:left;clear:both}.saswp-review .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-review .saswp-knowledge-label{float:left;clear:both}.saswp-compativility-div .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-compativility-div .saswp-knowledge-label{float:left;clear:both}.saswp-compativility-div li{display:inline-flex}.saswp-seller-div .saswp-knowledge-label{float:left;clear:both}.saswp-seller-div .saswp-knowledge-field{float:left;width:70%}.saswp-post-specific-tab-wrapper{display:inline-block;width:25%;vertical-align:top;box-sizing:border-box;padding-right:10px}.saswp-post-specific-container{display:inline-block;width:calc(75% - 1px);border-left:1px solid #eee}.saswp-post-specific-wrapper{padding:10px}.saswp-tab a.selected{background-color:#ccc}.saswp-tab-links{display:block;background-color:inherit;color:#000;padding:6px 10px;outline:0;text-align:left;cursor:pointer;transition:.3s;font-size:15px;width:130px;overflow:hidden;margin-right:10px}.saswp-star-rating{cursor:pointer}.saswp-post-specific-wrapper select{width:100%}.saswp-review-tables{width:100%}.saswp-over-all-raring{float:right}.saswp-review-pros-and-cons{position:relative;clear:both}.saswp-review-pros-and-cons>div:first{padding-left:10px}.saswp-review-pros-and-cons>div{width:49%;display:inline-block}.saswp-review-pros-and-cons>div:nth-child(2){padding-left:12px}.saswp-wp-ediot-desc{margin-bottom:-23px;display:block}.saswp-review-description{margin-top:40px;padding-top:10px;border-top:1px solid #eee}.saswp-review-pros-and-cons{margin-top:40px;padding-top:10px;border-top:1px solid #eee}.saspw-review-item-list{margin-top:20px;border-top:1px solid #eee}.saswp-review-item-list-table{padding-bottom:10px}#sasw-review input[type=text]{width:180px}#sasw-review input[type=number]{width:180px}#saswp-review-item-enable{width:10px}.saswp-enable-review-on-post{padding-bottom:10px}.saswp-enable-review-on-post label{font-weight:500}.saswp-compatibility table th{width:auto;padding:0}.saswp-compatibility .saswp-knowledge-label{float:left;clear:both}.saswp-tools .saswp-knowledge-label{float:left;clear:both}.saswp-tools .saswp-knowledge-field{float:right;width:69%;padding-bottom:10px}.saswp_kg_logo,.saswp_person_fields{background-color:#fff!important}.saswp_image_thumbnail{padding-top:5px;display:inline-block}.saswp-compatibility .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-job-posting-note,.saswp-schem-type-note{color:#d2691e}.saswp-custom-fields-name{border:1px solid #aaa;border-radius:4px}.saswp-option-table-class p{margin:auto;font-style:italic;color:#666}.saswp-switch{position:relative;display:inline-block;width:40px;height:22px;border:20px}.saswp-switch input{opacity:0;width:0;height:0}.saswp-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#5a6783;transition:.4s;border-radius:20px}.saswp-slider:before{position:absolute;content:"";height:15px;width:15px;left:4px;bottom:4px;background-color:#fff;transition:.4s;border-radius:20px}input:checked+.saswp-slider{background-color:#61bd3b;border-radius:30px}input:focus+.saswp-slider{box-shadow:0 0 1px #2196f3}input:checked+.saswp-slider:before{transform:translateX(15px)}.saswp-slider.saswp-round{border-radius:34px}.saswp-slider.saswp-round:before{border-radius:50%}.saswp-tab-nav li{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;border-bottom:1px solid #eee}.saswp-tab-nav .selected{background-color:#ccc}.saswp-single-post-restore .saswp-switch{height:28px}.saswp-single-post-restore .saswp-slider:before{height:20px}.saswp-wdi-rate-stars{display:inline-block;color:#ffb900;position:relative;top:3px}.saswp-wdi-rate-stars svg{fill:#ffb900}.saswp-wdi-rate-stars svg:hover{fill:#ffb900}.saswp-wdi-rate-stars svg:hover~svg{fill:none}.option-table-class{width:100%}.option-table-class tr td{padding:10px 10px 10px 10px}.option-table-class tr>td{width:30%}.option-table-class tr td:last-child{width:60%}.saswp-custom-fields-table{width:100%}.saswp-custom-fields-table input{width:100%}.saswp-custom-fields-table tr td{padding:10px 10px 10px 10px}.saswp-custom-fields-table td{width:30%}.saswp-option-table-class input[type=text],.saswp-option-table-class select{width:100%}.saswp-paywall-table-class input[type=text],.saswp-paywall-table-class select{width:100%}.saswp-email_schema table th{width:auto;padding:0}.saswp-email_schema .saswp-knowledge-label{float:left;clear:both}.saswp-email_schema .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-add-on-plugin label{margin-top:10px}.saswp-add-on-plugin span{width:250px;display:inline-block}.saswp-knowledge-label label[for=saswp_search_box_schema_checkbox]{padding-left:10px}.saswp-knowledge-label label[for=saswp-woocommerce-booking-checkbox]{padding-left:10px}.saswp-knowledge-label label[for=saswp-woocommerce-membership-checkbox]{padding-left:10px}.saswp-global-selected{color:#000;font-weight:500}#saswp-global-tabs a{cursor:pointer}#saswp-global-tabs{padding-left:5px}#saswp-tools-tabs a{cursor:pointer}#saswp-review-tabs a{cursor:pointer}#saswp-tools-tabs{padding-left:5px}.saswp-need-help{padding-left:60px}.saswp-heading{display:inline-flex;align-items:baseline}.saswp-heading h2{margin-bottom:0}.saswp-view-docs a{margin-right:5px!important;margin-top:10px!important}.saswp-tabs .nav-tab{margin-left:4px}.saswp-panel{padding:7px 18px;background-color:#fff;box-shadow:0 0 20px 1px #d2cccc}.saswp-g-review-header{margin-top:50px}.saswp-g-review-body{display:inline-grid;grid-template-columns:1fr 300px;grid-gap:30px;margin-top:30px}.saswp-channel-list{margin-right:15px}.saswp-input-fields{display:inline-flex;align-items:center;margin-bottom:8px;width:100%}.saswp-input-fields label{width:130px}.saswp-input-fields select{width:100%}.saswp-panel h3{font-size:20px;line-height:1.4;color:#222;text-align:center;margin:10px 0 20px 0}.saswp-input-fields a.button-primary{margin-top:10px}.saswp-glg-review-body{display:grid;grid-template-columns:100px 1fr;grid-gap:20px;background:#fff;padding:20px;box-shadow:0 0 20px 1px #d2cccc;margin-bottom:30px}.saswp-g-plus{float:right;font-size:15px}.saswp-rtng{padding-left:5px;font-size:14px}.saswp-pt-dt{font-size:12px;color:#999;font-weight:600;margin-top:5px;display:inline-block}.saswp-str{display:inline-block;width:100%;vertical-align:middle}.saswp-athr{font-size:15px;line-height:1.4;color:#000;font-weight:700;display:inline-block;vertical-align:middle}.saswp-str-rtng .saswp-rvw-str{display:inline-block;vertical-align:middle;padding-left:10px;width:auto}.saswp-rv-cnt p{font-size:16px;line-height:1.6;color:#000;margin:10px 0 0 0}.saswp-rv-img img{max-width:100px;border-radius:100%}.saswp-premium_features table th,.saswp-services table th{width:auto;padding:0}.saswp-features-blocks{display:inline-grid;grid-template-columns:1fr 1fr;grid-gap:20px}.saswp-features-blocks li{background:#fff;padding:25px;border:1px solid #d8d8d8}.saswp-features-blocks li a{text-decoration:none}.saswp-ele-ic{border-radius:256px;display:inline-block;padding:8px 10px 8px 10px;width:70px;margin-right:20px;float:left}.saswp-ele-ic img{width:100%}.saswp-ele-1{background:#96588a}.saswp-ele-2{background:#00a97e}.saswp-ele-3{background:#cacaca}.saswp-ele-4{background:#9c56cc}.saswp-ele-tlt h3{margin:0;font-size:18px;line-height:1.4}.saswp-ele-tlt p{margin-top:10px}.saswp-sts-btn{box-sizing:border-box;height:52px;margin-top:20px;padding:6px 15px;border:1px solid #e5e5e5;border-radius:3px;display:flex;align-items:center;justify-content:space-between}.saswp-d-btn{background:#d2150a;padding:6px 18px;border-radius:30px;font-size:14px;color:#fff}.form-wrap .saswp-sts-txt{font-size:16px;color:#000}.saswp-sts-txt span{color:#bebfc0;padding-left:5px}.saswp_review_platform .saswp-g-plus{float:left}.saswp-pc-wrap{background-color:#004f74;padding:15px 15px 15px 30px;color:#fff;display:inline-flex;width:100%;flex-wrap:wrap;margin-bottom:20px}.saswp-pc-wrap .saswp-lst span{font-size:18px;font-weight:500;margin-bottom:10px;display:inline-block;line-height:1.3}.saswp-pc-wrap .saswp-lst{flex:1 0 42%}.saswp-pc-wrap .saswp-lst ul{margin:0}.saswp-pc-wrap .saswp-lst p{list-style-type:none;font-size:15px;font-weight:lighter;line-height:1.2;margin-bottom:10px;position:relative;padding-left:20px;color:#eee}.saswp-pc-wrap .saswp-lst p:before{content:'';position:absolute;width:8px;height:8px;background-color:#ccc;left:0;top:6px;border-radius:10px}.sgl .saswp-rvw{width:100%;margin-bottom:34px;font-size:13px;border-bottom:1px solid #ededed}.saswp-rvw-hd span,.saswp-rvw-sm span{background-color:#222;color:#fff;display:inline-block;font-size:15px}.saswp-rvw-hd span{line-height:1.4;padding:8px 12px 6px;margin:26px 0}.saswp-rvw td{padding:7px 14px}.saswp-rvw td,.sgl table td{border:1px solid #ededed}.saswp-rvw tbody{width:100%}.saswp-rvw-sm span{padding:8px 12px 6px;margin-bottom:13px;position:relative;line-height:1.2}.saswp-rvw-fs{line-height:1.5;font-size:48px;font-weight:600;margin-bottom:5px}.saswp-rvw-ov .ovs{font-size:11px;font-weight:600}.sgl .saswp-rvw tr td{background:#fff;width:100%}.sgl .saswp-rvw tr:hover td{background-color:#fcfcfc}.saswp-rvw .saswp-rvw-sm{padding:21px 14px}.str-ic{font-size:18px;line-height:1.2}.saswp-rvw-str{display:inline-flex;width:100%}.saswp-rvw-str .df-clr,.saswp-rvw-str .half-str,.saswp-rvw-str .str-ic{display:inline-block;width:20px;height:16px;background-repeat:no-repeat}.saswp-rvw-ov{text-align:center}.saswp-rvw-str .half-str{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNNDgyLjIwNywxODYuOTczbC0xNTkuNjk5LTMzLjcwNUwyNDEuMTA0LDExLjgwM2wtODEuNDA0LDE0MS40NjVMMCwxODYuOTczbDEwOS4zODgsMTIxLjEzNEw5Mi4wOTQsNDcwLjQwNGwxNDkuMDEtNjYuNiAgbDE0OS4wMSw2Ni42bC0xNy4yOTQtMTYyLjI5Nkw0ODIuMjA3LDE4Ni45NzN6IE0yNDEuMTA0LDM3MC45NDNWNzEuOTUzbDYyLjA5LDEwNy45TDQyNSwyMDUuNTYxbC04My40MzMsOTIuMzkzbDEzLjE5MSwxMjMuNzg4ICBMMjQxLjEwNCwzNzAuOTQzeiIgZmlsbD0iI2ZmZDcwMCIvPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K)}.saswp-rvw-str .str-ic{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiNmZmQ3MDAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-rvw-str .df-clr{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiM2MzVlNjMiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-g-review-header{margin-top:50px}.saswp-g-review-body{display:inline-grid;grid-template-columns:1fr 300px;grid-gap:30px;margin-top:30px;width:100%}.saswp-channel-list{margin-right:15px}.saswp-input-fields{display:inline-flex;align-items:center;margin-bottom:8px;width:100%}.saswp-input-fields label{width:130px}.saswp-panel h3{font-size:20px;line-height:1.4;color:#222;text-align:center;margin:10px 0 20px 0}.saswp-input-fields a.button-primary{margin-top:10px}.saswp-glg-review-body{display:grid;grid-template-columns:100px 1fr;grid-gap:20px;background:#fff;padding:20px;box-shadow:0 0 20px 1px #d2cccc;margin-bottom:30px}.saswp-g-plus{float:right;font-size:15px;width:20px;height:20px}.saswp-g-plus img{max-width:100%}.saswp-rtng{padding-left:5px;font-size:14px}.saswp-pt-dt{font-size:12px;color:#999;font-weight:600;margin-top:5px;display:inline-block}.saswp-athr{font-size:15px;line-height:1.4;color:#000;font-weight:700}.saswp-rv-cnt p{font-size:16px;line-height:1.6;color:#000;margin:10px 0 0 0}.saswp-rv-img img{max-width:100px}.saswp-g-review-header div{margin-top:10px}.saswp-upgrade-pro{background:#fff;padding:25px;border:1px solid #d8d8d8;display:inline-block;margin-top:10px;width:81%}.saswp-upgrade-pro h2{font-size:20px;margin:0;color:#23282d;font-weight:600;text-align:center}.saswp-upgrade-pro ul{margin:25px 0 20px 0;display:inline-block}.saswp-upgrade-pro ul li{position:relative;padding-left:30px;font-size:14px;line-height:1.4;margin-bottom:10px}.saswp-upgrade-pro ul li:before{content:"";background-image:url(../images/check.png);background-repeat:no-repeat;background-size:20px;width:20px;height:20px;position:absolute;left:2px;top:2px}.saswp-upgrade-pro a{background:#d2150a;padding:10px 0;display:block;text-align:center;color:#fff;text-decoration:none;font-size:16px;font-weight:600;letter-spacing:1px;border-radius:5px}.saswp_image_prev{max-width:200px;max-height:200px;float:left;padding-left:2px}.saswp_prev_close{position:relative;width:30px;height:30px;top:12px;font-size:20px;top:-5px;text-decoration:none}.saswp-add-custom-schema-div{margin-top:10px;border-top:1px solid #eee;padding-top:5px}.saswp-nav-menu-list label{padding-left:10px}.saswp-dynamic-properties{border:1px solid #aaa;margin-top:5px;margin-bottom:5px}.saswp-table-close{float:right;cursor:pointer}.saswp-table-create-onajax table td,.saswp-table-create-onajax table th{padding:5px}.saswp-table-create-onajax select{width:98%}.saswp-g-reviews-settings-table input{width:100%}.saswp-s-reviews-settings-table input{width:100%}.saswp_rv_module_pro_notice{border:1px solid #d8d8d8;background:#fff}.saswp-settings-list .saswp-rev-mod{width:100%;display:inline-block;margin-top:20px}.saswp-rev-mod .saswp-knowledge-label{width:100%;display:inline-block;padding:10px 16px;font-weight:600;font-size:16px;color:#333;background:#f9f9f9;border:1px solid #d8d8d8;border-bottom:none}.saswp-rev-mod .saswp-knowledge-field{width:100%;display:inline-block}.saswp-rev-mod .saswp_rv_module_pro_notice{padding:20px}.saswp_cmpny_lst{width:100%;display:inline-block;margin-top:30px}.saswp_rv_module_pro_notice ul{margin:15px 0 20px 0;width:100%;display:inline-grid;grid-template-columns:1fr 1fr 1fr;grid-gap:20px;border-bottom:1px solid #eee;padding-bottom:20px}.saswp_rv_module_pro_notice ul li{position:relative;font-size:15px;line-height:1.5;color:#444;margin:0}.saswp_rv_module_pro_notice ul li span{padding-left:3px}.saswp_rv_module_pro_notice h2{text-align:center;font-size:31px}.saswp_rv_module_pro_notice .saswp_desc{text-align:center;font-size:18px;font-style:normal;color:#000}.saswp_rv_module_pro_notice .saswp_desc a{font-style:italic}.saswp_rv_module_pro_notice .saswp_lst{color:grey;font-family:georgia;font-style:italic;font-style:italic;font-size:15px;font-weight:600}.saswp_rv_module_pro_notice .saswp_avlbl{color:#2a902e;font-family:georgia;font-style:italic;font-size:15px;font-weight:600}.saswp_rv_module_pro_notice ul li img{width:20px;height:20px;position:relative;top:4px}.saswp-rev-btn{width:100%;display:inline-block;margin-top:20px;text-align:center}.saswp-rev-btn span{display:block;font-size:13px;margin-bottom:15px}.saswp-rev-btn a{padding:12px 18px;display:inline-block;text-decoration:none;border-radius:5px;background:#0085ba;color:#fff;font-weight:600;font-size:18px}.select2-container{width:100%!important}.saswp-schema-modify-section{margin-top:15px;border-top:1px solid #eee;padding-top:15px}.saswp-custom-meta-list{border:1px solid #aaa;border-radius:4px}.saswp-custom-fields-table tr td:nth-child(3n+3) input{border:1px solid #aaa;border-radius:4px}.updated.notice p{display:flex;width:100%;align-items:center}.updated.notice .dashicons-thumbs-up{margin-right:10px}a.saswp-feedback-no-thanks,a.saswp-feedback-remindme{display:inline-block;cursor:pointer}.saswp-feedback-remindme:after{content:",";display:inline-block;margin-right:5px;padding-left:5px}a.saswp-revws-lnk{display:inline-block;background:#0085ba;padding:12px 20px;color:#fff;text-decoration:none;border-radius:3px;margin-left:20px;font-size:14px;line-height:.6}.saswp-update-notice-btns{display:inline-block;width:100%;margin-bottom:5px}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin_section/fields-generator.php
CHANGED
@@ -598,10 +598,7 @@ class saswp_fields_generator {
|
|
598 |
|
599 |
. '</li>';
|
600 |
}
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
}
|
606 |
|
607 |
echo '<div><div class="saswp-settings-list"><ul>' . wp_kses($output, $allowed_html) . '</ul></div></div>';
|
598 |
|
599 |
. '</li>';
|
600 |
}
|
601 |
+
|
|
|
|
|
|
|
602 |
}
|
603 |
|
604 |
echo '<div><div class="saswp-settings-list"><ul>' . wp_kses($output, $allowed_html) . '</ul></div></div>';
|
admin_section/js/main-script.js
CHANGED
@@ -128,16 +128,17 @@ function saswp_fields_html_generator(index, schema_id, fields_type, div_type, sc
|
|
128 |
$.each(schema_fields, function(eachindex, element){
|
129 |
|
130 |
var meta_class = "";
|
131 |
-
if(element.name == 'saswp_tvseries_season_published_date' || element.name == 'saswp_feed_element_date_created'){
|
132 |
meta_class = "saswp-datepicker-picker";
|
133 |
}
|
134 |
|
135 |
switch(element.type) {
|
136 |
|
|
|
137 |
case "text":
|
138 |
|
139 |
html += '<tr>'
|
140 |
-
+ '<th>'+element.label+'</th><td><input class="'+meta_class+'" style="width:100%" type="
|
141 |
+ '</tr>';
|
142 |
|
143 |
break;
|
128 |
$.each(schema_fields, function(eachindex, element){
|
129 |
|
130 |
var meta_class = "";
|
131 |
+
if(element.name == 'saswp_tvseries_season_published_date' || element.name == 'saswp_feed_element_date_created' || element.name == 'saswp_product_reviews_created_date'){
|
132 |
meta_class = "saswp-datepicker-picker";
|
133 |
}
|
134 |
|
135 |
switch(element.type) {
|
136 |
|
137 |
+
case "number":
|
138 |
case "text":
|
139 |
|
140 |
html += '<tr>'
|
141 |
+
+ '<th>'+element.label+'</th><td><input class="'+meta_class+'" style="width:100%" type="'+element.type+'" id="'+element.name+'_'+index+'_'+schema_id+'" name="'+fields_type+schema_id+'['+index+']['+element.name+']"></td>'
|
142 |
+ '</tr>';
|
143 |
|
144 |
break;
|
admin_section/js/main-script.min.js
CHANGED
@@ -1,1944 +1 @@
|
|
1 |
-
var saswp_meta_list = [];
|
2 |
-
var saswp_meta_fields = [];
|
3 |
-
var saswp_meta_list_fields = [];
|
4 |
-
|
5 |
-
function getParameterByName(name, url) {
|
6 |
-
if (!url){
|
7 |
-
url = window.location.href;
|
8 |
-
}
|
9 |
-
name = name.replace(/[\[\]]/g, "\\$&");
|
10 |
-
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
|
11 |
-
results = regex.exec(url);
|
12 |
-
if (!results) return null;
|
13 |
-
if (!results[2]) return "";
|
14 |
-
return decodeURIComponent(results[2].replace(/\+/g, " "));
|
15 |
-
}
|
16 |
-
|
17 |
-
function saswp_schema_datepicker(){
|
18 |
-
|
19 |
-
jQuery('.saswp-datepicker-picker').datepicker({
|
20 |
-
dateFormat: "yy-mm-dd",
|
21 |
-
});
|
22 |
-
|
23 |
-
}
|
24 |
-
|
25 |
-
|
26 |
-
function saswp_meta_list_html(response, fields, f_name, id, tr){
|
27 |
-
|
28 |
-
var field_name = f_name;
|
29 |
-
if(field_name == null){
|
30 |
-
field_name = Object.keys(fields)[0];
|
31 |
-
}
|
32 |
-
var re_html = '';
|
33 |
-
re_html += '<select class="saswp-custom-meta-list" name="saswp_meta_list_val['+field_name+']">';
|
34 |
-
$.each(response, function(key,value){
|
35 |
-
|
36 |
-
re_html += '<optgroup label="'+value['label']+'">';
|
37 |
-
|
38 |
-
$.each(value['meta-list'], function(key, value){
|
39 |
-
re_html += '<option value="'+key+'">'+value+'</option>';
|
40 |
-
});
|
41 |
-
re_html += '</optgroup>';
|
42 |
-
|
43 |
-
});
|
44 |
-
re_html += '</select>';
|
45 |
-
|
46 |
-
if(fields){
|
47 |
-
var html = '<tr>';
|
48 |
-
html += '<td>';
|
49 |
-
html += '<select class="saswp-custom-fields-name">';
|
50 |
-
$.each(fields, function(key,value){
|
51 |
-
html += '<option value="'+key+'">'+value+'</option>';
|
52 |
-
});
|
53 |
-
html += '</select>';
|
54 |
-
html += '</td>';
|
55 |
-
html += '<td>';
|
56 |
-
html += re_html;
|
57 |
-
html += '</td>';
|
58 |
-
html += '<td></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td>';
|
59 |
-
html += '</tr>';
|
60 |
-
$(".saswp-custom-fields-table").append(html);
|
61 |
-
|
62 |
-
}else{
|
63 |
-
$(id).html(re_html);
|
64 |
-
}
|
65 |
-
|
66 |
-
}
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
function saswp_get_meta_list(type, fields, id, fields_name, tr){
|
72 |
-
if (!saswp_meta_list[type]) {
|
73 |
-
|
74 |
-
$.get(ajaxurl,
|
75 |
-
{ action:"saswp_get_meta_list", saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
76 |
-
function(response){
|
77 |
-
saswp_meta_list[type] = response[type];
|
78 |
-
saswp_meta_list_html(saswp_meta_list[type], fields, fields_name, id, tr);
|
79 |
-
|
80 |
-
},'json');
|
81 |
-
|
82 |
-
}else{
|
83 |
-
saswp_meta_list_html(saswp_meta_list[type], fields, fields_name, id, tr);
|
84 |
-
}
|
85 |
-
|
86 |
-
}
|
87 |
-
|
88 |
-
function saswp_get_post_specific_schema_fields(index, meta_name, div_type, schema_id, fields_type){
|
89 |
-
|
90 |
-
if (!saswp_meta_fields[fields_type]) {
|
91 |
-
|
92 |
-
$.get(ajaxurl,
|
93 |
-
{ action:"saswp_get_schema_dynamic_fields_ajax",meta_name:meta_name, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
94 |
-
function(response){
|
95 |
-
saswp_meta_fields[fields_type] = response;
|
96 |
-
console.log(saswp_meta_fields);
|
97 |
-
var html = saswp_fields_html_generator(index, schema_id, fields_type, div_type, response);
|
98 |
-
|
99 |
-
if(html){
|
100 |
-
$('.saswp-'+div_type+'-section[data-id="'+schema_id+'"]').append(html);
|
101 |
-
saswp_schema_datepicker();
|
102 |
-
}
|
103 |
-
|
104 |
-
},'json');
|
105 |
-
|
106 |
-
}else{
|
107 |
-
|
108 |
-
var html = saswp_fields_html_generator(index, schema_id, fields_type, div_type, saswp_meta_fields[fields_type]);
|
109 |
-
|
110 |
-
if(html){
|
111 |
-
$('.saswp-'+div_type+'-section[data-id="'+schema_id+'"]').append(html);
|
112 |
-
saswp_schema_datepicker();
|
113 |
-
}
|
114 |
-
|
115 |
-
}
|
116 |
-
|
117 |
-
|
118 |
-
}
|
119 |
-
|
120 |
-
function saswp_fields_html_generator(index, schema_id, fields_type, div_type, schema_fields){
|
121 |
-
|
122 |
-
var html = '';
|
123 |
-
|
124 |
-
html += '<div class="saswp-'+div_type+'-table-div saswp-dynamic-properties" data-id="'+index+'">'
|
125 |
-
+ '<a class="saswp-table-close">X</a>'
|
126 |
-
+ '<table class="form-table saswp-'+div_type+'-table">'
|
127 |
-
|
128 |
-
$.each(schema_fields, function(eachindex, element){
|
129 |
-
|
130 |
-
var meta_class = "";
|
131 |
-
if(element.name == 'saswp_tvseries_season_published_date' || element.name == 'saswp_feed_element_date_created'){
|
132 |
-
meta_class = "saswp-datepicker-picker";
|
133 |
-
}
|
134 |
-
|
135 |
-
switch(element.type) {
|
136 |
-
|
137 |
-
case "number":
|
138 |
-
case "text":
|
139 |
-
|
140 |
-
html += '<tr>'
|
141 |
-
+ '<th>'+element.label+'</th><td><input class="'+meta_class+'" style="width:100%" type="'+element.type+'" id="'+element.name+'_'+index+'_'+schema_id+'" name="'+fields_type+schema_id+'['+index+']['+element.name+']"></td>'
|
142 |
-
+ '</tr>';
|
143 |
-
|
144 |
-
break;
|
145 |
-
|
146 |
-
case "textarea":
|
147 |
-
|
148 |
-
html += '<tr>'
|
149 |
-
+ '<th>'+element.label+'</th><td><textarea style="width: 100%" id="'+element.name+'_'+index+'_'+schema_id+'" name="'+fields_type+schema_id+'['+index+']['+element.name+']" rows="5"></textarea></td>'
|
150 |
-
+ '</tr>';
|
151 |
-
|
152 |
-
break;
|
153 |
-
case "select":
|
154 |
-
|
155 |
-
var options_html = "";
|
156 |
-
$.each(element.options, function(opt_index, opt_element){
|
157 |
-
options_html += '<option value="'+opt_index+'">'+opt_element+'</option>';
|
158 |
-
});
|
159 |
-
|
160 |
-
html += '<tr>'
|
161 |
-
+ '<th>'+element.label+'</th>'
|
162 |
-
+ '<td>'
|
163 |
-
|
164 |
-
+ '<select id="'+element.name+'_'+index+'_'+schema_id+'" name="'+fields_type+schema_id+'['+index+']['+element.name+']">'
|
165 |
-
+ options_html
|
166 |
-
+ '</select>'
|
167 |
-
|
168 |
-
+ '</td>'
|
169 |
-
+ '</tr>';
|
170 |
-
|
171 |
-
break;
|
172 |
-
|
173 |
-
case "media":
|
174 |
-
|
175 |
-
html += '<tr>'
|
176 |
-
+ '<th>'+element.label+'</th>'
|
177 |
-
+ '<td>'
|
178 |
-
+ '<fieldset>'
|
179 |
-
+ '<input style="width:80%" type="text" id="'+element.name+'_'+index+'_'+schema_id+'" name="'+element.name+'_'+index+'_'+schema_id+'">'
|
180 |
-
+ '<input type="hidden" data-id="'+element.name+'_'+index+'_'+schema_id+'_id" name="'+fields_type+schema_id+'['+index+']['+element.name+'_id]" id="'+element.name+'_'+index+'_'+schema_id+'_id">'
|
181 |
-
+ '<input data-id="media" style="width: 19%" class="button" id="'+element.name+'_'+index+'_'+schema_id+'_button" name="'+element.name+'_'+index+'_'+schema_id+'_button" type="button" value="Upload">'
|
182 |
-
+ '<div class="saswp_image_div_'+element.name+'_'+index+'_'+schema_id+'">'
|
183 |
-
+ '</div>'
|
184 |
-
+ '</fieldset>'
|
185 |
-
+ '</td>'
|
186 |
-
+ '</tr>';
|
187 |
-
|
188 |
-
break;
|
189 |
-
default:
|
190 |
-
// code block
|
191 |
-
}
|
192 |
-
|
193 |
-
});
|
194 |
-
html += '</table>'
|
195 |
-
+ '</div>';
|
196 |
-
|
197 |
-
return html;
|
198 |
-
|
199 |
-
}
|
200 |
-
|
201 |
-
jQuery(document).ready(function($){
|
202 |
-
|
203 |
-
/* Newletters js starts here */
|
204 |
-
|
205 |
-
if(saswp_localize_data.do_tour){
|
206 |
-
|
207 |
-
var content = '<h3>Thanks for using Structured Data!</h3>';
|
208 |
-
content += '<p>Do you want the latest on <b>Structured Data update</b> before others and some best resources on monetization in a single email? - Free just for users of Structured Data!</p>';
|
209 |
-
content += '<style type="text/css">';
|
210 |
-
content += '.wp-pointer-buttons{ padding:0; overflow: hidden; }';
|
211 |
-
content += '.wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none} #afw_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }';
|
212 |
-
content += '</style>';
|
213 |
-
content += '<div id="afw_mc_embed_signup">';
|
214 |
-
content += '<form action="//app.mailerlite.com/webforms/submit/o1s7u3" data-id="258182" data-code="o1s7u3" method="POST" target="_blank">';
|
215 |
-
content += '<div id="afw_mc_embed_signup_scroll">';
|
216 |
-
content += '<div class="afw-mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">';
|
217 |
-
content += '<input type="text" name="fields[name]" class="form-control" placeholder="Name" hidden value="'+saswp_localize_data.current_user_name+'" style="display:none">';
|
218 |
-
content += '<input type="text" value="'+saswp_localize_data.current_user_email+'" name="fields[email]" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">';
|
219 |
-
content += '<input type="text" name="fields[company]" class="form-control" placeholder="Website" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="'+saswp_localize_data.get_home_url+'">';
|
220 |
-
content += '<input type="hidden" name="ml-submit" value="1" />';
|
221 |
-
content += '</div>';
|
222 |
-
content += '<div id="mce-responses">';
|
223 |
-
content += '<div class="response" id="mce-error-response" style="display:none"></div>';
|
224 |
-
content += '<div class="response" id="mce-success-response" style="display:none"></div>';
|
225 |
-
content += '</div>';
|
226 |
-
content += '<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a631df13442f19caede5a5baf_c9a71edce6" tabindex="-1" value=""></div>';
|
227 |
-
content += '<input type="submit" value="Subscribe" name="subscribe" id="pointer-close" class="button mc-newsletter-sent" style=" background: #0085ba; border-color: #006799; padding: 0px 16px; text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799; height: 30px; margin-top: 1px; color: #fff; box-shadow: 0 1px 0 #006799;">';
|
228 |
-
content += '</div>';
|
229 |
-
content += '</form>';
|
230 |
-
content += '</div>';
|
231 |
-
|
232 |
-
var setup;
|
233 |
-
var wp_pointers_tour_opts = {
|
234 |
-
content:content,
|
235 |
-
position:{
|
236 |
-
edge:"top",
|
237 |
-
align:"left"
|
238 |
-
}
|
239 |
-
};
|
240 |
-
|
241 |
-
wp_pointers_tour_opts = $.extend (wp_pointers_tour_opts, {
|
242 |
-
buttons: function (event, t) {
|
243 |
-
button= jQuery ('<a id="pointer-close" class="button-secondary">' + saswp_localize_data.button1 + '</a>');
|
244 |
-
button_2= jQuery ('#pointer-close.button');
|
245 |
-
button.bind ('click.pointer', function () {
|
246 |
-
t.element.pointer ('close');
|
247 |
-
});
|
248 |
-
button_2.on('click', function() {
|
249 |
-
t.element.pointer ('close');
|
250 |
-
} );
|
251 |
-
return button;
|
252 |
-
},
|
253 |
-
close: function () {
|
254 |
-
$.post (saswp_localize_data.ajax_url, {
|
255 |
-
pointer: 'saswp_subscribe_pointer222',
|
256 |
-
action: 'dismiss-wp-pointer'
|
257 |
-
});
|
258 |
-
},
|
259 |
-
show: function(event, t){
|
260 |
-
t.pointer.css({'left':'170px', 'top':'160px'});
|
261 |
-
}
|
262 |
-
});
|
263 |
-
setup = function () {
|
264 |
-
$(saswp_localize_data.displayID).pointer(wp_pointers_tour_opts).pointer('open');
|
265 |
-
if (saswp_localize_data.button2) {
|
266 |
-
jQuery ('#pointer-close').after ('<a id="pointer-primary" class="button-primary">' + saswp_localize_data.button2+ '</a>');
|
267 |
-
jQuery ('#pointer-primary').click (function () {
|
268 |
-
saswp_localize_data.function_name;
|
269 |
-
});
|
270 |
-
jQuery ('#pointer-close').click (function () {
|
271 |
-
$.post (saswp_localize_data.ajax_url, {
|
272 |
-
pointer: 'saswp_subscribe_pointer222',
|
273 |
-
action: 'dismiss-wp-pointer'
|
274 |
-
});
|
275 |
-
});
|
276 |
-
}
|
277 |
-
};
|
278 |
-
if (wp_pointers_tour_opts.position && wp_pointers_tour_opts.position.defer_loading) {
|
279 |
-
$(window).bind('load.wp-pointers', setup);
|
280 |
-
}
|
281 |
-
else {
|
282 |
-
setup ();
|
283 |
-
}
|
284 |
-
|
285 |
-
}
|
286 |
-
|
287 |
-
/* Newletters js ends here */
|
288 |
-
|
289 |
-
|
290 |
-
$(".saswp-tabs a").click(function(e){
|
291 |
-
var href = $(this).attr('href');
|
292 |
-
var currentTab = getParameterByName('tab',href);
|
293 |
-
if(!currentTab){
|
294 |
-
currentTab = "general";
|
295 |
-
}
|
296 |
-
$(this).siblings().removeClass("nav-tab-active");
|
297 |
-
$(this).addClass("nav-tab-active");
|
298 |
-
$(".form-wrap").find(".saswp-"+currentTab).siblings().hide();
|
299 |
-
$(".form-wrap .saswp-"+currentTab).show();
|
300 |
-
window.history.pushState("", "", href);
|
301 |
-
return false;
|
302 |
-
});
|
303 |
-
|
304 |
-
$(".saswp-schame-type-select").change(function(){
|
305 |
-
$(".saswp-custom-fields-table").html('');
|
306 |
-
var schematype = $ (this).val();
|
307 |
-
|
308 |
-
$(".saswp-option-table-class tr").each(function(index,value){
|
309 |
-
if(index>0){
|
310 |
-
$(this).hide();
|
311 |
-
$(this).find('select').attr('disabled', true);
|
312 |
-
}
|
313 |
-
});
|
314 |
-
if(schematype == 'TechArticle' || schematype == 'Article' || schematype == 'Blogposting' || schematype == 'NewsArticle' || schematype == 'WebPage'){
|
315 |
-
|
316 |
-
$(".saswp-enable-speakable").parent().parent().show();
|
317 |
-
}else{
|
318 |
-
$(".saswp-enable-speakable").parent().parent().hide();
|
319 |
-
}
|
320 |
-
|
321 |
-
if(schematype == 'local_business'){
|
322 |
-
$(".saswp-option-table-class tr").eq(1).show();
|
323 |
-
$(".saswp-business-text-field-tr").show();
|
324 |
-
$(".saswp-option-table-class tr").find('select').attr('disabled', false);
|
325 |
-
// $("#saswp_dayofweek").attr('disabled', false);
|
326 |
-
$('.select-post-type').val('show_globally').trigger('change');
|
327 |
-
}
|
328 |
-
if(schematype == 'Service'){
|
329 |
-
$(".saswp-service-text-field-tr").show();
|
330 |
-
$(".saswp-option-table-class tr").find('select').attr('disabled', false);
|
331 |
-
}
|
332 |
-
if(schematype == 'Review'){
|
333 |
-
$(".saswp-review-text-field-tr").show();
|
334 |
-
$(".saswp-option-table-class tr").find('select').attr('disabled', false);
|
335 |
-
saswp_item_reviewed_call();
|
336 |
-
}
|
337 |
-
if(schematype == 'Product'){
|
338 |
-
$(".saswp-product-text-field-tr").show();
|
339 |
-
$(".saswp-option-table-class tr").find('select').attr('disabled', false);
|
340 |
-
}
|
341 |
-
if(schematype == 'Event'){
|
342 |
-
$(".saswp-event-text-field-tr").show();
|
343 |
-
$(".saswp-option-table-class tr").find('select').attr('disabled', false);
|
344 |
-
}
|
345 |
-
if(schematype == 'AudioObject'){
|
346 |
-
$(".saswp-audio-text-field-tr").show();
|
347 |
-
}
|
348 |
-
if(schematype == 'SoftwareApplication'){
|
349 |
-
$(".saswp-softwareapplication-text-field-tr").show();
|
350 |
-
}
|
351 |
-
|
352 |
-
$(".saswp-schem-type-note").addClass('saswp_hide');
|
353 |
-
if(schematype == 'qanda'){
|
354 |
-
$(".saswp-schem-type-note").removeClass('saswp_hide');
|
355 |
-
}
|
356 |
-
|
357 |
-
$(".saswp-job-posting-note").addClass('saswp_hide');
|
358 |
-
|
359 |
-
// if(schematype == 'JobPosting'){
|
360 |
-
// $(".saswp-job-posting-note").removeClass('saswp_hide');
|
361 |
-
// }
|
362 |
-
|
363 |
-
saswp_enable_rating_review();
|
364 |
-
});
|
365 |
-
|
366 |
-
$("#saswp_business_type").change(function(){
|
367 |
-
var businesstype = $ (this).val();
|
368 |
-
var schematype = $(".saswp-schame-type-select").val();
|
369 |
-
|
370 |
-
$(".saswp-option-table-class tr").each(function(index,value){
|
371 |
-
if(index>1){
|
372 |
-
$(this).hide();
|
373 |
-
$(this).find('select').attr('disabled', true);
|
374 |
-
}
|
375 |
-
});
|
376 |
-
|
377 |
-
if(schematype == 'TechArticle' || schematype == 'Article' || schematype == 'Blogposting' || schematype == 'NewsArticle' || schematype == 'WebPage'){
|
378 |
-
|
379 |
-
$(".saswp-enable-speakable").parent().parent().show();
|
380 |
-
}else{
|
381 |
-
$(".saswp-enable-speakable").parent().parent().hide();
|
382 |
-
}
|
383 |
-
|
384 |
-
if(schematype == 'local_business'){
|
385 |
-
$(".saswp-"+businesstype+'-tr').show();
|
386 |
-
$(".saswp-business-text-field-tr").show();
|
387 |
-
$(".saswp-"+businesstype+'-tr').find('select').attr('disabled', false);
|
388 |
-
// $("#saswp_dayofweek").attr('disabled', false);
|
389 |
-
}
|
390 |
-
if(schematype == 'Service'){
|
391 |
-
$(".saswp-service-text-field-tr").show();
|
392 |
-
$(".saswp-service-text-field-tr").find('select').attr('disabled', false);
|
393 |
-
}
|
394 |
-
if(schematype == 'Product'){
|
395 |
-
$(".saswp-product-text-field-tr").show();
|
396 |
-
$(".saswp-product-text-field-tr").find('select').attr('disabled', false);
|
397 |
-
}
|
398 |
-
if(schematype == 'AudioObject'){
|
399 |
-
$(".saswp-audio-text-field-tr").show();
|
400 |
-
}
|
401 |
-
if(schematype == 'SoftwareApplication'){
|
402 |
-
$(".saswp-softwareapplication-text-field-tr").show();
|
403 |
-
}
|
404 |
-
|
405 |
-
if(schematype == 'Review'){
|
406 |
-
$(".saswp-review-text-field-tr").show();
|
407 |
-
$(".saswp-review-text-field-tr").find('select').attr('disabled', false);
|
408 |
-
}
|
409 |
-
if(schematype == 'Event'){
|
410 |
-
$(".saswp-event-text-field-tr").show();
|
411 |
-
$(".saswp-event-text-field-tr").find('select').attr('disabled', false);
|
412 |
-
}
|
413 |
-
saswp_enable_rating_review();
|
414 |
-
}).change();
|
415 |
-
|
416 |
-
|
417 |
-
//Settings page jquery starts here
|
418 |
-
|
419 |
-
|
420 |
-
function saswp_compatibliy_notes(current, id){
|
421 |
-
|
422 |
-
var plugin_name = id.replace('-checkbox','');
|
423 |
-
var text = $("#"+plugin_name).next('p').text();
|
424 |
-
|
425 |
-
if (current.is(':checked') && text !=='') {
|
426 |
-
$("#"+plugin_name).next('p').removeClass('saswp_hide');
|
427 |
-
}else{
|
428 |
-
|
429 |
-
if($("#"+plugin_name).next('p').attr('data-id') == 1){
|
430 |
-
$("#"+plugin_name).next('p').text('This feature is only available in pro version');
|
431 |
-
}else{
|
432 |
-
$("#"+plugin_name).next('p').addClass('saswp_hide');
|
433 |
-
}
|
434 |
-
}
|
435 |
-
|
436 |
-
}
|
437 |
-
|
438 |
-
|
439 |
-
$(".saswp-checkbox").change(function(){
|
440 |
-
|
441 |
-
var id = $(this).attr("id");
|
442 |
-
var current = $(this);
|
443 |
-
|
444 |
-
|
445 |
-
switch(id){
|
446 |
-
|
447 |
-
case 'saswp-the-seo-framework-checkbox':
|
448 |
-
saswp_compatibliy_notes(current, id);
|
449 |
-
if ($(this).is(':checked')) {
|
450 |
-
$("#saswp-the-seo-framework").val(1);
|
451 |
-
}else{
|
452 |
-
$("#saswp-the-seo-framework").val(0);
|
453 |
-
}
|
454 |
-
break;
|
455 |
-
|
456 |
-
case 'saswp-seo-press-checkbox':
|
457 |
-
saswp_compatibliy_notes(current, id);
|
458 |
-
if ($(this).is(':checked')) {
|
459 |
-
$("#saswp-seo-press").val(1);
|
460 |
-
}else{
|
461 |
-
$("#saswp-seo-press").val(0);
|
462 |
-
}
|
463 |
-
break;
|
464 |
-
|
465 |
-
case 'saswp-aiosp-checkbox':
|
466 |
-
saswp_compatibliy_notes(current, id);
|
467 |
-
if ($(this).is(':checked')) {
|
468 |
-
$("#saswp-aiosp").val(1);
|
469 |
-
}else{
|
470 |
-
$("#saswp-aiosp").val(0);
|
471 |
-
}
|
472 |
-
break;
|
473 |
-
|
474 |
-
case 'saswp-smart-crawl-checkbox':
|
475 |
-
saswp_compatibliy_notes(current, id);
|
476 |
-
if ($(this).is(':checked')) {
|
477 |
-
$("#saswp-smart-crawl").val(1);
|
478 |
-
}else{
|
479 |
-
$("#saswp-smart-crawl").val(0);
|
480 |
-
}
|
481 |
-
break;
|
482 |
-
|
483 |
-
case 'saswp-squirrly-seo-checkbox':
|
484 |
-
saswp_compatibliy_notes(current, id);
|
485 |
-
if ($(this).is(':checked')) {
|
486 |
-
$("#saswp-squirrly-seo").val(1);
|
487 |
-
}else{
|
488 |
-
$("#saswp-squirrly-seo").val(0);
|
489 |
-
}
|
490 |
-
break;
|
491 |
-
|
492 |
-
case 'saswp-wp-recipe-maker-checkbox':
|
493 |
-
saswp_compatibliy_notes(current, id);
|
494 |
-
if ($(this).is(':checked')) {
|
495 |
-
$("#saswp-wp-recipe-maker").val(1);
|
496 |
-
}else{
|
497 |
-
$("#saswp-wp-recipe-maker").val(0);
|
498 |
-
}
|
499 |
-
break;
|
500 |
-
|
501 |
-
case 'saswp-wpsso-core-checkbox':
|
502 |
-
saswp_compatibliy_notes(current, id);
|
503 |
-
if ($(this).is(':checked')) {
|
504 |
-
$("#saswp-wpsso-core").val(1);
|
505 |
-
}else{
|
506 |
-
$("#saswp-wpsso-core").val(0);
|
507 |
-
}
|
508 |
-
break;
|
509 |
-
|
510 |
-
case 'saswp-for-wordpress-checkbox':
|
511 |
-
|
512 |
-
if ($(this).is(':checked')) {
|
513 |
-
$("#saswp-for-wordpress").val(1);
|
514 |
-
}else{
|
515 |
-
$("#saswp-for-wordpress").val(0);
|
516 |
-
}
|
517 |
-
break;
|
518 |
-
case 'saswp-facebook-enable-checkbox':
|
519 |
-
|
520 |
-
if ($(this).is(':checked')) {
|
521 |
-
$("#saswp-facebook-enable").val(1);
|
522 |
-
$("#sd_facebook").show();
|
523 |
-
}else{
|
524 |
-
$("#saswp-facebook-enable").val(0);
|
525 |
-
$("#sd_facebook").hide();
|
526 |
-
}
|
527 |
-
break;
|
528 |
-
case 'saswp-twitter-enable-checkbox':
|
529 |
-
|
530 |
-
if ($(this).is(':checked')) {
|
531 |
-
$("#saswp-twitter-enable").val(1);
|
532 |
-
$("#sd_twitter").show();
|
533 |
-
}else{
|
534 |
-
$("#saswp-twitter-enable").val(0);
|
535 |
-
$("#sd_twitter").hide();
|
536 |
-
}
|
537 |
-
break;
|
538 |
-
case 'saswp-google-plus-enable-checkbox':
|
539 |
-
|
540 |
-
if ($(this).is(':checked')) {
|
541 |
-
$("#saswp-google-plus-enable").val(1);
|
542 |
-
$("#sd_google_plus").show();
|
543 |
-
}else{
|
544 |
-
$("#saswp-google-plus-enable").val(0);
|
545 |
-
$("#sd_google_plus").hide();
|
546 |
-
}
|
547 |
-
break;
|
548 |
-
case 'saswp-instagram-enable-checkbox':
|
549 |
-
|
550 |
-
if ($(this).is(':checked')) {
|
551 |
-
$("#saswp-instagram-enable").val(1);
|
552 |
-
$("#sd_instagram").show();
|
553 |
-
}else{
|
554 |
-
$("#saswp-instagram-enable").val(0);
|
555 |
-
$("#sd_instagram").hide();
|
556 |
-
}
|
557 |
-
break;
|
558 |
-
case 'saswp-youtube-enable-checkbox':
|
559 |
-
|
560 |
-
if ($(this).is(':checked')) {
|
561 |
-
$("#sd_youtube").show();
|
562 |
-
$("#saswp-youtube-enable").val(1);
|
563 |
-
}else{
|
564 |
-
$("#saswp-youtube-enable").val(0);
|
565 |
-
$("#sd_youtube").hide();
|
566 |
-
}
|
567 |
-
break;
|
568 |
-
case 'saswp-linkedin-enable-checkbox':
|
569 |
-
|
570 |
-
if ($(this).is(':checked')) {
|
571 |
-
$("#saswp-linkedin-enable").val(1);
|
572 |
-
$("#sd_linkedin").show();
|
573 |
-
}else{
|
574 |
-
$("#saswp-linkedin-enable").val(0);
|
575 |
-
$("#sd_linkedin").hide();
|
576 |
-
}
|
577 |
-
break;
|
578 |
-
case 'saswp-pinterest-enable-checkbox':
|
579 |
-
|
580 |
-
if ($(this).is(':checked')) {
|
581 |
-
$("#saswp-pinterest-enable").val(1);
|
582 |
-
$("#sd_pinterest").show();
|
583 |
-
}else{
|
584 |
-
$("#saswp-pinterest-enable").val(0);
|
585 |
-
$("#sd_pinterest").hide();
|
586 |
-
}
|
587 |
-
break;
|
588 |
-
case 'saswp-soundcloud-enable-checkbox':
|
589 |
-
|
590 |
-
if ($(this).is(':checked')) {
|
591 |
-
$("#saswp-soundcloud-enable").val(1);
|
592 |
-
$("#sd_soundcloud").show();
|
593 |
-
}else{
|
594 |
-
$("#saswp-soundcloud-enable").val(0);
|
595 |
-
$("#sd_soundcloud").hide();
|
596 |
-
}
|
597 |
-
break;
|
598 |
-
case 'saswp-tumblr-enable-checkbox':
|
599 |
-
|
600 |
-
if ($(this).is(':checked')) {
|
601 |
-
$("#saswp-tumblr-enable").val(1);
|
602 |
-
$("#sd_tumblr").show();
|
603 |
-
}else{
|
604 |
-
$("#saswp-tumblr-enable").val(0);
|
605 |
-
$("#sd_tumblr").hide();
|
606 |
-
}
|
607 |
-
break;
|
608 |
-
case 'saswp-for-amp-checkbox':
|
609 |
-
|
610 |
-
if ($(this).is(':checked')) {
|
611 |
-
$("#saswp-for-amp").val(1);
|
612 |
-
}else{
|
613 |
-
$("#saswp-for-amp").val(0);
|
614 |
-
}
|
615 |
-
break;
|
616 |
-
case 'saswp_kb_contact_1_checkbox':
|
617 |
-
|
618 |
-
if ($(this).is(':checked')) {
|
619 |
-
$("#saswp_kb_contact_1").val(1);
|
620 |
-
$("#saswp_kb_telephone, #saswp_contact_type").parent().parent('li').removeClass("saswp-display-none");
|
621 |
-
}else{
|
622 |
-
$("#saswp_kb_contact_1").val(0);
|
623 |
-
$("#saswp_kb_telephone, #saswp_contact_type").parent().parent('li').addClass("saswp-display-none");
|
624 |
-
}
|
625 |
-
break;
|
626 |
-
case 'saswp-logo-dimensions-check':
|
627 |
-
|
628 |
-
if ($(this).is(':checked')) {
|
629 |
-
$("#saswp-logo-dimensions").val(1);
|
630 |
-
$("#saswp-logo-width, #saswp-logo-height").parent().parent('li').show();
|
631 |
-
}else{
|
632 |
-
$("#saswp-logo-dimensions").val(0);
|
633 |
-
$("#saswp-logo-width, #saswp-logo-height").parent().parent('li').hide();
|
634 |
-
}
|
635 |
-
break;
|
636 |
-
case 'saswp_archive_schema_checkbox':
|
637 |
-
|
638 |
-
if ($(this).is(':checked')) {
|
639 |
-
$("#saswp_archive_schema").val(1);
|
640 |
-
$(".saswp_archive_schema_type_class").parent().parent().show();
|
641 |
-
}else{
|
642 |
-
$("#saswp_archive_schema").val(0);
|
643 |
-
$(".saswp_archive_schema_type_class").parent().parent().hide();
|
644 |
-
}
|
645 |
-
break;
|
646 |
-
|
647 |
-
case 'saswp_website_schema_checkbox':
|
648 |
-
|
649 |
-
if ($(this).is(':checked')) {
|
650 |
-
$("#saswp_website_schema").val(1);
|
651 |
-
$("#saswp_search_box_schema").parent().parent().show();
|
652 |
-
}else{
|
653 |
-
$("#saswp_website_schema").val(0);
|
654 |
-
$("#saswp_search_box_schema").parent().parent().hide();
|
655 |
-
}
|
656 |
-
break;
|
657 |
-
|
658 |
-
case 'saswp_search_box_schema_checkbox':
|
659 |
-
|
660 |
-
if ($(this).is(':checked')) {
|
661 |
-
$("#saswp_search_box_schema").val(1);
|
662 |
-
}else{
|
663 |
-
$("#saswp_search_box_schema").val(0);
|
664 |
-
}
|
665 |
-
break;
|
666 |
-
|
667 |
-
case 'saswp_breadcrumb_schema_checkbox':
|
668 |
-
|
669 |
-
if ($(this).is(':checked')) {
|
670 |
-
$("#saswp_breadcrumb_schema").val(1);
|
671 |
-
}else{
|
672 |
-
$("#saswp_breadcrumb_schema").val(0);
|
673 |
-
}
|
674 |
-
break;
|
675 |
-
|
676 |
-
case 'saswp_comments_schema_checkbox':
|
677 |
-
|
678 |
-
if ($(this).is(':checked')) {
|
679 |
-
$("#saswp_comments_schema").val(1);
|
680 |
-
}else{
|
681 |
-
$("#saswp_comments_schema").val(0);
|
682 |
-
}
|
683 |
-
break;
|
684 |
-
|
685 |
-
case 'saswp-compativility-checkbox':
|
686 |
-
|
687 |
-
if ($(this).is(':checked')) {
|
688 |
-
$("#saswp-flexmlx-compativility").val(1);
|
689 |
-
}else{
|
690 |
-
$("#saswp-flexmlx-compativility").val(0);
|
691 |
-
}
|
692 |
-
break;
|
693 |
-
|
694 |
-
case 'saswp-review-module-checkbox':
|
695 |
-
|
696 |
-
if ($(this).is(':checked')) {
|
697 |
-
$("#saswp-review-module").val(1);
|
698 |
-
}else{
|
699 |
-
$("#saswp-review-module").val(0);
|
700 |
-
}
|
701 |
-
break;
|
702 |
-
|
703 |
-
case 'saswp-kk-star-raring-checkbox':
|
704 |
-
|
705 |
-
saswp_compatibliy_notes(current, id);
|
706 |
-
if ($(this).is(':checked')) {
|
707 |
-
$("#saswp-kk-star-raring").val(1);
|
708 |
-
}else{
|
709 |
-
$("#saswp-kk-star-raring").val(0);
|
710 |
-
}
|
711 |
-
break;
|
712 |
-
case 'saswp-woocommerce-checkbox':
|
713 |
-
saswp_compatibliy_notes(current, id);
|
714 |
-
if ($(this).is(':checked')) {
|
715 |
-
$("#saswp-woocommerce").val(1);
|
716 |
-
}else{
|
717 |
-
$("#saswp-woocommerce").val(0);
|
718 |
-
}
|
719 |
-
break;
|
720 |
-
|
721 |
-
case 'saswp-extra-checkbox':
|
722 |
-
saswp_compatibliy_notes(current, id);
|
723 |
-
if ($(this).is(':checked')) {
|
724 |
-
$("#saswp-extra").val(1);
|
725 |
-
}else{
|
726 |
-
$("#saswp-extra").val(0);
|
727 |
-
}
|
728 |
-
break;
|
729 |
-
|
730 |
-
case 'saswp-dw-question-answer-checkbox':
|
731 |
-
saswp_compatibliy_notes(current, id);
|
732 |
-
if ($(this).is(':checked')) {
|
733 |
-
$("#saswp-dw-question-answer").val(1);
|
734 |
-
}else{
|
735 |
-
$("#saswp-dw-question-answer").val(0);
|
736 |
-
}
|
737 |
-
break;
|
738 |
-
|
739 |
-
case 'saswp-wp-job-manager-checkbox':
|
740 |
-
saswp_compatibliy_notes(current, id);
|
741 |
-
if ($(this).is(':checked')) {
|
742 |
-
$("#saswp-wp-job-manager").val(1);
|
743 |
-
}else{
|
744 |
-
$("#saswp-wp-job-manager").val(0);
|
745 |
-
}
|
746 |
-
break;
|
747 |
-
|
748 |
-
case 'saswp-yoast-checkbox':
|
749 |
-
saswp_compatibliy_notes(current, id);
|
750 |
-
if ($(this).is(':checked')) {
|
751 |
-
$("#saswp-yoast").val(1);
|
752 |
-
}else{
|
753 |
-
$("#saswp-yoast").val(0);
|
754 |
-
}
|
755 |
-
break;
|
756 |
-
|
757 |
-
case 'saswp-rankmath-checkbox':
|
758 |
-
saswp_compatibliy_notes(current, id);
|
759 |
-
if ($(this).is(':checked')) {
|
760 |
-
$("#saswp-rankmath").val(1);
|
761 |
-
}else{
|
762 |
-
$("#saswp-rankmath").val(0);
|
763 |
-
}
|
764 |
-
break;
|
765 |
-
|
766 |
-
case 'saswp-tagyeem-checkbox':
|
767 |
-
saswp_compatibliy_notes(current, id);
|
768 |
-
if ($(this).is(':checked')) {
|
769 |
-
$("#saswp-tagyeem").val(1);
|
770 |
-
}else{
|
771 |
-
$("#saswp-tagyeem").val(0);
|
772 |
-
}
|
773 |
-
break;
|
774 |
-
|
775 |
-
case 'saswp-the-events-calendar-checkbox':
|
776 |
-
saswp_compatibliy_notes(current, id);
|
777 |
-
if ($(this).is(':checked')) {
|
778 |
-
$("#saswp-the-events-calendar").val(1);
|
779 |
-
}else{
|
780 |
-
$("#saswp-the-events-calendar").val(0);
|
781 |
-
}
|
782 |
-
break;
|
783 |
-
|
784 |
-
|
785 |
-
case 'saswp-woocommerce-booking-checkbox':
|
786 |
-
saswp_compatibliy_notes(current, id);
|
787 |
-
if ($(this).is(':checked')) {
|
788 |
-
$("#saswp-woocommerce-booking").val(1);
|
789 |
-
$("#saswp-woocommerce-booking-main").val(1);
|
790 |
-
}else{
|
791 |
-
$("#saswp-woocommerce-booking").val(0);
|
792 |
-
$("#saswp-woocommerce-booking-main").val(0);
|
793 |
-
}
|
794 |
-
break;
|
795 |
-
|
796 |
-
case 'saswp-woocommerce-booking-main-checkbox':
|
797 |
-
saswp_compatibliy_notes(current, id);
|
798 |
-
if ($(this).is(':checked')) {
|
799 |
-
$("#saswp-woocommerce-booking-main").val(1);
|
800 |
-
$("#saswp-woocommerce-booking").val(1);
|
801 |
-
}else{
|
802 |
-
$("#saswp-woocommerce-booking-main").val(0);
|
803 |
-
$("#saswp-woocommerce-booking").val(0);
|
804 |
-
}
|
805 |
-
break;
|
806 |
-
|
807 |
-
case 'saswp-woocommerce-membership-checkbox':
|
808 |
-
saswp_compatibliy_notes(current, id);
|
809 |
-
if ($(this).is(':checked')) {
|
810 |
-
$("#saswp-woocommerce-membership").val(1);
|
811 |
-
}else{
|
812 |
-
$("#saswp-woocommerce-membership").val(0);
|
813 |
-
}
|
814 |
-
break;
|
815 |
-
|
816 |
-
case 'saswp-defragment-checkbox':
|
817 |
-
|
818 |
-
if ($(this).is(':checked')) {
|
819 |
-
$("#saswp-defragment").val(1);
|
820 |
-
}else{
|
821 |
-
$("#saswp-defragment").val(0);
|
822 |
-
}
|
823 |
-
break;
|
824 |
-
|
825 |
-
case 'saswp-cooked-checkbox':
|
826 |
-
saswp_compatibliy_notes(current, id);
|
827 |
-
if ($(this).is(':checked')) {
|
828 |
-
$("#saswp-cooked").val(1);
|
829 |
-
}else{
|
830 |
-
$("#saswp-cooked").val(0);
|
831 |
-
}
|
832 |
-
break;
|
833 |
-
|
834 |
-
case 'saswp-flexmlx-compativility-checkbox':
|
835 |
-
saswp_compatibliy_notes(current, id);
|
836 |
-
if ($(this).is(':checked')) {
|
837 |
-
$("#saswp-flexmlx-compativility").val(1);
|
838 |
-
}else{
|
839 |
-
$("#saswp-flexmlx-compativility").val(0);
|
840 |
-
}
|
841 |
-
break;
|
842 |
-
|
843 |
-
case 'saswp-shopper-approved-review-checkbox':
|
844 |
-
saswp_compatibliy_notes(current, id);
|
845 |
-
if ($(this).is(':checked')) {
|
846 |
-
$("#saswp-shopper-approved-review").val(1);
|
847 |
-
$(".saswp-s-reviews-settings-table").parent().parent().parent().show();
|
848 |
-
}else{
|
849 |
-
$("#saswp-shopper-approved-review").val(0);
|
850 |
-
$(".saswp-s-reviews-settings-table").parent().parent().parent().hide();
|
851 |
-
}
|
852 |
-
break;
|
853 |
-
|
854 |
-
case 'saswp-google-review-checkbox':
|
855 |
-
|
856 |
-
if ($(this).is(':checked')) {
|
857 |
-
|
858 |
-
$("#saswp-google-review").val(1);
|
859 |
-
|
860 |
-
if($("#saswp-google-rv-free-checkbox").length){
|
861 |
-
|
862 |
-
$("#saswp-google-review-free").parent().parent().show();
|
863 |
-
|
864 |
-
if($("#saswp-google-rv-free-checkbox").is(":checked")){
|
865 |
-
$("#saswp_google_place_api_key").parent().parent().show();
|
866 |
-
}else{
|
867 |
-
$("#saswp_google_place_api_key").parent().parent().hide();
|
868 |
-
}
|
869 |
-
}else{
|
870 |
-
$("#saswp_google_place_api_key").parent().parent().show();
|
871 |
-
}
|
872 |
-
$(".saswp-g-reviews-settings-table").parent().parent().parent().show();
|
873 |
-
|
874 |
-
}else{
|
875 |
-
|
876 |
-
$("#saswp-google-review").val(0);
|
877 |
-
$("#saswp_google_place_api_key").parent().parent().hide();
|
878 |
-
$(".saswp-g-reviews-settings-table").parent().parent().parent().hide();
|
879 |
-
|
880 |
-
if($("#saswp-google-rv-free-checkbox").length){
|
881 |
-
$("#saswp-google-review-free").parent().parent().hide();
|
882 |
-
|
883 |
-
}
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
}
|
890 |
-
break;
|
891 |
-
|
892 |
-
case 'saswp-google-rv-free-checkbox':
|
893 |
-
|
894 |
-
if($("#saswp-google-review-checkbox").is(":checked")){
|
895 |
-
if ($(this).is(':checked')) {
|
896 |
-
$("#saswp-google-review-free").val(1);
|
897 |
-
$("#saswp_google_place_api_key").parent().parent().show();
|
898 |
-
}else{
|
899 |
-
$("#saswp-google-review-free").val(0);
|
900 |
-
$("#saswp_google_place_api_key").parent().parent().hide();
|
901 |
-
}
|
902 |
-
|
903 |
-
}else{
|
904 |
-
$("#saswp-google-review-free").val(0);
|
905 |
-
$("#saswp_google_place_api_key").parent().parent().hide();
|
906 |
-
}
|
907 |
-
|
908 |
-
|
909 |
-
break;
|
910 |
-
|
911 |
-
|
912 |
-
case 'saswp-markup-footer-checkbox':
|
913 |
-
|
914 |
-
if ($(this).is(':checked')) {
|
915 |
-
$("#saswp-markup-footer").val(1);
|
916 |
-
}else{
|
917 |
-
$("#saswp-markup-footer").val(0);
|
918 |
-
}
|
919 |
-
break;
|
920 |
-
|
921 |
-
case 'saswp-pretty-print-checkbox':
|
922 |
-
|
923 |
-
if ($(this).is(':checked')) {
|
924 |
-
$("#saswp-pretty-print").val(1);
|
925 |
-
}else{
|
926 |
-
$("#saswp-pretty-print").val(0);
|
927 |
-
}
|
928 |
-
break;
|
929 |
-
|
930 |
-
case 'saswp-wppostratings-raring-checkbox':
|
931 |
-
saswp_compatibliy_notes(current, id);
|
932 |
-
if ($(this).is(':checked')) {
|
933 |
-
$("#saswp-wppostratings-raring").val(1);
|
934 |
-
}else{
|
935 |
-
$("#saswp-wppostratings-raring").val(0);
|
936 |
-
}
|
937 |
-
break;
|
938 |
-
|
939 |
-
case 'saswp-bbpress-checkbox':
|
940 |
-
saswp_compatibliy_notes(current, id);
|
941 |
-
if ($(this).is(':checked')) {
|
942 |
-
$("#saswp-bbpress").val(1);
|
943 |
-
}else{
|
944 |
-
$("#saswp-bbpress").val(0);
|
945 |
-
}
|
946 |
-
break;
|
947 |
-
|
948 |
-
case 'saswp-microdata-cleanup-checkbox':
|
949 |
-
|
950 |
-
if ($(this).is(':checked')) {
|
951 |
-
$("#saswp-microdata-cleanup").val(1);
|
952 |
-
}else{
|
953 |
-
$("#saswp-microdata-cleanup").val(0);
|
954 |
-
}
|
955 |
-
break;
|
956 |
-
|
957 |
-
|
958 |
-
default:
|
959 |
-
break;
|
960 |
-
}
|
961 |
-
|
962 |
-
}).change();
|
963 |
-
|
964 |
-
$("#saswp_kb_type").change(function(){
|
965 |
-
|
966 |
-
var datatype = $(this).val();
|
967 |
-
|
968 |
-
$(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass('saswp_hide');
|
969 |
-
$(".saswp_kg_logo").parent().parent().parent().addClass('saswp_hide');
|
970 |
-
$("#sd-person-image").parent().parent().parent().addClass('saswp_hide');
|
971 |
-
|
972 |
-
|
973 |
-
if(datatype == 'Organization'){
|
974 |
-
|
975 |
-
$(".saswp_org_fields").parent().parent().removeClass('saswp_hide');
|
976 |
-
$(".saswp_person_fields").parent().parent().addClass('saswp_hide');
|
977 |
-
$(".saswp_kg_logo").parent().parent().parent().removeClass('saswp_hide');
|
978 |
-
$("#sd-person-image").parent().parent().parent().addClass('saswp_hide');
|
979 |
-
}
|
980 |
-
if(datatype == 'Person'){
|
981 |
-
|
982 |
-
$(".saswp_org_fields").parent().parent().addClass('saswp_hide');
|
983 |
-
$(".saswp_person_fields").parent().parent().removeClass('saswp_hide');
|
984 |
-
$(".saswp_kg_logo").parent().parent().parent().removeClass('saswp_hide');
|
985 |
-
$("#sd-person-image").parent().parent().parent().removeClass('saswp_hide');
|
986 |
-
}
|
987 |
-
|
988 |
-
}).change();
|
989 |
-
|
990 |
-
$(document).on("click", "input[data-id=media]" ,function(e) { // Application Icon upload
|
991 |
-
e.preventDefault();
|
992 |
-
var current = $(this);
|
993 |
-
var button = current;
|
994 |
-
var id = button.attr('id').replace('_button', '');
|
995 |
-
var saswpMediaUploader = wp.media({
|
996 |
-
title: "Application Icon",
|
997 |
-
button: {
|
998 |
-
text: "Select Icon"
|
999 |
-
},
|
1000 |
-
multiple: false, // Set this to true to allow multiple files to be selected
|
1001 |
-
library:{type : 'image'}
|
1002 |
-
})
|
1003 |
-
.on("select", function() {
|
1004 |
-
var attachment = saswpMediaUploader.state().get('selection').first().toJSON();
|
1005 |
-
|
1006 |
-
$("#"+id).val(attachment.url);
|
1007 |
-
$("input[data-id='"+id+"_id']").val(attachment.id);
|
1008 |
-
$("input[data-id='"+id+"_height']").val(attachment.height);
|
1009 |
-
$("input[data-id='"+id+"_width']").val(attachment.width);
|
1010 |
-
$("input[data-id='"+id+"_thumbnail']").val(attachment.url);
|
1011 |
-
|
1012 |
-
if(current.attr('id') === 'sd_default_image_button'){
|
1013 |
-
|
1014 |
-
$("#sd_default_image_width").val(attachment.width);
|
1015 |
-
$("#sd_default_image_height").val(attachment.height);
|
1016 |
-
|
1017 |
-
}
|
1018 |
-
var smaller_img_notice = '';
|
1019 |
-
if("saswp_image_div_"+id == 'saswp_image_div_sd_default_image' && attachment.height < 1200){
|
1020 |
-
smaller_img_notice = '<p class="saswp_warning">Image size is smaller than recommended size</p>';
|
1021 |
-
}
|
1022 |
-
|
1023 |
-
$(".saswp_image_div_"+id).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+attachment.url+'"/><a data-id="'+id+'" href="#" class="saswp_prev_close">X</a></div>'+smaller_img_notice);
|
1024 |
-
|
1025 |
-
})
|
1026 |
-
.open();
|
1027 |
-
});
|
1028 |
-
|
1029 |
-
$(document).on("click", ".saswp_prev_close", function(e){
|
1030 |
-
e.preventDefault();
|
1031 |
-
|
1032 |
-
var id = $(this).attr('data-id');
|
1033 |
-
console.log(id);
|
1034 |
-
$(this).parent().remove();
|
1035 |
-
$("#"+id).val('');
|
1036 |
-
$("input[data-id='"+id+"_id']").val('');
|
1037 |
-
$("input[data-id='"+id+"_height']").val('');
|
1038 |
-
$("input[data-id='"+id+"_width']").val('');
|
1039 |
-
$("input[data-id='"+id+"_thumbnail']").val('');
|
1040 |
-
|
1041 |
-
if(id === 'sd_default_image'){
|
1042 |
-
|
1043 |
-
$("#sd_default_image_width").val('');
|
1044 |
-
$("#sd_default_image_height").val('');
|
1045 |
-
|
1046 |
-
}
|
1047 |
-
|
1048 |
-
|
1049 |
-
});
|
1050 |
-
|
1051 |
-
//Settings page jquery ends here
|
1052 |
-
|
1053 |
-
|
1054 |
-
$(document).on("change",".saswp-schema-type-toggle", function(e){
|
1055 |
-
var schema_id = $(this).attr("data-schema-id");
|
1056 |
-
var post_id = $(this).attr("data-post-id");
|
1057 |
-
if($(this).is(':checked')){
|
1058 |
-
var status = 1;
|
1059 |
-
}else{
|
1060 |
-
var status = 0;
|
1061 |
-
}
|
1062 |
-
$.ajax({
|
1063 |
-
type: "POST",
|
1064 |
-
url:ajaxurl,
|
1065 |
-
dataType: "json",
|
1066 |
-
data:{action:"saswp_enable_disable_schema_on_post",status:status, schema_id:schema_id, post_id:post_id, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1067 |
-
success:function(response){
|
1068 |
-
},
|
1069 |
-
error: function(response){
|
1070 |
-
console.log(response);
|
1071 |
-
}
|
1072 |
-
});
|
1073 |
-
|
1074 |
-
});
|
1075 |
-
|
1076 |
-
|
1077 |
-
$(document).on("click",".saswp-reset-data", function(e){
|
1078 |
-
e.preventDefault();
|
1079 |
-
|
1080 |
-
var saswp_confirm = confirm("Are you sure?");
|
1081 |
-
|
1082 |
-
if(saswp_confirm == true){
|
1083 |
-
|
1084 |
-
$.ajax({
|
1085 |
-
type: "POST",
|
1086 |
-
url:ajaxurl,
|
1087 |
-
dataType: "json",
|
1088 |
-
data:{action:"saswp_reset_all_settings", saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1089 |
-
success:function(response){
|
1090 |
-
setTimeout(function(){ location.reload(); }, 1000);
|
1091 |
-
},
|
1092 |
-
error: function(response){
|
1093 |
-
console.log(response);
|
1094 |
-
}
|
1095 |
-
});
|
1096 |
-
|
1097 |
-
}
|
1098 |
-
|
1099 |
-
|
1100 |
-
});
|
1101 |
-
|
1102 |
-
//Licensing jquery starts here
|
1103 |
-
$(document).on("click",".saswp_license_activation", function(e){
|
1104 |
-
e.preventDefault();
|
1105 |
-
var current = $(this);
|
1106 |
-
current.addClass('updating-message');
|
1107 |
-
var license_status = $(this).attr('license-status');
|
1108 |
-
var add_on = $(this).attr('add-on');
|
1109 |
-
var license_key = $("#"+add_on+"_addon_license_key").val();
|
1110 |
-
|
1111 |
-
if(license_status && add_on && license_key){
|
1112 |
-
|
1113 |
-
$.ajax({
|
1114 |
-
type: "POST",
|
1115 |
-
url:ajaxurl,
|
1116 |
-
dataType: "json",
|
1117 |
-
data:{action:"saswp_license_status_check",license_key:license_key,license_status:license_status, add_on:add_on, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1118 |
-
success:function(response){
|
1119 |
-
|
1120 |
-
$("#"+add_on+"_addon_license_key_status").val(response['status']);
|
1121 |
-
|
1122 |
-
if(response['status'] =='active'){
|
1123 |
-
$(".saswp-"+add_on+"-dashicons").addClass('dashicons-yes');
|
1124 |
-
$(".saswp-"+add_on+"-dashicons").removeClass('dashicons-no-alt');
|
1125 |
-
$(".saswp-"+add_on+"-dashicons").css("color", "green");
|
1126 |
-
|
1127 |
-
$(".saswp_license_activation[add-on='" + add_on + "']").attr("license-status", "inactive");
|
1128 |
-
$(".saswp_license_activation[add-on='" + add_on + "']").text("Deactivate");
|
1129 |
-
|
1130 |
-
$(".saswp_license_status_msg[add-on='" + add_on + "']").text('Activated');
|
1131 |
-
|
1132 |
-
$(".saswp_license_status_msg[add-on='" + add_on + "']").css("color", "green");
|
1133 |
-
$(".saswp_license_status_msg[add-on='" + add_on + "']").text(response['message']);
|
1134 |
-
|
1135 |
-
}else{
|
1136 |
-
|
1137 |
-
$(".saswp-"+add_on+"-dashicons").addClass('dashicons-no-alt');
|
1138 |
-
$(".saswp-"+add_on+"-dashicons").removeClass('dashicons-yes');
|
1139 |
-
$(".saswp-"+add_on+"-dashicons").css("color", "red");
|
1140 |
-
|
1141 |
-
$(".saswp_license_activation[add-on='" + add_on + "']").attr("license-status", "active");
|
1142 |
-
$(".saswp_license_activation[add-on='" + add_on + "']").text("Activate");
|
1143 |
-
|
1144 |
-
$(".saswp_license_status_msg[add-on='" + add_on + "']").css("color", "red");
|
1145 |
-
$(".saswp_license_status_msg[add-on='" + add_on + "']").text(response['message']);
|
1146 |
-
}
|
1147 |
-
current.removeClass('updating-message');
|
1148 |
-
},
|
1149 |
-
error: function(response){
|
1150 |
-
console.log(response);
|
1151 |
-
}
|
1152 |
-
});
|
1153 |
-
|
1154 |
-
}else{
|
1155 |
-
alert('Please enter value license key');
|
1156 |
-
current.removeClass('updating-message');
|
1157 |
-
}
|
1158 |
-
|
1159 |
-
});
|
1160 |
-
//Licensing jquery ends here
|
1161 |
-
//query form send starts here
|
1162 |
-
|
1163 |
-
$(".saswp-send-query").on("click", function(e){
|
1164 |
-
e.preventDefault();
|
1165 |
-
var message = $("#saswp_query_message").val();
|
1166 |
-
if($.trim(message) !=''){
|
1167 |
-
$.ajax({
|
1168 |
-
type: "POST",
|
1169 |
-
url:ajaxurl,
|
1170 |
-
dataType: "json",
|
1171 |
-
data:{action:"saswp_send_query_message", message:message, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1172 |
-
success:function(response){
|
1173 |
-
if(response['status'] =='t'){
|
1174 |
-
$(".saswp-query-success").show();
|
1175 |
-
$(".saswp-query-error").hide();
|
1176 |
-
}else{
|
1177 |
-
console.log('dd');
|
1178 |
-
$(".saswp-query-success").hide();
|
1179 |
-
$(".saswp-query-error").show();
|
1180 |
-
}
|
1181 |
-
},
|
1182 |
-
error: function(response){
|
1183 |
-
console.log(response);
|
1184 |
-
}
|
1185 |
-
});
|
1186 |
-
}else{
|
1187 |
-
alert('Please enter the message');
|
1188 |
-
}
|
1189 |
-
|
1190 |
-
});
|
1191 |
-
|
1192 |
-
//Importer from schema plugin starts here
|
1193 |
-
|
1194 |
-
$(".saswp-import-plugins").on("click", function(e){
|
1195 |
-
e.preventDefault();
|
1196 |
-
var current_selection = $(this);
|
1197 |
-
current_selection.addClass('updating-message');
|
1198 |
-
var plugin_name = $(this).attr('data-id');
|
1199 |
-
$.get(ajaxurl,
|
1200 |
-
{ action:"saswp_import_plugin_data", plugin_name:plugin_name, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1201 |
-
function(response){
|
1202 |
-
if(response['status'] =='t'){
|
1203 |
-
$(current_selection).parent().find(".saswp-imported-message").text(response['message']);
|
1204 |
-
$(current_selection).parent().find(".saswp-imported-message").removeClass('saswp-error');
|
1205 |
-
setTimeout(function(){ location.reload(); }, 2000);
|
1206 |
-
}else{
|
1207 |
-
$(current_selection).parent().find(".saswp-imported-message").addClass('saswp-error');
|
1208 |
-
$(current_selection).parent().find(".saswp-imported-message").text(response['message']);
|
1209 |
-
}
|
1210 |
-
current_selection.removeClass('updating-message');
|
1211 |
-
},'json');
|
1212 |
-
});
|
1213 |
-
|
1214 |
-
|
1215 |
-
$(".saswp-feedback-no-thanks").on("click", function(e){
|
1216 |
-
e.preventDefault();
|
1217 |
-
$.get(ajaxurl,
|
1218 |
-
{ action:"saswp_feeback_no_thanks"},
|
1219 |
-
function(response){
|
1220 |
-
if(response['status'] =='t'){
|
1221 |
-
$(".saswp-feedback-notice").hide();
|
1222 |
-
}
|
1223 |
-
},'json');
|
1224 |
-
});
|
1225 |
-
|
1226 |
-
$(".saswp-feedback-remindme").on("click", function(e){
|
1227 |
-
e.preventDefault();
|
1228 |
-
$.get(ajaxurl,
|
1229 |
-
{ action:"saswp_feeback_remindme"},
|
1230 |
-
function(response){
|
1231 |
-
if(response['status'] =='t'){
|
1232 |
-
$(".saswp-feedback-notice").hide();
|
1233 |
-
}
|
1234 |
-
},'json');
|
1235 |
-
});
|
1236 |
-
|
1237 |
-
$(document).on("change",'.saswp-local-business-type-select', function(e){
|
1238 |
-
e.preventDefault();
|
1239 |
-
var current = $(this);
|
1240 |
-
var business_type = $(this).val();
|
1241 |
-
$.get(ajaxurl,
|
1242 |
-
{ action:"saswp_get_sub_business_ajax", business_type:business_type, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1243 |
-
function(response){
|
1244 |
-
|
1245 |
-
if(response['status'] =='t'){
|
1246 |
-
$(".saswp-local-business-name-select").parents('tr').remove();
|
1247 |
-
var schema_id = current.parents('.saswp-post-specific-wrapper').attr('data-id');
|
1248 |
-
var html ='<tr><th><label for="saswp_business_name_'+schema_id+'">Sub Business Type</label></th>';
|
1249 |
-
html +='<td><select class="saswp-local-business-name-select" id="saswp_business_name_'+schema_id+'" name="saswp_business_name_'+schema_id+'">';
|
1250 |
-
$.each(response['result'], function(index, element){
|
1251 |
-
html +='<option value="'+index+'">'+element+'</option>';
|
1252 |
-
});
|
1253 |
-
html +='</select></td>';
|
1254 |
-
html +='</tr>';
|
1255 |
-
current.parents('.form-table tr:first').after(html);
|
1256 |
-
}else{
|
1257 |
-
$(".saswp-local-business-name-select").parents('tr').remove();
|
1258 |
-
}
|
1259 |
-
},'json');
|
1260 |
-
});
|
1261 |
-
|
1262 |
-
|
1263 |
-
function saswp_item_reviewed_call(){
|
1264 |
-
|
1265 |
-
$(".saswp-item-reviewed").change(function(e){
|
1266 |
-
e.preventDefault();
|
1267 |
-
var schema_type ="";
|
1268 |
-
|
1269 |
-
if($('select#schema_type option:selected').val()){
|
1270 |
-
schema_type = $('select#schema_type option:selected').val();
|
1271 |
-
}
|
1272 |
-
if($(".saswp-tab-links.selected").attr('saswp-schema-type')){
|
1273 |
-
schema_type = $(".saswp-tab-links.selected").attr('saswp-schema-type');
|
1274 |
-
}
|
1275 |
-
|
1276 |
-
if(schema_type === 'Review'){
|
1277 |
-
|
1278 |
-
var current = $(this);
|
1279 |
-
var item = $(this).val();
|
1280 |
-
var post_id = saswp_localize_data.post_id;
|
1281 |
-
var schema_id = $(current).attr('data-id');
|
1282 |
-
var post_specific = $(current).attr('post-specific');
|
1283 |
-
$.get(ajaxurl,
|
1284 |
-
{ action:"saswp_get_item_reviewed_fields",schema_id:schema_id, post_specific:post_specific ,item:item, post_id:post_id, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1285 |
-
function(response){
|
1286 |
-
|
1287 |
-
$(current).parent().parent().nextAll().remove(".saswp-review-tr");
|
1288 |
-
$(current).parent().parent().after(response);
|
1289 |
-
|
1290 |
-
});
|
1291 |
-
|
1292 |
-
}
|
1293 |
-
|
1294 |
-
|
1295 |
-
}).change();
|
1296 |
-
|
1297 |
-
}
|
1298 |
-
saswp_item_reviewed_call();
|
1299 |
-
|
1300 |
-
function saswpAddTimepicker(){
|
1301 |
-
$('.saswp-local-schema-time-picker').timepicker({ 'timeFormat': 'H:i:s'});
|
1302 |
-
}
|
1303 |
-
$('.saswp-local-schema-time-picker').timepicker({ 'timeFormat': 'H:i:s'});
|
1304 |
-
|
1305 |
-
$(document).on("click",".saswp-add-custom-schema", function(e){
|
1306 |
-
|
1307 |
-
e.preventDefault();
|
1308 |
-
|
1309 |
-
$(".saswp-add-custom-schema-field").removeClass('saswp_hide');
|
1310 |
-
$(this).hide();
|
1311 |
-
|
1312 |
-
});
|
1313 |
-
|
1314 |
-
$(document).on("click", ".saswp-delete-custom-schema", function(e){
|
1315 |
-
|
1316 |
-
e.preventDefault();
|
1317 |
-
|
1318 |
-
$("#saswp_custom_schema_field").val('');
|
1319 |
-
$(".saswp-add-custom-schema-field").addClass('saswp_hide');
|
1320 |
-
$(".saswp-add-custom-schema").show();
|
1321 |
-
|
1322 |
-
});
|
1323 |
-
|
1324 |
-
$(".saswp-modify_schema_post_enable").on("click", function(e){
|
1325 |
-
var current = $(this);
|
1326 |
-
current.addClass('updating-message');
|
1327 |
-
e.preventDefault();
|
1328 |
-
$.get(ajaxurl,
|
1329 |
-
{ action:"saswp_modify_schema_post_enable", post_id: saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1330 |
-
function(response){
|
1331 |
-
current.remove();
|
1332 |
-
$(".saswp-add-custom-schema-div").remove();
|
1333 |
-
$("#post_specific .inside").append(response);
|
1334 |
-
current.removeClass('updating-message');
|
1335 |
-
saswpAddTimepicker();
|
1336 |
-
saswp_schema_datepicker();
|
1337 |
-
saswp_enable_rating_review();
|
1338 |
-
saswp_item_reviewed_call();
|
1339 |
-
});
|
1340 |
-
|
1341 |
-
});
|
1342 |
-
saswp_schema_datepicker();
|
1343 |
-
|
1344 |
-
saswp_reviews_datepicker();
|
1345 |
-
function saswp_reviews_datepicker(){
|
1346 |
-
|
1347 |
-
$('.saswp-reviews-datepicker-picker').datepicker({
|
1348 |
-
dateFormat: "yy-mm-dd"
|
1349 |
-
});
|
1350 |
-
}
|
1351 |
-
|
1352 |
-
//Review js starts here
|
1353 |
-
|
1354 |
-
$(document).on("click", ".saswp-add-more-item",function(e){
|
1355 |
-
e.preventDefault();
|
1356 |
-
var rows = $('.saswp-review-item-list-table tr').length;
|
1357 |
-
console.log(rows);
|
1358 |
-
var html = '<tr class="saswp-review-item-tr">';
|
1359 |
-
html += '<td>Review Item Feature</td>';
|
1360 |
-
html += '<td><input type="text" name="saswp-review-item-feature[]"></td>';
|
1361 |
-
html += '<td>Rating</td>';
|
1362 |
-
html += '<td><input step="0.1" min="0" max="5" type="number" name="saswp-review-item-star-rating[]"></td>';
|
1363 |
-
html += '<td><a type="button" class="saswp-remove-review-item button">x</a></td>';
|
1364 |
-
html += '</tr>';
|
1365 |
-
$(".saswp-review-item-list-table").append(html);
|
1366 |
-
|
1367 |
-
});
|
1368 |
-
|
1369 |
-
$(document).on("click", ".saswp-remove-review-item", function(e){
|
1370 |
-
e.preventDefault();
|
1371 |
-
$(this).parent().parent('tr').remove();
|
1372 |
-
});
|
1373 |
-
|
1374 |
-
$(document).on("focusout", ".saswp-review-item-tr input[type=number]", function(e){
|
1375 |
-
e.preventDefault();
|
1376 |
-
var total_rating = 0;
|
1377 |
-
var element_count = $(".saswp-review-item-tr input[type=number]").length;
|
1378 |
-
$(".saswp-review-item-tr input[type=number]").each(function(index, element){
|
1379 |
-
if($(element).val() ==''){
|
1380 |
-
total_rating += parseFloat(0);
|
1381 |
-
}else{
|
1382 |
-
total_rating += parseFloat($(element).val());
|
1383 |
-
}
|
1384 |
-
|
1385 |
-
});
|
1386 |
-
var over_all_rating = total_rating / element_count;
|
1387 |
-
$("#saswp-review-item-over-all").val(over_all_rating);
|
1388 |
-
});
|
1389 |
-
|
1390 |
-
$("#saswp-review-location").change(function(){
|
1391 |
-
var location = $(this).val();
|
1392 |
-
$(".saswp-review-shortcode").addClass('saswp_hide');
|
1393 |
-
if(location == 3){
|
1394 |
-
$(".saswp-review-shortcode").removeClass('saswp_hide');
|
1395 |
-
}
|
1396 |
-
}).change();
|
1397 |
-
|
1398 |
-
$("#saswp-review-item-enable").change(function(){
|
1399 |
-
if ($(this).is(':checked')) {
|
1400 |
-
$(".saswp-review-fields").show();
|
1401 |
-
}else{
|
1402 |
-
$(".saswp-review-fields").hide();
|
1403 |
-
}
|
1404 |
-
}).change();
|
1405 |
-
|
1406 |
-
$(document).on("click", ".saswp-restore-post-schema", function(e){
|
1407 |
-
e.preventDefault();
|
1408 |
-
var current = $(this);
|
1409 |
-
current.addClass('updating-message');
|
1410 |
-
|
1411 |
-
if($(".saswp-post-specific-schema-ids").val()){
|
1412 |
-
var schema_ids = JSON.parse($(".saswp-post-specific-schema-ids").val());
|
1413 |
-
}
|
1414 |
-
|
1415 |
-
$.post(ajaxurl,
|
1416 |
-
{ action:"saswp_restore_schema", schema_ids:schema_ids,post_id: saswp_localize_data.post_id, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1417 |
-
function(response){
|
1418 |
-
if(response['status'] =='t'){
|
1419 |
-
setTimeout(function(){ location.reload(); }, 1000);
|
1420 |
-
}else{
|
1421 |
-
alert(response['msg']);
|
1422 |
-
setTimeout(function(){ location.reload(); }, 1000);
|
1423 |
-
}
|
1424 |
-
current.removeClass('updating-message');
|
1425 |
-
},'json');
|
1426 |
-
});
|
1427 |
-
|
1428 |
-
//Review js ends here
|
1429 |
-
|
1430 |
-
$(document).on("click","div.saswp-tab ul.saswp-tab-nav a", function(e){
|
1431 |
-
e.preventDefault();
|
1432 |
-
var attr = $(this).attr('data-id');
|
1433 |
-
$(".saswp-post-specific-wrapper").hide();
|
1434 |
-
$("#"+attr).show();
|
1435 |
-
$('div.saswp-tab ul.saswp-tab-nav a').removeClass('selected');
|
1436 |
-
$('div.saswp-tab ul.saswp-tab-nav li').removeClass('selected');
|
1437 |
-
$(this).addClass('selected');
|
1438 |
-
$(this).parent().addClass('selected');
|
1439 |
-
saswp_enable_rating_review();
|
1440 |
-
});
|
1441 |
-
|
1442 |
-
|
1443 |
-
$('#saswp-global-tabs a:first').addClass('saswp-global-selected');
|
1444 |
-
$('.saswp-global-container').hide();
|
1445 |
-
|
1446 |
-
var hash = window.location.hash;
|
1447 |
-
|
1448 |
-
if(hash == '#saswp-default-container'){
|
1449 |
-
$('.saswp-global-container:eq(2)').show();
|
1450 |
-
}else{
|
1451 |
-
$('.saswp-global-container:first').show();
|
1452 |
-
}
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
$('#saswp-global-tabs a').click(function(){
|
1457 |
-
var t = $(this).attr('data-id');
|
1458 |
-
|
1459 |
-
if(!$(this).hasClass('saswp-global-selected')){
|
1460 |
-
$('#saswp-global-tabs a').removeClass('saswp-global-selected');
|
1461 |
-
$(this).addClass('saswp-global-selected');
|
1462 |
-
|
1463 |
-
$('.saswp-global-container').hide();
|
1464 |
-
$('#'+t).show();
|
1465 |
-
}
|
1466 |
-
});
|
1467 |
-
|
1468 |
-
|
1469 |
-
$('#saswp-tools-tabs a:first').addClass('saswp-global-selected');
|
1470 |
-
$('.saswp-tools-container').hide();
|
1471 |
-
$('.saswp-tools-container:first').show();
|
1472 |
-
|
1473 |
-
$('#saswp-tools-tabs a').click(function(){
|
1474 |
-
var t = $(this).attr('data-id');
|
1475 |
-
|
1476 |
-
if(!$(this).hasClass('saswp-global-selected')){
|
1477 |
-
$('#saswp-tools-tabs a').removeClass('saswp-global-selected');
|
1478 |
-
$(this).addClass('saswp-global-selected');
|
1479 |
-
|
1480 |
-
$('.saswp-tools-container').hide();
|
1481 |
-
$('#'+t).show();
|
1482 |
-
}
|
1483 |
-
});
|
1484 |
-
|
1485 |
-
|
1486 |
-
$('#saswp-review-tabs a:first').addClass('saswp-global-selected');
|
1487 |
-
$('.saswp-review-container').hide();
|
1488 |
-
$('.saswp-review-container:first').show();
|
1489 |
-
|
1490 |
-
$('#saswp-review-tabs a').click(function(){
|
1491 |
-
var t = $(this).attr('data-id');
|
1492 |
-
|
1493 |
-
if(!$(this).hasClass('saswp-global-selected')){
|
1494 |
-
$('#saswp-review-tabs a').removeClass('saswp-global-selected');
|
1495 |
-
$(this).addClass('saswp-global-selected');
|
1496 |
-
|
1497 |
-
$('.saswp-review-container').hide();
|
1498 |
-
$('#'+t).show();
|
1499 |
-
}
|
1500 |
-
});
|
1501 |
-
|
1502 |
-
|
1503 |
-
//Importer from schema plugin ends here
|
1504 |
-
|
1505 |
-
//custom fields modify schema starts here
|
1506 |
-
|
1507 |
-
//Changing the url of add new schema type
|
1508 |
-
$('a[href="'+saswp_localize_data.new_url_selector+'"]').attr( 'href', saswp_localize_data.new_url_href);
|
1509 |
-
|
1510 |
-
|
1511 |
-
$("#saswp_enable_custom_field").change(function(){
|
1512 |
-
if ($(this).is(':checked')) {
|
1513 |
-
$(".saswp-custom-fields-div").show();
|
1514 |
-
}else{
|
1515 |
-
$(".saswp-custom-fields-div").hide();
|
1516 |
-
}
|
1517 |
-
});
|
1518 |
-
|
1519 |
-
$(document).on('change','.saswp-custom-fields-name',function(){
|
1520 |
-
|
1521 |
-
var type = 'text';
|
1522 |
-
var tr = $(this).parent().parent('tr');
|
1523 |
-
var fields_name = $(this).val();
|
1524 |
-
var str2 = "image";
|
1525 |
-
if(fields_name.indexOf(str2) != -1){
|
1526 |
-
type = 'image';
|
1527 |
-
}
|
1528 |
-
var id = $(this).parent().parent('tr').find("td:eq(1)");
|
1529 |
-
saswp_get_meta_list(type, null, id, fields_name, tr);
|
1530 |
-
|
1531 |
-
});
|
1532 |
-
|
1533 |
-
$(document).on("click", '.saswp-skip-button', function(e){
|
1534 |
-
e.preventDefault();
|
1535 |
-
$(this).parent().parent().hide();
|
1536 |
-
|
1537 |
-
$.post(ajaxurl,
|
1538 |
-
{ action:"saswp_skip_wizard", saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1539 |
-
function(response){
|
1540 |
-
|
1541 |
-
},'json');
|
1542 |
-
|
1543 |
-
});
|
1544 |
-
|
1545 |
-
$(document).on("click", ".saswp_add_schema_fields_on_fly", function(e){
|
1546 |
-
e.preventDefault();
|
1547 |
-
|
1548 |
-
var schema_id = $(this).attr('data-id');
|
1549 |
-
var fields_type = $(this).attr('fields_type');
|
1550 |
-
var div_type = $(this).attr('div_type');
|
1551 |
-
|
1552 |
-
var count = $(".saswp-"+div_type+"-table-div").length;
|
1553 |
-
var index = $( ".saswp-"+div_type+"-table-div:nth-child("+count+")" ).attr('data-id');
|
1554 |
-
index = ++index;
|
1555 |
-
|
1556 |
-
if(!index){
|
1557 |
-
index = 0;
|
1558 |
-
}
|
1559 |
-
|
1560 |
-
saswp_get_post_specific_schema_fields(index, fields_type, div_type, schema_id, fields_type+'_');
|
1561 |
-
|
1562 |
-
});
|
1563 |
-
|
1564 |
-
$(document).on("click", ".saswp-table-close", function(){
|
1565 |
-
$(this).parent().remove();
|
1566 |
-
});
|
1567 |
-
|
1568 |
-
//How to schema js ends here
|
1569 |
-
|
1570 |
-
$(document).on("click", ".saswp-rmv-modify_row", function(e){
|
1571 |
-
e.preventDefault();
|
1572 |
-
$(this).parent().parent().remove();
|
1573 |
-
});
|
1574 |
-
|
1575 |
-
$(document).on("change",".saswp-custom-meta-list", function(){
|
1576 |
-
|
1577 |
-
var meta_val = $(this).val();
|
1578 |
-
var field_name = $(this).parent().parent('tr').find(".saswp-custom-fields-name").val();
|
1579 |
-
var html = '';
|
1580 |
-
if(meta_val == 'manual_text'){
|
1581 |
-
html += '<td><input type="text" name="saswp_fixed_text['+field_name+']"></td>';
|
1582 |
-
html += '<td><a class="button button-default saswp-rmv-modify_row">X</a></td>';
|
1583 |
-
|
1584 |
-
}else if(meta_val == 'custom_field'){
|
1585 |
-
html += '<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+field_name+']">';
|
1586 |
-
html += '</select></td>';
|
1587 |
-
html += '<td><a class="button button-default saswp-rmv-modify_row">X</a></td>';
|
1588 |
-
}else{
|
1589 |
-
html += '<td></td>';
|
1590 |
-
html += '<td><a class="button button-default saswp-rmv-modify_row">X</a></td>';
|
1591 |
-
}
|
1592 |
-
|
1593 |
-
$(this).parent().parent('tr').find("td:gt(1)").remove();
|
1594 |
-
$(this).parent().parent('tr').append(html);
|
1595 |
-
saswpCustomSelect2();
|
1596 |
-
|
1597 |
-
});
|
1598 |
-
|
1599 |
-
$(document).on("click", '.saswp-add-custom-fields', function(){
|
1600 |
-
var schema_type = $('select#schema_type option:selected').val();
|
1601 |
-
var post_id = $('#post_ID').val();
|
1602 |
-
if(schema_type !=''){
|
1603 |
-
|
1604 |
-
if(!saswp_meta_list_fields[schema_type]){
|
1605 |
-
|
1606 |
-
$.ajax({
|
1607 |
-
type: "POST",
|
1608 |
-
url:ajaxurl,
|
1609 |
-
dataType: "json",
|
1610 |
-
data:{action:"saswp_get_schema_type_fields",post_id:post_id, schema_type:schema_type, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1611 |
-
success:function(response){
|
1612 |
-
|
1613 |
-
saswp_meta_list_fields[schema_type] = response;
|
1614 |
-
saswp_get_meta_list('text', saswp_meta_list_fields[schema_type], null, null, null);
|
1615 |
-
|
1616 |
-
},
|
1617 |
-
error: function(response){
|
1618 |
-
console.log(response);
|
1619 |
-
}
|
1620 |
-
});
|
1621 |
-
|
1622 |
-
|
1623 |
-
}else{
|
1624 |
-
|
1625 |
-
saswp_get_meta_list('text', saswp_meta_list_fields[schema_type], null, null, null);
|
1626 |
-
|
1627 |
-
}
|
1628 |
-
|
1629 |
-
}
|
1630 |
-
});
|
1631 |
-
saswpCustomSelect2();
|
1632 |
-
function saswpCustomSelect2(){
|
1633 |
-
if((saswp_localize_data.post_type == 'saswp' || saswp_localize_data.page_now =='saswp') && saswp_localize_data.page_now !='saswp_page_structured_data_options'){
|
1634 |
-
|
1635 |
-
$('.saswp-custom-fields-select2').select2({
|
1636 |
-
ajax: {
|
1637 |
-
type: "POST",
|
1638 |
-
url: ajaxurl, // AJAX URL is predefined in WordPress admin
|
1639 |
-
dataType: 'json',
|
1640 |
-
delay: 250, // delay in ms while typing when to perform a AJAX search
|
1641 |
-
data: function (params) {
|
1642 |
-
return {
|
1643 |
-
saswp_security_nonce: saswp_localize_data.saswp_security_nonce,
|
1644 |
-
q: params.term, // search query
|
1645 |
-
action: 'saswp_get_custom_meta_fields' // AJAX action for admin-ajax.php
|
1646 |
-
};
|
1647 |
-
},
|
1648 |
-
processResults: function( data ) {
|
1649 |
-
return {
|
1650 |
-
results: data
|
1651 |
-
};
|
1652 |
-
},
|
1653 |
-
cache: true
|
1654 |
-
},
|
1655 |
-
minimumInputLength: 2 // the minimum of symbols to input before perform a search
|
1656 |
-
});
|
1657 |
-
|
1658 |
-
}
|
1659 |
-
|
1660 |
-
}
|
1661 |
-
|
1662 |
-
function saswp_enable_rating_review(){
|
1663 |
-
var schema_type ="";
|
1664 |
-
if($('select#schema_type option:selected').val()){
|
1665 |
-
schema_type = $('select#schema_type option:selected').val();
|
1666 |
-
}
|
1667 |
-
if($(".saswp-tab-links.selected").attr('saswp-schema-type')){
|
1668 |
-
schema_type = $(".saswp-tab-links.selected").attr('saswp-schema-type');
|
1669 |
-
}
|
1670 |
-
|
1671 |
-
if(schema_type){
|
1672 |
-
$(".saswp-enable-rating-review-"+schema_type.toLowerCase()).change(function(){
|
1673 |
-
|
1674 |
-
if($(this).is(':checked')){
|
1675 |
-
$(this).parent().parent().siblings('.saswp-rating-review-'+schema_type.toLowerCase()).show();
|
1676 |
-
}else{
|
1677 |
-
$(this).parent().parent().siblings('.saswp-rating-review-'+schema_type.toLowerCase()).hide();
|
1678 |
-
}
|
1679 |
-
|
1680 |
-
}).change();
|
1681 |
-
}
|
1682 |
-
|
1683 |
-
}
|
1684 |
-
saswp_enable_rating_review();
|
1685 |
-
|
1686 |
-
//custom fields modify schema ends here
|
1687 |
-
|
1688 |
-
|
1689 |
-
//Google review js starts here
|
1690 |
-
|
1691 |
-
$('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr( 'href', saswp_localize_data.collection_post_add_new_url);
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
$(document).on("click", '.saswp_coonect_google_place', function(){
|
1696 |
-
|
1697 |
-
var place_id = $("#saswp_google_place_id").val();
|
1698 |
-
var language = $("#saswp_language_list").val();
|
1699 |
-
var google_api = $("#saswp_googel_api").val();
|
1700 |
-
|
1701 |
-
if(place_id !=''){
|
1702 |
-
$.ajax({
|
1703 |
-
type: "POST",
|
1704 |
-
url:ajaxurl,
|
1705 |
-
dataType: "json",
|
1706 |
-
data:{action:"saswp_connect_google_place",place_id:place_id, language:language, google_api:google_api, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1707 |
-
success:function(response){
|
1708 |
-
console.log(response['status']);
|
1709 |
-
},
|
1710 |
-
error: function(response){
|
1711 |
-
console.log(response);
|
1712 |
-
}
|
1713 |
-
});
|
1714 |
-
}
|
1715 |
-
});
|
1716 |
-
|
1717 |
-
//google review js ends here
|
1718 |
-
|
1719 |
-
//Adding settings button beside add schema type button on schema type list page
|
1720 |
-
|
1721 |
-
if ('saswp' == saswp_localize_data.post_type && saswp_localize_data.page_now == 'edit.php') {
|
1722 |
-
|
1723 |
-
jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>");
|
1724 |
-
|
1725 |
-
}
|
1726 |
-
|
1727 |
-
//star rating stars here
|
1728 |
-
if(typeof(saswp_reviews_data) !== 'undefined'){
|
1729 |
-
|
1730 |
-
$(".saswp-rating-div").rateYo({
|
1731 |
-
|
1732 |
-
rating: saswp_reviews_data.rating_val,
|
1733 |
-
halfStar: true,
|
1734 |
-
//normalFill: "#ffd700",
|
1735 |
-
readOnly: saswp_reviews_data.readonly,
|
1736 |
-
onSet: function (rating, rateYoInstance) {
|
1737 |
-
$(this).next().val(rating);
|
1738 |
-
console.log(rating);
|
1739 |
-
}
|
1740 |
-
|
1741 |
-
});
|
1742 |
-
|
1743 |
-
}
|
1744 |
-
$(document).on("click", ".saswp-add-g-location-btn", function(e){
|
1745 |
-
|
1746 |
-
var blocks_field = '';
|
1747 |
-
|
1748 |
-
if($("#saswp_google_place_api_key").length){
|
1749 |
-
|
1750 |
-
blocks_field = '<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="5" step="5" placeholder="5" disabled="disabled">';
|
1751 |
-
}else{
|
1752 |
-
blocks_field = '<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="10" step="10" placeholder="10">';
|
1753 |
-
}
|
1754 |
-
|
1755 |
-
e.preventDefault();
|
1756 |
-
var html = '';
|
1757 |
-
html += '<tr>'
|
1758 |
-
+ '<td style="width:12%;"><strong>Place Id</strong></td>'
|
1759 |
-
+ '<td style="width:20%;"><input class="saswp-g-location-field" name="sd_data[saswp_reviews_location_name][]" type="text" value=""></td>'
|
1760 |
-
+ '<td style="width:10%;"><strong>Reviews</strong></td>'
|
1761 |
-
+ '<td style="width:10%;">'+blocks_field+'</td>'
|
1762 |
-
+ '<td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">Fetch</a></td>'
|
1763 |
-
+ '<td style="width:10%;"><a type="button" class="saswp-remove-review-item button">x</a></td>'
|
1764 |
-
+ '<td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td>'
|
1765 |
-
+ '</tr>';
|
1766 |
-
if(html){
|
1767 |
-
$(".saswp-g-reviews-settings-table").append(html);
|
1768 |
-
}
|
1769 |
-
|
1770 |
-
});
|
1771 |
-
|
1772 |
-
function saswp_fetch_s_approved_reviews(current){
|
1773 |
-
|
1774 |
-
current.addClass('updating-message');
|
1775 |
-
$.get(ajaxurl,
|
1776 |
-
{ action:"saswp_fetch_s_approved_reviews", saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1777 |
-
function(response){
|
1778 |
-
current.removeClass('updating-message');
|
1779 |
-
console.log(response);
|
1780 |
-
if(response['status']){
|
1781 |
-
current.parent().parent().find('.saswp-rv-fetched-msg').text(response['message']);
|
1782 |
-
current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "green");
|
1783 |
-
}else{
|
1784 |
-
current.parent().parent().find('.saswp-rv-fetched-msg').text(response['message']);
|
1785 |
-
current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "#988f1b");
|
1786 |
-
}
|
1787 |
-
|
1788 |
-
},'json');
|
1789 |
-
|
1790 |
-
}
|
1791 |
-
|
1792 |
-
function saswp_add_s_approved_reviews(current, site_id, token, limit, api_key, page, loop_run){
|
1793 |
-
current.addClass('updating-message');
|
1794 |
-
$.get(ajaxurl,
|
1795 |
-
{ action:"saswp_add_s_approved_reviews",site_id:site_id,token:token,limit:limit,api_key:api_key,page:page, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1796 |
-
function(response){
|
1797 |
-
current.removeClass('updating-message');
|
1798 |
-
console.log(response);
|
1799 |
-
if(response['status']){
|
1800 |
-
current.parent().parent().find('.saswp-rv-fetched-msg').text(response['message']);
|
1801 |
-
current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "green");
|
1802 |
-
}else{
|
1803 |
-
current.parent().parent().find('.saswp-rv-fetched-msg').text(response['message']);
|
1804 |
-
current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "#988f1b");
|
1805 |
-
}
|
1806 |
-
page++;
|
1807 |
-
if(page <loop_run){
|
1808 |
-
saswp_add_s_approved_reviews(current, site_id, token, limit, api_key, page);
|
1809 |
-
}else{
|
1810 |
-
saswp_fetch_s_approved_reviews(current);
|
1811 |
-
}
|
1812 |
-
},'json');
|
1813 |
-
|
1814 |
-
}
|
1815 |
-
|
1816 |
-
$(document).on("click",".saswp-fetch-s-approved-reviews", function(e){
|
1817 |
-
|
1818 |
-
e.preventDefault();
|
1819 |
-
var current = $(this);
|
1820 |
-
current.addClass('updating-message');
|
1821 |
-
var site_id = $("#saswp_s_approved_site_id").val();
|
1822 |
-
var token = $("#saswp_s_approved_token").val();
|
1823 |
-
var limit = $("#saswp_s_approved_reviews").val();
|
1824 |
-
var api_key = $("#reviews_addon_license_key").val();
|
1825 |
-
var loop_run = 1;
|
1826 |
-
var page = 0;
|
1827 |
-
|
1828 |
-
if(limit > 100){
|
1829 |
-
var div_limit = limit/100;
|
1830 |
-
var div_remainder = limit%100;
|
1831 |
-
loop_run = div_limit;
|
1832 |
-
|
1833 |
-
if(div_remainder){
|
1834 |
-
loop_run++;
|
1835 |
-
}
|
1836 |
-
|
1837 |
-
}
|
1838 |
-
|
1839 |
-
if(site_id && token && api_key){
|
1840 |
-
|
1841 |
-
saswp_add_s_approved_reviews(current, site_id, token, limit, api_key, page, loop_run);
|
1842 |
-
|
1843 |
-
}else{
|
1844 |
-
current.removeClass('updating-message');
|
1845 |
-
alert('Fill the site id and token with valid api key');
|
1846 |
-
}
|
1847 |
-
|
1848 |
-
});
|
1849 |
-
|
1850 |
-
|
1851 |
-
$(document).on("click", '.saswp-fetch-g-reviews', function(){
|
1852 |
-
|
1853 |
-
var current = $(this);
|
1854 |
-
var premium_status = 'free';
|
1855 |
-
current.addClass('updating-message');
|
1856 |
-
|
1857 |
-
var location = $(this).parent().parent().find('.saswp-g-location-field').val();
|
1858 |
-
var blocks = $(this).parent().parent().find('.saswp-g-blocks-field').val();
|
1859 |
-
var g_api = $("#saswp_google_place_api_key").val();
|
1860 |
-
var reviews_api = $("#reviews_addon_license_key").val();
|
1861 |
-
var reviews_api_status = $("#reviews_addon_license_key_status").val();
|
1862 |
-
|
1863 |
-
if($("#saswp_google_place_api_key").length){
|
1864 |
-
premium_status = 'free';
|
1865 |
-
}else{
|
1866 |
-
premium_status = 'premium';
|
1867 |
-
}
|
1868 |
-
|
1869 |
-
if(premium_status == 'premium'){
|
1870 |
-
|
1871 |
-
if(blocks > 0){
|
1872 |
-
|
1873 |
-
var blocks_remainder = blocks % 10;
|
1874 |
-
|
1875 |
-
if(blocks_remainder != 0){
|
1876 |
-
|
1877 |
-
current.parent().parent().find('.saswp-rv-fetched-msg').text('Reviews count should be in step of 10');
|
1878 |
-
current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "#988f1b");
|
1879 |
-
current.removeClass('updating-message');
|
1880 |
-
return false;
|
1881 |
-
|
1882 |
-
}
|
1883 |
-
|
1884 |
-
}else{
|
1885 |
-
alert('Blocks value is zero');
|
1886 |
-
current.removeClass('updating-message');
|
1887 |
-
return false;
|
1888 |
-
}
|
1889 |
-
|
1890 |
-
}
|
1891 |
-
|
1892 |
-
if(location !='' && (reviews_api || g_api)){
|
1893 |
-
$.ajax({
|
1894 |
-
type: "POST",
|
1895 |
-
url:ajaxurl,
|
1896 |
-
dataType: "json",
|
1897 |
-
data:{action:"saswp_fetch_google_reviews",reviews_api_status:reviews_api_status, reviews_api:reviews_api,location:location,blocks:blocks,g_api:g_api,premium_status:premium_status, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1898 |
-
success:function(response){
|
1899 |
-
if(response['status'] =='t'){
|
1900 |
-
current.parent().parent().find('.saswp-rv-fetched-msg').text('Success');
|
1901 |
-
current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "green");
|
1902 |
-
}else{
|
1903 |
-
current.parent().parent().find('.saswp-rv-fetched-msg').text(response['message']);
|
1904 |
-
current.parent().parent().find('.saswp-rv-fetched-msg').css("color", "#988f1b");
|
1905 |
-
}
|
1906 |
-
current.removeClass('updating-message');
|
1907 |
-
},
|
1908 |
-
error: function(response){
|
1909 |
-
console.log(response);
|
1910 |
-
}
|
1911 |
-
});
|
1912 |
-
}else{
|
1913 |
-
if(location ==''){
|
1914 |
-
alert('Please enter place id');
|
1915 |
-
}
|
1916 |
-
if(g_api ==''){
|
1917 |
-
alert('Please enter api key');
|
1918 |
-
}
|
1919 |
-
if(reviews_api ==''){
|
1920 |
-
alert('Please enter reviews api key');
|
1921 |
-
}
|
1922 |
-
current.removeClass('updating-message');
|
1923 |
-
}
|
1924 |
-
});
|
1925 |
-
|
1926 |
-
//rating ends here
|
1927 |
-
|
1928 |
-
$("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){
|
1929 |
-
var current = $(this);
|
1930 |
-
|
1931 |
-
current.parent().find('.saswp-phone-validation').remove();
|
1932 |
-
|
1933 |
-
var pnumber = $(this).val();
|
1934 |
-
var p_regex = /^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/;
|
1935 |
-
|
1936 |
-
if(!p_regex.test(pnumber)){
|
1937 |
-
current.after('<span style="color:red;" class="saswp-phone-validation">Invalid Phone Number</span>');
|
1938 |
-
}else{
|
1939 |
-
current.parent().find('.saswp-phone-validation').remove();
|
1940 |
-
}
|
1941 |
-
|
1942 |
-
});
|
1943 |
-
|
1944 |
-
});
|
1 |
+
var saswp_meta_list=[],saswp_meta_fields=[],saswp_meta_list_fields=[];function getParameterByName(e,s){s||(s=window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var a=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(s);return a?a[2]?decodeURIComponent(a[2].replace(/\+/g," ")):"":null}function saswp_schema_datepicker(){jQuery(".saswp-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"})}function saswp_meta_list_html(e,s,a,t,i){var o=a;null==o&&(o=Object.keys(s)[0]);var n="";if(n+='<select class="saswp-custom-meta-list" name="saswp_meta_list_val['+o+']">',$.each(e,function(e,s){n+='<optgroup label="'+s.label+'">',$.each(s["meta-list"],function(e,s){n+='<option value="'+e+'">'+s+"</option>"}),n+="</optgroup>"}),n+="</select>",s){var p="<tr>";p+="<td>",p+='<select class="saswp-custom-fields-name">',$.each(s,function(e,s){p+='<option value="'+e+'">'+s+"</option>"}),p+="</select>",p+="</td>",p+="<td>",p+=n,p+="</td>",p+='<td></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td>',p+="</tr>",$(".saswp-custom-fields-table").append(p)}else $(t).html(n)}function saswp_get_meta_list(e,s,a,t,i){saswp_meta_list[e]?saswp_meta_list_html(saswp_meta_list[e],s,t,a,i):$.get(ajaxurl,{action:"saswp_get_meta_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(o){saswp_meta_list[e]=o[e],saswp_meta_list_html(saswp_meta_list[e],s,t,a,i)},"json")}function saswp_get_post_specific_schema_fields(e,s,a,t,i){if(saswp_meta_fields[i]){var o=saswp_fields_html_generator(e,t,i,a,saswp_meta_fields[i]);o&&($(".saswp-"+a+'-section[data-id="'+t+'"]').append(o),saswp_schema_datepicker())}else $.get(ajaxurl,{action:"saswp_get_schema_dynamic_fields_ajax",meta_name:s,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){saswp_meta_fields[i]=s,console.log(saswp_meta_fields);var o=saswp_fields_html_generator(e,t,i,a,s);o&&($(".saswp-"+a+'-section[data-id="'+t+'"]').append(o),saswp_schema_datepicker())},"json")}function saswp_fields_html_generator(e,s,a,t,i){var o="";return o+='<div class="saswp-'+t+'-table-div saswp-dynamic-properties" data-id="'+e+'"><a class="saswp-table-close">X</a><table class="form-table saswp-'+t+'-table">',$.each(i,function(t,i){var n="";switch("saswp_tvseries_season_published_date"!=i.name&&"saswp_feed_element_date_created"!=i.name&&"saswp_product_reviews_created_date"!=i.name||(n="saswp-datepicker-picker"),i.type){case"number":case"text":o+="<tr><th>"+i.label+'</th><td><input class="'+n+'" style="width:100%" type="'+i.type+'" id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']"></td></tr>';break;case"textarea":o+="<tr><th>"+i.label+'</th><td><textarea style="width: 100%" id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']" rows="5"></textarea></td></tr>';break;case"select":var p="";$.each(i.options,function(e,s){p+='<option value="'+e+'">'+s+"</option>"}),o+="<tr><th>"+i.label+'</th><td><select id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']">'+p+"</select></td></tr>";break;case"media":o+="<tr><th>"+i.label+'</th><td><fieldset><input style="width:80%" type="text" id="'+i.name+"_"+e+"_"+s+'" name="'+i.name+"_"+e+"_"+s+'"><input type="hidden" data-id="'+i.name+"_"+e+"_"+s+'_id" name="'+a+s+"["+e+"]["+i.name+'_id]" id="'+i.name+"_"+e+"_"+s+'_id"><input data-id="media" style="width: 19%" class="button" id="'+i.name+"_"+e+"_"+s+'_button" name="'+i.name+"_"+e+"_"+s+'_button" type="button" value="Upload"><div class="saswp_image_div_'+i.name+"_"+e+"_"+s+'"></div></fieldset></td></tr>'}}),o+="</table></div>"}jQuery(document).ready(function(e){if(saswp_localize_data.do_tour){var s,a="<h3>Thanks for using Structured Data!</h3>";a+="<p>Do you want the latest on <b>Structured Data update</b> before others and some best resources on monetization in a single email? - Free just for users of Structured Data!</p>",a+='<style type="text/css">',a+=".wp-pointer-buttons{ padding:0; overflow: hidden; }",a+=".wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none}\t#afw_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }",a+="</style>",a+='<div id="afw_mc_embed_signup">',a+='<form action="//app.mailerlite.com/webforms/submit/o1s7u3" data-id="258182" data-code="o1s7u3" method="POST" target="_blank">',a+='<div id="afw_mc_embed_signup_scroll">',a+='<div class="afw-mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">',a+='<input type="text" name="fields[name]" class="form-control" placeholder="Name" hidden value="'+saswp_localize_data.current_user_name+'" style="display:none">',a+='<input type="text" value="'+saswp_localize_data.current_user_email+'" name="fields[email]" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">',a+='<input type="text" name="fields[company]" class="form-control" placeholder="Website" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="'+saswp_localize_data.get_home_url+'">',a+='<input type="hidden" name="ml-submit" value="1" />',a+="</div>",a+='<div id="mce-responses">',a+='<div class="response" id="mce-error-response" style="display:none"></div>',a+='<div class="response" id="mce-success-response" style="display:none"></div>',a+="</div>",a+='<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a631df13442f19caede5a5baf_c9a71edce6" tabindex="-1" value=""></div>',a+='<input type="submit" value="Subscribe" name="subscribe" id="pointer-close" class="button mc-newsletter-sent" style=" background: #0085ba; border-color: #006799; padding: 0px 16px; text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799; height: 30px; margin-top: 1px; color: #fff; box-shadow: 0 1px 0 #006799;">',a+="</div>",a+="</form>";var t={content:a+="</div>",position:{edge:"top",align:"left"}};s=function(){e(saswp_localize_data.displayID).pointer(t).pointer("open"),saswp_localize_data.button2&&(jQuery("#pointer-close").after('<a id="pointer-primary" class="button-primary">'+saswp_localize_data.button2+"</a>"),jQuery("#pointer-primary").click(function(){saswp_localize_data.function_name}),jQuery("#pointer-close").click(function(){e.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer222",action:"dismiss-wp-pointer"})}))},(t=e.extend(t,{buttons:function(e,s){return button=jQuery('<a id="pointer-close" class="button-secondary">'+saswp_localize_data.button1+"</a>"),button_2=jQuery("#pointer-close.button"),button.bind("click.pointer",function(){s.element.pointer("close")}),button_2.on("click",function(){s.element.pointer("close")}),button},close:function(){e.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer222",action:"dismiss-wp-pointer"})},show:function(e,s){s.pointer.css({left:"170px",top:"160px"})}})).position&&t.position.defer_loading?e(window).bind("load.wp-pointers",s):s()}function i(s,a){var t=a.replace("-checkbox",""),i=e("#"+t).next("p").text();s.is(":checked")&&""!==i?e("#"+t).next("p").removeClass("saswp_hide"):1==e("#"+t).next("p").attr("data-id")?e("#"+t).next("p").text("This feature is only available in pro version"):e("#"+t).next("p").addClass("saswp_hide")}function o(){e(".saswp-item-reviewed").change(function(s){s.preventDefault();var a="";if(e("select#schema_type option:selected").val()&&(a=e("select#schema_type option:selected").val()),e(".saswp-tab-links.selected").attr("saswp-schema-type")&&(a=e(".saswp-tab-links.selected").attr("saswp-schema-type")),"Review"===a){var t=e(this),i=e(this).val(),o=saswp_localize_data.post_id,n=e(t).attr("data-id"),p=e(t).attr("post-specific");e.get(ajaxurl,{action:"saswp_get_item_reviewed_fields",schema_id:n,post_specific:p,item:i,post_id:o,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){e(t).parent().parent().nextAll().remove(".saswp-review-tr"),e(t).parent().parent().after(s)})}}).change()}function n(){"saswp"!=saswp_localize_data.post_type&&"saswp"!=saswp_localize_data.page_now||"saswp_page_structured_data_options"==saswp_localize_data.page_now||e(".saswp-custom-fields-select2").select2({ajax:{type:"POST",url:ajaxurl,dataType:"json",delay:250,data:function(e){return{saswp_security_nonce:saswp_localize_data.saswp_security_nonce,q:e.term,action:"saswp_get_custom_meta_fields"}},processResults:function(e){return{results:e}},cache:!0},minimumInputLength:2})}function p(){var s="";e("select#schema_type option:selected").val()&&(s=e("select#schema_type option:selected").val()),e(".saswp-tab-links.selected").attr("saswp-schema-type")&&(s=e(".saswp-tab-links.selected").attr("saswp-schema-type")),s&&e(".saswp-enable-rating-review-"+s.toLowerCase()).change(function(){e(this).is(":checked")?e(this).parent().parent().siblings(".saswp-rating-review-"+s.toLowerCase()).show():e(this).parent().parent().siblings(".saswp-rating-review-"+s.toLowerCase()).hide()}).change()}function c(s,a,t,i,o,n,p){s.addClass("updating-message"),e.get(ajaxurl,{action:"saswp_add_s_approved_reviews",site_id:a,token:t,limit:i,api_key:o,page:n,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(l){s.removeClass("updating-message"),console.log(l),l.status?(s.parent().parent().find(".saswp-rv-fetched-msg").text(l.message),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(s.parent().parent().find(".saswp-rv-fetched-msg").text(l.message),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),++n<p?c(s,a,t,i,o,n):function(s){s.addClass("updating-message"),e.get(ajaxurl,{action:"saswp_fetch_s_approved_reviews",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s.removeClass("updating-message"),console.log(e),e.status?(s.parent().parent().find(".saswp-rv-fetched-msg").text(e.message),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(s.parent().parent().find(".saswp-rv-fetched-msg").text(e.message),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"))},"json")}(s)},"json")}e(".saswp-tabs a").click(function(s){var a=e(this).attr("href"),t=getParameterByName("tab",a);return t||(t="general"),e(this).siblings().removeClass("nav-tab-active"),e(this).addClass("nav-tab-active"),e(".form-wrap").find(".saswp-"+t).siblings().hide(),e(".form-wrap .saswp-"+t).show(),window.history.pushState("","",a),!1}),e(".saswp-schame-type-select").change(function(){e(".saswp-custom-fields-table").html("");var s=e(this).val();e(".saswp-option-table-class tr").each(function(s,a){s>0&&(e(this).hide(),e(this).find("select").attr("disabled",!0))}),"TechArticle"==s||"Article"==s||"Blogposting"==s||"NewsArticle"==s||"WebPage"==s?e(".saswp-enable-speakable").parent().parent().show():e(".saswp-enable-speakable").parent().parent().hide(),"local_business"==s&&(e(".saswp-option-table-class tr").eq(1).show(),e(".saswp-business-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1),e(".select-post-type").val("show_globally").trigger("change")),"Service"==s&&(e(".saswp-service-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Review"==s&&(e(".saswp-review-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1),o()),"Product"==s&&(e(".saswp-product-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==s&&(e(".saswp-event-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"AudioObject"==s&&e(".saswp-audio-text-field-tr").show(),"SoftwareApplication"==s&&e(".saswp-softwareapplication-text-field-tr").show(),e(".saswp-schem-type-note").addClass("saswp_hide"),"qanda"==s&&e(".saswp-schem-type-note").removeClass("saswp_hide"),e(".saswp-job-posting-note").addClass("saswp_hide"),p()}),e("#saswp_business_type").change(function(){var s=e(this).val(),a=e(".saswp-schame-type-select").val();e(".saswp-option-table-class tr").each(function(s,a){s>1&&(e(this).hide(),e(this).find("select").attr("disabled",!0))}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?e(".saswp-enable-speakable").parent().parent().show():e(".saswp-enable-speakable").parent().parent().hide(),"local_business"==a&&(e(".saswp-"+s+"-tr").show(),e(".saswp-business-text-field-tr").show(),e(".saswp-"+s+"-tr").find("select").attr("disabled",!1)),"Service"==a&&(e(".saswp-service-text-field-tr").show(),e(".saswp-service-text-field-tr").find("select").attr("disabled",!1)),"Product"==a&&(e(".saswp-product-text-field-tr").show(),e(".saswp-product-text-field-tr").find("select").attr("disabled",!1)),"AudioObject"==a&&e(".saswp-audio-text-field-tr").show(),"SoftwareApplication"==a&&e(".saswp-softwareapplication-text-field-tr").show(),"Review"==a&&(e(".saswp-review-text-field-tr").show(),e(".saswp-review-text-field-tr").find("select").attr("disabled",!1)),"Event"==a&&(e(".saswp-event-text-field-tr").show(),e(".saswp-event-text-field-tr").find("select").attr("disabled",!1)),p()}).change(),e(".saswp-checkbox").change(function(){var s=e(this).attr("id"),a=e(this);switch(s){case"saswp-the-seo-framework-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-the-seo-framework").val(1):e("#saswp-the-seo-framework").val(0);break;case"saswp-seo-press-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-seo-press").val(1):e("#saswp-seo-press").val(0);break;case"saswp-aiosp-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-aiosp").val(1):e("#saswp-aiosp").val(0);break;case"saswp-smart-crawl-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-smart-crawl").val(1):e("#saswp-smart-crawl").val(0);break;case"saswp-squirrly-seo-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-squirrly-seo").val(1):e("#saswp-squirrly-seo").val(0);break;case"saswp-wp-recipe-maker-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-wp-recipe-maker").val(1):e("#saswp-wp-recipe-maker").val(0);break;case"saswp-wpsso-core-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-wpsso-core").val(1):e("#saswp-wpsso-core").val(0);break;case"saswp-for-wordpress-checkbox":e(this).is(":checked")?e("#saswp-for-wordpress").val(1):e("#saswp-for-wordpress").val(0);break;case"saswp-facebook-enable-checkbox":e(this).is(":checked")?(e("#saswp-facebook-enable").val(1),e("#sd_facebook").show()):(e("#saswp-facebook-enable").val(0),e("#sd_facebook").hide());break;case"saswp-twitter-enable-checkbox":e(this).is(":checked")?(e("#saswp-twitter-enable").val(1),e("#sd_twitter").show()):(e("#saswp-twitter-enable").val(0),e("#sd_twitter").hide());break;case"saswp-google-plus-enable-checkbox":e(this).is(":checked")?(e("#saswp-google-plus-enable").val(1),e("#sd_google_plus").show()):(e("#saswp-google-plus-enable").val(0),e("#sd_google_plus").hide());break;case"saswp-instagram-enable-checkbox":e(this).is(":checked")?(e("#saswp-instagram-enable").val(1),e("#sd_instagram").show()):(e("#saswp-instagram-enable").val(0),e("#sd_instagram").hide());break;case"saswp-youtube-enable-checkbox":e(this).is(":checked")?(e("#sd_youtube").show(),e("#saswp-youtube-enable").val(1)):(e("#saswp-youtube-enable").val(0),e("#sd_youtube").hide());break;case"saswp-linkedin-enable-checkbox":e(this).is(":checked")?(e("#saswp-linkedin-enable").val(1),e("#sd_linkedin").show()):(e("#saswp-linkedin-enable").val(0),e("#sd_linkedin").hide());break;case"saswp-pinterest-enable-checkbox":e(this).is(":checked")?(e("#saswp-pinterest-enable").val(1),e("#sd_pinterest").show()):(e("#saswp-pinterest-enable").val(0),e("#sd_pinterest").hide());break;case"saswp-soundcloud-enable-checkbox":e(this).is(":checked")?(e("#saswp-soundcloud-enable").val(1),e("#sd_soundcloud").show()):(e("#saswp-soundcloud-enable").val(0),e("#sd_soundcloud").hide());break;case"saswp-tumblr-enable-checkbox":e(this).is(":checked")?(e("#saswp-tumblr-enable").val(1),e("#sd_tumblr").show()):(e("#saswp-tumblr-enable").val(0),e("#sd_tumblr").hide());break;case"saswp-for-amp-checkbox":e(this).is(":checked")?e("#saswp-for-amp").val(1):e("#saswp-for-amp").val(0);break;case"saswp_kb_contact_1_checkbox":e(this).is(":checked")?(e("#saswp_kb_contact_1").val(1),e("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").removeClass("saswp-display-none")):(e("#saswp_kb_contact_1").val(0),e("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").addClass("saswp-display-none"));break;case"saswp-logo-dimensions-check":e(this).is(":checked")?(e("#saswp-logo-dimensions").val(1),e("#saswp-logo-width, #saswp-logo-height").parent().parent("li").show()):(e("#saswp-logo-dimensions").val(0),e("#saswp-logo-width, #saswp-logo-height").parent().parent("li").hide());break;case"saswp_archive_schema_checkbox":e(this).is(":checked")?(e("#saswp_archive_schema").val(1),e(".saswp_archive_schema_type_class").parent().parent().show()):(e("#saswp_archive_schema").val(0),e(".saswp_archive_schema_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":e(this).is(":checked")?(e("#saswp_website_schema").val(1),e("#saswp_search_box_schema").parent().parent().show()):(e("#saswp_website_schema").val(0),e("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":e(this).is(":checked")?e("#saswp_search_box_schema").val(1):e("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_schema_checkbox":e(this).is(":checked")?e("#saswp_breadcrumb_schema").val(1):e("#saswp_breadcrumb_schema").val(0);break;case"saswp_comments_schema_checkbox":e(this).is(":checked")?e("#saswp_comments_schema").val(1):e("#saswp_comments_schema").val(0);break;case"saswp-compativility-checkbox":e(this).is(":checked")?e("#saswp-flexmlx-compativility").val(1):e("#saswp-flexmlx-compativility").val(0);break;case"saswp-review-module-checkbox":e(this).is(":checked")?e("#saswp-review-module").val(1):e("#saswp-review-module").val(0);break;case"saswp-kk-star-raring-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-kk-star-raring").val(1):e("#saswp-kk-star-raring").val(0);break;case"saswp-woocommerce-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-woocommerce").val(1):e("#saswp-woocommerce").val(0);break;case"saswp-extra-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-extra").val(1):e("#saswp-extra").val(0);break;case"saswp-dw-question-answer-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-dw-question-answer").val(1):e("#saswp-dw-question-answer").val(0);break;case"saswp-wp-job-manager-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-wp-job-manager").val(1):e("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-yoast").val(1):e("#saswp-yoast").val(0);break;case"saswp-rankmath-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-rankmath").val(1):e("#saswp-rankmath").val(0);break;case"saswp-tagyeem-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-tagyeem").val(1):e("#saswp-tagyeem").val(0);break;case"saswp-the-events-calendar-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-the-events-calendar").val(1):e("#saswp-the-events-calendar").val(0);break;case"saswp-woocommerce-booking-checkbox":i(a,s),e(this).is(":checked")?(e("#saswp-woocommerce-booking").val(1),e("#saswp-woocommerce-booking-main").val(1)):(e("#saswp-woocommerce-booking").val(0),e("#saswp-woocommerce-booking-main").val(0));break;case"saswp-woocommerce-booking-main-checkbox":i(a,s),e(this).is(":checked")?(e("#saswp-woocommerce-booking-main").val(1),e("#saswp-woocommerce-booking").val(1)):(e("#saswp-woocommerce-booking-main").val(0),e("#saswp-woocommerce-booking").val(0));break;case"saswp-woocommerce-membership-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-woocommerce-membership").val(1):e("#saswp-woocommerce-membership").val(0);break;case"saswp-defragment-checkbox":e(this).is(":checked")?e("#saswp-defragment").val(1):e("#saswp-defragment").val(0);break;case"saswp-cooked-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-cooked").val(1):e("#saswp-cooked").val(0);break;case"saswp-flexmlx-compativility-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-flexmlx-compativility").val(1):e("#saswp-flexmlx-compativility").val(0);break;case"saswp-shopper-approved-review-checkbox":i(a,s),e(this).is(":checked")?(e("#saswp-shopper-approved-review").val(1),e(".saswp-s-reviews-settings-table").parent().parent().parent().show()):(e("#saswp-shopper-approved-review").val(0),e(".saswp-s-reviews-settings-table").parent().parent().parent().hide());break;case"saswp-google-review-checkbox":e(this).is(":checked")?(e("#saswp-google-review").val(1),e("#saswp-google-rv-free-checkbox").length?(e("#saswp-google-review-free").parent().parent().show(),e("#saswp-google-rv-free-checkbox").is(":checked")?e("#saswp_google_place_api_key").parent().parent().show():e("#saswp_google_place_api_key").parent().parent().hide()):e("#saswp_google_place_api_key").parent().parent().show(),e(".saswp-g-reviews-settings-table").parent().parent().parent().show()):(e("#saswp-google-review").val(0),e("#saswp_google_place_api_key").parent().parent().hide(),e(".saswp-g-reviews-settings-table").parent().parent().parent().hide(),e("#saswp-google-rv-free-checkbox").length&&e("#saswp-google-review-free").parent().parent().hide());break;case"saswp-google-rv-free-checkbox":e("#saswp-google-review-checkbox").is(":checked")&&e(this).is(":checked")?(e("#saswp-google-review-free").val(1),e("#saswp_google_place_api_key").parent().parent().show()):(e("#saswp-google-review-free").val(0),e("#saswp_google_place_api_key").parent().parent().hide());break;case"saswp-markup-footer-checkbox":e(this).is(":checked")?e("#saswp-markup-footer").val(1):e("#saswp-markup-footer").val(0);break;case"saswp-pretty-print-checkbox":e(this).is(":checked")?e("#saswp-pretty-print").val(1):e("#saswp-pretty-print").val(0);break;case"saswp-wppostratings-raring-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-wppostratings-raring").val(1):e("#saswp-wppostratings-raring").val(0);break;case"saswp-bbpress-checkbox":i(a,s),e(this).is(":checked")?e("#saswp-bbpress").val(1):e("#saswp-bbpress").val(0);break;case"saswp-microdata-cleanup-checkbox":e(this).is(":checked")?e("#saswp-microdata-cleanup").val(1):e("#saswp-microdata-cleanup").val(0)}}).change(),e("#saswp_kb_type").change(function(){var s=e(this).val();e(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass("saswp_hide"),e(".saswp_kg_logo").parent().parent().parent().addClass("saswp_hide"),e("#sd-person-image").parent().parent().parent().addClass("saswp_hide"),"Organization"==s&&(e(".saswp_org_fields").parent().parent().removeClass("saswp_hide"),e(".saswp_person_fields").parent().parent().addClass("saswp_hide"),e(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),e("#sd-person-image").parent().parent().parent().addClass("saswp_hide")),"Person"==s&&(e(".saswp_org_fields").parent().parent().addClass("saswp_hide"),e(".saswp_person_fields").parent().parent().removeClass("saswp_hide"),e(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),e("#sd-person-image").parent().parent().parent().removeClass("saswp_hide"))}).change(),e(document).on("click","input[data-id=media]",function(s){s.preventDefault();var a=e(this),t=a.attr("id").replace("_button",""),i=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1,library:{type:"image"}}).on("select",function(){var s=i.state().get("selection").first().toJSON();e("#"+t).val(s.url),e("input[data-id='"+t+"_id']").val(s.id),e("input[data-id='"+t+"_height']").val(s.height),e("input[data-id='"+t+"_width']").val(s.width),e("input[data-id='"+t+"_thumbnail']").val(s.url),"sd_default_image_button"===a.attr("id")&&(e("#sd_default_image_width").val(s.width),e("#sd_default_image_height").val(s.height));var o="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&s.height<1200&&(o='<p class="saswp_warning">Image size is smaller than recommended size</p>'),e(".saswp_image_div_"+t).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+s.url+'"/><a data-id="'+t+'" href="#" class="saswp_prev_close">X</a></div>'+o)}).open()}),e(document).on("click",".saswp_prev_close",function(s){s.preventDefault();var a=e(this).attr("data-id");console.log(a),e(this).parent().remove(),e("#"+a).val(""),e("input[data-id='"+a+"_id']").val(""),e("input[data-id='"+a+"_height']").val(""),e("input[data-id='"+a+"_width']").val(""),e("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(e("#sd_default_image_width").val(""),e("#sd_default_image_height").val(""))}),e(document).on("change",".saswp-schema-type-toggle",function(s){var a=e(this).attr("data-schema-id"),t=e(this).attr("data-post-id");if(e(this).is(":checked"))var i=1;else i=0;e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_enable_disable_schema_on_post",status:i,schema_id:a,post_id:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){},error:function(e){console.log(e)}})}),e(document).on("click",".saswp-reset-data",function(s){s.preventDefault(),1==confirm("Are you sure?")&&e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){setTimeout(function(){location.reload()},1e3)},error:function(e){console.log(e)}})}),e(document).on("click",".saswp_license_activation",function(s){s.preventDefault();var a=e(this);a.addClass("updating-message");var t=e(this).attr("license-status"),i=e(this).attr("add-on"),o=e("#"+i+"_addon_license_key").val();t&&i&&o?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:o,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){e("#"+i+"_addon_license_key_status").val(s.status),"active"==s.status?(e(".saswp-"+i+"-dashicons").addClass("dashicons-yes"),e(".saswp-"+i+"-dashicons").removeClass("dashicons-no-alt"),e(".saswp-"+i+"-dashicons").css("color","green"),e(".saswp_license_activation[add-on='"+i+"']").attr("license-status","inactive"),e(".saswp_license_activation[add-on='"+i+"']").text("Deactivate"),e(".saswp_license_status_msg[add-on='"+i+"']").text("Activated"),e(".saswp_license_status_msg[add-on='"+i+"']").css("color","green"),e(".saswp_license_status_msg[add-on='"+i+"']").text(s.message)):(e(".saswp-"+i+"-dashicons").addClass("dashicons-no-alt"),e(".saswp-"+i+"-dashicons").removeClass("dashicons-yes"),e(".saswp-"+i+"-dashicons").css("color","red"),e(".saswp_license_activation[add-on='"+i+"']").attr("license-status","active"),e(".saswp_license_activation[add-on='"+i+"']").text("Activate"),e(".saswp_license_status_msg[add-on='"+i+"']").css("color","red"),e(".saswp_license_status_msg[add-on='"+i+"']").text(s.message)),a.removeClass("updating-message")},error:function(e){console.log(e)}}):(alert("Please enter value license key"),a.removeClass("updating-message"))}),e(".saswp-send-query").on("click",function(s){s.preventDefault();var a=e("#saswp_query_message").val();""!=e.trim(a)?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_send_query_message",message:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(e(".saswp-query-success").show(),e(".saswp-query-error").hide()):(console.log("dd"),e(".saswp-query-success").hide(),e(".saswp-query-error").show())},error:function(e){console.log(e)}}):alert("Please enter the message")}),e(".saswp-import-plugins").on("click",function(s){s.preventDefault();var a=e(this);a.addClass("updating-message");var t=e(this).attr("data-id");e.get(ajaxurl,{action:"saswp_import_plugin_data",plugin_name:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){"t"==s.status?(e(a).parent().find(".saswp-imported-message").text(s.message),e(a).parent().find(".saswp-imported-message").removeClass("saswp-error"),setTimeout(function(){location.reload()},2e3)):(e(a).parent().find(".saswp-imported-message").addClass("saswp-error"),e(a).parent().find(".saswp-imported-message").text(s.message)),a.removeClass("updating-message")},"json")}),e(".saswp-feedback-no-thanks").on("click",function(s){s.preventDefault(),e.get(ajaxurl,{action:"saswp_feeback_no_thanks"},function(s){"t"==s.status&&e(".saswp-feedback-notice").hide()},"json")}),e(".saswp-feedback-remindme").on("click",function(s){s.preventDefault(),e.get(ajaxurl,{action:"saswp_feeback_remindme"},function(s){"t"==s.status&&e(".saswp-feedback-notice").hide()},"json")}),e(document).on("change",".saswp-local-business-type-select",function(s){s.preventDefault();var a=e(this),t=e(this).val();e.get(ajaxurl,{action:"saswp_get_sub_business_ajax",business_type:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){if("t"==s.status){e(".saswp-local-business-name-select").parents("tr").remove();var t=a.parents(".saswp-post-specific-wrapper").attr("data-id"),i='<tr><th><label for="saswp_business_name_'+t+'">Sub Business Type</label></th>';i+='<td><select class="saswp-local-business-name-select" id="saswp_business_name_'+t+'" name="saswp_business_name_'+t+'">',e.each(s.result,function(e,s){i+='<option value="'+e+'">'+s+"</option>"}),i+="</select></td>",i+="</tr>",a.parents(".form-table tr:first").after(i)}else e(".saswp-local-business-name-select").parents("tr").remove()},"json")}),o(),e(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),e(document).on("click",".saswp-add-custom-schema",function(s){s.preventDefault(),e(".saswp-add-custom-schema-field").removeClass("saswp_hide"),e(this).hide()}),e(document).on("click",".saswp-delete-custom-schema",function(s){s.preventDefault(),e("#saswp_custom_schema_field").val(""),e(".saswp-add-custom-schema-field").addClass("saswp_hide"),e(".saswp-add-custom-schema").show()}),e(".saswp-modify_schema_post_enable").on("click",function(s){var a=e(this);a.addClass("updating-message"),s.preventDefault(),e.get(ajaxurl,{action:"saswp_modify_schema_post_enable",post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){a.remove(),e(".saswp-add-custom-schema-div").remove(),e("#post_specific .inside").append(s),a.removeClass("updating-message"),e(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),saswp_schema_datepicker(),p(),o()})}),saswp_schema_datepicker(),e(".saswp-reviews-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"}),e(document).on("click",".saswp-add-more-item",function(s){s.preventDefault();var a=e(".saswp-review-item-list-table tr").length;console.log(a);e(".saswp-review-item-list-table").append('<tr class="saswp-review-item-tr"><td>Review Item Feature</td><td><input type="text" name="saswp-review-item-feature[]"></td><td>Rating</td><td><input step="0.1" min="0" max="5" type="number" name="saswp-review-item-star-rating[]"></td><td><a type="button" class="saswp-remove-review-item button">x</a></td></tr>')}),e(document).on("click",".saswp-remove-review-item",function(s){s.preventDefault(),e(this).parent().parent("tr").remove()}),e(document).on("focusout",".saswp-review-item-tr input[type=number]",function(s){s.preventDefault();var a=0,t=e(".saswp-review-item-tr input[type=number]").length;e(".saswp-review-item-tr input[type=number]").each(function(s,t){""==e(t).val()?a+=parseFloat(0):a+=parseFloat(e(t).val())});var i=a/t;e("#saswp-review-item-over-all").val(i)}),e("#saswp-review-location").change(function(){var s=e(this).val();e(".saswp-review-shortcode").addClass("saswp_hide"),3==s&&e(".saswp-review-shortcode").removeClass("saswp_hide")}).change(),e("#saswp-review-item-enable").change(function(){e(this).is(":checked")?e(".saswp-review-fields").show():e(".saswp-review-fields").hide()}).change(),e(document).on("click",".saswp-restore-post-schema",function(s){s.preventDefault();var a=e(this);if(a.addClass("updating-message"),e(".saswp-post-specific-schema-ids").val())var t=JSON.parse(e(".saswp-post-specific-schema-ids").val());e.post(ajaxurl,{action:"saswp_restore_schema",schema_ids:t,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status?setTimeout(function(){location.reload()},1e3):(alert(e.msg),setTimeout(function(){location.reload()},1e3)),a.removeClass("updating-message")},"json")}),e(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(s){s.preventDefault();var a=e(this).attr("data-id");e(".saswp-post-specific-wrapper").hide(),e("#"+a).show(),e("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),e("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),e(this).addClass("selected"),e(this).parent().addClass("selected"),p()}),e("#saswp-global-tabs a:first").addClass("saswp-global-selected"),e(".saswp-global-container").hide(),"#saswp-default-container"==window.location.hash?e(".saswp-global-container:eq(2)").show():e(".saswp-global-container:first").show(),e("#saswp-global-tabs a").click(function(){var s=e(this).attr("data-id");e(this).hasClass("saswp-global-selected")||(e("#saswp-global-tabs a").removeClass("saswp-global-selected"),e(this).addClass("saswp-global-selected"),e(".saswp-global-container").hide(),e("#"+s).show())}),e("#saswp-tools-tabs a:first").addClass("saswp-global-selected"),e(".saswp-tools-container").hide(),e(".saswp-tools-container:first").show(),e("#saswp-tools-tabs a").click(function(){var s=e(this).attr("data-id");e(this).hasClass("saswp-global-selected")||(e("#saswp-tools-tabs a").removeClass("saswp-global-selected"),e(this).addClass("saswp-global-selected"),e(".saswp-tools-container").hide(),e("#"+s).show())}),e("#saswp-review-tabs a:first").addClass("saswp-global-selected"),e(".saswp-review-container").hide(),e(".saswp-review-container:first").show(),e("#saswp-review-tabs a").click(function(){var s=e(this).attr("data-id");e(this).hasClass("saswp-global-selected")||(e("#saswp-review-tabs a").removeClass("saswp-global-selected"),e(this).addClass("saswp-global-selected"),e(".saswp-review-container").hide(),e("#"+s).show())}),e('a[href="'+saswp_localize_data.new_url_selector+'"]').attr("href",saswp_localize_data.new_url_href),e("#saswp_enable_custom_field").change(function(){e(this).is(":checked")?e(".saswp-custom-fields-div").show():e(".saswp-custom-fields-div").hide()}),e(document).on("change",".saswp-custom-fields-name",function(){var s="text",a=e(this).parent().parent("tr"),t=e(this).val();-1!=t.indexOf("image")&&(s="image"),saswp_get_meta_list(s,null,e(this).parent().parent("tr").find("td:eq(1)"),t,a)}),e(document).on("click",".saswp-skip-button",function(s){s.preventDefault(),e(this).parent().parent().hide(),e.post(ajaxurl,{action:"saswp_skip_wizard",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){},"json")}),e(document).on("click",".saswp_add_schema_fields_on_fly",function(s){s.preventDefault();var a=e(this).attr("data-id"),t=e(this).attr("fields_type"),i=e(this).attr("div_type"),o=e(".saswp-"+i+"-table-div").length,n=e(".saswp-"+i+"-table-div:nth-child("+o+")").attr("data-id");(n=++n)||(n=0),saswp_get_post_specific_schema_fields(n,t,i,a,t+"_")}),e(document).on("click",".saswp-table-close",function(){e(this).parent().remove()}),e(document).on("click",".saswp-rmv-modify_row",function(s){s.preventDefault(),e(this).parent().parent().remove()}),e(document).on("change",".saswp-custom-meta-list",function(){var s=e(this).val(),a=e(this).parent().parent("tr").find(".saswp-custom-fields-name").val(),t="";"manual_text"==s?(t+='<td><input type="text" name="saswp_fixed_text['+a+']"></td>',t+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>'):"custom_field"==s?(t+='<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+a+']">',t+="</select></td>",t+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>'):(t+="<td></td>",t+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>'),e(this).parent().parent("tr").find("td:gt(1)").remove(),e(this).parent().parent("tr").append(t),n()}),e(document).on("click",".saswp-add-custom-fields",function(){var s=e("select#schema_type option:selected").val(),a=e("#post_ID").val();""!=s&&(saswp_meta_list_fields[s]?saswp_get_meta_list("text",saswp_meta_list_fields[s],null,null,null):e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:a,schema_type:s,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){saswp_meta_list_fields[s]=e,saswp_get_meta_list("text",saswp_meta_list_fields[s],null,null,null)},error:function(e){console.log(e)}}))}),n(),p(),e('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),e(document).on("click",".saswp_coonect_google_place",function(){var s=e("#saswp_google_place_id").val(),a=e("#saswp_language_list").val(),t=e("#saswp_googel_api").val();""!=s&&e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:s,language:a,google_api:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){console.log(e.status)},error:function(e){console.log(e)}})}),"saswp"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>"),"undefined"!=typeof saswp_reviews_data&&e(".saswp-rating-div").rateYo({rating:saswp_reviews_data.rating_val,halfStar:!0,readOnly:saswp_reviews_data.readonly,onSet:function(s,a){e(this).next().val(s),console.log(s)}}),e(document).on("click",".saswp-add-g-location-btn",function(s){var a="";a=e("#saswp_google_place_api_key").length?'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="5" step="5" placeholder="5" disabled="disabled">':'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="10" step="10" placeholder="10">',s.preventDefault();var t="";(t+='<tr><td style="width:12%;"><strong>Place Id</strong></td><td style="width:20%;"><input class="saswp-g-location-field" name="sd_data[saswp_reviews_location_name][]" type="text" value=""></td><td style="width:10%;"><strong>Reviews</strong></td><td style="width:10%;">'+a+'</td><td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">Fetch</a></td><td style="width:10%;"><a type="button" class="saswp-remove-review-item button">x</a></td><td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td></tr>')&&e(".saswp-g-reviews-settings-table").append(t)}),e(document).on("click",".saswp-fetch-s-approved-reviews",function(s){s.preventDefault();var a=e(this);a.addClass("updating-message");var t=e("#saswp_s_approved_site_id").val(),i=e("#saswp_s_approved_token").val(),o=e("#saswp_s_approved_reviews").val(),n=e("#reviews_addon_license_key").val(),p=1;o>100&&(p=o/100,o%100&&p++);t&&i&&n?c(a,t,i,o,n,0,p):(a.removeClass("updating-message"),alert("Fill the site id and token with valid api key"))}),e(document).on("click",".saswp-fetch-g-reviews",function(){var s=e(this),a="free";s.addClass("updating-message");var t=e(this).parent().parent().find(".saswp-g-location-field").val(),i=e(this).parent().parent().find(".saswp-g-blocks-field").val(),o=e("#saswp_google_place_api_key").val(),n=e("#reviews_addon_license_key").val(),p=e("#reviews_addon_license_key_status").val();if("premium"==(a=e("#saswp_google_place_api_key").length?"free":"premium")){if(!(i>0))return alert("Blocks value is zero"),s.removeClass("updating-message"),!1;if(0!=i%10)return s.parent().parent().find(".saswp-rv-fetched-msg").text("Reviews count should be in step of 10"),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),s.removeClass("updating-message"),!1}""!=t&&(n||o)?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:p,reviews_api:n,location:t,blocks:i,g_api:o,premium_status:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s.parent().parent().find(".saswp-rv-fetched-msg").text("Success"),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(s.parent().parent().find(".saswp-rv-fetched-msg").text(e.message),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),s.removeClass("updating-message")},error:function(e){console.log(e)}}):(""==t&&alert("Please enter place id"),""==o&&alert("Please enter api key"),""==n&&alert("Please enter reviews api key"),s.removeClass("updating-message"))}),e("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var s=e(this);s.parent().find(".saswp-phone-validation").remove();var a=e(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(a)?s.parent().find(".saswp-phone-validation").remove():s.after('<span style="color:red;" class="saswp-phone-validation">Invalid Phone Number</span>')})});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin_section/settings.php
CHANGED
@@ -1203,11 +1203,19 @@ function saswp_import_callback(){
|
|
1203 |
$wp_seo_schema_message = '';
|
1204 |
$seo_pressor_message = '';
|
1205 |
$wpsso_core_message = '';
|
|
|
1206 |
$schema_plugin = saswp_check_data_imported_from('schema');
|
1207 |
$schema_pro_plugin = saswp_check_data_imported_from('schema_pro');
|
1208 |
$wp_seo_schema_plugin = saswp_check_data_imported_from('wp_seo_schema');
|
1209 |
$seo_pressor = saswp_check_data_imported_from('seo_pressor');
|
1210 |
$wpsso_core = saswp_check_data_imported_from('wpsso_core');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1211 |
|
1212 |
if($wpsso_core->post_count !=0){
|
1213 |
|
@@ -1271,6 +1279,11 @@ function saswp_import_callback(){
|
|
1271 |
<?php echo '<p>'.esc_html__($wpsso_core_message, 'schema-and-structured-data-for-wp').'</p>'; ?>
|
1272 |
</div>
|
1273 |
</li>
|
|
|
|
|
|
|
|
|
|
|
1274 |
|
1275 |
</ul>
|
1276 |
<?php
|
1203 |
$wp_seo_schema_message = '';
|
1204 |
$seo_pressor_message = '';
|
1205 |
$wpsso_core_message = '';
|
1206 |
+
$aiors_message = '';
|
1207 |
$schema_plugin = saswp_check_data_imported_from('schema');
|
1208 |
$schema_pro_plugin = saswp_check_data_imported_from('schema_pro');
|
1209 |
$wp_seo_schema_plugin = saswp_check_data_imported_from('wp_seo_schema');
|
1210 |
$seo_pressor = saswp_check_data_imported_from('seo_pressor');
|
1211 |
$wpsso_core = saswp_check_data_imported_from('wpsso_core');
|
1212 |
+
$aiors = saswp_check_data_imported_from('aiors');
|
1213 |
+
|
1214 |
+
if($aiors->post_count !=0 ){
|
1215 |
+
|
1216 |
+
$aiors_message = $message;
|
1217 |
+
|
1218 |
+
}
|
1219 |
|
1220 |
if($wpsso_core->post_count !=0){
|
1221 |
|
1279 |
<?php echo '<p>'.esc_html__($wpsso_core_message, 'schema-and-structured-data-for-wp').'</p>'; ?>
|
1280 |
</div>
|
1281 |
</li>
|
1282 |
+
<li><div class="saswp-tools-field-title"><div class="saswp-tooltip"><span class="saswp-tooltiptext"><?php echo esc_html__('All the settings and data you can import from this plugin when you click start importing','schema-and-structured-data-for-wp') ?></span><strong><?php echo esc_html__('Schema – All In One Schema Rich Snippets','schema-and-structured-data-for-wp'); ?></strong></div><button data-id="aiors" class="button saswp-import-plugins"><?php echo esc_html__('Import','schema-and-structured-data-for-wp'); ?></button>
|
1283 |
+
<p class="saswp-imported-message"></p>
|
1284 |
+
<?php echo '<p>'.esc_html__($aiors_message, 'schema-and-structured-data-for-wp').'</p>'; ?>
|
1285 |
+
</div>
|
1286 |
+
</li>
|
1287 |
|
1288 |
</ul>
|
1289 |
<?php
|
admin_section/structure_admin.php
CHANGED
@@ -1321,7 +1321,13 @@ function saswp_import_plugin_data(){
|
|
1321 |
if ( is_plugin_active('wpsso/wpsso.php') && is_plugin_active('wpsso-schema-json-ld/wpsso-schema-json-ld.php')) {
|
1322 |
$result = saswp_import_wpsso_core_plugin_data();
|
1323 |
}
|
1324 |
-
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
1325 |
|
1326 |
default:
|
1327 |
break;
|
1321 |
if ( is_plugin_active('wpsso/wpsso.php') && is_plugin_active('wpsso-schema-json-ld/wpsso-schema-json-ld.php')) {
|
1322 |
$result = saswp_import_wpsso_core_plugin_data();
|
1323 |
}
|
1324 |
+
break;
|
1325 |
+
case 'aiors':
|
1326 |
+
if ( is_plugin_active('all-in-one-schemaorg-rich-snippets/index.php')) {
|
1327 |
+
$result = saswp_import_aiors_plugin_data();
|
1328 |
+
}
|
1329 |
+
break;
|
1330 |
+
|
1331 |
|
1332 |
default:
|
1333 |
break;
|
core/3rd-party/aqua_resizer.php
CHANGED
@@ -1,6 +1,19 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
3 |
/**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
* Title : Aqua Resizer
|
5 |
* Description : Resizes WordPress images on the fly
|
6 |
* Version : 1.2.2
|
@@ -77,36 +90,60 @@ if(!class_exists('Aq_Resize')) {
|
|
77 |
$upload_info = wp_upload_dir();
|
78 |
$upload_dir = $upload_info['basedir'];
|
79 |
$upload_url = $upload_info['baseurl'];
|
80 |
-
|
81 |
$http_prefix = "http://";
|
82 |
$https_prefix = "https://";
|
83 |
$relative_prefix = "//"; // The protocol-relative URL
|
84 |
-
|
85 |
-
/* if the $url scheme differs from $upload_url scheme, make them match
|
86 |
if the schemes differe, images don't show up. */
|
87 |
if(!strncmp($url,$https_prefix,strlen($https_prefix))){ //if url begins with https:// make $upload_url begin with https:// as well
|
88 |
$upload_url = str_replace($http_prefix,$https_prefix,$upload_url);
|
89 |
}
|
90 |
elseif(!strncmp($url,$http_prefix,strlen($http_prefix))){ //if url begins with http:// make $upload_url begin with http:// as well
|
91 |
-
$upload_url = str_replace($https_prefix,$http_prefix,$upload_url);
|
92 |
}
|
93 |
elseif(!strncmp($url,$relative_prefix,strlen($relative_prefix))){ //if url begins with // make $upload_url begin with // as well
|
94 |
$upload_url = str_replace(array( 0 => "$http_prefix", 1 => "$https_prefix"),$relative_prefix,$upload_url);
|
95 |
}
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
// Define path of image.
|
103 |
$rel_path = str_replace( $upload_url, '', $url );
|
104 |
-
$img_path =
|
|
|
|
|
|
|
105 |
|
106 |
// Check if img path exists, and is an image indeed.
|
107 |
-
if ( ! file_exists( $img_path ) or ! getimagesize( $img_path ) )
|
108 |
-
|
109 |
-
|
|
|
|
|
|
|
|
|
|
|
110 |
// Get image info.
|
111 |
$info = pathinfo( $img_path );
|
112 |
$ext = $info['extension'];
|
@@ -142,8 +179,13 @@ if(!class_exists('Aq_Resize')) {
|
|
142 |
$editor = wp_get_image_editor( $img_path );
|
143 |
|
144 |
if ( is_wp_error( $editor ) || is_wp_error( $editor->resize( $width, $height, $crop ) ) ) {
|
145 |
-
|
146 |
-
|
|
|
|
|
|
|
|
|
|
|
147 |
}
|
148 |
|
149 |
$resized_file = $editor->save();
|
@@ -152,11 +194,21 @@ if(!class_exists('Aq_Resize')) {
|
|
152 |
$resized_rel_path = str_replace( $upload_dir, '', $resized_file['path'] );
|
153 |
$img_url = $upload_url . $resized_rel_path;
|
154 |
} else {
|
155 |
-
throw new Aq_Exception('Unable to save resized image file: ' . $
|
156 |
}
|
157 |
|
158 |
}
|
159 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
|
161 |
// Okay, leave the ship.
|
162 |
if ( true === $upscale ) remove_filter( 'image_resize_dimensions', array( $this, 'aq_upscale' ) );
|
@@ -177,7 +229,8 @@ if(!class_exists('Aq_Resize')) {
|
|
177 |
return $image;
|
178 |
}
|
179 |
catch (Aq_Exception $ex) {
|
180 |
-
|
|
|
181 |
|
182 |
if ($this->throwOnError) {
|
183 |
// Bubble up exception.
|
@@ -239,9 +292,37 @@ if(!function_exists('aq_resize')) {
|
|
239 |
$url = $sitepress->convert_url( $url, $sitepress->get_default_language() );
|
240 |
}
|
241 |
/* WPML Fix */
|
242 |
-
|
243 |
-
$
|
244 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
}
|
246 |
}
|
247 |
-
|
1 |
<?php
|
2 |
+
// Exit if accessed directly
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
/**
|
7 |
+
* Aqua Resizer plugin
|
8 |
+
* Version 1.2.2
|
9 |
+
*
|
10 |
+
* Dual licensed under the MIT and GPL licenses:
|
11 |
+
* http://www.opensource.org/licenses/mit-license.php
|
12 |
+
* http://sam.zoy.org/wtfpl/
|
13 |
+
*
|
14 |
+
* Thanks to Aqua Resizer Team for some excellent contributions!
|
15 |
+
*
|
16 |
+
*
|
17 |
* Title : Aqua Resizer
|
18 |
* Description : Resizes WordPress images on the fly
|
19 |
* Version : 1.2.2
|
90 |
$upload_info = wp_upload_dir();
|
91 |
$upload_dir = $upload_info['basedir'];
|
92 |
$upload_url = $upload_info['baseurl'];
|
93 |
+
|
94 |
$http_prefix = "http://";
|
95 |
$https_prefix = "https://";
|
96 |
$relative_prefix = "//"; // The protocol-relative URL
|
97 |
+
|
98 |
+
/* if the $url scheme differs from $upload_url scheme, make them match
|
99 |
if the schemes differe, images don't show up. */
|
100 |
if(!strncmp($url,$https_prefix,strlen($https_prefix))){ //if url begins with https:// make $upload_url begin with https:// as well
|
101 |
$upload_url = str_replace($http_prefix,$https_prefix,$upload_url);
|
102 |
}
|
103 |
elseif(!strncmp($url,$http_prefix,strlen($http_prefix))){ //if url begins with http:// make $upload_url begin with http:// as well
|
104 |
+
$upload_url = str_replace($https_prefix,$http_prefix,$upload_url);
|
105 |
}
|
106 |
elseif(!strncmp($url,$relative_prefix,strlen($relative_prefix))){ //if url begins with // make $upload_url begin with // as well
|
107 |
$upload_url = str_replace(array( 0 => "$http_prefix", 1 => "$https_prefix"),$relative_prefix,$upload_url);
|
108 |
}
|
109 |
+
$is_cdn = false;
|
110 |
+
$cdn_url = '';
|
111 |
+
$cdn_url_main = '';
|
112 |
+
|
113 |
+
// Check if $img_url is not local.
|
114 |
+
if ( false === strpos( $url, $upload_url ) ) {
|
115 |
+
$is_cdn = true;
|
116 |
+
$cdn_url_main = $cdn_url = $url;
|
117 |
+
// Return the original array
|
118 |
+
$wp_upload_dir = wp_upload_dir();
|
119 |
+
$dir_baseurl = $wp_upload_dir['baseurl'];
|
120 |
+
$dir_baseurl = explode('/', $dir_baseurl);
|
121 |
+
$dir_name = end($dir_baseurl);
|
122 |
+
$cdn_url = explode($dir_name, $cdn_url);
|
123 |
+
if ( ! isset($cdn_url[1]) ) {
|
124 |
+
$cdn_url = array();
|
125 |
+
$cdn_url[1] = '';
|
126 |
+
}
|
127 |
+
$hybid_url = $upload_url . $cdn_url[1];
|
128 |
+
// this will append crop path in the url to generate the image locally
|
129 |
+
$url = $hybid_url;
|
130 |
+
}
|
131 |
// Define path of image.
|
132 |
$rel_path = str_replace( $upload_url, '', $url );
|
133 |
+
$img_path = '';
|
134 |
+
if($rel_path){
|
135 |
+
$img_path = $upload_dir . $rel_path;
|
136 |
+
}
|
137 |
|
138 |
// Check if img path exists, and is an image indeed.
|
139 |
+
if ( ! file_exists( $img_path ) or ! getimagesize( $img_path ) ){
|
140 |
+
// Return the Original CDN array
|
141 |
+
return array (
|
142 |
+
0 => $cdn_url_main,
|
143 |
+
1 => $width,
|
144 |
+
2 => $height
|
145 |
+
);
|
146 |
+
}
|
147 |
// Get image info.
|
148 |
$info = pathinfo( $img_path );
|
149 |
$ext = $info['extension'];
|
179 |
$editor = wp_get_image_editor( $img_path );
|
180 |
|
181 |
if ( is_wp_error( $editor ) || is_wp_error( $editor->resize( $width, $height, $crop ) ) ) {
|
182 |
+
|
183 |
+
// Return the Original array
|
184 |
+
return array (
|
185 |
+
0 => $url,
|
186 |
+
1 => $width,
|
187 |
+
2 => $height
|
188 |
+
);
|
189 |
}
|
190 |
|
191 |
$resized_file = $editor->save();
|
194 |
$resized_rel_path = str_replace( $upload_dir, '', $resized_file['path'] );
|
195 |
$img_url = $upload_url . $resized_rel_path;
|
196 |
} else {
|
197 |
+
throw new Aq_Exception('Unable to save resized image file: ' . $resized_file->get_error_message());
|
198 |
}
|
199 |
|
200 |
}
|
201 |
}
|
202 |
+
// Check if it is CDN then reglue the url to its original state
|
203 |
+
if ( $is_cdn ) {
|
204 |
+
|
205 |
+
$img_url = explode('/', $img_url);
|
206 |
+
$cdn_url = explode('/', $cdn_url_main);
|
207 |
+
$img_end = end($img_url);
|
208 |
+
$cdn_end = end($cdn_url);
|
209 |
+
$cdn_url_main = str_replace($cdn_end, $img_end, $cdn_url_main);
|
210 |
+
$img_url = $cdn_url_main;
|
211 |
+
}
|
212 |
|
213 |
// Okay, leave the ship.
|
214 |
if ( true === $upscale ) remove_filter( 'image_resize_dimensions', array( $this, 'aq_upscale' ) );
|
229 |
return $image;
|
230 |
}
|
231 |
catch (Aq_Exception $ex) {
|
232 |
+
// Throwing errors for the images stored on CDN #2285
|
233 |
+
/*error_log('Aq_Resize.process() error: ' . $ex->getMessage());*/
|
234 |
|
235 |
if ($this->throwOnError) {
|
236 |
// Bubble up exception.
|
292 |
$url = $sitepress->convert_url( $url, $sitepress->get_default_language() );
|
293 |
}
|
294 |
/* WPML Fix */
|
295 |
+
/* EWWW Image Optimizer (ExactDN) Compatible*/
|
296 |
+
global $exactdn;
|
297 |
+
if ( class_exists( 'ExactDN' ) && $exactdn->get_exactdn_domain() ) {
|
298 |
+
$args = array(
|
299 |
+
'resize' => "$width,$height",
|
300 |
+
);
|
301 |
+
$image = array(
|
302 |
+
0 => $exactdn->generate_url( $url, $args ),
|
303 |
+
1 => $width,
|
304 |
+
2 => $height,
|
305 |
+
);
|
306 |
+
return $image;
|
307 |
+
}
|
308 |
+
/* Jetpack Compatible*/
|
309 |
+
elseif( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'photon' ) ) {
|
310 |
+
$args = array(
|
311 |
+
'resize' => "$width,$height"
|
312 |
+
);
|
313 |
+
$image = array (
|
314 |
+
0 => jetpack_photon_url( $url, $args ),
|
315 |
+
1 => $width,
|
316 |
+
2 => $height
|
317 |
+
);
|
318 |
+
return $image;
|
319 |
+
}
|
320 |
+
elseif( function_exists('fifu_activate') || is_plugin_active('fifu-premium/fifu-premium.php') ){
|
321 |
+
return fifu_amp_url($url, $width, $height);
|
322 |
+
}
|
323 |
+
else {
|
324 |
+
$aq_resize = Aq_Resize::getInstance();
|
325 |
+
return $aq_resize->process( $url, $width, $height, $crop, $single, $upscale );
|
326 |
+
}
|
327 |
}
|
328 |
}
|
|
output/function.php
CHANGED
@@ -178,7 +178,7 @@ function saswp_schema_markup_output() {
|
|
178 |
);
|
179 |
|
180 |
$webpage['primaryImageOfPage'] = array(
|
181 |
-
'@id' =>
|
182 |
);
|
183 |
|
184 |
if($site_navigation){
|
@@ -640,7 +640,7 @@ function saswp_get_schema_data($schema_id, $schema_key){
|
|
640 |
|
641 |
if($schema_id && $schema_key){
|
642 |
|
643 |
-
$details =
|
644 |
|
645 |
}
|
646 |
|
@@ -783,8 +783,8 @@ function saswp_remove_microdata($content){
|
|
783 |
$content = preg_replace("/itemscope=(\"?)itemscope(\"?) itemtype=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
|
784 |
$content = preg_replace("/itemscope=(\"?)itemprop(\"?) itemType=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
|
785 |
$content = preg_replace("/itemscope itemprop=\"(.*?)\" itemType=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
|
786 |
-
|
787 |
-
|
788 |
|
789 |
//Clean json markup
|
790 |
if(isset($sd_data['saswp-aiosp']) && $sd_data['saswp-aiosp'] == 1 ){
|
@@ -909,6 +909,39 @@ function saswp_wp_recipe_schema_json($recipe){
|
|
909 |
$metadata = WPRM_Metadata::get_howto_metadata( $recipe );
|
910 |
} else {
|
911 |
$metadata = array();
|
912 |
-
}
|
913 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
914 |
}
|
178 |
);
|
179 |
|
180 |
$webpage['primaryImageOfPage'] = array(
|
181 |
+
'@id' => saswp_get_permalink().'#primaryimage'
|
182 |
);
|
183 |
|
184 |
if($site_navigation){
|
640 |
|
641 |
if($schema_id && $schema_key){
|
642 |
|
643 |
+
$details = get_post_meta($schema_id, $schema_key, true);
|
644 |
|
645 |
}
|
646 |
|
783 |
$content = preg_replace("/itemscope=(\"?)itemscope(\"?) itemtype=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
|
784 |
$content = preg_replace("/itemscope=(\"?)itemprop(\"?) itemType=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
|
785 |
$content = preg_replace("/itemscope itemprop=\"(.*?)\" itemType=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
|
786 |
+
// $content = preg_replace("/vcard/", "", $content);
|
787 |
+
// $content = preg_replace("/hentry/", "", $content);
|
788 |
|
789 |
//Clean json markup
|
790 |
if(isset($sd_data['saswp-aiosp']) && $sd_data['saswp-aiosp'] == 1 ){
|
909 |
$metadata = WPRM_Metadata::get_howto_metadata( $recipe );
|
910 |
} else {
|
911 |
$metadata = array();
|
912 |
+
}
|
913 |
+
|
914 |
+
if(isset($metadata['image']) && is_array($metadata['image'])){
|
915 |
+
|
916 |
+
$image_list = array();
|
917 |
+
|
918 |
+
foreach($metadata['image'] as $image_url){
|
919 |
+
|
920 |
+
$image_size = @getimagesize($image_url);
|
921 |
+
|
922 |
+
if($image_size[0] < 1280 && $image_size[1] < 720){
|
923 |
+
|
924 |
+
$image_details = @aq_resize( $image_url, 1280, 720, true, false, true );
|
925 |
+
|
926 |
+
if($image_details){
|
927 |
+
|
928 |
+
$image['@type'] = 'ImageObject';
|
929 |
+
$image['url'] = esc_url($image_details[0]);
|
930 |
+
$image['width'] = esc_attr($image_details[1]);
|
931 |
+
$image['height'] = esc_attr($image_details[2]);
|
932 |
+
|
933 |
+
$image_list[] = $image;
|
934 |
+
}
|
935 |
+
|
936 |
+
}
|
937 |
+
|
938 |
+
}
|
939 |
+
|
940 |
+
if($image_list){
|
941 |
+
$metadata['image'] = $image_list;
|
942 |
+
}
|
943 |
+
|
944 |
+
}
|
945 |
+
|
946 |
+
return $metadata;
|
947 |
}
|
output/output.php
CHANGED
@@ -17,7 +17,7 @@ function saswp_kb_schema_output() {
|
|
17 |
|
18 |
global $sd_data;
|
19 |
$input = array();
|
20 |
-
$site_url =
|
21 |
// Social profile
|
22 |
$sd_social_profile = array();
|
23 |
|
@@ -180,8 +180,7 @@ function saswp_kb_schema_output() {
|
|
180 |
'telephone' => esc_attr($sd_data['sd-person-phone-number']),
|
181 |
);
|
182 |
}
|
183 |
-
|
184 |
-
|
185 |
return apply_filters('saswp_modify_organization_output', $input);
|
186 |
}
|
187 |
|
@@ -235,8 +234,7 @@ function saswp_schema_output() {
|
|
235 |
if(isset($sd_data['sd_name']) && $sd_data['sd_name'] !=''){
|
236 |
$site_name = $sd_data['sd_name'];
|
237 |
}
|
238 |
-
|
239 |
-
|
240 |
$image_id = get_post_thumbnail_id();
|
241 |
$image_details = wp_get_attachment_image_src($image_id, 'full');
|
242 |
$date = get_the_date("Y-m-d\TH:i:s\Z");
|
@@ -251,7 +249,7 @@ function saswp_schema_output() {
|
|
251 |
|
252 |
}
|
253 |
|
254 |
-
$saswp_review_details =
|
255 |
|
256 |
$aggregateRating = array();
|
257 |
$saswp_over_all_rating = '';
|
@@ -298,7 +296,7 @@ function saswp_schema_output() {
|
|
298 |
|
299 |
$input1['@context'] = saswp_context_url();
|
300 |
$input1['@type'] = 'VideoGame';
|
301 |
-
$input1['@id'] = trailingslashit(
|
302 |
$input1['author']['@type'] = 'Organization';
|
303 |
$input1['offers']['@type'] = 'Offer';
|
304 |
|
@@ -313,7 +311,7 @@ function saswp_schema_output() {
|
|
313 |
|
314 |
$input1['@context'] = saswp_context_url();
|
315 |
$input1['@type'] = 'MedicalCondition';
|
316 |
-
$input1['@id'] = trailingslashit(
|
317 |
$input1['associatedAnatomy']['@type'] = 'AnatomicalStructure';
|
318 |
$input1['code']['@type'] = 'MedicalCode';
|
319 |
|
@@ -328,7 +326,7 @@ function saswp_schema_output() {
|
|
328 |
|
329 |
$input1['@context'] = saswp_context_url();
|
330 |
$input1['@type'] = 'TVSeries';
|
331 |
-
$input1['@id'] = trailingslashit(
|
332 |
$input1['author']['@type'] = 'Person';
|
333 |
|
334 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
@@ -342,7 +340,7 @@ function saswp_schema_output() {
|
|
342 |
|
343 |
$input1['@context'] = saswp_context_url();
|
344 |
$input1['@type'] = 'HowTo';
|
345 |
-
$input1['@id'] = trailingslashit(
|
346 |
$input1['estimatedCost']['@type'] = 'MonetaryAmount';
|
347 |
|
348 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
@@ -356,7 +354,7 @@ function saswp_schema_output() {
|
|
356 |
|
357 |
$input1['@context'] = saswp_context_url();
|
358 |
$input1['@type'] = 'Trip';
|
359 |
-
$input1['@id'] = trailingslashit(
|
360 |
|
361 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
362 |
$service = new saswp_output_service();
|
@@ -369,7 +367,7 @@ function saswp_schema_output() {
|
|
369 |
|
370 |
$input1['@context'] = saswp_context_url();
|
371 |
$input1['@type'] = 'SingleFamilyResidence';
|
372 |
-
$input1['@id'] = trailingslashit(
|
373 |
$input1['address']['@type'] = 'PostalAddress';
|
374 |
|
375 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
@@ -383,7 +381,7 @@ function saswp_schema_output() {
|
|
383 |
|
384 |
$input1['@context'] = saswp_context_url();
|
385 |
$input1['@type'] = 'House';
|
386 |
-
$input1['@id'] = trailingslashit(
|
387 |
$input1['address']['@type'] = 'PostalAddress';
|
388 |
|
389 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
@@ -397,7 +395,7 @@ function saswp_schema_output() {
|
|
397 |
|
398 |
$input1['@context'] = saswp_context_url();
|
399 |
$input1['@type'] = 'Apartment';
|
400 |
-
$input1['@id'] = trailingslashit(
|
401 |
$input1['address']['@type'] = 'PostalAddress';
|
402 |
|
403 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
@@ -411,7 +409,7 @@ function saswp_schema_output() {
|
|
411 |
|
412 |
$input1['@context'] = saswp_context_url();
|
413 |
$input1['@type'] = 'TouristDestination';
|
414 |
-
$input1['@id'] = trailingslashit(
|
415 |
$input1['address']['@type'] = 'PostalAddress';
|
416 |
|
417 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
@@ -425,7 +423,7 @@ function saswp_schema_output() {
|
|
425 |
|
426 |
$input1['@context'] = saswp_context_url();
|
427 |
$input1['@type'] = 'TouristAttraction';
|
428 |
-
$input1['@id'] = trailingslashit(
|
429 |
$input1['address']['@type'] = 'PostalAddress';
|
430 |
|
431 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
@@ -439,7 +437,7 @@ function saswp_schema_output() {
|
|
439 |
|
440 |
$input1['@context'] = saswp_context_url();
|
441 |
$input1['@type'] = 'LandmarksOrHistoricalBuildings';
|
442 |
-
$input1['@id'] = trailingslashit(
|
443 |
$input1['address']['@type'] = 'PostalAddress';
|
444 |
|
445 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
@@ -453,7 +451,7 @@ function saswp_schema_output() {
|
|
453 |
|
454 |
$input1['@context'] = saswp_context_url();
|
455 |
$input1['@type'] = 'HinduTemple';
|
456 |
-
$input1['@id'] = trailingslashit(
|
457 |
$input1['address']['@type'] = 'PostalAddress';
|
458 |
|
459 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
@@ -467,7 +465,7 @@ function saswp_schema_output() {
|
|
467 |
|
468 |
$input1['@context'] = saswp_context_url();
|
469 |
$input1['@type'] = 'Church';
|
470 |
-
$input1['@id'] = trailingslashit(
|
471 |
$input1['address']['@type'] = 'PostalAddress';
|
472 |
|
473 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
@@ -481,7 +479,7 @@ function saswp_schema_output() {
|
|
481 |
|
482 |
$input1['@context'] = saswp_context_url();
|
483 |
$input1['@type'] = 'Mosque';
|
484 |
-
$input1['@id'] = trailingslashit(
|
485 |
$input1['address']['@type'] = 'PostalAddress';
|
486 |
|
487 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
@@ -495,7 +493,7 @@ function saswp_schema_output() {
|
|
495 |
|
496 |
$input1['@context'] = saswp_context_url();
|
497 |
$input1['@type'] = 'JobPosting';
|
498 |
-
$input1['@id'] = trailingslashit(
|
499 |
$input1['hiringOrganization']['@type'] = 'Organization';
|
500 |
$input1['jobLocation']['@type'] = 'Place';
|
501 |
$input1['jobLocation']['address']['@type'] = 'PostalAddress';
|
@@ -513,7 +511,7 @@ function saswp_schema_output() {
|
|
513 |
|
514 |
$input1['@context'] = saswp_context_url();
|
515 |
$input1['@type'] = 'Person';
|
516 |
-
$input1['@id'] = trailingslashit(
|
517 |
$input1['address']['@type'] = 'PostalAddress';
|
518 |
|
519 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
@@ -534,10 +532,10 @@ function saswp_schema_output() {
|
|
534 |
$input1 = array(
|
535 |
'@context' => saswp_context_url(),
|
536 |
'@type' => $schema_type ,
|
537 |
-
'@id' => trailingslashit(
|
538 |
'name' => saswp_get_the_title(),
|
539 |
'description' => $description,
|
540 |
-
'url' => trailingslashit(
|
541 |
'datePublished' => esc_html($date),
|
542 |
'dateModified' => esc_html($modified_date),
|
543 |
'provider' => array(
|
@@ -592,9 +590,9 @@ function saswp_schema_output() {
|
|
592 |
$input1 = array(
|
593 |
'@context' => saswp_context_url(),
|
594 |
'@type' => 'DiscussionForumPosting' ,
|
595 |
-
'@id' => trailingslashit(
|
596 |
-
'url' => trailingslashit(
|
597 |
-
'mainEntityOfPage' =>
|
598 |
'headline' => saswp_get_the_title(),
|
599 |
'description' => saswp_get_the_excerpt(),
|
600 |
'datePublished' => esc_html($date),
|
@@ -631,14 +629,14 @@ function saswp_schema_output() {
|
|
631 |
$input1 = array(
|
632 |
'@context' => saswp_context_url(),
|
633 |
'@type' => 'BlogPosting' ,
|
634 |
-
'@id' => trailingslashit(
|
635 |
-
'mainEntityOfPage' => trailingslashit(
|
636 |
'headline' => saswp_get_the_title(),
|
637 |
'description' => saswp_get_the_excerpt(),
|
638 |
'articleBody' => saswp_get_the_content(),
|
639 |
'keywords' => saswp_get_the_tags(),
|
640 |
'name' => saswp_get_the_title(),
|
641 |
-
'url' => trailingslashit(
|
642 |
'datePublished' => esc_html($date),
|
643 |
'dateModified' => esc_html($modified_date),
|
644 |
'author' => saswp_get_author_details()
|
@@ -668,18 +666,11 @@ function saswp_schema_output() {
|
|
668 |
}
|
669 |
|
670 |
if( 'AudioObject' === $schema_type){
|
671 |
-
|
672 |
-
$schema_data = saswp_get_schema_data($schema_post_id, 'saswp_audio_schema_details');
|
673 |
-
|
674 |
$input1 = array(
|
675 |
'@context' => saswp_context_url(),
|
676 |
'@type' => $schema_type ,
|
677 |
-
'@id' => trailingslashit(
|
678 |
-
'name' => saswp_remove_warnings($schema_data, 'saswp_audio_schema_name', 'saswp_string'),
|
679 |
-
'description' => saswp_remove_warnings($schema_data, 'saswp_audio_schema_description', 'saswp_string'),
|
680 |
-
'contentUrl' => saswp_remove_warnings($schema_data, 'saswp_audio_schema_contenturl', 'saswp_string'),
|
681 |
-
'duration' => saswp_remove_warnings($schema_data, 'saswp_audio_schema_duration', 'saswp_string'),
|
682 |
-
'encodingFormat' => saswp_remove_warnings($schema_data, 'saswp_audio_schema_encoding_format', 'saswp_string'),
|
683 |
'datePublished' => esc_html($date),
|
684 |
'dateModified' => esc_html($modified_date),
|
685 |
'author' => saswp_get_author_details()
|
@@ -708,8 +699,7 @@ function saswp_schema_output() {
|
|
708 |
}
|
709 |
|
710 |
if( 'Event' === $schema_type){
|
711 |
-
|
712 |
-
|
713 |
if(!saswp_non_amp() && is_plugin_active('the-events-calendar/the-events-calendar.php') && isset($sd_data['saswp-the-events-calendar']) && $sd_data['saswp-the-events-calendar'] == 1 ){
|
714 |
|
715 |
$input1 = Tribe__Events__JSON_LD__Event::instance()->get_data();
|
@@ -725,48 +715,11 @@ function saswp_schema_output() {
|
|
725 |
}else{
|
726 |
|
727 |
if ( isset($sd_data['saswp-the-events-calendar']) && $sd_data['saswp-the-events-calendar'] == 0 ) {
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
'@type' => $schema_type ,
|
734 |
-
'@id' => trailingslashit(get_permalink()).'#event',
|
735 |
-
'name' => saswp_remove_warnings($schema_data, 'saswp_event_schema_name', 'saswp_string'),
|
736 |
-
'description' => saswp_remove_warnings($schema_data, 'saswp_event_schema_description', 'saswp_string'),
|
737 |
-
'startDate' => isset($schema_data['saswp_event_schema_start_date']) && $schema_data['saswp_event_schema_start_date'] !='' ? date('Y-m-d\TH:i:s\Z',strtotime($schema_data['saswp_event_schema_start_date'])):'',
|
738 |
-
'endDate' => isset($schema_data['saswp_event_schema_end_date']) && $schema_data['saswp_event_schema_end_date'] !='' ? date('Y-m-d\TH:i:s\Z',strtotime($schema_data['saswp_event_schema_end_date'])):'',
|
739 |
-
'image' => array(
|
740 |
-
'@type' =>'ImageObject',
|
741 |
-
'url' => isset($schema_data['saswp_event_schema_image']) ? esc_url($schema_data['saswp_event_schema_image']['url']):'' ,
|
742 |
-
'width' => isset($schema_data['saswp_event_schema_image']) ? esc_attr($schema_data['saswp_event_schema_image']['width']):'' ,
|
743 |
-
'height' => isset($schema_data['saswp_event_schema_image']) ? esc_attr($schema_data['saswp_event_schema_image']['height']):'' ,
|
744 |
-
),
|
745 |
-
'location' => array(
|
746 |
-
'@type' => 'Place',
|
747 |
-
'name' => saswp_remove_warnings($schema_data, 'saswp_event_schema_location_name', 'saswp_string'),
|
748 |
-
'address' => array(
|
749 |
-
'@type' => 'PostalAddress',
|
750 |
-
'streetAddress' => saswp_remove_warnings($schema_data, 'saswp_event_schema_location_streetaddress', 'saswp_string'),
|
751 |
-
'addressLocality' => saswp_remove_warnings($schema_data, 'saswp_event_schema_location_locality', 'saswp_string'),
|
752 |
-
'postalCode' => saswp_remove_warnings($schema_data, 'saswp_event_schema_location_postalcode', 'saswp_string'),
|
753 |
-
'addressRegion' => saswp_remove_warnings($schema_data, 'saswp_event_schema_location_region', 'saswp_string'),
|
754 |
-
)
|
755 |
-
),
|
756 |
-
'offers' => array(
|
757 |
-
'@type' => 'Offer',
|
758 |
-
'url' => saswp_remove_warnings($schema_data, 'saswp_event_schema_url', 'saswp_string'),
|
759 |
-
'price' => saswp_remove_warnings($schema_data, 'saswp_event_schema_price', 'saswp_string'),
|
760 |
-
'priceCurrency' => saswp_remove_warnings($schema_data, 'saswp_event_schema_price_currency', 'saswp_string'),
|
761 |
-
'availability' => saswp_remove_warnings($schema_data, 'saswp_event_schema_availability', 'saswp_string'),
|
762 |
-
'validFrom' => isset($schema_data['saswp_event_schema_validfrom']) && $schema_data['saswp_event_schema_validfrom'] !='' ? date('Y-m-d\TH:i:s\Z',strtotime($schema_data['saswp_event_schema_validfrom'])):'',
|
763 |
-
),
|
764 |
-
'performer' => array(
|
765 |
-
'@type' => 'PerformingGroup',
|
766 |
-
'name' => saswp_remove_warnings($schema_data, 'saswp_event_schema_performer_name', 'saswp_string'),
|
767 |
-
),
|
768 |
-
);
|
769 |
-
|
770 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
771 |
$service = new saswp_output_service();
|
772 |
$input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
|
@@ -790,35 +743,17 @@ function saswp_schema_output() {
|
|
790 |
}
|
791 |
|
792 |
if( 'SoftwareApplication' === $schema_type){
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
'operatingSystem' => saswp_remove_warnings($schema_data, 'saswp_software_schema_operating_system', 'saswp_string'),
|
803 |
-
'applicationCategory' => saswp_remove_warnings($schema_data, 'saswp_software_schema_application_category', 'saswp_string'),
|
804 |
-
'offers' => array(
|
805 |
-
'@type' => 'Offer',
|
806 |
-
'price' => saswp_remove_warnings($schema_data, 'saswp_software_schema_price', 'saswp_string'),
|
807 |
-
'priceCurrency' => saswp_remove_warnings($schema_data, 'saswp_software_schema_price_currency', 'saswp_string'),
|
808 |
-
),
|
809 |
-
'datePublished' => esc_html($date),
|
810 |
-
'dateModified' => esc_html($modified_date),
|
811 |
-
'author' => saswp_get_author_details()
|
812 |
-
);
|
813 |
|
814 |
-
|
815 |
-
$input1['aggregateRating'] = array(
|
816 |
-
'@type' => 'AggregateRating',
|
817 |
-
'ratingValue' => esc_attr($schema_data['saswp_software_schema_rating']),
|
818 |
-
'ratingCount' => (int)esc_attr($schema_data['saswp_software_schema_rating_count']),
|
819 |
-
);
|
820 |
-
}
|
821 |
-
|
822 |
if(!empty($publisher)){
|
823 |
|
824 |
$input1 = array_merge($input1, $publisher);
|
@@ -930,15 +865,15 @@ function saswp_schema_output() {
|
|
930 |
$input1 = array(
|
931 |
'@context' => saswp_context_url(),
|
932 |
'@type' => $schema_type ,
|
933 |
-
'@id' => trailingslashit(
|
934 |
-
'url' => trailingslashit(
|
935 |
'name' => saswp_get_the_title(),
|
936 |
'datePublished' => esc_html($date),
|
937 |
'dateModified' => esc_html($modified_date),
|
938 |
'description' => saswp_get_the_excerpt(),
|
939 |
'mainEntity' => array(
|
940 |
'@type' => 'WebPage',
|
941 |
-
'@id' => trailingslashit(
|
942 |
'author' => saswp_get_author_details()
|
943 |
),
|
944 |
|
@@ -1004,8 +939,8 @@ function saswp_schema_output() {
|
|
1004 |
$input1 = array(
|
1005 |
'@context' => saswp_context_url(),
|
1006 |
'@type' => 'Product',
|
1007 |
-
'@id' => trailingslashit(
|
1008 |
-
'url' => trailingslashit(
|
1009 |
'name' => saswp_remove_warnings($product_details, 'product_name', 'saswp_string'),
|
1010 |
'sku' => saswp_remove_warnings($product_details, 'product_sku', 'saswp_string'),
|
1011 |
'description' => saswp_remove_warnings($product_details, 'product_description', 'saswp_string'),
|
@@ -1014,7 +949,7 @@ function saswp_schema_output() {
|
|
1014 |
'availability' => saswp_remove_warnings($product_details, 'product_availability', 'saswp_string'),
|
1015 |
'price' => saswp_remove_warnings($product_details, 'product_price', 'saswp_string'),
|
1016 |
'priceCurrency' => saswp_remove_warnings($product_details, 'product_currency', 'saswp_string'),
|
1017 |
-
'url' => trailingslashit(
|
1018 |
'priceValidUntil' => saswp_remove_warnings($product_details, 'product_priceValidUntil', 'saswp_string'),
|
1019 |
),
|
1020 |
|
@@ -1076,7 +1011,7 @@ function saswp_schema_output() {
|
|
1076 |
|
1077 |
$input1['@context'] = saswp_context_url();
|
1078 |
$input1['@type'] = 'Product';
|
1079 |
-
$input1['@id'] = trailingslashit(
|
1080 |
|
1081 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
1082 |
$service = new saswp_output_service();
|
@@ -1102,8 +1037,8 @@ function saswp_schema_output() {
|
|
1102 |
$input1 = array(
|
1103 |
'@context' => saswp_context_url(),
|
1104 |
'@type' => $schema_type ,
|
1105 |
-
'@id' => trailingslashit(
|
1106 |
-
'url' => trailingslashit(
|
1107 |
'headline' => saswp_get_the_title(),
|
1108 |
'mainEntityOfPage' => get_the_permalink(),
|
1109 |
'datePublished' => esc_html($date),
|
@@ -1118,7 +1053,7 @@ function saswp_schema_output() {
|
|
1118 |
'timeRequired' => saswp_remove_warnings($word_count, 'timerequired', 'saswp_string'),
|
1119 |
'mainEntity' => array(
|
1120 |
'@type' => 'WebPage',
|
1121 |
-
'@id' => trailingslashit(
|
1122 |
),
|
1123 |
'author' => saswp_get_author_details()
|
1124 |
);
|
@@ -1146,86 +1081,18 @@ function saswp_schema_output() {
|
|
1146 |
}
|
1147 |
|
1148 |
if( 'Service' === $schema_type ){
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
$
|
1153 |
-
$area_served_arr = explode(',', $area_served_str);
|
1154 |
|
1155 |
-
$service_offer_str = saswp_remove_warnings($schema_data, 'saswp_service_schema_service_offer', 'saswp_string');
|
1156 |
-
$service_offer_arr = explode(',', $service_offer_str);
|
1157 |
-
|
1158 |
-
$input1 = array(
|
1159 |
-
'@context' => saswp_context_url(),
|
1160 |
-
'@type' => $schema_type ,
|
1161 |
-
'@id' => trailingslashit(get_permalink()).'#service',
|
1162 |
-
'name' => saswp_remove_warnings($schema_data, 'saswp_service_schema_name', 'saswp_string'),
|
1163 |
-
'serviceType' => saswp_remove_warnings($schema_data, 'saswp_service_schema_type', 'saswp_string'),
|
1164 |
-
'provider' => array(
|
1165 |
-
'@type' => saswp_remove_warnings($schema_data, 'saswp_service_schema_provider_type', 'saswp_string'),
|
1166 |
-
'name' => saswp_remove_warnings($schema_data, 'saswp_service_schema_provider_name', 'saswp_string'),
|
1167 |
-
'image' => array(
|
1168 |
-
'@type' => 'ImageObject',
|
1169 |
-
'url' => isset($schema_data['saswp_service_schema_image']) ? esc_url($schema_data['saswp_service_schema_image']['url']):'' ,
|
1170 |
-
'width' => isset($schema_data['saswp_service_schema_image']) ? esc_attr($schema_data['saswp_service_schema_image']['width']):'' ,
|
1171 |
-
'height' => isset($schema_data['saswp_service_schema_image']) ? esc_attr($schema_data['saswp_service_schema_image']['height']):'' ,
|
1172 |
-
),
|
1173 |
-
'@id' => trailingslashit(get_permalink()),
|
1174 |
-
'address' => array(
|
1175 |
-
'@type' => 'PostalAddress',
|
1176 |
-
'addressLocality' => saswp_remove_warnings($schema_data, 'saswp_service_schema_locality', 'saswp_string'),
|
1177 |
-
'postalCode' => saswp_remove_warnings($schema_data, 'saswp_service_schema_postal_code', 'saswp_string'),
|
1178 |
-
'telephone' => saswp_remove_warnings($schema_data, 'saswp_service_schema_telephone', 'saswp_string')
|
1179 |
-
),
|
1180 |
-
'priceRange' => saswp_remove_warnings($schema_data, 'saswp_service_schema_price_range', 'saswp_string'),
|
1181 |
-
),
|
1182 |
-
'description' => saswp_remove_warnings($schema_data, 'saswp_service_schema_description', 'saswp_string'),
|
1183 |
-
);
|
1184 |
-
$areaServed = array();
|
1185 |
-
|
1186 |
-
foreach($area_served_arr as $area){
|
1187 |
-
|
1188 |
-
$areaServed[] = array(
|
1189 |
-
'@type' => 'City',
|
1190 |
-
'name' => $area
|
1191 |
-
);
|
1192 |
-
|
1193 |
-
}
|
1194 |
-
$serviceOffer = array();
|
1195 |
-
|
1196 |
-
foreach($service_offer_arr as $offer){
|
1197 |
-
|
1198 |
-
$serviceOffer[] = array(
|
1199 |
-
'@type' => 'Offer',
|
1200 |
-
'name' => $offer
|
1201 |
-
);
|
1202 |
-
|
1203 |
-
}
|
1204 |
-
|
1205 |
-
$input1['areaServed'] = $areaServed;
|
1206 |
-
|
1207 |
-
$input1['hasOfferCatalog'] = array(
|
1208 |
-
'@type' => 'OfferCatalog',
|
1209 |
-
'name' => $schema_data['saswp_service_schema_name'],
|
1210 |
-
'itemListElement' => $serviceOffer
|
1211 |
-
);
|
1212 |
-
|
1213 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] == 1){
|
1214 |
|
1215 |
$service = new saswp_output_service();
|
1216 |
$input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
|
1217 |
|
1218 |
}
|
1219 |
-
|
1220 |
-
if(isset($schema_data['saswp_service_schema_enable_rating'])){
|
1221 |
-
|
1222 |
-
$input1['aggregateRating'] = array(
|
1223 |
-
"@type" => "AggregateRating",
|
1224 |
-
"ratingValue" => saswp_remove_warnings($schema_data, 'saswp_service_schema_rating', 'saswp_string'),
|
1225 |
-
"reviewCount" => saswp_remove_warnings($schema_data, 'saswp_service_schema_review_count', 'saswp_string')
|
1226 |
-
);
|
1227 |
-
}
|
1228 |
-
|
1229 |
if(!empty($aggregateRating)){
|
1230 |
$input1['aggregateRating'] = $aggregateRating;
|
1231 |
}
|
@@ -1246,14 +1113,14 @@ function saswp_schema_output() {
|
|
1246 |
$input1 = array(
|
1247 |
'@context' => saswp_context_url(),
|
1248 |
'@type' => 'Review',
|
1249 |
-
'@id' => trailingslashit(
|
1250 |
'dateCreated' => esc_html($date),
|
1251 |
'datePublished' => esc_html($date),
|
1252 |
'dateModified' => esc_html($modified_date),
|
1253 |
'headline' => saswp_get_the_title(),
|
1254 |
'name' => saswp_get_the_title(),
|
1255 |
'keywords' => tie_get_plain_terms( get_the_ID(), 'post_tag' ),
|
1256 |
-
'url' => trailingslashit(
|
1257 |
'description' => saswp_get_the_excerpt(),
|
1258 |
'articleBody' => saswp_get_the_content(),
|
1259 |
'copyrightYear' => get_the_time( 'Y' ),
|
@@ -1287,107 +1154,17 @@ function saswp_schema_output() {
|
|
1287 |
$schema_data = saswp_get_schema_data($schema_post_id, 'saswp_review_schema_details');
|
1288 |
|
1289 |
if(isset($schema_data['saswp_review_schema_item_type'])){
|
1290 |
-
|
1291 |
-
$review_author = $author_name;
|
1292 |
-
|
1293 |
-
if(isset($schema_data['saswp_review_schema_author'])){
|
1294 |
-
|
1295 |
-
$review_author = $schema_data['saswp_review_schema_author'];
|
1296 |
-
|
1297 |
-
}
|
1298 |
-
|
1299 |
$input1['@context'] = saswp_context_url();
|
1300 |
$input1['@type'] = esc_attr($schema_type);
|
1301 |
-
$input1['url'] = trailingslashit(
|
1302 |
$input1['datePublished'] = esc_html($date);
|
1303 |
$input1['dateModified'] = esc_html($modified_date);
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
$input1['author']['@type'] = 'Person';
|
1308 |
-
$input1['author']['name'] = esc_attr($review_author);
|
1309 |
-
|
1310 |
-
if(isset($schema_data['saswp_review_schema_author_sameas'])){
|
1311 |
-
|
1312 |
-
$input1['author']['sameAs'] = esc_url($schema_data['saswp_review_schema_author_sameas']);
|
1313 |
-
|
1314 |
-
}
|
1315 |
-
|
1316 |
-
}
|
1317 |
-
|
1318 |
-
if(!empty($publisher)){
|
1319 |
-
|
1320 |
-
$input1 = array_merge($input1, $publisher);
|
1321 |
-
|
1322 |
-
}
|
1323 |
-
|
1324 |
-
if(isset($schema_data['saswp_review_schema_description'])){
|
1325 |
-
|
1326 |
-
$input1['reviewBody'] = $schema_data['saswp_review_schema_description'];
|
1327 |
-
$input1['description'] = $schema_data['saswp_review_schema_description'];
|
1328 |
-
}else {
|
1329 |
-
$input1['reviewBody'] = saswp_get_the_excerpt();
|
1330 |
-
$input1['description'] = saswp_get_the_excerpt();
|
1331 |
-
}
|
1332 |
-
|
1333 |
-
if(isset($schema_data['saswp_review_schema_item_type'])){
|
1334 |
-
$input1['itemReviewed']['@type'] = esc_attr($schema_data['saswp_review_schema_item_type']);
|
1335 |
-
}
|
1336 |
-
if(isset($schema_data['saswp_review_schema_name'])){
|
1337 |
-
$input1['itemReviewed']['name'] = esc_attr($schema_data['saswp_review_schema_name']);
|
1338 |
-
}
|
1339 |
-
if(isset($schema_data['saswp_review_schema_url'])){
|
1340 |
-
$input1['itemReviewed']['url'] = esc_url($schema_data['saswp_review_schema_url']);
|
1341 |
-
}
|
1342 |
-
if(isset($schema_data['saswp_review_schema_price_range'])){
|
1343 |
-
$input1['itemReviewed']['priceRange'] = esc_attr($schema_data['saswp_review_schema_price_range']);
|
1344 |
-
}
|
1345 |
-
if(isset($schema_data['saswp_review_schema_telephone'])){
|
1346 |
-
$input1['itemReviewed']['telephone'] = esc_attr($schema_data['saswp_review_schema_telephone']);
|
1347 |
-
}
|
1348 |
-
if(isset($schema_data['saswp_review_schema_servescuisine'])){
|
1349 |
-
$input1['itemReviewed']['servesCuisine'] = esc_attr($schema_data['saswp_review_schema_servescuisine']);
|
1350 |
-
}
|
1351 |
-
if(isset($schema_data['saswp_review_schema_menu'])){
|
1352 |
-
$input1['itemReviewed']['hasMenu'] = esc_url($schema_data['saswp_review_schema_menu']);
|
1353 |
-
}
|
1354 |
-
if(isset($schema_data['saswp_review_schema_itemreviewed_sameas'])){
|
1355 |
-
$input1['itemReviewed']['sameAs'] = esc_url($schema_data['saswp_review_schema_itemreviewed_sameas']);
|
1356 |
-
}
|
1357 |
-
|
1358 |
-
if(isset($schema_data['saswp_review_schema_director'])){
|
1359 |
-
|
1360 |
-
$input1['itemReviewed']['director'] = esc_attr($schema_data['saswp_review_schema_director']);
|
1361 |
-
|
1362 |
-
}
|
1363 |
-
if(isset($schema_data['saswp_review_schema_date_created'])){
|
1364 |
-
|
1365 |
-
$input1['itemReviewed']['dateCreated'] = date_format(date_create($schema_data['saswp_review_schema_date_created']), "Y-m-d\TH:i:s\Z");
|
1366 |
-
|
1367 |
-
}
|
1368 |
-
|
1369 |
-
|
1370 |
-
if(isset($schema_data['saswp_review_schema_image'])){
|
1371 |
-
|
1372 |
-
$input1['itemReviewed']['image']['@type'] = 'ImageObject';
|
1373 |
-
$input1['itemReviewed']['image']['url'] = isset($schema_data['saswp_review_schema_image']) ? esc_url($schema_data['saswp_review_schema_image']) : '';
|
1374 |
-
$input1['itemReviewed']['image']['width'] = isset($schema_data['saswp_review_schema_image_detail']) ? esc_attr($schema_data['saswp_review_schema_image_detail']['width']) : '';
|
1375 |
-
$input1['itemReviewed']['image']['height']= isset($schema_data['saswp_review_schema_image_detail']) ? esc_attr($schema_data['saswp_review_schema_image_detail']['height']) : '';
|
1376 |
-
|
1377 |
-
}
|
1378 |
-
|
1379 |
-
if(saswp_remove_warnings($schema_data, 'saswp_review_schema_street_address', 'saswp_string') !='' || saswp_remove_warnings($schema_data, 'saswp_review_schema_locality', 'saswp_string') !=''){
|
1380 |
-
|
1381 |
-
$input1['itemReviewed']['address']['@type'] = 'PostalAddress';
|
1382 |
-
$input1['itemReviewed']['address']['streetAddress'] = saswp_remove_warnings($schema_data, 'saswp_review_schema_street_address', 'saswp_string');
|
1383 |
-
$input1['itemReviewed']['address']['addressLocality'] = saswp_remove_warnings($schema_data, 'saswp_review_schema_locality', 'saswp_string');
|
1384 |
-
$input1['itemReviewed']['address']['addressRegion'] = saswp_remove_warnings($schema_data, 'saswp_review_schema_region', 'saswp_string');
|
1385 |
-
$input1['itemReviewed']['address']['postalCode'] = saswp_remove_warnings($schema_data, 'saswp_review_schema_postal_code', 'saswp_string');
|
1386 |
-
$input1['itemReviewed']['address']['addressCountry'] = saswp_remove_warnings($schema_data, 'saswp_review_schema_country', 'saswp_string');
|
1387 |
-
|
1388 |
-
}
|
1389 |
|
1390 |
-
|
1391 |
|
1392 |
|
1393 |
switch ($schema_data['saswp_review_schema_item_type']) {
|
@@ -1417,66 +1194,26 @@ function saswp_schema_output() {
|
|
1417 |
$input1['itemReviewed']['author']['name'] = esc_attr($review_author);
|
1418 |
$input1['itemReviewed']['author']['sameAs'] = esc_url($schema_data['saswp_review_schema_author_sameas']);
|
1419 |
|
1420 |
-
}
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
break;
|
1427 |
-
case '
|
1428 |
-
break;
|
1429 |
-
case 'ExercisePlan':
|
1430 |
-
break;
|
1431 |
-
case 'Game':
|
1432 |
-
break;
|
1433 |
-
case 'Movie':
|
1434 |
-
|
1435 |
-
if($review_author){
|
1436 |
-
|
1437 |
-
$input1['author']['sameAs'] = trailingslashit(get_permalink());
|
1438 |
-
|
1439 |
-
}
|
1440 |
-
|
1441 |
-
break;
|
1442 |
-
case 'MusicPlaylist':
|
1443 |
-
break;
|
1444 |
-
case 'MusicRecording':
|
1445 |
-
break;
|
1446 |
-
case 'Photograph':
|
1447 |
-
break;
|
1448 |
-
case 'Recipe':
|
1449 |
-
break;
|
1450 |
-
case 'Restaurant':
|
1451 |
-
break;
|
1452 |
-
case 'Series':
|
1453 |
-
break;
|
1454 |
-
case 'SoftwareApplication':
|
1455 |
-
break;
|
1456 |
-
case 'VisualArtwork':
|
1457 |
-
break;
|
1458 |
-
case 'WebPage':
|
1459 |
-
|
1460 |
$markup = $service->saswp_schema_markup_generator($schema_data['saswp_review_schema_item_type']);
|
1461 |
-
$input1['itemReviewed'] = $markup;
|
1462 |
-
|
1463 |
break;
|
1464 |
case 'WebSite':
|
1465 |
break;
|
1466 |
-
|
1467 |
-
|
1468 |
default:
|
1469 |
$input1 = $input1;
|
1470 |
break;
|
1471 |
}
|
1472 |
|
1473 |
-
if(
|
1474 |
-
|
1475 |
-
$input1['reviewRating'] = array(
|
1476 |
-
"@type" => "Rating",
|
1477 |
-
"ratingValue" => saswp_remove_warnings($schema_data, 'saswp_review_schema_rating', 'saswp_string'),
|
1478 |
-
"bestRating" => saswp_remove_warnings($schema_data, 'saswp_review_schema_review_count', 'saswp_string'),
|
1479 |
-
);
|
1480 |
}
|
1481 |
|
1482 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
@@ -1484,9 +1221,7 @@ function saswp_schema_output() {
|
|
1484 |
$service = new saswp_output_service();
|
1485 |
$input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
|
1486 |
|
1487 |
-
}
|
1488 |
-
|
1489 |
-
|
1490 |
}
|
1491 |
|
1492 |
}
|
@@ -1511,8 +1246,8 @@ function saswp_schema_output() {
|
|
1511 |
$input1 = array(
|
1512 |
'@context' => saswp_context_url(),
|
1513 |
'@type' => 'VideoObject',
|
1514 |
-
'@id' => trailingslashit(
|
1515 |
-
'url' => trailingslashit(
|
1516 |
'headline' => saswp_get_the_title(),
|
1517 |
'datePublished' => esc_html($date),
|
1518 |
'dateModified' => esc_html($modified_date),
|
@@ -1522,7 +1257,7 @@ function saswp_schema_output() {
|
|
1522 |
'thumbnailUrl' => isset($image_details[0]) ? esc_url($image_details[0]):'',
|
1523 |
'mainEntity' => array(
|
1524 |
'@type' => 'WebPage',
|
1525 |
-
'@id' => trailingslashit(
|
1526 |
),
|
1527 |
'author' => saswp_get_author_details()
|
1528 |
);
|
@@ -1550,12 +1285,9 @@ function saswp_schema_output() {
|
|
1550 |
|
1551 |
if( 'local_business' === $schema_type){
|
1552 |
|
1553 |
-
$business_type =
|
1554 |
-
$business_name =
|
1555 |
-
|
1556 |
-
$dayoftheweek = get_post_meta($schema_post_id, 'saswp_dayofweek', true);
|
1557 |
-
$dayoftheweek = explode( "\r\n", $dayoftheweek);
|
1558 |
-
|
1559 |
if($business_name){
|
1560 |
|
1561 |
$local_business = $business_name;
|
@@ -1569,119 +1301,22 @@ function saswp_schema_output() {
|
|
1569 |
}
|
1570 |
|
1571 |
$input1 = array(
|
1572 |
-
|
1573 |
-
|
1574 |
-
|
1575 |
-
|
1576 |
-
'url' => trailingslashit(get_permalink()),
|
1577 |
-
'description' => saswp_remove_warnings($business_details, 'local_business_description', 'saswp_string'),
|
1578 |
-
'image' => array(
|
1579 |
-
'@type' => 'ImageObject',
|
1580 |
-
'url' => isset($business_details['local_business_logo']) ? esc_url($business_details['local_business_logo']['url']):'',
|
1581 |
-
'width' => isset($business_details['local_business_logo']) ? esc_attr($business_details['local_business_logo']['width']):'',
|
1582 |
-
'height' => isset($business_details['local_business_logo']) ? esc_attr($business_details['local_business_logo']['height']):'',
|
1583 |
-
),
|
1584 |
-
'address' => array(
|
1585 |
-
"@type" => "PostalAddress",
|
1586 |
-
"streetAddress" => saswp_remove_warnings($business_details, 'local_street_address', 'saswp_string'),
|
1587 |
-
"addressLocality" => saswp_remove_warnings($business_details, 'local_city', 'saswp_string'),
|
1588 |
-
"addressRegion" => saswp_remove_warnings($business_details, 'local_state', 'saswp_string'),
|
1589 |
-
"postalCode" => saswp_remove_warnings($business_details, 'local_postal_code', 'saswp_string'),
|
1590 |
-
),
|
1591 |
-
'telephone' => saswp_remove_warnings($business_details, 'local_phone', 'saswp_string'),
|
1592 |
-
'openingHours' => $dayoftheweek,
|
1593 |
-
|
1594 |
);
|
1595 |
-
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] == 1){
|
1596 |
-
|
1597 |
$service = new saswp_output_service();
|
1598 |
-
$input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
|
1599 |
-
|
1600 |
-
}
|
1601 |
-
|
1602 |
-
|
1603 |
-
if(isset($business_details['local_enable_rating'])
|
1604 |
-
&& saswp_remove_warnings($business_details, 'local_rating', 'saswp_string') !=''
|
1605 |
-
&& saswp_remove_warnings($business_details, 'local_review_count', 'saswp_string') !=''
|
1606 |
-
){
|
1607 |
-
|
1608 |
-
|
1609 |
-
$input1['aggregateRating'] = array(
|
1610 |
-
"@type" => "AggregateRating",
|
1611 |
-
"ratingValue" => saswp_remove_warnings($business_details, 'local_rating', 'saswp_string'),
|
1612 |
-
"reviewCount" => saswp_remove_warnings($business_details, 'local_review_count', 'saswp_string')
|
1613 |
-
);
|
1614 |
-
}
|
1615 |
-
|
1616 |
-
|
1617 |
if(!empty($aggregateRating)){
|
1618 |
$input1['aggregateRating'] = $aggregateRating;
|
1619 |
}
|
1620 |
if(!empty($extra_theme_review)){
|
1621 |
$input1 = array_merge($input1, $extra_theme_review);
|
1622 |
}
|
1623 |
-
|
1624 |
-
$input1['priceRange'] = esc_attr($business_details['local_price_range']);
|
1625 |
-
}
|
1626 |
-
|
1627 |
-
if(isset($business_details['local_accepts_reservations'])){
|
1628 |
-
$input1['acceptsReservations'] = esc_attr($business_details['local_accepts_reservations']);
|
1629 |
-
}
|
1630 |
-
|
1631 |
-
if(isset($business_details['local_serves_cuisine'])){
|
1632 |
-
$input1['servesCuisine'] = esc_attr($business_details['local_serves_cuisine']);
|
1633 |
-
}
|
1634 |
-
|
1635 |
-
if(isset($business_details['local_menu'])){
|
1636 |
-
$input1['hasMenu'] = esc_url($business_details['local_menu']);
|
1637 |
-
}
|
1638 |
-
if(isset($business_details['local_hasmap'])){
|
1639 |
-
$input1['hasMap'] = esc_url($business_details['local_hasmap']);
|
1640 |
-
}
|
1641 |
-
|
1642 |
-
//social fields starts here
|
1643 |
-
|
1644 |
-
$local_social = array();
|
1645 |
-
|
1646 |
-
if(isset($business_details['local_facebook']) && $business_details['local_facebook'] !=''){
|
1647 |
-
$local_social[] = esc_url($business_details['local_facebook']);
|
1648 |
-
}
|
1649 |
-
if(isset($business_details['local_twitter']) && $business_details['local_twitter'] !=''){
|
1650 |
-
$local_social[] = esc_url($business_details['local_twitter']);
|
1651 |
-
}
|
1652 |
-
if(isset($business_details['local_instagram']) && $business_details['local_instagram'] !=''){
|
1653 |
-
$local_social[] = esc_url($business_details['local_instagram']);
|
1654 |
-
}
|
1655 |
-
if(isset($business_details['local_pinterest']) && $business_details['local_pinterest'] !=''){
|
1656 |
-
$local_social[] = esc_url($business_details['local_pinterest']);
|
1657 |
-
}
|
1658 |
-
if(isset($business_details['local_linkedin']) && $business_details['local_linkedin'] !=''){
|
1659 |
-
$local_social[] = esc_url($business_details['local_linkedin']);
|
1660 |
-
}
|
1661 |
-
if(isset($business_details['local_soundcloud']) && $business_details['local_soundcloud'] !=''){
|
1662 |
-
$local_social[] = esc_url($business_details['local_soundcloud']);
|
1663 |
-
}
|
1664 |
-
if(isset($business_details['local_tumblr']) && $business_details['local_tumblr'] !=''){
|
1665 |
-
$local_social[] = esc_url($business_details['local_tumblr']);
|
1666 |
-
}
|
1667 |
-
if(isset($business_details['local_youtube']) && $business_details['local_youtube'] !=''){
|
1668 |
-
$local_social[] = esc_url($business_details['local_youtube']);
|
1669 |
-
}
|
1670 |
-
|
1671 |
-
if(!empty($local_social)){
|
1672 |
-
$input1['sameAs'] = $local_social;
|
1673 |
-
}
|
1674 |
-
//social fields ends here
|
1675 |
-
|
1676 |
-
|
1677 |
-
if(isset($business_details['local_latitude']) && isset($business_details['local_longitude'])){
|
1678 |
-
|
1679 |
-
$input1['geo']['@type'] = 'GeoCoordinates';
|
1680 |
-
$input1['geo']['latitude'] = $business_details['local_latitude'];
|
1681 |
-
$input1['geo']['longitude'] = $business_details['local_longitude'];
|
1682 |
-
}
|
1683 |
-
|
1684 |
-
|
1685 |
$input1 = apply_filters('saswp_modify_local_business_schema_output', $input1 );
|
1686 |
}
|
1687 |
|
@@ -1795,24 +1430,22 @@ function saswp_schema_breadcrumb_output(){
|
|
1795 |
|
1796 |
if(is_single() || is_page() ||is_archive()){
|
1797 |
|
1798 |
-
|
1799 |
|
1800 |
-
|
1801 |
|
1802 |
-
$input
|
1803 |
-
|
1804 |
-
|
1805 |
-
|
1806 |
-
|
1807 |
-
);
|
1808 |
-
|
1809 |
return apply_filters('saswp_modify_breadcrumb_output', $input);
|
1810 |
|
1811 |
}
|
1812 |
|
1813 |
}
|
1814 |
|
1815 |
-
|
1816 |
}
|
1817 |
|
1818 |
/**
|
@@ -1827,21 +1460,19 @@ function saswp_kb_website_output(){
|
|
1827 |
|
1828 |
if(isset($sd_data['saswp_website_schema']) && $sd_data['saswp_website_schema'] == 1 || !isset($sd_data['saswp_website_schema'])){
|
1829 |
|
1830 |
-
$site_url =
|
1831 |
$site_name = get_bloginfo();
|
1832 |
|
1833 |
if($site_url && $site_name){
|
1834 |
|
1835 |
-
$input
|
1836 |
-
|
1837 |
-
|
1838 |
-
|
1839 |
-
|
1840 |
-
|
1841 |
-
|
1842 |
-
|
1843 |
-
);
|
1844 |
-
|
1845 |
if(isset($sd_data['saswp_search_box_schema']) && $sd_data['saswp_search_box_schema'] == 1 || !isset($sd_data['saswp_search_box_schema'])){
|
1846 |
|
1847 |
$input['potentialAction']['@type'] = 'SearchAction';
|
@@ -2076,9 +1707,9 @@ function saswp_about_page_output(){
|
|
2076 |
"@type" => "AboutPage",
|
2077 |
"mainEntityOfPage" => array(
|
2078 |
"@type" => "WebPage",
|
2079 |
-
"@id" => trailingslashit(
|
2080 |
),
|
2081 |
-
"url" => trailingslashit(
|
2082 |
"headline" => saswp_get_the_title(),
|
2083 |
'description' => saswp_get_the_excerpt(),
|
2084 |
);
|
@@ -2121,9 +1752,9 @@ function saswp_contact_page_output(){
|
|
2121 |
"@type" => "ContactPage",
|
2122 |
"mainEntityOfPage" => array(
|
2123 |
"@type" => "WebPage",
|
2124 |
-
"@id" => trailingslashit(
|
2125 |
),
|
2126 |
-
"url" => trailingslashit(
|
2127 |
"headline" => saswp_get_the_title(),
|
2128 |
'description' => saswp_get_the_excerpt(),
|
2129 |
);
|
17 |
|
18 |
global $sd_data;
|
19 |
$input = array();
|
20 |
+
$site_url = get_home_url();
|
21 |
// Social profile
|
22 |
$sd_social_profile = array();
|
23 |
|
180 |
'telephone' => esc_attr($sd_data['sd-person-phone-number']),
|
181 |
);
|
182 |
}
|
183 |
+
|
|
|
184 |
return apply_filters('saswp_modify_organization_output', $input);
|
185 |
}
|
186 |
|
234 |
if(isset($sd_data['sd_name']) && $sd_data['sd_name'] !=''){
|
235 |
$site_name = $sd_data['sd_name'];
|
236 |
}
|
237 |
+
|
|
|
238 |
$image_id = get_post_thumbnail_id();
|
239 |
$image_details = wp_get_attachment_image_src($image_id, 'full');
|
240 |
$date = get_the_date("Y-m-d\TH:i:s\Z");
|
249 |
|
250 |
}
|
251 |
|
252 |
+
$saswp_review_details = get_post_meta(get_the_ID(), 'saswp_review_details', true);
|
253 |
|
254 |
$aggregateRating = array();
|
255 |
$saswp_over_all_rating = '';
|
296 |
|
297 |
$input1['@context'] = saswp_context_url();
|
298 |
$input1['@type'] = 'VideoGame';
|
299 |
+
$input1['@id'] = trailingslashit(saswp_get_permalink()).'#VideoGame';
|
300 |
$input1['author']['@type'] = 'Organization';
|
301 |
$input1['offers']['@type'] = 'Offer';
|
302 |
|
311 |
|
312 |
$input1['@context'] = saswp_context_url();
|
313 |
$input1['@type'] = 'MedicalCondition';
|
314 |
+
$input1['@id'] = trailingslashit(saswp_get_permalink()).'#MedicalCondition';
|
315 |
$input1['associatedAnatomy']['@type'] = 'AnatomicalStructure';
|
316 |
$input1['code']['@type'] = 'MedicalCode';
|
317 |
|
326 |
|
327 |
$input1['@context'] = saswp_context_url();
|
328 |
$input1['@type'] = 'TVSeries';
|
329 |
+
$input1['@id'] = trailingslashit(saswp_get_permalink()).'#TVSeries';
|
330 |
$input1['author']['@type'] = 'Person';
|
331 |
|
332 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
340 |
|
341 |
$input1['@context'] = saswp_context_url();
|
342 |
$input1['@type'] = 'HowTo';
|
343 |
+
$input1['@id'] = trailingslashit(saswp_get_permalink()).'#HowTo';
|
344 |
$input1['estimatedCost']['@type'] = 'MonetaryAmount';
|
345 |
|
346 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
354 |
|
355 |
$input1['@context'] = saswp_context_url();
|
356 |
$input1['@type'] = 'Trip';
|
357 |
+
$input1['@id'] = trailingslashit(saswp_get_permalink()).'#Trip';
|
358 |
|
359 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
360 |
$service = new saswp_output_service();
|
367 |
|
368 |
$input1['@context'] = saswp_context_url();
|
369 |
$input1['@type'] = 'SingleFamilyResidence';
|
370 |
+
$input1['@id'] = trailingslashit(saswp_get_permalink()).'#SingleFamilyResidence';
|
371 |
$input1['address']['@type'] = 'PostalAddress';
|
372 |
|
373 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
381 |
|
382 |
$input1['@context'] = saswp_context_url();
|
383 |
$input1['@type'] = 'House';
|
384 |
+
$input1['@id'] = trailingslashit(saswp_get_permalink()).'#House';
|
385 |
$input1['address']['@type'] = 'PostalAddress';
|
386 |
|
387 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
395 |
|
396 |
$input1['@context'] = saswp_context_url();
|
397 |
$input1['@type'] = 'Apartment';
|
398 |
+
$input1['@id'] = trailingslashit(saswp_get_permalink()).'#Apartment';
|
399 |
$input1['address']['@type'] = 'PostalAddress';
|
400 |
|
401 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
409 |
|
410 |
$input1['@context'] = saswp_context_url();
|
411 |
$input1['@type'] = 'TouristDestination';
|
412 |
+
$input1['@id'] = trailingslashit(saswp_get_permalink()).'#TouristDestination';
|
413 |
$input1['address']['@type'] = 'PostalAddress';
|
414 |
|
415 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
423 |
|
424 |
$input1['@context'] = saswp_context_url();
|
425 |
$input1['@type'] = 'TouristAttraction';
|
426 |
+
$input1['@id'] = trailingslashit(saswp_get_permalink()).'#TouristAttraction';
|
427 |
$input1['address']['@type'] = 'PostalAddress';
|
428 |
|
429 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
437 |
|
438 |
$input1['@context'] = saswp_context_url();
|
439 |
$input1['@type'] = 'LandmarksOrHistoricalBuildings';
|
440 |
+
$input1['@id'] = trailingslashit(saswp_get_permalink()).'#LandmarksOrHistoricalBuildings';
|
441 |
$input1['address']['@type'] = 'PostalAddress';
|
442 |
|
443 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
451 |
|
452 |
$input1['@context'] = saswp_context_url();
|
453 |
$input1['@type'] = 'HinduTemple';
|
454 |
+
$input1['@id'] = trailingslashit(saswp_get_permalink()).'#HinduTemple';
|
455 |
$input1['address']['@type'] = 'PostalAddress';
|
456 |
|
457 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
465 |
|
466 |
$input1['@context'] = saswp_context_url();
|
467 |
$input1['@type'] = 'Church';
|
468 |
+
$input1['@id'] = trailingslashit(saswp_get_permalink()).'#Church';
|
469 |
$input1['address']['@type'] = 'PostalAddress';
|
470 |
|
471 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
479 |
|
480 |
$input1['@context'] = saswp_context_url();
|
481 |
$input1['@type'] = 'Mosque';
|
482 |
+
$input1['@id'] = trailingslashit(saswp_get_permalink()).'#Mosque';
|
483 |
$input1['address']['@type'] = 'PostalAddress';
|
484 |
|
485 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
493 |
|
494 |
$input1['@context'] = saswp_context_url();
|
495 |
$input1['@type'] = 'JobPosting';
|
496 |
+
$input1['@id'] = trailingslashit(saswp_get_permalink()).'#JobPosting';
|
497 |
$input1['hiringOrganization']['@type'] = 'Organization';
|
498 |
$input1['jobLocation']['@type'] = 'Place';
|
499 |
$input1['jobLocation']['address']['@type'] = 'PostalAddress';
|
511 |
|
512 |
$input1['@context'] = saswp_context_url();
|
513 |
$input1['@type'] = 'Person';
|
514 |
+
$input1['@id'] = trailingslashit(saswp_get_permalink()).'#Person';
|
515 |
$input1['address']['@type'] = 'PostalAddress';
|
516 |
|
517 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
532 |
$input1 = array(
|
533 |
'@context' => saswp_context_url(),
|
534 |
'@type' => $schema_type ,
|
535 |
+
'@id' => trailingslashit(saswp_get_permalink()).'#course',
|
536 |
'name' => saswp_get_the_title(),
|
537 |
'description' => $description,
|
538 |
+
'url' => trailingslashit(saswp_get_permalink()),
|
539 |
'datePublished' => esc_html($date),
|
540 |
'dateModified' => esc_html($modified_date),
|
541 |
'provider' => array(
|
590 |
$input1 = array(
|
591 |
'@context' => saswp_context_url(),
|
592 |
'@type' => 'DiscussionForumPosting' ,
|
593 |
+
'@id' => trailingslashit(saswp_get_permalink()).'#blogposting',
|
594 |
+
'url' => trailingslashit(saswp_get_permalink()),
|
595 |
+
'mainEntityOfPage' => saswp_get_permalink(),
|
596 |
'headline' => saswp_get_the_title(),
|
597 |
'description' => saswp_get_the_excerpt(),
|
598 |
'datePublished' => esc_html($date),
|
629 |
$input1 = array(
|
630 |
'@context' => saswp_context_url(),
|
631 |
'@type' => 'BlogPosting' ,
|
632 |
+
'@id' => trailingslashit(saswp_get_permalink()).'#blogposting',
|
633 |
+
'mainEntityOfPage' => trailingslashit(saswp_get_permalink()),
|
634 |
'headline' => saswp_get_the_title(),
|
635 |
'description' => saswp_get_the_excerpt(),
|
636 |
'articleBody' => saswp_get_the_content(),
|
637 |
'keywords' => saswp_get_the_tags(),
|
638 |
'name' => saswp_get_the_title(),
|
639 |
+
'url' => trailingslashit(saswp_get_permalink()),
|
640 |
'datePublished' => esc_html($date),
|
641 |
'dateModified' => esc_html($modified_date),
|
642 |
'author' => saswp_get_author_details()
|
666 |
}
|
667 |
|
668 |
if( 'AudioObject' === $schema_type){
|
669 |
+
|
|
|
|
|
670 |
$input1 = array(
|
671 |
'@context' => saswp_context_url(),
|
672 |
'@type' => $schema_type ,
|
673 |
+
'@id' => trailingslashit(saswp_get_permalink()).'#audioobject',
|
|
|
|
|
|
|
|
|
|
|
674 |
'datePublished' => esc_html($date),
|
675 |
'dateModified' => esc_html($modified_date),
|
676 |
'author' => saswp_get_author_details()
|
699 |
}
|
700 |
|
701 |
if( 'Event' === $schema_type){
|
702 |
+
|
|
|
703 |
if(!saswp_non_amp() && is_plugin_active('the-events-calendar/the-events-calendar.php') && isset($sd_data['saswp-the-events-calendar']) && $sd_data['saswp-the-events-calendar'] == 1 ){
|
704 |
|
705 |
$input1 = Tribe__Events__JSON_LD__Event::instance()->get_data();
|
715 |
}else{
|
716 |
|
717 |
if ( isset($sd_data['saswp-the-events-calendar']) && $sd_data['saswp-the-events-calendar'] == 0 ) {
|
718 |
+
|
719 |
+
$input1['@context'] = saswp_context_url();
|
720 |
+
$input1['@type'] = $schema_type;
|
721 |
+
$input1['@id'] = trailingslashit(saswp_get_permalink()).'#event';
|
722 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
723 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
724 |
$service = new saswp_output_service();
|
725 |
$input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
|
743 |
}
|
744 |
|
745 |
if( 'SoftwareApplication' === $schema_type){
|
746 |
+
|
747 |
+
$input1 = array(
|
748 |
+
'@context' => saswp_context_url(),
|
749 |
+
'@type' => $schema_type ,
|
750 |
+
'@id' => trailingslashit(saswp_get_permalink()).'#softwareapplication',
|
751 |
+
'datePublished' => esc_html($date),
|
752 |
+
'dateModified' => esc_html($modified_date),
|
753 |
+
'author' => saswp_get_author_details()
|
754 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
755 |
|
756 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
757 |
if(!empty($publisher)){
|
758 |
|
759 |
$input1 = array_merge($input1, $publisher);
|
865 |
$input1 = array(
|
866 |
'@context' => saswp_context_url(),
|
867 |
'@type' => $schema_type ,
|
868 |
+
'@id' => trailingslashit(saswp_get_permalink()).'#recipe',
|
869 |
+
'url' => trailingslashit(saswp_get_permalink()),
|
870 |
'name' => saswp_get_the_title(),
|
871 |
'datePublished' => esc_html($date),
|
872 |
'dateModified' => esc_html($modified_date),
|
873 |
'description' => saswp_get_the_excerpt(),
|
874 |
'mainEntity' => array(
|
875 |
'@type' => 'WebPage',
|
876 |
+
'@id' => trailingslashit(saswp_get_permalink()),
|
877 |
'author' => saswp_get_author_details()
|
878 |
),
|
879 |
|
939 |
$input1 = array(
|
940 |
'@context' => saswp_context_url(),
|
941 |
'@type' => 'Product',
|
942 |
+
'@id' => trailingslashit(saswp_get_permalink()).'#product',
|
943 |
+
'url' => trailingslashit(saswp_get_permalink()),
|
944 |
'name' => saswp_remove_warnings($product_details, 'product_name', 'saswp_string'),
|
945 |
'sku' => saswp_remove_warnings($product_details, 'product_sku', 'saswp_string'),
|
946 |
'description' => saswp_remove_warnings($product_details, 'product_description', 'saswp_string'),
|
949 |
'availability' => saswp_remove_warnings($product_details, 'product_availability', 'saswp_string'),
|
950 |
'price' => saswp_remove_warnings($product_details, 'product_price', 'saswp_string'),
|
951 |
'priceCurrency' => saswp_remove_warnings($product_details, 'product_currency', 'saswp_string'),
|
952 |
+
'url' => trailingslashit(saswp_get_permalink()),
|
953 |
'priceValidUntil' => saswp_remove_warnings($product_details, 'product_priceValidUntil', 'saswp_string'),
|
954 |
),
|
955 |
|
1011 |
|
1012 |
$input1['@context'] = saswp_context_url();
|
1013 |
$input1['@type'] = 'Product';
|
1014 |
+
$input1['@id'] = trailingslashit(saswp_get_permalink()).'#Product';
|
1015 |
|
1016 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
1017 |
$service = new saswp_output_service();
|
1037 |
$input1 = array(
|
1038 |
'@context' => saswp_context_url(),
|
1039 |
'@type' => $schema_type ,
|
1040 |
+
'@id' => trailingslashit(saswp_get_permalink()).'#newsarticle',
|
1041 |
+
'url' => trailingslashit(saswp_get_permalink()),
|
1042 |
'headline' => saswp_get_the_title(),
|
1043 |
'mainEntityOfPage' => get_the_permalink(),
|
1044 |
'datePublished' => esc_html($date),
|
1053 |
'timeRequired' => saswp_remove_warnings($word_count, 'timerequired', 'saswp_string'),
|
1054 |
'mainEntity' => array(
|
1055 |
'@type' => 'WebPage',
|
1056 |
+
'@id' => trailingslashit(saswp_get_permalink()),
|
1057 |
),
|
1058 |
'author' => saswp_get_author_details()
|
1059 |
);
|
1081 |
}
|
1082 |
|
1083 |
if( 'Service' === $schema_type ){
|
1084 |
+
|
1085 |
+
$input1['@context'] = saswp_context_url();
|
1086 |
+
$input1['@type'] = $schema_type;
|
1087 |
+
$input1['@id'] = trailingslashit(saswp_get_permalink()).'#service';
|
|
|
1088 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1089 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] == 1){
|
1090 |
|
1091 |
$service = new saswp_output_service();
|
1092 |
$input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
|
1093 |
|
1094 |
}
|
1095 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1096 |
if(!empty($aggregateRating)){
|
1097 |
$input1['aggregateRating'] = $aggregateRating;
|
1098 |
}
|
1113 |
$input1 = array(
|
1114 |
'@context' => saswp_context_url(),
|
1115 |
'@type' => 'Review',
|
1116 |
+
'@id' => trailingslashit(saswp_get_permalink()).'#review',
|
1117 |
'dateCreated' => esc_html($date),
|
1118 |
'datePublished' => esc_html($date),
|
1119 |
'dateModified' => esc_html($modified_date),
|
1120 |
'headline' => saswp_get_the_title(),
|
1121 |
'name' => saswp_get_the_title(),
|
1122 |
'keywords' => tie_get_plain_terms( get_the_ID(), 'post_tag' ),
|
1123 |
+
'url' => trailingslashit(saswp_get_permalink()),
|
1124 |
'description' => saswp_get_the_excerpt(),
|
1125 |
'articleBody' => saswp_get_the_content(),
|
1126 |
'copyrightYear' => get_the_time( 'Y' ),
|
1154 |
$schema_data = saswp_get_schema_data($schema_post_id, 'saswp_review_schema_details');
|
1155 |
|
1156 |
if(isset($schema_data['saswp_review_schema_item_type'])){
|
1157 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1158 |
$input1['@context'] = saswp_context_url();
|
1159 |
$input1['@type'] = esc_attr($schema_type);
|
1160 |
+
$input1['url'] = trailingslashit(saswp_get_permalink());
|
1161 |
$input1['datePublished'] = esc_html($date);
|
1162 |
$input1['dateModified'] = esc_html($modified_date);
|
1163 |
+
$input1['reviewBody'] = saswp_get_the_excerpt();
|
1164 |
+
$input1['description'] = saswp_get_the_excerpt();
|
1165 |
+
$input1['itemReviewed']['@type'] = esc_attr($schema_data['saswp_review_schema_item_type']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1166 |
|
1167 |
+
$service = new saswp_output_service();
|
1168 |
|
1169 |
|
1170 |
switch ($schema_data['saswp_review_schema_item_type']) {
|
1194 |
$input1['itemReviewed']['author']['name'] = esc_attr($review_author);
|
1195 |
$input1['itemReviewed']['author']['sameAs'] = esc_url($schema_data['saswp_review_schema_author_sameas']);
|
1196 |
|
1197 |
+
}
|
1198 |
+
break;
|
1199 |
+
case 'Movie':
|
1200 |
+
if($review_author){
|
1201 |
+
$input1['author']['sameAs'] = trailingslashit(saswp_get_permalink());
|
1202 |
+
}
|
1203 |
+
break;
|
1204 |
+
case 'WebPage':
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1205 |
$markup = $service->saswp_schema_markup_generator($schema_data['saswp_review_schema_item_type']);
|
1206 |
+
$input1['itemReviewed'] = $markup;
|
|
|
1207 |
break;
|
1208 |
case 'WebSite':
|
1209 |
break;
|
|
|
|
|
1210 |
default:
|
1211 |
$input1 = $input1;
|
1212 |
break;
|
1213 |
}
|
1214 |
|
1215 |
+
if(!empty($publisher)){
|
1216 |
+
$input1 = array_merge($input1, $publisher);
|
|
|
|
|
|
|
|
|
|
|
1217 |
}
|
1218 |
|
1219 |
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
|
1221 |
$service = new saswp_output_service();
|
1222 |
$input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
|
1223 |
|
1224 |
+
}
|
|
|
|
|
1225 |
}
|
1226 |
|
1227 |
}
|
1246 |
$input1 = array(
|
1247 |
'@context' => saswp_context_url(),
|
1248 |
'@type' => 'VideoObject',
|
1249 |
+
'@id' => trailingslashit(saswp_get_permalink()).'#videoobject',
|
1250 |
+
'url' => trailingslashit(saswp_get_permalink()),
|
1251 |
'headline' => saswp_get_the_title(),
|
1252 |
'datePublished' => esc_html($date),
|
1253 |
'dateModified' => esc_html($modified_date),
|
1257 |
'thumbnailUrl' => isset($image_details[0]) ? esc_url($image_details[0]):'',
|
1258 |
'mainEntity' => array(
|
1259 |
'@type' => 'WebPage',
|
1260 |
+
'@id' => trailingslashit(saswp_get_permalink()),
|
1261 |
),
|
1262 |
'author' => saswp_get_author_details()
|
1263 |
);
|
1285 |
|
1286 |
if( 'local_business' === $schema_type){
|
1287 |
|
1288 |
+
$business_type = get_post_meta($schema_post_id, 'saswp_business_type', true);
|
1289 |
+
$business_name = get_post_meta($schema_post_id, 'saswp_business_name', true);
|
1290 |
+
|
|
|
|
|
|
|
1291 |
if($business_name){
|
1292 |
|
1293 |
$local_business = $business_name;
|
1301 |
}
|
1302 |
|
1303 |
$input1 = array(
|
1304 |
+
'@context' => saswp_context_url(),
|
1305 |
+
'@type' => esc_attr($local_business),
|
1306 |
+
'@id' => trailingslashit(saswp_get_permalink()).'#'. strtolower(esc_attr($local_business)),
|
1307 |
+
'url' => trailingslashit(saswp_get_permalink()),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1308 |
);
|
1309 |
+
if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] == 1){
|
|
|
1310 |
$service = new saswp_output_service();
|
1311 |
+
$input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
|
1312 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1313 |
if(!empty($aggregateRating)){
|
1314 |
$input1['aggregateRating'] = $aggregateRating;
|
1315 |
}
|
1316 |
if(!empty($extra_theme_review)){
|
1317 |
$input1 = array_merge($input1, $extra_theme_review);
|
1318 |
}
|
1319 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1320 |
$input1 = apply_filters('saswp_modify_local_business_schema_output', $input1 );
|
1321 |
}
|
1322 |
|
1430 |
|
1431 |
if(is_single() || is_page() ||is_archive()){
|
1432 |
|
1433 |
+
$bread_crumb_list = saswp_list_items_generator();
|
1434 |
|
1435 |
+
if(!empty($bread_crumb_list)){
|
1436 |
|
1437 |
+
$input['@context'] = saswp_context_url();
|
1438 |
+
$input['@type'] = 'BreadcrumbList';
|
1439 |
+
$input['@id'] = trailingslashit(saswp_get_permalink()).'#breadcrumb';
|
1440 |
+
$input['itemListElement'] = $bread_crumb_list;
|
1441 |
+
|
|
|
|
|
1442 |
return apply_filters('saswp_modify_breadcrumb_output', $input);
|
1443 |
|
1444 |
}
|
1445 |
|
1446 |
}
|
1447 |
|
1448 |
+
}
|
1449 |
}
|
1450 |
|
1451 |
/**
|
1460 |
|
1461 |
if(isset($sd_data['saswp_website_schema']) && $sd_data['saswp_website_schema'] == 1 || !isset($sd_data['saswp_website_schema'])){
|
1462 |
|
1463 |
+
$site_url = get_home_url();
|
1464 |
$site_name = get_bloginfo();
|
1465 |
|
1466 |
if($site_url && $site_name){
|
1467 |
|
1468 |
+
$input['@context'] = saswp_context_url();
|
1469 |
+
$input['@type'] = 'WebSite';
|
1470 |
+
$input['@id'] = $site_url.'#website';
|
1471 |
+
$input['headline'] = $site_name;
|
1472 |
+
$input['name'] = $site_name;
|
1473 |
+
$input['description'] = get_bloginfo('description');
|
1474 |
+
$input['url'] = $site_url;
|
1475 |
+
|
|
|
|
|
1476 |
if(isset($sd_data['saswp_search_box_schema']) && $sd_data['saswp_search_box_schema'] == 1 || !isset($sd_data['saswp_search_box_schema'])){
|
1477 |
|
1478 |
$input['potentialAction']['@type'] = 'SearchAction';
|
1707 |
"@type" => "AboutPage",
|
1708 |
"mainEntityOfPage" => array(
|
1709 |
"@type" => "WebPage",
|
1710 |
+
"@id" => trailingslashit(saswp_get_permalink()),
|
1711 |
),
|
1712 |
+
"url" => trailingslashit(saswp_get_permalink()),
|
1713 |
"headline" => saswp_get_the_title(),
|
1714 |
'description' => saswp_get_the_excerpt(),
|
1715 |
);
|
1752 |
"@type" => "ContactPage",
|
1753 |
"mainEntityOfPage" => array(
|
1754 |
"@type" => "WebPage",
|
1755 |
+
"@id" => trailingslashit(saswp_get_permalink()),
|
1756 |
),
|
1757 |
+
"url" => trailingslashit(saswp_get_permalink()),
|
1758 |
"headline" => saswp_get_the_title(),
|
1759 |
'description' => saswp_get_the_excerpt(),
|
1760 |
);
|
output/review-output.php
CHANGED
@@ -49,7 +49,7 @@ Class saswp_review_output{
|
|
49 |
|
50 |
if(saswp_global_option() && isset($sd_data['saswp-review-module']) && $sd_data['saswp-review-module'] == 1){
|
51 |
|
52 |
-
$saswp_review_details =
|
53 |
|
54 |
if(isset($saswp_review_details['saswp-review-item-enable'])){
|
55 |
|
@@ -142,7 +142,7 @@ Class saswp_review_output{
|
|
142 |
public function saswp_get_review_box_content(){
|
143 |
|
144 |
$saswp_review_details = array();
|
145 |
-
$saswp_review_details =
|
146 |
$saswp_review_item_feature = array();
|
147 |
$saswp_review_item_star_rating = array();
|
148 |
$saswp_review_title = '';
|
@@ -302,7 +302,7 @@ Class saswp_review_output{
|
|
302 |
public function saswp_display_review_box($content){
|
303 |
|
304 |
global $sd_data;
|
305 |
-
$saswp_review_details =
|
306 |
$saswp_review_item_enable = 0;
|
307 |
|
308 |
if(isset($saswp_review_details['saswp-review-item-enable'])){
|
49 |
|
50 |
if(saswp_global_option() && isset($sd_data['saswp-review-module']) && $sd_data['saswp-review-module'] == 1){
|
51 |
|
52 |
+
$saswp_review_details = get_post_meta(get_the_ID(), 'saswp_review_details', true);
|
53 |
|
54 |
if(isset($saswp_review_details['saswp-review-item-enable'])){
|
55 |
|
142 |
public function saswp_get_review_box_content(){
|
143 |
|
144 |
$saswp_review_details = array();
|
145 |
+
$saswp_review_details = get_post_meta(get_the_ID(), 'saswp_review_details', true);
|
146 |
$saswp_review_item_feature = array();
|
147 |
$saswp_review_item_star_rating = array();
|
148 |
$saswp_review_title = '';
|
302 |
public function saswp_display_review_box($content){
|
303 |
|
304 |
global $sd_data;
|
305 |
+
$saswp_review_details = get_post_meta(get_the_ID(), 'saswp_review_details', true);
|
306 |
$saswp_review_item_enable = 0;
|
307 |
|
308 |
if(isset($saswp_review_details['saswp-review-item-enable'])){
|
output/service.php
CHANGED
@@ -157,7 +157,7 @@ Class saswp_output_service{
|
|
157 |
$response = saswp_get_the_excerpt();
|
158 |
break;
|
159 |
case 'post_permalink':
|
160 |
-
$response =
|
161 |
break;
|
162 |
case 'author_name':
|
163 |
$response = get_the_author_meta('first_name').' '.get_the_author_meta('last_name');
|
@@ -256,7 +256,7 @@ Class saswp_output_service{
|
|
256 |
|
257 |
global $post;
|
258 |
|
259 |
-
$custom_fields =
|
260 |
|
261 |
if(!empty($custom_fields)){
|
262 |
|
@@ -527,6 +527,9 @@ Class saswp_output_service{
|
|
527 |
if(isset($custom_fields['saswp_newsarticle_headline'])){
|
528 |
$input1['headline'] = $custom_fields['saswp_newsarticle_headline'];
|
529 |
}
|
|
|
|
|
|
|
530 |
if(isset($custom_fields['saswp_newsarticle_date_published'])){
|
531 |
$input1['datePublished'] = $custom_fields['saswp_newsarticle_date_published'];
|
532 |
}
|
@@ -876,7 +879,16 @@ Class saswp_output_service{
|
|
876 |
}
|
877 |
if(isset($custom_fields['saswp_recipe_video_duration'])){
|
878 |
$input1['video']['duration'] = $custom_fields['saswp_recipe_video_duration'];
|
879 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
880 |
break;
|
881 |
|
882 |
case 'Product':
|
@@ -950,16 +962,16 @@ Class saswp_output_service{
|
|
950 |
|
951 |
case 'Service':
|
952 |
if(isset($custom_fields['saswp_service_schema_name'])){
|
953 |
-
|
954 |
}
|
955 |
if(isset($custom_fields['saswp_service_schema_type'])){
|
956 |
-
|
957 |
}
|
958 |
if(isset($custom_fields['saswp_service_schema_provider_name'])){
|
959 |
-
|
960 |
}
|
961 |
if(isset($custom_fields['saswp_service_schema_image'])){
|
962 |
-
|
963 |
}
|
964 |
if(isset($custom_fields['saswp_service_schema_locality'])){
|
965 |
$input1['provider']['address']['addressLocality'] = $custom_fields['saswp_service_schema_locality'];
|
@@ -971,16 +983,24 @@ Class saswp_output_service{
|
|
971 |
$input1['provider']['address']['telephone'] = $custom_fields['saswp_service_schema_telephone'];
|
972 |
}
|
973 |
if(isset($custom_fields['saswp_service_schema_price_range'])){
|
974 |
-
|
975 |
}
|
976 |
if(isset($custom_fields['saswp_service_schema_description'])){
|
977 |
-
|
978 |
}
|
979 |
if(isset($custom_fields['saswp_service_schema_area_served'])){
|
980 |
-
|
981 |
}
|
982 |
if(isset($custom_fields['saswp_service_schema_service_offer'])){
|
983 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
984 |
}
|
985 |
|
986 |
break;
|
@@ -1032,6 +1052,12 @@ Class saswp_output_service{
|
|
1032 |
$input1['author']['name'] = $custom_fields['saswp_review_author_name'];
|
1033 |
}
|
1034 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1035 |
break;
|
1036 |
|
1037 |
case 'VideoObject':
|
@@ -1963,7 +1989,7 @@ Class saswp_output_service{
|
|
1963 |
$post_review_title = '';
|
1964 |
$post_review_desc = '';
|
1965 |
|
1966 |
-
$post_meta =
|
1967 |
|
1968 |
if(isset($post_meta['_post_review_box_breakdowns_score'])){
|
1969 |
$rating_value = bcdiv($post_meta['_post_review_box_breakdowns_score'][0], 20, 2);
|
@@ -2168,9 +2194,7 @@ Class saswp_output_service{
|
|
2168 |
|
2169 |
case 'local_business':
|
2170 |
|
2171 |
-
$meta_field = array(
|
2172 |
-
'saswp_business_type' => 'Business Type',
|
2173 |
-
'saswp_business_name' => 'Sub Business Type',
|
2174 |
'local_business_name' => 'Business Name',
|
2175 |
'local_business_name_url' => 'URL',
|
2176 |
'local_business_description' => 'Description',
|
@@ -2231,6 +2255,7 @@ Class saswp_output_service{
|
|
2231 |
'saswp_newsarticle_date_modified' => 'Date Modified',
|
2232 |
'saswp_newsarticle_headline' => 'Headline',
|
2233 |
'saswp_newsarticle_description' => 'Description',
|
|
|
2234 |
'saswp_newsarticle_section' => 'Article Section',
|
2235 |
'saswp_newsarticle_body' => 'Article Body',
|
2236 |
'saswp_newsarticle_name' => 'Name',
|
@@ -2388,7 +2413,9 @@ Class saswp_output_service{
|
|
2388 |
'saswp_recipe_video_contenturl' => 'Video ContentUrl',
|
2389 |
'saswp_recipe_video_embedurl' => 'Video EmbedUrl',
|
2390 |
'saswp_recipe_video_upload_date' => 'Video Upload Date',
|
2391 |
-
'saswp_recipe_video_duration' => 'Video Duration',
|
|
|
|
|
2392 |
);
|
2393 |
|
2394 |
break;
|
@@ -2531,13 +2558,16 @@ Class saswp_output_service{
|
|
2531 |
'saswp_person_schema_member_of' => 'Member Of',
|
2532 |
'saswp_person_schema_nationality' => 'Nationality',
|
2533 |
'saswp_person_schema_image' => 'Image',
|
2534 |
-
'saswp_person_schema_job_title' => 'Job Title'
|
|
|
|
|
2535 |
);
|
2536 |
break;
|
2537 |
|
2538 |
case 'Service':
|
2539 |
|
2540 |
$meta_field = array(
|
|
|
2541 |
'saswp_service_schema_name' => 'Name',
|
2542 |
'saswp_service_schema_type' => 'Service Type',
|
2543 |
'saswp_service_schema_provider_name' => 'Provider Name',
|
@@ -2550,8 +2580,10 @@ Class saswp_output_service{
|
|
2550 |
'saswp_service_schema_description' => 'Description',
|
2551 |
'saswp_service_schema_area_served' => 'Area Served (City)',
|
2552 |
'saswp_service_schema_service_offer' => 'Service Offer',
|
2553 |
-
'
|
2554 |
-
'
|
|
|
|
|
2555 |
);
|
2556 |
|
2557 |
break;
|
@@ -2559,7 +2591,7 @@ Class saswp_output_service{
|
|
2559 |
case 'Review':
|
2560 |
$meta_field = array(
|
2561 |
|
2562 |
-
|
2563 |
'saswp_review_schema_name' => 'Name',
|
2564 |
'saswp_review_schema_description' => 'Description',
|
2565 |
'saswp_review_schema_date_published' => 'Date Published',
|
@@ -2572,7 +2604,9 @@ Class saswp_output_service{
|
|
2572 |
'saswp_review_schema_postal_code' => 'Postal Code',
|
2573 |
'saswp_review_schema_country' => 'Address Country',
|
2574 |
'saswp_review_schema_telephone' => 'Telephone',
|
2575 |
-
'saswp_review_author_name'
|
|
|
|
|
2576 |
);
|
2577 |
break;
|
2578 |
|
@@ -2587,6 +2621,7 @@ Class saswp_output_service{
|
|
2587 |
'saswp_video_object_description' => 'Description',
|
2588 |
'saswp_video_object_name' => 'Name',
|
2589 |
'saswp_video_object_upload_date' => 'Upload Date',
|
|
|
2590 |
'saswp_video_object_thumbnail_url' => 'Thumbnail Url',
|
2591 |
'saswp_video_object_content_url' => 'Content URL',
|
2592 |
'saswp_video_object_embed_url' => 'Embed Url',
|
@@ -2879,9 +2914,9 @@ Class saswp_output_service{
|
|
2879 |
$input1 = array(
|
2880 |
'@context' => saswp_context_url(),
|
2881 |
'@type' => 'TechArticle',
|
2882 |
-
'@id' => trailingslashit(
|
2883 |
-
'url' =>
|
2884 |
-
'mainEntityOfPage' =>
|
2885 |
'headline' => saswp_get_the_title(),
|
2886 |
'description' => saswp_get_the_excerpt(),
|
2887 |
'articleBody' => saswp_get_the_content(),
|
@@ -2908,9 +2943,9 @@ Class saswp_output_service{
|
|
2908 |
$input1 = array(
|
2909 |
'@context' => saswp_context_url(),
|
2910 |
'@type' => 'Article',
|
2911 |
-
'@id' => trailingslashit(
|
2912 |
-
'url' =>
|
2913 |
-
'mainEntityOfPage' =>
|
2914 |
'headline' => saswp_get_the_title(),
|
2915 |
'description' => saswp_get_the_excerpt(),
|
2916 |
'articleBody' => saswp_get_the_content(),
|
@@ -2942,13 +2977,13 @@ Class saswp_output_service{
|
|
2942 |
$input1 = array(
|
2943 |
'@context' => saswp_context_url(),
|
2944 |
'@type' => 'WebPage' ,
|
2945 |
-
'@id' => trailingslashit(
|
2946 |
'name' => saswp_get_the_title(),
|
2947 |
-
'url' =>
|
2948 |
'description' => saswp_get_the_excerpt(),
|
2949 |
'mainEntity' => array(
|
2950 |
'@type' => 'Article',
|
2951 |
-
'mainEntityOfPage' =>
|
2952 |
'image' => esc_url($image_details[0]),
|
2953 |
'headline' => saswp_get_the_title(),
|
2954 |
'description' => saswp_get_the_excerpt(),
|
@@ -3024,7 +3059,7 @@ Class saswp_output_service{
|
|
3024 |
|
3025 |
if($i == 0){
|
3026 |
|
3027 |
-
$input2['image'][$i]['@id'] =
|
3028 |
|
3029 |
}
|
3030 |
|
@@ -3057,7 +3092,7 @@ Class saswp_output_service{
|
|
3057 |
|
3058 |
if($i == 0){
|
3059 |
|
3060 |
-
$input2['image'][$i]['@id'] =
|
3061 |
|
3062 |
}
|
3063 |
|
@@ -3075,7 +3110,7 @@ Class saswp_output_service{
|
|
3075 |
if(empty($input2)){
|
3076 |
|
3077 |
$input2['image']['@type'] = 'ImageObject';
|
3078 |
-
$input2['image']['@id'] =
|
3079 |
$input2['image']['url'] = esc_url($image_details[0]);
|
3080 |
$input2['image']['width'] = esc_attr($image_details[1]);
|
3081 |
$input2['image']['height'] = esc_attr($image_details[2]);
|
@@ -3092,7 +3127,7 @@ Class saswp_output_service{
|
|
3092 |
if($content){
|
3093 |
|
3094 |
$regex = '/<img(.*?)src="(.*?)"(.*?)>/';
|
3095 |
-
preg_match_all( $regex, $content, $attachments );
|
3096 |
|
3097 |
$attach_images = array();
|
3098 |
|
@@ -3101,6 +3136,7 @@ Class saswp_output_service{
|
|
3101 |
$attach_details = saswp_get_attachment_details($attachments[2], $post->ID);
|
3102 |
|
3103 |
$k = 0;
|
|
|
3104 |
foreach ($attachments[2] as $attachment) {
|
3105 |
|
3106 |
if(!empty($attach_details)){
|
@@ -3117,14 +3153,34 @@ Class saswp_output_service{
|
|
3117 |
|
3118 |
}
|
3119 |
|
3120 |
-
if(!empty($attach_images)){
|
3121 |
|
3122 |
if(isset($input2['image'])){
|
3123 |
|
3124 |
-
$
|
3125 |
-
$input2['image'] = $
|
3126 |
-
|
3127 |
}else{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3128 |
$input2 = $attach_images;
|
3129 |
}
|
3130 |
|
@@ -3137,7 +3193,7 @@ Class saswp_output_service{
|
|
3137 |
if(isset($sd_data['sd_default_image']['url']) && $sd_data['sd_default_image']['url'] !=''){
|
3138 |
|
3139 |
$input2['image']['@type'] = 'ImageObject';
|
3140 |
-
$input2['image']['@id'] =
|
3141 |
$input2['image']['url'] = esc_url($sd_data['sd_default_image']['url']);
|
3142 |
$input2['image']['width'] = esc_attr($sd_data['sd_default_image_width']);
|
3143 |
$input2['image']['height'] = esc_attr($sd_data['sd_default_image_height']);
|
157 |
$response = saswp_get_the_excerpt();
|
158 |
break;
|
159 |
case 'post_permalink':
|
160 |
+
$response = saswp_get_permalink();
|
161 |
break;
|
162 |
case 'author_name':
|
163 |
$response = get_the_author_meta('first_name').' '.get_the_author_meta('last_name');
|
256 |
|
257 |
global $post;
|
258 |
|
259 |
+
$custom_fields = get_post_meta($schema_post_id, 'saswp_meta_list_val', true);
|
260 |
|
261 |
if(!empty($custom_fields)){
|
262 |
|
527 |
if(isset($custom_fields['saswp_newsarticle_headline'])){
|
528 |
$input1['headline'] = $custom_fields['saswp_newsarticle_headline'];
|
529 |
}
|
530 |
+
if(isset($custom_fields['saswp_newsarticle_keywords'])){
|
531 |
+
$input1['keywords'] = $custom_fields['saswp_newsarticle_keywords'];
|
532 |
+
}
|
533 |
if(isset($custom_fields['saswp_newsarticle_date_published'])){
|
534 |
$input1['datePublished'] = $custom_fields['saswp_newsarticle_date_published'];
|
535 |
}
|
879 |
}
|
880 |
if(isset($custom_fields['saswp_recipe_video_duration'])){
|
881 |
$input1['video']['duration'] = $custom_fields['saswp_recipe_video_duration'];
|
882 |
+
}
|
883 |
+
|
884 |
+
if(isset($custom_fields['saswp_recipe_rating_value']) && isset($custom_fields['saswp_recipe_rating_count'])){
|
885 |
+
$input1['aggregateRating']['@type'] = 'AggregateRating';
|
886 |
+
$input1['aggregateRating']['worstRating'] = 0;
|
887 |
+
$input1['aggregateRating']['bestRating'] = 5;
|
888 |
+
$input1['aggregateRating']['ratingValue'] = $custom_fields['saswp_recipe_rating_value'];
|
889 |
+
$input1['aggregateRating']['ratingCount'] = $custom_fields['saswp_recipe_rating_count'];
|
890 |
+
}
|
891 |
+
|
892 |
break;
|
893 |
|
894 |
case 'Product':
|
962 |
|
963 |
case 'Service':
|
964 |
if(isset($custom_fields['saswp_service_schema_name'])){
|
965 |
+
$input1['name'] = $custom_fields['saswp_service_schema_name'];
|
966 |
}
|
967 |
if(isset($custom_fields['saswp_service_schema_type'])){
|
968 |
+
$input1['serviceType'] = $custom_fields['saswp_service_schema_type'];
|
969 |
}
|
970 |
if(isset($custom_fields['saswp_service_schema_provider_name'])){
|
971 |
+
$input1['provider']['name'] = $custom_fields['saswp_service_schema_provider_name'];
|
972 |
}
|
973 |
if(isset($custom_fields['saswp_service_schema_image'])){
|
974 |
+
$input1['provider']['image'] = $custom_fields['saswp_service_schema_image'];
|
975 |
}
|
976 |
if(isset($custom_fields['saswp_service_schema_locality'])){
|
977 |
$input1['provider']['address']['addressLocality'] = $custom_fields['saswp_service_schema_locality'];
|
983 |
$input1['provider']['address']['telephone'] = $custom_fields['saswp_service_schema_telephone'];
|
984 |
}
|
985 |
if(isset($custom_fields['saswp_service_schema_price_range'])){
|
986 |
+
$input1['provider']['priceRange'] = $custom_fields['saswp_service_schema_price_range'];
|
987 |
}
|
988 |
if(isset($custom_fields['saswp_service_schema_description'])){
|
989 |
+
$input1['description'] = $custom_fields['saswp_service_schema_description'];
|
990 |
}
|
991 |
if(isset($custom_fields['saswp_service_schema_area_served'])){
|
992 |
+
$input1['areaServed'] = $custom_fields['saswp_service_schema_area_served'];
|
993 |
}
|
994 |
if(isset($custom_fields['saswp_service_schema_service_offer'])){
|
995 |
+
$input1['hasOfferCatalog'] = $custom_fields['saswp_service_schema_service_offer'];
|
996 |
+
}
|
997 |
+
|
998 |
+
if(isset($custom_fields['saswp_service_schema_rating_value']) && isset($custom_fields['saswp_service_schema_rating_count'])){
|
999 |
+
$input1['aggregateRating']['@type'] = 'AggregateRating';
|
1000 |
+
$input1['aggregateRating']['worstRating'] = 0;
|
1001 |
+
$input1['aggregateRating']['bestRating'] = 5;
|
1002 |
+
$input1['aggregateRating']['ratingValue'] = $custom_fields['saswp_service_schema_rating_value'];
|
1003 |
+
$input1['aggregateRating']['ratingCount'] = $custom_fields['saswp_service_schema_rating_count'];
|
1004 |
}
|
1005 |
|
1006 |
break;
|
1052 |
$input1['author']['name'] = $custom_fields['saswp_review_author_name'];
|
1053 |
}
|
1054 |
|
1055 |
+
if(isset($custom_fields['saswp_review_schema_rating_value']) && isset($custom_fields['saswp_review_schema_review_count'])){
|
1056 |
+
$input1['aggregateRating']['@type'] = 'Rating';
|
1057 |
+
$input1['aggregateRating']['ratingValue'] = $custom_fields['saswp_review_schema_rating_value'];
|
1058 |
+
$input1['aggregateRating']['bestRating'] = $custom_fields['saswp_review_schema_review_count'];
|
1059 |
+
}
|
1060 |
+
|
1061 |
break;
|
1062 |
|
1063 |
case 'VideoObject':
|
1989 |
$post_review_title = '';
|
1990 |
$post_review_desc = '';
|
1991 |
|
1992 |
+
$post_meta = get_post_meta($post_id, $key='', true);
|
1993 |
|
1994 |
if(isset($post_meta['_post_review_box_breakdowns_score'])){
|
1995 |
$rating_value = bcdiv($post_meta['_post_review_box_breakdowns_score'][0], 20, 2);
|
2194 |
|
2195 |
case 'local_business':
|
2196 |
|
2197 |
+
$meta_field = array(
|
|
|
|
|
2198 |
'local_business_name' => 'Business Name',
|
2199 |
'local_business_name_url' => 'URL',
|
2200 |
'local_business_description' => 'Description',
|
2255 |
'saswp_newsarticle_date_modified' => 'Date Modified',
|
2256 |
'saswp_newsarticle_headline' => 'Headline',
|
2257 |
'saswp_newsarticle_description' => 'Description',
|
2258 |
+
'saswp_newsarticle_keywords' => 'Tags',
|
2259 |
'saswp_newsarticle_section' => 'Article Section',
|
2260 |
'saswp_newsarticle_body' => 'Article Body',
|
2261 |
'saswp_newsarticle_name' => 'Name',
|
2413 |
'saswp_recipe_video_contenturl' => 'Video ContentUrl',
|
2414 |
'saswp_recipe_video_embedurl' => 'Video EmbedUrl',
|
2415 |
'saswp_recipe_video_upload_date' => 'Video Upload Date',
|
2416 |
+
'saswp_recipe_video_duration' => 'Video Duration',
|
2417 |
+
'saswp_recipe_rating_value' => 'Rating Value',
|
2418 |
+
'saswp_recipe_rating_count' => 'Rating Count',
|
2419 |
);
|
2420 |
|
2421 |
break;
|
2558 |
'saswp_person_schema_member_of' => 'Member Of',
|
2559 |
'saswp_person_schema_nationality' => 'Nationality',
|
2560 |
'saswp_person_schema_image' => 'Image',
|
2561 |
+
'saswp_person_schema_job_title' => 'Job Title',
|
2562 |
+
'saswp_person_schema_company' => 'Company',
|
2563 |
+
'saswp_person_schema_website' => 'Website'
|
2564 |
);
|
2565 |
break;
|
2566 |
|
2567 |
case 'Service':
|
2568 |
|
2569 |
$meta_field = array(
|
2570 |
+
'saswp_service_schema_url' => 'URL',
|
2571 |
'saswp_service_schema_name' => 'Name',
|
2572 |
'saswp_service_schema_type' => 'Service Type',
|
2573 |
'saswp_service_schema_provider_name' => 'Provider Name',
|
2580 |
'saswp_service_schema_description' => 'Description',
|
2581 |
'saswp_service_schema_area_served' => 'Area Served (City)',
|
2582 |
'saswp_service_schema_service_offer' => 'Service Offer',
|
2583 |
+
'saswp_service_schema_country' => 'Address Country',
|
2584 |
+
'saswp_service_schema_telephone' => 'Telephone',
|
2585 |
+
'saswp_service_schema_rating_value' => 'Rating Value',
|
2586 |
+
'saswp_service_schema_rating_count' => 'Rating Count',
|
2587 |
);
|
2588 |
|
2589 |
break;
|
2591 |
case 'Review':
|
2592 |
$meta_field = array(
|
2593 |
|
2594 |
+
// 'saswp_review_schema_item_type' => 'Item Reviewed Type',
|
2595 |
'saswp_review_schema_name' => 'Name',
|
2596 |
'saswp_review_schema_description' => 'Description',
|
2597 |
'saswp_review_schema_date_published' => 'Date Published',
|
2604 |
'saswp_review_schema_postal_code' => 'Postal Code',
|
2605 |
'saswp_review_schema_country' => 'Address Country',
|
2606 |
'saswp_review_schema_telephone' => 'Telephone',
|
2607 |
+
'saswp_review_author_name' => 'Author Name',
|
2608 |
+
'saswp_review_schema_rating_value' => 'Rating Value',
|
2609 |
+
'saswp_review_schema_review_count' => 'Review Count',
|
2610 |
);
|
2611 |
break;
|
2612 |
|
2621 |
'saswp_video_object_description' => 'Description',
|
2622 |
'saswp_video_object_name' => 'Name',
|
2623 |
'saswp_video_object_upload_date' => 'Upload Date',
|
2624 |
+
'saswp_video_object_duration' => 'Duration',
|
2625 |
'saswp_video_object_thumbnail_url' => 'Thumbnail Url',
|
2626 |
'saswp_video_object_content_url' => 'Content URL',
|
2627 |
'saswp_video_object_embed_url' => 'Embed Url',
|
2914 |
$input1 = array(
|
2915 |
'@context' => saswp_context_url(),
|
2916 |
'@type' => 'TechArticle',
|
2917 |
+
'@id' => trailingslashit(saswp_get_permalink()).'#techarticle',
|
2918 |
+
'url' => saswp_get_permalink(),
|
2919 |
+
'mainEntityOfPage' => saswp_get_permalink(),
|
2920 |
'headline' => saswp_get_the_title(),
|
2921 |
'description' => saswp_get_the_excerpt(),
|
2922 |
'articleBody' => saswp_get_the_content(),
|
2943 |
$input1 = array(
|
2944 |
'@context' => saswp_context_url(),
|
2945 |
'@type' => 'Article',
|
2946 |
+
'@id' => trailingslashit(saswp_get_permalink()).'#article',
|
2947 |
+
'url' => saswp_get_permalink(),
|
2948 |
+
'mainEntityOfPage' => saswp_get_permalink(),
|
2949 |
'headline' => saswp_get_the_title(),
|
2950 |
'description' => saswp_get_the_excerpt(),
|
2951 |
'articleBody' => saswp_get_the_content(),
|
2977 |
$input1 = array(
|
2978 |
'@context' => saswp_context_url(),
|
2979 |
'@type' => 'WebPage' ,
|
2980 |
+
'@id' => trailingslashit(saswp_get_permalink()).'#webpage',
|
2981 |
'name' => saswp_get_the_title(),
|
2982 |
+
'url' => saswp_get_permalink(),
|
2983 |
'description' => saswp_get_the_excerpt(),
|
2984 |
'mainEntity' => array(
|
2985 |
'@type' => 'Article',
|
2986 |
+
'mainEntityOfPage' => saswp_get_permalink(),
|
2987 |
'image' => esc_url($image_details[0]),
|
2988 |
'headline' => saswp_get_the_title(),
|
2989 |
'description' => saswp_get_the_excerpt(),
|
3059 |
|
3060 |
if($i == 0){
|
3061 |
|
3062 |
+
$input2['image'][$i]['@id'] = saswp_get_permalink().'#primaryimage';
|
3063 |
|
3064 |
}
|
3065 |
|
3092 |
|
3093 |
if($i == 0){
|
3094 |
|
3095 |
+
$input2['image'][$i]['@id'] = saswp_get_permalink().'#primaryimage';
|
3096 |
|
3097 |
}
|
3098 |
|
3110 |
if(empty($input2)){
|
3111 |
|
3112 |
$input2['image']['@type'] = 'ImageObject';
|
3113 |
+
$input2['image']['@id'] = saswp_get_permalink().'#primaryimage';
|
3114 |
$input2['image']['url'] = esc_url($image_details[0]);
|
3115 |
$input2['image']['width'] = esc_attr($image_details[1]);
|
3116 |
$input2['image']['height'] = esc_attr($image_details[2]);
|
3127 |
if($content){
|
3128 |
|
3129 |
$regex = '/<img(.*?)src="(.*?)"(.*?)>/';
|
3130 |
+
@preg_match_all( $regex, $content, $attachments );
|
3131 |
|
3132 |
$attach_images = array();
|
3133 |
|
3136 |
$attach_details = saswp_get_attachment_details($attachments[2], $post->ID);
|
3137 |
|
3138 |
$k = 0;
|
3139 |
+
|
3140 |
foreach ($attachments[2] as $attachment) {
|
3141 |
|
3142 |
if(!empty($attach_details)){
|
3153 |
|
3154 |
}
|
3155 |
|
3156 |
+
if(!empty($attach_images) && is_array($attach_images)){
|
3157 |
|
3158 |
if(isset($input2['image'])){
|
3159 |
|
3160 |
+
$attach_images['image'][] = $input2['image'];
|
3161 |
+
$input2['image'] = $attach_images['image'];
|
3162 |
+
|
3163 |
}else{
|
3164 |
+
|
3165 |
+
if($attach_images){
|
3166 |
+
|
3167 |
+
foreach($attach_images['image'] as $key => $image){
|
3168 |
+
|
3169 |
+
if($key == 0){
|
3170 |
+
|
3171 |
+
if($image['width'] < 1280 && $image['height'] < 720){
|
3172 |
+
|
3173 |
+
$resized_image = aq_resize( $image['url'], 1280, 720, true, false, true );
|
3174 |
+
$attach_images['image'][$key]['url'] = $resized_image[0];
|
3175 |
+
$attach_images['image'][$key]['width'] = $resized_image[1];
|
3176 |
+
$attach_images['image'][$key]['height'] = $resized_image[2];
|
3177 |
+
}
|
3178 |
+
$attach_images['image'][$key]['@id'] = saswp_get_permalink().'#primaryimage';
|
3179 |
+
}
|
3180 |
+
}
|
3181 |
+
|
3182 |
+
}
|
3183 |
+
|
3184 |
$input2 = $attach_images;
|
3185 |
}
|
3186 |
|
3193 |
if(isset($sd_data['sd_default_image']['url']) && $sd_data['sd_default_image']['url'] !=''){
|
3194 |
|
3195 |
$input2['image']['@type'] = 'ImageObject';
|
3196 |
+
$input2['image']['@id'] = saswp_get_permalink().'#primaryimage';
|
3197 |
$input2['image']['url'] = esc_url($sd_data['sd_default_image']['url']);
|
3198 |
$input2['image']['width'] = esc_attr($sd_data['sd_default_image_width']);
|
3199 |
$input2['image']['height'] = esc_attr($sd_data['sd_default_image_height']);
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: magazine3
|
|
3 |
Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.2
|
6 |
-
Stable tag: 1.9.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -112,6 +112,19 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
|
|
112 |
|
113 |
== Changelog ==
|
114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
= 1.9.5 (06 Sept 2019) =
|
116 |
|
117 |
* Added: More Organization schema type support #423
|
3 |
Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.2
|
6 |
+
Stable tag: 1.9.6
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
112 |
|
113 |
== Changelog ==
|
114 |
|
115 |
+
= 1.9.6 (11 Sept 2019) =
|
116 |
+
|
117 |
+
* Enhancement: Remove all the global static fields and migrate its data to modify schema output #465
|
118 |
+
* Enhancement: Other images should also get resized as like the featured image #371
|
119 |
+
* Bug Fixed: Website layout is break when microdata clean up option enable #461
|
120 |
+
* Bug Fixed: Post specific modify schema option should also show when a post is drafted #335
|
121 |
+
* Bug Fixed: NOTICE: PHP message: PHP Fatal error ( Call to undefined method WP_Image_Editor_Imagick::get_error_message() ) #467
|
122 |
+
* Bug Fixed: Default product data is not loading in fields of product at Modify current schema #432
|
123 |
+
* Bug Fixed: When WordPress installed in sub folder, Schema takes the path of subfolder instead of root #406
|
124 |
+
* Bug Fixed: AMP should be added if it is amp url in mainEntityOfPage #392
|
125 |
+
* Bug Fixed: WP Recipe Maker (Compatibility), the image is smaller than the recommended size error should not get appeared. #382
|
126 |
+
* Added: Importer for Schema- AIORS ( https://wordpress.org/plugins/all-in-one-schemaorg-rich-snippets) #160
|
127 |
+
|
128 |
= 1.9.5 (06 Sept 2019) =
|
129 |
|
130 |
* Added: More Organization schema type support #423
|
structured-data-for-wp.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Schema & Structured Data for WP
|
4 |
Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
|
5 |
-
Version: 1.9.
|
6 |
Text Domain: schema-and-structured-data-for-wp
|
7 |
Domain Path: /languages
|
8 |
Author: Magazine3
|
@@ -13,7 +13,7 @@ License: GPL2
|
|
13 |
// Exit if accessed directly.
|
14 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
15 |
|
16 |
-
define('SASWP_VERSION', '1.9.
|
17 |
define('SASWP_DIR_NAME_FILE', __FILE__ );
|
18 |
define('SASWP_DIR_NAME', dirname( __FILE__ ));
|
19 |
define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
|
2 |
/*
|
3 |
Plugin Name: Schema & Structured Data for WP
|
4 |
Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
|
5 |
+
Version: 1.9.6
|
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.6');
|
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
@@ -41,7 +41,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
41 |
|
42 |
wp_nonce_field( 'saswp_schema_options_nonce', 'saswp_schema_options_nonce' );
|
43 |
|
44 |
-
$schema_options =
|
45 |
|
46 |
?>
|
47 |
|
@@ -111,8 +111,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
111 |
'enable_custom_field' => $enable_custom_field
|
112 |
);
|
113 |
|
114 |
-
update_post_meta( $post_id, 'schema_options', $saswp_schema_options);
|
115 |
-
|
116 |
update_post_meta( $post_id, 'saswp_meta_list_val', $meta_list);
|
117 |
update_post_meta( $post_id, 'saswp_fixed_text', $fixed_text);
|
118 |
update_post_meta( $post_id, 'saswp_custom_meta_field', $cus_meta_field);
|
41 |
|
42 |
wp_nonce_field( 'saswp_schema_options_nonce', 'saswp_schema_options_nonce' );
|
43 |
|
44 |
+
$schema_options = get_post_meta($post->ID, 'schema_options', true);
|
45 |
|
46 |
?>
|
47 |
|
111 |
'enable_custom_field' => $enable_custom_field
|
112 |
);
|
113 |
|
114 |
+
update_post_meta( $post_id, 'schema_options', $saswp_schema_options);
|
|
|
115 |
update_post_meta( $post_id, 'saswp_meta_list_val', $meta_list);
|
116 |
update_post_meta( $post_id, 'saswp_fixed_text', $fixed_text);
|
117 |
update_post_meta( $post_id, 'saswp_custom_meta_field', $cus_meta_field);
|
view/post_specific.php
CHANGED
@@ -19,8 +19,7 @@ class saswp_post_specific {
|
|
19 |
protected $options_response = array();
|
20 |
protected $modify_schema_post_enable = false;
|
21 |
public $_local_sub_business = array();
|
22 |
-
|
23 |
-
private $schema_type_element = array(
|
24 |
'Product' => array(
|
25 |
'product_reviews' => 'product_reviews',
|
26 |
),
|
@@ -52,176 +51,9 @@ class saswp_post_specific {
|
|
52 |
'trip-itinerary' => 'trip_itinerary'
|
53 |
)
|
54 |
);
|
55 |
-
|
56 |
-
public function __construct() {
|
57 |
-
|
58 |
-
$mappings_local_sub = SASWP_DIR_NAME . '/core/array-list/local-sub-business.php';
|
59 |
-
|
60 |
-
if ( file_exists( $mappings_local_sub ) ) {
|
61 |
-
$this->_local_sub_business = include $mappings_local_sub;
|
62 |
-
}
|
63 |
-
|
64 |
-
}
|
65 |
-
|
66 |
-
|
67 |
-
/**
|
68 |
-
* List of hooks used in this context
|
69 |
-
*/
|
70 |
-
public function saswp_post_specific_hooks(){
|
71 |
-
|
72 |
-
add_action( 'admin_init', array( $this, 'saswp_get_all_schema_list' ) );
|
73 |
-
|
74 |
-
add_action( 'add_meta_boxes', array( $this, 'saswp_post_specifc_add_meta_boxes' ) );
|
75 |
-
add_action( 'save_post', array( $this, 'saswp_post_specific_save_fields' ) );
|
76 |
-
add_action( 'wp_ajax_saswp_get_sub_business_ajax', array($this,'saswp_get_sub_business_ajax'));
|
77 |
-
|
78 |
-
add_action( 'wp_ajax_saswp_get_schema_dynamic_fields_ajax', array($this,'saswp_get_schema_dynamic_fields_ajax'));
|
79 |
-
|
80 |
-
add_action( 'wp_ajax_saswp_modify_schema_post_enable', array($this,'saswp_modify_schema_post_enable'));
|
81 |
-
|
82 |
-
add_action( 'wp_ajax_saswp_restore_schema', array($this,'saswp_restore_schema'));
|
83 |
-
|
84 |
-
add_action( 'wp_ajax_saswp_enable_disable_schema_on_post', array($this,'saswp_enable_disable_schema_on_post'));
|
85 |
-
|
86 |
-
}
|
87 |
-
/**
|
88 |
-
*
|
89 |
-
*/
|
90 |
-
public function saswp_enable_disable_schema_on_post(){
|
91 |
-
|
92 |
-
if ( ! isset( $_POST['saswp_security_nonce'] ) ){
|
93 |
-
return;
|
94 |
-
}
|
95 |
-
if ( !wp_verify_nonce( $_POST['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
|
96 |
-
return;
|
97 |
-
}
|
98 |
-
|
99 |
-
$schema_enable = array();
|
100 |
-
$post_id = intval($_POST['post_id']);
|
101 |
-
$schema_id = intval($_POST['schema_id']);
|
102 |
-
$status = sanitize_text_field($_POST['status']);
|
103 |
-
|
104 |
-
|
105 |
-
$schema_enable_status = get_post_meta($post_id, 'saswp_enable_disable_schema', true);
|
106 |
-
|
107 |
-
if(is_array($schema_enable_status)){
|
108 |
-
|
109 |
-
$schema_enable = $schema_enable_status;
|
110 |
-
|
111 |
-
}else{
|
112 |
-
|
113 |
-
delete_post_meta($post_id, 'saswp_enable_disable_schema');
|
114 |
-
|
115 |
-
}
|
116 |
-
|
117 |
-
$schema_enable[$schema_id] = $status;
|
118 |
|
119 |
-
|
120 |
-
|
121 |
-
echo json_encode(array('status'=>'t'));
|
122 |
-
wp_die();
|
123 |
-
|
124 |
-
}
|
125 |
-
|
126 |
-
public function saswp_get_all_schema_list(){
|
127 |
-
|
128 |
-
global $pagenow;
|
129 |
-
|
130 |
-
if($pagenow == 'post.php' || $pagenow == 'admin-ajax.php'){
|
131 |
-
|
132 |
-
if($this->all_schema == null){
|
133 |
-
|
134 |
-
$all_schema = get_posts(
|
135 |
-
array(
|
136 |
-
'post_type' => 'saswp',
|
137 |
-
'posts_per_page' => -1,
|
138 |
-
'post_status' => 'publish',
|
139 |
-
)
|
140 |
-
);
|
141 |
-
|
142 |
-
$this->all_schema = $all_schema;
|
143 |
-
}
|
144 |
-
|
145 |
-
}
|
146 |
-
}
|
147 |
-
|
148 |
-
public function saswp_post_specifc_add_meta_boxes() {
|
149 |
-
|
150 |
-
global $post;
|
151 |
-
|
152 |
-
$post_specific_id = '';
|
153 |
-
$schema_count = 0;
|
154 |
-
if(is_object($post)){
|
155 |
-
$post_specific_id = $post->ID;
|
156 |
-
}
|
157 |
-
if(!empty($this->all_schema)){
|
158 |
-
$schema_count = count($this->all_schema);
|
159 |
-
}
|
160 |
-
|
161 |
-
$custom_option = get_option('custom_schema_post_enable_'.esc_attr($post->ID));
|
162 |
-
if($schema_count > 0 && get_post_status($post_specific_id)=='publish'){
|
163 |
-
|
164 |
-
$show_post_types = get_post_types();
|
165 |
-
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']);
|
166 |
-
|
167 |
-
$this->screen = $show_post_types;
|
168 |
-
|
169 |
-
if($this->screen){
|
170 |
-
|
171 |
-
foreach ( $this->screen as $single_screen ) {
|
172 |
-
$post_title = '';
|
173 |
-
if($schema_count == 1 && $custom_option !='enable'){
|
174 |
-
$all_schemas = $this->all_schema;
|
175 |
-
$post_title = '('.get_post_meta($all_schemas[0]->ID, 'schema_type', true).')';
|
176 |
-
if($post_title == '(local_business)'){
|
177 |
-
$post_title = '(LocalBusiness)';
|
178 |
-
}
|
179 |
-
}
|
180 |
-
|
181 |
-
add_meta_box(
|
182 |
-
'post_specific',
|
183 |
-
esc_html__( 'Post Specific Schema - '.$post_title, 'schema-and-structured-data-for-wp' ),
|
184 |
-
array( $this, 'saswp_post_meta_box_callback' ),
|
185 |
-
$single_screen,
|
186 |
-
'advanced',
|
187 |
-
'default'
|
188 |
-
);
|
189 |
-
|
190 |
-
}
|
191 |
-
}
|
192 |
-
|
193 |
-
}
|
194 |
-
}
|
195 |
-
|
196 |
-
public function saswp_get_schema_dynamic_fields_ajax(){
|
197 |
-
|
198 |
-
if ( ! isset( $_GET['saswp_security_nonce'] ) ){
|
199 |
-
return;
|
200 |
-
}
|
201 |
-
if ( !wp_verify_nonce( $_GET['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
|
202 |
-
return;
|
203 |
-
}
|
204 |
-
$meta_name = '';
|
205 |
-
$meta_array = array();
|
206 |
-
if(isset($_GET['meta_name'])){
|
207 |
-
$meta_name = sanitize_text_field($_GET['meta_name']);
|
208 |
-
$meta_array = $this->saswp_get_schema_dynamic_fields($meta_name);
|
209 |
-
}
|
210 |
-
if(!empty($meta_array)){
|
211 |
-
echo json_encode($meta_array);
|
212 |
-
}
|
213 |
-
wp_die();
|
214 |
-
}
|
215 |
-
|
216 |
-
public function saswp_get_schema_dynamic_fields($meta_name){
|
217 |
-
|
218 |
-
$meta_fields = array();
|
219 |
-
switch ($meta_name) {
|
220 |
-
|
221 |
-
case 'product_reviews':
|
222 |
-
|
223 |
-
$meta_fields = array(
|
224 |
-
|
225 |
array(
|
226 |
'label' => 'Reviewer Name',
|
227 |
'name' => 'saswp_product_reviews_reviewer_name',
|
@@ -242,14 +74,8 @@ class saswp_post_specific {
|
|
242 |
'name' => 'saswp_product_reviews_created_date',
|
243 |
'type' => 'text',
|
244 |
)
|
245 |
-
)
|
246 |
-
|
247 |
-
break;
|
248 |
-
|
249 |
-
case 'feed_element':
|
250 |
-
|
251 |
-
$meta_fields = array(
|
252 |
-
|
253 |
array(
|
254 |
'label' => 'Date Created',
|
255 |
'name' => 'saswp_feed_element_date_created',
|
@@ -265,14 +91,8 @@ class saswp_post_specific {
|
|
265 |
'name' => 'saswp_feed_element_email',
|
266 |
'type' => 'text',
|
267 |
)
|
268 |
-
)
|
269 |
-
|
270 |
-
break;
|
271 |
-
|
272 |
-
case 'performer':
|
273 |
-
|
274 |
-
$meta_fields = array(
|
275 |
-
|
276 |
array(
|
277 |
'label' => 'Performer Type',
|
278 |
'name' => 'saswp_event_performer_type',
|
@@ -292,14 +112,8 @@ class saswp_post_specific {
|
|
292 |
'name' => 'saswp_event_performer_url',
|
293 |
'type' => 'text',
|
294 |
)
|
295 |
-
)
|
296 |
-
|
297 |
-
break;
|
298 |
-
|
299 |
-
case 'howto_supply':
|
300 |
-
|
301 |
-
$meta_fields = array(
|
302 |
-
|
303 |
array(
|
304 |
'label' => 'Supply Name',
|
305 |
'name' => 'saswp_howto_supply_name',
|
@@ -314,16 +128,9 @@ class saswp_post_specific {
|
|
314 |
'label' => 'Supply Image',
|
315 |
'name' => 'saswp_howto_supply_image',
|
316 |
'type' => 'media',
|
317 |
-
)
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
break;
|
322 |
-
|
323 |
-
case 'howto_tool':
|
324 |
-
|
325 |
-
$meta_fields = array(
|
326 |
-
|
327 |
array(
|
328 |
'label' => 'Tool Name',
|
329 |
'name' => 'saswp_howto_tool_name',
|
@@ -338,16 +145,9 @@ class saswp_post_specific {
|
|
338 |
'label' => 'Tool Image',
|
339 |
'name' => 'saswp_howto_tool_image',
|
340 |
'type' => 'media',
|
341 |
-
)
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
break;
|
346 |
-
|
347 |
-
case 'howto_step':
|
348 |
-
|
349 |
-
$meta_fields = array(
|
350 |
-
|
351 |
array(
|
352 |
'label' => 'Step Name',
|
353 |
'name' => 'saswp_howto_step_name',
|
@@ -367,72 +167,37 @@ class saswp_post_specific {
|
|
367 |
'label' => 'Step Image',
|
368 |
'name' => 'saswp_howto_step_image',
|
369 |
'type' => 'media',
|
370 |
-
)
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
break;
|
375 |
-
|
376 |
-
case 'mc_symptom':
|
377 |
-
|
378 |
-
$meta_fields = array(
|
379 |
-
|
380 |
array(
|
381 |
'label' => 'Sign Or Symptom',
|
382 |
'name' => 'saswp_mc_symptom_name',
|
383 |
'type' => 'text',
|
384 |
-
)
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
break;
|
389 |
-
|
390 |
-
case 'mc_risk_factor':
|
391 |
-
|
392 |
-
$meta_fields = array(
|
393 |
-
|
394 |
array(
|
395 |
'label' => 'Risk Factor',
|
396 |
'name' => 'saswp_mc_risk_factor_name',
|
397 |
'type' => 'text',
|
398 |
-
)
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
break;
|
403 |
-
|
404 |
-
case 'mc_cause':
|
405 |
-
|
406 |
-
$meta_fields = array(
|
407 |
-
|
408 |
array(
|
409 |
'label' => 'Cause',
|
410 |
'name' => 'saswp_mc_cause_name',
|
411 |
'type' => 'text',
|
412 |
-
)
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
break;
|
417 |
-
|
418 |
-
case 'tvseries_actor':
|
419 |
-
|
420 |
-
$meta_fields = array(
|
421 |
-
|
422 |
array(
|
423 |
'label' => 'Actor Name',
|
424 |
'name' => 'saswp_tvseries_actor_name',
|
425 |
'type' => 'text',
|
426 |
-
)
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
break;
|
431 |
-
|
432 |
-
case 'tvseries_season':
|
433 |
-
|
434 |
-
$meta_fields = array(
|
435 |
-
|
436 |
array(
|
437 |
'label' => 'Season Name',
|
438 |
'name' => 'saswp_tvseries_season_name',
|
@@ -448,14 +213,8 @@ class saswp_post_specific {
|
|
448 |
'name' => 'saswp_tvseries_season_episodes',
|
449 |
'type' => 'text',
|
450 |
)
|
451 |
-
)
|
452 |
-
|
453 |
-
break;
|
454 |
-
|
455 |
-
case 'trip_itinerary':
|
456 |
-
|
457 |
-
$meta_fields = array(
|
458 |
-
|
459 |
array(
|
460 |
'label' => 'Itinerary Type',
|
461 |
'name' => 'saswp_trip_itinerary_type',
|
@@ -481,40 +240,184 @@ class saswp_post_specific {
|
|
481 |
'label' => 'Itinerary URL',
|
482 |
'name' => 'saswp_trip_itinerary_url',
|
483 |
'type' => 'text'
|
484 |
-
)
|
485 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
486 |
|
487 |
-
|
|
|
|
|
|
|
|
|
488 |
|
489 |
-
|
490 |
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
array(
|
499 |
-
'label' => 'Accepted Answer',
|
500 |
-
'name' => 'saswp_faq_question_answer',
|
501 |
-
'type' => 'textarea'
|
502 |
-
)
|
503 |
-
);
|
504 |
|
505 |
-
|
506 |
-
|
|
|
|
|
|
|
507 |
|
508 |
-
|
509 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
510 |
}
|
511 |
|
512 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
513 |
}
|
514 |
|
515 |
public function saswp_get_dynamic_html($schema_id, $meta_name, $index, $data){
|
516 |
|
517 |
-
$meta_fields = $this->
|
518 |
|
519 |
$output = '';
|
520 |
foreach ( $meta_fields as $meta_field ) {
|
@@ -587,7 +490,7 @@ class saswp_post_specific {
|
|
587 |
|
588 |
$class = '';
|
589 |
|
590 |
-
if ((strpos($meta_field['name'].'_'.$index.'_'.$schema_id, 'published_date') !== false) || (strpos($meta_field['name'].'_'.$index.'_'.$schema_id, 'date_created') !== false)){
|
591 |
|
592 |
$class = 'class="saswp-datepicker-picker"';
|
593 |
}
|
@@ -668,6 +571,7 @@ class saswp_post_specific {
|
|
668 |
return $tabs_fields;
|
669 |
|
670 |
}
|
|
|
671 |
public function saswp_post_meta_box_fields($post){
|
672 |
|
673 |
$response_html = '';
|
@@ -785,9 +689,11 @@ class saswp_post_specific {
|
|
785 |
|
786 |
$schema_ids[] = $all_schema[0]->ID;
|
787 |
$schema_type = get_post_meta($all_schema[0]->ID, 'schema_type', true);
|
788 |
-
|
789 |
-
|
790 |
-
|
|
|
|
|
791 |
}
|
792 |
|
793 |
$this->meta_fields = $response;
|
@@ -1474,6 +1380,8 @@ class saswp_post_specific {
|
|
1474 |
global $post;
|
1475 |
global $sd_data;
|
1476 |
|
|
|
|
|
1477 |
$image_details = array();
|
1478 |
|
1479 |
$image_id = get_post_thumbnail_id();
|
@@ -1491,6 +1399,7 @@ class saswp_post_specific {
|
|
1491 |
}
|
1492 |
|
1493 |
}
|
|
|
1494 |
$current_user = wp_get_current_user();
|
1495 |
$author_desc = get_the_author_meta( 'user_description' );
|
1496 |
$author_details = get_avatar_data($current_user->ID);
|
@@ -1498,9 +1407,7 @@ class saswp_post_specific {
|
|
1498 |
|
1499 |
$business_type = get_post_meta($schema_id, 'saswp_business_type', true);
|
1500 |
$business_name = get_post_meta($schema_id, 'saswp_business_name', true);
|
1501 |
-
|
1502 |
-
$dayoftheweek = get_post_meta ($schema_id, 'saswp_dayofweek', true);
|
1503 |
-
|
1504 |
$saswp_business_type_key = 'saswp_business_type_'.$schema_id;
|
1505 |
$saved_business_type = get_post_meta( $post->ID, $saswp_business_type_key, true );
|
1506 |
$saved_saswp_business_name = get_post_meta( $post->ID, 'saswp_business_name_'.$schema_id, true );
|
@@ -1520,8 +1427,7 @@ class saswp_post_specific {
|
|
1520 |
$sub_business_options = array();
|
1521 |
|
1522 |
if($condition !=null){
|
1523 |
-
|
1524 |
-
|
1525 |
if(!empty($this->_local_sub_business)){
|
1526 |
|
1527 |
$sub_business_options = array(
|
@@ -1593,8 +1499,7 @@ class saswp_post_specific {
|
|
1593 |
array(
|
1594 |
'label' => 'Business Name',
|
1595 |
'id' => 'local_business_name_'.$schema_id,
|
1596 |
-
'type' => 'text',
|
1597 |
-
'default' => $business_details['local_business_name']
|
1598 |
),
|
1599 |
|
1600 |
array(
|
@@ -1612,152 +1517,127 @@ class saswp_post_specific {
|
|
1612 |
array(
|
1613 |
'label' => 'Street Address',
|
1614 |
'id' => 'local_street_address_'.$schema_id,
|
1615 |
-
'type' => 'text',
|
1616 |
-
'default' => $business_details['local_street_address']
|
1617 |
),
|
1618 |
array(
|
1619 |
'label' => 'City',
|
1620 |
'id' => 'local_city_'.$schema_id,
|
1621 |
-
'type' => 'text',
|
1622 |
-
'default' => $business_details['local_city']
|
1623 |
),
|
1624 |
array(
|
1625 |
'label' => 'State',
|
1626 |
'id' => 'local_state_'.$schema_id,
|
1627 |
-
'type' => 'text',
|
1628 |
-
'default' => $business_details['local_state']
|
1629 |
),
|
1630 |
array(
|
1631 |
'label' => 'Postal Code',
|
1632 |
'id' => 'local_postal_code_'.$schema_id,
|
1633 |
-
'type' => 'text',
|
1634 |
-
'default' => $business_details['local_postal_code']
|
1635 |
),
|
1636 |
array(
|
1637 |
'label' => 'Latitude',
|
1638 |
'id' => 'local_latitude_'.$schema_id,
|
1639 |
-
'type' => 'text',
|
1640 |
-
'default' => $business_details['local_latitude']
|
1641 |
),
|
1642 |
array(
|
1643 |
'label' => 'Longitude',
|
1644 |
'id' => 'local_longitude_'.$schema_id,
|
1645 |
-
'type' => 'text',
|
1646 |
-
'default' => $business_details['local_longitude']
|
1647 |
),
|
1648 |
array(
|
1649 |
'label' => 'Phone',
|
1650 |
'id' => 'local_phone_'.$schema_id,
|
1651 |
-
'type' => 'text',
|
1652 |
-
'default' => $business_details['local_phone']
|
1653 |
),
|
1654 |
array(
|
1655 |
'label' => 'Website',
|
1656 |
'id' => 'local_website_'.$schema_id,
|
1657 |
-
'type' => 'text',
|
1658 |
-
'default' => $business_details['local_website']
|
1659 |
),
|
1660 |
array(
|
1661 |
'label' => 'Image',
|
1662 |
'id' => 'local_business_logo_'.$schema_id,
|
1663 |
-
'type' => 'media',
|
1664 |
-
'default' => $business_details['local_business_logo']['url']
|
1665 |
),
|
1666 |
array(
|
1667 |
'label' => 'Operation Days',
|
1668 |
'id' => 'saswp_dayofweek_'.$schema_id,
|
1669 |
-
'type' => 'textarea',
|
1670 |
-
'default' => $dayoftheweek
|
1671 |
),
|
1672 |
array(
|
1673 |
'label' => 'Price Range',
|
1674 |
'id' => 'local_price_range_'.$schema_id,
|
1675 |
-
'type' => 'text',
|
1676 |
-
'default' => $business_details['local_price_range']
|
1677 |
),
|
1678 |
array(
|
1679 |
'label' => 'Menu',
|
1680 |
'id' => 'local_menu_'.$schema_id,
|
1681 |
-
'type' => 'text',
|
1682 |
-
'default' => $business_details['local_menu']
|
1683 |
),
|
1684 |
array(
|
1685 |
'label' => 'HasMap',
|
1686 |
'id' => 'local_hasmap_'.$schema_id,
|
1687 |
-
'type' => 'text',
|
1688 |
-
'default' => $business_details['local_hasmap']
|
1689 |
),
|
1690 |
array(
|
1691 |
'label' => 'Serves Cuisine',
|
1692 |
'id' => 'local_serves_cuisine_'.$schema_id,
|
1693 |
-
'type' => 'text',
|
1694 |
-
'default' => $business_details['local_serves_cuisine']
|
1695 |
),
|
1696 |
array(
|
1697 |
'label' => 'Facebook',
|
1698 |
'id' => 'local_facebook_'.$schema_id,
|
1699 |
-
'type' => 'text',
|
1700 |
-
'default' => $business_details['local_facebook']
|
1701 |
),
|
1702 |
array(
|
1703 |
'label' => 'Twitter',
|
1704 |
'id' => 'local_twitter_'.$schema_id,
|
1705 |
-
'type' => 'text',
|
1706 |
-
'default' => $business_details['local_twitter']
|
1707 |
),
|
1708 |
array(
|
1709 |
'label' => 'Instagram',
|
1710 |
'id' => 'local_instagram_'.$schema_id,
|
1711 |
-
'type' => 'text',
|
1712 |
-
'default' => $business_details['local_instagram']
|
1713 |
),
|
1714 |
array(
|
1715 |
'label' => 'Pinterest',
|
1716 |
'id' => 'local_pinterest_'.$schema_id,
|
1717 |
-
'type' => 'text',
|
1718 |
-
'default' => $business_details['local_pinterest']
|
1719 |
),
|
1720 |
array(
|
1721 |
'label' => 'Linkedin',
|
1722 |
'id' => 'local_linkedin_'.$schema_id,
|
1723 |
-
'type' => 'text',
|
1724 |
-
'default' => $business_details['local_linkedin']
|
1725 |
),
|
1726 |
array(
|
1727 |
'label' => 'Soundcloud',
|
1728 |
'id' => 'local_soundcloud_'.$schema_id,
|
1729 |
-
'type' => 'text',
|
1730 |
-
'default' => $business_details['local_soundcloud']
|
1731 |
),
|
1732 |
array(
|
1733 |
'label' => 'local_tumblr',
|
1734 |
'id' => 'local_tumblr_'.$schema_id,
|
1735 |
-
'type' => 'text',
|
1736 |
-
'default' => $business_details['local_tumblr']
|
1737 |
),
|
1738 |
array(
|
1739 |
'label' => 'Youtube',
|
1740 |
'id' => 'local_youtube_'.$schema_id,
|
1741 |
-
'type' => 'text',
|
1742 |
-
'default' => $business_details['local_youtube']
|
1743 |
),
|
1744 |
array(
|
1745 |
'label' => 'Aggregate Rating',
|
1746 |
'id' => 'local_enable_rating_'.$schema_id,
|
1747 |
-
'type' => 'checkbox',
|
1748 |
-
// 'default' => saswp_remove_warnings($business_details, 'local_enable_rating', 'saswp_string')
|
1749 |
),
|
1750 |
array(
|
1751 |
'label' => 'Rating',
|
1752 |
'id' => 'local_rating_'.$schema_id,
|
1753 |
-
'type' => 'text',
|
1754 |
-
'default' => saswp_remove_warnings($business_details, 'local_rating', 'saswp_string')
|
1755 |
),
|
1756 |
array(
|
1757 |
'label' => 'Number of Reviews',
|
1758 |
'id' => 'local_review_count_'.$schema_id,
|
1759 |
-
'type' => 'text',
|
1760 |
-
'default' => saswp_remove_warnings($business_details, 'local_review_count', 'saswp_string')
|
1761 |
),
|
1762 |
);
|
1763 |
|
@@ -2203,86 +2083,72 @@ class saswp_post_specific {
|
|
2203 |
break;
|
2204 |
|
2205 |
case 'Event':
|
2206 |
-
|
2207 |
-
$event_schema_details = get_post_meta($schema_id, 'saswp_event_schema_details', true);
|
2208 |
$meta_field = array(
|
2209 |
array(
|
2210 |
'label' => 'Name',
|
2211 |
'id' => 'saswp_event_schema_name_'.$schema_id,
|
2212 |
-
'type' => 'text',
|
2213 |
-
'default' => $event_schema_details['saswp_event_schema_name']
|
2214 |
),
|
2215 |
array(
|
2216 |
'label' => 'Description',
|
2217 |
'id' => 'saswp_event_schema_description_'.$schema_id,
|
2218 |
-
'type' => 'textarea',
|
2219 |
-
'default' => $event_schema_details['saswp_event_schema_description']
|
2220 |
),
|
2221 |
array(
|
2222 |
'label' => 'Location Name',
|
2223 |
'id' => 'saswp_event_schema_location_name_'.$schema_id,
|
2224 |
-
'type' => 'text',
|
2225 |
-
'default' => $event_schema_details['saswp_event_schema_location_name']
|
2226 |
),
|
2227 |
array(
|
2228 |
'label' => 'Location Street Address',
|
2229 |
'id' => 'saswp_event_schema_location_streetaddress_'.$schema_id,
|
2230 |
-
'type' => 'text',
|
2231 |
-
'default' => $event_schema_details['saswp_event_schema_location_streetaddress']
|
2232 |
),
|
2233 |
array(
|
2234 |
'label' => 'Location Locality',
|
2235 |
'id' => 'saswp_event_schema_location_locality_'.$schema_id,
|
2236 |
-
'type' => 'text',
|
2237 |
-
'default' => $event_schema_details['saswp_event_schema_location_locality']
|
2238 |
),
|
2239 |
array(
|
2240 |
'label' => 'Location Region',
|
2241 |
'id' => 'saswp_event_schema_location_region_'.$schema_id,
|
2242 |
-
'type' => 'text',
|
2243 |
-
'default' => $event_schema_details['saswp_event_schema_location_region']
|
2244 |
),
|
2245 |
array(
|
2246 |
'label' => 'Location PostalCode',
|
2247 |
'id' => 'saswp_event_schema_location_postalcode_'.$schema_id,
|
2248 |
-
'type' => 'text',
|
2249 |
-
'default' => $event_schema_details['saswp_event_schema_location_postalcode']
|
2250 |
),
|
2251 |
array(
|
2252 |
'label' => 'Start Date',
|
2253 |
'id' => 'saswp_event_schema_start_date_'.$schema_id,
|
2254 |
-
'type' => 'text',
|
2255 |
-
'default' => $event_schema_details['saswp_event_schema_start_date']
|
2256 |
),
|
2257 |
array(
|
2258 |
'label' => 'End Date',
|
2259 |
'id' => 'saswp_event_schema_end_date_'.$schema_id,
|
2260 |
-
'type' => 'text',
|
2261 |
-
'default' => $event_schema_details['saswp_event_schema_end_date']
|
2262 |
),
|
2263 |
array(
|
2264 |
'label' => 'Image',
|
2265 |
'id' => 'saswp_event_schema_image_'.$schema_id,
|
2266 |
-
'type' => 'media',
|
2267 |
-
'default' => $event_schema_details['saswp_event_schema_image']['url']
|
2268 |
),
|
2269 |
array(
|
2270 |
'label' => 'Price',
|
2271 |
'id' => 'saswp_event_schema_price_'.$schema_id,
|
2272 |
-
'type' => 'number',
|
2273 |
-
'default' => $event_schema_details['saswp_event_schema_price']
|
2274 |
),
|
2275 |
array(
|
2276 |
'label' => 'Price Currency',
|
2277 |
'id' => 'saswp_event_schema_price_currency_'.$schema_id,
|
2278 |
-
'type' => 'text',
|
2279 |
-
'default' => $event_schema_details['saswp_event_schema_price_currency']
|
2280 |
),
|
2281 |
array(
|
2282 |
'label' => 'Availability',
|
2283 |
'id' => 'saswp_event_schema_availability_'.$schema_id,
|
2284 |
-
'type' => 'select',
|
2285 |
-
'default' => saswp_remove_warnings($event_schema_details, 'saswp_event_schema_availability', 'saswp_string'),
|
2286 |
'options' => array(
|
2287 |
'InStock' => 'In Stock',
|
2288 |
'OutOfStock' => 'Out Of Stock',
|
@@ -2293,14 +2159,12 @@ class saswp_post_specific {
|
|
2293 |
array(
|
2294 |
'label' => 'Valid From',
|
2295 |
'id' => 'saswp_event_schema_validfrom_'.$schema_id,
|
2296 |
-
'type' => 'text',
|
2297 |
-
'default' => $event_schema_details['saswp_event_schema_validfrom']
|
2298 |
),
|
2299 |
array(
|
2300 |
'label' => 'URL',
|
2301 |
'id' => 'saswp_event_schema_url_'.$schema_id,
|
2302 |
-
'type' => 'text',
|
2303 |
-
'default' => $event_schema_details['saswp_event_schema_url']
|
2304 |
),
|
2305 |
);
|
2306 |
break;
|
@@ -2744,44 +2608,53 @@ class saswp_post_specific {
|
|
2744 |
);
|
2745 |
break;
|
2746 |
|
2747 |
-
case 'Product':
|
|
|
|
|
|
|
2748 |
|
2749 |
$meta_field = array(
|
2750 |
|
2751 |
array(
|
2752 |
-
'label'
|
2753 |
-
'id'
|
2754 |
-
'type'
|
|
|
2755 |
),
|
2756 |
array(
|
2757 |
-
'label'
|
2758 |
-
'id'
|
2759 |
-
'type'
|
|
|
2760 |
),
|
2761 |
array(
|
2762 |
-
'label'
|
2763 |
-
'id'
|
2764 |
-
'type'
|
2765 |
),
|
2766 |
array(
|
2767 |
-
'label'
|
2768 |
-
'id'
|
2769 |
-
'type'
|
|
|
2770 |
),
|
2771 |
array(
|
2772 |
-
'label'
|
2773 |
-
'id'
|
2774 |
-
'type'
|
|
|
2775 |
),
|
2776 |
array(
|
2777 |
-
'label'
|
2778 |
-
'id'
|
2779 |
-
'type'
|
|
|
2780 |
),
|
2781 |
array(
|
2782 |
-
'label'
|
2783 |
-
'id'
|
2784 |
-
'type'
|
|
|
2785 |
),
|
2786 |
array(
|
2787 |
'label' => 'Availability',
|
@@ -2792,7 +2665,8 @@ class saswp_post_specific {
|
|
2792 |
'OutOfStock' => 'Out Of Stock',
|
2793 |
'Discontinued' => 'Discontinued',
|
2794 |
'PreOrder' => 'Pre Order',
|
2795 |
-
)
|
|
|
2796 |
),
|
2797 |
array(
|
2798 |
'label' => 'Condition',
|
@@ -2806,74 +2680,75 @@ class saswp_post_specific {
|
|
2806 |
),
|
2807 |
),
|
2808 |
array(
|
2809 |
-
'label'
|
2810 |
-
'id'
|
2811 |
-
'type'
|
|
|
2812 |
),
|
2813 |
array(
|
2814 |
-
'label'
|
2815 |
-
'id'
|
2816 |
-
'type'
|
2817 |
-
'note'
|
|
|
2818 |
),
|
2819 |
array(
|
2820 |
-
'label'
|
2821 |
-
'id'
|
2822 |
-
'type'
|
2823 |
-
'note'
|
|
|
2824 |
),
|
2825 |
array(
|
2826 |
-
'label'
|
2827 |
-
'id'
|
2828 |
-
'type'
|
|
|
2829 |
),
|
2830 |
array(
|
2831 |
'label' => 'Seller Organization',
|
2832 |
-
'id'
|
2833 |
-
'type'
|
2834 |
),
|
2835 |
array(
|
2836 |
'label' => 'Aggregate Rating',
|
2837 |
-
'id'
|
2838 |
-
'type'
|
2839 |
),
|
2840 |
array(
|
2841 |
-
'label'
|
2842 |
-
'id'
|
2843 |
-
'type'
|
|
|
2844 |
),
|
2845 |
array(
|
2846 |
-
'label'
|
2847 |
-
'id'
|
2848 |
-
'type'
|
|
|
2849 |
),
|
2850 |
|
2851 |
);
|
2852 |
-
|
2853 |
-
|
2854 |
-
|
2855 |
break;
|
2856 |
|
2857 |
case 'Service':
|
2858 |
-
|
2859 |
$meta_field = array(
|
2860 |
array(
|
2861 |
'label' => 'Name',
|
2862 |
'id' => 'saswp_service_schema_name_'.$schema_id,
|
2863 |
-
'type' => 'text',
|
2864 |
-
'default' => saswp_remove_warnings($service_schema_details, 'saswp_service_schema_name', 'saswp_string')
|
2865 |
),
|
2866 |
array(
|
2867 |
'label' => 'Service Type',
|
2868 |
'id' => 'saswp_service_schema_type_'.$schema_id,
|
2869 |
-
'type' => 'text',
|
2870 |
-
'default' => saswp_remove_warnings($service_schema_details, 'saswp_service_schema_type', 'saswp_string')
|
2871 |
),
|
2872 |
array(
|
2873 |
'label' => 'Provider Name',
|
2874 |
'id' => 'saswp_service_schema_provider_name_'.$schema_id,
|
2875 |
-
'type' => 'text',
|
2876 |
-
'default' => saswp_remove_warnings($service_schema_details, 'saswp_service_schema_provider_name', 'saswp_string')
|
2877 |
),
|
2878 |
array(
|
2879 |
'label' => 'Provider Type',
|
@@ -2889,50 +2764,42 @@ class saswp_post_specific {
|
|
2889 |
'NGO' => 'NGO',
|
2890 |
'PerformingGroup' => 'Performing Group',
|
2891 |
'SportsOrganization' => 'Sports Organization',
|
2892 |
-
),
|
2893 |
-
'default' => saswp_remove_warnings($service_schema_details, 'saswp_service_schema_provider_type', 'saswp_string')
|
2894 |
),
|
2895 |
array(
|
2896 |
'label' => 'Image',
|
2897 |
'id' => 'saswp_service_schema_image_'.$schema_id,
|
2898 |
-
'type' => 'media',
|
2899 |
-
'default' => $service_schema_details['saswp_service_schema_image']['url']
|
2900 |
),
|
2901 |
array(
|
2902 |
'label' => 'Locality',
|
2903 |
'id' => 'saswp_service_schema_locality_'.$schema_id,
|
2904 |
-
'type' => 'text',
|
2905 |
-
'default' => saswp_remove_warnings($service_schema_details, 'saswp_service_schema_locality', 'saswp_string')
|
2906 |
),
|
2907 |
array(
|
2908 |
'label' => 'Postal Code',
|
2909 |
'id' => 'saswp_service_schema_postal_code_'.$schema_id,
|
2910 |
-
'type' => 'text',
|
2911 |
-
'default' => saswp_remove_warnings($service_schema_details, 'saswp_service_schema_postal_code', 'saswp_string')
|
2912 |
),
|
2913 |
array(
|
2914 |
'label' => 'Telephone',
|
2915 |
'id' => 'saswp_service_schema_telephone_'.$schema_id,
|
2916 |
-
'type' => 'text',
|
2917 |
-
'default' => saswp_remove_warnings($service_schema_details, 'saswp_service_schema_telephone', 'saswp_string')
|
2918 |
),
|
2919 |
array(
|
2920 |
'label' => 'Price Range',
|
2921 |
'id' => 'saswp_service_schema_price_range_'.$schema_id,
|
2922 |
-
'type' => 'text',
|
2923 |
-
'default' => saswp_remove_warnings($service_schema_details, 'saswp_service_schema_price_range', 'saswp_string')
|
2924 |
),
|
2925 |
array(
|
2926 |
'label' => 'Description',
|
2927 |
'id' => 'saswp_service_schema_description_'.$schema_id,
|
2928 |
-
'type' => 'textarea',
|
2929 |
-
'default' => saswp_remove_warnings($service_schema_details, 'saswp_service_schema_description', 'saswp_string')
|
2930 |
),
|
2931 |
array(
|
2932 |
'label' => 'Area Served (City)',
|
2933 |
'id' => 'saswp_service_schema_area_served_'.$schema_id,
|
2934 |
-
'type' => 'textarea',
|
2935 |
-
'default' => saswp_remove_warnings($service_schema_details, 'saswp_service_schema_area_served', 'saswp_string'),
|
2936 |
'note' => 'Note: Enter all the City name in comma separated',
|
2937 |
'attributes' => array(
|
2938 |
'placeholder' => 'New York, Los Angeles'
|
@@ -2941,8 +2808,7 @@ class saswp_post_specific {
|
|
2941 |
array(
|
2942 |
'label' => 'Service Offer',
|
2943 |
'id' => 'saswp_service_schema_service_offer_'.$schema_id,
|
2944 |
-
'type' => 'textarea',
|
2945 |
-
'default' => saswp_remove_warnings($service_schema_details, 'saswp_service_schema_service_offer', 'saswp_string'),
|
2946 |
'note' => 'Note: Enter all the service offer in comma separated',
|
2947 |
'attributes' => array(
|
2948 |
'placeholder' => 'Apartment light cleaning, carpet cleaning'
|
@@ -2952,20 +2818,17 @@ class saswp_post_specific {
|
|
2952 |
array(
|
2953 |
'label' => 'Aggregate Rating',
|
2954 |
'id' => 'saswp_service_schema_enable_rating_'.$schema_id,
|
2955 |
-
'type' => 'checkbox',
|
2956 |
-
// 'default' => saswp_remove_warnings($service_schema_details, 'saswp_service_schema_enable_rating', 'saswp_string')
|
2957 |
),
|
2958 |
array(
|
2959 |
'label' => 'Rating',
|
2960 |
'id' => 'saswp_service_schema_rating_'.$schema_id,
|
2961 |
-
'type' => 'text',
|
2962 |
-
'default' => saswp_remove_warnings($service_schema_details, 'saswp_service_schema_rating', 'saswp_string')
|
2963 |
),
|
2964 |
array(
|
2965 |
'label' => 'Number of Reviews',
|
2966 |
'id' => 'saswp_service_schema_review_count_'.$schema_id,
|
2967 |
-
'type' => 'text',
|
2968 |
-
'default' => saswp_remove_warnings($service_schema_details, 'saswp_service_schema_review_count', 'saswp_string')
|
2969 |
),
|
2970 |
|
2971 |
);
|
@@ -3015,34 +2878,28 @@ class saswp_post_specific {
|
|
3015 |
'Movie' => 'Movie',
|
3016 |
'MusicPlaylist' => 'Music Playlist',
|
3017 |
'MusicRecording' => 'MusicRecording',
|
3018 |
-
'Photograph' => 'Photograph',
|
3019 |
-
//'Recipe' => 'Recipe',
|
3020 |
'Restaurant' => 'Restaurant',
|
3021 |
-
'Series' => 'Series',
|
3022 |
-
// 'SoftwareApplication' => 'Software Application',
|
3023 |
'VisualArtwork' => 'Visual Artwork',
|
3024 |
'Webpage' => 'Webpage',
|
3025 |
'WebSite' => 'WebSite',
|
3026 |
-
),
|
3027 |
-
'default' => saswp_remove_warnings($service_schema_details, 'saswp_review_schema_item_type', 'saswp_string')
|
3028 |
),
|
3029 |
array(
|
3030 |
'label' => 'Review Rating',
|
3031 |
'id' => 'saswp_review_schema_enable_rating_'.$schema_id,
|
3032 |
-
'type' => 'checkbox',
|
3033 |
-
// 'default' => saswp_remove_warnings($service_schema_details, 'saswp_review_schema_enable_rating', 'saswp_string')
|
3034 |
),
|
3035 |
array(
|
3036 |
'label' => 'Rating Value',
|
3037 |
'id' => 'saswp_review_schema_rating_'.$schema_id,
|
3038 |
-
'type' => 'text',
|
3039 |
-
'default' => saswp_remove_warnings($service_schema_details, 'saswp_review_schema_rating', 'saswp_string')
|
3040 |
),
|
3041 |
array(
|
3042 |
'label' => 'Best Rating',
|
3043 |
'id' => 'saswp_review_schema_review_count_'.$schema_id,
|
3044 |
-
'type' => 'text',
|
3045 |
-
'default' => saswp_remove_warnings($service_schema_details, 'saswp_review_schema_review_count', 'saswp_string')
|
3046 |
),
|
3047 |
|
3048 |
|
@@ -3051,39 +2908,33 @@ class saswp_post_specific {
|
|
3051 |
break;
|
3052 |
|
3053 |
case 'AudioObject':
|
3054 |
-
|
3055 |
-
$service_schema_details = get_post_meta($schema_id, 'saswp_audio_schema_details', true);
|
3056 |
$meta_field = array(
|
3057 |
|
3058 |
array(
|
3059 |
'label' => 'Name',
|
3060 |
'id' => 'saswp_audio_schema_name_'.$schema_id,
|
3061 |
-
'type' => 'text',
|
3062 |
-
'default' => saswp_remove_warnings($service_schema_details, 'saswp_audio_schema_name', 'saswp_string')
|
3063 |
),
|
3064 |
array(
|
3065 |
'label' => 'Description',
|
3066 |
'id' => 'saswp_audio_schema_description_'.$schema_id,
|
3067 |
-
'type' => 'textarea',
|
3068 |
-
'default' => saswp_remove_warnings($service_schema_details, 'saswp_audio_schema_description', 'saswp_string')
|
3069 |
),
|
3070 |
array(
|
3071 |
'label' => 'Content Url',
|
3072 |
'id' => 'saswp_audio_schema_contenturl_'.$schema_id,
|
3073 |
-
'type' => 'text',
|
3074 |
-
'default' => saswp_remove_warnings($service_schema_details, 'saswp_audio_schema_contenturl', 'saswp_string')
|
3075 |
),
|
3076 |
array(
|
3077 |
'label' => 'Duration',
|
3078 |
'id' => 'saswp_audio_schema_duration_'.$schema_id,
|
3079 |
-
'type' => 'text',
|
3080 |
-
'default' => saswp_remove_warnings($service_schema_details, 'saswp_audio_schema_duration', 'saswp_string')
|
3081 |
),
|
3082 |
array(
|
3083 |
'label' => 'Encoding Format',
|
3084 |
'id' => 'saswp_audio_schema_encoding_format_'.$schema_id,
|
3085 |
-
'type' => 'text',
|
3086 |
-
'default' => saswp_remove_warnings($service_schema_details, 'saswp_audio_schema_encoding_format', 'saswp_string')
|
3087 |
),
|
3088 |
array(
|
3089 |
'label' => 'Date Published',
|
@@ -3100,8 +2951,7 @@ class saswp_post_specific {
|
|
3100 |
array(
|
3101 |
'label' => 'Author Name',
|
3102 |
'id' => 'saswp_audio_schema_author_name_'.$schema_id,
|
3103 |
-
'type' => 'text',
|
3104 |
-
'default' => saswp_remove_warnings($service_schema_details, 'saswp_audio_author_name', 'saswp_string')
|
3105 |
),
|
3106 |
array(
|
3107 |
'label' => 'Author Description',
|
@@ -3114,45 +2964,38 @@ class saswp_post_specific {
|
|
3114 |
break;
|
3115 |
|
3116 |
case 'SoftwareApplication':
|
3117 |
-
|
3118 |
-
$software_schema_details = get_post_meta($schema_id, 'saswp_software_schema_details', true);
|
3119 |
$meta_field = array(
|
3120 |
|
3121 |
array(
|
3122 |
'label' => 'Name',
|
3123 |
'id' => 'saswp_software_schema_name_'.$schema_id,
|
3124 |
-
'type' => 'text',
|
3125 |
-
'default' => saswp_remove_warnings($software_schema_details, 'saswp_software_schema_name', 'saswp_string')
|
3126 |
),
|
3127 |
array(
|
3128 |
'label' => 'Description',
|
3129 |
'id' => 'saswp_software_schema_description_'.$schema_id,
|
3130 |
-
'type' => 'textarea',
|
3131 |
-
'default' => saswp_remove_warnings($software_schema_details, 'saswp_software_schema_description', 'saswp_string')
|
3132 |
),
|
3133 |
array(
|
3134 |
'label' => 'Operating System',
|
3135 |
'id' => 'saswp_software_schema_operating_system_'.$schema_id,
|
3136 |
-
'type' => 'text',
|
3137 |
-
'default' => saswp_remove_warnings($software_schema_details, 'saswp_software_schema_operating_system', 'saswp_string')
|
3138 |
),
|
3139 |
array(
|
3140 |
'label' => 'Application Category',
|
3141 |
'id' => 'saswp_software_schema_application_category_'.$schema_id,
|
3142 |
-
'type' => 'text',
|
3143 |
-
'default' => saswp_remove_warnings($software_schema_details, 'saswp_software_schema_application_category', 'saswp_string')
|
3144 |
),
|
3145 |
array(
|
3146 |
'label' => 'Price',
|
3147 |
'id' => 'saswp_software_schema_price_'.$schema_id,
|
3148 |
-
'type' => 'text',
|
3149 |
-
'default' => saswp_remove_warnings($software_schema_details, 'saswp_software_schema_price', 'saswp_string')
|
3150 |
),
|
3151 |
array(
|
3152 |
'label' => 'Price Currency',
|
3153 |
'id' => 'saswp_software_schema_price_currency_'.$schema_id,
|
3154 |
-
'type' => 'text',
|
3155 |
-
'default' => saswp_remove_warnings($software_schema_details, 'saswp_software_schema_price_currency', 'saswp_string')
|
3156 |
),
|
3157 |
array(
|
3158 |
'label' => 'Date Published',
|
@@ -3174,14 +3017,12 @@ class saswp_post_specific {
|
|
3174 |
array(
|
3175 |
'label' => 'Rating',
|
3176 |
'id' => 'saswp_software_schema_rating_'.$schema_id,
|
3177 |
-
'type' => 'text',
|
3178 |
-
'default' => saswp_remove_warnings($software_schema_details, 'saswp_software_schema_rating', 'saswp_string')
|
3179 |
),
|
3180 |
array(
|
3181 |
'label' => 'Rating Count',
|
3182 |
'id' => 'saswp_software_schema_rating_count_'.$schema_id,
|
3183 |
-
'type' => 'text',
|
3184 |
-
'default' => saswp_remove_warnings($software_schema_details, 'saswp_software_schema_rating_count', 'saswp_string')
|
3185 |
),
|
3186 |
);
|
3187 |
break;
|
19 |
protected $options_response = array();
|
20 |
protected $modify_schema_post_enable = false;
|
21 |
public $_local_sub_business = array();
|
22 |
+
public $schema_type_element = array(
|
|
|
23 |
'Product' => array(
|
24 |
'product_reviews' => 'product_reviews',
|
25 |
),
|
51 |
'trip-itinerary' => 'trip_itinerary'
|
52 |
)
|
53 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
+
public $_meta_name = array(
|
56 |
+
'product_reviews' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
array(
|
58 |
'label' => 'Reviewer Name',
|
59 |
'name' => 'saswp_product_reviews_reviewer_name',
|
74 |
'name' => 'saswp_product_reviews_created_date',
|
75 |
'type' => 'text',
|
76 |
)
|
77 |
+
),
|
78 |
+
'feed_element' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
array(
|
80 |
'label' => 'Date Created',
|
81 |
'name' => 'saswp_feed_element_date_created',
|
91 |
'name' => 'saswp_feed_element_email',
|
92 |
'type' => 'text',
|
93 |
)
|
94 |
+
),
|
95 |
+
'performer' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
array(
|
97 |
'label' => 'Performer Type',
|
98 |
'name' => 'saswp_event_performer_type',
|
112 |
'name' => 'saswp_event_performer_url',
|
113 |
'type' => 'text',
|
114 |
)
|
115 |
+
),
|
116 |
+
'howto_supply' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
array(
|
118 |
'label' => 'Supply Name',
|
119 |
'name' => 'saswp_howto_supply_name',
|
128 |
'label' => 'Supply Image',
|
129 |
'name' => 'saswp_howto_supply_image',
|
130 |
'type' => 'media',
|
131 |
+
)
|
132 |
+
),
|
133 |
+
'howto_tool' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
array(
|
135 |
'label' => 'Tool Name',
|
136 |
'name' => 'saswp_howto_tool_name',
|
145 |
'label' => 'Tool Image',
|
146 |
'name' => 'saswp_howto_tool_image',
|
147 |
'type' => 'media',
|
148 |
+
)
|
149 |
+
),
|
150 |
+
'howto_step' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
array(
|
152 |
'label' => 'Step Name',
|
153 |
'name' => 'saswp_howto_step_name',
|
167 |
'label' => 'Step Image',
|
168 |
'name' => 'saswp_howto_step_image',
|
169 |
'type' => 'media',
|
170 |
+
)
|
171 |
+
),
|
172 |
+
'mc_symptom' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
array(
|
174 |
'label' => 'Sign Or Symptom',
|
175 |
'name' => 'saswp_mc_symptom_name',
|
176 |
'type' => 'text',
|
177 |
+
)
|
178 |
+
),
|
179 |
+
'mc_risk_factor' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
array(
|
181 |
'label' => 'Risk Factor',
|
182 |
'name' => 'saswp_mc_risk_factor_name',
|
183 |
'type' => 'text',
|
184 |
+
)
|
185 |
+
),
|
186 |
+
'mc_cause' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
array(
|
188 |
'label' => 'Cause',
|
189 |
'name' => 'saswp_mc_cause_name',
|
190 |
'type' => 'text',
|
191 |
+
)
|
192 |
+
),
|
193 |
+
'tvseries_actor' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
array(
|
195 |
'label' => 'Actor Name',
|
196 |
'name' => 'saswp_tvseries_actor_name',
|
197 |
'type' => 'text',
|
198 |
+
)
|
199 |
+
),
|
200 |
+
'tvseries_season' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
array(
|
202 |
'label' => 'Season Name',
|
203 |
'name' => 'saswp_tvseries_season_name',
|
213 |
'name' => 'saswp_tvseries_season_episodes',
|
214 |
'type' => 'text',
|
215 |
)
|
216 |
+
),
|
217 |
+
'trip_itinerary' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
array(
|
219 |
'label' => 'Itinerary Type',
|
220 |
'name' => 'saswp_trip_itinerary_type',
|
240 |
'label' => 'Itinerary URL',
|
241 |
'name' => 'saswp_trip_itinerary_url',
|
242 |
'type' => 'text'
|
243 |
+
)
|
244 |
+
),
|
245 |
+
'faq_question' => array(
|
246 |
+
array(
|
247 |
+
'label' => 'Question',
|
248 |
+
'name' => 'saswp_faq_question_name',
|
249 |
+
'type' => 'text'
|
250 |
+
),
|
251 |
+
array(
|
252 |
+
'label' => 'Accepted Answer',
|
253 |
+
'name' => 'saswp_faq_question_answer',
|
254 |
+
'type' => 'textarea'
|
255 |
+
)
|
256 |
+
)
|
257 |
+
);
|
258 |
+
|
259 |
+
public function __construct() {
|
260 |
+
|
261 |
+
$mappings_local_sub = SASWP_DIR_NAME . '/core/array-list/local-sub-business.php';
|
262 |
+
|
263 |
+
if ( file_exists( $mappings_local_sub ) ) {
|
264 |
+
$this->_local_sub_business = include $mappings_local_sub;
|
265 |
+
}
|
266 |
+
|
267 |
+
}
|
268 |
+
|
269 |
+
/**
|
270 |
+
* List of hooks used in this context
|
271 |
+
*/
|
272 |
+
public function saswp_post_specific_hooks(){
|
273 |
+
|
274 |
+
add_action( 'admin_init', array( $this, 'saswp_get_all_schema_list' ) );
|
275 |
+
|
276 |
+
add_action( 'add_meta_boxes', array( $this, 'saswp_post_specifc_add_meta_boxes' ) );
|
277 |
+
add_action( 'save_post', array( $this, 'saswp_post_specific_save_fields' ) );
|
278 |
+
add_action( 'wp_ajax_saswp_get_sub_business_ajax', array($this,'saswp_get_sub_business_ajax'));
|
279 |
+
|
280 |
+
add_action( 'wp_ajax_saswp_get_schema_dynamic_fields_ajax', array($this,'saswp_get_schema_dynamic_fields_ajax'));
|
281 |
+
|
282 |
+
add_action( 'wp_ajax_saswp_modify_schema_post_enable', array($this,'saswp_modify_schema_post_enable'));
|
283 |
+
|
284 |
+
add_action( 'wp_ajax_saswp_restore_schema', array($this,'saswp_restore_schema'));
|
285 |
+
|
286 |
+
add_action( 'wp_ajax_saswp_enable_disable_schema_on_post', array($this,'saswp_enable_disable_schema_on_post'));
|
287 |
+
|
288 |
+
}
|
289 |
+
/**
|
290 |
+
*
|
291 |
+
*/
|
292 |
+
public function saswp_enable_disable_schema_on_post(){
|
293 |
+
|
294 |
+
if ( ! isset( $_POST['saswp_security_nonce'] ) ){
|
295 |
+
return;
|
296 |
+
}
|
297 |
+
if ( !wp_verify_nonce( $_POST['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
|
298 |
+
return;
|
299 |
+
}
|
300 |
+
|
301 |
+
$schema_enable = array();
|
302 |
+
$post_id = intval($_POST['post_id']);
|
303 |
+
$schema_id = intval($_POST['schema_id']);
|
304 |
+
$status = sanitize_text_field($_POST['status']);
|
305 |
+
|
306 |
+
$schema_enable_status = get_post_meta($post_id, 'saswp_enable_disable_schema', true);
|
307 |
+
|
308 |
+
if(is_array($schema_enable_status)){
|
309 |
+
|
310 |
+
$schema_enable = $schema_enable_status;
|
311 |
+
|
312 |
+
}else{
|
313 |
+
|
314 |
+
delete_post_meta($post_id, 'saswp_enable_disable_schema');
|
315 |
+
|
316 |
+
}
|
317 |
+
|
318 |
+
$schema_enable[$schema_id] = $status;
|
319 |
+
|
320 |
+
update_post_meta( $post_id, 'saswp_enable_disable_schema', $schema_enable);
|
321 |
+
|
322 |
+
echo json_encode(array('status'=>'t'));
|
323 |
+
wp_die();
|
324 |
+
|
325 |
+
}
|
326 |
|
327 |
+
public function saswp_get_all_schema_list(){
|
328 |
+
|
329 |
+
global $pagenow;
|
330 |
+
|
331 |
+
if($pagenow == 'post.php' || $pagenow == 'admin-ajax.php'){
|
332 |
|
333 |
+
if($this->all_schema == null){
|
334 |
|
335 |
+
$all_schema = get_posts(
|
336 |
+
array(
|
337 |
+
'post_type' => 'saswp',
|
338 |
+
'posts_per_page' => -1,
|
339 |
+
'post_status' => 'publish',
|
340 |
+
)
|
341 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
342 |
|
343 |
+
$this->all_schema = $all_schema;
|
344 |
+
}
|
345 |
+
|
346 |
+
}
|
347 |
+
}
|
348 |
|
349 |
+
public function saswp_post_specifc_add_meta_boxes() {
|
350 |
+
|
351 |
+
global $post;
|
352 |
+
|
353 |
+
$post_specific_id = '';
|
354 |
+
$schema_count = 0;
|
355 |
+
|
356 |
+
if(is_object($post)){
|
357 |
+
$post_specific_id = $post->ID;
|
358 |
+
}
|
359 |
+
if(!empty($this->all_schema)){
|
360 |
+
$schema_count = count($this->all_schema);
|
361 |
}
|
362 |
|
363 |
+
$custom_option = get_option('custom_schema_post_enable_'.esc_attr($post->ID));
|
364 |
+
if($schema_count > 0 && (get_post_status($post_specific_id)=='publish' || get_post_status($post_specific_id)=='draft' )){
|
365 |
+
|
366 |
+
$show_post_types = get_post_types();
|
367 |
+
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']);
|
368 |
+
|
369 |
+
$this->screen = $show_post_types;
|
370 |
+
|
371 |
+
if($this->screen){
|
372 |
+
|
373 |
+
foreach ( $this->screen as $single_screen ) {
|
374 |
+
$post_title = '';
|
375 |
+
if($schema_count == 1 && $custom_option !='enable'){
|
376 |
+
$all_schemas = $this->all_schema;
|
377 |
+
$post_title = '('.get_post_meta($all_schemas[0]->ID, 'schema_type', true).')';
|
378 |
+
if($post_title == '(local_business)'){
|
379 |
+
$post_title = '(LocalBusiness)';
|
380 |
+
}
|
381 |
+
}
|
382 |
+
|
383 |
+
add_meta_box(
|
384 |
+
'post_specific',
|
385 |
+
esc_html__( 'Post Specific Schema - '.$post_title, 'schema-and-structured-data-for-wp' ),
|
386 |
+
array( $this, 'saswp_post_meta_box_callback' ),
|
387 |
+
$single_screen,
|
388 |
+
'advanced',
|
389 |
+
'default'
|
390 |
+
);
|
391 |
+
|
392 |
+
}
|
393 |
+
}
|
394 |
+
|
395 |
+
}
|
396 |
+
}
|
397 |
+
|
398 |
+
public function saswp_get_schema_dynamic_fields_ajax(){
|
399 |
+
|
400 |
+
if ( ! isset( $_GET['saswp_security_nonce'] ) ){
|
401 |
+
return;
|
402 |
+
}
|
403 |
+
if ( !wp_verify_nonce( $_GET['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
|
404 |
+
return;
|
405 |
+
}
|
406 |
+
$meta_name = '';
|
407 |
+
$meta_array = array();
|
408 |
+
if(isset($_GET['meta_name'])){
|
409 |
+
$meta_name = sanitize_text_field($_GET['meta_name']);
|
410 |
+
$meta_array = $this->_meta_name[$meta_name];
|
411 |
+
}
|
412 |
+
if(!empty($meta_array)){
|
413 |
+
echo json_encode($meta_array);
|
414 |
+
}
|
415 |
+
wp_die();
|
416 |
}
|
417 |
|
418 |
public function saswp_get_dynamic_html($schema_id, $meta_name, $index, $data){
|
419 |
|
420 |
+
$meta_fields = $this->_meta_name[$meta_name];
|
421 |
|
422 |
$output = '';
|
423 |
foreach ( $meta_fields as $meta_field ) {
|
490 |
|
491 |
$class = '';
|
492 |
|
493 |
+
if ((strpos($meta_field['name'].'_'.$index.'_'.$schema_id, 'published_date') !== false) || (strpos($meta_field['name'].'_'.$index.'_'.$schema_id, 'date_created') !== false) || (strpos($meta_field['name'].'_'.$index.'_'.$schema_id, 'created_date') !== false)){
|
494 |
|
495 |
$class = 'class="saswp-datepicker-picker"';
|
496 |
}
|
571 |
return $tabs_fields;
|
572 |
|
573 |
}
|
574 |
+
|
575 |
public function saswp_post_meta_box_fields($post){
|
576 |
|
577 |
$response_html = '';
|
689 |
|
690 |
$schema_ids[] = $all_schema[0]->ID;
|
691 |
$schema_type = get_post_meta($all_schema[0]->ID, 'schema_type', true);
|
692 |
+
|
693 |
+
$checked = '';
|
694 |
+
|
695 |
+
if(!isset($schema_enable[$all_schema[0]->ID]) || $schema_enable[$all_schema[0]->ID] == 1){
|
696 |
+
$checked = 'checked';
|
697 |
}
|
698 |
|
699 |
$this->meta_fields = $response;
|
1380 |
global $post;
|
1381 |
global $sd_data;
|
1382 |
|
1383 |
+
$post_id = $post->ID;
|
1384 |
+
|
1385 |
$image_details = array();
|
1386 |
|
1387 |
$image_id = get_post_thumbnail_id();
|
1399 |
}
|
1400 |
|
1401 |
}
|
1402 |
+
|
1403 |
$current_user = wp_get_current_user();
|
1404 |
$author_desc = get_the_author_meta( 'user_description' );
|
1405 |
$author_details = get_avatar_data($current_user->ID);
|
1407 |
|
1408 |
$business_type = get_post_meta($schema_id, 'saswp_business_type', true);
|
1409 |
$business_name = get_post_meta($schema_id, 'saswp_business_name', true);
|
1410 |
+
|
|
|
|
|
1411 |
$saswp_business_type_key = 'saswp_business_type_'.$schema_id;
|
1412 |
$saved_business_type = get_post_meta( $post->ID, $saswp_business_type_key, true );
|
1413 |
$saved_saswp_business_name = get_post_meta( $post->ID, 'saswp_business_name_'.$schema_id, true );
|
1427 |
$sub_business_options = array();
|
1428 |
|
1429 |
if($condition !=null){
|
1430 |
+
|
|
|
1431 |
if(!empty($this->_local_sub_business)){
|
1432 |
|
1433 |
$sub_business_options = array(
|
1499 |
array(
|
1500 |
'label' => 'Business Name',
|
1501 |
'id' => 'local_business_name_'.$schema_id,
|
1502 |
+
'type' => 'text',
|
|
|
1503 |
),
|
1504 |
|
1505 |
array(
|
1517 |
array(
|
1518 |
'label' => 'Street Address',
|
1519 |
'id' => 'local_street_address_'.$schema_id,
|
1520 |
+
'type' => 'text',
|
|
|
1521 |
),
|
1522 |
array(
|
1523 |
'label' => 'City',
|
1524 |
'id' => 'local_city_'.$schema_id,
|
1525 |
+
'type' => 'text',
|
|
|
1526 |
),
|
1527 |
array(
|
1528 |
'label' => 'State',
|
1529 |
'id' => 'local_state_'.$schema_id,
|
1530 |
+
'type' => 'text',
|
|
|
1531 |
),
|
1532 |
array(
|
1533 |
'label' => 'Postal Code',
|
1534 |
'id' => 'local_postal_code_'.$schema_id,
|
1535 |
+
'type' => 'text',
|
|
|
1536 |
),
|
1537 |
array(
|
1538 |
'label' => 'Latitude',
|
1539 |
'id' => 'local_latitude_'.$schema_id,
|
1540 |
+
'type' => 'text',
|
|
|
1541 |
),
|
1542 |
array(
|
1543 |
'label' => 'Longitude',
|
1544 |
'id' => 'local_longitude_'.$schema_id,
|
1545 |
+
'type' => 'text',
|
|
|
1546 |
),
|
1547 |
array(
|
1548 |
'label' => 'Phone',
|
1549 |
'id' => 'local_phone_'.$schema_id,
|
1550 |
+
'type' => 'text',
|
|
|
1551 |
),
|
1552 |
array(
|
1553 |
'label' => 'Website',
|
1554 |
'id' => 'local_website_'.$schema_id,
|
1555 |
+
'type' => 'text',
|
|
|
1556 |
),
|
1557 |
array(
|
1558 |
'label' => 'Image',
|
1559 |
'id' => 'local_business_logo_'.$schema_id,
|
1560 |
+
'type' => 'media',
|
|
|
1561 |
),
|
1562 |
array(
|
1563 |
'label' => 'Operation Days',
|
1564 |
'id' => 'saswp_dayofweek_'.$schema_id,
|
1565 |
+
'type' => 'textarea',
|
|
|
1566 |
),
|
1567 |
array(
|
1568 |
'label' => 'Price Range',
|
1569 |
'id' => 'local_price_range_'.$schema_id,
|
1570 |
+
'type' => 'text',
|
|
|
1571 |
),
|
1572 |
array(
|
1573 |
'label' => 'Menu',
|
1574 |
'id' => 'local_menu_'.$schema_id,
|
1575 |
+
'type' => 'text',
|
|
|
1576 |
),
|
1577 |
array(
|
1578 |
'label' => 'HasMap',
|
1579 |
'id' => 'local_hasmap_'.$schema_id,
|
1580 |
+
'type' => 'text',
|
|
|
1581 |
),
|
1582 |
array(
|
1583 |
'label' => 'Serves Cuisine',
|
1584 |
'id' => 'local_serves_cuisine_'.$schema_id,
|
1585 |
+
'type' => 'text',
|
|
|
1586 |
),
|
1587 |
array(
|
1588 |
'label' => 'Facebook',
|
1589 |
'id' => 'local_facebook_'.$schema_id,
|
1590 |
+
'type' => 'text',
|
|
|
1591 |
),
|
1592 |
array(
|
1593 |
'label' => 'Twitter',
|
1594 |
'id' => 'local_twitter_'.$schema_id,
|
1595 |
+
'type' => 'text',
|
|
|
1596 |
),
|
1597 |
array(
|
1598 |
'label' => 'Instagram',
|
1599 |
'id' => 'local_instagram_'.$schema_id,
|
1600 |
+
'type' => 'text',
|
|
|
1601 |
),
|
1602 |
array(
|
1603 |
'label' => 'Pinterest',
|
1604 |
'id' => 'local_pinterest_'.$schema_id,
|
1605 |
+
'type' => 'text',
|
|
|
1606 |
),
|
1607 |
array(
|
1608 |
'label' => 'Linkedin',
|
1609 |
'id' => 'local_linkedin_'.$schema_id,
|
1610 |
+
'type' => 'text',
|
|
|
1611 |
),
|
1612 |
array(
|
1613 |
'label' => 'Soundcloud',
|
1614 |
'id' => 'local_soundcloud_'.$schema_id,
|
1615 |
+
'type' => 'text',
|
|
|
1616 |
),
|
1617 |
array(
|
1618 |
'label' => 'local_tumblr',
|
1619 |
'id' => 'local_tumblr_'.$schema_id,
|
1620 |
+
'type' => 'text',
|
|
|
1621 |
),
|
1622 |
array(
|
1623 |
'label' => 'Youtube',
|
1624 |
'id' => 'local_youtube_'.$schema_id,
|
1625 |
+
'type' => 'text',
|
|
|
1626 |
),
|
1627 |
array(
|
1628 |
'label' => 'Aggregate Rating',
|
1629 |
'id' => 'local_enable_rating_'.$schema_id,
|
1630 |
+
'type' => 'checkbox',
|
|
|
1631 |
),
|
1632 |
array(
|
1633 |
'label' => 'Rating',
|
1634 |
'id' => 'local_rating_'.$schema_id,
|
1635 |
+
'type' => 'text',
|
|
|
1636 |
),
|
1637 |
array(
|
1638 |
'label' => 'Number of Reviews',
|
1639 |
'id' => 'local_review_count_'.$schema_id,
|
1640 |
+
'type' => 'text',
|
|
|
1641 |
),
|
1642 |
);
|
1643 |
|
2083 |
break;
|
2084 |
|
2085 |
case 'Event':
|
2086 |
+
|
|
|
2087 |
$meta_field = array(
|
2088 |
array(
|
2089 |
'label' => 'Name',
|
2090 |
'id' => 'saswp_event_schema_name_'.$schema_id,
|
2091 |
+
'type' => 'text',
|
|
|
2092 |
),
|
2093 |
array(
|
2094 |
'label' => 'Description',
|
2095 |
'id' => 'saswp_event_schema_description_'.$schema_id,
|
2096 |
+
'type' => 'textarea',
|
|
|
2097 |
),
|
2098 |
array(
|
2099 |
'label' => 'Location Name',
|
2100 |
'id' => 'saswp_event_schema_location_name_'.$schema_id,
|
2101 |
+
'type' => 'text',
|
|
|
2102 |
),
|
2103 |
array(
|
2104 |
'label' => 'Location Street Address',
|
2105 |
'id' => 'saswp_event_schema_location_streetaddress_'.$schema_id,
|
2106 |
+
'type' => 'text',
|
|
|
2107 |
),
|
2108 |
array(
|
2109 |
'label' => 'Location Locality',
|
2110 |
'id' => 'saswp_event_schema_location_locality_'.$schema_id,
|
2111 |
+
'type' => 'text',
|
|
|
2112 |
),
|
2113 |
array(
|
2114 |
'label' => 'Location Region',
|
2115 |
'id' => 'saswp_event_schema_location_region_'.$schema_id,
|
2116 |
+
'type' => 'text',
|
|
|
2117 |
),
|
2118 |
array(
|
2119 |
'label' => 'Location PostalCode',
|
2120 |
'id' => 'saswp_event_schema_location_postalcode_'.$schema_id,
|
2121 |
+
'type' => 'text',
|
|
|
2122 |
),
|
2123 |
array(
|
2124 |
'label' => 'Start Date',
|
2125 |
'id' => 'saswp_event_schema_start_date_'.$schema_id,
|
2126 |
+
'type' => 'text',
|
|
|
2127 |
),
|
2128 |
array(
|
2129 |
'label' => 'End Date',
|
2130 |
'id' => 'saswp_event_schema_end_date_'.$schema_id,
|
2131 |
+
'type' => 'text',
|
|
|
2132 |
),
|
2133 |
array(
|
2134 |
'label' => 'Image',
|
2135 |
'id' => 'saswp_event_schema_image_'.$schema_id,
|
2136 |
+
'type' => 'media',
|
|
|
2137 |
),
|
2138 |
array(
|
2139 |
'label' => 'Price',
|
2140 |
'id' => 'saswp_event_schema_price_'.$schema_id,
|
2141 |
+
'type' => 'number',
|
|
|
2142 |
),
|
2143 |
array(
|
2144 |
'label' => 'Price Currency',
|
2145 |
'id' => 'saswp_event_schema_price_currency_'.$schema_id,
|
2146 |
+
'type' => 'text',
|
|
|
2147 |
),
|
2148 |
array(
|
2149 |
'label' => 'Availability',
|
2150 |
'id' => 'saswp_event_schema_availability_'.$schema_id,
|
2151 |
+
'type' => 'select',
|
|
|
2152 |
'options' => array(
|
2153 |
'InStock' => 'In Stock',
|
2154 |
'OutOfStock' => 'Out Of Stock',
|
2159 |
array(
|
2160 |
'label' => 'Valid From',
|
2161 |
'id' => 'saswp_event_schema_validfrom_'.$schema_id,
|
2162 |
+
'type' => 'text',
|
|
|
2163 |
),
|
2164 |
array(
|
2165 |
'label' => 'URL',
|
2166 |
'id' => 'saswp_event_schema_url_'.$schema_id,
|
2167 |
+
'type' => 'text',
|
|
|
2168 |
),
|
2169 |
);
|
2170 |
break;
|
2608 |
);
|
2609 |
break;
|
2610 |
|
2611 |
+
case 'Product':
|
2612 |
+
|
2613 |
+
$service = new saswp_output_service();
|
2614 |
+
$product_details = $service->saswp_woocommerce_product_details($post_id);
|
2615 |
|
2616 |
$meta_field = array(
|
2617 |
|
2618 |
array(
|
2619 |
+
'label' => 'Name',
|
2620 |
+
'id' => 'saswp_product_schema_name_'.$schema_id,
|
2621 |
+
'type' => 'text',
|
2622 |
+
'default' => saswp_remove_warnings($product_details, 'product_name', 'saswp_string')
|
2623 |
),
|
2624 |
array(
|
2625 |
+
'label' => 'Description',
|
2626 |
+
'id' => 'saswp_product_schema_description_'.$schema_id,
|
2627 |
+
'type' => 'textarea',
|
2628 |
+
'default' => saswp_remove_warnings($product_details, 'product_description', 'saswp_string')
|
2629 |
),
|
2630 |
array(
|
2631 |
+
'label' => 'Image',
|
2632 |
+
'id' => 'saswp_product_schema_image_'.$schema_id,
|
2633 |
+
'type' => 'media',
|
2634 |
),
|
2635 |
array(
|
2636 |
+
'label' => 'Brand Name',
|
2637 |
+
'id' => 'saswp_product_schema_brand_name_'.$schema_id,
|
2638 |
+
'type' => 'text',
|
2639 |
+
'default' => saswp_remove_warnings($product_details, 'product_brand', 'saswp_string')
|
2640 |
),
|
2641 |
array(
|
2642 |
+
'label' => 'Price',
|
2643 |
+
'id' => 'saswp_product_schema_price_'.$schema_id,
|
2644 |
+
'type' => 'text',
|
2645 |
+
'default' => saswp_remove_warnings($product_details, 'product_price', 'saswp_string')
|
2646 |
),
|
2647 |
array(
|
2648 |
+
'label' => 'Price Valid Until',
|
2649 |
+
'id' => 'saswp_product_schema_priceValidUntil_'.$schema_id,
|
2650 |
+
'type' => 'text',
|
2651 |
+
'default' => saswp_remove_warnings($product_details, 'product_priceValidUntil', 'saswp_string')
|
2652 |
),
|
2653 |
array(
|
2654 |
+
'label' => 'Currency',
|
2655 |
+
'id' => 'saswp_product_schema_currency_'.$schema_id,
|
2656 |
+
'type' => 'text',
|
2657 |
+
'default' => saswp_remove_warnings($product_details, 'product_currency', 'saswp_string')
|
2658 |
),
|
2659 |
array(
|
2660 |
'label' => 'Availability',
|
2665 |
'OutOfStock' => 'Out Of Stock',
|
2666 |
'Discontinued' => 'Discontinued',
|
2667 |
'PreOrder' => 'Pre Order',
|
2668 |
+
),
|
2669 |
+
'default' => saswp_remove_warnings($product_details, 'product_availability', 'saswp_string')
|
2670 |
),
|
2671 |
array(
|
2672 |
'label' => 'Condition',
|
2680 |
),
|
2681 |
),
|
2682 |
array(
|
2683 |
+
'label' => 'SKU',
|
2684 |
+
'id' => 'saswp_product_schema_sku_'.$schema_id,
|
2685 |
+
'type' => 'text',
|
2686 |
+
'default' => saswp_remove_warnings($product_details, 'product_sku', 'saswp_string')
|
2687 |
),
|
2688 |
array(
|
2689 |
+
'label' => 'MPN',
|
2690 |
+
'id' => 'saswp_product_schema_mpn_'.$schema_id,
|
2691 |
+
'type' => 'text',
|
2692 |
+
'note' => 'OR',
|
2693 |
+
'default' => saswp_remove_warnings($product_details, 'product_mpn', 'saswp_string')
|
2694 |
),
|
2695 |
array(
|
2696 |
+
'label' => 'ISBN',
|
2697 |
+
'id' => 'saswp_product_schema_isbn_'.$schema_id,
|
2698 |
+
'type' => 'text',
|
2699 |
+
'note' => 'OR',
|
2700 |
+
'default' => saswp_remove_warnings($product_details, 'product_isbn', 'saswp_string')
|
2701 |
),
|
2702 |
array(
|
2703 |
+
'label' => 'GTIN8',
|
2704 |
+
'id' => 'saswp_product_schema_gtin8_'.$schema_id,
|
2705 |
+
'type' => 'text',
|
2706 |
+
'default' => saswp_remove_warnings($product_details, 'product_gtin8', 'saswp_string')
|
2707 |
),
|
2708 |
array(
|
2709 |
'label' => 'Seller Organization',
|
2710 |
+
'id' => 'saswp_product_schema_seller_'.$schema_id,
|
2711 |
+
'type' => 'text',
|
2712 |
),
|
2713 |
array(
|
2714 |
'label' => 'Aggregate Rating',
|
2715 |
+
'id' => 'saswp_product_schema_enable_rating_'.$schema_id,
|
2716 |
+
'type' => 'checkbox',
|
2717 |
),
|
2718 |
array(
|
2719 |
+
'label' => 'Rating',
|
2720 |
+
'id' => 'saswp_product_schema_rating_'.$schema_id,
|
2721 |
+
'type' => 'text',
|
2722 |
+
'default' => saswp_remove_warnings($product_details, 'product_average_rating', 'saswp_string')
|
2723 |
),
|
2724 |
array(
|
2725 |
+
'label' => 'Number of Reviews',
|
2726 |
+
'id' => 'saswp_product_schema_review_count_'.$schema_id,
|
2727 |
+
'type' => 'text',
|
2728 |
+
'default' => saswp_remove_warnings($product_details, 'product_review_count', 'saswp_string')
|
2729 |
),
|
2730 |
|
2731 |
);
|
2732 |
+
|
|
|
|
|
2733 |
break;
|
2734 |
|
2735 |
case 'Service':
|
2736 |
+
|
2737 |
$meta_field = array(
|
2738 |
array(
|
2739 |
'label' => 'Name',
|
2740 |
'id' => 'saswp_service_schema_name_'.$schema_id,
|
2741 |
+
'type' => 'text',
|
|
|
2742 |
),
|
2743 |
array(
|
2744 |
'label' => 'Service Type',
|
2745 |
'id' => 'saswp_service_schema_type_'.$schema_id,
|
2746 |
+
'type' => 'text',
|
|
|
2747 |
),
|
2748 |
array(
|
2749 |
'label' => 'Provider Name',
|
2750 |
'id' => 'saswp_service_schema_provider_name_'.$schema_id,
|
2751 |
+
'type' => 'text',
|
|
|
2752 |
),
|
2753 |
array(
|
2754 |
'label' => 'Provider Type',
|
2764 |
'NGO' => 'NGO',
|
2765 |
'PerformingGroup' => 'Performing Group',
|
2766 |
'SportsOrganization' => 'Sports Organization',
|
2767 |
+
),
|
|
|
2768 |
),
|
2769 |
array(
|
2770 |
'label' => 'Image',
|
2771 |
'id' => 'saswp_service_schema_image_'.$schema_id,
|
2772 |
+
'type' => 'media',
|
|
|
2773 |
),
|
2774 |
array(
|
2775 |
'label' => 'Locality',
|
2776 |
'id' => 'saswp_service_schema_locality_'.$schema_id,
|
2777 |
+
'type' => 'text',
|
|
|
2778 |
),
|
2779 |
array(
|
2780 |
'label' => 'Postal Code',
|
2781 |
'id' => 'saswp_service_schema_postal_code_'.$schema_id,
|
2782 |
+
'type' => 'text',
|
|
|
2783 |
),
|
2784 |
array(
|
2785 |
'label' => 'Telephone',
|
2786 |
'id' => 'saswp_service_schema_telephone_'.$schema_id,
|
2787 |
+
'type' => 'text',
|
|
|
2788 |
),
|
2789 |
array(
|
2790 |
'label' => 'Price Range',
|
2791 |
'id' => 'saswp_service_schema_price_range_'.$schema_id,
|
2792 |
+
'type' => 'text',
|
|
|
2793 |
),
|
2794 |
array(
|
2795 |
'label' => 'Description',
|
2796 |
'id' => 'saswp_service_schema_description_'.$schema_id,
|
2797 |
+
'type' => 'textarea',
|
|
|
2798 |
),
|
2799 |
array(
|
2800 |
'label' => 'Area Served (City)',
|
2801 |
'id' => 'saswp_service_schema_area_served_'.$schema_id,
|
2802 |
+
'type' => 'textarea',
|
|
|
2803 |
'note' => 'Note: Enter all the City name in comma separated',
|
2804 |
'attributes' => array(
|
2805 |
'placeholder' => 'New York, Los Angeles'
|
2808 |
array(
|
2809 |
'label' => 'Service Offer',
|
2810 |
'id' => 'saswp_service_schema_service_offer_'.$schema_id,
|
2811 |
+
'type' => 'textarea',
|
|
|
2812 |
'note' => 'Note: Enter all the service offer in comma separated',
|
2813 |
'attributes' => array(
|
2814 |
'placeholder' => 'Apartment light cleaning, carpet cleaning'
|
2818 |
array(
|
2819 |
'label' => 'Aggregate Rating',
|
2820 |
'id' => 'saswp_service_schema_enable_rating_'.$schema_id,
|
2821 |
+
'type' => 'checkbox',
|
|
|
2822 |
),
|
2823 |
array(
|
2824 |
'label' => 'Rating',
|
2825 |
'id' => 'saswp_service_schema_rating_'.$schema_id,
|
2826 |
+
'type' => 'text',
|
|
|
2827 |
),
|
2828 |
array(
|
2829 |
'label' => 'Number of Reviews',
|
2830 |
'id' => 'saswp_service_schema_review_count_'.$schema_id,
|
2831 |
+
'type' => 'text',
|
|
|
2832 |
),
|
2833 |
|
2834 |
);
|
2878 |
'Movie' => 'Movie',
|
2879 |
'MusicPlaylist' => 'Music Playlist',
|
2880 |
'MusicRecording' => 'MusicRecording',
|
2881 |
+
'Photograph' => 'Photograph',
|
|
|
2882 |
'Restaurant' => 'Restaurant',
|
2883 |
+
'Series' => 'Series',
|
|
|
2884 |
'VisualArtwork' => 'Visual Artwork',
|
2885 |
'Webpage' => 'Webpage',
|
2886 |
'WebSite' => 'WebSite',
|
2887 |
+
),
|
|
|
2888 |
),
|
2889 |
array(
|
2890 |
'label' => 'Review Rating',
|
2891 |
'id' => 'saswp_review_schema_enable_rating_'.$schema_id,
|
2892 |
+
'type' => 'checkbox',
|
|
|
2893 |
),
|
2894 |
array(
|
2895 |
'label' => 'Rating Value',
|
2896 |
'id' => 'saswp_review_schema_rating_'.$schema_id,
|
2897 |
+
'type' => 'text',
|
|
|
2898 |
),
|
2899 |
array(
|
2900 |
'label' => 'Best Rating',
|
2901 |
'id' => 'saswp_review_schema_review_count_'.$schema_id,
|
2902 |
+
'type' => 'text',
|
|
|
2903 |
),
|
2904 |
|
2905 |
|
2908 |
break;
|
2909 |
|
2910 |
case 'AudioObject':
|
2911 |
+
|
|
|
2912 |
$meta_field = array(
|
2913 |
|
2914 |
array(
|
2915 |
'label' => 'Name',
|
2916 |
'id' => 'saswp_audio_schema_name_'.$schema_id,
|
2917 |
+
'type' => 'text',
|
|
|
2918 |
),
|
2919 |
array(
|
2920 |
'label' => 'Description',
|
2921 |
'id' => 'saswp_audio_schema_description_'.$schema_id,
|
2922 |
+
'type' => 'textarea',
|
|
|
2923 |
),
|
2924 |
array(
|
2925 |
'label' => 'Content Url',
|
2926 |
'id' => 'saswp_audio_schema_contenturl_'.$schema_id,
|
2927 |
+
'type' => 'text',
|
|
|
2928 |
),
|
2929 |
array(
|
2930 |
'label' => 'Duration',
|
2931 |
'id' => 'saswp_audio_schema_duration_'.$schema_id,
|
2932 |
+
'type' => 'text',
|
|
|
2933 |
),
|
2934 |
array(
|
2935 |
'label' => 'Encoding Format',
|
2936 |
'id' => 'saswp_audio_schema_encoding_format_'.$schema_id,
|
2937 |
+
'type' => 'text',
|
|
|
2938 |
),
|
2939 |
array(
|
2940 |
'label' => 'Date Published',
|
2951 |
array(
|
2952 |
'label' => 'Author Name',
|
2953 |
'id' => 'saswp_audio_schema_author_name_'.$schema_id,
|
2954 |
+
'type' => 'text',
|
|
|
2955 |
),
|
2956 |
array(
|
2957 |
'label' => 'Author Description',
|
2964 |
break;
|
2965 |
|
2966 |
case 'SoftwareApplication':
|
2967 |
+
|
|
|
2968 |
$meta_field = array(
|
2969 |
|
2970 |
array(
|
2971 |
'label' => 'Name',
|
2972 |
'id' => 'saswp_software_schema_name_'.$schema_id,
|
2973 |
+
'type' => 'text',
|
|
|
2974 |
),
|
2975 |
array(
|
2976 |
'label' => 'Description',
|
2977 |
'id' => 'saswp_software_schema_description_'.$schema_id,
|
2978 |
+
'type' => 'textarea',
|
|
|
2979 |
),
|
2980 |
array(
|
2981 |
'label' => 'Operating System',
|
2982 |
'id' => 'saswp_software_schema_operating_system_'.$schema_id,
|
2983 |
+
'type' => 'text',
|
|
|
2984 |
),
|
2985 |
array(
|
2986 |
'label' => 'Application Category',
|
2987 |
'id' => 'saswp_software_schema_application_category_'.$schema_id,
|
2988 |
+
'type' => 'text',
|
|
|
2989 |
),
|
2990 |
array(
|
2991 |
'label' => 'Price',
|
2992 |
'id' => 'saswp_software_schema_price_'.$schema_id,
|
2993 |
+
'type' => 'text',
|
|
|
2994 |
),
|
2995 |
array(
|
2996 |
'label' => 'Price Currency',
|
2997 |
'id' => 'saswp_software_schema_price_currency_'.$schema_id,
|
2998 |
+
'type' => 'text',
|
|
|
2999 |
),
|
3000 |
array(
|
3001 |
'label' => 'Date Published',
|
3017 |
array(
|
3018 |
'label' => 'Rating',
|
3019 |
'id' => 'saswp_software_schema_rating_'.$schema_id,
|
3020 |
+
'type' => 'text',
|
|
|
3021 |
),
|
3022 |
array(
|
3023 |
'label' => 'Rating Count',
|
3024 |
'id' => 'saswp_software_schema_rating_count_'.$schema_id,
|
3025 |
+
'type' => 'text',
|
|
|
3026 |
),
|
3027 |
);
|
3028 |
break;
|
view/review.php
CHANGED
@@ -76,7 +76,7 @@ class saswp_metaboxes_review {
|
|
76 |
$saswp_review_item_feature = array();
|
77 |
$saswp_review_item_star_rating = array();
|
78 |
|
79 |
-
$saswp_review_details =
|
80 |
|
81 |
if(isset($saswp_review_details['saswp-review-item-feature'])){
|
82 |
$saswp_review_item_feature = $saswp_review_details['saswp-review-item-feature'];
|
76 |
$saswp_review_item_feature = array();
|
77 |
$saswp_review_item_star_rating = array();
|
78 |
|
79 |
+
$saswp_review_details = get_post_meta($post->ID, 'saswp_review_details', true);
|
80 |
|
81 |
if(isset($saswp_review_details['saswp-review-item-feature'])){
|
82 |
$saswp_review_item_feature = $saswp_review_details['saswp-review-item-feature'];
|
view/schema_type.php
CHANGED
@@ -140,11 +140,7 @@ function saswp_item_reviewed_fields($item, $post_specific = null, $schema_id = n
|
|
140 |
|
141 |
switch ($item) {
|
142 |
|
143 |
-
|
144 |
-
|
145 |
-
$reviewed_field = array();
|
146 |
-
|
147 |
-
break;
|
148 |
case 'Adultentertainment':
|
149 |
|
150 |
$reviewed_field;
|
@@ -219,28 +215,7 @@ function saswp_item_reviewed_fields($item, $post_specific = null, $schema_id = n
|
|
219 |
|
220 |
);
|
221 |
|
222 |
-
break;
|
223 |
-
case 'casino':
|
224 |
-
|
225 |
-
$reviewed_field = $reviewed_field;
|
226 |
-
|
227 |
-
break;
|
228 |
-
case 'Diet':
|
229 |
-
|
230 |
-
$reviewed_field = array();
|
231 |
-
|
232 |
-
break;
|
233 |
-
case 'Episode':
|
234 |
-
|
235 |
-
$reviewed_field = array();
|
236 |
-
|
237 |
-
break;
|
238 |
-
case 'ExercisePlan':
|
239 |
-
$reviewed_field = array();
|
240 |
-
break;
|
241 |
-
case 'Game':
|
242 |
-
$reviewed_field = array();
|
243 |
-
break;
|
244 |
case 'Movie':
|
245 |
$reviewed_field = array(
|
246 |
array(
|
@@ -299,19 +274,7 @@ function saswp_item_reviewed_fields($item, $post_specific = null, $schema_id = n
|
|
299 |
)
|
300 |
|
301 |
);
|
302 |
-
break;
|
303 |
-
case 'MusicPlaylist':
|
304 |
-
$reviewed_field = array();
|
305 |
-
break;
|
306 |
-
case 'MusicRecording':
|
307 |
-
$reviewed_field = array();
|
308 |
-
break;
|
309 |
-
case 'Photograph':
|
310 |
-
$reviewed_field = array();
|
311 |
-
break;
|
312 |
-
case 'Recipe':
|
313 |
-
$reviewed_field = array();
|
314 |
-
break;
|
315 |
case 'Restaurant':
|
316 |
$reviewed_field[] = array(
|
317 |
'label' => 'Serves Cuisine',
|
@@ -331,19 +294,7 @@ function saswp_item_reviewed_fields($item, $post_specific = null, $schema_id = n
|
|
331 |
'placeholder' => 'https://example.com/menu'
|
332 |
)
|
333 |
);
|
334 |
-
break;
|
335 |
-
case 'Series':
|
336 |
-
$reviewed_field = array();
|
337 |
-
break;
|
338 |
-
case 'SoftwareApplication':
|
339 |
-
$reviewed_field = array();
|
340 |
-
break;
|
341 |
-
case 'VisualArtwork':
|
342 |
-
$reviewed_field = array();
|
343 |
-
break;
|
344 |
-
case 'WebPage':
|
345 |
-
$reviewed_field = array();
|
346 |
-
break;
|
347 |
case 'WebSite':
|
348 |
$reviewed_field = array(
|
349 |
array(
|
@@ -398,7 +349,6 @@ function saswp_get_item_reviewed_fields(){
|
|
398 |
|
399 |
foreach ($meta_fields as $meta_field){
|
400 |
|
401 |
-
|
402 |
$attributes ='';
|
403 |
|
404 |
if(isset($meta_field['attributes'])){
|
@@ -415,7 +365,6 @@ function saswp_get_item_reviewed_fields(){
|
|
415 |
|
416 |
$meta_value = get_post_meta( $post_id, $meta_field['id'], true );
|
417 |
|
418 |
-
|
419 |
if(!$meta_value){
|
420 |
|
421 |
$schema_data = get_post_meta( $schema_id, 'saswp_review_schema_details', true );
|
@@ -463,7 +412,6 @@ function saswp_get_item_reviewed_fields(){
|
|
463 |
|
464 |
}
|
465 |
|
466 |
-
|
467 |
if(!empty($media_value_meta)){
|
468 |
|
469 |
$media_value = $media_value_meta;
|
@@ -563,6 +511,22 @@ function saswp_schema_type_get_meta( $value ) {
|
|
563 |
return false;
|
564 |
}
|
565 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
566 |
/**
|
567 |
* Function to generate html markup for schema type metabox
|
568 |
* @param type $post
|
@@ -571,125 +535,208 @@ function saswp_schema_type_get_meta( $value ) {
|
|
571 |
*/
|
572 |
function saswp_schema_type_meta_box_callback( $post) {
|
573 |
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
if($post){
|
596 |
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
|
|
601 |
|
602 |
-
|
603 |
|
604 |
-
|
605 |
|
606 |
-
|
607 |
|
608 |
-
|
609 |
|
610 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
611 |
|
612 |
-
|
613 |
|
614 |
-
|
615 |
|
616 |
-
|
617 |
|
618 |
-
|
619 |
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
|
|
|
|
|
|
|
|
|
|
624 |
|
625 |
-
|
626 |
|
627 |
-
|
628 |
|
629 |
-
|
630 |
|
631 |
-
|
632 |
|
633 |
-
|
634 |
|
635 |
-
|
636 |
|
637 |
-
|
|
|
|
|
|
|
|
|
|
|
638 |
|
639 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
640 |
|
641 |
-
|
642 |
|
643 |
-
|
644 |
|
645 |
-
|
|
|
|
|
|
|
646 |
|
647 |
-
|
648 |
|
649 |
-
|
650 |
|
651 |
-
|
652 |
|
653 |
-
|
|
|
|
|
|
|
|
|
|
|
654 |
|
655 |
-
|
656 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
657 |
|
658 |
-
|
659 |
|
660 |
-
|
661 |
|
662 |
-
|
663 |
|
664 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
665 |
|
666 |
-
|
667 |
-
|
668 |
-
$style_business_type = 'style="display:none"';
|
669 |
-
$style_business_name = 'style="display:none"';
|
670 |
-
|
671 |
-
}
|
672 |
-
}
|
673 |
-
|
674 |
-
$provider_type = array(
|
675 |
-
'Airline' => 'Airline',
|
676 |
-
'Corporation' => 'Corporation',
|
677 |
-
'EducationalOrganization' => 'Educational Organization',
|
678 |
-
'GovernmentOrganization' => 'Government Organization',
|
679 |
-
'LocalBusiness' => 'Local Business',
|
680 |
-
'MedicalOrganization' => 'Medical Organization',
|
681 |
-
'NGO' => 'NGO',
|
682 |
-
'PerformingGroup' => 'Performing Group',
|
683 |
-
'SportsOrganization' => 'Sports Organization',
|
684 |
-
);
|
685 |
-
|
686 |
-
$availability = array(
|
687 |
-
'InStock' => 'In Stock',
|
688 |
-
'OutOfStock' => 'Out Of Stock',
|
689 |
-
'Discontinued' => 'Discontinued',
|
690 |
-
'PreOrder' => 'Pre Order',
|
691 |
-
);
|
692 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
693 |
$item_reviewed = array(
|
694 |
'Article' => 'Article',
|
695 |
'Adultentertainment' => 'Adult Entertainment',
|
@@ -722,9 +769,7 @@ function saswp_schema_type_meta_box_callback( $post) {
|
|
722 |
if ( file_exists( $mappings_sub_business ) ) {
|
723 |
$sub_business_arr = include $mappings_sub_business;
|
724 |
}
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
$all_business_type = array(
|
729 |
'' => 'Select Business Type (Optional)',
|
730 |
'animalshelter' => 'Animal Shelter',
|
@@ -832,8 +877,8 @@ function saswp_schema_type_meta_box_callback( $post) {
|
|
832 |
<td><?php echo esc_html__('Sub Business Type', 'schema-and-structured-data-for-wp' ); ?></td>
|
833 |
<td>
|
834 |
<select id="saswp_automotive" name="saswp_business_name">
|
|
|
835 |
<?php
|
836 |
-
|
837 |
foreach ($all_automotive_array as $key => $value) {
|
838 |
$sel = '';
|
839 |
if($business_name==$key){
|
@@ -842,6 +887,7 @@ function saswp_schema_type_meta_box_callback( $post) {
|
|
842 |
echo "<option value='".esc_attr($key)."' ".esc_attr($sel).">".esc_html__($value, 'schema-and-structured-data-for-wp' )."</option>";
|
843 |
}
|
844 |
?>
|
|
|
845 |
</select>
|
846 |
</td>
|
847 |
|
@@ -904,8 +950,6 @@ function saswp_schema_type_meta_box_callback( $post) {
|
|
904 |
<td>
|
905 |
<select id="saswp_financial_service" name="saswp_business_name">
|
906 |
<?php
|
907 |
-
|
908 |
-
|
909 |
foreach ($all_financial_array as $key => $value) {
|
910 |
$sel = '';
|
911 |
if($business_name == $key){
|
@@ -920,9 +964,8 @@ function saswp_schema_type_meta_box_callback( $post) {
|
|
920 |
<tr class="saswp-foodestablishment-tr" <?php if(!array_key_exists($business_name, $all_food_establishment_array)){ echo 'style="display:none;"';}else{ echo $style_business_name;} ?>>
|
921 |
<td><?php echo esc_html__('Sub Business Type', 'schema-and-structured-data-for-wp' ); ?></td>
|
922 |
<td>
|
923 |
-
<select id="saswp_food_establishment" name="saswp_business_name">
|
924 |
<?php
|
925 |
-
|
926 |
foreach ($all_food_establishment_array as $key => $value) {
|
927 |
$sel = '';
|
928 |
if($business_name==$key){
|
@@ -1037,239 +1080,15 @@ function saswp_schema_type_meta_box_callback( $post) {
|
|
1037 |
?>
|
1038 |
</select>
|
1039 |
</td>
|
1040 |
-
</tr>
|
1041 |
-
<tr class="saswp-business-text-field-tr" <?php echo $style_business_type; ?>>
|
1042 |
-
<td><?php echo esc_html__('Business Name', 'schema-and-structured-data-for-wp' ); ?></td>
|
1043 |
-
<td><input value="<?php if(isset($business_details['local_business_name'])) { echo esc_attr($business_details['local_business_name']); } ?>" type="text" name="local_business_name" placeholder="<?php echo esc_html__('Business Name', 'schema-and-structured-data-for-wp' ); ?>"></td>
|
1044 |
-
</tr>
|
1045 |
-
<tr class="saswp-business-text-field-tr" <?php echo $style_business_type; ?>>
|
1046 |
-
<td><?php echo esc_html__('Description', 'schema-and-structured-data-for-wp' ); ?></td>
|
1047 |
-
<td><textarea placeholder="Description" rows="3" cols="70" name="local_business_description"><?php if(isset($business_details['local_business_description'])){echo esc_attr($business_details['local_business_description']); } ?></textarea></td>
|
1048 |
-
</tr>
|
1049 |
-
<tr class="saswp-business-text-field-tr" <?php echo $style_business_type; ?>>
|
1050 |
-
<td><?php echo esc_html__('Street Address', 'schema-and-structured-data-for-wp' ); ?></td>
|
1051 |
-
<td><input value="<?php if(isset($business_details['local_street_address'])) { echo esc_attr($business_details['local_street_address']); } ?>" type="text" name="local_street_address" placeholder="<?php echo esc_html__('Street Address', 'schema-and-structured-data-for-wp' ); ?>"></td>
|
1052 |
-
</tr>
|
1053 |
-
<tr class="saswp-business-text-field-tr" <?php echo $style_business_type; ?>>
|
1054 |
-
<td><?php echo esc_html__('City', 'schema-and-structured-data-for-wp' ); ?></td>
|
1055 |
-
<td><input value="<?php if(isset($business_details['local_city'])){ echo esc_attr($business_details['local_city']);} ?>" type="text" name="local_city" placeholder="<?php echo esc_html__('City', 'schema-and-structured-data-for-wp' ); ?>"></td>
|
1056 |
-
</tr>
|
1057 |
-
<tr class="saswp-business-text-field-tr" <?php echo $style_business_type; ?>>
|
1058 |
-
<td><?php echo esc_html__('State', 'schema-and-structured-data-for-wp' ); ?></td>
|
1059 |
-
<td><input value="<?php if(isset($business_details['local_state'])){echo esc_attr($business_details['local_state']);} ?>" type="text" name="local_state" placeholder="<?php echo esc_html__('State', 'schema-and-structured-data-for-wp' ); ?>"></td>
|
1060 |
-
</tr>
|
1061 |
-
<tr class="saswp-business-text-field-tr" <?php echo $style_business_type; ?>>
|
1062 |
-
<td><?php echo esc_html__('Postal Code', 'schema-and-structured-data-for-wp' ); ?></td>
|
1063 |
-
<td><input value="<?php if(isset($business_details['local_postal_code'])) {echo esc_attr($business_details['local_postal_code']); } ?>" type="text" name="local_postal_code" placeholder="<?php echo esc_html__('Postal Code', 'schema-and-structured-data-for-wp' ); ?>"></td>
|
1064 |
-
</tr>
|
1065 |
-
<tr class="saswp-business-text-field-tr" <?php echo $style_business_type; ?>>
|
1066 |
-
<td><?php echo esc_html__('Latitude', 'schema-and-structured-data-for-wp' ); ?></td>
|
1067 |
-
<td><input value="<?php if(isset($business_details['local_latitude'])) {echo esc_attr($business_details['local_latitude']); } ?>" type="text" name="local_latitude" placeholder="<?php echo esc_html__('40.761293', 'schema-and-structured-data-for-wp' ); ?>"></td>
|
1068 |
-
</tr>
|
1069 |
-
|
1070 |
-
<tr class="saswp-business-text-field-tr" <?php echo $style_business_type; ?>>
|
1071 |
-
<td><?php echo esc_html__('Longitude', 'schema-and-structured-data-for-wp' ); ?></td>
|
1072 |
-
<td><input value="<?php if(isset($business_details['local_longitude'])) {echo esc_attr($business_details['local_longitude']); } ?>" type="text" name="local_longitude" placeholder="<?php echo esc_html__('-73.982294', 'schema-and-structured-data-for-wp' ); ?>"></td>
|
1073 |
-
</tr>
|
1074 |
-
<tr class="saswp-business-text-field-tr" <?php echo $style_business_type; ?>>
|
1075 |
-
<td><?php echo esc_html__('Phone', 'schema-and-structured-data-for-wp' ); ?></td>
|
1076 |
-
<td><input value="<?php if(isset($business_details['local_phone'])){echo esc_attr($business_details['local_phone']); } ?>" type="text" name="local_phone" placeholder="<?php echo esc_html__('Phone', 'schema-and-structured-data-for-wp' ); ?>"></td>
|
1077 |
-
</tr>
|
1078 |
-
<tr class="saswp-business-text-field-tr" <?php echo $style_business_type; ?>>
|
1079 |
-
<td><?php echo esc_html__('Website', 'schema-and-structured-data-for-wp' ); ?></td>
|
1080 |
-
<td><input value="<?php if(isset($business_details['local_website'])){echo esc_attr($business_details['local_website']); }else{ echo site_url();} ?>" type="text" name="local_website" placeholder="<?php echo esc_html__('Website', 'schema-and-structured-data-for-wp' ); ?>"></td>
|
1081 |
-
</tr>
|
1082 |
-
<tr class="saswp-business-text-field-tr" <?php echo $style_business_type; ?>>
|
1083 |
-
<td><?php echo esc_html__('Image', 'schema-and-structured-data-for-wp' ); ?></td>
|
1084 |
-
<td style="display: flex; width: 97%">
|
1085 |
-
<input value="<?php if(isset($business_details['local_business_logo'])) { echo esc_url($business_details['local_business_logo']['url']);} else { echo esc_url(saswp_remove_warnings($logo, 0, 'saswp_string')); } ?>" id="local_business_logo" type="text" name="local_business_logo[url]" placeholder="<?php echo esc_html__('Image', 'schema-and-structured-data-for-wp' ); ?>" readonly="readonly" style="background: #FFF;">
|
1086 |
-
<input value="<?php if(isset($business_details['local_business_logo'])) { echo esc_attr($business_details['local_business_logo']['id']);} else { echo esc_attr($custom_logo_id); }?>" data-id="local_business_logo_id" type="hidden" name="local_business_logo[id]">
|
1087 |
-
<input value="<?php if(isset($business_details['local_business_logo'])) { echo esc_attr($business_details['local_business_logo']['width']);} else { echo esc_attr(saswp_remove_warnings($logo, 1, 'saswp_string')); } ?>" data-id="local_business_logo_width" type="hidden" name="local_business_logo[width]">
|
1088 |
-
<input value="<?php if(isset($business_details['local_business_logo'])) { echo esc_attr($business_details['local_business_logo']['height']);} else { echo esc_attr(saswp_remove_warnings($logo, 2, 'saswp_string')); } ?>" data-id="local_business_logo_height" type="hidden" name="local_business_logo[height]">
|
1089 |
-
<input data-id="media" class="button" id="local_business_logo_button" type="button" value="Upload"></td>
|
1090 |
-
</tr>
|
1091 |
-
<tr class="saswp-business-text-field-tr" <?php echo $style_business_type; ?>>
|
1092 |
-
<td><?php echo esc_html__('Operation Days', 'schema-and-structured-data-for-wp' ); ?></td>
|
1093 |
-
<td>
|
1094 |
-
<textarea id="saswp_dayofweek" placeholder="Mo-Sa 11:00-14:30 <?="\n"?>Mo-Th 17:00-21:30 <?="\n"?>Fr-Sa 17:00-22:00" rows="5" cols="70" name="saswp_dayofweek"><?php if(isset($dayoftheweek)){echo $dayoftheweek; } ?></textarea>
|
1095 |
-
<p><?php echo esc_html__( 'Note: Enter days and time in given format', 'schema-and-structured-data-for-wp' ); ?></p>
|
1096 |
-
</td>
|
1097 |
-
</tr>
|
1098 |
-
|
1099 |
-
<tr class="saswp-business-text-field-tr" <?php echo $style_business_type; ?>>
|
1100 |
-
<td><?php echo esc_html__('Price Range', 'schema-and-structured-data-for-wp' ); ?></td>
|
1101 |
-
<td><input value="<?php if(isset($business_details['local_price_range'])){echo esc_attr($business_details['local_price_range']); } ?>" type="text" name="local_price_range" placeholder="<?php echo esc_html__('$10-$50 or $$$ ', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1102 |
-
</tr>
|
1103 |
-
|
1104 |
-
<tr class="saswp-business-text-field-tr" <?php echo $style_business_type; ?>>
|
1105 |
-
<td><?php echo esc_html__('Menu', 'schema-and-structured-data-for-wp' ); ?></td>
|
1106 |
-
<td><input value="<?php if(isset($business_details['local_menu'])){echo esc_attr($business_details['local_menu']); } ?>" type="text" name="local_menu" placeholder="<?php echo esc_html__('http://www.example.com/menu', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1107 |
-
</tr>
|
1108 |
-
|
1109 |
-
<tr class="saswp-business-text-field-tr" <?php echo $style_business_type; ?>>
|
1110 |
-
<td><?php echo esc_html__('HasMap', 'schema-and-structured-data-for-wp' ); ?></td>
|
1111 |
-
<td><input value="<?php if(isset($business_details['local_hasmap'])){echo esc_attr($business_details['local_hasmap']); } ?>" type="text" name="local_hasmap" placeholder="https://goo.gl/maps/tb9hzMLNp942" ></td>
|
1112 |
-
</tr>
|
1113 |
-
|
1114 |
-
<tr class="saswp-business-text-field-tr" <?php echo $style_business_type; ?>>
|
1115 |
-
<td><?php echo esc_html__('Serves Cuisine', 'schema-and-structured-data-for-wp' ); ?></td>
|
1116 |
-
<td><input value="<?php echo (isset($business_details['local_serves_cuisine'])? esc_attr($business_details['local_serves_cuisine']): ''); ?>" type="text" name="local_serves_cuisine" placeholder="<?php echo esc_html__('American, Chinese', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1117 |
-
</tr>
|
1118 |
-
|
1119 |
-
<tr class="saswp-business-text-field-tr" <?php echo $style_business_type; ?>>
|
1120 |
-
<td><?php echo esc_html__('Facebook', 'schema-and-structured-data-for-wp' ); ?></td>
|
1121 |
-
<td><input value="<?php echo (isset($business_details['local_facebook'])? esc_attr($business_details['local_facebook']): ''); ?>" type="text" name="local_facebook" placeholder="<?php echo esc_html__('https://facebook.com/examplepage', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1122 |
-
</tr>
|
1123 |
-
|
1124 |
-
<tr class="saswp-business-text-field-tr" <?php echo $style_business_type; ?>>
|
1125 |
-
<td><?php echo esc_html__('Twitter', 'schema-and-structured-data-for-wp' ); ?></td>
|
1126 |
-
<td><input value="<?php echo (isset($business_details['local_twitter'])? esc_attr($business_details['local_twitter']): ''); ?>" type="text" name="local_twitter" placeholder="<?php echo esc_html__('https://twitter.com/examplepage', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1127 |
-
</tr>
|
1128 |
|
1129 |
-
<tr class="saswp-business-text-field-tr" <?php echo $style_business_type; ?>>
|
1130 |
-
<td><?php echo esc_html__('Instagram', 'schema-and-structured-data-for-wp' ); ?></td>
|
1131 |
-
<td><input value="<?php echo (isset($business_details['local_instagram'])? esc_attr($business_details['local_instagram']): ''); ?>" type="text" name="local_instagram" placeholder="<?php echo esc_html__('https://instagram.com/examplepage', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1132 |
-
</tr>
|
1133 |
-
|
1134 |
-
<tr class="saswp-business-text-field-tr" <?php echo $style_business_type; ?>>
|
1135 |
-
<td><?php echo esc_html__('Pinterest', 'schema-and-structured-data-for-wp' ); ?></td>
|
1136 |
-
<td><input value="<?php echo (isset($business_details['local_pinterest'])? esc_attr($business_details['local_pinterest']): ''); ?>" type="text" name="local_pinterest" placeholder="<?php echo esc_html__('https://pinterest.com/examplepage', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1137 |
-
</tr>
|
1138 |
-
<tr class="saswp-business-text-field-tr" <?php echo $style_business_type; ?>>
|
1139 |
-
<td><?php echo esc_html__('LinkedIn', 'schema-and-structured-data-for-wp' ); ?></td>
|
1140 |
-
<td><input value="<?php echo (isset($business_details['local_linkedin'])? esc_attr($business_details['local_linkedin']): ''); ?>" type="text" name="local_linkedin" placeholder="<?php echo esc_html__('https://linkedin.com/examplepage', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1141 |
-
</tr>
|
1142 |
-
|
1143 |
-
<tr class="saswp-business-text-field-tr" <?php echo $style_business_type; ?>>
|
1144 |
-
<td><?php echo esc_html__('SoundCloud', 'schema-and-structured-data-for-wp' ); ?></td>
|
1145 |
-
<td><input value="<?php echo (isset($business_details['local_soundcloud'])? esc_attr($business_details['local_soundcloud']): ''); ?>" type="text" name="local_soundcloud" placeholder="<?php echo esc_html__('https://soundcloud.com//examplepage', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1146 |
-
</tr>
|
1147 |
-
|
1148 |
-
<tr class="saswp-business-text-field-tr" <?php echo $style_business_type; ?>>
|
1149 |
-
<td><?php echo esc_html__('Tumblr', 'schema-and-structured-data-for-wp' ); ?></td>
|
1150 |
-
<td><input value="<?php echo (isset($business_details['local_tumblr'])? esc_attr($business_details['local_tumblr']): ''); ?>" type="text" name="local_tumblr" placeholder="<?php echo esc_html__('https://tumblr.com//examplepage', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1151 |
-
</tr>
|
1152 |
-
|
1153 |
-
<tr class="saswp-business-text-field-tr" <?php echo $style_business_type; ?>>
|
1154 |
-
<td><?php echo esc_html__('Youtube', 'schema-and-structured-data-for-wp' ); ?></td>
|
1155 |
-
<td><input value="<?php echo (isset($business_details['local_youtube'])? esc_attr($business_details['local_youtube']): ''); ?>" type="text" name="local_youtube" placeholder="<?php echo esc_html__('https://youtube.com//examplepage', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1156 |
-
</tr>
|
1157 |
-
|
1158 |
-
<tr class="saswp-business-text-field-tr" <?php echo $style_business_type; ?>>
|
1159 |
-
<td><?php echo esc_html__('Aggregate Rating', 'schema-and-structured-data-for-wp' ); ?></td>
|
1160 |
-
<td>
|
1161 |
-
<input class="saswp-enable-rating-review-local_business" type="checkbox" name="local_enable_rating" value="1" <?php if(isset($business_details['local_enable_rating'])){echo 'checked'; }else{ echo ''; } ?>>
|
1162 |
-
</td>
|
1163 |
-
</tr>
|
1164 |
-
<tr class="saswp-business-text-field-tr saswp-rating-review-local_business">
|
1165 |
-
<td><?php echo esc_html__('Rating', 'schema-and-structured-data-for-wp' ); ?></td>
|
1166 |
-
<td><input value="<?php if(isset($business_details['local_rating'])){echo esc_attr($business_details['local_rating']); } ?>" type="text" name="local_rating" placeholder="<?php echo esc_html__('5.0', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1167 |
-
</tr>
|
1168 |
-
<tr class="saswp-business-text-field-tr saswp-rating-review-local_business" <?php echo $style_business_type; ?>>
|
1169 |
-
<td><?php echo esc_html__('Number of Reviews', 'schema-and-structured-data-for-wp' ); ?></td>
|
1170 |
-
<td><input value="<?php if(isset($business_details['local_review_count'])){echo esc_attr($business_details['local_review_count']); } ?>" type="text" name="local_review_count" placeholder="<?php echo esc_html__('10', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1171 |
-
</tr>
|
1172 |
-
|
1173 |
-
<!-- Service Schema type starts here -->
|
1174 |
-
|
1175 |
-
<tr class="saswp-service-text-field-tr" <?php echo $style_service_name; ?>>
|
1176 |
-
<td><?php echo esc_html__('Name', 'schema-and-structured-data-for-wp' ); ?></td>
|
1177 |
-
<td><input value="<?php if(isset($service_details['saswp_service_schema_name'])){echo esc_attr($service_details['saswp_service_schema_name']); } ?>" type="text" name="saswp_service_schema_name" placeholder="<?php echo esc_html__('Name', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1178 |
-
</tr>
|
1179 |
-
<tr class="saswp-service-text-field-tr" <?php echo $style_service_name; ?>>
|
1180 |
-
<td><?php echo esc_html__('Service Type', 'schema-and-structured-data-for-wp' ); ?></td>
|
1181 |
-
<td>
|
1182 |
-
<input value="<?php if(isset($service_details['saswp_service_schema_type'])){echo esc_attr($service_details['saswp_service_schema_type']); } ?>" type="text" name="saswp_service_schema_type" placeholder="<?php echo esc_html__('Service Type', 'schema-and-structured-data-for-wp' ); ?>" >
|
1183 |
-
<p><?php echo esc_html__('The type of service being offered, e.g. veterans benefits, emergency relief, etc.', 'schema-and-structured-data-for-wp' ); ?></p>
|
1184 |
-
</td>
|
1185 |
-
</tr>
|
1186 |
-
<tr class="saswp-service-text-field-tr" <?php echo $style_service_name; ?>>
|
1187 |
-
<td><?php echo esc_html__('Provider Name', 'schema-and-structured-data-for-wp' ); ?></td>
|
1188 |
-
<td><input value="<?php if(isset($service_details['saswp_service_schema_provider_name'])){echo esc_attr($service_details['saswp_service_schema_provider_name']); } ?>" type="text" name="saswp_service_schema_provider_name" placeholder="<?php echo esc_html__('Provider Name', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1189 |
-
</tr>
|
1190 |
-
<tr class="saswp-service-text-field-tr" <?php echo $style_service_name; ?>>
|
1191 |
-
<td><?php echo esc_html__('Provider Type', 'schema-and-structured-data-for-wp' ); ?></td>
|
1192 |
-
<td>
|
1193 |
-
<select name="saswp_service_schema_provider_type">
|
1194 |
-
<?php
|
1195 |
-
|
1196 |
-
foreach ($provider_type as $key => $value) {
|
1197 |
-
|
1198 |
-
$sel = '';
|
1199 |
-
if(saswp_remove_warnings($service_details, 'saswp_service_schema_provider_type', 'saswp_string')==$key){
|
1200 |
-
$sel = 'selected';
|
1201 |
-
}
|
1202 |
-
echo "<option value='".esc_attr($key)."' ".esc_attr($sel).">".esc_html__($value, 'schema-and-structured-data-for-wp' )."</option>";
|
1203 |
-
|
1204 |
-
}
|
1205 |
-
?>
|
1206 |
-
</select>
|
1207 |
-
|
1208 |
-
</td>
|
1209 |
-
</tr>
|
1210 |
-
<tr class="saswp-service-text-field-tr" <?php echo $style_service_name; ?>>
|
1211 |
-
<td><?php echo esc_html__('Image', 'schema-and-structured-data-for-wp' ); ?></td>
|
1212 |
-
<td style="display: flex; width: 97%">
|
1213 |
-
<input value="<?php if(isset($service_details['saswp_service_schema_image'])) { echo esc_url($service_details['saswp_service_schema_image']['url']);} else { echo esc_url(saswp_remove_warnings($logo, 0, 'saswp_string')); } ?>" id="saswp_service_schema_image" type="text" name="saswp_service_schema_image[url]" placeholder="<?php echo esc_html__('Image', 'schema-and-structured-data-for-wp' ); ?>" readonly="readonly" style="background: #FFF;">
|
1214 |
-
<input value="<?php if(isset($service_details['saswp_service_schema_image'])) { echo esc_attr($service_details['saswp_service_schema_image']['id']);} else { echo esc_attr($custom_logo_id); }?>" data-id="saswp_service_schema_image_id" type="hidden" name="saswp_service_schema_image[id]">
|
1215 |
-
<input value="<?php if(isset($service_details['saswp_service_schema_image'])) { echo esc_attr($service_details['saswp_service_schema_image']['width']);} else { echo esc_attr(saswp_remove_warnings($logo, 1, 'saswp_string')); } ?>" data-id="saswp_service_schema_image_width" type="hidden" name="saswp_service_schema_image[width]">
|
1216 |
-
<input value="<?php if(isset($service_details['saswp_service_schema_image'])) { echo esc_attr($service_details['saswp_service_schema_image']['height']);} else { echo esc_attr(saswp_remove_warnings($logo, 2, 'saswp_string')); } ?>" data-id="saswp_service_schema_image_height" type="hidden" name="saswp_service_schema_image[height]">
|
1217 |
-
<input data-id="media" class="button" id="saswp_service_schema_image_button" type="button" value="Upload"></td>
|
1218 |
-
</tr>
|
1219 |
-
<tr class="saswp-service-text-field-tr" <?php echo $style_service_name; ?>>
|
1220 |
-
<td><?php echo esc_html__('Locality', 'schema-and-structured-data-for-wp' ); ?></td>
|
1221 |
-
<td><input value="<?php if(isset($service_details['saswp_service_schema_locality'])){echo esc_attr($service_details['saswp_service_schema_locality']); } ?>" type="text" name="saswp_service_schema_locality" placeholder="<?php echo esc_html__('Locality', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1222 |
-
</tr>
|
1223 |
-
<tr class="saswp-service-text-field-tr" <?php echo $style_service_name; ?>>
|
1224 |
-
<td><?php echo esc_html__('PostalCode', 'schema-and-structured-data-for-wp' ); ?></td>
|
1225 |
-
<td><input value="<?php if(isset($service_details['saswp_service_schema_postal_code'])){echo esc_attr($service_details['saswp_service_schema_postal_code']); } ?>" type="text" name="saswp_service_schema_postal_code" placeholder="<?php echo esc_html__('Postal Code', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1226 |
-
</tr>
|
1227 |
-
<tr class="saswp-service-text-field-tr" <?php echo $style_service_name; ?>>
|
1228 |
-
<td><?php echo esc_html__('Telephone', 'schema-and-structured-data-for-wp' ); ?></td>
|
1229 |
-
<td><input value="<?php if(isset($service_details['saswp_service_schema_telephone'])){echo esc_attr($service_details['saswp_service_schema_telephone']); } ?>" type="text" name="saswp_service_schema_telephone" placeholder="<?php echo esc_html__('Telephone', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1230 |
-
</tr>
|
1231 |
-
<tr class="saswp-service-text-field-tr" <?php echo $style_service_name; ?>>
|
1232 |
-
<td><?php echo esc_html__('Price Range', 'schema-and-structured-data-for-wp' ); ?></td>
|
1233 |
-
<td><input value="<?php if(isset($service_details['saswp_service_schema_price_range'])){echo esc_attr($service_details['saswp_service_schema_price_range']); } ?>" type="text" name="saswp_service_schema_price_range" placeholder="<?php echo esc_html__('$10-$50 or $$$ ', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1234 |
-
</tr>
|
1235 |
-
<tr class="saswp-service-text-field-tr" <?php echo $style_service_name; ?>>
|
1236 |
-
<td><?php echo esc_html__('Description', 'schema-and-structured-data-for-wp' ); ?></td>
|
1237 |
-
<td><textarea placeholder="Description" rows="3" cols="70" name="saswp_service_schema_description"><?php if(isset($service_details['saswp_service_schema_description'])){echo esc_attr($service_details['saswp_service_schema_description']); } ?></textarea></td>
|
1238 |
-
</tr>
|
1239 |
-
<tr class="saswp-service-text-field-tr" <?php echo $style_service_name; ?>>
|
1240 |
-
<td><?php echo esc_html__('Area Served (City)', 'schema-and-structured-data-for-wp' ); ?></td>
|
1241 |
-
<td><textarea placeholder="New York, Los Angeles" rows="3" cols="70" name="saswp_service_schema_area_served"><?php if(isset($service_details['saswp_service_schema_area_served'])){echo esc_attr($service_details['saswp_service_schema_area_served']); } ?></textarea><p>Note: Enter all the City name in comma separated</p></td>
|
1242 |
-
</tr>
|
1243 |
-
<tr class="saswp-service-text-field-tr" <?php echo $style_service_name; ?>>
|
1244 |
-
<td><?php echo esc_html__('Service Offer', 'schema-and-structured-data-for-wp' ); ?></td>
|
1245 |
-
<td><textarea placeholder="Apartment light cleaning, Carpet cleaning" rows="3" cols="70" name="saswp_service_schema_service_offer"><?php if(isset($service_details['saswp_service_schema_service_offer'])){echo esc_attr($service_details['saswp_service_schema_service_offer']); } ?></textarea><p>Note: Enter all the service offer in comma separated</p></td>
|
1246 |
-
</tr>
|
1247 |
-
|
1248 |
-
<tr class="saswp-service-text-field-tr" <?php echo $style_service_name; ?>>
|
1249 |
-
<td><?php echo esc_html__('Aggregate Rating', 'schema-and-structured-data-for-wp' ); ?></td>
|
1250 |
-
<td>
|
1251 |
-
<input class="saswp-enable-rating-review-service" type="checkbox" name="saswp_service_schema_enable_rating" value="1" <?php if(isset($service_details['saswp_service_schema_enable_rating'])){echo 'checked'; }else{ echo ''; } ?>>
|
1252 |
-
</td>
|
1253 |
-
</tr>
|
1254 |
-
|
1255 |
-
<tr class="saswp-service-text-field-tr saswp-rating-review-service" <?php echo $style_service_name; ?>>
|
1256 |
-
<td><?php echo esc_html__('Rating', 'schema-and-structured-data-for-wp' ); ?></td>
|
1257 |
-
<td><input value="<?php if(isset($service_details['saswp_service_schema_rating'])){echo esc_attr($service_details['saswp_service_schema_rating']); } ?>" type="text" name="saswp_service_schema_rating" placeholder="<?php echo esc_html__('5.0', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1258 |
-
</tr>
|
1259 |
-
<tr class="saswp-service-text-field-tr saswp-rating-review-service" <?php echo $style_business_type; ?>>
|
1260 |
-
<td><?php echo esc_html__('Number of Reviews', 'schema-and-structured-data-for-wp' ); ?></td>
|
1261 |
-
<td><input value="<?php if(isset($service_details['saswp_service_schema_review_count'])){echo esc_attr($service_details['saswp_service_schema_review_count']); } ?>" type="text" name="saswp_service_schema_review_count" placeholder="<?php echo esc_html__('10', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1262 |
-
</tr>
|
1263 |
-
|
1264 |
-
<!-- Service Schema type ends here -->
|
1265 |
-
|
1266 |
<!-- Review Schema type starts here -->
|
1267 |
<tr class="saswp-review-text-field-tr" <?php echo $style_review_name; ?>>
|
1268 |
<td><?php echo esc_html__('Item Reviewed Type', 'schema-and-structured-data-for-wp' ); ?></td>
|
1269 |
<td>
|
1270 |
|
1271 |
-
<select data-id="<?php if(is_object($post)){ echo esc_attr($post->ID); } ?>" name="saswp_review_schema_item_type" class="
|
1272 |
-
<?php
|
1273 |
foreach ($item_reviewed as $key => $value) {
|
1274 |
$sel = '';
|
1275 |
if(saswp_remove_warnings($review_details, 'saswp_review_schema_item_type', 'saswp_string')==$key){
|
@@ -1281,211 +1100,9 @@ function saswp_schema_type_meta_box_callback( $post) {
|
|
1281 |
</select>
|
1282 |
</td>
|
1283 |
</tr>
|
1284 |
-
|
1285 |
-
<tr class="saswp-review-text-field-tr" <?php echo $style_review_name; ?>>
|
1286 |
-
<td><?php echo esc_html__('Review Rating', 'schema-and-structured-data-for-wp' ); ?></td>
|
1287 |
-
<td>
|
1288 |
-
<input class="saswp-enable-rating-review-review" type="checkbox" name="saswp_review_schema_enable_rating" value="1" <?php if(isset($review_details['saswp_review_schema_enable_rating'])){echo 'checked'; }else{ echo ''; } ?>>
|
1289 |
-
</td>
|
1290 |
-
</tr>
|
1291 |
-
<tr class="saswp-review-text-field-tr saswp-rating-review-review" <?php echo $style_review_name; ?>>
|
1292 |
-
<td><?php echo esc_html__('Rating Value', 'schema-and-structured-data-for-wp' ); ?></td>
|
1293 |
-
<td><input value="<?php if(isset($review_details['saswp_review_schema_rating'])){echo esc_attr($review_details['saswp_review_schema_rating']); } ?>" type="text" name="saswp_review_schema_rating" placeholder="<?php echo esc_html__('5.0', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1294 |
-
</tr>
|
1295 |
-
<tr class="saswp-review-text-field-tr saswp-rating-review-review" <?php echo $style_business_type; ?>>
|
1296 |
-
<td><?php echo esc_html__('Best Rating', 'schema-and-structured-data-for-wp' ); ?></td>
|
1297 |
-
<td><input value="<?php if(isset($review_details['saswp_review_schema_review_count'])){echo esc_attr($review_details['saswp_review_schema_review_count']); } ?>" type="text" name="saswp_review_schema_review_count" placeholder="<?php echo esc_html__('5.0', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1298 |
-
</tr>
|
1299 |
-
|
1300 |
-
|
1301 |
<!-- Review Schema type ends here -->
|
1302 |
|
1303 |
-
<!-- AudioObject Schema type starts here -->
|
1304 |
-
|
1305 |
-
<tr class="saswp-audio-text-field-tr">
|
1306 |
-
<td><?php echo esc_html__('Name', 'schema-and-structured-data-for-wp' ); ?></td>
|
1307 |
-
<td><input value="<?php if(isset($audio_details['saswp_audio_schema_name'])){echo esc_attr($audio_details['saswp_audio_schema_name']); } ?>" type="text" name="saswp_audio_schema_name" placeholder="<?php echo esc_html__('Name', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1308 |
-
</tr>
|
1309 |
-
|
1310 |
-
<tr class="saswp-audio-text-field-tr">
|
1311 |
-
<td><?php echo esc_html__('Description', 'schema-and-structured-data-for-wp' ); ?></td>
|
1312 |
-
<td>
|
1313 |
-
<textarea placeholder="Description" rows="5" cols="70" name="saswp_audio_schema_description"><?php if(isset($audio_details['saswp_audio_schema_description'])){echo $audio_details['saswp_audio_schema_description']; } ?></textarea>
|
1314 |
-
</td>
|
1315 |
-
</tr>
|
1316 |
-
|
1317 |
-
<tr class="saswp-audio-text-field-tr">
|
1318 |
-
<td><?php echo esc_html__('Content Url', 'schema-and-structured-data-for-wp' ); ?></td>
|
1319 |
-
<td><input value="<?php if(isset($audio_details['saswp_audio_schema_contenturl'])){echo esc_attr($audio_details['saswp_audio_schema_contenturl']); } ?>" type="text" name="saswp_audio_schema_contenturl" placeholder="<?php echo esc_html__('Content Url', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1320 |
-
</tr>
|
1321 |
-
|
1322 |
-
<tr class="saswp-audio-text-field-tr">
|
1323 |
-
<td><?php echo esc_html__('Duration', 'schema-and-structured-data-for-wp' ); ?></td>
|
1324 |
-
<td><input value="<?php if(isset($audio_details['saswp_audio_schema_duration'])){echo esc_attr($audio_details['saswp_audio_schema_duration']); } ?>" type="text" name="saswp_audio_schema_duration" placeholder="<?php echo esc_html__('T0M15S', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1325 |
-
</tr>
|
1326 |
-
|
1327 |
-
<tr class="saswp-audio-text-field-tr">
|
1328 |
-
<td><?php echo esc_html__('Encoding Format', 'schema-and-structured-data-for-wp' ); ?></td>
|
1329 |
-
<td><input value="<?php if(isset($audio_details['saswp_audio_schema_encoding_format'])){echo esc_attr($audio_details['saswp_audio_schema_encoding_format']); } ?>" type="text" name="saswp_audio_schema_encoding_format" placeholder="<?php echo esc_html__('audio/mpeg', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1330 |
-
</tr>
|
1331 |
-
|
1332 |
-
<!-- AudioObject Schema type ends here -->
|
1333 |
-
|
1334 |
-
<!-- SoftwareApplication Schema type starts here -->
|
1335 |
-
|
1336 |
-
<tr class="saswp-softwareapplication-text-field-tr">
|
1337 |
-
<td><?php echo esc_html__('Name', 'schema-and-structured-data-for-wp' ); ?></td>
|
1338 |
-
<td><input value="<?php if(isset($software_details['saswp_software_schema_name'])){echo esc_attr($software_details['saswp_software_schema_name']); } ?>" type="text" name="saswp_software_schema_name" placeholder="<?php echo esc_html__('Name', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1339 |
-
</tr>
|
1340 |
-
|
1341 |
-
<tr class="saswp-softwareapplication-text-field-tr">
|
1342 |
-
<td><?php echo esc_html__('Description', 'schema-and-structured-data-for-wp' ); ?></td>
|
1343 |
-
<td>
|
1344 |
-
<textarea placeholder="Description" rows="5" cols="70" name="saswp_software_schema_description"><?php if(isset($software_details['saswp_software_schema_description'])){echo $software_details['saswp_software_schema_description']; } ?></textarea>
|
1345 |
-
</td>
|
1346 |
-
</tr>
|
1347 |
-
|
1348 |
-
<tr class="saswp-softwareapplication-text-field-tr">
|
1349 |
-
<td><?php echo esc_html__('Operating System', 'schema-and-structured-data-for-wp' ); ?></td>
|
1350 |
-
<td><input value="<?php if(isset($software_details['saswp_software_schema_operating_system'])){echo esc_attr($software_details['saswp_software_schema_operating_system']); } ?>" type="text" name="saswp_software_schema_operating_system" placeholder="<?php echo esc_html__('eg. ANDROID', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1351 |
-
</tr>
|
1352 |
-
|
1353 |
-
<tr class="saswp-softwareapplication-text-field-tr">
|
1354 |
-
<td><?php echo esc_html__('Application Category', 'schema-and-structured-data-for-wp' ); ?></td>
|
1355 |
-
<td><input value="<?php if(isset($software_details['saswp_software_schema_application_category'])){echo esc_attr($software_details['saswp_software_schema_application_category']); } ?>" type="text" name="saswp_software_schema_application_category" placeholder="<?php echo esc_html__('eg. https://schema.org/GameApplication', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1356 |
-
</tr>
|
1357 |
-
|
1358 |
-
<tr class="saswp-softwareapplication-text-field-tr">
|
1359 |
-
<td><?php echo esc_html__('Price', 'schema-and-structured-data-for-wp' ); ?></td>
|
1360 |
-
<td><input value="<?php if(isset($software_details['saswp_software_schema_price'])){echo esc_attr($software_details['saswp_software_schema_price']); } ?>" type="text" name="saswp_software_schema_price" placeholder="<?php echo esc_html__('1.00', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1361 |
-
</tr>
|
1362 |
-
|
1363 |
-
<tr class="saswp-softwareapplication-text-field-tr">
|
1364 |
-
<td><?php echo esc_html__('Price Currency', 'schema-and-structured-data-for-wp' ); ?></td>
|
1365 |
-
<td><input value="<?php if(isset($software_details['saswp_software_schema_price_currency'])){echo esc_attr($software_details['saswp_software_schema_price_currency']); } ?>" type="text" name="saswp_software_schema_price_currency" placeholder="<?php echo esc_html__('USD', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1366 |
-
</tr>
|
1367 |
-
|
1368 |
-
<tr class="saswp-softwareapplication-text-field-tr">
|
1369 |
-
<td><?php echo esc_html__('Aggregate Rating', 'schema-and-structured-data-for-wp' ); ?></td>
|
1370 |
-
<td>
|
1371 |
-
<input class="saswp-enable-rating-review-softwareapplication" type="checkbox" name="saswp_software_schema_enable_rating" value="1" <?php if(isset($software_details['saswp_software_schema_enable_rating'])){echo 'checked'; }else{ echo ''; } ?>>
|
1372 |
-
</td>
|
1373 |
-
</tr>
|
1374 |
-
|
1375 |
-
<tr class="saswp-softwareapplication-text-field-tr saswp-rating-review-softwareapplication">
|
1376 |
-
<td><?php echo esc_html__('Rating', 'schema-and-structured-data-for-wp' ); ?></td>
|
1377 |
-
<td><input value="<?php if(isset($software_details['saswp_software_schema_rating'])){echo esc_attr($software_details['saswp_software_schema_rating']); } ?>" type="text" name="saswp_software_schema_rating" placeholder="<?php echo esc_html__('4.6', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1378 |
-
</tr>
|
1379 |
-
<tr class="saswp-softwareapplication-text-field-tr saswp-rating-review-softwareapplication">
|
1380 |
-
<td><?php echo esc_html__('Rating Count', 'schema-and-structured-data-for-wp' ); ?></td>
|
1381 |
-
<td><input value="<?php if(isset($software_details['saswp_software_schema_rating_count'])){echo esc_attr($software_details['saswp_software_schema_rating_count']); } ?>" type="text" name="saswp_software_schema_rating_count" placeholder="<?php echo esc_html__('8864', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1382 |
-
</tr>
|
1383 |
-
|
1384 |
-
<!-- SoftwareApplication Schema type ends here -->
|
1385 |
-
|
1386 |
-
<!-- Event Schema type starts here -->
|
1387 |
-
|
1388 |
-
<tr class="saswp-event-text-field-tr">
|
1389 |
-
<td><?php echo esc_html__('Name', 'schema-and-structured-data-for-wp' ); ?></td>
|
1390 |
-
<td><input value="<?php if(isset($event_details['saswp_event_schema_name'])){echo esc_attr($event_details['saswp_event_schema_name']); } ?>" type="text" name="saswp_event_schema_name" placeholder="<?php echo esc_html__('Name', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1391 |
-
</tr>
|
1392 |
-
<tr class="saswp-event-text-field-tr">
|
1393 |
-
<td><?php echo esc_html__('Description', 'schema-and-structured-data-for-wp' ); ?></td>
|
1394 |
-
<td>
|
1395 |
-
<textarea placeholder="Description" rows="5" cols="70" name="saswp_event_schema_description"><?php if(isset($event_details['saswp_event_schema_description'])){echo $event_details['saswp_event_schema_description']; } ?></textarea>
|
1396 |
-
</td>
|
1397 |
-
</tr>
|
1398 |
-
<tr class="saswp-event-text-field-tr">
|
1399 |
-
<td><?php echo esc_html__('Location Name', 'schema-and-structured-data-for-wp' ); ?></td>
|
1400 |
-
<td><input value="<?php if(isset($event_details['saswp_event_schema_location_name'])){echo esc_attr($event_details['saswp_event_schema_location_name']); } ?>" type="text" name="saswp_event_schema_location_name" placeholder="<?php echo esc_html__('Location Name', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1401 |
-
</tr>
|
1402 |
-
|
1403 |
-
<tr class="saswp-event-text-field-tr">
|
1404 |
-
<td><?php echo esc_html__('Location Street Address', 'schema-and-structured-data-for-wp' ); ?></td>
|
1405 |
-
<td><input value="<?php if(isset($event_details['saswp_event_schema_location_streetaddress'])){echo esc_attr($event_details['saswp_event_schema_location_streetaddress']); } ?>" type="text" name="saswp_event_schema_location_streetaddress" placeholder="<?php echo esc_html__('Location Street Address', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1406 |
-
</tr>
|
1407 |
-
|
1408 |
-
<tr class="saswp-event-text-field-tr">
|
1409 |
-
<td><?php echo esc_html__('Location Locality', 'schema-and-structured-data-for-wp' ); ?></td>
|
1410 |
-
<td><input value="<?php if(isset($event_details['saswp_event_schema_location_locality'])){echo esc_attr($event_details['saswp_event_schema_location_locality']); } ?>" type="text" name="saswp_event_schema_location_locality" placeholder="<?php echo esc_html__('Location Locality', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1411 |
-
</tr>
|
1412 |
-
|
1413 |
-
<tr class="saswp-event-text-field-tr">
|
1414 |
-
<td><?php echo esc_html__('Location Region', 'schema-and-structured-data-for-wp' ); ?></td>
|
1415 |
-
<td><input value="<?php if(isset($event_details['saswp_event_schema_location_region'])){echo esc_attr($event_details['saswp_event_schema_location_region']); } ?>" type="text" name="saswp_event_schema_location_region" placeholder="<?php echo esc_html__('Location Region', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1416 |
-
</tr>
|
1417 |
-
|
1418 |
-
<tr class="saswp-event-text-field-tr">
|
1419 |
-
<td><?php echo esc_html__('Location PostalCode', 'schema-and-structured-data-for-wp' ); ?></td>
|
1420 |
-
<td><input value="<?php if(isset($event_details['saswp_event_schema_location_postalcode'])){echo esc_attr($event_details['saswp_event_schema_location_postalcode']); } ?>" type="text" name="saswp_event_schema_location_postalcode" placeholder="<?php echo esc_html__('PostalCode', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1421 |
-
</tr>
|
1422 |
-
|
1423 |
-
<tr class="saswp-event-text-field-tr">
|
1424 |
-
<td><?php echo esc_html__('Start Date', 'schema-and-structured-data-for-wp' ); ?></td>
|
1425 |
-
<td><input class="saswp-datepicker-picker" value="<?php if(isset($event_details['saswp_event_schema_start_date'])){echo esc_attr($event_details['saswp_event_schema_start_date']); } ?>" type="text" name="saswp_event_schema_start_date" placeholder="<?php echo esc_html__('2018-12-12', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1426 |
-
</tr>
|
1427 |
-
|
1428 |
-
<tr class="saswp-event-text-field-tr">
|
1429 |
-
<td><?php echo esc_html__('End Date', 'schema-and-structured-data-for-wp' ); ?></td>
|
1430 |
-
<td><input class="saswp-datepicker-picker" value="<?php if(isset($event_details['saswp_event_schema_end_date'])){echo esc_attr($event_details['saswp_event_schema_end_date']); } ?>" type="text" name="saswp_event_schema_end_date" placeholder="<?php echo esc_html__('2018-12-12', 'schema-and-structured-data-for-wp' ); ?>" ></td>
|
1431 |
-
</tr>
|
1432 |
-
|
1433 |
-
<tr class="saswp-event-text-field-tr">
|
1434 |
-
<td><?php echo esc_html__('Image', 'schema-and-structured-data-for-wp' ); ?></td>
|
1435 |
-
<td style="display: flex; width: 97%">
|
1436 |
-
<input value="<?php if(isset($event_details['saswp_event_schema_image'])) { echo esc_url($event_details['saswp_event_schema_image']['url']);} else { echo esc_url(saswp_remove_warnings($logo, 0, 'saswp_string')); } ?>" id="saswp_event_schema_image" type="text" name="saswp_event_schema_image[url]" placeholder="<?php echo esc_html__('Image', 'schema-and-structured-data-for-wp' ); ?>" readonly="readonly" style="background: #FFF;">
|
1437 |
-
<input value="<?php if(isset($event_details['saswp_event_schema_image'])) { echo esc_attr($event_details['saswp_event_schema_image']['id']);} else { echo esc_attr($custom_logo_id); }?>" data-id="saswp_event_schema_image_id" type="hidden" name="saswp_event_schema_image[id]">
|
1438 |
-
<input value="<?php if(isset($event_details['saswp_event_schema_image'])) { echo esc_attr($event_details['saswp_event_schema_image']['width']);} else { echo esc_attr(saswp_remove_warnings($logo, 1, 'saswp_string')); } ?>" data-id="saswp_event_schema_image_width" type="hidden" name="saswp_event_schema_image[width]">
|
1439 |
-
<input value="<?php if(isset($event_details['saswp_event_schema_image'])) { echo esc_attr($event_details['saswp_event_schema_image']['height']);} else { echo esc_attr(saswp_remove_warnings($logo, 2, 'saswp_string')); } ?>" data-id="saswp_event_schema_image_height" type="hidden" name="saswp_event_schema_image[height]">
|
1440 |
-
<input data-id="media" class="button" id="saswp_event_schema_image_button" type="button" value="Upload">
|
1441 |
-
</td>
|
1442 |
-
</tr>
|
1443 |
-
|
1444 |
-
<tr class="saswp-event-text-field-tr">
|
1445 |
-
<td><?php echo esc_html__('Performer Name', 'schema-and-structured-data-for-wp' ); ?></td>
|
1446 |
-
<td><input value="<?php if(isset($event_details['saswp_event_schema_performer_name'])){echo esc_attr($event_details['saswp_event_schema_performer_name']); } ?>" type="text" name="saswp_event_schema_performer_name"></td>
|
1447 |
-
</tr>
|
1448 |
-
|
1449 |
-
<tr class="saswp-event-text-field-tr">
|
1450 |
-
<td><?php echo esc_html__('Price', 'schema-and-structured-data-for-wp' ); ?></td>
|
1451 |
-
<td><input value="<?php if(isset($event_details['saswp_event_schema_price'])){echo esc_attr($event_details['saswp_event_schema_price']); } ?>" type="number" name="saswp_event_schema_price"></td>
|
1452 |
-
</tr>
|
1453 |
-
|
1454 |
-
<tr class="saswp-event-text-field-tr">
|
1455 |
-
<td><?php echo esc_html__('Price currency', 'schema-and-structured-data-for-wp' ); ?></td>
|
1456 |
-
<td><input value="<?php if(isset($event_details['saswp_event_schema_price_currency'])){echo esc_attr($event_details['saswp_event_schema_price_currency']); } ?>" type="text" name="saswp_event_schema_price_currency"></td>
|
1457 |
-
</tr>
|
1458 |
-
<tr class="saswp-event-text-field-tr">
|
1459 |
-
<td><?php echo esc_html__('Availability', 'schema-and-structured-data-for-wp' ); ?></td>
|
1460 |
-
<td>
|
1461 |
-
<select name="saswp_event_schema_availability">
|
1462 |
-
<?php
|
1463 |
-
|
1464 |
-
foreach ($availability as $key => $value) {
|
1465 |
-
$sel = '';
|
1466 |
-
if(saswp_remove_warnings($event_details, 'saswp_event_schema_availability', 'saswp_string')==$key){
|
1467 |
-
$sel = 'selected';
|
1468 |
-
}
|
1469 |
-
echo "<option value='".esc_attr($key)."' ".esc_attr($sel).">".esc_html__($value, 'schema-and-structured-data-for-wp' )."</option>";
|
1470 |
-
}
|
1471 |
-
?>
|
1472 |
-
</select>
|
1473 |
-
</td>
|
1474 |
-
</tr>
|
1475 |
-
|
1476 |
-
<tr class="saswp-event-text-field-tr">
|
1477 |
-
<td><?php echo esc_html__('Valid From', 'schema-and-structured-data-for-wp' ); ?></td>
|
1478 |
-
<td><input class="saswp-datepicker-picker" value="<?php if(isset($event_details['saswp_event_schema_validfrom'])){echo esc_attr($event_details['saswp_event_schema_validfrom']); } ?>" type="text" name="saswp_event_schema_validfrom"></td>
|
1479 |
-
</tr>
|
1480 |
-
|
1481 |
-
<tr class="saswp-event-text-field-tr">
|
1482 |
-
<td><?php echo esc_html__('URL', 'schema-and-structured-data-for-wp' ); ?></td>
|
1483 |
-
<td><input value="<?php if(isset($event_details['saswp_event_schema_url'])){echo esc_attr($event_details['saswp_event_schema_url']); } ?>" type="text" name="saswp_event_schema_url"></td>
|
1484 |
-
</tr>
|
1485 |
-
|
1486 |
-
<!-- Event Schema type ends here -->
|
1487 |
-
|
1488 |
-
|
1489 |
<tr>
|
1490 |
<td>
|
1491 |
<label for="saswp-speakable"><?php echo esc_html__( 'Speakable ' ,'schema-and-structured-data-for-wp');?></label>
|
@@ -1510,8 +1127,7 @@ function saswp_schema_type_meta_box_callback( $post) {
|
|
1510 |
|
1511 |
<?php
|
1512 |
|
1513 |
-
if(!empty($meta_list)){
|
1514 |
-
|
1515 |
$schema_type = get_post_meta($post->ID, 'schema_type', true);
|
1516 |
|
1517 |
$service = new saswp_output_service();
|
@@ -1527,17 +1143,16 @@ function saswp_schema_type_meta_box_callback( $post) {
|
|
1527 |
|
1528 |
if( $fieldkey == $key){
|
1529 |
|
1530 |
-
|
1531 |
|
1532 |
}else{
|
1533 |
|
1534 |
-
|
1535 |
|
1536 |
}
|
1537 |
|
1538 |
}
|
1539 |
-
|
1540 |
-
|
1541 |
echo $option;
|
1542 |
echo '</select>';
|
1543 |
echo '</td>';
|
@@ -1573,10 +1188,9 @@ function saswp_schema_type_meta_box_callback( $post) {
|
|
1573 |
echo $list_html;
|
1574 |
echo '</select>';
|
1575 |
echo '</td>';
|
1576 |
-
|
1577 |
-
|
1578 |
if($fieldval == 'manual_text'){
|
1579 |
-
echo '<td><input type="text" name="saswp_fixed_text['.esc_attr($fieldkey).']" value="'.esc_html($fixed_text[$fieldkey]).'"></td>';
|
1580 |
}else if($fieldval == 'custom_field'){
|
1581 |
echo '<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['.esc_attr($fieldkey).']">';
|
1582 |
echo '<option value="'.esc_attr($cus_field[$fieldkey]).'">'.preg_replace( '/^_/', '', esc_html( str_replace( '_', ' ', $cus_field[$fieldkey] ) ) ).'</option>';
|
@@ -1620,6 +1234,7 @@ function saswp_schema_type_meta_box_callback( $post) {
|
|
1620 |
function saswp_schema_type_add_meta_box_save( $post_id ) {
|
1621 |
|
1622 |
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;
|
|
|
1623 |
if ( ! isset( $_POST['saswp_schema_type_nonce'] ) || ! wp_verify_nonce( $_POST['saswp_schema_type_nonce'], 'saswp_schema_type_nonce' ) ) return;
|
1624 |
if ( ! current_user_can( 'edit_post', $post_id ) ) return;
|
1625 |
|
@@ -1638,375 +1253,24 @@ function saswp_schema_type_add_meta_box_save( $post_id ) {
|
|
1638 |
}else{
|
1639 |
update_post_meta( $post_id, 'saswp_business_name', '' );
|
1640 |
}
|
1641 |
-
|
1642 |
-
$
|
1643 |
-
|
1644 |
-
|
1645 |
-
$
|
1646 |
-
|
1647 |
-
|
1648 |
-
|
1649 |
-
$
|
1650 |
-
|
1651 |
-
|
1652 |
-
if ( isset( $_POST['local_street_address'] ) ){
|
1653 |
-
$local_business_details['local_street_address'] = sanitize_text_field($_POST['local_street_address']);
|
1654 |
-
}
|
1655 |
-
if ( isset( $_POST['local_city'] ) ){
|
1656 |
-
$local_business_details['local_city'] = sanitize_text_field($_POST['local_city']);
|
1657 |
-
}
|
1658 |
-
if ( isset( $_POST['local_state'] ) ){
|
1659 |
-
$local_business_details['local_state'] = sanitize_text_field($_POST['local_state']);
|
1660 |
-
}
|
1661 |
-
if ( isset( $_POST['local_postal_code'] ) ){
|
1662 |
-
$local_business_details['local_postal_code'] = sanitize_text_field($_POST['local_postal_code']);
|
1663 |
-
}
|
1664 |
-
|
1665 |
-
if ( isset( $_POST['local_latitude'] ) ){
|
1666 |
-
$local_business_details['local_latitude'] = sanitize_text_field($_POST['local_latitude']);
|
1667 |
-
}
|
1668 |
-
if ( isset( $_POST['local_longitude'] ) ){
|
1669 |
-
$local_business_details['local_longitude'] = sanitize_text_field($_POST['local_longitude']);
|
1670 |
-
}
|
1671 |
-
|
1672 |
-
if ( isset( $_POST['local_phone'] ) ){
|
1673 |
-
$local_business_details['local_phone'] = sanitize_text_field($_POST['local_phone']);
|
1674 |
-
}
|
1675 |
-
if ( isset( $_POST['local_website'] ) ){
|
1676 |
-
$local_business_details['local_website'] = esc_url_raw($_POST['local_website']);
|
1677 |
-
}
|
1678 |
-
if ( isset( $_POST['local_business_logo'] ) ){
|
1679 |
-
|
1680 |
-
$local_business_details['local_business_logo']['id'] = sanitize_text_field($_POST['local_business_logo']['id']);
|
1681 |
-
$local_business_details['local_business_logo']['url'] = sanitize_text_field($_POST['local_business_logo']['url']);
|
1682 |
-
$local_business_details['local_business_logo']['width'] = sanitize_text_field($_POST['local_business_logo']['width']);
|
1683 |
-
$local_business_details['local_business_logo']['height'] = sanitize_text_field($_POST['local_business_logo']['height']);
|
1684 |
-
}
|
1685 |
-
|
1686 |
-
if ( isset( $_POST['saswp_dayofweek'] ) ){
|
1687 |
-
update_post_meta( $post_id, 'saswp_dayofweek', esc_textarea( stripslashes($_POST['saswp_dayofweek'])) );
|
1688 |
-
}
|
1689 |
-
if ( isset( $_POST['local_price_range'] ) ){
|
1690 |
-
$local_business_details['local_price_range'] = sanitize_text_field($_POST['local_price_range']);
|
1691 |
-
}
|
1692 |
-
|
1693 |
-
if ( isset( $_POST['local_menu'] ) ){
|
1694 |
-
$local_business_details['local_menu'] = sanitize_text_field($_POST['local_menu']);
|
1695 |
-
}
|
1696 |
-
|
1697 |
-
if ( isset( $_POST['local_hasmap'] ) ){
|
1698 |
-
$local_business_details['local_hasmap'] = sanitize_text_field($_POST['local_hasmap']);
|
1699 |
-
}
|
1700 |
-
|
1701 |
-
if ( isset( $_POST['local_serves_cuisine'] ) ){
|
1702 |
-
$local_business_details['local_serves_cuisine'] = sanitize_text_field($_POST['local_serves_cuisine']);
|
1703 |
-
}
|
1704 |
-
|
1705 |
-
//social fields starts here
|
1706 |
-
|
1707 |
-
if ( isset( $_POST['local_facebook'] ) ){
|
1708 |
-
$local_business_details['local_facebook'] = esc_url_raw($_POST['local_facebook']);
|
1709 |
-
}
|
1710 |
-
if ( isset( $_POST['local_twitter'] ) ){
|
1711 |
-
$local_business_details['local_twitter'] = esc_url_raw($_POST['local_twitter']);
|
1712 |
-
}
|
1713 |
-
if ( isset( $_POST['local_instagram'] ) ){
|
1714 |
-
$local_business_details['local_instagram'] = esc_url_raw($_POST['local_instagram']);
|
1715 |
-
}
|
1716 |
-
if ( isset( $_POST['local_pinterest'] ) ){
|
1717 |
-
$local_business_details['local_pinterest'] = esc_url_raw($_POST['local_pinterest']);
|
1718 |
-
}
|
1719 |
-
if ( isset( $_POST['local_linkedin'] ) ){
|
1720 |
-
$local_business_details['local_linkedin'] = esc_url_raw($_POST['local_linkedin']);
|
1721 |
-
}
|
1722 |
-
if ( isset( $_POST['local_soundcloud'] ) ){
|
1723 |
-
$local_business_details['local_soundcloud'] = esc_url_raw($_POST['local_soundcloud']);
|
1724 |
-
}
|
1725 |
-
if ( isset( $_POST['local_tumblr'] ) ){
|
1726 |
-
$local_business_details['local_tumblr'] = esc_url_raw($_POST['local_tumblr']);
|
1727 |
-
}
|
1728 |
-
if ( isset( $_POST['local_youtube'] ) ){
|
1729 |
-
$local_business_details['local_youtube'] = esc_url_raw($_POST['local_youtube']);
|
1730 |
-
}
|
1731 |
-
|
1732 |
-
//social fields ends here
|
1733 |
-
if ( isset( $_POST['local_enable_rating'] ) ){
|
1734 |
-
$local_business_details['local_enable_rating'] = sanitize_text_field($_POST['local_enable_rating']);
|
1735 |
-
}
|
1736 |
-
if ( isset( $_POST['local_rating'] ) ){
|
1737 |
-
$local_business_details['local_rating'] = sanitize_text_field($_POST['local_rating']);
|
1738 |
-
}
|
1739 |
-
if ( isset( $_POST['local_review_count'] ) ){
|
1740 |
-
$local_business_details['local_review_count'] = sanitize_text_field($_POST['local_review_count']);
|
1741 |
-
}
|
1742 |
-
|
1743 |
-
|
1744 |
-
update_post_meta( $post_id, 'saswp_local_business_details', $local_business_details );
|
1745 |
-
|
1746 |
-
|
1747 |
-
$service_schema_details = array();
|
1748 |
-
$review_schema_details = array();
|
1749 |
-
$product_schema_details = array();
|
1750 |
-
$audio_schema_details = array();
|
1751 |
-
$software_schema_details = array();
|
1752 |
-
|
1753 |
-
$schema_type = sanitize_text_field($_POST['schema_type']);
|
1754 |
|
1755 |
-
if($schema_type =='
|
1756 |
-
|
1757 |
-
|
1758 |
-
$service_schema_details['saswp_service_schema_name'] = sanitize_text_field($_POST['saswp_service_schema_name']);
|
1759 |
-
}
|
1760 |
-
if ( isset( $_POST['saswp_service_schema_type'] ) ){
|
1761 |
-
$service_schema_details['saswp_service_schema_type'] = sanitize_text_field($_POST['saswp_service_schema_type']);
|
1762 |
-
}
|
1763 |
-
if ( isset( $_POST['saswp_service_schema_provider_name'] ) ){
|
1764 |
-
$service_schema_details['saswp_service_schema_provider_name'] = sanitize_text_field($_POST['saswp_service_schema_provider_name']);
|
1765 |
-
}
|
1766 |
-
if ( isset( $_POST['saswp_service_schema_provider_type'] ) ){
|
1767 |
-
$service_schema_details['saswp_service_schema_provider_type'] = sanitize_text_field($_POST['saswp_service_schema_provider_type']);
|
1768 |
-
}
|
1769 |
-
if ( isset( $_POST['saswp_service_schema_image'] ) ){
|
1770 |
-
$service_schema_details['saswp_service_schema_image']['id'] = sanitize_text_field($_POST['saswp_service_schema_image']['id']);
|
1771 |
-
$service_schema_details['saswp_service_schema_image']['url'] = esc_url_raw($_POST['saswp_service_schema_image']['url']);
|
1772 |
-
$service_schema_details['saswp_service_schema_image']['width'] = sanitize_text_field($_POST['saswp_service_schema_image']['width']);
|
1773 |
-
$service_schema_details['saswp_service_schema_image']['height'] = sanitize_text_field($_POST['saswp_service_schema_image']['height']);
|
1774 |
-
}
|
1775 |
-
if ( isset( $_POST['saswp_service_schema_locality'] ) ){
|
1776 |
-
$service_schema_details['saswp_service_schema_locality'] = sanitize_text_field($_POST['saswp_service_schema_locality']);
|
1777 |
-
}
|
1778 |
-
if ( isset( $_POST['saswp_service_schema_postal_code'] ) ){
|
1779 |
-
$service_schema_details['saswp_service_schema_postal_code'] = sanitize_text_field($_POST['saswp_service_schema_postal_code']);
|
1780 |
-
}
|
1781 |
-
if ( isset( $_POST['saswp_service_schema_telephone'] ) ){
|
1782 |
-
$service_schema_details['saswp_service_schema_telephone'] = sanitize_text_field($_POST['saswp_service_schema_telephone']);
|
1783 |
-
}
|
1784 |
-
if ( isset( $_POST['saswp_service_schema_price_range'] ) ){
|
1785 |
-
$service_schema_details['saswp_service_schema_price_range'] = sanitize_text_field($_POST['saswp_service_schema_price_range']);
|
1786 |
-
}
|
1787 |
-
if ( isset( $_POST['saswp_service_schema_description'] ) ){
|
1788 |
-
$service_schema_details['saswp_service_schema_description'] = sanitize_textarea_field($_POST['saswp_service_schema_description']);
|
1789 |
-
}
|
1790 |
-
if ( isset( $_POST['saswp_service_schema_area_served'] ) ){
|
1791 |
-
$service_schema_details['saswp_service_schema_area_served'] = sanitize_textarea_field($_POST['saswp_service_schema_area_served']);
|
1792 |
-
}
|
1793 |
-
if ( isset( $_POST['saswp_service_schema_service_offer'] ) ){
|
1794 |
-
$service_schema_details['saswp_service_schema_service_offer'] = sanitize_textarea_field($_POST['saswp_service_schema_service_offer']);
|
1795 |
-
}
|
1796 |
-
|
1797 |
-
if ( isset( $_POST['saswp_service_schema_enable_rating'] ) ){
|
1798 |
-
$service_schema_details['saswp_service_schema_enable_rating'] = sanitize_text_field($_POST['saswp_service_schema_enable_rating']);
|
1799 |
-
}
|
1800 |
-
if ( isset( $_POST['saswp_service_schema_rating'] ) ){
|
1801 |
-
$service_schema_details['saswp_service_schema_rating'] = sanitize_text_field($_POST['saswp_service_schema_rating']);
|
1802 |
-
}
|
1803 |
-
if ( isset( $_POST['saswp_service_schema_review_count'] ) ){
|
1804 |
-
$service_schema_details['saswp_service_schema_review_count'] = sanitize_text_field($_POST['saswp_service_schema_review_count']);
|
1805 |
-
}
|
1806 |
-
update_post_meta( $post_id, 'saswp_service_schema_details', $service_schema_details );
|
1807 |
-
}
|
1808 |
-
|
1809 |
-
|
1810 |
-
if($schema_type =='Review'){
|
1811 |
-
|
1812 |
-
if ( !isset( $_POST['saswp_review_schema_item_type'] ) ){
|
1813 |
-
return;
|
1814 |
-
}
|
1815 |
-
|
1816 |
-
$item = sanitize_text_field($_POST['saswp_review_schema_item_type']);
|
1817 |
-
$meta_fields = saswp_item_reviewed_fields($item);
|
1818 |
-
|
1819 |
-
foreach ( $meta_fields as $meta_field ) {
|
1820 |
-
|
1821 |
-
if ( isset( $_POST[ $meta_field['id'] ] ) ) {
|
1822 |
-
|
1823 |
-
switch ( $meta_field['type'] ) {
|
1824 |
-
|
1825 |
-
case 'media':
|
1826 |
-
|
1827 |
-
$media_key = $meta_field['id'].'_detail';
|
1828 |
-
$media_height = sanitize_text_field( $_POST[ $meta_field['id'].'_height' ] );
|
1829 |
-
$media_width = sanitize_text_field( $_POST[ $meta_field['id'].'_width' ] );
|
1830 |
-
$media_thumbnail = sanitize_text_field( $_POST[ $meta_field['id'].'_thumbnail' ] );
|
1831 |
-
$media_detail = array(
|
1832 |
-
'height' => $media_height,
|
1833 |
-
'width' => $media_width,
|
1834 |
-
'thumbnail' => $media_thumbnail,
|
1835 |
-
);
|
1836 |
-
|
1837 |
-
$review_schema_details[$media_key] = $media_detail;
|
1838 |
-
break;
|
1839 |
-
|
1840 |
-
|
1841 |
-
case 'email':
|
1842 |
-
$_POST[ $meta_field['id'] ] = sanitize_email( $_POST[ $meta_field['id'] ] );
|
1843 |
-
break;
|
1844 |
-
case 'text':
|
1845 |
-
$_POST[ $meta_field['id'] ] = sanitize_text_field( $_POST[ $meta_field['id'] ] );
|
1846 |
-
break;
|
1847 |
-
default:
|
1848 |
-
$_POST[ $meta_field['id'] ] = sanitize_text_field( $_POST[ $meta_field['id'] ] );
|
1849 |
-
break;
|
1850 |
-
}
|
1851 |
-
$review_schema_details[$meta_field['id']] = $_POST[ $meta_field['id'] ];
|
1852 |
-
|
1853 |
-
|
1854 |
-
} else if ( $meta_field['type'] === 'checkbox' ) {
|
1855 |
-
|
1856 |
-
$review_schema_details[$meta_field['id']] = '0';
|
1857 |
-
|
1858 |
-
}
|
1859 |
-
}
|
1860 |
-
|
1861 |
-
|
1862 |
-
if ( isset( $_POST['saswp_review_schema_enable_rating'] ) ){
|
1863 |
-
$review_schema_details['saswp_review_schema_enable_rating'] = sanitize_text_field($_POST['saswp_review_schema_enable_rating']);
|
1864 |
-
}
|
1865 |
-
if ( isset( $_POST['saswp_review_schema_rating'] ) ){
|
1866 |
-
$review_schema_details['saswp_review_schema_rating'] = sanitize_text_field($_POST['saswp_review_schema_rating']);
|
1867 |
-
}
|
1868 |
-
if ( isset( $_POST['saswp_review_schema_review_count'] ) ){
|
1869 |
-
$review_schema_details['saswp_review_schema_review_count'] = sanitize_text_field($_POST['saswp_review_schema_review_count']);
|
1870 |
-
}
|
1871 |
-
|
1872 |
-
$review_schema_details['saswp_review_schema_item_type'] = sanitize_text_field($_POST['saswp_review_schema_item_type']);
|
1873 |
-
|
1874 |
update_post_meta( $post_id, 'saswp_review_schema_details', $review_schema_details);
|
1875 |
-
|
1876 |
-
|
1877 |
-
}
|
1878 |
-
|
1879 |
-
if($schema_type == 'AudioObject' ){
|
1880 |
-
|
1881 |
-
if ( isset( $_POST['saswp_audio_schema_name'] ) ){
|
1882 |
-
$audio_schema_details['saswp_audio_schema_name'] = sanitize_text_field($_POST['saswp_audio_schema_name']);
|
1883 |
-
}
|
1884 |
-
if ( isset( $_POST['saswp_audio_schema_description'] ) ){
|
1885 |
-
$audio_schema_details['saswp_audio_schema_description'] = sanitize_textarea_field($_POST['saswp_audio_schema_description']);
|
1886 |
-
}
|
1887 |
-
if ( isset( $_POST['saswp_audio_schema_contenturl'] ) ){
|
1888 |
-
$audio_schema_details['saswp_audio_schema_contenturl'] = esc_url_raw($_POST['saswp_audio_schema_contenturl']);
|
1889 |
-
}
|
1890 |
-
if ( isset( $_POST['saswp_audio_schema_duration'] ) ){
|
1891 |
-
$audio_schema_details['saswp_audio_schema_duration'] = sanitize_text_field($_POST['saswp_audio_schema_duration']);
|
1892 |
-
}
|
1893 |
-
if ( isset( $_POST['saswp_audio_schema_encoding_format'] ) ){
|
1894 |
-
$audio_schema_details['saswp_audio_schema_encoding_format'] = sanitize_text_field($_POST['saswp_audio_schema_encoding_format']);
|
1895 |
-
}
|
1896 |
-
|
1897 |
-
update_post_meta( $post_id, 'saswp_audio_schema_details', $audio_schema_details );
|
1898 |
-
|
1899 |
-
|
1900 |
-
}
|
1901 |
-
|
1902 |
-
if($schema_type == 'SoftwareApplication'){
|
1903 |
-
|
1904 |
-
if ( isset( $_POST['saswp_software_schema_name'] ) ){
|
1905 |
-
$software_schema_details['saswp_software_schema_name'] = sanitize_text_field($_POST['saswp_software_schema_name']);
|
1906 |
-
}
|
1907 |
-
if ( isset( $_POST['saswp_software_schema_description'] ) ){
|
1908 |
-
$software_schema_details['saswp_software_schema_description'] = sanitize_textarea_field($_POST['saswp_software_schema_description']);
|
1909 |
-
}
|
1910 |
-
if ( isset( $_POST['saswp_software_schema_operating_system'] ) ){
|
1911 |
-
$software_schema_details['saswp_software_schema_operating_system'] = sanitize_text_field($_POST['saswp_software_schema_operating_system']);
|
1912 |
-
}
|
1913 |
-
if ( isset( $_POST['saswp_software_schema_application_category'] ) ){
|
1914 |
-
$software_schema_details['saswp_software_schema_application_category'] = sanitize_text_field($_POST['saswp_software_schema_application_category']);
|
1915 |
-
}
|
1916 |
-
if ( isset( $_POST['saswp_software_schema_price'] ) ){
|
1917 |
-
$software_schema_details['saswp_software_schema_price'] = sanitize_text_field($_POST['saswp_software_schema_price']);
|
1918 |
-
}
|
1919 |
-
if ( isset( $_POST['saswp_software_schema_price_currency'] ) ){
|
1920 |
-
$software_schema_details['saswp_software_schema_price_currency'] = sanitize_text_field($_POST['saswp_software_schema_price_currency']);
|
1921 |
-
}
|
1922 |
-
|
1923 |
-
if ( isset( $_POST['saswp_software_schema_enable_rating'] ) ){
|
1924 |
-
$software_schema_details['saswp_software_schema_enable_rating'] = sanitize_text_field($_POST['saswp_software_schema_enable_rating']);
|
1925 |
-
}
|
1926 |
-
if ( isset( $_POST['saswp_software_schema_rating'] ) ){
|
1927 |
-
$software_schema_details['saswp_software_schema_rating'] = sanitize_text_field($_POST['saswp_software_schema_rating']);
|
1928 |
-
}
|
1929 |
-
if ( isset( $_POST['saswp_software_schema_rating_count'] ) ){
|
1930 |
-
$software_schema_details['saswp_software_schema_rating_count'] = sanitize_text_field($_POST['saswp_software_schema_rating_count']);
|
1931 |
-
}
|
1932 |
-
|
1933 |
-
update_post_meta( $post_id, 'saswp_software_schema_details', $software_schema_details );
|
1934 |
-
}
|
1935 |
-
|
1936 |
-
if($schema_type == 'Event'){
|
1937 |
-
|
1938 |
-
$event_schema_details = array();
|
1939 |
-
|
1940 |
-
if ( isset( $_POST['saswp_event_schema_name'] ) ){
|
1941 |
-
$event_schema_details['saswp_event_schema_name'] = sanitize_text_field($_POST['saswp_event_schema_name']);
|
1942 |
-
}
|
1943 |
-
|
1944 |
-
if ( isset( $_POST['saswp_event_schema_description'] ) ){
|
1945 |
-
$event_schema_details['saswp_event_schema_description'] = sanitize_textarea_field($_POST['saswp_event_schema_description']);
|
1946 |
-
}
|
1947 |
-
|
1948 |
-
if ( isset( $_POST['saswp_event_schema_location_name'] ) ){
|
1949 |
-
$event_schema_details['saswp_event_schema_location_name'] = sanitize_text_field($_POST['saswp_event_schema_location_name']);
|
1950 |
-
}
|
1951 |
-
|
1952 |
-
if ( isset( $_POST['saswp_event_schema_location_streetaddress'] ) ){
|
1953 |
-
$event_schema_details['saswp_event_schema_location_streetaddress'] = sanitize_text_field($_POST['saswp_event_schema_location_streetaddress']);
|
1954 |
-
}
|
1955 |
-
|
1956 |
-
if ( isset( $_POST['saswp_event_schema_location_locality'] ) ){
|
1957 |
-
$event_schema_details['saswp_event_schema_location_locality'] = sanitize_text_field($_POST['saswp_event_schema_location_locality']);
|
1958 |
-
}
|
1959 |
-
|
1960 |
-
if ( isset( $_POST['saswp_event_schema_location_region'] ) ){
|
1961 |
-
$event_schema_details['saswp_event_schema_location_region'] = sanitize_text_field($_POST['saswp_event_schema_location_region']);
|
1962 |
-
}
|
1963 |
-
|
1964 |
-
if ( isset( $_POST['saswp_event_schema_location_postalcode'] ) ){
|
1965 |
-
$event_schema_details['saswp_event_schema_location_postalcode'] = sanitize_text_field($_POST['saswp_event_schema_location_postalcode']);
|
1966 |
-
}
|
1967 |
-
if ( isset( $_POST['saswp_event_schema_start_date'] ) ){
|
1968 |
-
$event_schema_details['saswp_event_schema_start_date'] = sanitize_text_field($_POST['saswp_event_schema_start_date']);
|
1969 |
-
}
|
1970 |
-
|
1971 |
-
if ( isset( $_POST['saswp_event_schema_end_date'] ) ){
|
1972 |
-
$event_schema_details['saswp_event_schema_end_date'] = sanitize_text_field($_POST['saswp_event_schema_end_date']);
|
1973 |
-
}
|
1974 |
-
|
1975 |
-
if ( isset( $_POST['saswp_event_schema_performer_name'] ) ){
|
1976 |
-
$event_schema_details['saswp_event_schema_performer_name'] = sanitize_text_field($_POST['saswp_event_schema_performer_name']);
|
1977 |
-
}
|
1978 |
-
|
1979 |
-
if ( isset( $_POST['saswp_event_schema_price'] ) ){
|
1980 |
-
$event_schema_details['saswp_event_schema_price'] = sanitize_text_field($_POST['saswp_event_schema_price']);
|
1981 |
-
}
|
1982 |
-
|
1983 |
-
if ( isset( $_POST['saswp_event_schema_price_currency'] ) ){
|
1984 |
-
$event_schema_details['saswp_event_schema_price_currency'] = sanitize_text_field($_POST['saswp_event_schema_price_currency']);
|
1985 |
-
}
|
1986 |
-
|
1987 |
-
if ( isset( $_POST['saswp_event_schema_availability'] ) ){
|
1988 |
-
$event_schema_details['saswp_event_schema_availability'] = sanitize_text_field($_POST['saswp_event_schema_availability']);
|
1989 |
-
}
|
1990 |
-
|
1991 |
-
if ( isset( $_POST['saswp_event_schema_validfrom'] ) ){
|
1992 |
-
$event_schema_details['saswp_event_schema_validfrom'] = sanitize_text_field($_POST['saswp_event_schema_validfrom']);
|
1993 |
-
}
|
1994 |
-
|
1995 |
-
if ( isset( $_POST['saswp_event_schema_url'] ) ){
|
1996 |
-
$event_schema_details['saswp_event_schema_url'] = sanitize_text_field($_POST['saswp_event_schema_url']);
|
1997 |
-
}
|
1998 |
-
|
1999 |
-
if ( isset( $_POST['saswp_event_schema_image'] ) ){
|
2000 |
-
|
2001 |
-
$event_schema_details['saswp_event_schema_image']['id'] = sanitize_text_field($_POST['saswp_event_schema_image']['id']);
|
2002 |
-
$event_schema_details['saswp_event_schema_image']['url'] = esc_url_raw($_POST['saswp_event_schema_image']['url']);
|
2003 |
-
$event_schema_details['saswp_event_schema_image']['width'] = sanitize_text_field($_POST['saswp_event_schema_image']['width']);
|
2004 |
-
$event_schema_details['saswp_event_schema_image']['height'] = sanitize_text_field($_POST['saswp_event_schema_image']['height']);
|
2005 |
-
}
|
2006 |
-
|
2007 |
-
update_post_meta( $post_id, 'saswp_event_schema_details', $event_schema_details );
|
2008 |
}
|
2009 |
-
|
2010 |
if ( isset( $_POST['saswp_enable_speakable_schema'] ) ){
|
2011 |
|
2012 |
update_post_meta( $post_id, 'saswp_enable_speakable_schema', sanitize_text_field($_POST['saswp_enable_speakable_schema']) );
|
@@ -2016,8 +1280,7 @@ function saswp_schema_type_add_meta_box_save( $post_id ) {
|
|
2016 |
update_post_meta( $post_id, 'saswp_enable_speakable_schema', '0' );
|
2017 |
|
2018 |
}
|
2019 |
-
|
2020 |
-
|
2021 |
}
|
2022 |
|
2023 |
|
140 |
|
141 |
switch ($item) {
|
142 |
|
143 |
+
|
|
|
|
|
|
|
|
|
144 |
case 'Adultentertainment':
|
145 |
|
146 |
$reviewed_field;
|
215 |
|
216 |
);
|
217 |
|
218 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
case 'Movie':
|
220 |
$reviewed_field = array(
|
221 |
array(
|
274 |
)
|
275 |
|
276 |
);
|
277 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
case 'Restaurant':
|
279 |
$reviewed_field[] = array(
|
280 |
'label' => 'Serves Cuisine',
|
294 |
'placeholder' => 'https://example.com/menu'
|
295 |
)
|
296 |
);
|
297 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
298 |
case 'WebSite':
|
299 |
$reviewed_field = array(
|
300 |
array(
|
349 |
|
350 |
foreach ($meta_fields as $meta_field){
|
351 |
|
|
|
352 |
$attributes ='';
|
353 |
|
354 |
if(isset($meta_field['attributes'])){
|
365 |
|
366 |
$meta_value = get_post_meta( $post_id, $meta_field['id'], true );
|
367 |
|
|
|
368 |
if(!$meta_value){
|
369 |
|
370 |
$schema_data = get_post_meta( $schema_id, 'saswp_review_schema_details', true );
|
412 |
|
413 |
}
|
414 |
|
|
|
415 |
if(!empty($media_value_meta)){
|
416 |
|
417 |
$media_value = $media_value_meta;
|
511 |
return false;
|
512 |
}
|
513 |
}
|
514 |
+
|
515 |
+
|
516 |
+
function saswp_migrate_global_static_data($schema_type){
|
517 |
+
|
518 |
+
$meta_list = array();
|
519 |
+
$service = new saswp_output_service();
|
520 |
+
$meta_fields = $service->saswp_get_all_schema_type_fields($schema_type);
|
521 |
+
|
522 |
+
foreach($meta_fields as $key => $field){
|
523 |
+
$meta_list[$key] = 'manual_text';
|
524 |
+
}
|
525 |
+
|
526 |
+
return $meta_list;
|
527 |
+
}
|
528 |
+
|
529 |
+
|
530 |
/**
|
531 |
* Function to generate html markup for schema type metabox
|
532 |
* @param type $post
|
535 |
*/
|
536 |
function saswp_schema_type_meta_box_callback( $post) {
|
537 |
|
538 |
+
wp_nonce_field( 'saswp_schema_type_nonce', 'saswp_schema_type_nonce' );
|
539 |
+
|
540 |
+
$style_business_type = '';
|
541 |
+
$style_business_name = '';
|
542 |
+
$style_review_name = '';
|
543 |
+
$business_name = '';
|
544 |
+
$schema_type = '';
|
545 |
+
$business_type = '';
|
546 |
+
$custom_logo_id = '';
|
547 |
+
$speakable = '';
|
548 |
+
|
549 |
+
$business_details = array();
|
550 |
+
$logo = array();
|
551 |
+
$service_details = array();
|
552 |
+
$review_details = array();
|
553 |
+
$event_details = array();
|
554 |
+
|
555 |
+
if($post){
|
|
|
|
|
|
|
|
|
556 |
|
557 |
+
$schema_options = get_post_meta($post->ID, 'schema_options', true);
|
558 |
+
$meta_list = get_post_meta($post->ID, 'saswp_meta_list_val', true);
|
559 |
+
$fixed_text = get_post_meta($post->ID, 'saswp_fixed_text', true);
|
560 |
+
$cus_field = get_post_meta($post->ID, 'saswp_custom_meta_field', true);
|
561 |
+
$schema_type = get_post_meta($post->ID, 'schema_type', true);
|
562 |
|
563 |
+
switch ($schema_type) {
|
564 |
|
565 |
+
case 'AudioObject':
|
566 |
|
567 |
+
$audio_details = get_post_meta($post->ID, 'saswp_audio_schema_details', true);
|
568 |
|
569 |
+
if($audio_details){
|
570 |
|
571 |
+
$meta_list = saswp_migrate_global_static_data($schema_type);
|
572 |
+
$fixed_text = $audio_details;
|
573 |
+
$schema_options['enable_custom_field'] = 1;
|
574 |
+
|
575 |
+
update_post_meta( $post->ID, 'schema_options', $schema_options);
|
576 |
+
update_post_meta( $post->ID, 'saswp_meta_list_val', $meta_list);
|
577 |
+
update_post_meta( $post->ID, 'saswp_fixed_text', $fixed_text);
|
578 |
+
|
579 |
+
}
|
580 |
|
581 |
+
break;
|
582 |
|
583 |
+
case 'SoftwareApplication':
|
584 |
|
585 |
+
$software_details = get_post_meta($post->ID, 'saswp_software_schema_details', true);
|
586 |
|
587 |
+
if($software_details){
|
588 |
|
589 |
+
$meta_list = saswp_migrate_global_static_data($schema_type);
|
590 |
+
$fixed_text = $software_details;
|
591 |
+
$schema_options = array();
|
592 |
+
$schema_options['enable_custom_field'] = 1;
|
593 |
+
|
594 |
+
update_post_meta( $post->ID, 'schema_options', $schema_options);
|
595 |
+
update_post_meta( $post->ID, 'saswp_meta_list_val', $meta_list);
|
596 |
+
update_post_meta( $post->ID, 'saswp_fixed_text', $fixed_text);
|
597 |
+
}
|
598 |
|
599 |
+
break;
|
600 |
|
601 |
+
case 'Service':
|
602 |
|
603 |
+
$service_details = get_post_meta($post->ID, 'saswp_service_schema_details', true);
|
604 |
|
605 |
+
if($service_details){
|
606 |
|
607 |
+
$meta_list = saswp_migrate_global_static_data($schema_type);
|
608 |
|
609 |
+
foreach($service_details as $key => $details){
|
610 |
|
611 |
+
if(is_array($details)){
|
612 |
+
$service_details[$key] = array_key_exists('url', $details)? $details['url'] : '';
|
613 |
+
}else{
|
614 |
+
$service_details[$key] = $details;
|
615 |
+
}
|
616 |
+
}
|
617 |
|
618 |
+
$fixed_text = $service_details;
|
619 |
+
$schema_options = array();
|
620 |
+
$schema_options['enable_custom_field'] = 1;
|
621 |
+
|
622 |
+
update_post_meta( $post->ID, 'schema_options', $schema_options);
|
623 |
+
update_post_meta( $post->ID, 'saswp_meta_list_val', $meta_list);
|
624 |
+
update_post_meta( $post->ID, 'saswp_fixed_text', $fixed_text);
|
625 |
+
}
|
626 |
|
627 |
+
break;
|
628 |
|
629 |
+
case 'local_business':
|
630 |
|
631 |
+
$business_type = get_post_meta($post->ID, 'saswp_business_type', true);
|
632 |
+
$business_name = get_post_meta($post->ID, 'saswp_business_name', true);
|
633 |
+
$business_details = get_post_meta($post->ID, 'saswp_local_business_details', true);
|
634 |
+
$dayoftheweek = get_post_meta($post->ID, 'saswp_dayofweek', true);
|
635 |
|
636 |
+
if($business_details){
|
637 |
|
638 |
+
$meta_list = saswp_migrate_global_static_data($schema_type);
|
639 |
|
640 |
+
foreach($business_details as $key => $details){
|
641 |
|
642 |
+
if(is_array($details)){
|
643 |
+
$business_details[$key] = array_key_exists('url', $details)? $details['url'] : '';
|
644 |
+
}else{
|
645 |
+
$business_details[$key] = $details;
|
646 |
+
}
|
647 |
+
}
|
648 |
|
649 |
+
$fixed_text = $business_details;
|
650 |
+
$schema_options = array();
|
651 |
+
$schema_options['enable_custom_field'] = 1;
|
652 |
+
|
653 |
+
update_post_meta( $post->ID, 'schema_options', $schema_options);
|
654 |
+
update_post_meta( $post->ID, 'saswp_meta_list_val', $meta_list);
|
655 |
+
update_post_meta( $post->ID, 'saswp_fixed_text', $fixed_text);
|
656 |
+
}
|
657 |
|
658 |
+
break;
|
659 |
|
660 |
+
case 'Review':
|
661 |
|
662 |
+
$review_details = get_post_meta($post->ID, 'saswp_review_schema_details', true);
|
663 |
|
664 |
+
if(count($review_details) > 1){
|
665 |
+
|
666 |
+
$meta_list = saswp_migrate_global_static_data($schema_type);
|
667 |
+
|
668 |
+
foreach($review_details as $key => $details){
|
669 |
+
|
670 |
+
if(is_array($details)){
|
671 |
+
$review_details[$key] = array_key_exists('url', $details)? $details['url'] : '';
|
672 |
+
}else{
|
673 |
+
$review_details[$key] = $details;
|
674 |
+
}
|
675 |
+
}
|
676 |
+
|
677 |
+
$fixed_text = $review_details;
|
678 |
+
$schema_options = array();
|
679 |
+
$schema_options['enable_custom_field'] = 1;
|
680 |
+
|
681 |
+
update_post_meta( $post->ID, 'schema_options', $schema_options);
|
682 |
+
update_post_meta( $post->ID, 'saswp_meta_list_val', $meta_list);
|
683 |
+
update_post_meta( $post->ID, 'saswp_fixed_text', $fixed_text);
|
684 |
+
}
|
685 |
+
|
686 |
+
break;
|
687 |
+
|
688 |
+
case 'Event':
|
689 |
+
|
690 |
+
$event_details = get_post_meta($post->ID, 'saswp_event_schema_details', true);
|
691 |
|
692 |
+
if($event_details){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
693 |
|
694 |
+
$meta_list = saswp_migrate_global_static_data($schema_type);
|
695 |
+
|
696 |
+
foreach($event_details as $key => $details){
|
697 |
+
|
698 |
+
if(is_array($details)){
|
699 |
+
$event_details[$key] = array_key_exists('url', $details)? $details['url'] : '';
|
700 |
+
}else{
|
701 |
+
$event_details[$key] = $details;
|
702 |
+
}
|
703 |
+
}
|
704 |
+
|
705 |
+
$fixed_text = $event_details;
|
706 |
+
$schema_options = array();
|
707 |
+
$schema_options['enable_custom_field'] = 1;
|
708 |
+
|
709 |
+
update_post_meta( $post->ID, 'schema_options', $schema_options);
|
710 |
+
update_post_meta( $post->ID, 'saswp_meta_list_val', $meta_list);
|
711 |
+
update_post_meta( $post->ID, 'saswp_fixed_text', $fixed_text);
|
712 |
+
|
713 |
+
}
|
714 |
+
|
715 |
+
break;
|
716 |
+
|
717 |
+
default:
|
718 |
+
|
719 |
+
$speakable = get_post_meta($post->ID, 'saswp_enable_speakable_schema', true);
|
720 |
+
|
721 |
+
break;
|
722 |
+
}
|
723 |
+
|
724 |
+
$custom_logo_id = get_theme_mod( 'custom_logo' );
|
725 |
+
|
726 |
+
if($custom_logo_id){
|
727 |
+
|
728 |
+
$logo = wp_get_attachment_image_src( $custom_logo_id , 'full' );
|
729 |
+
|
730 |
+
}
|
731 |
+
|
732 |
+
if($schema_type != 'local_business'){
|
733 |
+
|
734 |
+
$style_business_type = 'style="display:none"';
|
735 |
+
$style_business_name = 'style="display:none"';
|
736 |
+
|
737 |
+
}
|
738 |
+
}
|
739 |
+
|
740 |
$item_reviewed = array(
|
741 |
'Article' => 'Article',
|
742 |
'Adultentertainment' => 'Adult Entertainment',
|
769 |
if ( file_exists( $mappings_sub_business ) ) {
|
770 |
$sub_business_arr = include $mappings_sub_business;
|
771 |
}
|
772 |
+
|
|
|
|
|
773 |
$all_business_type = array(
|
774 |
'' => 'Select Business Type (Optional)',
|
775 |
'animalshelter' => 'Animal Shelter',
|
877 |
<td><?php echo esc_html__('Sub Business Type', 'schema-and-structured-data-for-wp' ); ?></td>
|
878 |
<td>
|
879 |
<select id="saswp_automotive" name="saswp_business_name">
|
880 |
+
|
881 |
<?php
|
|
|
882 |
foreach ($all_automotive_array as $key => $value) {
|
883 |
$sel = '';
|
884 |
if($business_name==$key){
|
887 |
echo "<option value='".esc_attr($key)."' ".esc_attr($sel).">".esc_html__($value, 'schema-and-structured-data-for-wp' )."</option>";
|
888 |
}
|
889 |
?>
|
890 |
+
|
891 |
</select>
|
892 |
</td>
|
893 |
|
950 |
<td>
|
951 |
<select id="saswp_financial_service" name="saswp_business_name">
|
952 |
<?php
|
|
|
|
|
953 |
foreach ($all_financial_array as $key => $value) {
|
954 |
$sel = '';
|
955 |
if($business_name == $key){
|
964 |
<tr class="saswp-foodestablishment-tr" <?php if(!array_key_exists($business_name, $all_food_establishment_array)){ echo 'style="display:none;"';}else{ echo $style_business_name;} ?>>
|
965 |
<td><?php echo esc_html__('Sub Business Type', 'schema-and-structured-data-for-wp' ); ?></td>
|
966 |
<td>
|
967 |
+
<select id="saswp_food_establishment" name="saswp_business_name">
|
968 |
<?php
|
|
|
969 |
foreach ($all_food_establishment_array as $key => $value) {
|
970 |
$sel = '';
|
971 |
if($business_name==$key){
|
1080 |
?>
|
1081 |
</select>
|
1082 |
</td>
|
1083 |
+
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1084 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1085 |
<!-- Review Schema type starts here -->
|
1086 |
<tr class="saswp-review-text-field-tr" <?php echo $style_review_name; ?>>
|
1087 |
<td><?php echo esc_html__('Item Reviewed Type', 'schema-and-structured-data-for-wp' ); ?></td>
|
1088 |
<td>
|
1089 |
|
1090 |
+
<select data-id="<?php if(is_object($post)){ echo esc_attr($post->ID); } ?>" name="saswp_review_schema_item_type" class="">
|
1091 |
+
<?php
|
1092 |
foreach ($item_reviewed as $key => $value) {
|
1093 |
$sel = '';
|
1094 |
if(saswp_remove_warnings($review_details, 'saswp_review_schema_item_type', 'saswp_string')==$key){
|
1100 |
</select>
|
1101 |
</td>
|
1102 |
</tr>
|
1103 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1104 |
<!-- Review Schema type ends here -->
|
1105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1106 |
<tr>
|
1107 |
<td>
|
1108 |
<label for="saswp-speakable"><?php echo esc_html__( 'Speakable ' ,'schema-and-structured-data-for-wp');?></label>
|
1127 |
|
1128 |
<?php
|
1129 |
|
1130 |
+
if(!empty($meta_list)){
|
|
|
1131 |
$schema_type = get_post_meta($post->ID, 'schema_type', true);
|
1132 |
|
1133 |
$service = new saswp_output_service();
|
1143 |
|
1144 |
if( $fieldkey == $key){
|
1145 |
|
1146 |
+
$option .='<option value="'.esc_attr($key).'" selected>'.esc_attr($val).'</option>';
|
1147 |
|
1148 |
}else{
|
1149 |
|
1150 |
+
$option .='<option value="'.esc_attr($key).'">'.esc_attr($val).'</option>';
|
1151 |
|
1152 |
}
|
1153 |
|
1154 |
}
|
1155 |
+
|
|
|
1156 |
echo $option;
|
1157 |
echo '</select>';
|
1158 |
echo '</td>';
|
1188 |
echo $list_html;
|
1189 |
echo '</select>';
|
1190 |
echo '</td>';
|
1191 |
+
|
|
|
1192 |
if($fieldval == 'manual_text'){
|
1193 |
+
echo '<td><input type="text" name="saswp_fixed_text['.esc_attr($fieldkey).']" value="'.(isset($fixed_text[$fieldkey]) ? esc_html($fixed_text[$fieldkey]) :'').'"></td>';
|
1194 |
}else if($fieldval == 'custom_field'){
|
1195 |
echo '<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['.esc_attr($fieldkey).']">';
|
1196 |
echo '<option value="'.esc_attr($cus_field[$fieldkey]).'">'.preg_replace( '/^_/', '', esc_html( str_replace( '_', ' ', $cus_field[$fieldkey] ) ) ).'</option>';
|
1234 |
function saswp_schema_type_add_meta_box_save( $post_id ) {
|
1235 |
|
1236 |
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;
|
1237 |
+
|
1238 |
if ( ! isset( $_POST['saswp_schema_type_nonce'] ) || ! wp_verify_nonce( $_POST['saswp_schema_type_nonce'], 'saswp_schema_type_nonce' ) ) return;
|
1239 |
if ( ! current_user_can( 'edit_post', $post_id ) ) return;
|
1240 |
|
1253 |
}else{
|
1254 |
update_post_meta( $post_id, 'saswp_business_name', '' );
|
1255 |
}
|
1256 |
+
|
1257 |
+
$review_schema_details = array();
|
1258 |
+
$schema_type = sanitize_text_field($_POST['schema_type']);
|
1259 |
+
|
1260 |
+
update_post_meta( $post_id, 'saswp_audio_schema_details', array());
|
1261 |
+
update_post_meta( $post_id, 'saswp_software_schema_details', array());
|
1262 |
+
update_post_meta( $post_id, 'saswp_service_schema_details', array());
|
1263 |
+
update_post_meta( $post_id, 'saswp_local_business_details', array());
|
1264 |
+
update_post_meta( $post_id, 'saswp_dayofweek', array());
|
1265 |
+
update_post_meta( $post_id, 'saswp_event_schema_details', array());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1266 |
|
1267 |
+
if($schema_type == 'Review'){
|
1268 |
+
|
1269 |
+
$review_schema_details['saswp_review_schema_item_type'] = sanitize_text_field($_POST['saswp_review_schema_item_type']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1270 |
update_post_meta( $post_id, 'saswp_review_schema_details', $review_schema_details);
|
1271 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1272 |
}
|
1273 |
+
|
1274 |
if ( isset( $_POST['saswp_enable_speakable_schema'] ) ){
|
1275 |
|
1276 |
update_post_meta( $post_id, 'saswp_enable_speakable_schema', sanitize_text_field($_POST['saswp_enable_speakable_schema']) );
|
1280 |
update_post_meta( $post_id, 'saswp_enable_speakable_schema', '0' );
|
1281 |
|
1282 |
}
|
1283 |
+
|
|
|
1284 |
}
|
1285 |
|
1286 |
|