diff --git a/core/array-list/repeater-fields.php b/core/array-list/repeater-fields.php
index 45f318a1..8b1bc68b 100644
--- a/core/array-list/repeater-fields.php
+++ b/core/array-list/repeater-fields.php
@@ -120,6 +120,15 @@
),
'Course' => array(
'course-instance' => 'course_instance'
+ ),
+ 'VacationRental' => array(
+ 'vacation-rental-porperty-images' => 'vacation_rental_property_images',
+ 'vacation-rental-bed-details' => 'vacation_rental_bed_details',
+ 'vacation-rental-amenity-feature' => 'vacation_rental_amenity_feature',
+ 'vacation-rental-review-rating' => 'vacation_rental_review_rating'
+ ),
+ 'LearningResource' => array(
+ 'learning-resource-educational-alignment' => 'learning_resource_educational_alignment',
)
),
@@ -447,7 +456,12 @@
'label' => 'Accepted Answer Author Name',
'name' => 'saswp_qa_accepted_author_name',
'type' => 'text',
- )
+ ),
+ array(
+ 'label' => 'Author URL',
+ 'name' => 'saswp_qa_accepted_author_url',
+ 'type' => 'text'
+ )
),
'suggested_answer' => array(
array(
@@ -483,7 +497,12 @@
'label' => 'suggested Answer Author Name',
'name' => 'saswp_qa_suggested_author_name',
'type' => 'text',
- )
+ ),
+ array(
+ 'label' => 'Author URL',
+ 'name' => 'saswp_qa_suggested_author_url',
+ 'type' => 'text'
+ )
),
'howto_tool' => array(
array(
@@ -881,6 +900,98 @@
'name' => 'saswp_course_instance_offer_currency',
'type' => 'text'
),
- )
+ ),
+ 'vacation_rental_bed_details' => array(
+ array(
+ 'label' => 'Number Of Beds',
+ 'name' => 'saswp_vr_bed_details_nob',
+ 'type' => 'number'
+ ),
+ array(
+ 'label' => 'Type Of Bed',
+ 'name' => 'saswp_vr_bed_details_tob',
+ 'type' => 'text'
+ ),
+ ),
+ 'vacation_rental_amenity_feature' => array(
+ array(
+ 'label' => 'Name',
+ 'name' => 'saswp_vr_amenity_feature_name',
+ 'type' => 'text'
+ ),
+ array(
+ 'label' => 'Value',
+ 'name' => 'saswp_vr_amenity_feature_value',
+ 'type' => 'text'
+ )
+ ),
+ 'vacation_rental_property_images' => array(
+ array(
+ 'label' => 'Property Image',
+ 'name' => 'saswp_vr_property_image',
+ 'type' => 'media',
+ )
+ ),
+ 'vacation_rental_review_rating' => array(
+ array(
+ 'label' => 'Rating Value',
+ 'name' => 'saswp_vr_review_rating_value',
+ 'type' => 'number'
+ ),
+ array(
+ 'label' => 'Best Rating',
+ 'name' => 'saswp_vr_review_rating_best_value',
+ 'type' => 'number'
+ ),
+ array(
+ 'label' => 'Author Type',
+ 'name' => 'saswp_vr_review_rating_author_type',
+ 'type' => 'select',
+ 'options' => array(
+ 'Person' => 'Person',
+ 'Organization' => 'Organization'
+ )
+ ),
+ array(
+ 'label' => 'Author Name',
+ 'name' => 'saswp_vr_review_rating_author_name',
+ 'type' => 'text'
+ ),
+ array(
+ 'label' => 'Date Published',
+ 'name' => 'saswp_vr_review_rating_date_pub',
+ 'type' => 'date',
+ 'default' => get_the_date("Y-m-d")
+ ),
+ array(
+ 'label' => 'Content Reference Time',
+ 'name' => 'saswp_vr_review_rating_cr_time',
+ 'type' => 'date',
+ 'default' => get_the_date("Y-m-d")
+ )
+ ),
+ 'learning_resource_educational_alignment' => array(
+ array(
+ 'label' => 'Alignment Type',
+ 'name' => 'saswp_lr_eaat',
+ 'type' => 'text'
+ ),
+ array(
+ 'label' => 'Educational Framework',
+ 'name' => 'saswp_lr_eaef',
+ 'type' => 'text'
+ ),
+ array(
+ 'label' => 'Target Name',
+ 'name' => 'saswp_lr_eatn',
+ 'type' => 'text'
+ ),
+ array(
+ 'label' => 'Target URL',
+ 'name' => 'saswp_lr_eatu',
+ 'type' => 'text'
+ ),
+ )
+
)
);
\ No newline at end of file
diff --git a/core/array-list/schema-properties.php b/core/array-list/schema-properties.php
index 830c7be0..eff63d0c 100644
--- a/core/array-list/schema-properties.php
+++ b/core/array-list/schema-properties.php
@@ -7260,6 +7260,12 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
'id' => 'saswp_qa_question_author_name_'.$schema_id,
'type' => 'text',
),
+ array(
+ 'label' => 'Author URL',
+ 'id' => 'saswp_qa_question_author_url_'.$schema_id,
+ 'type' => 'text',
+ 'default' => $author_url
+ ),
array(
'label' => 'Answer Count',
'id' => 'saswp_qa_answer_count_'.$schema_id,
@@ -10629,6 +10635,324 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
),
);
break;
+
+ case 'VacationRental':
+ $meta_field = array(
+ array(
+ 'label' => 'Additional Type',
+ 'id' => 'saswp_vr_schema_additional_type_'.$schema_id,
+ 'type' => 'select',
+ 'options' => array(
+ 'Apartment' => 'Apartment',
+ 'Bungalow' => 'Bungalow',
+ 'Cabin' => 'Cabin',
+ 'Chalet' => 'Chalet',
+ 'Cottage' => 'Cottage',
+ 'Gite' => 'Gite',
+ 'HolidayVillageRental' => 'HolidayVillageRental',
+ 'House' => 'House',
+ 'Villa' => 'Villa',
+ 'VacationRental' => 'VacationRental'
+ )
+ ),
+ array(
+ 'label' => 'Brand',
+ 'id' => 'saswp_vr_schema_brand_'.$schema_id,
+ 'type' => 'text',
+ 'attributes' => array(
+ 'placeholder' => 'Brand ID'
+ )
+ ),
+ array(
+ 'label' => 'Contains Place Additional Type',
+ 'id' => 'saswp_vr_schema_cpat_'.$schema_id,
+ 'type' => 'select',
+ 'options' => array(
+ 'EntirePlace' => 'EntirePlace',
+ 'PrivateRoom' => 'PrivateRoom',
+ 'SharedRoom' => 'SharedRoom'
+ )
+ ),
+ array(
+ 'label' => 'Occupancy',
+ 'id' => 'saswp_vr_schema_occupancy_'.$schema_id,
+ 'type' => 'number',
+ 'attributes' => array(
+ 'placeholder' => '4'
+ )
+ ),
+ array(
+ 'label' => 'Floor Size Value',
+ 'id' => 'saswp_vr_schema_floor_value_'.$schema_id,
+ 'type' => 'number',
+ 'attributes' => array(
+ 'placeholder' => '75'
+ )
+ ),
+ array(
+ 'label' => 'Floor Size Unit Code',
+ 'id' => 'saswp_vr_schema_floor_uc_'.$schema_id,
+ 'type' => 'select',
+ 'options' => array(
+ 'FTK' => 'FTK',
+ 'SQFT' => 'SQFT',
+ 'MTK' => 'MTK',
+ 'SQM' => 'SQM'
+ )
+ ),
+ array(
+ 'label' => 'Total Bathrooms',
+ 'id' => 'saswp_vr_schema_total_bathrooms_'.$schema_id,
+ 'type' => 'number',
+ 'attributes' => array(
+ 'placeholder' => '1'
+ )
+ ),
+ array(
+ 'label' => 'Number Of Bedrooms',
+ 'id' => 'saswp_vr_schema_total_bedrooms_'.$schema_id,
+ 'type' => 'number',
+ 'attributes' => array(
+ 'placeholder' => '3'
+ )
+ ),
+ array(
+ 'label' => 'Number Of Rooms',
+ 'id' => 'saswp_vr_schema_total_rooms_'.$schema_id,
+ 'type' => 'number',
+ 'attributes' => array(
+ 'placeholder' => '5'
+ )
+ ),
+ array(
+ 'label' => 'Identifier',
+ 'id' => 'saswp_vr_schema_identifier_'.$schema_id,
+ 'type' => 'text',
+ 'attributes' => array(
+ 'placeholder' => 'Enter Identifier'
+ )
+ ),
+ array(
+ 'label' => 'Latitude',
+ 'id' => 'saswp_vr_schema_latitude_'.$schema_id,
+ 'type' => 'text',
+ 'attributes' => array(
+ 'placeholder' => 'Enter Latitude'
+ )
+ ),
+ array(
+ 'label' => 'longitude',
+ 'id' => 'saswp_vr_schema_longitude_'.$schema_id,
+ 'type' => 'text',
+ 'attributes' => array(
+ 'placeholder' => 'Enter Longitude'
+ )
+ ),
+ array(
+ 'label' => 'Name',
+ 'id' => 'saswp_vr_schema_name_'.$schema_id,
+ 'type' => 'text',
+ 'attributes' => array(
+ 'placeholder' => 'Enter Name'
+ )
+ ),
+ array(
+ 'label' => 'Address Country',
+ 'id' => 'saswp_vr_schema_country_'.$schema_id,
+ 'type' => 'text',
+ 'attributes' => array(
+ 'placeholder' => 'US'
+ )
+ ),
+ array(
+ 'label' => 'Address Locality',
+ 'id' => 'saswp_vr_schema_locality_'.$schema_id,
+ 'type' => 'text',
+ 'attributes' => array(
+ 'placeholder' => 'Mountain View'
+ )
+ ),
+ array(
+ 'label' => 'Address Region',
+ 'id' => 'saswp_vr_schema_region_'.$schema_id,
+ 'type' => 'text',
+ 'attributes' => array(
+ 'placeholder' => 'California'
+ )
+ ),
+ array(
+ 'label' => 'Postal Code',
+ 'id' => 'saswp_vr_schema_p_code_'.$schema_id,
+ 'type' => 'text',
+ 'attributes' => array(
+ 'placeholder' => '94043'
+ )
+ ),
+ array(
+ 'label' => 'Street Address',
+ 'id' => 'saswp_vr_schema_s_address_'.$schema_id,
+ 'type' => 'text',
+ 'attributes' => array(
+ 'placeholder' => '1600 Amphitheatre Pkwy'
+ )
+ ),
+ array(
+ 'label' => 'Checkin Time',
+ 'id' => 'saswp_vr_schema_checkin_time_'.$schema_id,
+ 'type' => 'text',
+ 'attributes' => array(
+ 'placeholder' => '18:00:00+08:00'
+ )
+ ),
+ array(
+ 'label' => 'Checkout Time',
+ 'id' => 'saswp_vr_schema_checkout_time_'.$schema_id,
+ 'type' => 'text',
+ 'attributes' => array(
+ 'placeholder' => '11:00:00+08:00'
+ )
+ ),
+ array(
+ 'label' => 'Description',
+ 'id' => 'saswp_vr_schema_description_'.$schema_id,
+ 'type' => 'text'
+ ),
+ array(
+ 'label' => 'Knows Language',
+ 'id' => 'saswp_vr_schema_knows_language_'.$schema_id,
+ 'type' => 'text'
+ ),
+ array(
+ 'label' => 'Aggregate Rating',
+ 'id' => 'saswp_vr_schema_enable_rating_'.$schema_id,
+ 'type' => 'checkbox',
+ ),
+ array(
+ 'label' => 'Rating Value',
+ 'id' => 'saswp_vr_schema_rating_value_'.$schema_id,
+ 'type' => 'text',
+ ),
+ array(
+ 'label' => 'Rating Count',
+ 'id' => 'saswp_vr_schema_rating_count_'.$schema_id,
+ 'type' => 'text',
+ ),
+ array(
+ 'label' => 'Review Count',
+ 'id' => 'saswp_vr_schema_review_count_'.$schema_id,
+ 'type' => 'text',
+ ),
+ array(
+ 'label' => 'Best rating',
+ 'id' => 'saswp_vr_schema_best_rating_'.$schema_id,
+ 'type' => 'text',
+ )
+ );
+ break;
+
+ case 'LearningResource':
+ $meta_field = array(
+ array(
+ 'label' => 'ID',
+ 'id' => 'saswp_lr_id_'.$schema_id,
+ 'type' => 'text',
+ 'default' => 'LearningResource'
+ ),
+ array(
+ 'label' => 'Name',
+ 'id' => 'saswp_lr_name_'.$schema_id,
+ 'type' => 'text',
+ 'default' => saswp_get_the_title()
+ ),
+ array(
+ 'label' => 'Description',
+ 'id' => 'saswp_lr_description_'.$schema_id,
+ 'type' => 'textarea',
+ 'default' => is_object($post) ? $post->post_excerpt : ''
+ ),
+ array(
+ 'label' => 'Keywords',
+ 'id' => 'saswp_lr_keywords_'.$schema_id,
+ 'type' => 'text',
+ 'default' => saswp_get_the_tags()
+ ),
+ array(
+ 'label' => 'Learning Resource Type',
+ 'id' => 'saswp_lr_lrt_'.$schema_id,
+ 'type' => 'text'
+ ),
+ array(
+ 'label' => 'In Language',
+ 'id' => 'saswp_lr_inlanguage_'.$schema_id,
+ 'type' => 'text',
+ 'default' => get_bloginfo('language'),
+ 'note' => 'Note: If there are ore than one language, separate language list by comma ( , )'
+ ),
+ array(
+ 'label' => 'Date Created',
+ 'id' => 'saswp_lr_date_created_'.$schema_id,
+ 'type' => 'text'
+ ),
+ array(
+ 'label' => 'Date Modified',
+ 'id' => 'saswp_lr_date_modified_'.$schema_id,
+ 'type' => 'text'
+ ),
+ array(
+ 'label' => 'Typical Age Range',
+ 'id' => 'saswp_lr_tar_'.$schema_id,
+ 'type' => 'text'
+ ),
+ array(
+ 'label' => 'Educational Level Name',
+ 'id' => 'saswp_lr_education_level_name_'.$schema_id,
+ 'type' => 'text'
+ ),
+ array(
+ 'label' => 'Educational Level URL',
+ 'id' => 'saswp_lr_education_level_url_'.$schema_id,
+ 'type' => 'text'
+ ),
+ array(
+ 'label' => 'Educational Level Term Set',
+ 'id' => 'saswp_lr_education_level_term_set_'.$schema_id,
+ 'type' => 'text'
+ ),
+ array(
+ 'label' => 'Time Required',
+ 'id' => 'saswp_lr_time_required_'.$schema_id,
+ 'type' => 'text'
+ ),
+ array(
+ 'label' => 'License',
+ 'id' => 'saswp_lr_license_'.$schema_id,
+ 'type' => 'select',
+ 'options' => array(
+ 'All rights reserved' => 'All rights reserved',
+ 'CC BY (Attribution)' => 'CC BY (Attribution)',
+ 'CC BY-SA (Attribution - Share alike)' => 'CC BY-SA (Attribution - Share alike)',
+ 'CC BY-ND (Attribution - No derivative works)' => 'CC BY-ND (Attribution - No derivative works)',
+ 'CC BY-NC (Attribution - No commercial use)' => 'CC BY-NC (Attribution - No commercial use)',
+ 'CC BY-NC-SA (Attribution - No commercial use - Share alike)' => 'CC BY-NC-SA (Attribution - No commercial use - Share alike)',
+ 'CC BY-NC-ND (Attribution - No commercial use - No derivatives works)' => 'CC BY-NC-ND (Attribution - No commercial use - No derivatives works)',
+ 'GNU General Public License (GPL)' => 'GNU General Public License (GPL)',
+ 'GNU Free Documentation License (GFDL)' => 'GNU Free Documentation License (GFDL)',
+ 'Public domain' => 'Public domain',
+ 'Other' => 'Other'
+ )
+ ),
+ array(
+ 'label' => 'Is Accessible For Free',
+ 'id' => 'saswp_lr_time_iaff_'.$schema_id,
+ 'type' => 'select',
+ 'options' => array(
+ 'True' => 'Yes',
+ 'False' => 'No'
+ )
+ ),
+
+ );
+ break;
default:
break;
diff --git a/core/array-list/schemas.php b/core/array-list/schemas.php
index ce694516..85b88314 100644
--- a/core/array-list/schemas.php
+++ b/core/array-list/schemas.php
@@ -8,6 +8,7 @@
'House' => 'House',
'HotelRoom' => 'HotelRoom',
'SingleFamilyResidence' => 'SingleFamilyResidence',
+ 'VacationRental' => 'VacationRental'
),
'CreativeWork' => array(
'Article' => 'Article',
@@ -50,7 +51,8 @@
'WebPage' => 'WebPage',
'ItemPage' => 'ItemPage',
'MedicalWebPage' => 'MedicalWebPage',
- 'BreadCrumbs' => 'BreadCrumbs'
+ 'BreadCrumbs' => 'BreadCrumbs',
+ 'LearningResource' => 'LearningResource'
),
'Event' => array(
'Event' => 'Event',
diff --git a/core/global.php b/core/global.php
index 5c184bda..c0c9c437 100644
--- a/core/global.php
+++ b/core/global.php
@@ -81,6 +81,8 @@
'SpecialAnnouncement',
'Service',
'TouristTrip',
+ 'VacationRental',
+ 'LearningResource'
);
$translation_labels = array(
'translation-pros' => 'Pros',
diff --git a/modules/rating-box/frontend.php b/modules/rating-box/frontend.php
index 94ea61ee..44f62818 100644
--- a/modules/rating-box/frontend.php
+++ b/modules/rating-box/frontend.php
@@ -289,26 +289,62 @@ public function saswp_rating_box_custom_style()
{
global $sd_data;
if(saswp_global_option() && isset($sd_data['saswp-review-module']) && $sd_data['saswp-review-module'] == 1){
- // if(isset($sd_data['saswp-rating-module-css-app']) && $sd_data['saswp-rating-module-css-app'] == 1){
- $custom_css = ".saswp-rb-hd span, .saswp-rvw-sm span{
- background-color: {$sd_data['saswp-rbcc-review-bg-color']};
- color: {$sd_data['saswp-rbcc-review-f-color']};
- font-size: {$sd_data['saswp-rbcc-review-f-size']}{$sd_data['saswp-rbcc-review-f-unit']};
- }
- .saswp-rb-rif{
- color: {$sd_data['saswp-rbcc-if-color']};
- font-size: {$sd_data['saswp-rbcc-if-f-size']}{$sd_data['saswp-rbcc-if-f-unit']};
- }
- .saswp-rvw-str .saswp_star_color svg, .saswp-rvw-str .saswp_star_color_gray svg, .saswp-rvw-str .saswp_half_star_color svg{
- width: {$sd_data['saswp-rbcc-stars-f-size']}px;
- }
- .saswp-rvw-fs{
- color: {$sd_data['saswp-rbcc-ar-color']};
- font-size: {$sd_data['saswp-rbcc-ar-f-size']}{$sd_data['saswp-rbcc-ar-f-unit']};
- }
- ";
- wp_add_inline_style( 'saswp-style', $custom_css );
- // }
+
+ $bg_review_color = '#000'; $review_f_color = '#fff'; $review_f_size = '15'; $review_f_unit = 'px';
+ $review_if_color = '#000'; $review_if_size = '18'; $review_if_unit = 'px';
+ $stars_size = '18px';
+ $review_ar_color = '#000'; $review_ar_size = '48'; $review_ar_unit = 'px';
+ if(isset($sd_data['saswp-rbcc-review-bg-color'])){
+ $bg_review_color = esc_attr($sd_data['saswp-rbcc-review-bg-color']);
+ }
+ if(isset($sd_data['saswp-rbcc-review-f-color'])){
+ $review_f_color = esc_attr($sd_data['saswp-rbcc-review-f-color']);
+ }
+ if(isset($sd_data['saswp-rbcc-review-f-size'])){
+ $review_f_size = esc_attr($sd_data['saswp-rbcc-review-f-size']);
+ }
+ if(isset($sd_data['saswp-rbcc-review-f-unit'])){
+ $review_f_unit = esc_attr($sd_data['saswp-rbcc-review-f-unit']);
+ }
+ if(isset($sd_data['saswp-rbcc-if-color'])){
+ $review_if_color = esc_attr($sd_data['saswp-rbcc-if-color']);
+ }
+ if(isset($sd_data['saswp-rbcc-if-f-size'])){
+ $review_if_size = esc_attr($sd_data['saswp-rbcc-if-f-size']);
+ }
+ if(isset($sd_data['saswp-rbcc-if-f-unit'])){
+ $review_if_unit = esc_attr($sd_data['saswp-rbcc-if-f-unit']);
+ }
+ if(isset($sd_data['saswp-rbcc-stars-f-size'])){
+ $stars_size = esc_attr($sd_data['saswp-rbcc-stars-f-size'].'px');
+ }
+ if(isset($sd_data['saswp-rbcc-ar-color'])){
+ $review_ar_color = esc_attr($sd_data['saswp-rbcc-ar-color']);
+ }
+ if(isset($sd_data['saswp-rbcc-ar-f-size'])){
+ $review_ar_size = esc_attr($sd_data['saswp-rbcc-ar-f-size']);
+ }
+ if(isset($sd_data['saswp-rbcc-ar-f-unit'])){
+ $review_ar_unit = esc_attr($sd_data['saswp-rbcc-ar-f-unit']);
+ }
+ $custom_css = ".saswp-rb-hd span, .saswp-rvw-sm span{
+ background-color: {$bg_review_color};
+ color: {$review_f_color};
+ font-size: {$review_f_size}{$review_f_unit};
+ }
+ .saswp-rb-rif{
+ color: {$review_if_color};
+ font-size: {$review_if_size}{$review_if_unit};
+ }
+ .saswp-rvw-str .saswp_star_color svg, .saswp-rvw-str .saswp_star_color_gray svg, .saswp-rvw-str .saswp_half_star_color svg{
+ width: {$stars_size};
+ }
+ .saswp-rvw-fs{
+ color: {$review_ar_color};
+ font-size: {$review_ar_size}{$review_ar_unit};
+ }
+ ";
+ wp_add_inline_style( 'saswp-style', $custom_css );
}
}
@@ -321,14 +357,12 @@ public function saswp_rating_box_custom_script()
{
global $sd_data;
if(saswp_global_option() && isset($sd_data['saswp-review-module']) && $sd_data['saswp-review-module'] == 1){
- // if(isset($sd_data['saswp-rating-module-css-app']) && $sd_data['saswp-rating-module-css-app'] == 1){
?>
';
}
}else{
- $regex = '/