Version Description
(26 Mar 2020) =
- Fixed: When we update the page it is getting redirect to the warning url when schema is activated #871
- Fixed: hreview and other microdata cleanup #877
- Fixed: Add property(modify schema output) does not load properties. #872
- Fixed: The review count and the review comment showing incorrect in collection panel #855
- Fixed: If job post schema has been expired than its markup should not be shown #858
- Fixed: How to module Gutenberg renders the markup instead of the link #857
- Fixed: In review schema type when we try to modify this schema on the post the default values in it are also in blank #867
- Fixed: Validation errors: The mandatory tag 'link rel=canonical' is missing or incorrect due to schema #848
- Fixed: Fatal error: require_once(): Failed opening required '/wp-content/plugins/wp-seopress/inc/functions/options-titles-metas.php #892
- Added: Reviews for Schema in Premium Features section #837
- Added: Estimate Cost fields in gutenberg How-to module. #835
Download this release
Release Info
Developer | magazine3 |
Plugin | Schema & Structured Data for WP & AMP |
Version | 1.9.29 |
Comparing to | |
See all releases |
Code changes from version 1.9.28 to 1.9.29
- admin_section/common-function.php +23 -11
- admin_section/fields-generator.php +1 -1
- admin_section/images/customer-review.png +0 -0
- admin_section/js/functions-list.js +1 -1
- admin_section/js/functions-list.min.js +1 -1
- admin_section/settings.php +30 -0
- core/3rd-party/aqua_resizer.php +1 -1
- core/array-list/local-sub-business.php +1 -2
- core/array-list/schema-properties.php +14 -6
- core/global.php +2 -2
- modules/divi-builder/extension.php +1 -1
- modules/divi-builder/includes/Extension.php +1 -2
- modules/divi-builder/includes/loader.php +1 -1
- modules/divi-builder/includes/modules/FaqBlock/FaqBlock.php +1 -2
- modules/divi-builder/includes/modules/FaqBlockChild/FaqBlockChild.php +1 -2
- modules/elementor/elementor-loader.php +1 -2
- modules/gutenberg/assets/blocks/how-to.js +71 -1
- modules/gutenberg/includes/class-gutenberg.php +25 -3
- modules/gutenberg/includes/render.php +1 -1
- modules/gutenberg/includes/service.php +1 -4
- modules/rating-box/backend.php +1 -1
- modules/reviews/reviews_admin.php +1 -1
- modules/reviews/reviews_service.php +1 -2
- modules/reviews/reviews_widget.php +0 -1
- output/compatibility.php +1 -2
- output/function.php +3 -4
- output/gutenberg.php +8 -2
- output/markup.php +6 -4
- output/output.php +1 -1
- output/service.php +3 -0
- readme.txt +16 -1
- structured-data-for-wp.php +2 -2
- view/common.php +3 -3
- view/help.php +1 -2
- view/paywall.php +2 -6
- view/post_specific.php +1 -3
- view/schema_type.php +2 -4
admin_section/common-function.php
CHANGED
@@ -1903,7 +1903,8 @@ if ( ! defined('ABSPATH') ) exit;
|
|
1903 |
|
1904 |
if(is_object($post)){
|
1905 |
$content = get_post_field('post_content', $post->ID);
|
1906 |
-
$content = wp_strip_all_tags(strip_shortcodes($content));
|
|
|
1907 |
}
|
1908 |
|
1909 |
return apply_filters('saswp_the_content' ,$content);
|
@@ -2115,11 +2116,11 @@ if ( ! defined('ABSPATH') ) exit;
|
|
2115 |
if(saswp_remove_warnings($sd_data, 'saswp-seo-press', 'saswp_string') == 1){
|
2116 |
|
2117 |
if(!is_admin()){
|
2118 |
-
|
2119 |
-
require_once ( WP_PLUGIN_DIR. '/wp-seopress/inc/functions/options-titles-metas.php');
|
2120 |
-
|
2121 |
if(function_exists('seopress_titles_the_title') && seopress_titles_the_title() !=''){
|
2122 |
|
|
|
|
|
2123 |
$c_title = seopress_titles_the_title();
|
2124 |
if($c_title){
|
2125 |
$title = $c_title;
|
@@ -2881,13 +2882,24 @@ function saswp_current_user_allowed(){
|
|
2881 |
|
2882 |
$currentUser = wp_get_current_user();
|
2883 |
$saswp_roles = isset($sd_data['saswp-role-based-access']) ? $sd_data['saswp-role-based-access'] : array('administrator');
|
2884 |
-
|
2885 |
-
|
2886 |
-
|
2887 |
-
|
2888 |
-
|
2889 |
-
|
2890 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2891 |
|
2892 |
}
|
2893 |
|
1903 |
|
1904 |
if(is_object($post)){
|
1905 |
$content = get_post_field('post_content', $post->ID);
|
1906 |
+
$content = wp_strip_all_tags(strip_shortcodes($content));
|
1907 |
+
$content = preg_replace('/[^A-Za-z0-9\-]/', ' ', $content); // Removes special chars.
|
1908 |
}
|
1909 |
|
1910 |
return apply_filters('saswp_the_content' ,$content);
|
2116 |
if(saswp_remove_warnings($sd_data, 'saswp-seo-press', 'saswp_string') == 1){
|
2117 |
|
2118 |
if(!is_admin()){
|
2119 |
+
|
|
|
|
|
2120 |
if(function_exists('seopress_titles_the_title') && seopress_titles_the_title() !=''){
|
2121 |
|
2122 |
+
require_once ( WP_PLUGIN_DIR. '/wp-seopress/inc/functions/options-titles-metas.php');
|
2123 |
+
|
2124 |
$c_title = seopress_titles_the_title();
|
2125 |
if($c_title){
|
2126 |
$title = $c_title;
|
2882 |
|
2883 |
$currentUser = wp_get_current_user();
|
2884 |
$saswp_roles = isset($sd_data['saswp-role-based-access']) ? $sd_data['saswp-role-based-access'] : array('administrator');
|
2885 |
+
|
2886 |
+
if($currentUser){
|
2887 |
+
|
2888 |
+
if($currentUser->roles){
|
2889 |
+
$currentuserrole = (array) $currentUser->roles;
|
2890 |
+
}else{
|
2891 |
+
if($currentUser->caps['administrator']){
|
2892 |
+
$currentuserrole = array('administrator');
|
2893 |
+
}
|
2894 |
+
}
|
2895 |
+
|
2896 |
+
$hasrole = array_intersect( $currentuserrole, $saswp_roles );
|
2897 |
+
|
2898 |
+
if( !empty($hasrole)){
|
2899 |
+
return $hasrole[0];
|
2900 |
+
}
|
2901 |
+
|
2902 |
+
}
|
2903 |
|
2904 |
}
|
2905 |
|
admin_section/fields-generator.php
CHANGED
@@ -637,4 +637,4 @@ class saswp_fields_generator {
|
|
637 |
|
638 |
echo '<div><div class="saswp-settings-list"><ul>' . wp_kses($output, $allowed_html) . '</ul></div></div>';
|
639 |
}
|
640 |
-
}
|
637 |
|
638 |
echo '<div><div class="saswp-settings-list"><ul>' . wp_kses($output, $allowed_html) . '</ul></div></div>';
|
639 |
}
|
640 |
+
}
|
admin_section/images/customer-review.png
ADDED
Binary file
|
admin_section/js/functions-list.js
CHANGED
@@ -504,7 +504,7 @@
|
|
504 |
var platform_list = '';
|
505 |
|
506 |
platform_list += '<div class="cancel-btn">';
|
507 |
-
platform_list += '<span>'+jQuery("#saswp-plaftorm-list option[value="+key+"]").text()+'</span>';
|
508 |
platform_list += '<input type="hidden" name="saswp_platform_ids['+key+']" value="'+rvcount+'">';
|
509 |
platform_list += '<a platform-id="'+key+'" class="button button-default saswp-remove-platform"></a>';
|
510 |
platform_list += '</div>';
|
504 |
var platform_list = '';
|
505 |
|
506 |
platform_list += '<div class="cancel-btn">';
|
507 |
+
platform_list += '<span>'+jQuery("#saswp-plaftorm-list option[value="+key+"]").text()+'</span><span>('+rvcount+')</span>';
|
508 |
platform_list += '<input type="hidden" name="saswp_platform_ids['+key+']" value="'+rvcount+'">';
|
509 |
platform_list += '<a platform-id="'+key+'" class="button button-default saswp-remove-platform"></a>';
|
510 |
platform_list += '</div>';
|
admin_section/js/functions-list.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var saswp_meta_list=[],saswp_meta_fields=[],saswp_meta_list_fields=[],saswp_taxonomy_term=[],saswp_collection=[],saswp_total_collection=[],saswp_total_reviews=[],saswp_coll_json=null,saswp_grid_page=1;function saswp_convert_datetostring(s){var e={};if(s){var a=new Date(s);e={time:a.toLocaleTimeString(),date:a.toLocaleDateString()}}else e={time:"",date:""};return e}function saswp_taxonomy_term_html(s,e){var a="";return a+="<td>",a+='<select name="saswp_taxonomy_term['+e+']">',jQuery.each(s,function(s,e){a+='<option value="'+s+'">'+e+"</option>"}),a+="</select>",a+="</td>",a+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>'}function saswp_enable_rating_review(){var s="";jQuery("select#schema_type option:selected").val()&&(s=jQuery("select#schema_type option:selected").val()),jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")&&(s=jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")),s&&jQuery(".saswp-enable-rating-review-"+s.toLowerCase()).change(function(){jQuery(this).is(":checked")?jQuery(this).parent().parent().siblings(".saswp-rating-review-"+s.toLowerCase()).show():jQuery(this).parent().parent().siblings(".saswp-rating-review-"+s.toLowerCase()).hide()}).change()}function getParameterByName(s,e){e||(e=window.location.href),s=s.replace(/[\[\]]/g,"\\$&");var a=new RegExp("[?&]"+s+"(=([^&#]*)|&|#|$)").exec(e);return a?a[2]?decodeURIComponent(a[2].replace(/\+/g," ")):"":null}function saswpCustomSelect2(){"saswp"!=saswp_localize_data.post_type&&"saswp"!=saswp_localize_data.page_now||"saswp_page_structured_data_options"==saswp_localize_data.page_now||jQuery(".saswp-custom-fields-select2").select2({ajax:{type:"POST",url:ajaxurl,dataType:"json",delay:250,data:function(s){return{saswp_security_nonce:saswp_localize_data.saswp_security_nonce,q:s.term,action:"saswp_get_custom_meta_fields"}},processResults:function(s){return{results:s}},cache:!0},minimumInputLength:2})}function saswp_reviews_datepicker(){jQuery(".saswp-reviews-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"})}function saswp_schema_datepicker(){jQuery(".saswp-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"})}function saswp_schema_timepicker(){jQuery(".saswp-timepicker").timepicker({timeFormat:"H:i:s"})}function saswp_item_reviewed_ajax(s,e,a=null){var t=e.val(),i=saswp_localize_data.post_id,n=jQuery(e).attr("data-id"),p=jQuery(e).attr("post-specific"),r=jQuery(".saswp_modify_this_schema_hidden_"+n).val();append_id=null==a?jQuery("#saswp_specific_"+n):jQuery(".saswp-manual-modification"),jQuery.get(ajaxurl,{action:"saswp_get_item_reviewed_fields",modify_this:r,schema_type:s,schema_id:n,post_specific:p,item:t,post_id:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){jQuery(append_id).find(".saswp-table-create-onajax").remove();var e=jQuery(append_id).find(".saswp-table-create-onload");jQuery.each(e,function(s,e){0!=s&&jQuery(this).remove()}),jQuery(append_id).append(s),saswp_schema_datepicker(),saswp_schema_timepicker()})}function saswp_item_reviewed_call(){jQuery(".saswp-item-reviewed").change(function(s){s.preventDefault();var e="";(jQuery("select#schema_type option:selected").val()&&(e=jQuery("select#schema_type option:selected").val()),jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")&&(e=jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")),"Review"===e)&&saswp_item_reviewed_ajax(e,jQuery(this))}).change()}function saswp_compatibliy_notes(s,e){var a=e.replace("-checkbox",""),t=jQuery("#"+a).next("p").text();s.is(":checked")&&""!==t?jQuery("#"+a).next("p").removeClass("saswp_hide"):1==jQuery("#"+a).next("p").attr("data-id")?jQuery("#"+a).next("p").text("This feature is only available in pro version"):jQuery("#"+a).next("p").addClass("saswp_hide")}function saswp_meta_list_html(s,e,a,t,i,n){var p=t;null==p&&(p=Object.keys(a)[0]);var r="";if(r+='<select class="saswp-custom-meta-list" name="saswp_meta_list_val['+p+']">',jQuery.each(e,function(s,e){r+='<optgroup label="'+e.label+'">',jQuery.each(e["meta-list"],function(s,e){r+='<option value="'+s+'">'+e+"</option>"}),r+="</optgroup>"}),r+="</select>",a){var l=jQuery("select#schema_type option:selected").val(),c="";"Review"==l&&(c=jQuery("select.saswp-item-reivewed-list option:selected").val());var o="<tr>";o+="<td>",o+='<select class="saswp-custom-fields-name">',"Review"==l&&(o+='<optgroup label="Review">',o+='<option value="saswp_review_name">Review Name</option>',o+='<option value="saswp_review_description">Review Description</option>',o+='<option value="saswp_review_author">Review Author</option>',o+='<option value="saswp_review_author_url">Review Author Profile URL</option>',o+='<option value="saswp_review_publisher">Review Publisher</option>',o+='<option value="saswp_review_publisher_url">Review Publisher URL</option>',o+='<option value="saswp_review_rating_value">Review Rating Value</option>',o+='<option value="saswp_review_date_published">Review Published Date</option>',o+='<option value="saswp_review_url">Review URL</option>',o+="</optgroup>"),"Review"==l&&(o+='<optgroup label="'+c+'">'),jQuery.each(a,function(s,e){o+='<option value="'+s+'">'+e+"</option>"}),"Review"==l&&(o+="</optgroup>"),o+="</select>",o+="</td>",o+="<td>",o+=r,o+="</td>",o+='<td></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td>',o+="</tr>",jQuery(".saswp-custom-fields-table").append(o),null!=s&&s.removeClass("updating-message")}else jQuery(i).html(r),null!=s&&s.removeClass("updating-message")}function saswp_get_meta_list(s,e,a,t,i,n){saswp_meta_list[e]?saswp_meta_list_html(s,saswp_meta_list[e],a,i,t,n):jQuery.get(ajaxurl,{action:"saswp_get_meta_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(p){saswp_meta_list[e]=p[e],saswp_meta_list_html(s,saswp_meta_list[e],a,i,t,n)},"json")}function saswp_get_post_specific_schema_fields(s,e,a,t,i,n,p){if(saswp_meta_fields[n]){var r=saswp_fields_html_generator(e,i,n,t,saswp_meta_fields[n]);r&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(r),saswp_schema_datepicker(),saswp_schema_timepicker(),s.removeClass("updating-message"))}else jQuery.get(ajaxurl,{action:"saswp_get_schema_dynamic_fields_ajax",schema_id:i,schema_type:p,meta_name:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){saswp_meta_fields[n]=a;var p=saswp_fields_html_generator(e,i,n,t,a);p&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(p),saswp_schema_datepicker(),saswp_schema_timepicker(),s.removeClass("updating-message"))},"json")}function saswp_fields_html_generator(s,e,a,t,i){var n="";return n+='<div class="saswp-'+t+'-table-div saswp-dynamic-properties" data-id="'+s+'"><a class="saswp-table-close">X</a><table class="form-table saswp-'+t+'-table">',jQuery.each(i,function(t,i){var p="";switch((i.name.indexOf("published_date")>-1||i.name.indexOf("date_created")>-1||i.name.indexOf("created_date")>-1||i.name.indexOf("modified_date")>-1||i.name.indexOf("date_published")>-1||i.name.indexOf("date_modified")>-1)&&(p="saswp-datepicker-picker"),i.type){case"number":case"text":n+="<tr><th>"+i.label+'</th><td><input class="'+p+'" style="width:100%" type="'+i.type+'" id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']"></td></tr>';break;case"textarea":n+="<tr><th>"+i.label+'</th><td><textarea style="width: 100%" id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']" rows="5"></textarea></td></tr>';break;case"select":var r="";jQuery.each(i.options,function(s,e){r+='<option value="'+s+'">'+e+"</option>"}),n+="<tr><th>"+i.label+'</th><td><select id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']">'+r+"</select></td></tr>";break;case"media":n+="<tr><th>"+i.label+'</th><td><fieldset><input style="width:80%" type="text" id="'+i.name+"_"+s+"_"+e+'" name="'+i.name+"_"+s+"_"+e+'"><input type="hidden" data-id="'+i.name+"_"+s+"_"+e+'_id" name="'+a+e+"["+s+"]["+i.name+'_id]" id="'+i.name+"_"+s+"_"+e+'_id"><input data-id="media" style="width: 19%" class="button" id="'+i.name+"_"+s+"_"+e+'_button" name="'+i.name+"_"+s+"_"+e+'_button" type="button" value="Upload"><div class="saswp_image_div_'+i.name+"_"+s+"_"+e+'"></div></fieldset></td></tr>'}}),n+="</table></div>"}function saswp_create_total_collection(){var s="";for(var e in saswp_total_collection=[],saswp_collection)saswp_collection[e]&&(jQuery.each(saswp_collection[e],function(s,e){saswp_total_collection.push(e)}),s+=saswp_function_added_platform(e,saswp_collection[e].length));jQuery(".saswp-platform-added-list").html(""),jQuery(".saswp-platform-added-list").append(s)}function saswp_create_rating_html_by_value(s){var e="";e+='<div class="saswp-rvw-str">';for(var a=0;a<5;a++)if(s>a){var t=s.split(".");t[1]?a<t[0]?e+='<span class="str-ic"></span>':e+='<span class="half-str"></span>':e+='<span class="str-ic"></span>'}else e+='<span class="df-clr"></span>';return e+="</div>"}function saswpChunkArray(s,e){for(var a=JSON.parse(JSON.stringify(s)),t=[];a.length;)t.push(a.splice(0,e));return t}function saswp_function_added_platform(s,e){var a="";return a+='<div class="cancel-btn">',a+="<span>"+jQuery("#saswp-plaftorm-list option[value="+s+"]").text()+"</span>",a+='<input type="hidden" name="saswp_platform_ids['+s+']" value="'+e+'">',a+='<a platform-id="'+s+'" class="button button-default saswp-remove-platform"></a>',a+="</div>"}function saswpCollectionSlider(){jQuery(".saswp-cs").each(function(){var s=jQuery(this),e=s.find(".saswp-sic");function a(){var s=0;jQuery(e).find(".saswp-si").each(function(){s+=jQuery(this).outerWidth()}),e.width(s)}function t(){if(jQuery(".saswp-si.saswp-active").length>0){var s=e.find(".saswp-si.saswp-active").offset().left-e.offset().left;e.css({transform:"translate( -"+s+"px, 0px)"})}}0==e.find(".saswp-si.saswp-active").length&&e.find(".saswp-si").first().addClass("saswp-active"),a(),t(),function(){var a=e.find(".saswp-si.saswp-active").index(),t=e.find(".saswp-si").length;for(i=0;i<t;i++)s.find(".saswp-slider-dots").append("<div class='saswp-dot'></div>");s.find(".saswp-slider-dots").find(".saswp-dot").eq(a).addClass("saswp-active")}(),jQuery(document).ready(function(){a(),t()}),jQuery(window).resize(function(){a(),t()});var n=s.find(".saswp-slider-controls").find(".saswp-slider-next-btn"),p=s.find(".saswp-slider-controls").find(".saswp-slider-prev-btn");n.on("click",function(a){a.preventDefault(),function(){var a=e.find(".saswp-si.saswp-active").index(),t=0;t=a+1>e.find(".saswp-si").length-1?0:a+1;var i=e.find(".saswp-si").eq(t),n=e.offset().left,p=i.offset().left-n;e.find(".saswp-si.saswp-active").removeClass("saswp-active"),i.addClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").removeClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").eq(t).addClass("saswp-active"),e.css({transform:"translate( -"+p+"px, 0px)"})}()}),p.on("click",function(a){a.preventDefault(),function(){var a=e.find(".saswp-si.saswp-active").index(),t=e.find(".saswp-si").length,i=0;i=a-1<0?t-1:a-1;var n=e.find(".saswp-si").eq(i),p=e.offset().left,r=n.offset().left-p;e.find(".saswp-si.saswp-active").removeClass("saswp-active"),n.addClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").removeClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").eq(i).addClass("saswp-active"),e.css({transform:"translate( -"+r+"px, 0px)"})}()}),s.find(".saswp-slider-dots").find(".saswp-dot").on("click",function(a){var t=jQuery(this).index(),i=e.find(".saswp-si").eq(t).offset().left-e.offset().left;e.find(".saswp-si.saswp-active").removeClass("saswp-active"),e.find(".saswp-si").eq(t).addClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").removeClass("saswp-active"),jQuery(this).addClass("saswp-active"),e.css({transform:"translate( -"+i+"px, 0px)"})})})}function saswp_review_desing_for_slider(s){var e=saswp_convert_datetostring(s.saswp_review_date),a="";return a+='<div class="saswp-r2-sli">',a+='<div class="saswp-r2-b">',a+='<div class="saswp-r2-q">',a+='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" width="95.333px" height="95.332px" viewBox="0 0 95.333 95.332" style="enable-background:new 0 0 95.333 95.332;" xml:space="preserve"><path d="M30.512,43.939c-2.348-0.676-4.696-1.019-6.98-1.019c-3.527,0-6.47,0.806-8.752,1.793 c2.2-8.054,7.485-21.951,18.013-23.516c0.975-0.145,1.774-0.85,2.04-1.799l2.301-8.23c0.194-0.696,0.079-1.441-0.318-2.045 s-1.035-1.007-1.75-1.105c-0.777-0.106-1.569-0.16-2.354-0.16c-12.637,0-25.152,13.19-30.433,32.076 c-3.1,11.08-4.009,27.738,3.627,38.223c4.273,5.867,10.507,9,18.529,9.313c0.033,0.001,0.065,0.002,0.098,0.002 c9.898,0,18.675-6.666,21.345-16.209c1.595-5.705,0.874-11.688-2.032-16.851C40.971,49.307,36.236,45.586,30.512,43.939z"></path><path d="M92.471,54.413c-2.875-5.106-7.61-8.827-13.334-10.474c-2.348-0.676-4.696-1.019-6.979-1.019 c-3.527,0-6.471,0.806-8.753,1.793c2.2-8.054,7.485-21.951,18.014-23.516c0.975-0.145,1.773-0.85,2.04-1.799l2.301-8.23 c0.194-0.696,0.079-1.441-0.318-2.045c-0.396-0.604-1.034-1.007-1.75-1.105c-0.776-0.106-1.568-0.16-2.354-0.16 c-12.637,0-25.152,13.19-30.434,32.076c-3.099,11.08-4.008,27.738,3.629,38.225c4.272,5.866,10.507,9,18.528,9.312 c0.033,0.001,0.065,0.002,0.099,0.002c9.897,0,18.675-6.666,21.345-16.209C96.098,65.559,95.376,59.575,92.471,54.413z"></path></svg>',a+="</div>",a+='<div class="saswp-rc-cnt">',a+="<p>",a+=s.saswp_review_text,a+="</p>",a+="</div>",a+='<div class="saswp-r2-strs">',a+='<span class="saswp-r2-s">',a+=saswp_create_rating_html_by_value(s.saswp_review_rating),a+="</span>",a+="</div>",a+="</div>",a+='<div class="saswp-rc">',a+='<div class="saswp-rc-a">',a+='<img src="'+s.saswp_reviewer_image+'"/>',a+='<div class="saswp-rc-nm">',a+='<a href="#">'+s.saswp_reviewer_name+"</a>",a+='<span class="saswp-rc-dt">'+e.date+"</span>",a+="</div>",a+='<div class="saswp-rc-lg">',a+='<img src="'+s.saswp_review_platform_icon+'"/>',a+="</div>",a+="</div>",a+="</div>",a+="</div>"}function saswp_create_collection_slider(s,e,a){var t="";if(saswp_total_collection.length>0){if(t+="slider"==s?'<div class="saswp-cst">':'<div class="saswp-cct">',t+='<div class="saswp-cs">',t+='<div class="saswp-sic">',"slider"==s&&jQuery.each(saswp_total_collection,function(s,e){t+='<div class="saswp-si">',t+=saswp_review_desing_for_slider(e),t+="</div>"}),"carousel"==s){var i=saswpChunkArray(saswp_total_collection,3);i&&jQuery.each(i,function(s,e){t+='<div class="saswp-si">',jQuery.each(e,function(s,e){t+=saswp_review_desing_for_slider(e)}),t+="</div>"})}t+="</div>",e&&(t+='<div class="saswp-slider-controls">',t+='<a href="#" class="saswp-slider-prev-btn"></a>',t+='<a href="#" class="saswp-slider-next-btn"></a>',t+="</div>"),a&&(t+='<div class="saswp-slider-dots">',t+="</div>"),t+="</div>",t+="</div>"}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(t),saswpCollectionSlider()}function saswp_create_collection_badge(){var s="";if(saswp_total_collection.length>0){for(var e in s+='<div class="saswp-rd3-warp">',s+="<ul>",saswp_collection){var a="",t="",i=0,n=0,p=1;jQuery.each(saswp_collection[e],function(s,e){a=e.saswp_review_platform_icon,t=e.saswp_review_platform_name,n+=parseFloat(e.saswp_review_rating),i++}),n>0&&(p=n/i),saswp_collection[e]&&(s+="<li>",s+='<a href="#">',s+='<div class="saswp-r3-lg">',s+="<span>",s+='<img src="'+a+'"/>',s+="</span>",s+='<span class="saswp-r3-tlt">'+t+'</span">',s+="</div>",s+='<div class="saswp-r3-rtng">',s+='<div class="saswp-r3-rtxt">',s+='<span class="saswp-r3-num">',s+=p.toFixed(1),s+="</span>",s+='<span class="saswp-stars">',s+=saswp_create_rating_html_by_value(p.toString()),s+="</span>",s+="</div>",s+='<span class="saswp-r3-brv">',s+="Based on "+i+" Reviews",s+="</span>",s+="</div>",s+="</a>",s+="</li>")}s+="</ul>",s+="</div>"}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(s)}function saswp_create_collection_popup(){var s="",e="";if(saswp_total_collection.length>0){var a=0,t=0,i=1;jQuery.each(saswp_total_collection,function(s,i){platform_icon=i.saswp_review_platform_icon,t+=parseFloat(i.saswp_review_rating),a++;var n=saswp_convert_datetostring(i.saswp_review_date);e+="<li>",e+='<div class="saswp-r4-b">',e+='<span class="saswp-r4-str">',e+=saswp_create_rating_html_by_value(i.saswp_review_rating),e+="</span>",e+='<span class="saswp-r4-tx">'+n.date+"</span>",e+="</div>",e+='<div class="saswp-r4-cnt">',e+="<h3>"+i.saswp_reviewer_name+"</h3>",e+="<p>"+i.saswp_review_text+"</p>",e+="</div>",e+="</li>"}),t>0&&(i=t/a),a>0&&(s+='<div id="saswp-sticky-review">',s+='<div class="saswp-open-class saswp-popup-btn">',s+='<div class="saswp-opn-cls-btn">',s+='<div class="saswp-onclick-hide">',s+="<span>",s+=saswp_create_rating_html_by_value(i.toString()),s+="</span>",s+='<span class="saswp-r4-rnm">'+i.toFixed(1)+" from "+a+" reviews</span>",s+="</div>",s+='<div class="saswp-onclick-show">',s+="<span>Ratings and reviews</span>",s+='<span class="saswp-mines"></span>',s+="</div>",s+="</div>",s+='<div id="saswp-reviews-cntn">',s+='<div class="saswp-r4-info">',s+="<ul>",s+='<li class="saswp-r4-r">',s+="<span>",s+=saswp_create_rating_html_by_value(i.toString()),s+="</span>",s+='<span class="saswp-r4-rnm">'+i.toFixed(1)+" from "+a+" reviews</span>",s+="</li>",s+=e,s+="</ul>",s+="</div>",s+="</div>",s+="</div>",s+="</div>")}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(s)}function saswp_create_collection_fomo(s,e){var a="";saswp_total_collection.length>0&&jQuery.each(saswp_total_collection,function(s,e){var t=saswp_convert_datetostring(e.saswp_review_date);a+='<div id="'+s+'" class="saswp-r5">',a+='<div class="saswp-r5-r">',a+='<div class="saswp-r5-lg">',a+="<span>",a+='<img height="70" width="70" src="'+e.saswp_review_platform_icon+'"/>',a+="</span>",a+="</div>",a+='<div class="saswp-r5-rng">',a+=saswp_create_rating_html_by_value(e.saswp_review_rating),a+='<div class="saswp-r5-txrng">',a+="<span>"+e.saswp_review_rating+" Stars</span>",a+="<span>by</span>",a+="<span>"+e.saswp_reviewer_name+"</span>",a+="</div>",a+='<span class="saswp-r5-dt">'+t.date+"</span>",a+="</div>",a+="</div>",a+="</div>"}),jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(a),saswp_fomo_slide(s,e)}function saswp_fomo_slide(s,e){var a=jQuery(".saswp-collection-preview .saswp-r5"),t=a.length,i=0;!function s(){a.eq(i%t).fadeIn(6e3,function(){a.eq(i%t).fadeOut(3e3,s),i++})}()}function saswp_collection_sorting(s){if(saswp_total_collection.length>0)switch(s){case"lowest":saswp_total_collection.sort(function(s,e){return s.saswp_review_rating-e.saswp_review_rating});break;case"highest":saswp_total_collection.sort(function(s,e){return s.saswp_review_rating-e.saswp_review_rating}),saswp_total_collection.reverse();break;case"newest":case"recent":saswp_total_collection.sort(function(s,e){return new Date(s.saswp_review_date)-new Date(e.saswp_review_date)}),saswp_total_collection.reverse();break;case"oldest":saswp_total_collection.sort(function(s,e){return new Date(s.saswp_review_date)-new Date(e.saswp_review_date)});break;case"random":saswp_total_collection.sort(function(s,e){return.5-Math.random()})}}function saswp_collection_total_reviews_id(){if(saswp_total_collection.length>0){saswp_total_reviews=[],jQuery.each(saswp_total_collection,function(s,e){saswp_total_reviews.push(e.saswp_review_id)});var s='<input type="hidden" name="saswp_total_reviews" value="'+JSON.stringify(saswp_total_reviews)+'">';jQuery(".saswp-total-reviews-list").html(""),jQuery(".saswp-total-reviews-list").append(s)}}function saswp_create_collection_grid(s,e,a,t,i){var n="",p="",r=0;if(saswp_total_collection.length>0){r=Math.ceil(saswp_total_collection.length/a),n+='<div class="saswp-r1">';for(var l=1;l<=s;l++)p+=" 1fr";if(s.length>3?n+='<ul style="grid-template-columns:'+p+';overflow-y: scroll;">':n+='<ul style="grid-template-columns:'+p+';overflow-y:hidden;">',saswp_total_collection){var c=saswp_total_collection;e&&a>0&&(c=c.slice(t,i)),jQuery.each(c,function(s,e){var a=saswp_convert_datetostring(e.saswp_review_date);n+="<li>",n+='<div class="saswp-rc">',n+='<div class="saswp-rc-a">',n+='<div class="saswp-r1-aimg">',n+='<img src="'+e.saswp_reviewer_image+'" width="56" height="56"/>',n+="</div>",n+='<div class="saswp-rc-nm">',n+='<a href="#">'+e.saswp_reviewer_name+"</a>",n+=saswp_create_rating_html_by_value(e.saswp_review_rating),a.date&&(n+='<span class="saswp-rc-dt">'+a.date+"</span>"),n+="</div>",n+="</div>",n+='<div class="saswp-rc-lg">',n+='<img src="'+e.saswp_review_platform_icon+'"/>',n+="</div>",n+="</div>",n+='<div class="saswp-rc-cnt">',n+="<p>"+e.saswp_review_text+"</p>",n+="</div>",n+="</li>"})}if(n+="</ul>",r>0&&e){n+='<div class="saswp-grid-pagination">',n+='<a class="saswp-grid-page" data-id="1" href="#">«</a>';for(l=1;l<=r;l++)n+=l==saswp_grid_page?'<a class="active saswp-grid-page" data-id="'+l+'" href="#">'+l+"</a>":'<a class="saswp-grid-page" data-id="'+l+'" href="#">'+l+"</a>";n+='<a class="saswp-grid-page" data-id="'+r+'" href="#">»</a>',n+="</div>"}n+="</div>"}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(n)}function saswp_create_collection_by_design(s,e,a,t,i,n,p,r,l,c,o){switch(s){case"grid":saswp_create_collection_grid(e,r,l,c,o);break;case"gallery":saswp_create_collection_slider(a,t,i);break;case"badge":saswp_create_collection_badge();break;case"popup":saswp_create_collection_popup();break;case"fomo":saswp_create_collection_fomo(n,p)}}function saswp_on_collection_design_change(){var s=jQuery(".saswp-collection-sorting").val(),e=jQuery(".saswp-collection-desing").val(),a=jQuery("#saswp-collection-cols").val(),t=jQuery(".saswp-slider-type").val(),i=jQuery("#saswp_fomo_interval").val(),n=parseInt(jQuery("#saswp-coll-per-page").val()),p=!1,r=0,l=n;if(jQuery("#saswp-coll-pagination").is(":checked")){p=!0;saswp_grid_page>0&&(l=saswp_grid_page*n),r=l-n}if(jQuery("#saswp_gallery_arrow").is(":checked"))var c=!0;else c=!1;if(jQuery("#saswp_gallery_dots").is(":checked"))var o=!0;else o=!1;saswp_create_total_collection(),saswp_collection_sorting(s),saswp_collection_total_reviews_id(),saswp_create_collection_by_design(e,a,t,c,o,i,i,p,n,r,l)}function saswp_get_collection_data(s,e,a=null){jQuery.get(ajaxurl,{action:"saswp_add_to_collection",rvcount:s,platform_id:e,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){if(s.status){var t=s.message;saswp_collection[e]=t,saswp_collection[e]=jQuery.extend(saswp_collection[e],t),saswp_on_collection_design_change()}a&&a.removeClass("updating-message")},"json")}function saswpIsEmail(s){return/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(s)}
|
1 |
+
var saswp_meta_list=[],saswp_meta_fields=[],saswp_meta_list_fields=[],saswp_taxonomy_term=[],saswp_collection=[],saswp_total_collection=[],saswp_total_reviews=[],saswp_coll_json=null,saswp_grid_page=1;function saswp_convert_datetostring(s){var e={};if(s){var a=new Date(s);e={time:a.toLocaleTimeString(),date:a.toLocaleDateString()}}else e={time:"",date:""};return e}function saswp_taxonomy_term_html(s,e){var a="";return a+="<td>",a+='<select name="saswp_taxonomy_term['+e+']">',jQuery.each(s,function(s,e){a+='<option value="'+s+'">'+e+"</option>"}),a+="</select>",a+="</td>",a+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>'}function saswp_enable_rating_review(){var s="";jQuery("select#schema_type option:selected").val()&&(s=jQuery("select#schema_type option:selected").val()),jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")&&(s=jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")),s&&jQuery(".saswp-enable-rating-review-"+s.toLowerCase()).change(function(){jQuery(this).is(":checked")?jQuery(this).parent().parent().siblings(".saswp-rating-review-"+s.toLowerCase()).show():jQuery(this).parent().parent().siblings(".saswp-rating-review-"+s.toLowerCase()).hide()}).change()}function getParameterByName(s,e){e||(e=window.location.href),s=s.replace(/[\[\]]/g,"\\$&");var a=new RegExp("[?&]"+s+"(=([^&#]*)|&|#|$)").exec(e);return a?a[2]?decodeURIComponent(a[2].replace(/\+/g," ")):"":null}function saswpCustomSelect2(){"saswp"!=saswp_localize_data.post_type&&"saswp"!=saswp_localize_data.page_now||"saswp_page_structured_data_options"==saswp_localize_data.page_now||jQuery(".saswp-custom-fields-select2").select2({ajax:{type:"POST",url:ajaxurl,dataType:"json",delay:250,data:function(s){return{saswp_security_nonce:saswp_localize_data.saswp_security_nonce,q:s.term,action:"saswp_get_custom_meta_fields"}},processResults:function(s){return{results:s}},cache:!0},minimumInputLength:2})}function saswp_reviews_datepicker(){jQuery(".saswp-reviews-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"})}function saswp_schema_datepicker(){jQuery(".saswp-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"})}function saswp_schema_timepicker(){jQuery(".saswp-timepicker").timepicker({timeFormat:"H:i:s"})}function saswp_item_reviewed_ajax(s,e,a=null){var t=e.val(),i=saswp_localize_data.post_id,n=jQuery(e).attr("data-id"),p=jQuery(e).attr("post-specific"),r=jQuery(".saswp_modify_this_schema_hidden_"+n).val();append_id=null==a?jQuery("#saswp_specific_"+n):jQuery(".saswp-manual-modification"),jQuery.get(ajaxurl,{action:"saswp_get_item_reviewed_fields",modify_this:r,schema_type:s,schema_id:n,post_specific:p,item:t,post_id:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){jQuery(append_id).find(".saswp-table-create-onajax").remove();var e=jQuery(append_id).find(".saswp-table-create-onload");jQuery.each(e,function(s,e){0!=s&&jQuery(this).remove()}),jQuery(append_id).append(s),saswp_schema_datepicker(),saswp_schema_timepicker()})}function saswp_item_reviewed_call(){jQuery(".saswp-item-reviewed").change(function(s){s.preventDefault();var e="";(jQuery("select#schema_type option:selected").val()&&(e=jQuery("select#schema_type option:selected").val()),jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")&&(e=jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")),"Review"===e)&&saswp_item_reviewed_ajax(e,jQuery(this))}).change()}function saswp_compatibliy_notes(s,e){var a=e.replace("-checkbox",""),t=jQuery("#"+a).next("p").text();s.is(":checked")&&""!==t?jQuery("#"+a).next("p").removeClass("saswp_hide"):1==jQuery("#"+a).next("p").attr("data-id")?jQuery("#"+a).next("p").text("This feature is only available in pro version"):jQuery("#"+a).next("p").addClass("saswp_hide")}function saswp_meta_list_html(s,e,a,t,i,n){var p=t;null==p&&(p=Object.keys(a)[0]);var r="";if(r+='<select class="saswp-custom-meta-list" name="saswp_meta_list_val['+p+']">',jQuery.each(e,function(s,e){r+='<optgroup label="'+e.label+'">',jQuery.each(e["meta-list"],function(s,e){r+='<option value="'+s+'">'+e+"</option>"}),r+="</optgroup>"}),r+="</select>",a){var l=jQuery("select#schema_type option:selected").val(),c="";"Review"==l&&(c=jQuery("select.saswp-item-reivewed-list option:selected").val());var o="<tr>";o+="<td>",o+='<select class="saswp-custom-fields-name">',"Review"==l&&(o+='<optgroup label="Review">',o+='<option value="saswp_review_name">Review Name</option>',o+='<option value="saswp_review_description">Review Description</option>',o+='<option value="saswp_review_author">Review Author</option>',o+='<option value="saswp_review_author_url">Review Author Profile URL</option>',o+='<option value="saswp_review_publisher">Review Publisher</option>',o+='<option value="saswp_review_publisher_url">Review Publisher URL</option>',o+='<option value="saswp_review_rating_value">Review Rating Value</option>',o+='<option value="saswp_review_date_published">Review Published Date</option>',o+='<option value="saswp_review_url">Review URL</option>',o+="</optgroup>"),"Review"==l&&(o+='<optgroup label="'+c+'">'),jQuery.each(a,function(s,e){o+='<option value="'+s+'">'+e+"</option>"}),"Review"==l&&(o+="</optgroup>"),o+="</select>",o+="</td>",o+="<td>",o+=r,o+="</td>",o+='<td></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td>',o+="</tr>",jQuery(".saswp-custom-fields-table").append(o),null!=s&&s.removeClass("updating-message")}else jQuery(i).html(r),null!=s&&s.removeClass("updating-message")}function saswp_get_meta_list(s,e,a,t,i,n){saswp_meta_list[e]?saswp_meta_list_html(s,saswp_meta_list[e],a,i,t,n):jQuery.get(ajaxurl,{action:"saswp_get_meta_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(p){saswp_meta_list[e]=p[e],saswp_meta_list_html(s,saswp_meta_list[e],a,i,t,n)},"json")}function saswp_get_post_specific_schema_fields(s,e,a,t,i,n,p){if(saswp_meta_fields[n]){var r=saswp_fields_html_generator(e,i,n,t,saswp_meta_fields[n]);r&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(r),saswp_schema_datepicker(),saswp_schema_timepicker(),s.removeClass("updating-message"))}else jQuery.get(ajaxurl,{action:"saswp_get_schema_dynamic_fields_ajax",schema_id:i,schema_type:p,meta_name:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){saswp_meta_fields[n]=a;var p=saswp_fields_html_generator(e,i,n,t,a);p&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(p),saswp_schema_datepicker(),saswp_schema_timepicker(),s.removeClass("updating-message"))},"json")}function saswp_fields_html_generator(s,e,a,t,i){var n="";return n+='<div class="saswp-'+t+'-table-div saswp-dynamic-properties" data-id="'+s+'"><a class="saswp-table-close">X</a><table class="form-table saswp-'+t+'-table">',jQuery.each(i,function(t,i){var p="";switch((i.name.indexOf("published_date")>-1||i.name.indexOf("date_created")>-1||i.name.indexOf("created_date")>-1||i.name.indexOf("modified_date")>-1||i.name.indexOf("date_published")>-1||i.name.indexOf("date_modified")>-1)&&(p="saswp-datepicker-picker"),i.type){case"number":case"text":n+="<tr><th>"+i.label+'</th><td><input class="'+p+'" style="width:100%" type="'+i.type+'" id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']"></td></tr>';break;case"textarea":n+="<tr><th>"+i.label+'</th><td><textarea style="width: 100%" id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']" rows="5"></textarea></td></tr>';break;case"select":var r="";jQuery.each(i.options,function(s,e){r+='<option value="'+s+'">'+e+"</option>"}),n+="<tr><th>"+i.label+'</th><td><select id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']">'+r+"</select></td></tr>";break;case"media":n+="<tr><th>"+i.label+'</th><td><fieldset><input style="width:80%" type="text" id="'+i.name+"_"+s+"_"+e+'" name="'+i.name+"_"+s+"_"+e+'"><input type="hidden" data-id="'+i.name+"_"+s+"_"+e+'_id" name="'+a+e+"["+s+"]["+i.name+'_id]" id="'+i.name+"_"+s+"_"+e+'_id"><input data-id="media" style="width: 19%" class="button" id="'+i.name+"_"+s+"_"+e+'_button" name="'+i.name+"_"+s+"_"+e+'_button" type="button" value="Upload"><div class="saswp_image_div_'+i.name+"_"+s+"_"+e+'"></div></fieldset></td></tr>'}}),n+="</table></div>"}function saswp_create_total_collection(){var s="";for(var e in saswp_total_collection=[],saswp_collection)saswp_collection[e]&&(jQuery.each(saswp_collection[e],function(s,e){saswp_total_collection.push(e)}),s+=saswp_function_added_platform(e,saswp_collection[e].length));jQuery(".saswp-platform-added-list").html(""),jQuery(".saswp-platform-added-list").append(s)}function saswp_create_rating_html_by_value(s){var e="";e+='<div class="saswp-rvw-str">';for(var a=0;a<5;a++)if(s>a){var t=s.split(".");t[1]?a<t[0]?e+='<span class="str-ic"></span>':e+='<span class="half-str"></span>':e+='<span class="str-ic"></span>'}else e+='<span class="df-clr"></span>';return e+="</div>"}function saswpChunkArray(s,e){for(var a=JSON.parse(JSON.stringify(s)),t=[];a.length;)t.push(a.splice(0,e));return t}function saswp_function_added_platform(s,e){var a="";return a+='<div class="cancel-btn">',a+="<span>"+jQuery("#saswp-plaftorm-list option[value="+s+"]").text()+"</span><span>("+e+")</span>",a+='<input type="hidden" name="saswp_platform_ids['+s+']" value="'+e+'">',a+='<a platform-id="'+s+'" class="button button-default saswp-remove-platform"></a>',a+="</div>"}function saswpCollectionSlider(){jQuery(".saswp-cs").each(function(){var s=jQuery(this),e=s.find(".saswp-sic");function a(){var s=0;jQuery(e).find(".saswp-si").each(function(){s+=jQuery(this).outerWidth()}),e.width(s)}function t(){if(jQuery(".saswp-si.saswp-active").length>0){var s=e.find(".saswp-si.saswp-active").offset().left-e.offset().left;e.css({transform:"translate( -"+s+"px, 0px)"})}}0==e.find(".saswp-si.saswp-active").length&&e.find(".saswp-si").first().addClass("saswp-active"),a(),t(),function(){var a=e.find(".saswp-si.saswp-active").index(),t=e.find(".saswp-si").length;for(i=0;i<t;i++)s.find(".saswp-slider-dots").append("<div class='saswp-dot'></div>");s.find(".saswp-slider-dots").find(".saswp-dot").eq(a).addClass("saswp-active")}(),jQuery(document).ready(function(){a(),t()}),jQuery(window).resize(function(){a(),t()});var n=s.find(".saswp-slider-controls").find(".saswp-slider-next-btn"),p=s.find(".saswp-slider-controls").find(".saswp-slider-prev-btn");n.on("click",function(a){a.preventDefault(),function(){var a=e.find(".saswp-si.saswp-active").index(),t=0;t=a+1>e.find(".saswp-si").length-1?0:a+1;var i=e.find(".saswp-si").eq(t),n=e.offset().left,p=i.offset().left-n;e.find(".saswp-si.saswp-active").removeClass("saswp-active"),i.addClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").removeClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").eq(t).addClass("saswp-active"),e.css({transform:"translate( -"+p+"px, 0px)"})}()}),p.on("click",function(a){a.preventDefault(),function(){var a=e.find(".saswp-si.saswp-active").index(),t=e.find(".saswp-si").length,i=0;i=a-1<0?t-1:a-1;var n=e.find(".saswp-si").eq(i),p=e.offset().left,r=n.offset().left-p;e.find(".saswp-si.saswp-active").removeClass("saswp-active"),n.addClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").removeClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").eq(i).addClass("saswp-active"),e.css({transform:"translate( -"+r+"px, 0px)"})}()}),s.find(".saswp-slider-dots").find(".saswp-dot").on("click",function(a){var t=jQuery(this).index(),i=e.find(".saswp-si").eq(t).offset().left-e.offset().left;e.find(".saswp-si.saswp-active").removeClass("saswp-active"),e.find(".saswp-si").eq(t).addClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").removeClass("saswp-active"),jQuery(this).addClass("saswp-active"),e.css({transform:"translate( -"+i+"px, 0px)"})})})}function saswp_review_desing_for_slider(s){var e=saswp_convert_datetostring(s.saswp_review_date),a="";return a+='<div class="saswp-r2-sli">',a+='<div class="saswp-r2-b">',a+='<div class="saswp-r2-q">',a+='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" width="95.333px" height="95.332px" viewBox="0 0 95.333 95.332" style="enable-background:new 0 0 95.333 95.332;" xml:space="preserve"><path d="M30.512,43.939c-2.348-0.676-4.696-1.019-6.98-1.019c-3.527,0-6.47,0.806-8.752,1.793 c2.2-8.054,7.485-21.951,18.013-23.516c0.975-0.145,1.774-0.85,2.04-1.799l2.301-8.23c0.194-0.696,0.079-1.441-0.318-2.045 s-1.035-1.007-1.75-1.105c-0.777-0.106-1.569-0.16-2.354-0.16c-12.637,0-25.152,13.19-30.433,32.076 c-3.1,11.08-4.009,27.738,3.627,38.223c4.273,5.867,10.507,9,18.529,9.313c0.033,0.001,0.065,0.002,0.098,0.002 c9.898,0,18.675-6.666,21.345-16.209c1.595-5.705,0.874-11.688-2.032-16.851C40.971,49.307,36.236,45.586,30.512,43.939z"></path><path d="M92.471,54.413c-2.875-5.106-7.61-8.827-13.334-10.474c-2.348-0.676-4.696-1.019-6.979-1.019 c-3.527,0-6.471,0.806-8.753,1.793c2.2-8.054,7.485-21.951,18.014-23.516c0.975-0.145,1.773-0.85,2.04-1.799l2.301-8.23 c0.194-0.696,0.079-1.441-0.318-2.045c-0.396-0.604-1.034-1.007-1.75-1.105c-0.776-0.106-1.568-0.16-2.354-0.16 c-12.637,0-25.152,13.19-30.434,32.076c-3.099,11.08-4.008,27.738,3.629,38.225c4.272,5.866,10.507,9,18.528,9.312 c0.033,0.001,0.065,0.002,0.099,0.002c9.897,0,18.675-6.666,21.345-16.209C96.098,65.559,95.376,59.575,92.471,54.413z"></path></svg>',a+="</div>",a+='<div class="saswp-rc-cnt">',a+="<p>",a+=s.saswp_review_text,a+="</p>",a+="</div>",a+='<div class="saswp-r2-strs">',a+='<span class="saswp-r2-s">',a+=saswp_create_rating_html_by_value(s.saswp_review_rating),a+="</span>",a+="</div>",a+="</div>",a+='<div class="saswp-rc">',a+='<div class="saswp-rc-a">',a+='<img src="'+s.saswp_reviewer_image+'"/>',a+='<div class="saswp-rc-nm">',a+='<a href="#">'+s.saswp_reviewer_name+"</a>",a+='<span class="saswp-rc-dt">'+e.date+"</span>",a+="</div>",a+='<div class="saswp-rc-lg">',a+='<img src="'+s.saswp_review_platform_icon+'"/>',a+="</div>",a+="</div>",a+="</div>",a+="</div>"}function saswp_create_collection_slider(s,e,a){var t="";if(saswp_total_collection.length>0){if(t+="slider"==s?'<div class="saswp-cst">':'<div class="saswp-cct">',t+='<div class="saswp-cs">',t+='<div class="saswp-sic">',"slider"==s&&jQuery.each(saswp_total_collection,function(s,e){t+='<div class="saswp-si">',t+=saswp_review_desing_for_slider(e),t+="</div>"}),"carousel"==s){var i=saswpChunkArray(saswp_total_collection,3);i&&jQuery.each(i,function(s,e){t+='<div class="saswp-si">',jQuery.each(e,function(s,e){t+=saswp_review_desing_for_slider(e)}),t+="</div>"})}t+="</div>",e&&(t+='<div class="saswp-slider-controls">',t+='<a href="#" class="saswp-slider-prev-btn"></a>',t+='<a href="#" class="saswp-slider-next-btn"></a>',t+="</div>"),a&&(t+='<div class="saswp-slider-dots">',t+="</div>"),t+="</div>",t+="</div>"}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(t),saswpCollectionSlider()}function saswp_create_collection_badge(){var s="";if(saswp_total_collection.length>0){for(var e in s+='<div class="saswp-rd3-warp">',s+="<ul>",saswp_collection){var a="",t="",i=0,n=0,p=1;jQuery.each(saswp_collection[e],function(s,e){a=e.saswp_review_platform_icon,t=e.saswp_review_platform_name,n+=parseFloat(e.saswp_review_rating),i++}),n>0&&(p=n/i),saswp_collection[e]&&(s+="<li>",s+='<a href="#">',s+='<div class="saswp-r3-lg">',s+="<span>",s+='<img src="'+a+'"/>',s+="</span>",s+='<span class="saswp-r3-tlt">'+t+'</span">',s+="</div>",s+='<div class="saswp-r3-rtng">',s+='<div class="saswp-r3-rtxt">',s+='<span class="saswp-r3-num">',s+=p.toFixed(1),s+="</span>",s+='<span class="saswp-stars">',s+=saswp_create_rating_html_by_value(p.toString()),s+="</span>",s+="</div>",s+='<span class="saswp-r3-brv">',s+="Based on "+i+" Reviews",s+="</span>",s+="</div>",s+="</a>",s+="</li>")}s+="</ul>",s+="</div>"}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(s)}function saswp_create_collection_popup(){var s="",e="";if(saswp_total_collection.length>0){var a=0,t=0,i=1;jQuery.each(saswp_total_collection,function(s,i){platform_icon=i.saswp_review_platform_icon,t+=parseFloat(i.saswp_review_rating),a++;var n=saswp_convert_datetostring(i.saswp_review_date);e+="<li>",e+='<div class="saswp-r4-b">',e+='<span class="saswp-r4-str">',e+=saswp_create_rating_html_by_value(i.saswp_review_rating),e+="</span>",e+='<span class="saswp-r4-tx">'+n.date+"</span>",e+="</div>",e+='<div class="saswp-r4-cnt">',e+="<h3>"+i.saswp_reviewer_name+"</h3>",e+="<p>"+i.saswp_review_text+"</p>",e+="</div>",e+="</li>"}),t>0&&(i=t/a),a>0&&(s+='<div id="saswp-sticky-review">',s+='<div class="saswp-open-class saswp-popup-btn">',s+='<div class="saswp-opn-cls-btn">',s+='<div class="saswp-onclick-hide">',s+="<span>",s+=saswp_create_rating_html_by_value(i.toString()),s+="</span>",s+='<span class="saswp-r4-rnm">'+i.toFixed(1)+" from "+a+" reviews</span>",s+="</div>",s+='<div class="saswp-onclick-show">',s+="<span>Ratings and reviews</span>",s+='<span class="saswp-mines"></span>',s+="</div>",s+="</div>",s+='<div id="saswp-reviews-cntn">',s+='<div class="saswp-r4-info">',s+="<ul>",s+='<li class="saswp-r4-r">',s+="<span>",s+=saswp_create_rating_html_by_value(i.toString()),s+="</span>",s+='<span class="saswp-r4-rnm">'+i.toFixed(1)+" from "+a+" reviews</span>",s+="</li>",s+=e,s+="</ul>",s+="</div>",s+="</div>",s+="</div>",s+="</div>")}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(s)}function saswp_create_collection_fomo(s,e){var a="";saswp_total_collection.length>0&&jQuery.each(saswp_total_collection,function(s,e){var t=saswp_convert_datetostring(e.saswp_review_date);a+='<div id="'+s+'" class="saswp-r5">',a+='<div class="saswp-r5-r">',a+='<div class="saswp-r5-lg">',a+="<span>",a+='<img height="70" width="70" src="'+e.saswp_review_platform_icon+'"/>',a+="</span>",a+="</div>",a+='<div class="saswp-r5-rng">',a+=saswp_create_rating_html_by_value(e.saswp_review_rating),a+='<div class="saswp-r5-txrng">',a+="<span>"+e.saswp_review_rating+" Stars</span>",a+="<span>by</span>",a+="<span>"+e.saswp_reviewer_name+"</span>",a+="</div>",a+='<span class="saswp-r5-dt">'+t.date+"</span>",a+="</div>",a+="</div>",a+="</div>"}),jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(a),saswp_fomo_slide(s,e)}function saswp_fomo_slide(s,e){var a=jQuery(".saswp-collection-preview .saswp-r5"),t=a.length,i=0;!function s(){a.eq(i%t).fadeIn(6e3,function(){a.eq(i%t).fadeOut(3e3,s),i++})}()}function saswp_collection_sorting(s){if(saswp_total_collection.length>0)switch(s){case"lowest":saswp_total_collection.sort(function(s,e){return s.saswp_review_rating-e.saswp_review_rating});break;case"highest":saswp_total_collection.sort(function(s,e){return s.saswp_review_rating-e.saswp_review_rating}),saswp_total_collection.reverse();break;case"newest":case"recent":saswp_total_collection.sort(function(s,e){return new Date(s.saswp_review_date)-new Date(e.saswp_review_date)}),saswp_total_collection.reverse();break;case"oldest":saswp_total_collection.sort(function(s,e){return new Date(s.saswp_review_date)-new Date(e.saswp_review_date)});break;case"random":saswp_total_collection.sort(function(s,e){return.5-Math.random()})}}function saswp_collection_total_reviews_id(){if(saswp_total_collection.length>0){saswp_total_reviews=[],jQuery.each(saswp_total_collection,function(s,e){saswp_total_reviews.push(e.saswp_review_id)});var s='<input type="hidden" name="saswp_total_reviews" value="'+JSON.stringify(saswp_total_reviews)+'">';jQuery(".saswp-total-reviews-list").html(""),jQuery(".saswp-total-reviews-list").append(s)}}function saswp_create_collection_grid(s,e,a,t,i){var n="",p="",r=0;if(saswp_total_collection.length>0){r=Math.ceil(saswp_total_collection.length/a),n+='<div class="saswp-r1">';for(var l=1;l<=s;l++)p+=" 1fr";if(s.length>3?n+='<ul style="grid-template-columns:'+p+';overflow-y: scroll;">':n+='<ul style="grid-template-columns:'+p+';overflow-y:hidden;">',saswp_total_collection){var c=saswp_total_collection;e&&a>0&&(c=c.slice(t,i)),jQuery.each(c,function(s,e){var a=saswp_convert_datetostring(e.saswp_review_date);n+="<li>",n+='<div class="saswp-rc">',n+='<div class="saswp-rc-a">',n+='<div class="saswp-r1-aimg">',n+='<img src="'+e.saswp_reviewer_image+'" width="56" height="56"/>',n+="</div>",n+='<div class="saswp-rc-nm">',n+='<a href="#">'+e.saswp_reviewer_name+"</a>",n+=saswp_create_rating_html_by_value(e.saswp_review_rating),a.date&&(n+='<span class="saswp-rc-dt">'+a.date+"</span>"),n+="</div>",n+="</div>",n+='<div class="saswp-rc-lg">',n+='<img src="'+e.saswp_review_platform_icon+'"/>',n+="</div>",n+="</div>",n+='<div class="saswp-rc-cnt">',n+="<p>"+e.saswp_review_text+"</p>",n+="</div>",n+="</li>"})}if(n+="</ul>",r>0&&e){n+='<div class="saswp-grid-pagination">',n+='<a class="saswp-grid-page" data-id="1" href="#">«</a>';for(l=1;l<=r;l++)n+=l==saswp_grid_page?'<a class="active saswp-grid-page" data-id="'+l+'" href="#">'+l+"</a>":'<a class="saswp-grid-page" data-id="'+l+'" href="#">'+l+"</a>";n+='<a class="saswp-grid-page" data-id="'+r+'" href="#">»</a>',n+="</div>"}n+="</div>"}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(n)}function saswp_create_collection_by_design(s,e,a,t,i,n,p,r,l,c,o){switch(s){case"grid":saswp_create_collection_grid(e,r,l,c,o);break;case"gallery":saswp_create_collection_slider(a,t,i);break;case"badge":saswp_create_collection_badge();break;case"popup":saswp_create_collection_popup();break;case"fomo":saswp_create_collection_fomo(n,p)}}function saswp_on_collection_design_change(){var s=jQuery(".saswp-collection-sorting").val(),e=jQuery(".saswp-collection-desing").val(),a=jQuery("#saswp-collection-cols").val(),t=jQuery(".saswp-slider-type").val(),i=jQuery("#saswp_fomo_interval").val(),n=parseInt(jQuery("#saswp-coll-per-page").val()),p=!1,r=0,l=n;if(jQuery("#saswp-coll-pagination").is(":checked")){p=!0;saswp_grid_page>0&&(l=saswp_grid_page*n),r=l-n}if(jQuery("#saswp_gallery_arrow").is(":checked"))var c=!0;else c=!1;if(jQuery("#saswp_gallery_dots").is(":checked"))var o=!0;else o=!1;saswp_create_total_collection(),saswp_collection_sorting(s),saswp_collection_total_reviews_id(),saswp_create_collection_by_design(e,a,t,c,o,i,i,p,n,r,l)}function saswp_get_collection_data(s,e,a=null){jQuery.get(ajaxurl,{action:"saswp_add_to_collection",rvcount:s,platform_id:e,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){if(s.status){var t=s.message;saswp_collection[e]=t,saswp_collection[e]=jQuery.extend(saswp_collection[e],t),saswp_on_collection_design_change()}a&&a.removeClass("updating-message")},"json")}function saswpIsEmail(s){return/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(s)}
|
admin_section/settings.php
CHANGED
@@ -394,6 +394,36 @@ function saswp_premium_features_callback(){ ?>
|
|
394 |
<div class="saswp-pre-ftrs-wrap">
|
395 |
<ul class="saswp-features-blocks">
|
396 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
397 |
<li>
|
398 |
|
399 |
<?php
|
394 |
<div class="saswp-pre-ftrs-wrap">
|
395 |
<ul class="saswp-features-blocks">
|
396 |
|
397 |
+
<li>
|
398 |
+
|
399 |
+
<?php
|
400 |
+
|
401 |
+
$cooked_active_text = '';
|
402 |
+
|
403 |
+
if(is_plugin_active('reviews-for-schema/reviews-for-schema.php')){
|
404 |
+
$cooked_active_text = '<label class="saswp-sts-txt">Status :<span style="color:green;">Active</span></label>';
|
405 |
+
}else{
|
406 |
+
$cooked_active_text .='<label class="saswp-sts-txt">Status :<span>Inactive</span></label>';
|
407 |
+
$cooked_active_text .='<a target="_blank" href="http://structured-data-for-wp.com/extensions/"><span class="saswp-d-btn">Download</span></a>';
|
408 |
+
}
|
409 |
+
|
410 |
+
?>
|
411 |
+
|
412 |
+
<div class="saswp-features-ele">
|
413 |
+
<div class="saswp-ele-ic" style="background: #509207;">
|
414 |
+
<img src="<?php echo SASWP_PLUGIN_URL; ?>/admin_section/images/customer-review.png">
|
415 |
+
</div>
|
416 |
+
<div class="saswp-ele-tlt">
|
417 |
+
<h3><?php echo esc_html__('Reviews for Schema','schema-and-structured-data-for-wp') ?></h3>
|
418 |
+
<p><?php echo esc_html__('Fetch reviews from 75+ platforms with a single click with proper structured data so you can get the stars in your search engine rankings. It also works for the AMP.','schema-and-structured-data-for-wp') ?></p>
|
419 |
+
</div>
|
420 |
+
</div>
|
421 |
+
<div class="saswp-sts-btn">
|
422 |
+
|
423 |
+
<?php echo $cooked_active_text; ?>
|
424 |
+
|
425 |
+
</div>
|
426 |
+
</li>
|
427 |
<li>
|
428 |
|
429 |
<?php
|
core/3rd-party/aqua_resizer.php
CHANGED
@@ -326,4 +326,4 @@ if(!function_exists('saswp_aq_resize')) {
|
|
326 |
return $aq_resize->process( $url, $width, $height, $crop, $single, $upscale );
|
327 |
}
|
328 |
}
|
329 |
-
}
|
326 |
return $aq_resize->process( $url, $width, $height, $crop, $single, $upscale );
|
327 |
}
|
328 |
}
|
329 |
+
}
|
core/array-list/local-sub-business.php
CHANGED
@@ -190,5 +190,4 @@ return array(
|
|
190 |
'psychiatric' => 'Psychiatric',
|
191 |
'publichealth' => 'Public Health',
|
192 |
)
|
193 |
-
);
|
194 |
-
|
190 |
'psychiatric' => 'Psychiatric',
|
191 |
'publichealth' => 'Public Health',
|
192 |
)
|
193 |
+
);
|
|
core/array-list/schema-properties.php
CHANGED
@@ -1543,42 +1543,50 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
1543 |
$meta_field[] = array(
|
1544 |
'label' => 'Review Name',
|
1545 |
'id' => 'saswp_review_name_'.$schema_id,
|
1546 |
-
'type' => 'text',
|
|
|
1547 |
);
|
1548 |
$meta_field[] = array(
|
1549 |
'label' => 'Review Description',
|
1550 |
'id' => 'saswp_review_description_'.$schema_id,
|
1551 |
'type' => 'textarea',
|
|
|
1552 |
);
|
1553 |
$meta_field[] = array(
|
1554 |
'label' => 'Review Author',
|
1555 |
'id' => 'saswp_review_author_'.$schema_id,
|
1556 |
-
'type' => 'text',
|
|
|
1557 |
);
|
1558 |
$meta_field[] = array(
|
1559 |
'label' => 'Review Author URL',
|
1560 |
'id' => 'saswp_review_author_url_'.$schema_id,
|
1561 |
-
'type' => 'text',
|
|
|
1562 |
);
|
1563 |
$meta_field[] = array(
|
1564 |
'label' => 'Review Publisher',
|
1565 |
'id' => 'saswp_review_publisher_'.$schema_id,
|
1566 |
-
'type' => 'text',
|
|
|
1567 |
);
|
1568 |
$meta_field[] = array(
|
1569 |
'label' => 'Review Publisher URL',
|
1570 |
'id' => 'saswp_review_publisher_url'.$schema_id,
|
1571 |
'type' => 'text',
|
|
|
1572 |
);
|
1573 |
$meta_field[] = array(
|
1574 |
'label' => 'Review Published Date',
|
1575 |
'id' => 'saswp_review_date_published_'.$schema_id,
|
1576 |
-
'type' => 'text',
|
|
|
1577 |
);
|
1578 |
$meta_field[] = array(
|
1579 |
'label' => 'Review URL',
|
1580 |
'id' => 'saswp_review_url_'.$schema_id,
|
1581 |
-
'type' => 'text',
|
|
|
1582 |
);
|
1583 |
$meta_field[] = array(
|
1584 |
'label' => 'Review Rating',
|
1543 |
$meta_field[] = array(
|
1544 |
'label' => 'Review Name',
|
1545 |
'id' => 'saswp_review_name_'.$schema_id,
|
1546 |
+
'type' => 'text',
|
1547 |
+
'default' => get_the_title()
|
1548 |
);
|
1549 |
$meta_field[] = array(
|
1550 |
'label' => 'Review Description',
|
1551 |
'id' => 'saswp_review_description_'.$schema_id,
|
1552 |
'type' => 'textarea',
|
1553 |
+
'default' => get_the_excerpt()
|
1554 |
);
|
1555 |
$meta_field[] = array(
|
1556 |
'label' => 'Review Author',
|
1557 |
'id' => 'saswp_review_author_'.$schema_id,
|
1558 |
+
'type' => 'text',
|
1559 |
+
'default' => is_object($current_user) ? $current_user->display_name : ''
|
1560 |
);
|
1561 |
$meta_field[] = array(
|
1562 |
'label' => 'Review Author URL',
|
1563 |
'id' => 'saswp_review_author_url_'.$schema_id,
|
1564 |
+
'type' => 'text',
|
1565 |
+
'default' => $author_url
|
1566 |
);
|
1567 |
$meta_field[] = array(
|
1568 |
'label' => 'Review Publisher',
|
1569 |
'id' => 'saswp_review_publisher_'.$schema_id,
|
1570 |
+
'type' => 'text',
|
1571 |
+
'default'=> saswp_remove_warnings($sd_data, 'sd_name', 'saswp_string')
|
1572 |
);
|
1573 |
$meta_field[] = array(
|
1574 |
'label' => 'Review Publisher URL',
|
1575 |
'id' => 'saswp_review_publisher_url'.$schema_id,
|
1576 |
'type' => 'text',
|
1577 |
+
'default' => get_home_url()
|
1578 |
);
|
1579 |
$meta_field[] = array(
|
1580 |
'label' => 'Review Published Date',
|
1581 |
'id' => 'saswp_review_date_published_'.$schema_id,
|
1582 |
+
'type' => 'text',
|
1583 |
+
'default' => get_the_date("Y-m-d")
|
1584 |
);
|
1585 |
$meta_field[] = array(
|
1586 |
'label' => 'Review URL',
|
1587 |
'id' => 'saswp_review_url_'.$schema_id,
|
1588 |
+
'type' => 'text',
|
1589 |
+
'default' => get_permalink()
|
1590 |
);
|
1591 |
$meta_field[] = array(
|
1592 |
'label' => 'Review Rating',
|
core/global.php
CHANGED
@@ -57,11 +57,11 @@ $translation_labels = array(
|
|
57 |
'translation-tools' => 'Tools',
|
58 |
'translation-materials' => 'Materials',
|
59 |
'translation-time-needed' => 'Time Needed',
|
|
|
60 |
'translation-name' => 'Name',
|
61 |
'translation-comment' => 'Comment',
|
62 |
'translation-review-form' => 'Review Form',
|
63 |
);
|
64 |
$saswp_post_reviews = array();
|
65 |
$saswp_elementor_faq = array();
|
66 |
-
$saswp_wisdom;
|
67 |
-
|
57 |
'translation-tools' => 'Tools',
|
58 |
'translation-materials' => 'Materials',
|
59 |
'translation-time-needed' => 'Time Needed',
|
60 |
+
'translation-estimate-cost' => 'Estimate Cost',
|
61 |
'translation-name' => 'Name',
|
62 |
'translation-comment' => 'Comment',
|
63 |
'translation-review-form' => 'Review Form',
|
64 |
);
|
65 |
$saswp_post_reviews = array();
|
66 |
$saswp_elementor_faq = array();
|
67 |
+
$saswp_wisdom;
|
|
modules/divi-builder/extension.php
CHANGED
@@ -9,4 +9,4 @@ function saswp_initialize_extension() {
|
|
9 |
require_once plugin_dir_path( __FILE__ ) . 'includes/Extension.php';
|
10 |
}
|
11 |
add_action( 'divi_extensions_init', 'saswp_initialize_extension' );
|
12 |
-
endif;
|
9 |
require_once plugin_dir_path( __FILE__ ) . 'includes/Extension.php';
|
10 |
}
|
11 |
add_action( 'divi_extensions_init', 'saswp_initialize_extension' );
|
12 |
+
endif;
|
modules/divi-builder/includes/Extension.php
CHANGED
@@ -42,5 +42,4 @@ class SASWP_Extension extends DiviExtension {
|
|
42 |
parent::__construct( $name, $args );
|
43 |
}
|
44 |
}
|
45 |
-
|
46 |
-
new SASWP_Extension;
|
42 |
parent::__construct( $name, $args );
|
43 |
}
|
44 |
}
|
45 |
+
new SASWP_Extension;
|
|
modules/divi-builder/includes/loader.php
CHANGED
@@ -11,4 +11,4 @@ foreach ( (array) $module_files as $module_file ) {
|
|
11 |
if ( $module_file && preg_match( "/\/modules\/\b([^\/]+)\/\\1\.php$/", $module_file ) ) {
|
12 |
require_once $module_file;
|
13 |
}
|
14 |
-
}
|
11 |
if ( $module_file && preg_match( "/\/modules\/\b([^\/]+)\/\\1\.php$/", $module_file ) ) {
|
12 |
require_once $module_file;
|
13 |
}
|
14 |
+
}
|
modules/divi-builder/includes/modules/FaqBlock/FaqBlock.php
CHANGED
@@ -74,5 +74,4 @@ class SASWP_Divi_FaqBlock extends ET_Builder_Module {
|
|
74 |
}
|
75 |
|
76 |
}
|
77 |
-
|
78 |
-
new SASWP_Divi_FaqBlock;
|
74 |
}
|
75 |
|
76 |
}
|
77 |
+
new SASWP_Divi_FaqBlock;
|
|
modules/divi-builder/includes/modules/FaqBlockChild/FaqBlockChild.php
CHANGED
@@ -196,5 +196,4 @@ class SASWP_Divi_FaqBlockChild extends ET_Builder_Module {
|
|
196 |
|
197 |
}
|
198 |
}
|
199 |
-
|
200 |
-
new SASWP_Divi_FaqBlockChild;
|
196 |
|
197 |
}
|
198 |
}
|
199 |
+
new SASWP_Divi_FaqBlockChild;
|
|
modules/elementor/elementor-loader.php
CHANGED
@@ -94,6 +94,5 @@ class SASWP_Elementor_Loader {
|
|
94 |
add_action( 'elementor/widgets/widgets_registered', [ $this, 'register_widgets' ] );
|
95 |
}
|
96 |
}
|
97 |
-
|
98 |
// Instantiate Plugin Class
|
99 |
-
SASWP_Elementor_Loader::instance();
|
94 |
add_action( 'elementor/widgets/widgets_registered', [ $this, 'register_widgets' ] );
|
95 |
}
|
96 |
}
|
|
|
97 |
// Instantiate Plugin Class
|
98 |
+
SASWP_Elementor_Loader::instance();
|
modules/gutenberg/assets/blocks/how-to.js
CHANGED
@@ -30,6 +30,10 @@
|
|
30 |
type:'boolean',
|
31 |
default:false
|
32 |
},
|
|
|
|
|
|
|
|
|
33 |
alignment: {
|
34 |
type: 'string',
|
35 |
default: 'none'
|
@@ -54,6 +58,14 @@
|
|
54 |
type: 'string',
|
55 |
selector: '.saswp-how-to-minutes'
|
56 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
items: {
|
58 |
default: [{index: 0, title: "", description: "", imageUrl: "", imageId: null}],
|
59 |
selector: '.saswp-how-to-block-data',
|
@@ -146,6 +158,61 @@
|
|
146 |
|
147 |
}
|
148 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
function saswpGetDuration(){
|
150 |
|
151 |
var duration = el('fieldset',{className:'saswp-how-to-duration'},el('legend',{className:'saswp-how-to-duration-legend'}, 'Time Needed : ',
|
@@ -191,6 +258,8 @@
|
|
191 |
)
|
192 |
)
|
193 |
));
|
|
|
|
|
194 |
|
195 |
var addDuration = el( IconButton, {
|
196 |
icon: "insert",
|
@@ -721,7 +790,8 @@
|
|
721 |
,el(
|
722 |
'div',
|
723 |
{ className: props.className },
|
724 |
-
saswpGetDuration(),
|
|
|
725 |
el( RichText, {
|
726 |
tagName: 'p',
|
727 |
className:'saswp-how-to-description',
|
30 |
type:'boolean',
|
31 |
default:false
|
32 |
},
|
33 |
+
hasCost:{
|
34 |
+
type:'boolean',
|
35 |
+
default:false
|
36 |
+
},
|
37 |
alignment: {
|
38 |
type: 'string',
|
39 |
default: 'none'
|
58 |
type: 'string',
|
59 |
selector: '.saswp-how-to-minutes'
|
60 |
},
|
61 |
+
currency: {
|
62 |
+
type: 'string',
|
63 |
+
selector: '.saswp-how-to-currency'
|
64 |
+
},
|
65 |
+
price: {
|
66 |
+
type: 'number',
|
67 |
+
selector: '.saswp-how-to-price'
|
68 |
+
},
|
69 |
items: {
|
70 |
default: [{index: 0, title: "", description: "", imageUrl: "", imageId: null}],
|
71 |
selector: '.saswp-how-to-block-data',
|
158 |
|
159 |
}
|
160 |
|
161 |
+
function saswpGetCost(){
|
162 |
+
|
163 |
+
var cost = el('fieldset',{className:'saswp-how-to-cost'},el('legend',{className:'saswp-how-to-cost-legend'}, 'Estimate Cost : ',
|
164 |
+
el('span',{className:'saswp-how-to-duration-time-input'},
|
165 |
+
el(TextControl,
|
166 |
+
{
|
167 |
+
className:'saswp-how-to-cost-input',
|
168 |
+
placeholder: 'USD',
|
169 |
+
value: attributes.currency,
|
170 |
+
autoFocus: true,
|
171 |
+
onChange: function( newContent ) {
|
172 |
+
props.setAttributes( { currency: newContent } );
|
173 |
+
}
|
174 |
+
},),
|
175 |
+
el(TextControl,
|
176 |
+
{
|
177 |
+
className:'saswp-how-to-cost-input',
|
178 |
+
placeholder: '20',
|
179 |
+
value: attributes.price,
|
180 |
+
autoFocus: true,
|
181 |
+
onChange: function( newContent ) {
|
182 |
+
props.setAttributes( { price: newContent } );
|
183 |
+
}
|
184 |
+
},),
|
185 |
+
el( IconButton, {
|
186 |
+
icon: "trash",
|
187 |
+
className: 'saswp-how-to-step-button',
|
188 |
+
onClick: function() {
|
189 |
+
props.setAttributes( { hasCost: false } );
|
190 |
+
}
|
191 |
+
}
|
192 |
+
)
|
193 |
+
)
|
194 |
+
));
|
195 |
+
|
196 |
+
|
197 |
+
|
198 |
+
var addCost = el( IconButton, {
|
199 |
+
icon: "insert",
|
200 |
+
className: 'saswp-how-to-step-button',
|
201 |
+
onClick: function(){
|
202 |
+
props.setAttributes( { hasCost: true } );
|
203 |
+
}
|
204 |
+
},
|
205 |
+
__('Add Cost', 'schema-and-structured-data-for-wp')
|
206 |
+
);
|
207 |
+
|
208 |
+
if(attributes.hasCost){
|
209 |
+
return cost;
|
210 |
+
}else{
|
211 |
+
return addCost;
|
212 |
+
}
|
213 |
+
|
214 |
+
}
|
215 |
+
|
216 |
function saswpGetDuration(){
|
217 |
|
218 |
var duration = el('fieldset',{className:'saswp-how-to-duration'},el('legend',{className:'saswp-how-to-duration-legend'}, 'Time Needed : ',
|
258 |
)
|
259 |
)
|
260 |
));
|
261 |
+
|
262 |
+
|
263 |
|
264 |
var addDuration = el( IconButton, {
|
265 |
icon: "insert",
|
790 |
,el(
|
791 |
'div',
|
792 |
{ className: props.className },
|
793 |
+
saswpGetDuration(),
|
794 |
+
saswpGetCost(),
|
795 |
el( RichText, {
|
796 |
tagName: 'p',
|
797 |
className:'saswp-how-to-description',
|
modules/gutenberg/includes/class-gutenberg.php
CHANGED
@@ -395,7 +395,28 @@ class SASWP_Gutenberg {
|
|
395 |
echo '<div class="saswp-how-to-block-section">';
|
396 |
|
397 |
echo '<div class="saswp-how-to-block-steps">';
|
398 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
399 |
if(isset($attributes['hasDuration'])){
|
400 |
echo '<p class="saswp-how-to-total-time">';
|
401 |
|
@@ -464,7 +485,7 @@ class SASWP_Gutenberg {
|
|
464 |
echo '<ul>';
|
465 |
foreach($attributes['tools'] as $val){
|
466 |
if($val['name']){
|
467 |
-
echo '<li>'.
|
468 |
}
|
469 |
|
470 |
}
|
@@ -482,8 +503,9 @@ class SASWP_Gutenberg {
|
|
482 |
|
483 |
echo '<ul>';
|
484 |
foreach($attributes['materials'] as $val){
|
|
|
485 |
if($val['name']){
|
486 |
-
echo '<li>'.
|
487 |
}
|
488 |
|
489 |
}
|
395 |
echo '<div class="saswp-how-to-block-section">';
|
396 |
|
397 |
echo '<div class="saswp-how-to-block-steps">';
|
398 |
+
|
399 |
+
if(isset($attributes['hasCost'])){
|
400 |
+
echo '<p class="saswp-how-to-total-time">';
|
401 |
+
|
402 |
+
$time_html = '';
|
403 |
+
|
404 |
+
if(isset($attributes['price']) && $attributes['price'] != ''){
|
405 |
+
$time_html .= esc_attr($attributes['price']). ' ';
|
406 |
+
}
|
407 |
+
|
408 |
+
if(isset($attributes['currency']) && $attributes['currency'] != ''){
|
409 |
+
$time_html .= esc_attr($attributes['currency']);
|
410 |
+
}
|
411 |
+
|
412 |
+
if($time_html !=''){
|
413 |
+
echo '<span class="saswp-how-to-duration-time-text"><strong>'.saswp_label_text('translation-estimate-cost').' :</strong> </span>';
|
414 |
+
echo $time_html;
|
415 |
+
}
|
416 |
+
|
417 |
+
echo '</p>';
|
418 |
+
}
|
419 |
+
|
420 |
if(isset($attributes['hasDuration'])){
|
421 |
echo '<p class="saswp-how-to-total-time">';
|
422 |
|
485 |
echo '<ul>';
|
486 |
foreach($attributes['tools'] as $val){
|
487 |
if($val['name']){
|
488 |
+
echo '<li>'. wp_kses_post($val['name']).'</li>';
|
489 |
}
|
490 |
|
491 |
}
|
503 |
|
504 |
echo '<ul>';
|
505 |
foreach($attributes['materials'] as $val){
|
506 |
+
|
507 |
if($val['name']){
|
508 |
+
echo '<li>'. wp_kses_post($val['name']).'</li>';
|
509 |
}
|
510 |
|
511 |
}
|
modules/gutenberg/includes/render.php
CHANGED
@@ -191,4 +191,4 @@ class SASWP_Gutenberg_Render {
|
|
191 |
|
192 |
}
|
193 |
|
194 |
-
}
|
191 |
|
192 |
}
|
193 |
|
194 |
+
}
|
modules/gutenberg/includes/service.php
CHANGED
@@ -1,8 +1,5 @@
|
|
1 |
<?php
|
2 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
3 |
|
4 |
-
class SASWP_Gutenberg_Service {
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
}
|
1 |
<?php
|
2 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
3 |
|
4 |
+
class SASWP_Gutenberg_Service {
|
|
|
|
|
|
|
5 |
}
|
modules/rating-box/backend.php
CHANGED
@@ -239,4 +239,4 @@ class saswp_rating_box_backend {
|
|
239 |
}
|
240 |
if (class_exists('saswp_rating_box_backend')) {
|
241 |
new saswp_rating_box_backend;
|
242 |
-
};
|
239 |
}
|
240 |
if (class_exists('saswp_rating_box_backend')) {
|
241 |
new saswp_rating_box_backend;
|
242 |
+
};
|
modules/reviews/reviews_admin.php
CHANGED
@@ -322,4 +322,4 @@ class saswp_reviews_admin {
|
|
322 |
}
|
323 |
if (class_exists('saswp_reviews_admin')) {
|
324 |
new saswp_reviews_admin;
|
325 |
-
};
|
322 |
}
|
323 |
if (class_exists('saswp_reviews_admin')) {
|
324 |
new saswp_reviews_admin;
|
325 |
+
};
|
modules/reviews/reviews_service.php
CHANGED
@@ -1341,5 +1341,4 @@ class saswp_reviews_service {
|
|
1341 |
}
|
1342 |
|
1343 |
$saswp_service_obj = new saswp_reviews_service();
|
1344 |
-
$saswp_service_obj->saswp_service_hooks();
|
1345 |
-
?>
|
1341 |
}
|
1342 |
|
1343 |
$saswp_service_obj = new saswp_reviews_service();
|
1344 |
+
$saswp_service_obj->saswp_service_hooks();
|
|
modules/reviews/reviews_widget.php
CHANGED
@@ -117,5 +117,4 @@ class Saswp_Reviews_Widget extends WP_Widget {
|
|
117 |
function register_saswp_reviews_widget(){
|
118 |
register_widget('Saswp_Reviews_Widget');
|
119 |
}
|
120 |
-
|
121 |
add_action('widgets_init', 'register_saswp_reviews_widget');
|
117 |
function register_saswp_reviews_widget(){
|
118 |
register_widget('Saswp_Reviews_Widget');
|
119 |
}
|
|
|
120 |
add_action('widgets_init', 'register_saswp_reviews_widget');
|
output/compatibility.php
CHANGED
@@ -452,8 +452,7 @@ class saswp_output_compatibility{
|
|
452 |
*/
|
453 |
|
454 |
}
|
455 |
-
|
456 |
if(class_exists('saswp_output_compatibility')){
|
457 |
$obj_compatibility = new saswp_output_compatibility();
|
458 |
$obj_compatibility->saswp_service_compatibility_hooks();
|
459 |
-
}
|
452 |
*/
|
453 |
|
454 |
}
|
|
|
455 |
if(class_exists('saswp_output_compatibility')){
|
456 |
$obj_compatibility = new saswp_output_compatibility();
|
457 |
$obj_compatibility->saswp_service_compatibility_hooks();
|
458 |
+
}
|
output/function.php
CHANGED
@@ -943,6 +943,7 @@ function saswp_remove_microdata($content){
|
|
943 |
$content = preg_replace('/itemscope\=\"(.*?)\"/', "", $content);
|
944 |
$content = preg_replace("/itemscope\='(.*?)\'/", "", $content);
|
945 |
$content = preg_replace('/itemscope/', "", $content);
|
|
|
946 |
|
947 |
//Clean json markup
|
948 |
if(isset($sd_data['saswp-aiosp']) && $sd_data['saswp-aiosp'] == 1 ){
|
@@ -1924,8 +1925,6 @@ function saswp_explod_by_semicolon($data){
|
|
1924 |
}
|
1925 |
|
1926 |
}
|
1927 |
-
}
|
1928 |
-
|
1929 |
-
return $response;
|
1930 |
-
|
1931 |
}
|
943 |
$content = preg_replace('/itemscope\=\"(.*?)\"/', "", $content);
|
944 |
$content = preg_replace("/itemscope\='(.*?)\'/", "", $content);
|
945 |
$content = preg_replace('/itemscope/', "", $content);
|
946 |
+
$content = preg_replace('/hreview-aggregate/', "", $content);
|
947 |
|
948 |
//Clean json markup
|
949 |
if(isset($sd_data['saswp-aiosp']) && $sd_data['saswp-aiosp'] == 1 ){
|
1925 |
}
|
1926 |
|
1927 |
}
|
1928 |
+
}
|
1929 |
+
return $response;
|
|
|
|
|
1930 |
}
|
output/gutenberg.php
CHANGED
@@ -282,6 +282,13 @@ function saswp_gutenberg_how_to_schema(){
|
|
282 |
|
283 |
}
|
284 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
285 |
}
|
286 |
|
287 |
}
|
@@ -598,6 +605,5 @@ function saswp_gutenberg_course_schema(){
|
|
598 |
|
599 |
}
|
600 |
|
601 |
-
return $input1;
|
602 |
-
|
603 |
}
|
282 |
|
283 |
}
|
284 |
|
285 |
+
if(isset($parse_blocks['attrs']['price']) && isset($parse_blocks['attrs']['currency'])){
|
286 |
+
|
287 |
+
$input1['estimatedCost']['@type'] = 'MonetaryAmount';
|
288 |
+
$input1['estimatedCost']['currency']= $parse_blocks['attrs']['currency'];
|
289 |
+
$input1['estimatedCost']['value'] = $parse_blocks['attrs']['price'];
|
290 |
+
}
|
291 |
+
|
292 |
}
|
293 |
|
294 |
}
|
605 |
|
606 |
}
|
607 |
|
608 |
+
return $input1;
|
|
|
609 |
}
|
output/markup.php
CHANGED
@@ -1372,8 +1372,11 @@ function saswp_job_posting_schema_markup($schema_id, $schema_post_id, $all_post_
|
|
1372 |
$input1['baseSalary']['value']['value'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_bs_value_'.$schema_id, 'saswp_array');
|
1373 |
$input1['baseSalary']['value']['unitText'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_bs_unittext_'.$schema_id, 'saswp_array');
|
1374 |
|
1375 |
-
|
1376 |
-
|
|
|
|
|
|
|
1377 |
}
|
1378 |
|
1379 |
function saswp_mosque_schema_markup($schema_id, $schema_post_id, $all_post_meta){
|
@@ -2738,6 +2741,5 @@ function saswp_review_schema_markup($schema_id, $schema_post_id, $all_post_meta)
|
|
2738 |
|
2739 |
}
|
2740 |
|
2741 |
-
return $input1;
|
2742 |
-
|
2743 |
}
|
1372 |
$input1['baseSalary']['value']['value'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_bs_value_'.$schema_id, 'saswp_array');
|
1373 |
$input1['baseSalary']['value']['unitText'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_bs_unittext_'.$schema_id, 'saswp_array');
|
1374 |
|
1375 |
+
if(isset($all_post_meta['saswp_jobposting_schema_validthrough_'.$schema_id][0]) && $all_post_meta['saswp_jobposting_schema_validthrough_'.$schema_id][0] < date('Y-m-d')){
|
1376 |
+
$input1 = array();
|
1377 |
+
}
|
1378 |
+
|
1379 |
+
return $input1;
|
1380 |
}
|
1381 |
|
1382 |
function saswp_mosque_schema_markup($schema_id, $schema_post_id, $all_post_meta){
|
2741 |
|
2742 |
}
|
2743 |
|
2744 |
+
return $input1;
|
|
|
2745 |
}
|
output/output.php
CHANGED
@@ -2275,4 +2275,4 @@ function saswp_fetched_reviews_schema_markup(){
|
|
2275 |
}
|
2276 |
|
2277 |
return $input1;
|
2278 |
-
|
2275 |
}
|
2276 |
|
2277 |
return $input1;
|
2278 |
+
}
|
output/service.php
CHANGED
@@ -2144,6 +2144,9 @@ Class saswp_output_service{
|
|
2144 |
}
|
2145 |
if(isset($custom_fields['saswp_jobposting_schema_bs_unittext'])){
|
2146 |
$input1['baseSalary']['value']['unitText'] = $custom_fields['saswp_jobposting_schema_bs_unittext'];
|
|
|
|
|
|
|
2147 |
}
|
2148 |
|
2149 |
break;
|
2144 |
}
|
2145 |
if(isset($custom_fields['saswp_jobposting_schema_bs_unittext'])){
|
2146 |
$input1['baseSalary']['value']['unitText'] = $custom_fields['saswp_jobposting_schema_bs_unittext'];
|
2147 |
+
}
|
2148 |
+
if(isset($custom_fields['saswp_jobposting_schema_validthrough']) && $custom_fields['saswp_jobposting_schema_validthrough'] < date('Y-m-d') ){
|
2149 |
+
$input1 = array();
|
2150 |
}
|
2151 |
|
2152 |
break;
|
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.3
|
6 |
-
Stable tag: 1.9.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -118,6 +118,21 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
|
|
118 |
|
119 |
== Changelog ==
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
= 1.9.28 (11 Mar 2020) =
|
122 |
|
123 |
* Added: Support for EAN-codes (gtin 13) in product schema #862
|
3 |
Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.3
|
6 |
+
Stable tag: 1.9.29
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
118 |
|
119 |
== Changelog ==
|
120 |
|
121 |
+
= 1.9.29 (26 Mar 2020) =
|
122 |
+
|
123 |
+
* Fixed: When we update the page it is getting redirect to the warning url when schema is activated #871
|
124 |
+
* Fixed: hreview and other microdata cleanup #877
|
125 |
+
* Fixed: Add property(modify schema output) does not load properties. #872
|
126 |
+
* Fixed: The review count and the review comment showing incorrect in collection panel #855
|
127 |
+
* Fixed: If job post schema has been expired than its markup should not be shown #858
|
128 |
+
* Fixed: How to module Gutenberg renders the markup instead of the link #857
|
129 |
+
* Fixed: In review schema type when we try to modify this schema on the post the default values in it are also in blank #867
|
130 |
+
* Fixed: Validation errors: The mandatory tag 'link rel=canonical' is missing or incorrect due to schema #848
|
131 |
+
* Fixed: Fatal error: require_once(): Failed opening required '/wp-content/plugins/wp-seopress/inc/functions/options-titles-metas.php’ #892
|
132 |
+
* Added: Reviews for Schema in Premium Features section #837
|
133 |
+
* Added: Estimate Cost fields in gutenberg How-to module. #835
|
134 |
+
|
135 |
+
|
136 |
= 1.9.28 (11 Mar 2020) =
|
137 |
|
138 |
* Added: Support for EAN-codes (gtin 13) in product schema #862
|
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.29
|
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.29');
|
17 |
define('SASWP_DIR_NAME_FILE', __FILE__ );
|
18 |
define('SASWP_DIR_NAME', dirname( __FILE__ ));
|
19 |
define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
|
view/common.php
CHANGED
@@ -685,14 +685,14 @@ class saswp_view_common_class {
|
|
685 |
|
686 |
}
|
687 |
|
688 |
-
$response = saswp_get_fields_by_schema_type($schema->ID, 'save');
|
689 |
|
690 |
$this->saswp_save_meta_fields_value($post_meta, $response, $post_id);
|
691 |
|
692 |
if(isset($_POST['saswp_review_item_reviewed_'.$schema->ID]) && $_POST['saswp_review_item_reviewed_'.$schema->ID] !=''){
|
693 |
$item_reviewed = sanitize_text_field($_POST['saswp_review_item_reviewed_'.$schema->ID]);
|
694 |
|
695 |
-
$response = saswp_get_fields_by_schema_type($schema->ID, 'save', $item_reviewed);
|
696 |
$this->saswp_save_meta_fields_value($post_meta, $response, $post_id);
|
697 |
}
|
698 |
|
@@ -701,4 +701,4 @@ class saswp_view_common_class {
|
|
701 |
|
702 |
}
|
703 |
|
704 |
-
}
|
685 |
|
686 |
}
|
687 |
|
688 |
+
$response = @saswp_get_fields_by_schema_type($schema->ID, 'save');
|
689 |
|
690 |
$this->saswp_save_meta_fields_value($post_meta, $response, $post_id);
|
691 |
|
692 |
if(isset($_POST['saswp_review_item_reviewed_'.$schema->ID]) && $_POST['saswp_review_item_reviewed_'.$schema->ID] !=''){
|
693 |
$item_reviewed = sanitize_text_field($_POST['saswp_review_item_reviewed_'.$schema->ID]);
|
694 |
|
695 |
+
$response = @saswp_get_fields_by_schema_type($schema->ID, 'save', $item_reviewed);
|
696 |
$this->saswp_save_meta_fields_value($post_meta, $response, $post_id);
|
697 |
}
|
698 |
|
701 |
|
702 |
}
|
703 |
|
704 |
+
}
|
view/help.php
CHANGED
@@ -30,5 +30,4 @@ function saswp_disable_new_posts() {
|
|
30 |
unset($submenu['edit.php?post_type=saswp'][10]);
|
31 |
|
32 |
}
|
33 |
-
add_action('admin_menu', 'saswp_disable_new_posts');
|
34 |
-
|
30 |
unset($submenu['edit.php?post_type=saswp'][10]);
|
31 |
|
32 |
}
|
33 |
+
add_action('admin_menu', 'saswp_disable_new_posts');
|
|
view/paywall.php
CHANGED
@@ -115,9 +115,5 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
115 |
update_post_meta( $post_id, 'saswp_fixed_text', $fixed_text);
|
116 |
update_post_meta( $post_id, 'saswp_taxonomy_term', $taxonomy_term);
|
117 |
update_post_meta( $post_id, 'saswp_fixed_image', $fixed_image);
|
118 |
-
update_post_meta( $post_id, 'saswp_custom_meta_field', $cus_meta_field);
|
119 |
-
|
120 |
-
|
121 |
-
}
|
122 |
-
|
123 |
-
|
115 |
update_post_meta( $post_id, 'saswp_fixed_text', $fixed_text);
|
116 |
update_post_meta( $post_id, 'saswp_taxonomy_term', $taxonomy_term);
|
117 |
update_post_meta( $post_id, 'saswp_fixed_image', $fixed_image);
|
118 |
+
update_post_meta( $post_id, 'saswp_custom_meta_field', $cus_meta_field);
|
119 |
+
}
|
|
|
|
|
|
|
|
view/post_specific.php
CHANGED
@@ -630,6 +630,4 @@ class saswp_post_specific {
|
|
630 |
if (class_exists('saswp_post_specific')) {
|
631 |
$object = new saswp_post_specific();
|
632 |
$object->saswp_post_specific_hooks();
|
633 |
-
};
|
634 |
-
|
635 |
-
|
630 |
if (class_exists('saswp_post_specific')) {
|
631 |
$object = new saswp_post_specific();
|
632 |
$object->saswp_post_specific_hooks();
|
633 |
+
};
|
|
|
|
view/schema_type.php
CHANGED
@@ -1212,7 +1212,5 @@ function saswp_schema_type_add_meta_box_save( $post_id ) {
|
|
1212 |
'ID' => $post_id
|
1213 |
);
|
1214 |
|
1215 |
-
$common_obj->saswp_save_common_view($post_id, $post_obj);
|
1216 |
-
|
1217 |
-
}
|
1218 |
-
|
1212 |
'ID' => $post_id
|
1213 |
);
|
1214 |
|
1215 |
+
$common_obj->saswp_save_common_view($post_id, $post_obj);
|
1216 |
+
}
|
|
|
|