Version Description
(02 Nov 2020) =
- Added: Support for "low price" and "high price" properties of the product schema #1133
- Added: NutritionInformation all properties such as ( servingSize, fatContent, saturatedFatContent etc. ) in Recipe Schema #1070
- Added: Properties ( employee & alumni ) in RealEstateAgent schema type. #1053
- Added: Generate an id for the comment markup. #1057
- Added: Price Range to the Service schema #1088
- Added: License property for ImageObject Schema #1190
- Added: Allow users to change the author from a person to an organization #749
- Fixed: Undefined index: wpdiscuz plugins\schema-and-structured-data-for-wp\admin_section\common-function.php on line 3054 #1228
Download this release
Release Info
Developer | magazine3 |
Plugin | Schema & Structured Data for WP & AMP |
Version | 1.9.53 |
Comparing to | |
See all releases |
Code changes from version 1.9.52 to 1.9.53
- admin_section/common-function.php +4 -3
- core/array-list/schema-properties.php +253 -16
- output/function.php +1 -0
- output/markup.php +342 -215
- output/service.php +112 -9
- readme.txt +13 -1
- structured-data-for-wp.php +2 -2
admin_section/common-function.php
CHANGED
@@ -2941,6 +2941,7 @@ function saswp_remove_anonymous_object_filter_or_action( $tag, $class, $method,
|
|
2941 |
function saswp_get_field_note($pname){
|
2942 |
|
2943 |
$notes = array(
|
|
|
2944 |
'rannarecipe' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/ranna-food-recipe-wordpress-theme/25157340">Ranna - Food & Recipe</a>',
|
2945 |
'easy_recipe' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/easyrecipe/">EasyRecipe</a>',
|
2946 |
'total_recipe_generator' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://codecanyon.net/item/total-recipe-generator-wordpress-recipe-maker-with-schema-and-nutrition-facts-elementor-addon/21445400/">Total Recipe Generator</a>',
|
@@ -3171,7 +3172,7 @@ function saswp_current_user_allowed(){
|
|
3171 |
|
3172 |
$hasrole = array_intersect( $currentuserrole, $saswp_roles );
|
3173 |
|
3174 |
-
if( !empty($hasrole)){
|
3175 |
return reset($hasrole);
|
3176 |
}
|
3177 |
|
@@ -3910,7 +3911,7 @@ function saswp_get_image_size_url( $image_id, $size = 'full', $image_sizes = arr
|
|
3910 |
return $image_url;
|
3911 |
}
|
3912 |
|
3913 |
-
function
|
3914 |
|
3915 |
$response = array();
|
3916 |
|
@@ -3922,7 +3923,7 @@ function saswp_area_served_expload ($data) {
|
|
3922 |
|
3923 |
foreach ($area_served as $value) {
|
3924 |
$response[] = array(
|
3925 |
-
'@type' =>
|
3926 |
'name' => $value
|
3927 |
);
|
3928 |
}
|
2941 |
function saswp_get_field_note($pname){
|
2942 |
|
2943 |
$notes = array(
|
2944 |
+
'wpdiscuz' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wpdiscuz/">Comments – wpDiscuz</a>',
|
2945 |
'rannarecipe' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/ranna-food-recipe-wordpress-theme/25157340">Ranna - Food & Recipe</a>',
|
2946 |
'easy_recipe' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/easyrecipe/">EasyRecipe</a>',
|
2947 |
'total_recipe_generator' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://codecanyon.net/item/total-recipe-generator-wordpress-recipe-maker-with-schema-and-nutrition-facts-elementor-addon/21445400/">Total Recipe Generator</a>',
|
3172 |
|
3173 |
$hasrole = array_intersect( $currentuserrole, $saswp_roles );
|
3174 |
|
3175 |
+
if( !empty($hasrole)){
|
3176 |
return reset($hasrole);
|
3177 |
}
|
3178 |
|
3911 |
return $image_url;
|
3912 |
}
|
3913 |
|
3914 |
+
function saswp_explode_comma_seprated ($data, $type) {
|
3915 |
|
3916 |
$response = array();
|
3917 |
|
3923 |
|
3924 |
foreach ($area_served as $value) {
|
3925 |
$response[] = array(
|
3926 |
+
'@type' => $type,
|
3927 |
'name' => $value
|
3928 |
);
|
3929 |
}
|
core/array-list/schema-properties.php
CHANGED
@@ -122,13 +122,14 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
122 |
$meta_field[] = array(
|
123 |
'label' => 'Business Name',
|
124 |
'id' => 'local_business_name_'.$schema_id,
|
125 |
-
'type' => 'text',
|
|
|
126 |
);
|
127 |
|
128 |
$meta_field[] = array(
|
129 |
-
|
130 |
-
'id'
|
131 |
-
'type'
|
132 |
'default' => get_permalink()
|
133 |
);
|
134 |
|
@@ -137,8 +138,7 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
137 |
'id' => 'local_business_description_'.$schema_id,
|
138 |
'type' => 'textarea',
|
139 |
'default' => is_object($post) ? $post->post_excerpt : ''
|
140 |
-
);
|
141 |
-
|
142 |
$meta_field[] = array(
|
143 |
'label' => 'Street Address',
|
144 |
'id' => 'local_street_address_'.$schema_id,
|
@@ -238,7 +238,19 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
238 |
'label' => 'Additional Type',
|
239 |
'id' => 'local_additional_type_'.$schema_id,
|
240 |
'type' => 'text',
|
241 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
$meta_field[] = array(
|
243 |
'label' => 'Facebook',
|
244 |
'id' => 'local_facebook_'.$schema_id,
|
@@ -354,6 +366,15 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
354 |
'type' => 'text',
|
355 |
'default' => get_the_modified_date("Y-m-d")
|
356 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
357 |
array(
|
358 |
'label' => 'Author Name',
|
359 |
'id' => 'saswp_blogposting_author_name_'.$schema_id,
|
@@ -494,6 +515,15 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
494 |
'type' => 'text',
|
495 |
'default' => get_permalink()
|
496 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
497 |
array(
|
498 |
'label' => 'Author Name',
|
499 |
'id' => 'saswp_newsarticle_author_name_'.$schema_id,
|
@@ -607,6 +637,15 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
607 |
'type' => 'text',
|
608 |
'default' => saswp_remove_warnings($sd_data, 'sd_name', 'saswp_string')
|
609 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
610 |
array(
|
611 |
'label' => 'Author Name',
|
612 |
'id' => 'saswp_webpage_author_name_'.$schema_id,
|
@@ -707,6 +746,15 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
707 |
'type' => 'text',
|
708 |
'default' => get_the_modified_date("Y-m-d")
|
709 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
710 |
array(
|
711 |
'label' => 'Author Name',
|
712 |
'id' => 'saswp_article_author_name_'.$schema_id,
|
@@ -839,6 +887,15 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
839 |
'id' => 'saswp_special_announcement_image_'.$schema_id,
|
840 |
'type' => 'media'
|
841 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
842 |
array(
|
843 |
'label' => 'Author Name',
|
844 |
'id' => 'saswp_special_announcement_author_name_'.$schema_id,
|
@@ -1176,6 +1233,15 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
1176 |
'type' => 'text',
|
1177 |
'default' => get_the_modified_date("Y-m-d")
|
1178 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1179 |
array(
|
1180 |
'label' => 'Author Name',
|
1181 |
'id' => 'saswp_tech_article_author_name_'.$schema_id,
|
@@ -1207,10 +1273,9 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
1207 |
'default' => isset($sd_data['sd_logo']) ? $sd_data['sd_logo']['url']:''
|
1208 |
),
|
1209 |
array(
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
)
|
1215 |
);
|
1216 |
break;
|
@@ -1355,6 +1420,15 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
1355 |
'type' => 'text',
|
1356 |
'default' => get_the_modified_date("Y-m-d")
|
1357 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1358 |
array(
|
1359 |
'label' => 'Author Name',
|
1360 |
'id' => 'saswp_dfp_author_name_'.$schema_id,
|
@@ -1432,6 +1506,15 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
1432 |
'type' => 'text',
|
1433 |
'default' => get_permalink()
|
1434 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1435 |
array(
|
1436 |
'label' => 'Author Name',
|
1437 |
'id' => 'saswp_recipe_author_name_'.$schema_id,
|
@@ -1580,6 +1663,46 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
1580 |
'placeholder' => '270 grams'
|
1581 |
),
|
1582 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1583 |
array(
|
1584 |
'label' => 'Recipe Ingredient',
|
1585 |
'id' => 'saswp_recipe_ingredient_'.$schema_id,
|
@@ -1903,6 +2026,15 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
1903 |
'type' => 'text',
|
1904 |
'default' => get_the_modified_date("Y-m-d")
|
1905 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1906 |
array(
|
1907 |
'label' => 'Author Name',
|
1908 |
'id' => 'saswp_audiobook_author_name_'.$schema_id,
|
@@ -2381,7 +2513,24 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
2381 |
'id' => 'saswp_product_schema_price_'.$schema_id,
|
2382 |
'type' => 'text',
|
2383 |
'default' => saswp_remove_warnings($product_details, 'product_price', 'saswp_string')
|
2384 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2385 |
array(
|
2386 |
'label' => 'Price Valid Until',
|
2387 |
'id' => 'saswp_product_schema_priceValidUntil_'.$schema_id,
|
@@ -2492,13 +2641,13 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
2492 |
$meta_field = array(
|
2493 |
array(
|
2494 |
'label' => 'Name',
|
2495 |
-
'id'
|
2496 |
-
'type'
|
2497 |
),
|
2498 |
array(
|
2499 |
'label' => 'URL',
|
2500 |
-
'id'
|
2501 |
-
'type'
|
2502 |
),
|
2503 |
array(
|
2504 |
'label' => 'Service Type',
|
@@ -2550,6 +2699,11 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
2550 |
'label' => 'Telephone',
|
2551 |
'id' => 'saswp_service_schema_telephone_'.$schema_id,
|
2552 |
'type' => 'text',
|
|
|
|
|
|
|
|
|
|
|
2553 |
),
|
2554 |
array(
|
2555 |
'label' => 'Description',
|
@@ -2727,6 +2881,15 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
2727 |
'type' => 'text',
|
2728 |
'default' => get_the_modified_date("Y-m-d")
|
2729 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2730 |
array(
|
2731 |
'label' => 'Author Name',
|
2732 |
'id' => 'saswp_audio_schema_author_name_'.$schema_id,
|
@@ -2969,6 +3132,15 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
2969 |
'type' => 'text',
|
2970 |
'default' => get_permalink()
|
2971 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2972 |
array(
|
2973 |
'label' => 'Author Name',
|
2974 |
'id' => 'saswp_video_object_author_name_'.$schema_id,
|
@@ -3056,6 +3228,15 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
3056 |
'label' => 'Content Location',
|
3057 |
'id' => 'saswpimage_object_content_location_'.$schema_id,
|
3058 |
'type' => 'text'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3059 |
),
|
3060 |
array(
|
3061 |
'label' => 'Author Name',
|
@@ -3081,6 +3262,11 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
3081 |
'type' => 'media',
|
3082 |
'default' => isset($author_details['url']) ? $author_details['url'] : ''
|
3083 |
),
|
|
|
|
|
|
|
|
|
|
|
3084 |
array(
|
3085 |
'label' => 'Organization Name',
|
3086 |
'id' => 'saswpimage_object_organization_name_'.$schema_id,
|
@@ -3119,6 +3305,11 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
3119 |
'id' => 'saswp_qa_date_created_'.$schema_id,
|
3120 |
'type' => 'text',
|
3121 |
),
|
|
|
|
|
|
|
|
|
|
|
3122 |
array(
|
3123 |
'label' => 'Author Name',
|
3124 |
'id' => 'saswp_qa_question_author_name_'.$schema_id,
|
@@ -3328,6 +3519,16 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
3328 |
'id' => 'saswp_vg_schema_application_category_'.$schema_id,
|
3329 |
'type' => 'text',
|
3330 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3331 |
),
|
3332 |
array(
|
3333 |
'label' => 'Author Name',
|
@@ -3440,6 +3641,15 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
3440 |
'id' => 'saswp_tvseries_schema_image_'.$schema_id,
|
3441 |
'type' => 'media'
|
3442 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3443 |
array(
|
3444 |
'label' => 'Author Name',
|
3445 |
'id' => 'saswp_tvseries_schema_author_name_'.$schema_id,
|
@@ -4463,6 +4673,15 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
4463 |
'type' => 'text',
|
4464 |
'default' => saswp_get_the_tags()
|
4465 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4466 |
array(
|
4467 |
'label' => 'Author',
|
4468 |
'id' => 'saswp_faq_author_'.$schema_id,
|
@@ -4754,6 +4973,15 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
4754 |
'type' => 'text',
|
4755 |
'default' => get_the_modified_date("Y-m-d")
|
4756 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4757 |
array(
|
4758 |
'label' => 'Author Name',
|
4759 |
'id' => 'saswp_cws_schema_author_name_'.$schema_id,
|
@@ -4894,6 +5122,15 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
4894 |
'id' => 'saswp_book_image_'.$schema_id,
|
4895 |
'type' => 'media',
|
4896 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4897 |
array(
|
4898 |
'label' => 'Author',
|
4899 |
'id' => 'saswp_book_author_'.$schema_id,
|
122 |
$meta_field[] = array(
|
123 |
'label' => 'Business Name',
|
124 |
'id' => 'local_business_name_'.$schema_id,
|
125 |
+
'type' => 'text',
|
126 |
+
|
127 |
);
|
128 |
|
129 |
$meta_field[] = array(
|
130 |
+
'label' => 'URL',
|
131 |
+
'id' => 'local_business_name_url_'.$schema_id,
|
132 |
+
'type' => 'text',
|
133 |
'default' => get_permalink()
|
134 |
);
|
135 |
|
138 |
'id' => 'local_business_description_'.$schema_id,
|
139 |
'type' => 'textarea',
|
140 |
'default' => is_object($post) ? $post->post_excerpt : ''
|
141 |
+
);
|
|
|
142 |
$meta_field[] = array(
|
143 |
'label' => 'Street Address',
|
144 |
'id' => 'local_street_address_'.$schema_id,
|
238 |
'label' => 'Additional Type',
|
239 |
'id' => 'local_additional_type_'.$schema_id,
|
240 |
'type' => 'text',
|
241 |
+
);
|
242 |
+
$meta_field[] = array(
|
243 |
+
'label' => 'Founder',
|
244 |
+
'id' => 'local_business_founder_'.$schema_id,
|
245 |
+
'type' => 'textarea',
|
246 |
+
'note' => 'Note: If There are more than one founder, Separate founder list by comma ( , )'
|
247 |
+
);
|
248 |
+
$meta_field[] = array(
|
249 |
+
'label' => 'Employee',
|
250 |
+
'id' => 'local_business_employee_'.$schema_id,
|
251 |
+
'type' => 'textarea',
|
252 |
+
'note' => 'Note: If There are more than one employee. Separate employee list by comma ( , )'
|
253 |
+
);
|
254 |
$meta_field[] = array(
|
255 |
'label' => 'Facebook',
|
256 |
'id' => 'local_facebook_'.$schema_id,
|
366 |
'type' => 'text',
|
367 |
'default' => get_the_modified_date("Y-m-d")
|
368 |
),
|
369 |
+
array(
|
370 |
+
'label' => 'Author Type',
|
371 |
+
'id' => 'saswp_blogposting_author_type_'.$schema_id,
|
372 |
+
'type' => 'select',
|
373 |
+
'options' => array(
|
374 |
+
'Person' => 'Person',
|
375 |
+
'Organization' => 'Organization',
|
376 |
+
)
|
377 |
+
),
|
378 |
array(
|
379 |
'label' => 'Author Name',
|
380 |
'id' => 'saswp_blogposting_author_name_'.$schema_id,
|
515 |
'type' => 'text',
|
516 |
'default' => get_permalink()
|
517 |
),
|
518 |
+
array(
|
519 |
+
'label' => 'Author Type',
|
520 |
+
'id' => 'saswp_newsarticle_author_type_'.$schema_id,
|
521 |
+
'type' => 'select',
|
522 |
+
'options' => array(
|
523 |
+
'Person' => 'Person',
|
524 |
+
'Organization' => 'Organization',
|
525 |
+
)
|
526 |
+
),
|
527 |
array(
|
528 |
'label' => 'Author Name',
|
529 |
'id' => 'saswp_newsarticle_author_name_'.$schema_id,
|
637 |
'type' => 'text',
|
638 |
'default' => saswp_remove_warnings($sd_data, 'sd_name', 'saswp_string')
|
639 |
),
|
640 |
+
array(
|
641 |
+
'label' => 'Author Type',
|
642 |
+
'id' => 'saswp_webpage_author_type_'.$schema_id,
|
643 |
+
'type' => 'select',
|
644 |
+
'options' => array(
|
645 |
+
'Person' => 'Person',
|
646 |
+
'Organization' => 'Organization',
|
647 |
+
)
|
648 |
+
),
|
649 |
array(
|
650 |
'label' => 'Author Name',
|
651 |
'id' => 'saswp_webpage_author_name_'.$schema_id,
|
746 |
'type' => 'text',
|
747 |
'default' => get_the_modified_date("Y-m-d")
|
748 |
),
|
749 |
+
array(
|
750 |
+
'label' => 'Author Type',
|
751 |
+
'id' => 'saswp_article_author_type_'.$schema_id,
|
752 |
+
'type' => 'select',
|
753 |
+
'options' => array(
|
754 |
+
'Person' => 'Person',
|
755 |
+
'Organization' => 'Organization',
|
756 |
+
)
|
757 |
+
),
|
758 |
array(
|
759 |
'label' => 'Author Name',
|
760 |
'id' => 'saswp_article_author_name_'.$schema_id,
|
887 |
'id' => 'saswp_special_announcement_image_'.$schema_id,
|
888 |
'type' => 'media'
|
889 |
),
|
890 |
+
array(
|
891 |
+
'label' => 'Author Type',
|
892 |
+
'id' => 'saswp_special_announcement_author_type_'.$schema_id,
|
893 |
+
'type' => 'select',
|
894 |
+
'options' => array(
|
895 |
+
'Person' => 'Person',
|
896 |
+
'Organization' => 'Organization',
|
897 |
+
)
|
898 |
+
),
|
899 |
array(
|
900 |
'label' => 'Author Name',
|
901 |
'id' => 'saswp_special_announcement_author_name_'.$schema_id,
|
1233 |
'type' => 'text',
|
1234 |
'default' => get_the_modified_date("Y-m-d")
|
1235 |
),
|
1236 |
+
array(
|
1237 |
+
'label' => 'Author Type',
|
1238 |
+
'id' => 'saswp_tech_article_author_type_'.$schema_id,
|
1239 |
+
'type' => 'select',
|
1240 |
+
'options' => array(
|
1241 |
+
'Person' => 'Person',
|
1242 |
+
'Organization' => 'Organization',
|
1243 |
+
)
|
1244 |
+
),
|
1245 |
array(
|
1246 |
'label' => 'Author Name',
|
1247 |
'id' => 'saswp_tech_article_author_name_'.$schema_id,
|
1273 |
'default' => isset($sd_data['sd_logo']) ? $sd_data['sd_logo']['url']:''
|
1274 |
),
|
1275 |
array(
|
1276 |
+
'label' => 'Speakable',
|
1277 |
+
'id' => 'saswp_tech_article_speakable_'.$schema_id,
|
1278 |
+
'type' => 'checkbox'
|
|
|
1279 |
)
|
1280 |
);
|
1281 |
break;
|
1420 |
'type' => 'text',
|
1421 |
'default' => get_the_modified_date("Y-m-d")
|
1422 |
),
|
1423 |
+
array(
|
1424 |
+
'label' => 'Author Type',
|
1425 |
+
'id' => 'saswp_dfp_author_type_'.$schema_id,
|
1426 |
+
'type' => 'select',
|
1427 |
+
'options' => array(
|
1428 |
+
'Person' => 'Person',
|
1429 |
+
'Organization' => 'Organization',
|
1430 |
+
)
|
1431 |
+
),
|
1432 |
array(
|
1433 |
'label' => 'Author Name',
|
1434 |
'id' => 'saswp_dfp_author_name_'.$schema_id,
|
1506 |
'type' => 'text',
|
1507 |
'default' => get_permalink()
|
1508 |
),
|
1509 |
+
array(
|
1510 |
+
'label' => 'Author Type',
|
1511 |
+
'id' => 'saswp_recipe_author_type_'.$schema_id,
|
1512 |
+
'type' => 'select',
|
1513 |
+
'options' => array(
|
1514 |
+
'Person' => 'Person',
|
1515 |
+
'Organization' => 'Organization',
|
1516 |
+
)
|
1517 |
+
),
|
1518 |
array(
|
1519 |
'label' => 'Author Name',
|
1520 |
'id' => 'saswp_recipe_author_name_'.$schema_id,
|
1663 |
'placeholder' => '270 grams'
|
1664 |
),
|
1665 |
),
|
1666 |
+
array(
|
1667 |
+
'label' => 'Cholesterol',
|
1668 |
+
'id' => 'saswp_recipe_cholesterol_'.$schema_id,
|
1669 |
+
'type' => 'text',
|
1670 |
+
'attributes' => array(
|
1671 |
+
'placeholder' => '270 grams'
|
1672 |
+
),
|
1673 |
+
),
|
1674 |
+
array(
|
1675 |
+
'label' => 'Saturated Fat',
|
1676 |
+
'id' => 'saswp_recipe_saturated_fat_'.$schema_id,
|
1677 |
+
'type' => 'text',
|
1678 |
+
'attributes' => array(
|
1679 |
+
'placeholder' => '270 grams'
|
1680 |
+
),
|
1681 |
+
),
|
1682 |
+
array(
|
1683 |
+
'label' => 'Unsaturated Fat',
|
1684 |
+
'id' => 'saswp_recipe_unsaturated_fat_'.$schema_id,
|
1685 |
+
'type' => 'text',
|
1686 |
+
'attributes' => array(
|
1687 |
+
'placeholder' => '270 grams'
|
1688 |
+
),
|
1689 |
+
),
|
1690 |
+
array(
|
1691 |
+
'label' => 'Trans Fat',
|
1692 |
+
'id' => 'saswp_recipe_trans_fat_'.$schema_id,
|
1693 |
+
'type' => 'text',
|
1694 |
+
'attributes' => array(
|
1695 |
+
'placeholder' => '270 grams'
|
1696 |
+
),
|
1697 |
+
),
|
1698 |
+
array(
|
1699 |
+
'label' => 'Serving Size',
|
1700 |
+
'id' => 'saswp_recipe_serving_size_'.$schema_id,
|
1701 |
+
'type' => 'text',
|
1702 |
+
'attributes' => array(
|
1703 |
+
'placeholder' => '370 grams'
|
1704 |
+
),
|
1705 |
+
),
|
1706 |
array(
|
1707 |
'label' => 'Recipe Ingredient',
|
1708 |
'id' => 'saswp_recipe_ingredient_'.$schema_id,
|
2026 |
'type' => 'text',
|
2027 |
'default' => get_the_modified_date("Y-m-d")
|
2028 |
),
|
2029 |
+
array(
|
2030 |
+
'label' => 'Author Type',
|
2031 |
+
'id' => 'saswp_audiobook_author_type_'.$schema_id,
|
2032 |
+
'type' => 'select',
|
2033 |
+
'options' => array(
|
2034 |
+
'Person' => 'Person',
|
2035 |
+
'Organization' => 'Organization',
|
2036 |
+
)
|
2037 |
+
),
|
2038 |
array(
|
2039 |
'label' => 'Author Name',
|
2040 |
'id' => 'saswp_audiobook_author_name_'.$schema_id,
|
2513 |
'id' => 'saswp_product_schema_price_'.$schema_id,
|
2514 |
'type' => 'text',
|
2515 |
'default' => saswp_remove_warnings($product_details, 'product_price', 'saswp_string')
|
2516 |
+
),
|
2517 |
+
array(
|
2518 |
+
'label' => 'High Price',
|
2519 |
+
'id' => 'saswp_product_schema_high_price_'.$schema_id,
|
2520 |
+
'type' => 'text',
|
2521 |
+
'default' => saswp_remove_warnings($product_details, 'product_price', 'saswp_string')
|
2522 |
+
),
|
2523 |
+
array(
|
2524 |
+
'label' => 'Low Price',
|
2525 |
+
'id' => 'saswp_product_schema_low_price_'.$schema_id,
|
2526 |
+
'type' => 'text',
|
2527 |
+
'default' => saswp_remove_warnings($product_details, 'product_price', 'saswp_string')
|
2528 |
+
),
|
2529 |
+
array(
|
2530 |
+
'label' => 'Offer Count',
|
2531 |
+
'id' => 'saswp_product_schema_offer_count_'.$schema_id,
|
2532 |
+
'type' => 'text',
|
2533 |
+
),
|
2534 |
array(
|
2535 |
'label' => 'Price Valid Until',
|
2536 |
'id' => 'saswp_product_schema_priceValidUntil_'.$schema_id,
|
2641 |
$meta_field = array(
|
2642 |
array(
|
2643 |
'label' => 'Name',
|
2644 |
+
'id' => 'saswp_service_schema_name_'.$schema_id,
|
2645 |
+
'type' => 'text',
|
2646 |
),
|
2647 |
array(
|
2648 |
'label' => 'URL',
|
2649 |
+
'id' => 'saswp_service_schema_url_'.$schema_id,
|
2650 |
+
'type' => 'text',
|
2651 |
),
|
2652 |
array(
|
2653 |
'label' => 'Service Type',
|
2699 |
'label' => 'Telephone',
|
2700 |
'id' => 'saswp_service_schema_telephone_'.$schema_id,
|
2701 |
'type' => 'text',
|
2702 |
+
),
|
2703 |
+
array(
|
2704 |
+
'label' => 'Price Range',
|
2705 |
+
'id' => 'saswp_service_schema_price_range_'.$schema_id,
|
2706 |
+
'type' => 'text',
|
2707 |
),
|
2708 |
array(
|
2709 |
'label' => 'Description',
|
2881 |
'type' => 'text',
|
2882 |
'default' => get_the_modified_date("Y-m-d")
|
2883 |
),
|
2884 |
+
array(
|
2885 |
+
'label' => 'Author Type',
|
2886 |
+
'id' => 'saswp_audio_schema_author_type_'.$schema_id,
|
2887 |
+
'type' => 'select',
|
2888 |
+
'options' => array(
|
2889 |
+
'Person' => 'Person',
|
2890 |
+
'Organization' => 'Organization',
|
2891 |
+
)
|
2892 |
+
),
|
2893 |
array(
|
2894 |
'label' => 'Author Name',
|
2895 |
'id' => 'saswp_audio_schema_author_name_'.$schema_id,
|
3132 |
'type' => 'text',
|
3133 |
'default' => get_permalink()
|
3134 |
),
|
3135 |
+
array(
|
3136 |
+
'label' => 'Author Type',
|
3137 |
+
'id' => 'saswp_video_object_author_type_'.$schema_id,
|
3138 |
+
'type' => 'select',
|
3139 |
+
'options' => array(
|
3140 |
+
'Person' => 'Person',
|
3141 |
+
'Organization' => 'Organization',
|
3142 |
+
)
|
3143 |
+
),
|
3144 |
array(
|
3145 |
'label' => 'Author Name',
|
3146 |
'id' => 'saswp_video_object_author_name_'.$schema_id,
|
3228 |
'label' => 'Content Location',
|
3229 |
'id' => 'saswpimage_object_content_location_'.$schema_id,
|
3230 |
'type' => 'text'
|
3231 |
+
),
|
3232 |
+
array(
|
3233 |
+
'label' => 'Author Type',
|
3234 |
+
'id' => 'saswpimage_object_author_type_'.$schema_id,
|
3235 |
+
'type' => 'select',
|
3236 |
+
'options' => array(
|
3237 |
+
'Person' => 'Person',
|
3238 |
+
'Organization' => 'Organization',
|
3239 |
+
)
|
3240 |
),
|
3241 |
array(
|
3242 |
'label' => 'Author Name',
|
3262 |
'type' => 'media',
|
3263 |
'default' => isset($author_details['url']) ? $author_details['url'] : ''
|
3264 |
),
|
3265 |
+
array(
|
3266 |
+
'label' => 'License',
|
3267 |
+
'id' => 'saswpimage_object_license_'.$schema_id,
|
3268 |
+
'type' => 'text',
|
3269 |
+
),
|
3270 |
array(
|
3271 |
'label' => 'Organization Name',
|
3272 |
'id' => 'saswpimage_object_organization_name_'.$schema_id,
|
3305 |
'id' => 'saswp_qa_date_created_'.$schema_id,
|
3306 |
'type' => 'text',
|
3307 |
),
|
3308 |
+
array(
|
3309 |
+
'label' => 'Author Type',
|
3310 |
+
'id' => 'saswp_qa_question_author_type_'.$schema_id,
|
3311 |
+
'type' => 'text',
|
3312 |
+
),
|
3313 |
array(
|
3314 |
'label' => 'Author Name',
|
3315 |
'id' => 'saswp_qa_question_author_name_'.$schema_id,
|
3519 |
'id' => 'saswp_vg_schema_application_category_'.$schema_id,
|
3520 |
'type' => 'text',
|
3521 |
|
3522 |
+
),
|
3523 |
+
array(
|
3524 |
+
'label' => 'Author Type',
|
3525 |
+
'id' => 'saswp_vg_schema_author_type_'.$schema_id,
|
3526 |
+
'type' => 'select',
|
3527 |
+
'options' => array(
|
3528 |
+
'Person' => 'Person',
|
3529 |
+
'Organization' => 'Organization',
|
3530 |
+
)
|
3531 |
+
|
3532 |
),
|
3533 |
array(
|
3534 |
'label' => 'Author Name',
|
3641 |
'id' => 'saswp_tvseries_schema_image_'.$schema_id,
|
3642 |
'type' => 'media'
|
3643 |
),
|
3644 |
+
array(
|
3645 |
+
'label' => 'Author Type',
|
3646 |
+
'id' => 'saswp_tvseries_schema_author_type_'.$schema_id,
|
3647 |
+
'type' => 'select',
|
3648 |
+
'options' => array(
|
3649 |
+
'Person' => 'Person',
|
3650 |
+
'Organization' => 'Organization',
|
3651 |
+
)
|
3652 |
+
),
|
3653 |
array(
|
3654 |
'label' => 'Author Name',
|
3655 |
'id' => 'saswp_tvseries_schema_author_name_'.$schema_id,
|
4673 |
'type' => 'text',
|
4674 |
'default' => saswp_get_the_tags()
|
4675 |
),
|
4676 |
+
array(
|
4677 |
+
'label' => 'Author Type',
|
4678 |
+
'id' => 'saswp_faq_author_type_'.$schema_id,
|
4679 |
+
'type' => 'select',
|
4680 |
+
'options' => array(
|
4681 |
+
'Person' => 'Person',
|
4682 |
+
'Organization' => 'Organization',
|
4683 |
+
)
|
4684 |
+
),
|
4685 |
array(
|
4686 |
'label' => 'Author',
|
4687 |
'id' => 'saswp_faq_author_'.$schema_id,
|
4973 |
'type' => 'text',
|
4974 |
'default' => get_the_modified_date("Y-m-d")
|
4975 |
),
|
4976 |
+
array(
|
4977 |
+
'label' => 'Author Type',
|
4978 |
+
'id' => 'saswp_cws_schema_author_type_'.$schema_id,
|
4979 |
+
'type' => 'select',
|
4980 |
+
'options' => array(
|
4981 |
+
'Person' => 'Person',
|
4982 |
+
'Organization' => 'Organization',
|
4983 |
+
)
|
4984 |
+
),
|
4985 |
array(
|
4986 |
'label' => 'Author Name',
|
4987 |
'id' => 'saswp_cws_schema_author_name_'.$schema_id,
|
5122 |
'id' => 'saswp_book_image_'.$schema_id,
|
5123 |
'type' => 'media',
|
5124 |
),
|
5125 |
+
array(
|
5126 |
+
'label' => 'Author Type',
|
5127 |
+
'id' => 'saswp_book_author_type_'.$schema_id,
|
5128 |
+
'type' => 'select',
|
5129 |
+
'options' => array(
|
5130 |
+
'Person' => 'Person',
|
5131 |
+
'Organization' => 'Organization',
|
5132 |
+
)
|
5133 |
+
),
|
5134 |
array(
|
5135 |
'label' => 'Author',
|
5136 |
'id' => 'saswp_book_author_'.$schema_id,
|
output/function.php
CHANGED
@@ -1064,6 +1064,7 @@ function saswp_get_comments($post_id){
|
|
1064 |
|
1065 |
$comments[] = array (
|
1066 |
'@type' => 'Comment',
|
|
|
1067 |
'dateCreated' => $is_bbpress ? $comment->comment_date : saswp_format_date_time($comment->comment_date),
|
1068 |
'description' => strip_tags($comment->comment_content),
|
1069 |
'author' => array (
|
1064 |
|
1065 |
$comments[] = array (
|
1066 |
'@type' => 'Comment',
|
1067 |
+
'id' => trailingslashit(get_permalink()).'comment-'.$comment->comment_ID,
|
1068 |
'dateCreated' => $is_bbpress ? $comment->comment_date : saswp_format_date_time($comment->comment_date),
|
1069 |
'description' => strip_tags($comment->comment_content),
|
1070 |
'author' => array (
|
output/markup.php
CHANGED
@@ -107,7 +107,13 @@ function saswp_book_schema_markup($schema_id, $schema_post_id, $all_post_meta){
|
|
107 |
}
|
108 |
|
109 |
if($all_post_meta['saswp_book_author_'.$schema_id][0]){
|
|
|
110 |
$input1['author']['@type'] = 'Person';
|
|
|
|
|
|
|
|
|
|
|
111 |
$input1['author']['name'] = $all_post_meta['saswp_book_author_'.$schema_id][0];
|
112 |
|
113 |
if($all_post_meta['saswp_book_author_url_'.$schema_id][0]){
|
@@ -685,8 +691,8 @@ function saswp_recipe_schema_markup($schema_id, $schema_post_id, $all_post_meta)
|
|
685 |
|
686 |
$input1 = array();
|
687 |
|
688 |
-
$recipe_logo
|
689 |
-
$recipe_image
|
690 |
$recipe_author_image = get_post_meta( get_the_ID(), 'saswp_recipe_author_image_'.$schema_id.'_detail',true);
|
691 |
|
692 |
$ingredient = array();
|
@@ -713,28 +719,15 @@ function saswp_recipe_schema_markup($schema_id, $schema_post_id, $all_post_meta)
|
|
713 |
$input1 = array(
|
714 |
'@context' => saswp_context_url(),
|
715 |
'@type' => 'Recipe' ,
|
716 |
-
'@id'
|
717 |
'url' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_url_'.$schema_id, 'saswp_array'),
|
718 |
-
'name'
|
719 |
-
'image'
|
720 |
-
|
721 |
'url' => saswp_remove_warnings( $recipe_image, 'thumbnail', 'saswp_string'),
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
'author' => array(
|
726 |
-
'@type' => 'Person',
|
727 |
-
'name' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_author_name_'.$schema_id, 'saswp_array'),
|
728 |
-
'description' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_author_description_'.$schema_id, 'saswp_array'),
|
729 |
-
'Image' => array(
|
730 |
-
'@type' => 'ImageObject',
|
731 |
-
'url' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_author_image_'.$schema_id, 'saswp_array'),
|
732 |
-
'height' => saswp_remove_warnings($recipe_author_image, 'height', 'saswp_string'),
|
733 |
-
'width' => saswp_remove_warnings($recipe_author_image, 'width', 'saswp_string')
|
734 |
-
),
|
735 |
-
),
|
736 |
-
|
737 |
-
|
738 |
'prepTime' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_preptime_'.$schema_id, 'saswp_array'),
|
739 |
'cookTime' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_cooktime_'.$schema_id, 'saswp_array'),
|
740 |
'totalTime' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_totaltime_'.$schema_id, 'saswp_array'),
|
@@ -765,6 +758,24 @@ function saswp_recipe_schema_markup($schema_id, $schema_post_id, $all_post_meta)
|
|
765 |
|
766 |
);
|
767 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
768 |
if($all_post_meta['saswp_recipe_nutrition_'.$schema_id][0]){
|
769 |
$input1['nutrition']['@type'] = 'NutritionInformation';
|
770 |
$input1['nutrition']['calories'] = $all_post_meta['saswp_recipe_nutrition_'.$schema_id][0];
|
@@ -793,7 +804,26 @@ function saswp_recipe_schema_markup($schema_id, $schema_post_id, $all_post_meta)
|
|
793 |
$input1['nutrition']['@type'] = 'NutritionInformation';
|
794 |
$input1['nutrition']['carbohydrateContent'] = $all_post_meta['saswp_recipe_carbohydrate_'.$schema_id][0];
|
795 |
}
|
796 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
797 |
if(saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_name_'.$schema_id, 'saswp_array') !='' && saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_thumbnailurl_'.$schema_id, 'saswp_array') !='' && saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_description_'.$schema_id, 'saswp_array') !=''){
|
798 |
|
799 |
$input1['video']['@type'] = 'VideoObject';
|
@@ -824,11 +854,12 @@ function saswp_product_schema_markup($schema_id, $schema_post_id, $all_post_meta
|
|
824 |
$input1 = array();
|
825 |
|
826 |
$product_image = get_post_meta( get_the_ID(), 'saswp_product_schema_image_'.$schema_id.'_detail',true);
|
|
|
827 |
$input1 = array(
|
828 |
-
'@context'
|
829 |
-
'@type'
|
830 |
'@id' => trailingslashit(get_permalink()).'#product',
|
831 |
-
'url'
|
832 |
'name' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_name_'.$schema_id, 'saswp_array'),
|
833 |
'sku' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_sku_'.$schema_id, 'saswp_array'),
|
834 |
'description' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_description_'.$schema_id, 'saswp_array'),
|
@@ -846,7 +877,7 @@ function saswp_product_schema_markup($schema_id, $schema_post_id, $all_post_meta
|
|
846 |
|
847 |
}
|
848 |
|
849 |
-
if(isset($all_post_meta['saswp_product_schema_price_'.$schema_id][0]) && $all_post_meta['saswp_product_schema_price_'.$schema_id][0]){
|
850 |
|
851 |
$input1['offers']['@type'] = 'Offer';
|
852 |
$input1['offers']['availability'] = saswp_remove_warnings($all_post_meta, 'saswp_product_schema_availability_'.$schema_id, 'saswp_array');
|
@@ -856,6 +887,17 @@ function saswp_product_schema_markup($schema_id, $schema_post_id, $all_post_meta
|
|
856 |
$input1['offers']['url'] = trailingslashit(saswp_get_permalink());
|
857 |
$input1['offers']['priceValidUntil'] = isset($all_post_meta['saswp_product_schema_priceValidUntil_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_product_schema_priceValidUntil_'.$schema_id][0])):'';
|
858 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
859 |
if(isset($all_post_meta['saswp_product_schema_seller_'.$schema_id])){
|
860 |
$input1['offers']['seller']['@type'] = 'Organization';
|
861 |
$input1['offers']['seller']['name'] = esc_attr($all_post_meta['saswp_product_schema_seller_'.$schema_id][0]);
|
@@ -1107,11 +1149,14 @@ function saswp_local_business_schema_markup($schema_id, $schema_post_id, $all_po
|
|
1107 |
$operation_days = explode( "rn", esc_html( stripslashes(saswp_remove_warnings($all_post_meta, 'saswp_dayofweek_'.$schema_id, 'saswp_array'))) );;
|
1108 |
$business_sub_name = '';
|
1109 |
$business_type = saswp_remove_warnings($all_post_meta, 'saswp_business_type_'.$schema_id, 'saswp_array');
|
1110 |
-
|
|
|
1111 |
|
1112 |
-
|
|
|
|
|
1113 |
|
1114 |
-
$check_business_type = $post_specific_obj
|
1115 |
|
1116 |
if(!empty($check_business_type)){
|
1117 |
|
@@ -1178,7 +1223,14 @@ function saswp_local_business_schema_markup($schema_id, $schema_post_id, $all_po
|
|
1178 |
}
|
1179 |
|
1180 |
if(isset($all_post_meta['local_area_served_'.$schema_id][0])){
|
1181 |
-
$input1['areaServed'] =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1182 |
}
|
1183 |
|
1184 |
//social fields starts here
|
@@ -1514,6 +1566,11 @@ function saswp_video_game_schema_markup($schema_id, $schema_post_id, $all_post_m
|
|
1514 |
$input1['applicationCategory'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_application_category_'.$schema_id, 'saswp_array');
|
1515 |
|
1516 |
$input1['author']['@type'] = 'Organization';
|
|
|
|
|
|
|
|
|
|
|
1517 |
$input1['author']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_author_name_'.$schema_id, 'saswp_array');
|
1518 |
|
1519 |
$input1['offers']['@type'] = 'Offer';
|
@@ -1881,7 +1938,13 @@ function saswp_faq_schema_markup($schema_id, $schema_post_id, $all_post_meta){
|
|
1881 |
$input1['dateCreated'] = isset($all_post_meta['saswp_faq_date_created_'.$schema_id][0])&& $all_post_meta['saswp_faq_date_created_'.$schema_id][0] !='' ? date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_faq_date_created_'.$schema_id][0])):'';
|
1882 |
|
1883 |
if(isset($all_post_meta['saswp_faq_author_'.$schema_id][0])){
|
|
|
1884 |
$input1['author']['@type'] = 'Person';
|
|
|
|
|
|
|
|
|
|
|
1885 |
$input1['author']['name'] = $all_post_meta['saswp_faq_author_'.$schema_id][0];
|
1886 |
}
|
1887 |
|
@@ -2511,6 +2574,11 @@ function saswp_tv_series_schema_markup($schema_id, $schema_post_id, $all_post_me
|
|
2511 |
}
|
2512 |
|
2513 |
$input1['author']['@type'] = 'Person';
|
|
|
|
|
|
|
|
|
|
|
2514 |
$input1['author']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_tvseries_schema_author_name_'.$schema_id, 'saswp_array');
|
2515 |
|
2516 |
$supply_arr = array();
|
@@ -2662,7 +2730,17 @@ function saswp_qanda_schema_markup($schema_id, $schema_post_id, $all_post_meta){
|
|
2662 |
$input1['mainEntity']['text'] = saswp_remove_warnings($all_post_meta, 'saswp_qa_question_description_'.$schema_id, 'saswp_array');
|
2663 |
$input1['mainEntity']['upvoteCount'] = saswp_remove_warnings($all_post_meta, 'saswp_qa_upvote_count_'.$schema_id, 'saswp_array');
|
2664 |
$input1['mainEntity']['dateCreated'] = isset($all_post_meta['saswp_qa_date_created_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_qa_date_created_'.$schema_id][0])):'';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2665 |
$input1['mainEntity']['author'] = array('@type' => 'Person','name' =>saswp_remove_warnings($all_post_meta, 'saswp_qa_question_author_name_'.$schema_id, 'saswp_array'));
|
|
|
2666 |
$input1['mainEntity']['answerCount'] = saswp_remove_warnings($all_post_meta, 'saswp_qa_answer_count_'.$schema_id, 'saswp_array');
|
2667 |
|
2668 |
$answer = get_post_meta($schema_post_id, 'accepted_answer_'.$schema_id, true);
|
@@ -2783,14 +2861,7 @@ function saswp_dfp_schema_markup($schema_id, $schema_post_id, $all_post_meta){
|
|
2783 |
'height' => isset($event_image['height']) ? esc_attr($event_image['height']) :'' ,
|
2784 |
),
|
2785 |
'datePublished' => isset($all_post_meta['saswp_dfp_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_dfp_date_published_'.$schema_id][0])):'',
|
2786 |
-
'dateModified' => isset($all_post_meta['saswp_dfp_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_dfp_date_modified_'.$schema_id][0])):'',
|
2787 |
-
'author' => array(
|
2788 |
-
'@type' => 'Person',
|
2789 |
-
'name' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_author_name_'.$schema_id, 'saswp_array'),
|
2790 |
-
'description' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_author_description_'.$schema_id, 'saswp_array'),
|
2791 |
-
'url' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_author_url_'.$schema_id, 'saswp_array')
|
2792 |
-
|
2793 |
-
),
|
2794 |
'publisher' => array(
|
2795 |
'@type' => 'Organization',
|
2796 |
'logo' => array(
|
@@ -2803,6 +2874,17 @@ function saswp_dfp_schema_markup($schema_id, $schema_post_id, $all_post_meta){
|
|
2803 |
),
|
2804 |
);
|
2805 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2806 |
return $input1;
|
2807 |
|
2808 |
}
|
@@ -2811,7 +2893,8 @@ function saswp_blogposting_schema_markup($schema_id, $schema_post_id, $all_post_
|
|
2811 |
|
2812 |
$input1 = array();
|
2813 |
|
2814 |
-
$slogo = get_post_meta( get_the_ID(), 'saswp_blogposting_organization_logo_'.$schema_id.'_detail',true);
|
|
|
2815 |
$input1 = array(
|
2816 |
'@context' => saswp_context_url(),
|
2817 |
'@type' => 'BlogPosting' ,
|
@@ -2825,13 +2908,7 @@ function saswp_blogposting_schema_markup($schema_id, $schema_post_id, $all_post_
|
|
2825 |
'name' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_name_'.$schema_id, 'saswp_array'),
|
2826 |
'url' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_url_'.$schema_id, 'saswp_array'),
|
2827 |
'datePublished' => isset($all_post_meta['saswp_blogposting_date_published_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_blogposting_date_published_'.$schema_id][0], get_post_time('h:i:s')) :'',
|
2828 |
-
'dateModified' => isset($all_post_meta['saswp_blogposting_date_modified_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_blogposting_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')) :'',
|
2829 |
-
'author' => array(
|
2830 |
-
'@type' => 'Person',
|
2831 |
-
'name' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_author_name_'.$schema_id, 'saswp_array'),
|
2832 |
-
'description' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_author_description_'.$schema_id, 'saswp_array'),
|
2833 |
-
'url' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_author_url_'.$schema_id, 'saswp_array')
|
2834 |
-
),
|
2835 |
'publisher' => array(
|
2836 |
'@type' => 'Organization',
|
2837 |
'logo' => array(
|
@@ -2844,32 +2921,42 @@ function saswp_blogposting_schema_markup($schema_id, $schema_post_id, $all_post_
|
|
2844 |
),
|
2845 |
);
|
2846 |
|
2847 |
-
|
2848 |
|
2849 |
-
|
|
|
|
|
2850 |
|
2851 |
-
|
|
|
|
|
2852 |
|
2853 |
-
|
2854 |
-
$list_arr[] = $list['saswp_blogposting_items_name'];
|
2855 |
-
}
|
2856 |
|
2857 |
-
|
2858 |
-
|
2859 |
-
|
2860 |
-
$input1['mainEntity']['name'] = saswp_get_the_title();
|
2861 |
|
|
|
|
|
2862 |
}
|
2863 |
|
2864 |
-
|
|
|
|
|
|
|
2865 |
|
2866 |
-
|
2867 |
-
|
2868 |
-
|
2869 |
-
|
2870 |
-
|
|
|
|
|
|
|
|
|
2871 |
|
2872 |
-
|
2873 |
|
2874 |
return $input1;
|
2875 |
|
@@ -2892,25 +2979,29 @@ function saswp_creative_work_series_schema_markup($schema_id, $schema_post_id, $
|
|
2892 |
'url' => saswp_remove_warnings($all_post_meta, 'saswp_cws_schema_url_'.$schema_id, 'saswp_array'),
|
2893 |
'datePublished' => isset($all_post_meta['saswp_cws_schema_date_published_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_cws_schema_date_published_'.$schema_id][0], get_post_time('h:i:s')) :'',
|
2894 |
'dateModified' => isset($all_post_meta['saswp_cws_schema_date_modified_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_cws_schema_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')) :'',
|
2895 |
-
'startDate'
|
2896 |
-
'endDate'
|
2897 |
-
'author' => array(
|
2898 |
-
'@type' => 'Person',
|
2899 |
-
'name' => saswp_remove_warnings($all_post_meta, 'saswp_cws_schema_author_name_'.$schema_id, 'saswp_array'),
|
2900 |
-
'description' => saswp_remove_warnings($all_post_meta, 'saswp_cws_schema_author_description_'.$schema_id, 'saswp_array'),
|
2901 |
-
'url' => saswp_remove_warnings($all_post_meta, 'saswp_cws_schema_author_url_'.$schema_id, 'saswp_array')
|
2902 |
-
),
|
2903 |
'publisher' => array(
|
2904 |
'@type' => 'Organization',
|
2905 |
'logo' => array(
|
2906 |
-
|
2907 |
-
|
2908 |
-
|
2909 |
-
|
2910 |
),
|
2911 |
'name' => saswp_remove_warnings($all_post_meta, 'saswp_cws_schema_organization_name_'.$schema_id, 'saswp_array'),
|
2912 |
),
|
2913 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2914 |
|
2915 |
return $input1;
|
2916 |
|
@@ -2930,15 +3021,18 @@ function saswp_audio_object_schema_markup($schema_id, $schema_post_id, $all_post
|
|
2930 |
'duration' => saswp_remove_warnings($all_post_meta, 'saswp_audio_schema_duration_'.$schema_id, 'saswp_array'),
|
2931 |
'encodingFormat' => saswp_remove_warnings($all_post_meta, 'saswp_audio_schema_encoding_format_'.$schema_id, 'saswp_array'),
|
2932 |
'datePublished' => isset($all_post_meta['saswp_audio_schema_date_published_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_audio_schema_date_published_'.$schema_id][0], get_post_time('h:i:s')) :'',
|
2933 |
-
'dateModified' => isset($all_post_meta['saswp_audio_schema_date_modified_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_audio_schema_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')) :''
|
2934 |
-
|
2935 |
-
|
2936 |
-
|
2937 |
-
|
2938 |
-
|
2939 |
-
|
|
|
2940 |
|
2941 |
-
|
|
|
|
|
2942 |
|
2943 |
return $input1;
|
2944 |
|
@@ -2976,13 +3070,7 @@ function saswp_webpage_schema_markup($schema_id, $schema_post_id, $all_post_meta
|
|
2976 |
'description' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_description_'.$schema_id, 'saswp_array'),
|
2977 |
'keywords' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_keywords_'.$schema_id, 'saswp_array'),
|
2978 |
'datePublished' => isset($all_post_meta['saswp_webpage_date_published_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_webpage_date_published_'.$schema_id][0], get_post_time('h:i:s')) :'',
|
2979 |
-
'dateModified' => isset($all_post_meta['saswp_webpage_date_modified_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_webpage_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')) :'',
|
2980 |
-
'author' => array(
|
2981 |
-
'@type' => 'Person',
|
2982 |
-
'name' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_author_name_'.$schema_id, 'saswp_array'),
|
2983 |
-
'description' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_author_description_'.$schema_id, 'saswp_array'),
|
2984 |
-
'url' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_author_url_'.$schema_id, 'saswp_array'),
|
2985 |
-
),
|
2986 |
'publisher' => array(
|
2987 |
'@type' => 'Organization',
|
2988 |
'logo' => array(
|
@@ -2998,6 +3086,15 @@ function saswp_webpage_schema_markup($schema_id, $schema_post_id, $all_post_meta
|
|
2998 |
|
2999 |
);
|
3000 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3001 |
|
3002 |
if(isset($all_post_meta['saswp_webpage_speakable_'.$schema_id]) && $all_post_meta['saswp_webpage_speakable_'.$schema_id][0] == 1){
|
3003 |
|
@@ -3016,7 +3113,7 @@ function saswp_special_announcement_schema_markup($schema_id, $schema_post_id, $
|
|
3016 |
|
3017 |
$input1 = array();
|
3018 |
|
3019 |
-
$slogo
|
3020 |
$location_img = get_post_meta( get_the_ID(), 'saswp_special_announcement_location_image_'.$schema_id.'_detail',true);
|
3021 |
|
3022 |
$input1 = array(
|
@@ -3036,15 +3133,18 @@ function saswp_special_announcement_schema_markup($schema_id, $schema_post_id, $
|
|
3036 |
'datePublished' => isset($all_post_meta['saswp_special_announcement_date_published_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_special_announcement_date_published_'.$schema_id][0], get_post_time('h:i:s')):'',
|
3037 |
'dateModified' => isset($all_post_meta['saswp_special_announcement_date_modified_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_special_announcement_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')):'',
|
3038 |
'datePosted' => isset($all_post_meta['saswp_special_announcement_date_published_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_special_announcement_date_posted_'.$schema_id][0], get_post_time('h:i:s')):'',
|
3039 |
-
'expires' => isset($all_post_meta['saswp_special_announcement_date_modified_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_special_announcement_date_expires_'.$schema_id][0], get_the_modified_time('h:i:s')):''
|
3040 |
-
|
3041 |
-
'@type' => 'Person',
|
3042 |
-
'name' => saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_author_name_'.$schema_id, 'saswp_array'),
|
3043 |
-
'description' => saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_author_description_'.$schema_id, 'saswp_array'),
|
3044 |
-
'url' => saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_author_url_'.$schema_id, 'saswp_array')
|
3045 |
-
)
|
3046 |
|
3047 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3048 |
|
3049 |
if(isset($all_post_meta['saswp_special_announcement_organization_logo_'.$schema_id][0]) || isset($all_post_meta['saswp_special_announcement_organization_name_'.$schema_id][0])){
|
3050 |
|
@@ -3150,16 +3250,20 @@ function saswp_article_schema_markup($schema_id, $schema_post_id, $all_post_meta
|
|
3150 |
'articleBody' => isset($all_post_meta['saswp_article_body_'.$schema_id][0]) ? wp_strip_all_tags(strip_shortcodes($all_post_meta['saswp_article_body_'.$schema_id][0])) : '',
|
3151 |
'keywords' => saswp_remove_warnings($all_post_meta, 'saswp_article_keywords_'.$schema_id, 'saswp_array'),
|
3152 |
'datePublished' => isset($all_post_meta['saswp_article_date_published_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_article_date_published_'.$schema_id][0], get_post_time('h:i:s')):'',
|
3153 |
-
'dateModified' => isset($all_post_meta['saswp_article_date_modified_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_article_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')):'',
|
3154 |
-
'author' => array(
|
3155 |
-
'@type' => 'Person',
|
3156 |
-
'name' => saswp_remove_warnings($all_post_meta, 'saswp_article_author_name_'.$schema_id, 'saswp_array'),
|
3157 |
-
'description' => saswp_remove_warnings($all_post_meta, 'saswp_article_author_description_'.$schema_id, 'saswp_array'),
|
3158 |
-
'url' => saswp_remove_warnings($all_post_meta, 'saswp_article_author_url_'.$schema_id, 'saswp_array')
|
3159 |
-
)
|
3160 |
|
3161 |
);
|
3162 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3163 |
if(isset($all_post_meta['saswp_article_organization_logo_'.$schema_id][0]) || isset($all_post_meta['saswp_article_organization_name_'.$schema_id][0])){
|
3164 |
|
3165 |
$input1['publisher']['@type'] = 'Organization';
|
@@ -3219,13 +3323,7 @@ function saswp_tech_article_schema_markup($schema_id, $schema_post_id, $all_post
|
|
3219 |
'description' => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_description_'.$schema_id, 'saswp_array'),
|
3220 |
'keywords' => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_keywords_'.$schema_id, 'saswp_array'),
|
3221 |
'datePublished' => isset($all_post_meta['saswp_tech_article_date_published_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_tech_article_date_published_'.$schema_id][0], get_post_time('h:i:s')) :'',
|
3222 |
-
'dateModified' => isset($all_post_meta['saswp_tech_article_date_modified_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_tech_article_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')) :'',
|
3223 |
-
'author' => array(
|
3224 |
-
'@type' => 'Person',
|
3225 |
-
'name' => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_author_name_'.$schema_id, 'saswp_array'),
|
3226 |
-
'description' => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_author_description_'.$schema_id, 'saswp_array'),
|
3227 |
-
'url' => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_author_url_'.$schema_id, 'saswp_array')
|
3228 |
-
),
|
3229 |
'publisher' => array(
|
3230 |
'@type' => 'Organization',
|
3231 |
'logo' => array(
|
@@ -3239,6 +3337,16 @@ function saswp_tech_article_schema_markup($schema_id, $schema_post_id, $all_post
|
|
3239 |
|
3240 |
);
|
3241 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3242 |
$itemlist = get_post_meta($schema_post_id, 'tech_article_items_'.$schema_id, true);
|
3243 |
|
3244 |
if($itemlist){
|
@@ -3271,12 +3379,12 @@ function saswp_tech_article_schema_markup($schema_id, $schema_post_id, $all_post
|
|
3271 |
|
3272 |
function saswp_news_article_schema_markup($schema_id, $schema_post_id, $all_post_meta){
|
3273 |
|
3274 |
-
|
3275 |
-
|
3276 |
-
|
3277 |
-
|
3278 |
|
3279 |
-
|
3280 |
'@context' => saswp_context_url(),
|
3281 |
'@type' => 'NewsArticle' ,
|
3282 |
'@id' => trailingslashit(get_permalink()).'#newsarticle',
|
@@ -3298,19 +3406,7 @@ function saswp_news_article_schema_markup($schema_id, $schema_post_id, $all_post
|
|
3298 |
'mainEntity' => array(
|
3299 |
'@type' => 'WebPage',
|
3300 |
'@id' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_main_entity_id_'.$schema_id, 'saswp_array'),
|
3301 |
-
),
|
3302 |
-
'author' => array(
|
3303 |
-
'@type' => 'Person',
|
3304 |
-
'name' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_author_name_'.$schema_id, 'saswp_array'),
|
3305 |
-
'description' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_author_description_'.$schema_id, 'saswp_array'),
|
3306 |
-
'url' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_author_url_'.$schema_id, 'saswp_array'),
|
3307 |
-
'Image' => array(
|
3308 |
-
'@type' => 'ImageObject',
|
3309 |
-
'url' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_author_image_'.$schema_id, 'saswp_array'),
|
3310 |
-
'height' => saswp_remove_warnings($author_image, 'height', 'saswp_string'),
|
3311 |
-
'width' => saswp_remove_warnings($author_image, 'width', 'saswp_string')
|
3312 |
-
),
|
3313 |
-
),
|
3314 |
'publisher' => array(
|
3315 |
'@type' => 'Organization',
|
3316 |
'logo' => array(
|
@@ -3323,33 +3419,49 @@ function saswp_news_article_schema_markup($schema_id, $schema_post_id, $all_post
|
|
3323 |
),
|
3324 |
);
|
3325 |
|
3326 |
-
|
3327 |
-
|
3328 |
-
|
3329 |
-
if($itemlist){
|
3330 |
-
|
3331 |
-
$list_arr = array();
|
3332 |
-
|
3333 |
-
foreach ($itemlist as $list){
|
3334 |
-
$list_arr[] = $list['saswp_newsarticle_items_name'];
|
3335 |
-
}
|
3336 |
-
|
3337 |
-
$input1['mainEntity']['@type'] = 'ItemList';
|
3338 |
-
$input1['mainEntity']['itemListElement'] = $list_arr;
|
3339 |
-
$input1['mainEntity']['itemListOrder'] = 'http://schema.org/ItemListOrderAscending ';
|
3340 |
-
$input1['mainEntity']['name'] = saswp_get_the_title();
|
3341 |
-
|
3342 |
-
}
|
3343 |
-
|
3344 |
-
if(isset($all_post_meta['saswp_newsarticle_speakable_'.$schema_id]) && $all_post_meta['saswp_newsarticle_speakable_'.$schema_id][0] == 1){
|
3345 |
|
3346 |
-
|
3347 |
-
|
3348 |
-
|
3349 |
-
|
3350 |
-
|
|
|
|
|
3351 |
|
3352 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3353 |
|
3354 |
return $input1;
|
3355 |
|
@@ -3380,22 +3492,24 @@ function saswp_audiobook_schema_markup($schema_id, $schema_post_id, $all_post_me
|
|
3380 |
'duration' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_duration_'.$schema_id, 'saswp_array'),
|
3381 |
'encodingFormat' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_encoding_format_'.$schema_id, 'saswp_array'),
|
3382 |
'playerType' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_player_type_'.$schema_id, 'saswp_array'),
|
3383 |
-
'readBy' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_readby_'.$schema_id, 'saswp_array')
|
3384 |
-
|
3385 |
-
'author' => array(
|
3386 |
-
'@type' => 'Person',
|
3387 |
-
'name' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_author_name_'.$schema_id, 'saswp_array'),
|
3388 |
-
'description' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_author_description_'.$schema_id, 'saswp_array'),
|
3389 |
-
'url' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_author_url_'.$schema_id, 'saswp_array'),
|
3390 |
-
'Image' => array(
|
3391 |
-
'@type' => 'ImageObject',
|
3392 |
-
'url' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_author_image_'.$schema_id, 'saswp_array'),
|
3393 |
-
'height' => saswp_remove_warnings($author_image, 'height', 'saswp_string'),
|
3394 |
-
'width' => saswp_remove_warnings($author_image, 'width', 'saswp_string')
|
3395 |
-
),
|
3396 |
-
)
|
3397 |
);
|
3398 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3399 |
if(!(empty($image))){
|
3400 |
|
3401 |
$input1['image']['@type'] = 'ImageObject';
|
@@ -3532,41 +3646,44 @@ function saswp_video_object_schema_markup($schema_id, $schema_post_id, $all_post
|
|
3532 |
'mainEntity' => array(
|
3533 |
'@type' => 'WebPage',
|
3534 |
'@id' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_main_entity_id_'.$schema_id, 'saswp_array'),
|
3535 |
-
),
|
3536 |
-
'author' => array(
|
3537 |
-
'@type' => 'Person',
|
3538 |
-
'name' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_author_name_'.$schema_id, 'saswp_array'),
|
3539 |
-
'description' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_author_description_'.$schema_id, 'saswp_array'),
|
3540 |
-
'url' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_author_url_'.$schema_id, 'saswp_array'),
|
3541 |
-
'Image' => array(
|
3542 |
-
'@type' => 'ImageObject',
|
3543 |
-
'url' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_author_image_'.$schema_id, 'saswp_array'),
|
3544 |
-
'height' => saswp_remove_warnings($author_image, 'height', 'saswp_string'),
|
3545 |
-
'width' => saswp_remove_warnings($author_image, 'width', 'saswp_string')
|
3546 |
-
),
|
3547 |
-
),
|
3548 |
'publisher' => array(
|
3549 |
'@type' => 'Organization',
|
3550 |
'logo' => array(
|
3551 |
-
|
3552 |
-
|
3553 |
-
|
3554 |
-
|
3555 |
-
|
3556 |
'name' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_organization_name_'.$schema_id, 'saswp_array'),
|
3557 |
),
|
3558 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3559 |
|
3560 |
-
|
3561 |
-
|
3562 |
-
|
3563 |
|
3564 |
-
|
3565 |
-
|
3566 |
-
|
3567 |
-
|
3568 |
-
|
3569 |
-
|
3570 |
|
3571 |
return $input1;
|
3572 |
|
@@ -3587,22 +3704,11 @@ function saswp_image_object_schema_markup($schema_id, $schema_post_id, $all_post
|
|
3587 |
'datePublished' => isset($all_post_meta['saswpimage_object_date_published_'.$schema_id])? saswp_format_date_time($all_post_meta['saswpimage_object_date_published_'.$schema_id][0], get_post_time('h:i:s')) : '',
|
3588 |
'dateModified' => isset($all_post_meta['saswpimage_object_date_modified_'.$schema_id])? saswp_format_date_time($all_post_meta['saswpimage_object_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')) : '',
|
3589 |
'description' => saswp_remove_warnings($all_post_meta, 'saswpimage_object_description_'.$schema_id, 'saswp_array'),
|
3590 |
-
'name'
|
|
|
3591 |
'uploadDate' => isset($all_post_meta['saswpimage_object_upload_date_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswpimage_object_upload_date_'.$schema_id][0])):'',
|
3592 |
'contentUrl' => saswp_remove_warnings($all_post_meta, 'saswpimage_object_content_url_'.$schema_id, 'saswp_array'),
|
3593 |
-
'contentLocation' => saswp_remove_warnings($all_post_meta, 'saswpimage_object_content_location_'.$schema_id, 'saswp_array'),
|
3594 |
-
'author' => array(
|
3595 |
-
'@type' => 'Person',
|
3596 |
-
'name' => saswp_remove_warnings($all_post_meta, 'saswpimage_object_author_name_'.$schema_id, 'saswp_array'),
|
3597 |
-
'description' => saswp_remove_warnings($all_post_meta, 'saswpimage_object_author_description_'.$schema_id, 'saswp_array'),
|
3598 |
-
'url' => saswp_remove_warnings($all_post_meta, 'saswpimage_object_author_url_'.$schema_id, 'saswp_array'),
|
3599 |
-
'Image' => array(
|
3600 |
-
'@type' => 'ImageObject',
|
3601 |
-
'url' => saswp_remove_warnings($all_post_meta, 'saswpimage_object_author_image_'.$schema_id, 'saswp_array'),
|
3602 |
-
'height' => saswp_remove_warnings($author_image, 'height', 'saswp_string'),
|
3603 |
-
'width' => saswp_remove_warnings($author_image, 'width', 'saswp_string')
|
3604 |
-
),
|
3605 |
-
),
|
3606 |
'publisher' => array(
|
3607 |
'@type' => 'Organization',
|
3608 |
'logo' => array(
|
@@ -3615,7 +3721,20 @@ function saswp_image_object_schema_markup($schema_id, $schema_post_id, $all_post
|
|
3615 |
),
|
3616 |
);
|
3617 |
|
|
|
|
|
|
|
|
|
|
|
3618 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3619 |
|
3620 |
$itinerary = get_post_meta($schema_post_id, 'image_object_exif_data_'.$schema_id, true);
|
3621 |
|
@@ -3666,13 +3785,16 @@ function saswp_service_schema_markup($schema_id, $schema_post_id, $all_post_meta
|
|
3666 |
|
3667 |
$input1['provider']['@type'] = $all_post_meta['saswp_service_schema_provider_type_'.$schema_id][0];
|
3668 |
$input1['provider']['name'] = $all_post_meta['saswp_service_schema_provider_name_'.$schema_id][0];
|
3669 |
-
$input1['provider']['image'] = saswp_remove_warnings($all_post_meta, 'saswp_service_schema_image_'.$schema_id, 'saswp_array');
|
3670 |
-
$input1['provider']['priceRange'] = saswp_remove_warnings($all_post_meta, 'saswp_service_schema_price_range_'.$schema_id, 'saswp_array');
|
3671 |
$input1['provider']['address']['@type'] = 'PostalAddress';
|
3672 |
$input1['provider']['address']['addressLocality'] = saswp_remove_warnings($all_post_meta, 'saswp_service_schema_locality_'.$schema_id, 'saswp_array');
|
3673 |
$input1['provider']['address']['postalCode'] = saswp_remove_warnings($all_post_meta, 'saswp_service_schema_postal_code_'.$schema_id, 'saswp_array');
|
3674 |
$input1['provider']['address']['telephone'] = saswp_remove_warnings($all_post_meta, 'saswp_service_schema_telephone_'.$schema_id, 'saswp_array');
|
3675 |
|
|
|
|
|
|
|
|
|
3676 |
}
|
3677 |
|
3678 |
$input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_service_schema_description_'.$schema_id, 'saswp_array');
|
@@ -3744,7 +3866,12 @@ function saswp_review_schema_markup($schema_id, $schema_post_id, $all_post_meta)
|
|
3744 |
|
3745 |
if($review_author){
|
3746 |
|
3747 |
-
$input1['author']['@type'] = 'Person';
|
|
|
|
|
|
|
|
|
|
|
3748 |
$input1['author']['name'] = esc_attr($review_author);
|
3749 |
|
3750 |
if(isset($all_post_meta['saswp_review_author_url_'.$schema_id])){
|
107 |
}
|
108 |
|
109 |
if($all_post_meta['saswp_book_author_'.$schema_id][0]){
|
110 |
+
|
111 |
$input1['author']['@type'] = 'Person';
|
112 |
+
|
113 |
+
if(isset($all_post_meta['saswp_book_author_type_'.$schema_id][0])){
|
114 |
+
$input1['author']['@type'] = $all_post_meta['saswp_book_author_type_'.$schema_id][0];
|
115 |
+
}
|
116 |
+
|
117 |
$input1['author']['name'] = $all_post_meta['saswp_book_author_'.$schema_id][0];
|
118 |
|
119 |
if($all_post_meta['saswp_book_author_url_'.$schema_id][0]){
|
691 |
|
692 |
$input1 = array();
|
693 |
|
694 |
+
$recipe_logo = get_post_meta( get_the_ID(), 'saswp_recipe_organization_logo_'.$schema_id.'_detail',true);
|
695 |
+
$recipe_image = get_post_meta( get_the_ID(), 'saswp_recipe_image_'.$schema_id.'_detail',true);
|
696 |
$recipe_author_image = get_post_meta( get_the_ID(), 'saswp_recipe_author_image_'.$schema_id.'_detail',true);
|
697 |
|
698 |
$ingredient = array();
|
719 |
$input1 = array(
|
720 |
'@context' => saswp_context_url(),
|
721 |
'@type' => 'Recipe' ,
|
722 |
+
'@id' => trailingslashit(get_permalink()).'#recipe',
|
723 |
'url' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_url_'.$schema_id, 'saswp_array'),
|
724 |
+
'name' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_name_'.$schema_id, 'saswp_array'),
|
725 |
+
'image' => array(
|
726 |
+
'@type' => 'ImageObject',
|
727 |
'url' => saswp_remove_warnings( $recipe_image, 'thumbnail', 'saswp_string'),
|
728 |
+
'width' => saswp_remove_warnings( $recipe_image, 'width', 'saswp_string'),
|
729 |
+
'height' => saswp_remove_warnings( $recipe_image , 'height', 'saswp_string'),
|
730 |
+
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
731 |
'prepTime' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_preptime_'.$schema_id, 'saswp_array'),
|
732 |
'cookTime' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_cooktime_'.$schema_id, 'saswp_array'),
|
733 |
'totalTime' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_totaltime_'.$schema_id, 'saswp_array'),
|
758 |
|
759 |
);
|
760 |
|
761 |
+
if( isset($all_post_meta['saswp_recipe_author_name_'.$schema_id][0]) ) {
|
762 |
+
|
763 |
+
$input1['author']['@type'] = 'Person';
|
764 |
+
|
765 |
+
if(isset($all_post_meta['saswp_recipe_author_type_'.$schema_id][0])){
|
766 |
+
$input1['author']['@type'] = $all_post_meta['saswp_recipe_author_type_'.$schema_id][0];
|
767 |
+
}
|
768 |
+
|
769 |
+
$input1['author']['name'] = $all_post_meta['saswp_recipe_author_name_'.$schema_id][0];
|
770 |
+
$input1['author']['description'] = $all_post_meta['saswp_recipe_author_description_'.$schema_id][0];
|
771 |
+
|
772 |
+
$input1['author']['image']['@type'] = 'ImageObject';
|
773 |
+
$input1['author']['image']['url'] = $all_post_meta['saswp_recipe_author_image_'.$schema_id][0];
|
774 |
+
$input1['author']['image']['height'] = $recipe_author_image['height'];
|
775 |
+
$input1['author']['image']['width'] = $recipe_author_image['width'];
|
776 |
+
|
777 |
+
}
|
778 |
+
|
779 |
if($all_post_meta['saswp_recipe_nutrition_'.$schema_id][0]){
|
780 |
$input1['nutrition']['@type'] = 'NutritionInformation';
|
781 |
$input1['nutrition']['calories'] = $all_post_meta['saswp_recipe_nutrition_'.$schema_id][0];
|
804 |
$input1['nutrition']['@type'] = 'NutritionInformation';
|
805 |
$input1['nutrition']['carbohydrateContent'] = $all_post_meta['saswp_recipe_carbohydrate_'.$schema_id][0];
|
806 |
}
|
807 |
+
if($all_post_meta['saswp_recipe_cholesterol_'.$schema_id][0]){
|
808 |
+
$input1['nutrition']['@type'] = 'NutritionInformation';
|
809 |
+
$input1['nutrition']['cholesterolContent'] = $all_post_meta['saswp_recipe_cholesterol_'.$schema_id][0];
|
810 |
+
}
|
811 |
+
if($all_post_meta['saswp_recipe_saturated_fat_'.$schema_id][0]){
|
812 |
+
$input1['nutrition']['@type'] = 'NutritionInformation';
|
813 |
+
$input1['nutrition']['saturatedFatContent'] = $all_post_meta['saswp_recipe_saturated_fat_'.$schema_id][0];
|
814 |
+
}
|
815 |
+
if($all_post_meta['saswp_recipe_unsaturated_fat_'.$schema_id][0]){
|
816 |
+
$input1['nutrition']['@type'] = 'NutritionInformation';
|
817 |
+
$input1['nutrition']['unsaturatedFatContent'] = $all_post_meta['saswp_recipe_unsaturated_fat_'.$schema_id][0];
|
818 |
+
}
|
819 |
+
if($all_post_meta['saswp_recipe_trans_fat_'.$schema_id][0]){
|
820 |
+
$input1['nutrition']['@type'] = 'NutritionInformation';
|
821 |
+
$input1['nutrition']['transFatContent'] = $all_post_meta['saswp_recipe_trans_fat_'.$schema_id][0];
|
822 |
+
}
|
823 |
+
if($all_post_meta['saswp_recipe_serving_size_'.$schema_id][0]){
|
824 |
+
$input1['nutrition']['@type'] = 'NutritionInformation';
|
825 |
+
$input1['nutrition']['servingSize'] = $all_post_meta['saswp_recipe_serving_size_'.$schema_id][0];
|
826 |
+
}
|
827 |
if(saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_name_'.$schema_id, 'saswp_array') !='' && saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_thumbnailurl_'.$schema_id, 'saswp_array') !='' && saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_description_'.$schema_id, 'saswp_array') !=''){
|
828 |
|
829 |
$input1['video']['@type'] = 'VideoObject';
|
854 |
$input1 = array();
|
855 |
|
856 |
$product_image = get_post_meta( get_the_ID(), 'saswp_product_schema_image_'.$schema_id.'_detail',true);
|
857 |
+
|
858 |
$input1 = array(
|
859 |
+
'@context' => saswp_context_url(),
|
860 |
+
'@type' => 'Product',
|
861 |
'@id' => trailingslashit(get_permalink()).'#product',
|
862 |
+
'url' => trailingslashit(get_permalink()),
|
863 |
'name' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_name_'.$schema_id, 'saswp_array'),
|
864 |
'sku' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_sku_'.$schema_id, 'saswp_array'),
|
865 |
'description' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_description_'.$schema_id, 'saswp_array'),
|
877 |
|
878 |
}
|
879 |
|
880 |
+
if( (isset($all_post_meta['saswp_product_schema_price_'.$schema_id][0]) && $all_post_meta['saswp_product_schema_price_'.$schema_id][0]) || (isset($all_post_meta['saswp_product_schema_high_price_'.$schema_id][0]) && isset($all_post_meta['saswp_product_schema_low_price_'.$schema_id][0]) ) ){
|
881 |
|
882 |
$input1['offers']['@type'] = 'Offer';
|
883 |
$input1['offers']['availability'] = saswp_remove_warnings($all_post_meta, 'saswp_product_schema_availability_'.$schema_id, 'saswp_array');
|
887 |
$input1['offers']['url'] = trailingslashit(saswp_get_permalink());
|
888 |
$input1['offers']['priceValidUntil'] = isset($all_post_meta['saswp_product_schema_priceValidUntil_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_product_schema_priceValidUntil_'.$schema_id][0])):'';
|
889 |
|
890 |
+
if( isset($all_post_meta['saswp_product_schema_high_price_'.$schema_id][0]) && isset($all_post_meta['saswp_product_schema_low_price_'.$schema_id][0]) ){
|
891 |
+
$input1['offers']['@type'] = 'AggregateOffer';
|
892 |
+
$input1['offers']['highPrice'] = $all_post_meta['saswp_product_schema_high_price_'.$schema_id][0];
|
893 |
+
$input1['offers']['lowPrice'] = $all_post_meta['saswp_product_schema_low_price_'.$schema_id][0];
|
894 |
+
|
895 |
+
if( isset($all_post_meta['saswp_product_schema_offer_count_'.$schema_id][0]) ){
|
896 |
+
$input1['offers']['offerCount'] = $all_post_meta['saswp_product_schema_offer_count_'.$schema_id][0];
|
897 |
+
}
|
898 |
+
|
899 |
+
}
|
900 |
+
|
901 |
if(isset($all_post_meta['saswp_product_schema_seller_'.$schema_id])){
|
902 |
$input1['offers']['seller']['@type'] = 'Organization';
|
903 |
$input1['offers']['seller']['name'] = esc_attr($all_post_meta['saswp_product_schema_seller_'.$schema_id][0]);
|
1149 |
$operation_days = explode( "rn", esc_html( stripslashes(saswp_remove_warnings($all_post_meta, 'saswp_dayofweek_'.$schema_id, 'saswp_array'))) );;
|
1150 |
$business_sub_name = '';
|
1151 |
$business_type = saswp_remove_warnings($all_post_meta, 'saswp_business_type_'.$schema_id, 'saswp_array');
|
1152 |
+
|
1153 |
+
$mapping_local_sub = SASWP_DIR_NAME . '/core/array-list/local-sub-business.php';
|
1154 |
|
1155 |
+
$post_specific_obj = include $mapping_local_sub;
|
1156 |
+
|
1157 |
+
if(array_key_exists($business_type, $post_specific_obj)){
|
1158 |
|
1159 |
+
$check_business_type = $post_specific_obj[$business_type];
|
1160 |
|
1161 |
if(!empty($check_business_type)){
|
1162 |
|
1223 |
}
|
1224 |
|
1225 |
if(isset($all_post_meta['local_area_served_'.$schema_id][0])){
|
1226 |
+
$input1['areaServed'] = saswp_explode_comma_seprated( $all_post_meta['local_area_served_'.$schema_id][0], 'Place' );
|
1227 |
+
}
|
1228 |
+
|
1229 |
+
if(isset($all_post_meta['local_business_founder_'.$schema_id][0])){
|
1230 |
+
$input1['founder'] = saswp_explode_comma_seprated( $all_post_meta['local_business_founder_'.$schema_id][0], 'Person' );
|
1231 |
+
}
|
1232 |
+
if(isset($all_post_meta['local_business_employee_'.$schema_id][0])){
|
1233 |
+
$input1['employee'] = saswp_explode_comma_seprated( $all_post_meta['local_business_employee_'.$schema_id][0], 'Person' );
|
1234 |
}
|
1235 |
|
1236 |
//social fields starts here
|
1566 |
$input1['applicationCategory'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_application_category_'.$schema_id, 'saswp_array');
|
1567 |
|
1568 |
$input1['author']['@type'] = 'Organization';
|
1569 |
+
|
1570 |
+
if(isset($all_post_meta['saswp_vg_schema_author_type_'.$schema_id][0])){
|
1571 |
+
$input1['author']['@type'] = $all_post_meta['saswp_vg_schema_author_type_'.$schema_id][0];
|
1572 |
+
}
|
1573 |
+
|
1574 |
$input1['author']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_author_name_'.$schema_id, 'saswp_array');
|
1575 |
|
1576 |
$input1['offers']['@type'] = 'Offer';
|
1938 |
$input1['dateCreated'] = isset($all_post_meta['saswp_faq_date_created_'.$schema_id][0])&& $all_post_meta['saswp_faq_date_created_'.$schema_id][0] !='' ? date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_faq_date_created_'.$schema_id][0])):'';
|
1939 |
|
1940 |
if(isset($all_post_meta['saswp_faq_author_'.$schema_id][0])){
|
1941 |
+
|
1942 |
$input1['author']['@type'] = 'Person';
|
1943 |
+
|
1944 |
+
if(isset($all_post_meta['saswp_faq_author_type_'.$schema_id][0])){
|
1945 |
+
$input1['author']['@type'] = $all_post_meta['saswp_faq_author_type_'.$schema_id][0];
|
1946 |
+
}
|
1947 |
+
|
1948 |
$input1['author']['name'] = $all_post_meta['saswp_faq_author_'.$schema_id][0];
|
1949 |
}
|
1950 |
|
2574 |
}
|
2575 |
|
2576 |
$input1['author']['@type'] = 'Person';
|
2577 |
+
|
2578 |
+
if( isset($all_post_meta['saswp_tvseries_schema_author_type_'.$schema_id][0]) ) {
|
2579 |
+
$input1['author']['@type'] = $all_post_meta['saswp_tvseries_schema_author_type_'.$schema_id][0];
|
2580 |
+
}
|
2581 |
+
|
2582 |
$input1['author']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_tvseries_schema_author_name_'.$schema_id, 'saswp_array');
|
2583 |
|
2584 |
$supply_arr = array();
|
2730 |
$input1['mainEntity']['text'] = saswp_remove_warnings($all_post_meta, 'saswp_qa_question_description_'.$schema_id, 'saswp_array');
|
2731 |
$input1['mainEntity']['upvoteCount'] = saswp_remove_warnings($all_post_meta, 'saswp_qa_upvote_count_'.$schema_id, 'saswp_array');
|
2732 |
$input1['mainEntity']['dateCreated'] = isset($all_post_meta['saswp_qa_date_created_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_qa_date_created_'.$schema_id][0])):'';
|
2733 |
+
|
2734 |
+
$input1['mainEntity']['author']['@type'] = 'Person';
|
2735 |
+
|
2736 |
+
if(isset($all_post_meta['saswp_qa_question_author_type_'.$schema_id][0])){
|
2737 |
+
$input1['mainEntity']['author']['@type'] = $all_post_meta['saswp_qa_question_author_type_'.$schema_id][0];
|
2738 |
+
}
|
2739 |
+
|
2740 |
+
$input1['mainEntity']['author']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_qa_question_author_name_'.$schema_id, 'saswp_array');
|
2741 |
+
|
2742 |
$input1['mainEntity']['author'] = array('@type' => 'Person','name' =>saswp_remove_warnings($all_post_meta, 'saswp_qa_question_author_name_'.$schema_id, 'saswp_array'));
|
2743 |
+
|
2744 |
$input1['mainEntity']['answerCount'] = saswp_remove_warnings($all_post_meta, 'saswp_qa_answer_count_'.$schema_id, 'saswp_array');
|
2745 |
|
2746 |
$answer = get_post_meta($schema_post_id, 'accepted_answer_'.$schema_id, true);
|
2861 |
'height' => isset($event_image['height']) ? esc_attr($event_image['height']) :'' ,
|
2862 |
),
|
2863 |
'datePublished' => isset($all_post_meta['saswp_dfp_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_dfp_date_published_'.$schema_id][0])):'',
|
2864 |
+
'dateModified' => isset($all_post_meta['saswp_dfp_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_dfp_date_modified_'.$schema_id][0])):'',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2865 |
'publisher' => array(
|
2866 |
'@type' => 'Organization',
|
2867 |
'logo' => array(
|
2874 |
),
|
2875 |
);
|
2876 |
|
2877 |
+
$input1['author']['@type'] = 'Person';
|
2878 |
+
|
2879 |
+
if(isset( $all_post_meta['saswp_dfp_author_type_'.$schema_id][0] )){
|
2880 |
+
$input1['author']['@type'] = $all_post_meta['saswp_dfp_author_type_'.$schema_id][0];
|
2881 |
+
}
|
2882 |
+
|
2883 |
+
$input1['author']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_dfp_author_name_'.$schema_id, 'saswp_array');
|
2884 |
+
$input1['author']['description'] = saswp_remove_warnings($all_post_meta, 'saswp_dfp_author_description_'.$schema_id, 'saswp_array');
|
2885 |
+
$input1['author']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_dfp_author_url_'.$schema_id, 'saswp_array');
|
2886 |
+
|
2887 |
+
|
2888 |
return $input1;
|
2889 |
|
2890 |
}
|
2893 |
|
2894 |
$input1 = array();
|
2895 |
|
2896 |
+
$slogo = get_post_meta( get_the_ID(), 'saswp_blogposting_organization_logo_'.$schema_id.'_detail',true);
|
2897 |
+
|
2898 |
$input1 = array(
|
2899 |
'@context' => saswp_context_url(),
|
2900 |
'@type' => 'BlogPosting' ,
|
2908 |
'name' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_name_'.$schema_id, 'saswp_array'),
|
2909 |
'url' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_url_'.$schema_id, 'saswp_array'),
|
2910 |
'datePublished' => isset($all_post_meta['saswp_blogposting_date_published_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_blogposting_date_published_'.$schema_id][0], get_post_time('h:i:s')) :'',
|
2911 |
+
'dateModified' => isset($all_post_meta['saswp_blogposting_date_modified_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_blogposting_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')) :'',
|
|
|
|
|
|
|
|
|
|
|
|
|
2912 |
'publisher' => array(
|
2913 |
'@type' => 'Organization',
|
2914 |
'logo' => array(
|
2921 |
),
|
2922 |
);
|
2923 |
|
2924 |
+
$input1['author']['@type'] = 'Person';
|
2925 |
|
2926 |
+
if(isset( $all_post_meta['saswp_blogposting_author_type_'.$schema_id][0] )){
|
2927 |
+
$input1['author']['@type'] = $all_post_meta['saswp_blogposting_author_type_'.$schema_id][0];
|
2928 |
+
}
|
2929 |
|
2930 |
+
$input1['author']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_blogposting_author_name_'.$schema_id, 'saswp_array');
|
2931 |
+
$input1['author']['description'] = saswp_remove_warnings($all_post_meta, 'saswp_blogposting_author_description_'.$schema_id, 'saswp_array');
|
2932 |
+
$input1['author']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_blogposting_author_url_'.$schema_id, 'saswp_array');
|
2933 |
|
2934 |
+
$itemlist = get_post_meta($schema_post_id, 'blogposting_items_'.$schema_id, true);
|
|
|
|
|
2935 |
|
2936 |
+
if($itemlist){
|
2937 |
+
|
2938 |
+
$list_arr = array();
|
|
|
2939 |
|
2940 |
+
foreach ($itemlist as $list){
|
2941 |
+
$list_arr[] = $list['saswp_blogposting_items_name'];
|
2942 |
}
|
2943 |
|
2944 |
+
$input1['mainEntity']['@type'] = 'ItemList';
|
2945 |
+
$input1['mainEntity']['itemListElement'] = $list_arr;
|
2946 |
+
$input1['mainEntity']['itemListOrder'] = 'http://schema.org/ItemListOrderAscending ';
|
2947 |
+
$input1['mainEntity']['name'] = saswp_get_the_title();
|
2948 |
|
2949 |
+
}
|
2950 |
+
|
2951 |
+
if(isset($all_post_meta['saswp_blogposting_speakable_'.$schema_id]) && $all_post_meta['saswp_blogposting_speakable_'.$schema_id][0] == 1 ){
|
2952 |
+
|
2953 |
+
$input1['speakable']['@type'] = 'SpeakableSpecification';
|
2954 |
+
$input1['speakable']['xpath'] = array(
|
2955 |
+
"/html/head/title",
|
2956 |
+
"/html/head/meta[@name='description']/@content"
|
2957 |
+
);
|
2958 |
|
2959 |
+
}
|
2960 |
|
2961 |
return $input1;
|
2962 |
|
2979 |
'url' => saswp_remove_warnings($all_post_meta, 'saswp_cws_schema_url_'.$schema_id, 'saswp_array'),
|
2980 |
'datePublished' => isset($all_post_meta['saswp_cws_schema_date_published_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_cws_schema_date_published_'.$schema_id][0], get_post_time('h:i:s')) :'',
|
2981 |
'dateModified' => isset($all_post_meta['saswp_cws_schema_date_modified_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_cws_schema_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')) :'',
|
2982 |
+
'startDate' => isset($all_post_meta['saswp_cws_schema_start_date_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_cws_schema_start_date_'.$schema_id][0]) :'',
|
2983 |
+
'endDate' => isset($all_post_meta['saswp_cws_schema_end_date_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_cws_schema_end_date_'.$schema_id][0]) :'',
|
|
|
|
|
|
|
|
|
|
|
|
|
2984 |
'publisher' => array(
|
2985 |
'@type' => 'Organization',
|
2986 |
'logo' => array(
|
2987 |
+
'@type' => 'ImageObject',
|
2988 |
+
'url' => saswp_remove_warnings($all_post_meta, 'saswp_cws_schema_organization_logo_'.$schema_id, 'saswp_array'),
|
2989 |
+
'width' => saswp_remove_warnings($slogo, 'width', 'saswp_string'),
|
2990 |
+
'height' => saswp_remove_warnings($slogo, 'height', 'saswp_string'),
|
2991 |
),
|
2992 |
'name' => saswp_remove_warnings($all_post_meta, 'saswp_cws_schema_organization_name_'.$schema_id, 'saswp_array'),
|
2993 |
),
|
2994 |
);
|
2995 |
+
|
2996 |
+
$input1['author']['@type'] = 'Person';
|
2997 |
+
|
2998 |
+
if(isset( $all_post_meta['saswp_cws_schema_author_type_'.$schema_id][0] )){
|
2999 |
+
$input1['author']['@type'] = $all_post_meta['saswp_cws_schema_author_type_'.$schema_id][0];
|
3000 |
+
}
|
3001 |
+
|
3002 |
+
$input1['author']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_cws_schema_author_name_'.$schema_id, 'saswp_array');
|
3003 |
+
$input1['author']['description'] = saswp_remove_warnings($all_post_meta, 'saswp_cws_schema_author_description_'.$schema_id, 'saswp_array');
|
3004 |
+
$input1['author']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_cws_schema_author_url_'.$schema_id, 'saswp_array');
|
3005 |
|
3006 |
return $input1;
|
3007 |
|
3021 |
'duration' => saswp_remove_warnings($all_post_meta, 'saswp_audio_schema_duration_'.$schema_id, 'saswp_array'),
|
3022 |
'encodingFormat' => saswp_remove_warnings($all_post_meta, 'saswp_audio_schema_encoding_format_'.$schema_id, 'saswp_array'),
|
3023 |
'datePublished' => isset($all_post_meta['saswp_audio_schema_date_published_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_audio_schema_date_published_'.$schema_id][0], get_post_time('h:i:s')) :'',
|
3024 |
+
'dateModified' => isset($all_post_meta['saswp_audio_schema_date_modified_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_audio_schema_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')) :''
|
3025 |
+
);
|
3026 |
+
|
3027 |
+
$input1['author']['@type'] = 'Person';
|
3028 |
+
|
3029 |
+
if(isset( $all_post_meta['saswp_audio_schema_author_type_'.$schema_id][0] )){
|
3030 |
+
$input1['author']['@type'] = $all_post_meta['saswp_audio_schema_author_type_'.$schema_id][0];
|
3031 |
+
}
|
3032 |
|
3033 |
+
$input1['author']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_audio_schema_author_name_'.$schema_id, 'saswp_array');
|
3034 |
+
$input1['author']['description'] = saswp_remove_warnings($all_post_meta, 'saswp_audio_schema_author_description_'.$schema_id, 'saswp_array');
|
3035 |
+
$input1['author']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_audio_schema_author_url_'.$schema_id, 'saswp_array');
|
3036 |
|
3037 |
return $input1;
|
3038 |
|
3070 |
'description' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_description_'.$schema_id, 'saswp_array'),
|
3071 |
'keywords' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_keywords_'.$schema_id, 'saswp_array'),
|
3072 |
'datePublished' => isset($all_post_meta['saswp_webpage_date_published_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_webpage_date_published_'.$schema_id][0], get_post_time('h:i:s')) :'',
|
3073 |
+
'dateModified' => isset($all_post_meta['saswp_webpage_date_modified_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_webpage_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')) :'',
|
|
|
|
|
|
|
|
|
|
|
|
|
3074 |
'publisher' => array(
|
3075 |
'@type' => 'Organization',
|
3076 |
'logo' => array(
|
3086 |
|
3087 |
);
|
3088 |
|
3089 |
+
$input1['author']['@type'] = 'Person';
|
3090 |
+
|
3091 |
+
if(isset( $all_post_meta['saswp_webpage_author_type_'.$schema_id][0] )){
|
3092 |
+
$input1['author']['@type'] = $all_post_meta['saswp_webpage_author_type_'.$schema_id][0];
|
3093 |
+
}
|
3094 |
+
|
3095 |
+
$input1['author']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_webpage_author_name_'.$schema_id, 'saswp_array');
|
3096 |
+
$input1['author']['description'] = saswp_remove_warnings($all_post_meta, 'saswp_webpage_author_description_'.$schema_id, 'saswp_array');
|
3097 |
+
$input1['author']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_webpage_author_url_'.$schema_id, 'saswp_array');
|
3098 |
|
3099 |
if(isset($all_post_meta['saswp_webpage_speakable_'.$schema_id]) && $all_post_meta['saswp_webpage_speakable_'.$schema_id][0] == 1){
|
3100 |
|
3113 |
|
3114 |
$input1 = array();
|
3115 |
|
3116 |
+
$slogo = get_post_meta( get_the_ID(), 'saswp_special_announcement_organization_logo_'.$schema_id.'_detail',true);
|
3117 |
$location_img = get_post_meta( get_the_ID(), 'saswp_special_announcement_location_image_'.$schema_id.'_detail',true);
|
3118 |
|
3119 |
$input1 = array(
|
3133 |
'datePublished' => isset($all_post_meta['saswp_special_announcement_date_published_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_special_announcement_date_published_'.$schema_id][0], get_post_time('h:i:s')):'',
|
3134 |
'dateModified' => isset($all_post_meta['saswp_special_announcement_date_modified_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_special_announcement_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')):'',
|
3135 |
'datePosted' => isset($all_post_meta['saswp_special_announcement_date_published_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_special_announcement_date_posted_'.$schema_id][0], get_post_time('h:i:s')):'',
|
3136 |
+
'expires' => isset($all_post_meta['saswp_special_announcement_date_modified_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_special_announcement_date_expires_'.$schema_id][0], get_the_modified_time('h:i:s')):''
|
3137 |
+
);
|
|
|
|
|
|
|
|
|
|
|
3138 |
|
3139 |
+
$input1['author']['@type'] = 'Person';
|
3140 |
+
|
3141 |
+
if(isset( $all_post_meta['saswp_special_announcement_author_type_'.$schema_id][0] )){
|
3142 |
+
$input1['author']['@type'] = $all_post_meta['saswp_special_announcement_author_type_'.$schema_id][0];
|
3143 |
+
}
|
3144 |
+
|
3145 |
+
$input1['author']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_author_name_'.$schema_id, 'saswp_array');
|
3146 |
+
$input1['author']['description'] = saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_author_description_'.$schema_id, 'saswp_array');
|
3147 |
+
$input1['author']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_author_url_'.$schema_id, 'saswp_array');
|
3148 |
|
3149 |
if(isset($all_post_meta['saswp_special_announcement_organization_logo_'.$schema_id][0]) || isset($all_post_meta['saswp_special_announcement_organization_name_'.$schema_id][0])){
|
3150 |
|
3250 |
'articleBody' => isset($all_post_meta['saswp_article_body_'.$schema_id][0]) ? wp_strip_all_tags(strip_shortcodes($all_post_meta['saswp_article_body_'.$schema_id][0])) : '',
|
3251 |
'keywords' => saswp_remove_warnings($all_post_meta, 'saswp_article_keywords_'.$schema_id, 'saswp_array'),
|
3252 |
'datePublished' => isset($all_post_meta['saswp_article_date_published_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_article_date_published_'.$schema_id][0], get_post_time('h:i:s')):'',
|
3253 |
+
'dateModified' => isset($all_post_meta['saswp_article_date_modified_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_article_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')):'',
|
|
|
|
|
|
|
|
|
|
|
|
|
3254 |
|
3255 |
);
|
3256 |
|
3257 |
+
$input1['author']['@type'] = 'Person';
|
3258 |
+
|
3259 |
+
if(isset( $all_post_meta['saswp_article_author_type_'.$schema_id][0] )){
|
3260 |
+
$input1['author']['@type'] = $all_post_meta['saswp_article_author_type_'.$schema_id][0];
|
3261 |
+
}
|
3262 |
+
|
3263 |
+
$input1['author']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_article_author_name_'.$schema_id, 'saswp_array');
|
3264 |
+
$input1['author']['description'] = saswp_remove_warnings($all_post_meta, 'saswp_article_author_description_'.$schema_id, 'saswp_array');
|
3265 |
+
$input1['author']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_article_author_url_'.$schema_id, 'saswp_array');
|
3266 |
+
|
3267 |
if(isset($all_post_meta['saswp_article_organization_logo_'.$schema_id][0]) || isset($all_post_meta['saswp_article_organization_name_'.$schema_id][0])){
|
3268 |
|
3269 |
$input1['publisher']['@type'] = 'Organization';
|
3323 |
'description' => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_description_'.$schema_id, 'saswp_array'),
|
3324 |
'keywords' => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_keywords_'.$schema_id, 'saswp_array'),
|
3325 |
'datePublished' => isset($all_post_meta['saswp_tech_article_date_published_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_tech_article_date_published_'.$schema_id][0], get_post_time('h:i:s')) :'',
|
3326 |
+
'dateModified' => isset($all_post_meta['saswp_tech_article_date_modified_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_tech_article_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')) :'',
|
|
|
|
|
|
|
|
|
|
|
|
|
3327 |
'publisher' => array(
|
3328 |
'@type' => 'Organization',
|
3329 |
'logo' => array(
|
3337 |
|
3338 |
);
|
3339 |
|
3340 |
+
$input1['author']['@type'] = 'Person';
|
3341 |
+
|
3342 |
+
if(isset( $all_post_meta['saswp_tech_article_author_type_'.$schema_id][0] )){
|
3343 |
+
$input1['author']['@type'] = $all_post_meta['saswp_tech_article_author_type_'.$schema_id][0];
|
3344 |
+
}
|
3345 |
+
|
3346 |
+
$input1['author']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_tech_article_author_name_'.$schema_id, 'saswp_array');
|
3347 |
+
$input1['author']['description'] = saswp_remove_warnings($all_post_meta, 'saswp_tech_article_author_description_'.$schema_id, 'saswp_array');
|
3348 |
+
$input1['author']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_tech_article_author_url_'.$schema_id, 'saswp_array');
|
3349 |
+
|
3350 |
$itemlist = get_post_meta($schema_post_id, 'tech_article_items_'.$schema_id, true);
|
3351 |
|
3352 |
if($itemlist){
|
3379 |
|
3380 |
function saswp_news_article_schema_markup($schema_id, $schema_post_id, $all_post_meta){
|
3381 |
|
3382 |
+
$input1 = array();
|
3383 |
+
|
3384 |
+
$slogo = get_post_meta( get_the_ID(), 'saswp_newsarticle_organization_logo_'.$schema_id.'_detail',true);
|
3385 |
+
$author_image = get_post_meta( get_the_ID(), 'saswp_newsarticle_author_image_'.$schema_id.'_detail',true);
|
3386 |
|
3387 |
+
$input1 = array(
|
3388 |
'@context' => saswp_context_url(),
|
3389 |
'@type' => 'NewsArticle' ,
|
3390 |
'@id' => trailingslashit(get_permalink()).'#newsarticle',
|
3406 |
'mainEntity' => array(
|
3407 |
'@type' => 'WebPage',
|
3408 |
'@id' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_main_entity_id_'.$schema_id, 'saswp_array'),
|
3409 |
+
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3410 |
'publisher' => array(
|
3411 |
'@type' => 'Organization',
|
3412 |
'logo' => array(
|
3419 |
),
|
3420 |
);
|
3421 |
|
3422 |
+
|
3423 |
+
$input1['author']['@type'] = 'Person';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3424 |
|
3425 |
+
if(isset( $all_post_meta['saswp_newsarticle_author_type_'.$schema_id][0] )){
|
3426 |
+
$input1['author']['@type'] = $all_post_meta['saswp_newsarticle_author_type_'.$schema_id][0];
|
3427 |
+
}
|
3428 |
+
|
3429 |
+
$input1['author']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_author_name_'.$schema_id, 'saswp_array');
|
3430 |
+
$input1['author']['description'] = saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_author_description_'.$schema_id, 'saswp_array');
|
3431 |
+
$input1['author']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_author_url_'.$schema_id, 'saswp_array');
|
3432 |
|
3433 |
+
$input1['author']['image']['@type'] = 'ImageObject';
|
3434 |
+
$input1['author']['image']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_author_image_'.$schema_id, 'saswp_array');
|
3435 |
+
$input1['author']['image']['height'] = $author_image['height'];
|
3436 |
+
$input1['author']['image']['width'] = $author_image['width'];
|
3437 |
+
|
3438 |
+
|
3439 |
+
$itemlist = get_post_meta($schema_post_id, 'newsarticle_items_'.$schema_id, true);
|
3440 |
+
|
3441 |
+
if($itemlist){
|
3442 |
+
|
3443 |
+
$list_arr = array();
|
3444 |
+
|
3445 |
+
foreach ($itemlist as $list){
|
3446 |
+
$list_arr[] = $list['saswp_newsarticle_items_name'];
|
3447 |
+
}
|
3448 |
+
|
3449 |
+
$input1['mainEntity']['@type'] = 'ItemList';
|
3450 |
+
$input1['mainEntity']['itemListElement'] = $list_arr;
|
3451 |
+
$input1['mainEntity']['itemListOrder'] = 'http://schema.org/ItemListOrderAscending ';
|
3452 |
+
$input1['mainEntity']['name'] = saswp_get_the_title();
|
3453 |
+
|
3454 |
+
}
|
3455 |
+
|
3456 |
+
if(isset($all_post_meta['saswp_newsarticle_speakable_'.$schema_id]) && $all_post_meta['saswp_newsarticle_speakable_'.$schema_id][0] == 1){
|
3457 |
+
|
3458 |
+
$input1['speakable']['@type'] = 'SpeakableSpecification';
|
3459 |
+
$input1['speakable']['xpath'] = array(
|
3460 |
+
"/html/head/title",
|
3461 |
+
"/html/head/meta[@name='description']/@content"
|
3462 |
+
);
|
3463 |
+
|
3464 |
+
}
|
3465 |
|
3466 |
return $input1;
|
3467 |
|
3492 |
'duration' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_duration_'.$schema_id, 'saswp_array'),
|
3493 |
'encodingFormat' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_encoding_format_'.$schema_id, 'saswp_array'),
|
3494 |
'playerType' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_player_type_'.$schema_id, 'saswp_array'),
|
3495 |
+
'readBy' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_readby_'.$schema_id, 'saswp_array')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3496 |
);
|
3497 |
|
3498 |
+
$input1['author']['@type'] = 'Person';
|
3499 |
+
|
3500 |
+
if(isset( $all_post_meta['saswp_audiobook_author_type_'.$schema_id][0] )){
|
3501 |
+
$input1['author']['@type'] = $all_post_meta['saswp_audiobook_author_type_'.$schema_id][0];
|
3502 |
+
}
|
3503 |
+
|
3504 |
+
$input1['author']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_audiobook_author_name_'.$schema_id, 'saswp_array');
|
3505 |
+
$input1['author']['description'] = saswp_remove_warnings($all_post_meta, 'saswp_audiobook_author_description_'.$schema_id, 'saswp_array');
|
3506 |
+
$input1['author']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_audiobook_author_url_'.$schema_id, 'saswp_array');
|
3507 |
+
|
3508 |
+
$input1['author']['image']['@type'] = 'ImageObject';
|
3509 |
+
$input1['author']['image']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_audiobook_author_image_'.$schema_id, 'saswp_array');
|
3510 |
+
$input1['author']['image']['height'] = $author_image['height'];
|
3511 |
+
$input1['author']['image']['width'] = $author_image['width'];
|
3512 |
+
|
3513 |
if(!(empty($image))){
|
3514 |
|
3515 |
$input1['image']['@type'] = 'ImageObject';
|
3646 |
'mainEntity' => array(
|
3647 |
'@type' => 'WebPage',
|
3648 |
'@id' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_main_entity_id_'.$schema_id, 'saswp_array'),
|
3649 |
+
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3650 |
'publisher' => array(
|
3651 |
'@type' => 'Organization',
|
3652 |
'logo' => array(
|
3653 |
+
'@type' => 'ImageObject',
|
3654 |
+
'url' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_organization_logo_'.$schema_id, 'saswp_array'),
|
3655 |
+
'width' => saswp_remove_warnings($slogo, 'width', 'saswp_string'),
|
3656 |
+
'height' => saswp_remove_warnings($slogo, 'height', 'saswp_string'),
|
3657 |
+
),
|
3658 |
'name' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_organization_name_'.$schema_id, 'saswp_array'),
|
3659 |
),
|
3660 |
);
|
3661 |
+
|
3662 |
+
$input1['author']['@type'] = 'Person';
|
3663 |
+
|
3664 |
+
if(isset( $all_post_meta['saswp_video_object_author_type_'.$schema_id][0] )){
|
3665 |
+
$input1['author']['@type'] = $all_post_meta['saswp_video_object_author_type_'.$schema_id][0];
|
3666 |
+
}
|
3667 |
+
|
3668 |
+
$input1['author']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_video_object_author_name_'.$schema_id, 'saswp_array');
|
3669 |
+
$input1['author']['description'] = saswp_remove_warnings($all_post_meta, 'saswp_video_object_author_description_'.$schema_id, 'saswp_array');
|
3670 |
+
$input1['author']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_video_object_author_url_'.$schema_id, 'saswp_array');
|
3671 |
+
|
3672 |
+
$input1['author']['image']['@type'] = 'ImageObject';
|
3673 |
+
$input1['author']['image']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_video_object_author_image_'.$schema_id, 'saswp_array');
|
3674 |
+
$input1['author']['image']['height'] = $author_image['height'];
|
3675 |
+
$input1['author']['image']['width'] = $author_image['width'];
|
3676 |
|
3677 |
+
if(isset($all_post_meta['saswp_video_object_duration_'.$schema_id][0]) ) {
|
3678 |
+
$input1['duration'] = $all_post_meta['saswp_video_object_duration_'.$schema_id][0];
|
3679 |
+
}
|
3680 |
|
3681 |
+
if(isset($all_post_meta['saswp_video_object_content_url_'.$schema_id][0]) && wp_http_validate_url($all_post_meta['saswp_video_object_content_url_'.$schema_id][0]) ) {
|
3682 |
+
$input1['contentUrl'] = $all_post_meta['saswp_video_object_content_url_'.$schema_id][0];
|
3683 |
+
}
|
3684 |
+
if(isset($all_post_meta['saswp_video_object_embed_url_'.$schema_id][0]) && wp_http_validate_url($all_post_meta['saswp_video_object_embed_url_'.$schema_id][0])){
|
3685 |
+
$input1['embedUrl'] = $all_post_meta['saswp_video_object_embed_url_'.$schema_id][0];
|
3686 |
+
}
|
3687 |
|
3688 |
return $input1;
|
3689 |
|
3704 |
'datePublished' => isset($all_post_meta['saswpimage_object_date_published_'.$schema_id])? saswp_format_date_time($all_post_meta['saswpimage_object_date_published_'.$schema_id][0], get_post_time('h:i:s')) : '',
|
3705 |
'dateModified' => isset($all_post_meta['saswpimage_object_date_modified_'.$schema_id])? saswp_format_date_time($all_post_meta['saswpimage_object_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')) : '',
|
3706 |
'description' => saswp_remove_warnings($all_post_meta, 'saswpimage_object_description_'.$schema_id, 'saswp_array'),
|
3707 |
+
'name' => saswp_remove_warnings($all_post_meta, 'saswpimage_object_name_'.$schema_id, 'saswp_array'),
|
3708 |
+
'license' => saswp_remove_warnings($all_post_meta, 'saswpimage_object_license_'.$schema_id, 'saswp_array'),
|
3709 |
'uploadDate' => isset($all_post_meta['saswpimage_object_upload_date_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswpimage_object_upload_date_'.$schema_id][0])):'',
|
3710 |
'contentUrl' => saswp_remove_warnings($all_post_meta, 'saswpimage_object_content_url_'.$schema_id, 'saswp_array'),
|
3711 |
+
'contentLocation' => saswp_remove_warnings($all_post_meta, 'saswpimage_object_content_location_'.$schema_id, 'saswp_array'),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3712 |
'publisher' => array(
|
3713 |
'@type' => 'Organization',
|
3714 |
'logo' => array(
|
3721 |
),
|
3722 |
);
|
3723 |
|
3724 |
+
$input1['author']['@type'] = 'Person';
|
3725 |
+
|
3726 |
+
if(isset( $all_post_meta['saswpimage_object_author_type_'.$schema_id][0] )){
|
3727 |
+
$input1['author']['@type'] = $all_post_meta['saswpimage_object_author_type_'.$schema_id][0];
|
3728 |
+
}
|
3729 |
|
3730 |
+
$input1['author']['name'] = saswp_remove_warnings($all_post_meta, 'saswpimage_object_author_name_'.$schema_id, 'saswp_array');
|
3731 |
+
$input1['author']['description'] = saswp_remove_warnings($all_post_meta, 'saswpimage_object_author_description_'.$schema_id, 'saswp_array');
|
3732 |
+
$input1['author']['url'] = saswp_remove_warnings($all_post_meta, 'saswpimage_object_author_url_'.$schema_id, 'saswp_array');
|
3733 |
+
|
3734 |
+
$input1['author']['image']['@type'] = 'ImageObject';
|
3735 |
+
$input1['author']['image']['url'] = saswp_remove_warnings($all_post_meta, 'saswpimage_object_author_image_'.$schema_id, 'saswp_array');
|
3736 |
+
$input1['author']['image']['height'] = $author_image['height'];
|
3737 |
+
$input1['author']['image']['width'] = $author_image['width'];
|
3738 |
|
3739 |
$itinerary = get_post_meta($schema_post_id, 'image_object_exif_data_'.$schema_id, true);
|
3740 |
|
3785 |
|
3786 |
$input1['provider']['@type'] = $all_post_meta['saswp_service_schema_provider_type_'.$schema_id][0];
|
3787 |
$input1['provider']['name'] = $all_post_meta['saswp_service_schema_provider_name_'.$schema_id][0];
|
3788 |
+
$input1['provider']['image'] = saswp_remove_warnings($all_post_meta, 'saswp_service_schema_image_'.$schema_id, 'saswp_array');
|
|
|
3789 |
$input1['provider']['address']['@type'] = 'PostalAddress';
|
3790 |
$input1['provider']['address']['addressLocality'] = saswp_remove_warnings($all_post_meta, 'saswp_service_schema_locality_'.$schema_id, 'saswp_array');
|
3791 |
$input1['provider']['address']['postalCode'] = saswp_remove_warnings($all_post_meta, 'saswp_service_schema_postal_code_'.$schema_id, 'saswp_array');
|
3792 |
$input1['provider']['address']['telephone'] = saswp_remove_warnings($all_post_meta, 'saswp_service_schema_telephone_'.$schema_id, 'saswp_array');
|
3793 |
|
3794 |
+
if(isset($all_post_meta['saswp_service_schema_price_range_'.$schema_id][0])){
|
3795 |
+
$input1['provider']['priceRange'] = $all_post_meta['saswp_service_schema_price_range_'.$schema_id][0];
|
3796 |
+
}
|
3797 |
+
|
3798 |
}
|
3799 |
|
3800 |
$input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_service_schema_description_'.$schema_id, 'saswp_array');
|
3866 |
|
3867 |
if($review_author){
|
3868 |
|
3869 |
+
$input1['author']['@type'] = 'Person';
|
3870 |
+
|
3871 |
+
if(isset($all_post_meta['saswp_review_author_type'.$schema_id][0])){
|
3872 |
+
$input1['author']['@type'] = $all_post_meta['saswp_review_author_type'.$schema_id][0];
|
3873 |
+
}
|
3874 |
+
|
3875 |
$input1['author']['name'] = esc_attr($review_author);
|
3876 |
|
3877 |
if(isset($all_post_meta['saswp_review_author_url_'.$schema_id])){
|
output/service.php
CHANGED
@@ -402,7 +402,13 @@ Class saswp_output_service{
|
|
402 |
}
|
403 |
}
|
404 |
if(isset($custom_fields['saswp_review_author'])){
|
405 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
406 |
$review_markup['author']['name'] = $custom_fields['saswp_review_author'];
|
407 |
|
408 |
if(isset($custom_fields['saswp_review_author_url']) && saswp_validate_url($custom_fields['saswp_review_author_url']) ){
|
@@ -446,6 +452,11 @@ Class saswp_output_service{
|
|
446 |
}
|
447 |
if(isset($custom_fields['saswp_book_author'])){
|
448 |
$input1['author']['@type'] = 'Person';
|
|
|
|
|
|
|
|
|
|
|
449 |
$input1['author']['name'] = $custom_fields['saswp_book_author'];
|
450 |
|
451 |
if(isset($custom_fields['saswp_book_author_url']) && saswp_validate_url( $custom_fields['saswp_book_author_url'] ) ){
|
@@ -735,6 +746,9 @@ Class saswp_output_service{
|
|
735 |
if(isset($custom_fields['saswp_audiobook_image'])){
|
736 |
$input1['image'] = $custom_fields['saswp_audiobook_image'];
|
737 |
}
|
|
|
|
|
|
|
738 |
if(isset($custom_fields['saswp_audiobook_author_name'])){
|
739 |
$input1['author']['name'] = $custom_fields['saswp_audiobook_author_name'];
|
740 |
}
|
@@ -1044,6 +1058,9 @@ Class saswp_output_service{
|
|
1044 |
if(isset($custom_fields['saswp_article_date_modified'])){
|
1045 |
$input1['dateModified'] = $custom_fields['saswp_article_date_modified'];
|
1046 |
}
|
|
|
|
|
|
|
1047 |
if(isset($custom_fields['saswp_article_author_name'])){
|
1048 |
$input1['author']['name'] = $custom_fields['saswp_article_author_name'];
|
1049 |
}
|
@@ -1121,6 +1138,9 @@ Class saswp_output_service{
|
|
1121 |
if(isset($custom_fields['saswp_special_announcement_date_expires'])){
|
1122 |
$input1['expires'] = $custom_fields['saswp_special_announcement_date_expires'];
|
1123 |
}
|
|
|
|
|
|
|
1124 |
if(isset($custom_fields['saswp_special_announcement_author_name'])){
|
1125 |
$input1['author']['name'] = $custom_fields['saswp_special_announcement_author_name'];
|
1126 |
}
|
@@ -1209,8 +1229,13 @@ Class saswp_output_service{
|
|
1209 |
$input1['geo']['latitude'] = $custom_fields['local_latitude'];
|
1210 |
$input1['geo']['longitude'] = $custom_fields['local_longitude'];
|
1211 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1212 |
}
|
1213 |
-
|
1214 |
if(isset($custom_fields['local_phone'])){
|
1215 |
$input1['telephone'] = $custom_fields['local_phone'];
|
1216 |
}
|
@@ -1221,7 +1246,7 @@ Class saswp_output_service{
|
|
1221 |
$input1['openingHours'] = $custom_fields['saswp_dayofweek'];
|
1222 |
}
|
1223 |
if(isset($custom_fields['local_area_served'])){
|
1224 |
-
$input1['areaServed'] =
|
1225 |
}
|
1226 |
if(isset($custom_fields['local_price_range'])){
|
1227 |
$input1['priceRange'] = $custom_fields['local_price_range'];
|
@@ -1275,6 +1300,9 @@ Class saswp_output_service{
|
|
1275 |
if(isset($custom_fields['saswp_blogposting_date_modified'])){
|
1276 |
$input1['dateModified'] = $custom_fields['saswp_blogposting_date_modified'];
|
1277 |
}
|
|
|
|
|
|
|
1278 |
if(isset($custom_fields['saswp_blogposting_author_name'])){
|
1279 |
$input1['author']['name'] = $custom_fields['saswp_blogposting_author_name'];
|
1280 |
}
|
@@ -1318,6 +1346,9 @@ Class saswp_output_service{
|
|
1318 |
if(isset($custom_fields['saswp_audio_schema_date_modified'])){
|
1319 |
$input1['dateModified'] = $custom_fields['saswp_audio_schema_date_modified'];
|
1320 |
}
|
|
|
|
|
|
|
1321 |
if(isset($custom_fields['saswp_audio_schema_author_name'])){
|
1322 |
$input1['author']['name'] = $custom_fields['saswp_audio_schema_author_name'];
|
1323 |
}
|
@@ -1445,6 +1476,9 @@ Class saswp_output_service{
|
|
1445 |
if(isset($custom_fields['saswp_newsarticle_main_entity_id'])){
|
1446 |
$input1['mainEntity']['@id'] = $custom_fields['saswp_newsarticle_main_entity_id'];
|
1447 |
}
|
|
|
|
|
|
|
1448 |
if(isset($custom_fields['saswp_newsarticle_author_name'])){
|
1449 |
$input1['author']['name'] = $custom_fields['saswp_newsarticle_author_name'];
|
1450 |
}
|
@@ -1498,6 +1532,9 @@ Class saswp_output_service{
|
|
1498 |
if(isset($custom_fields['saswp_webpage_date_modified'])){
|
1499 |
$input1['mainEntity']['dateModified'] = $custom_fields['saswp_webpage_date_modified'];
|
1500 |
}
|
|
|
|
|
|
|
1501 |
if(isset($custom_fields['saswp_webpage_author_name'])){
|
1502 |
$input1['mainEntity']['author']['name'] = $custom_fields['saswp_webpage_author_name'];
|
1503 |
}
|
@@ -1697,7 +1734,9 @@ Class saswp_output_service{
|
|
1697 |
if(isset($custom_fields['saswp_tech_article_date_modified'])){
|
1698 |
$input1['dateModified'] = $custom_fields['saswp_tech_article_date_modified'];
|
1699 |
}
|
1700 |
-
|
|
|
|
|
1701 |
if(isset($custom_fields['saswp_tech_article_author_name'])){
|
1702 |
$input1['author']['name'] = $custom_fields['saswp_tech_article_author_name'];
|
1703 |
}
|
@@ -1784,6 +1823,9 @@ Class saswp_output_service{
|
|
1784 |
if(isset($custom_fields['saswp_dfp_date_modified'])){
|
1785 |
$input1['dateModified'] = $custom_fields['saswp_dfp_date_modified'];
|
1786 |
}
|
|
|
|
|
|
|
1787 |
if(isset($custom_fields['saswp_dfp_author_name'])){
|
1788 |
$input1['author']['name'] = $custom_fields['saswp_dfp_author_name'];
|
1789 |
}
|
@@ -1825,7 +1867,9 @@ Class saswp_output_service{
|
|
1825 |
if(isset($custom_fields['saswp_recipe_main_entity'])){
|
1826 |
$input1['mainEntity']['@id'] = $custom_fields['saswp_recipe_main_entity'];
|
1827 |
}
|
1828 |
-
|
|
|
|
|
1829 |
if(isset($custom_fields['saswp_recipe_author_name'])){
|
1830 |
$input1['author']['name'] = $custom_fields['saswp_recipe_author_name'];
|
1831 |
}
|
@@ -1895,7 +1939,27 @@ Class saswp_output_service{
|
|
1895 |
if(isset($custom_fields['saswp_recipe_carbohydrate'])){
|
1896 |
$input1['nutrition']['@type'] = 'NutritionInformation';
|
1897 |
$input1['nutrition']['carbohydrateContent'] = $custom_fields['saswp_recipe_carbohydrate'];
|
1898 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1899 |
if(isset($custom_fields['saswp_recipe_ingredient'])){
|
1900 |
|
1901 |
if(is_array($custom_fields['saswp_recipe_ingredient'])){
|
@@ -2021,6 +2085,17 @@ Class saswp_output_service{
|
|
2021 |
$input1['offers']['seller']['@type'] = 'Organization';
|
2022 |
$input1['offers']['seller']['name'] = $custom_fields['saswp_product_schema_seller'];
|
2023 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024 |
|
2025 |
if(isset($custom_fields['saswp_product_schema_rating']) && isset($custom_fields['saswp_product_schema_review_count'])){
|
2026 |
$input1['aggregateRating']['@type'] = 'aggregateRating';
|
@@ -2195,6 +2270,9 @@ Class saswp_output_service{
|
|
2195 |
$input1['provider']['@type'] = $custom_fields['saswp_service_schema_provider_type'];
|
2196 |
$input1['provider']['name'] = $custom_fields['saswp_service_schema_provider_name'];
|
2197 |
}
|
|
|
|
|
|
|
2198 |
if(isset($custom_fields['saswp_service_schema_image'])){
|
2199 |
$input1['provider']['image'] = $custom_fields['saswp_service_schema_image'];
|
2200 |
}
|
@@ -2211,7 +2289,7 @@ Class saswp_output_service{
|
|
2211 |
$input1['description'] = wp_strip_all_tags(strip_shortcodes( $custom_fields['saswp_service_schema_description'] ));
|
2212 |
}
|
2213 |
if(isset($custom_fields['saswp_service_schema_area_served'])){
|
2214 |
-
$input1['areaServed'] =
|
2215 |
}
|
2216 |
if(isset($custom_fields['saswp_service_schema_service_offer'])){
|
2217 |
$input1['hasOfferCatalog'] = $custom_fields['saswp_service_schema_service_offer'];
|
@@ -2257,6 +2335,9 @@ Class saswp_output_service{
|
|
2257 |
if(isset($custom_fields['saswp_video_object_embed_url']) && wp_http_validate_url($custom_fields['saswp_video_object_embed_url'])){
|
2258 |
$input1['embedUrl'] = saswp_validate_url($custom_fields['saswp_video_object_embed_url']);
|
2259 |
}
|
|
|
|
|
|
|
2260 |
if(isset($custom_fields['saswp_video_object_author_name'])){
|
2261 |
$input1['author']['name'] = $custom_fields['saswp_video_object_author_name'];
|
2262 |
}
|
@@ -2293,6 +2374,9 @@ Class saswp_output_service{
|
|
2293 |
}
|
2294 |
if(isset($custom_fields['saswpimage_object_name'])){
|
2295 |
$input1['name'] = $custom_fields['saswpimage_object_name'];
|
|
|
|
|
|
|
2296 |
}
|
2297 |
if(isset($custom_fields['saswpimage_object_upload_date'])){
|
2298 |
$input1['uploadDate'] = $custom_fields['saswpimage_object_upload_date'];
|
@@ -2306,6 +2390,9 @@ Class saswp_output_service{
|
|
2306 |
if(isset($custom_fields['saswpimage_object_content_location'])){
|
2307 |
$input1['contentLocation'] = $custom_fields['saswpimage_object_content_location'];
|
2308 |
}
|
|
|
|
|
|
|
2309 |
if(isset($custom_fields['saswpimage_object_author_name'])){
|
2310 |
$input1['author']['name'] = $custom_fields['saswpimage_object_author_name'];
|
2311 |
}
|
@@ -2346,6 +2433,11 @@ Class saswp_output_service{
|
|
2346 |
}
|
2347 |
if(isset($custom_fields['saswp_qa_question_author_name'])){
|
2348 |
$input1['mainEntity']['author']['@type'] = 'Person';
|
|
|
|
|
|
|
|
|
|
|
2349 |
$input1['mainEntity']['author']['name'] = $custom_fields['saswp_qa_question_author_name'];
|
2350 |
}
|
2351 |
if(isset($custom_fields['saswp_qa_accepted_answer_text'])){
|
@@ -2397,6 +2489,9 @@ Class saswp_output_service{
|
|
2397 |
if(isset($custom_fields['saswp_tvseries_schema_image'])){
|
2398 |
$input1['image'] = $custom_fields['saswp_tvseries_schema_image'];
|
2399 |
}
|
|
|
|
|
|
|
2400 |
if(isset($custom_fields['saswp_tvseries_schema_author_name'])){
|
2401 |
$input1['author']['name'] = $custom_fields['saswp_tvseries_schema_author_name'];
|
2402 |
}
|
@@ -2458,7 +2553,12 @@ Class saswp_output_service{
|
|
2458 |
$input1['dateCreated'] = $custom_fields['saswp_faq_date_modified'];
|
2459 |
}
|
2460 |
if(isset($custom_fields['saswp_faq_author'])){
|
2461 |
-
$input1['author']['@type'] = 'Person';
|
|
|
|
|
|
|
|
|
|
|
2462 |
$input1['author']['name'] = $custom_fields['saswp_faq_author'];
|
2463 |
}
|
2464 |
|
@@ -2992,6 +3092,9 @@ Class saswp_output_service{
|
|
2992 |
if(isset($custom_fields['saswp_vg_schema_application_category'])){
|
2993 |
$input1['applicationCategory'] = $custom_fields['saswp_vg_schema_application_category'];
|
2994 |
}
|
|
|
|
|
|
|
2995 |
if(isset($custom_fields['saswp_vg_schema_author_name'])){
|
2996 |
$input1['author']['name'] = $custom_fields['saswp_vg_schema_author_name'];
|
2997 |
}
|
@@ -4465,6 +4568,6 @@ Class saswp_output_service{
|
|
4465 |
|
4466 |
}
|
4467 |
if (class_exists('saswp_output_service')) {
|
4468 |
-
|
4469 |
$object->saswp_service_hooks();
|
4470 |
};
|
402 |
}
|
403 |
}
|
404 |
if(isset($custom_fields['saswp_review_author'])){
|
405 |
+
|
406 |
+
$review_markup['author']['@type'] = 'Person';
|
407 |
+
|
408 |
+
if(isset($custom_fields['saswp_review_author_type'])){
|
409 |
+
$review_markup['author']['@type'] = $custom_fields['saswp_review_author_type'];
|
410 |
+
}
|
411 |
+
|
412 |
$review_markup['author']['name'] = $custom_fields['saswp_review_author'];
|
413 |
|
414 |
if(isset($custom_fields['saswp_review_author_url']) && saswp_validate_url($custom_fields['saswp_review_author_url']) ){
|
452 |
}
|
453 |
if(isset($custom_fields['saswp_book_author'])){
|
454 |
$input1['author']['@type'] = 'Person';
|
455 |
+
|
456 |
+
if(isset($custom_fields['saswp_book_author_type'])){
|
457 |
+
$input1['author']['@type'] = $custom_fields['saswp_book_author_type'];
|
458 |
+
}
|
459 |
+
|
460 |
$input1['author']['name'] = $custom_fields['saswp_book_author'];
|
461 |
|
462 |
if(isset($custom_fields['saswp_book_author_url']) && saswp_validate_url( $custom_fields['saswp_book_author_url'] ) ){
|
746 |
if(isset($custom_fields['saswp_audiobook_image'])){
|
747 |
$input1['image'] = $custom_fields['saswp_audiobook_image'];
|
748 |
}
|
749 |
+
if(isset($custom_fields['saswp_audiobook_author_type'])){
|
750 |
+
$input1['author']['@type'] = $custom_fields['saswp_audiobook_author_type'];
|
751 |
+
}
|
752 |
if(isset($custom_fields['saswp_audiobook_author_name'])){
|
753 |
$input1['author']['name'] = $custom_fields['saswp_audiobook_author_name'];
|
754 |
}
|
1058 |
if(isset($custom_fields['saswp_article_date_modified'])){
|
1059 |
$input1['dateModified'] = $custom_fields['saswp_article_date_modified'];
|
1060 |
}
|
1061 |
+
if(isset($custom_fields['saswp_article_author_type'])){
|
1062 |
+
$input1['author']['@type'] = $custom_fields['saswp_article_author_type'];
|
1063 |
+
}
|
1064 |
if(isset($custom_fields['saswp_article_author_name'])){
|
1065 |
$input1['author']['name'] = $custom_fields['saswp_article_author_name'];
|
1066 |
}
|
1138 |
if(isset($custom_fields['saswp_special_announcement_date_expires'])){
|
1139 |
$input1['expires'] = $custom_fields['saswp_special_announcement_date_expires'];
|
1140 |
}
|
1141 |
+
if(isset($custom_fields['saswp_special_announcement_author_type'])){
|
1142 |
+
$input1['author']['@type'] = $custom_fields['saswp_special_announcement_author_type'];
|
1143 |
+
}
|
1144 |
if(isset($custom_fields['saswp_special_announcement_author_name'])){
|
1145 |
$input1['author']['name'] = $custom_fields['saswp_special_announcement_author_name'];
|
1146 |
}
|
1229 |
$input1['geo']['latitude'] = $custom_fields['local_latitude'];
|
1230 |
$input1['geo']['longitude'] = $custom_fields['local_longitude'];
|
1231 |
|
1232 |
+
}
|
1233 |
+
if(isset($custom_fields['local_business_founder'])){
|
1234 |
+
$input1['founder'] = saswp_explode_comma_seprated($custom_fields['local_business_founder'], 'Person');
|
1235 |
+
}
|
1236 |
+
if(isset($custom_fields['local_business_employee'])){
|
1237 |
+
$input1['employee'] = saswp_explode_comma_seprated($custom_fields['local_business_employee'], 'Person');
|
1238 |
}
|
|
|
1239 |
if(isset($custom_fields['local_phone'])){
|
1240 |
$input1['telephone'] = $custom_fields['local_phone'];
|
1241 |
}
|
1246 |
$input1['openingHours'] = $custom_fields['saswp_dayofweek'];
|
1247 |
}
|
1248 |
if(isset($custom_fields['local_area_served'])){
|
1249 |
+
$input1['areaServed'] = saswp_explode_comma_seprated($custom_fields['local_area_served'], 'Place');
|
1250 |
}
|
1251 |
if(isset($custom_fields['local_price_range'])){
|
1252 |
$input1['priceRange'] = $custom_fields['local_price_range'];
|
1300 |
if(isset($custom_fields['saswp_blogposting_date_modified'])){
|
1301 |
$input1['dateModified'] = $custom_fields['saswp_blogposting_date_modified'];
|
1302 |
}
|
1303 |
+
if(isset($custom_fields['saswp_blogposting_author_type'])){
|
1304 |
+
$input1['author']['@type'] = $custom_fields['saswp_blogposting_author_type'];
|
1305 |
+
}
|
1306 |
if(isset($custom_fields['saswp_blogposting_author_name'])){
|
1307 |
$input1['author']['name'] = $custom_fields['saswp_blogposting_author_name'];
|
1308 |
}
|
1346 |
if(isset($custom_fields['saswp_audio_schema_date_modified'])){
|
1347 |
$input1['dateModified'] = $custom_fields['saswp_audio_schema_date_modified'];
|
1348 |
}
|
1349 |
+
if(isset($custom_fields['saswp_audio_schema_author_type'])){
|
1350 |
+
$input1['author']['@type'] = $custom_fields['saswp_audio_schema_author_type'];
|
1351 |
+
}
|
1352 |
if(isset($custom_fields['saswp_audio_schema_author_name'])){
|
1353 |
$input1['author']['name'] = $custom_fields['saswp_audio_schema_author_name'];
|
1354 |
}
|
1476 |
if(isset($custom_fields['saswp_newsarticle_main_entity_id'])){
|
1477 |
$input1['mainEntity']['@id'] = $custom_fields['saswp_newsarticle_main_entity_id'];
|
1478 |
}
|
1479 |
+
if(isset($custom_fields['saswp_newsarticle_author_type'])){
|
1480 |
+
$input1['author']['@type'] = $custom_fields['saswp_newsarticle_author_type'];
|
1481 |
+
}
|
1482 |
if(isset($custom_fields['saswp_newsarticle_author_name'])){
|
1483 |
$input1['author']['name'] = $custom_fields['saswp_newsarticle_author_name'];
|
1484 |
}
|
1532 |
if(isset($custom_fields['saswp_webpage_date_modified'])){
|
1533 |
$input1['mainEntity']['dateModified'] = $custom_fields['saswp_webpage_date_modified'];
|
1534 |
}
|
1535 |
+
if(isset($custom_fields['saswp_webpage_author_type'])){
|
1536 |
+
$input1['mainEntity']['author']['@type'] = $custom_fields['saswp_webpage_author_type'];
|
1537 |
+
}
|
1538 |
if(isset($custom_fields['saswp_webpage_author_name'])){
|
1539 |
$input1['mainEntity']['author']['name'] = $custom_fields['saswp_webpage_author_name'];
|
1540 |
}
|
1734 |
if(isset($custom_fields['saswp_tech_article_date_modified'])){
|
1735 |
$input1['dateModified'] = $custom_fields['saswp_tech_article_date_modified'];
|
1736 |
}
|
1737 |
+
if(isset($custom_fields['saswp_tech_article_author_type'])){
|
1738 |
+
$input1['author']['@type'] = $custom_fields['saswp_tech_article_author_type'];
|
1739 |
+
}
|
1740 |
if(isset($custom_fields['saswp_tech_article_author_name'])){
|
1741 |
$input1['author']['name'] = $custom_fields['saswp_tech_article_author_name'];
|
1742 |
}
|
1823 |
if(isset($custom_fields['saswp_dfp_date_modified'])){
|
1824 |
$input1['dateModified'] = $custom_fields['saswp_dfp_date_modified'];
|
1825 |
}
|
1826 |
+
if(isset($custom_fields['saswp_dfp_author_type'])){
|
1827 |
+
$input1['author']['@type'] = $custom_fields['saswp_dfp_author_type'];
|
1828 |
+
}
|
1829 |
if(isset($custom_fields['saswp_dfp_author_name'])){
|
1830 |
$input1['author']['name'] = $custom_fields['saswp_dfp_author_name'];
|
1831 |
}
|
1867 |
if(isset($custom_fields['saswp_recipe_main_entity'])){
|
1868 |
$input1['mainEntity']['@id'] = $custom_fields['saswp_recipe_main_entity'];
|
1869 |
}
|
1870 |
+
if(isset($custom_fields['saswp_recipe_author_type'])){
|
1871 |
+
$input1['author']['@type'] = $custom_fields['saswp_recipe_author_type'];
|
1872 |
+
}
|
1873 |
if(isset($custom_fields['saswp_recipe_author_name'])){
|
1874 |
$input1['author']['name'] = $custom_fields['saswp_recipe_author_name'];
|
1875 |
}
|
1939 |
if(isset($custom_fields['saswp_recipe_carbohydrate'])){
|
1940 |
$input1['nutrition']['@type'] = 'NutritionInformation';
|
1941 |
$input1['nutrition']['carbohydrateContent'] = $custom_fields['saswp_recipe_carbohydrate'];
|
1942 |
+
}
|
1943 |
+
if(isset($custom_fields['saswp_recipe_cholesterol'])){
|
1944 |
+
$input1['nutrition']['@type'] = 'NutritionInformation';
|
1945 |
+
$input1['nutrition']['cholesterolContent'] = $custom_fields['saswp_recipe_cholesterol'];
|
1946 |
+
}
|
1947 |
+
if(isset($custom_fields['saswp_recipe_saturated_fat'])){
|
1948 |
+
$input1['nutrition']['@type'] = 'NutritionInformation';
|
1949 |
+
$input1['nutrition']['saturatedFatContent'] = $custom_fields['saswp_recipe_saturated_fat'];
|
1950 |
+
}
|
1951 |
+
if(isset($custom_fields['saswp_recipe_unsaturated_fat'])){
|
1952 |
+
$input1['nutrition']['@type'] = 'NutritionInformation';
|
1953 |
+
$input1['nutrition']['unsaturatedFatContent'] = $custom_fields['saswp_recipe_unsaturated_fat'];
|
1954 |
+
}
|
1955 |
+
if(isset($custom_fields['saswp_recipe_trans_fat'])){
|
1956 |
+
$input1['nutrition']['@type'] = 'NutritionInformation';
|
1957 |
+
$input1['nutrition']['transFatContent'] = $custom_fields['saswp_recipe_trans_fat'];
|
1958 |
+
}
|
1959 |
+
if(isset($custom_fields['saswp_recipe_serving_size'])){
|
1960 |
+
$input1['nutrition']['@type'] = 'NutritionInformation';
|
1961 |
+
$input1['nutrition']['servingSize'] = $custom_fields['saswp_recipe_serving_size'];
|
1962 |
+
}
|
1963 |
if(isset($custom_fields['saswp_recipe_ingredient'])){
|
1964 |
|
1965 |
if(is_array($custom_fields['saswp_recipe_ingredient'])){
|
2085 |
$input1['offers']['seller']['@type'] = 'Organization';
|
2086 |
$input1['offers']['seller']['name'] = $custom_fields['saswp_product_schema_seller'];
|
2087 |
}
|
2088 |
+
|
2089 |
+
if( isset($custom_fields['saswp_product_schema_high_price']) && isset($custom_fields['saswp_product_schema_low_price']) ){
|
2090 |
+
|
2091 |
+
$input1['offers']['@type'] = 'AggregateOffer';
|
2092 |
+
$input1['offers']['highPrice'] = $custom_fields['saswp_product_schema_high_price'];
|
2093 |
+
$input1['offers']['lowPrice'] = $custom_fields['saswp_product_schema_low_price'];
|
2094 |
+
|
2095 |
+
if(isset($custom_fields['saswp_product_schema_offer_count'])){
|
2096 |
+
$input1['offers']['offerCount'] = $custom_fields['saswp_product_schema_offer_count'];
|
2097 |
+
}
|
2098 |
+
}
|
2099 |
|
2100 |
if(isset($custom_fields['saswp_product_schema_rating']) && isset($custom_fields['saswp_product_schema_review_count'])){
|
2101 |
$input1['aggregateRating']['@type'] = 'aggregateRating';
|
2270 |
$input1['provider']['@type'] = $custom_fields['saswp_service_schema_provider_type'];
|
2271 |
$input1['provider']['name'] = $custom_fields['saswp_service_schema_provider_name'];
|
2272 |
}
|
2273 |
+
if(isset($custom_fields['saswp_service_schema_price_range'])){
|
2274 |
+
$input1['provider']['priceRange'] = $custom_fields['saswp_service_schema_price_range'];
|
2275 |
+
}
|
2276 |
if(isset($custom_fields['saswp_service_schema_image'])){
|
2277 |
$input1['provider']['image'] = $custom_fields['saswp_service_schema_image'];
|
2278 |
}
|
2289 |
$input1['description'] = wp_strip_all_tags(strip_shortcodes( $custom_fields['saswp_service_schema_description'] ));
|
2290 |
}
|
2291 |
if(isset($custom_fields['saswp_service_schema_area_served'])){
|
2292 |
+
$input1['areaServed'] = saswp_explode_comma_seprated($custom_fields['saswp_service_schema_area_served'], 'Place');
|
2293 |
}
|
2294 |
if(isset($custom_fields['saswp_service_schema_service_offer'])){
|
2295 |
$input1['hasOfferCatalog'] = $custom_fields['saswp_service_schema_service_offer'];
|
2335 |
if(isset($custom_fields['saswp_video_object_embed_url']) && wp_http_validate_url($custom_fields['saswp_video_object_embed_url'])){
|
2336 |
$input1['embedUrl'] = saswp_validate_url($custom_fields['saswp_video_object_embed_url']);
|
2337 |
}
|
2338 |
+
if(isset($custom_fields['saswp_video_object_author_type'])){
|
2339 |
+
$input1['author']['@type'] = $custom_fields['saswp_video_object_author_type'];
|
2340 |
+
}
|
2341 |
if(isset($custom_fields['saswp_video_object_author_name'])){
|
2342 |
$input1['author']['name'] = $custom_fields['saswp_video_object_author_name'];
|
2343 |
}
|
2374 |
}
|
2375 |
if(isset($custom_fields['saswpimage_object_name'])){
|
2376 |
$input1['name'] = $custom_fields['saswpimage_object_name'];
|
2377 |
+
}
|
2378 |
+
if(isset($custom_fields['saswpimage_object_license'])){
|
2379 |
+
$input1['license'] = $custom_fields['saswpimage_object_license'];
|
2380 |
}
|
2381 |
if(isset($custom_fields['saswpimage_object_upload_date'])){
|
2382 |
$input1['uploadDate'] = $custom_fields['saswpimage_object_upload_date'];
|
2390 |
if(isset($custom_fields['saswpimage_object_content_location'])){
|
2391 |
$input1['contentLocation'] = $custom_fields['saswpimage_object_content_location'];
|
2392 |
}
|
2393 |
+
if(isset($custom_fields['saswpimage_object_author_type'])){
|
2394 |
+
$input1['author']['@type'] = $custom_fields['saswpimage_object_author_type'];
|
2395 |
+
}
|
2396 |
if(isset($custom_fields['saswpimage_object_author_name'])){
|
2397 |
$input1['author']['name'] = $custom_fields['saswpimage_object_author_name'];
|
2398 |
}
|
2433 |
}
|
2434 |
if(isset($custom_fields['saswp_qa_question_author_name'])){
|
2435 |
$input1['mainEntity']['author']['@type'] = 'Person';
|
2436 |
+
|
2437 |
+
if(isset($custom_fields['saswp_qa_question_author_type'])){
|
2438 |
+
$input1['mainEntity']['author']['@type'] = $custom_fields['saswp_qa_question_author_type'];
|
2439 |
+
}
|
2440 |
+
|
2441 |
$input1['mainEntity']['author']['name'] = $custom_fields['saswp_qa_question_author_name'];
|
2442 |
}
|
2443 |
if(isset($custom_fields['saswp_qa_accepted_answer_text'])){
|
2489 |
if(isset($custom_fields['saswp_tvseries_schema_image'])){
|
2490 |
$input1['image'] = $custom_fields['saswp_tvseries_schema_image'];
|
2491 |
}
|
2492 |
+
if(isset($custom_fields['saswp_tvseries_schema_author_type'])){
|
2493 |
+
$input1['author']['@type'] = $custom_fields['saswp_tvseries_schema_author_type'];
|
2494 |
+
}
|
2495 |
if(isset($custom_fields['saswp_tvseries_schema_author_name'])){
|
2496 |
$input1['author']['name'] = $custom_fields['saswp_tvseries_schema_author_name'];
|
2497 |
}
|
2553 |
$input1['dateCreated'] = $custom_fields['saswp_faq_date_modified'];
|
2554 |
}
|
2555 |
if(isset($custom_fields['saswp_faq_author'])){
|
2556 |
+
$input1['author']['@type'] = 'Person';
|
2557 |
+
|
2558 |
+
if(isset($custom_fields['saswp_faq_author_type'])){
|
2559 |
+
$input1['author']['@type'] = $custom_fields['saswp_faq_author_type'];
|
2560 |
+
}
|
2561 |
+
|
2562 |
$input1['author']['name'] = $custom_fields['saswp_faq_author'];
|
2563 |
}
|
2564 |
|
3092 |
if(isset($custom_fields['saswp_vg_schema_application_category'])){
|
3093 |
$input1['applicationCategory'] = $custom_fields['saswp_vg_schema_application_category'];
|
3094 |
}
|
3095 |
+
if(isset($custom_fields['saswp_vg_schema_author_type'])){
|
3096 |
+
$input1['author']['@type'] = $custom_fields['saswp_vg_schema_author_type'];
|
3097 |
+
}
|
3098 |
if(isset($custom_fields['saswp_vg_schema_author_name'])){
|
3099 |
$input1['author']['name'] = $custom_fields['saswp_vg_schema_author_name'];
|
3100 |
}
|
4568 |
|
4569 |
}
|
4570 |
if (class_exists('saswp_output_service')) {
|
4571 |
+
$object = new saswp_output_service();
|
4572 |
$object->saswp_service_hooks();
|
4573 |
};
|
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.5
|
6 |
-
Stable tag: 1.9.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -120,6 +120,18 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
|
|
120 |
|
121 |
== Changelog ==
|
122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
= 1.9.52 (26 Oct 2020) =
|
124 |
|
125 |
* Fixed: When city names added manually by separating with comma, in store schema, in output of schema markup all city name are showing as one value in areaServed property #1217
|
3 |
Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.5
|
6 |
+
Stable tag: 1.9.53
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
120 |
|
121 |
== Changelog ==
|
122 |
|
123 |
+
= 1.9.53 (02 Nov 2020) =
|
124 |
+
|
125 |
+
* Added: Support for "low price" and "high price" properties of the product schema #1133
|
126 |
+
* Added: NutritionInformation all properties such as ( servingSize, fatContent, saturatedFatContent etc. ) in Recipe Schema #1070
|
127 |
+
* Added: Properties ( employee & alumni ) in RealEstateAgent schema type. #1053
|
128 |
+
* Added: Generate an id for the comment markup. #1057
|
129 |
+
* Added: Price Range to the Service schema #1088
|
130 |
+
* Added: License property for ImageObject Schema #1190
|
131 |
+
* Added: Allow users to change the author from a person to an organization #749
|
132 |
+
* Fixed: Undefined index: wpdiscuz plugins\schema-and-structured-data-for-wp\admin_section\common-function.php on line 3054 #1228
|
133 |
+
|
134 |
+
|
135 |
= 1.9.52 (26 Oct 2020) =
|
136 |
|
137 |
* Fixed: When city names added manually by separating with comma, in store schema, in output of schema markup all city name are showing as one value in areaServed property #1217
|
structured-data-for-wp.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Schema & Structured Data for WP & AMP
|
4 |
Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
|
5 |
-
Version: 1.9.
|
6 |
Text Domain: schema-and-structured-data-for-wp
|
7 |
Domain Path: /languages
|
8 |
Author: Magazine3
|
@@ -13,7 +13,7 @@ License: GPL2
|
|
13 |
// Exit if accessed directly.
|
14 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
15 |
|
16 |
-
define('SASWP_VERSION', '1.9.
|
17 |
define('SASWP_DIR_NAME_FILE', __FILE__ );
|
18 |
define('SASWP_DIR_NAME', dirname( __FILE__ ));
|
19 |
define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
|
2 |
/*
|
3 |
Plugin Name: Schema & Structured Data for WP & AMP
|
4 |
Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
|
5 |
+
Version: 1.9.53
|
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.53');
|
17 |
define('SASWP_DIR_NAME_FILE', __FILE__ );
|
18 |
define('SASWP_DIR_NAME', dirname( __FILE__ ));
|
19 |
define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
|