Version Description
(20 June 2020) =
- Enhancement: Make stars color yellow as default. #1062
- Fixed: Recipe schema is generating twice in website #1073
- Fixed: Shortcode is being displayed in the description. #1074
- Fixed: JS bug after 1.9.41 improvement #1067
- Fixed: If the "Product Default Review" option is enabled then the collection review count is not showing #1066
- Added: VAT Schema Property in product #873
- Added: Veterinary Care schema type in MedicalBusiness inside LocalBusiness
Download this release
Release Info
Developer | magazine3 |
Plugin | Schema & Structured Data for WP & AMP |
Version | 1.9.41.3 |
Comparing to | |
See all releases |
Code changes from version 1.9.41.2 to 1.9.41.3
- admin_section/common-function.php +30 -2
- admin_section/js/jquery.rateyo.min.js +1 -1
- admin_section/settings.php +26 -7
- admin_section/structure_admin.php +1 -5
- core/array-list/local-sub-business.php +1 -0
- core/array-list/schema-properties.php +7 -1
- modules/reviews/reviews_collection.php +1 -1
- output/function.php +2 -1
- output/markup.php +7 -1
- output/other-schema.php +40 -0
- output/output.php +17 -56
- output/service.php +4 -0
- readme.txt +11 -1
- structured-data-for-wp.php +2 -2
admin_section/common-function.php
CHANGED
@@ -2008,10 +2008,12 @@ if ( ! defined('ABSPATH') ) exit;
|
|
2008 |
|
2009 |
if(empty($excerpt)){
|
2010 |
|
2011 |
-
$
|
|
|
2012 |
|
|
|
2013 |
$excerpt_more = '';
|
2014 |
-
$excerpt = wp_trim_words( $
|
2015 |
}
|
2016 |
|
2017 |
if(strpos($excerpt, "<p>")!==false){
|
@@ -2108,6 +2110,16 @@ if ( ! defined('ABSPATH') ) exit;
|
|
2108 |
}
|
2109 |
|
2110 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2111 |
|
2112 |
}
|
2113 |
|
@@ -2287,6 +2299,22 @@ if ( ! defined('ABSPATH') ) exit;
|
|
2287 |
}
|
2288 |
|
2289 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2290 |
|
2291 |
if (strlen($title) > 110){
|
2292 |
$title = substr($title, 0, 106) . ' ...';
|
2008 |
|
2009 |
if(empty($excerpt)){
|
2010 |
|
2011 |
+
$post_content = wp_strip_all_tags(strip_shortcodes($post->post_content));
|
2012 |
+
$post_content = preg_replace('/\[.*?\]/','', $post_content);
|
2013 |
|
2014 |
+
$excerpt_length = apply_filters( 'excerpt_length', 55 );
|
2015 |
$excerpt_more = '';
|
2016 |
+
$excerpt = wp_trim_words( $post_content, $excerpt_length, $excerpt_more );
|
2017 |
}
|
2018 |
|
2019 |
if(strpos($excerpt, "<p>")!==false){
|
2110 |
}
|
2111 |
|
2112 |
}
|
2113 |
+
|
2114 |
+
if(saswp_remove_warnings($sd_data, 'saswp-rankmath', 'saswp_string') == 1 && class_exists('RankMath\Post')){
|
2115 |
+
|
2116 |
+
$c_excerpt = RankMath\Post::get_meta( 'description', $post->ID );
|
2117 |
+
|
2118 |
+
if($c_excerpt){
|
2119 |
+
$excerpt = $c_excerpt;
|
2120 |
+
}
|
2121 |
+
|
2122 |
+
}
|
2123 |
|
2124 |
}
|
2125 |
|
2299 |
}
|
2300 |
|
2301 |
}
|
2302 |
+
|
2303 |
+
if(saswp_remove_warnings($sd_data, 'saswp-rankmath', 'saswp_string') == 1 && class_exists('RankMath\Post')){
|
2304 |
+
|
2305 |
+
$c_title = RankMath\Post::get_meta( 'title', $post->ID );
|
2306 |
+
|
2307 |
+
if(empty($c_title)){
|
2308 |
+
$c_title = RankMath\Paper\Paper::get()->get_title();
|
2309 |
+
}
|
2310 |
+
|
2311 |
+
if($c_title){
|
2312 |
+
|
2313 |
+
$title = $c_title;
|
2314 |
+
|
2315 |
+
}
|
2316 |
+
|
2317 |
+
}
|
2318 |
|
2319 |
if (strlen($title) > 110){
|
2320 |
$title = substr($title, 0, 106) . ' ...';
|
admin_section/js/jquery.rateyo.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
/*rateyo V2.3.4, A simple and flexible star rating plugin
|
2 |
prashanth pamidi (https://github.com/prrashi)*/
|
3 |
-
!function(N){"use strict";var Q='<?xml version="1.0" encoding="utf-8"?><svg version="1.1"xmlns="http://www.w3.org/2000/svg"viewBox="0 12.705 512 486.59"x="0px" y="0px"xml:space="preserve"><polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "/></svg>',n={starWidth:"32px",normalFill:"gray",ratedFill:"#
|
4 |
//# sourceMappingURL=jquery.rateyo.min.js.map
|
1 |
/*rateyo V2.3.4, A simple and flexible star rating plugin
|
2 |
prashanth pamidi (https://github.com/prrashi)*/
|
3 |
+
!function(N){"use strict";var Q='<?xml version="1.0" encoding="utf-8"?><svg version="1.1"xmlns="http://www.w3.org/2000/svg"viewBox="0 12.705 512 486.59"x="0px" y="0px"xml:space="preserve"><polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "/></svg>',n={starWidth:"32px",normalFill:"gray",ratedFill:"#ffd700",numStars:5,maxValue:5,precision:1,rating:0,fullStar:!1,halfStar:!1,readOnly:!1,spacing:"0px",rtl:!1,multiColor:null,onInit:null,onChange:null,onSet:null,starSvg:null},X={startColor:"#c0392b",endColor:"#f1c40f"};function $(t,r,e){return t===r?t=r:t===e&&(t=e),t}function D(t){return void 0!==t}var e=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,G=function(t){if(!e.test(t))return null;var r=e.exec(t);return{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)}};function H(t,r,e){var n=e/100*(r-t);return 1===(n=Math.round(t+n).toString(16)).length&&(n="0"+n),n}function J(i,d){this.node=i.get(0);var e=this;i.empty().addClass("jq-ry-container");var g,n,m,h,v,t,r=N("<div/>").addClass("jq-ry-group-wrapper").appendTo(i),y=N("<div/>").addClass("jq-ry-normal-group").addClass("jq-ry-group").appendTo(r),a=N("<div/>").addClass("jq-ry-rated-group").addClass("jq-ry-group").appendTo(r),w=0,o=d.rating,l=!1;function s(t){D(t)||(t=d.rating);var r=(o=t)/g,e=r*m;1<r&&(e+=(Math.ceil(r)-1)*v),k(d.ratedFill),(e=d.rtl?100-e:e)<0?e=0:100<e&&(e=100),a.css("width",e+"%")}function c(){t=n*d.numStars+h*(d.numStars-1),m=n/t*100,v=h/t*100,i.width(t),s()}function u(t){var r=d.starWidth=t;return n=window.parseFloat(d.starWidth.replace("px","")),y.find("svg").attr({width:d.starWidth,height:r}),a.find("svg").attr({width:d.starWidth,height:r}),c(),i}function p(t){return d.spacing=t,h=parseFloat(d.spacing.replace("px","")),y.find("svg:not(:first-child)").css({"margin-left":t}),a.find("svg:not(:first-child)").css({"margin-left":t}),c(),i}function f(t){return d.normalFill=t,(d.rtl?a:y).find("svg").attr({fill:d.normalFill}),i}var b=d.ratedFill;function k(t){if(d.multiColor){var r=(o-w)/d.maxValue*100,e=d.multiColor||{};t=function(t,r,e){if(!t||!r)return null;e=D(e)?e:0,t=G(t),r=G(r);var n=H(t.r,r.r,e),a=H(t.b,r.b,e);return"#"+n+H(t.g,r.g,e)+a}(e.startColor||X.startColor,e.endColor||X.endColor,r)}else b=t;return d.ratedFill=t,(d.rtl?y:a).find("svg").attr({fill:d.ratedFill}),i}function x(t){t=!!t,d.rtl=t,f(d.normalFill),s()}function S(t){k((d.multiColor=t)||b)}function C(t){d.numStars=t,g=d.maxValue/d.numStars,y.empty(),a.empty();for(var r=0;r<d.numStars;r++)y.append(N(d.starSvg||Q)),a.append(N(d.starSvg||Q));return u(d.starWidth),f(d.normalFill),p(d.spacing),s(),i}function F(t){return d.maxValue=t,g=d.maxValue/d.numStars,d.rating>t&&E(t),s(),i}function j(t){return d.precision=t,E(d.rating),i}function q(t){return d.halfStar=t,i}function z(t){return d.fullStar=t,i}function I(t){var r,e,n,a,i,o=y.offset().left,l=o+y.width(),s=d.maxValue,c=t.pageX,u=0;if(c<o)u=w;else if(l<c)u=s;else{var p=(c-o)/(l-o);if(0<h)for(var f=p*=100;0<f;)m<f?(u+=g,f-=m+v):(u+=f/m*g,f=0);else u=p*d.maxValue;e=(r=u)%g,n=g/2,a=d.halfStar,((i=d.fullStar)||a)&&(i||a&&n<e?r+=g-e:(r-=e,0<e&&(r+=n))),u=r}return d.rtl&&(u=s-u),parseFloat(u)}function V(t){return d.readOnly=t,i.attr("readonly",!0),L(),t||(i.removeAttr("readonly"),i.on("mousemove",M).on("mouseenter",M).on("mouseleave",T).on("click",R).on("rateyo.init",Y).on("rateyo.change",_).on("rateyo.set",B)),i}function E(t){var r=t,e=d.maxValue;return"string"==typeof r&&("%"===r[r.length-1]&&(r=r.substr(0,r.length-1),F(e=100)),r=parseFloat(r)),function(t,r,e){if(!(r<=t&&t<=e))throw Error("Invalid Rating, expected value between "+r+" and "+e)}(r,w,e),r=parseFloat(r.toFixed(d.precision)),$(parseFloat(r),w,e),d.rating=r,s(),l&&i.trigger("rateyo.set",{rating:r}),i}function W(t){return d.onInit=t,i}function A(t){return d.onSet=t,i}function O(t){return d.onChange=t,i}function M(t){var r=I(t).toFixed(d.precision),e=d.maxValue;s(r=$(parseFloat(r),w,e)),i.trigger("rateyo.change",{rating:r})}function T(){var t,r;(r=!1,t=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(r=!0),r)||(s(),i.trigger("rateyo.change",{rating:d.rating}))}function R(t){var r=I(t).toFixed(d.precision);r=parseFloat(r),e.rating(r)}function Y(t,r){d.onInit&&"function"==typeof d.onInit&&d.onInit.apply(this,[r.rating,e])}function _(t,r){d.onChange&&"function"==typeof d.onChange&&d.onChange.apply(this,[r.rating,e])}function B(t,r){d.onSet&&"function"==typeof d.onSet&&d.onSet.apply(this,[r.rating,e])}function L(){i.off("mousemove",M).off("mouseenter",M).off("mouseleave",T).off("click",R).off("rateyo.init",Y).off("rateyo.change",_).off("rateyo.set",B)}this.rating=function(t){return D(t)?(E(t),i):d.rating},this.destroy=function(){var n,a;return d.readOnly||L(),J.prototype.collection=(n=i.get(0),a=this.collection,N.each(a,function(t){if(n===this.node){var r=a.slice(0,t),e=a.slice(t+1,a.length);return a=r.concat(e),!1}}),a),i.removeClass("jq-ry-container").children().remove(),i},this.method=function(t){if(!t)throw Error("Method name not specified!");if(!D(this[t]))throw Error("Method "+t+" doesn't exist!");var r=Array.prototype.slice.apply(arguments,[]).slice(1);return this[t].apply(this,r)},this.option=function(t,r){if(!D(t))return d;var e;switch(t){case"starWidth":e=u;break;case"numStars":e=C;break;case"normalFill":e=f;break;case"ratedFill":e=k;break;case"multiColor":e=S;break;case"maxValue":e=F;break;case"precision":e=j;break;case"rating":e=E;break;case"halfStar":e=q;break;case"fullStar":e=z;break;case"readOnly":e=V;break;case"spacing":e=p;break;case"rtl":e=x;break;case"onInit":e=W;break;case"onSet":e=A;break;case"onChange":e=O;break;default:throw Error("No such option as "+t)}return D(r)?e(r):d[t]},C(d.numStars),V(d.readOnly),d.rtl&&x(d.rtl),this.collection.push(this),this.rating(d.rating,!0),l=!0,i.trigger("rateyo.init",{rating:d.rating})}function c(t,r){var e;return N.each(r,function(){if(t===this.node)return e=this,!1}),e}J.prototype.collection=[],window.RateYo=J,N.fn.rateYo=function(){return function(e){var i=J.prototype.collection,t=N(this);if(0===t.length)return t;var r=Array.prototype.slice.apply(arguments,[]);if(0===r.length)e=r[0]={};else{if(1!==r.length||"object"!=typeof r[0]){if(1<=r.length&&"string"==typeof r[0]){var o=r[0],l=r.slice(1),s=[];return N.each(t,function(t,r){var e=c(r,i);if(!e)throw Error("Trying to set options before even initialization");var n=e[o];if(!n)throw Error("Method "+o+" does not exist!");var a=n.apply(e,l);s.push(a)}),s=1===s.length?s[0]:s}throw Error("Invalid Arguments")}e=r[0]}return e=N.extend({},n,e),N.each(t,function(){var t=c(this,i);if(t)return t;var r=N(this),n={},a=N.extend({},e);return N.each(r.data(),function(t,r){if(0===t.indexOf("rateyo")){var e=t.replace(/^rateyo/,"");e=e[0].toLowerCase()+e.slice(1),n[e]=r,delete a[e]}}),new J(N(this),N.extend({},n,a))})}.apply(this,Array.prototype.slice.apply(arguments,[]))}}(window.jQuery);
|
4 |
//# sourceMappingURL=jquery.rateyo.min.js.map
|
admin_section/settings.php
CHANGED
@@ -2995,12 +2995,7 @@ function saswp_enqueue_style_js( $hook ) {
|
|
2995 |
|
2996 |
wp_enqueue_script('thickbox');
|
2997 |
wp_enqueue_style('thickbox');
|
2998 |
-
|
2999 |
-
|
3000 |
-
wp_enqueue_style('saswp-select2-style', SASWP_PLUGIN_URL. 'admin_section/css/select2.min.css' , false, SASWP_VERSION);
|
3001 |
-
wp_enqueue_script('saswp-select2-script', SASWP_PLUGIN_URL. 'admin_section/js/select2.min.js', array( 'jquery', 'jquery-core', 'jquery-ui-core' ), SASWP_VERSION, true);
|
3002 |
-
wp_enqueue_script('saswp-select2-extended-script', SASWP_PLUGIN_URL. 'admin_section/js/select2-extended.min.js', array( 'jquery', 'jquery-core', 'jquery-ui-core' ), SASWP_VERSION, true);
|
3003 |
-
|
3004 |
wp_enqueue_script( 'saswp-timepicker-js', SASWP_PLUGIN_URL . 'admin_section/js/jquery.timepicker.js', array( 'jquery', 'jquery-core', 'jquery-ui-core' ), SASWP_VERSION);
|
3005 |
wp_enqueue_style( 'saswp-timepicker-css', SASWP_PLUGIN_URL . 'admin_section/css/jquery.timepicker.css', false , SASWP_VERSION );
|
3006 |
|
@@ -3024,8 +3019,32 @@ function saswp_enqueue_style_js( $hook ) {
|
|
3024 |
}
|
3025 |
|
3026 |
}
|
3027 |
-
add_action( 'admin_enqueue_scripts', 'saswp_enqueue_style_js' );
|
3028 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3029 |
|
3030 |
function saswp_option_page_capability( $capability ) {
|
3031 |
return saswp_current_user_can();
|
2995 |
|
2996 |
wp_enqueue_script('thickbox');
|
2997 |
wp_enqueue_style('thickbox');
|
2998 |
+
|
|
|
|
|
|
|
|
|
|
|
2999 |
wp_enqueue_script( 'saswp-timepicker-js', SASWP_PLUGIN_URL . 'admin_section/js/jquery.timepicker.js', array( 'jquery', 'jquery-core', 'jquery-ui-core' ), SASWP_VERSION);
|
3000 |
wp_enqueue_style( 'saswp-timepicker-css', SASWP_PLUGIN_URL . 'admin_section/css/jquery.timepicker.css', false , SASWP_VERSION );
|
3001 |
|
3019 |
}
|
3020 |
|
3021 |
}
|
|
|
3022 |
|
3023 |
+
function saswp_enqueue_saswp_select2_js( $hook ) {
|
3024 |
+
|
3025 |
+
global $saswp_metaboxes;
|
3026 |
+
|
3027 |
+
$post_type = '';
|
3028 |
+
|
3029 |
+
$current_screen = get_current_screen();
|
3030 |
+
|
3031 |
+
if(isset($current_screen->post_type)){
|
3032 |
+
$post_type = $current_screen->post_type;
|
3033 |
+
}
|
3034 |
+
|
3035 |
+
if($saswp_metaboxes || $post_type == 'saswp' || $post_type == 'saswp-collections' || $post_type == 'saswp_reviews' || $hook == 'saswp_page_structured_data_options' || $hook == 'saswp_page_collection' ){
|
3036 |
+
|
3037 |
+
wp_enqueue_style('saswp-select2-style', SASWP_PLUGIN_URL. 'admin_section/css/select2.min.css' , false, SASWP_VERSION);
|
3038 |
+
wp_enqueue_script('saswp-select2-script', SASWP_PLUGIN_URL. 'admin_section/js/select2.min.js', array( 'jquery', 'jquery-core', 'jquery-ui-core' ), SASWP_VERSION, true);
|
3039 |
+
wp_enqueue_script('saswp-select2-extended-script', SASWP_PLUGIN_URL. 'admin_section/js/select2-extended.min.js', array( 'jquery', 'jquery-core', 'jquery-ui-core' ), SASWP_VERSION, true);
|
3040 |
+
|
3041 |
+
}
|
3042 |
+
|
3043 |
+
}
|
3044 |
+
|
3045 |
+
add_action( 'admin_enqueue_scripts', 'saswp_enqueue_saswp_select2_js',9999 );
|
3046 |
+
|
3047 |
+
add_action( 'admin_enqueue_scripts', 'saswp_enqueue_style_js' );
|
3048 |
|
3049 |
function saswp_option_page_capability( $capability ) {
|
3050 |
return saswp_current_user_can();
|
admin_section/structure_admin.php
CHANGED
@@ -887,11 +887,7 @@ function saswp_dequeue_script() {
|
|
887 |
|
888 |
wp_localize_script( 'structure_admin', 'saswp_app_object', $data_array );
|
889 |
wp_enqueue_script( 'structure_admin' );
|
890 |
-
|
891 |
-
wp_enqueue_style('saswp-select2-style', SASWP_PLUGIN_URL. 'admin_section/css/select2.min.css' , false, SASWP_VERSION);
|
892 |
-
wp_enqueue_script('saswp-select2-script', SASWP_PLUGIN_URL. 'admin_section/js/select2.min.js', array( 'jquery', 'jquery-core', 'jquery-ui-core' ), SASWP_VERSION, true);
|
893 |
-
wp_enqueue_script('saswp-select2-extended-script', SASWP_PLUGIN_URL. 'admin_section/js/select2-extended.min.js', array( 'jquery', 'jquery-core', 'jquery-ui-core' ), SASWP_VERSION, true);
|
894 |
-
|
895 |
}
|
896 |
//Enque select 2 script ends here
|
897 |
}
|
887 |
|
888 |
wp_localize_script( 'structure_admin', 'saswp_app_object', $data_array );
|
889 |
wp_enqueue_script( 'structure_admin' );
|
890 |
+
|
|
|
|
|
|
|
|
|
891 |
}
|
892 |
//Enque select 2 script ends here
|
893 |
}
|
core/array-list/local-sub-business.php
CHANGED
@@ -189,5 +189,6 @@ return array(
|
|
189 |
'primarycare' => 'Primary Care',
|
190 |
'psychiatric' => 'Psychiatric',
|
191 |
'publichealth' => 'Public Health',
|
|
|
192 |
)
|
193 |
);
|
189 |
'primarycare' => 'Primary Care',
|
190 |
'psychiatric' => 'Psychiatric',
|
191 |
'publichealth' => 'Public Health',
|
192 |
+
'veterinarycare' => 'VeterinaryCare',
|
193 |
)
|
194 |
);
|
core/array-list/schema-properties.php
CHANGED
@@ -1832,7 +1832,13 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
1832 |
'id' => 'saswp_product_schema_currency_'.$schema_id,
|
1833 |
'type' => 'text',
|
1834 |
'default' => saswp_remove_warnings($product_details, 'product_currency', 'saswp_string')
|
1835 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1836 |
array(
|
1837 |
'label' => 'Availability',
|
1838 |
'id' => 'saswp_product_schema_availability_'.$schema_id,
|
1832 |
'id' => 'saswp_product_schema_currency_'.$schema_id,
|
1833 |
'type' => 'text',
|
1834 |
'default' => saswp_remove_warnings($product_details, 'product_currency', 'saswp_string')
|
1835 |
+
),
|
1836 |
+
array(
|
1837 |
+
'label' => 'VAT',
|
1838 |
+
'id' => 'saswp_product_schema_vat_'.$schema_id,
|
1839 |
+
'type' => 'text',
|
1840 |
+
'default' => saswp_remove_warnings($product_details, 'product_vat', 'saswp_string')
|
1841 |
+
),
|
1842 |
array(
|
1843 |
'label' => 'Availability',
|
1844 |
'id' => 'saswp_product_schema_availability_'.$schema_id,
|
modules/reviews/reviews_collection.php
CHANGED
@@ -566,7 +566,7 @@ class SASWP_Reviews_Collection {
|
|
566 |
|
567 |
<div class="saswp-fomo-options saswp_hide saswp-coll-options">
|
568 |
<div class="saswp-dp-dsg saswp-dp-dtm">
|
569 |
-
<span><?php echo esc_html__('Delay Time','schema-and-structured-data-for-wp'); ?>
|
570 |
</span>
|
571 |
<input type="number" id="saswp_fomo_interval" name="saswp_fomo_interval" class="saswp-number-change" min="1" value="<?php echo (isset($post_meta['saswp_fomo_interval'][0]) ? $post_meta['saswp_fomo_interval'][0] : '3' ); ?>">
|
572 |
</div>
|
566 |
|
567 |
<div class="saswp-fomo-options saswp_hide saswp-coll-options">
|
568 |
<div class="saswp-dp-dsg saswp-dp-dtm">
|
569 |
+
<span><?php echo esc_html__('Delay Time In Sec','schema-and-structured-data-for-wp'); ?>
|
570 |
</span>
|
571 |
<input type="number" id="saswp_fomo_interval" name="saswp_fomo_interval" class="saswp-number-change" min="1" value="<?php echo (isset($post_meta['saswp_fomo_interval'][0]) ? $post_meta['saswp_fomo_interval'][0] : '3' ); ?>">
|
572 |
</div>
|
output/function.php
CHANGED
@@ -2044,7 +2044,8 @@ function saswp_append_fetched_reviews($input1, $schema_post_id = null){
|
|
2044 |
|
2045 |
if(isset($input1['review'])){
|
2046 |
|
2047 |
-
$input1['review']
|
|
|
2048 |
|
2049 |
}else{
|
2050 |
$input1 = array_merge($input1, $rv_markup);
|
2044 |
|
2045 |
if(isset($input1['review'])){
|
2046 |
|
2047 |
+
$input1['review'] = $rv_markup['review'];
|
2048 |
+
$input1['aggregateRating'] = $rv_markup['aggregateRating'];
|
2049 |
|
2050 |
}else{
|
2051 |
$input1 = array_merge($input1, $rv_markup);
|
output/markup.php
CHANGED
@@ -808,6 +808,12 @@ function saswp_product_schema_markup($schema_id, $schema_post_id, $all_post_meta
|
|
808 |
$input1['offers']['seller']['@type'] = 'Organization';
|
809 |
$input1['offers']['seller']['name'] = esc_attr($all_post_meta['saswp_product_schema_seller_'.$schema_id][0]);
|
810 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
811 |
}
|
812 |
|
813 |
if(isset($all_post_meta['saswp_product_schema_gtin8_'.$schema_id])){
|
@@ -1134,7 +1140,7 @@ function saswp_local_business_schema_markup($schema_id, $schema_post_id, $all_po
|
|
1134 |
$input1['hasMap'] = esc_url($all_post_meta['local_hasmap_'.$schema_id][0]);
|
1135 |
}
|
1136 |
|
1137 |
-
if(isset($all_post_meta['local_latitude_'.$schema_id][0]) && isset($all_post_meta['local_longitude_'.$schema_id][0])){
|
1138 |
|
1139 |
$input1['geo']['@type'] = 'GeoCoordinates';
|
1140 |
$input1['geo']['latitude'] = $all_post_meta['local_latitude_'.$schema_id][0];
|
808 |
$input1['offers']['seller']['@type'] = 'Organization';
|
809 |
$input1['offers']['seller']['name'] = esc_attr($all_post_meta['saswp_product_schema_seller_'.$schema_id][0]);
|
810 |
}
|
811 |
+
|
812 |
+
if(isset($all_post_meta['saswp_product_schema_vat_'.$schema_id])){
|
813 |
+
$input1['offers']['priceSpecification']['@type'] = 'priceSpecification';
|
814 |
+
$input1['offers']['priceSpecification']['valueAddedTaxIncluded'] = esc_attr($all_post_meta['saswp_product_schema_vat_'.$schema_id][0]);
|
815 |
+
}
|
816 |
+
|
817 |
}
|
818 |
|
819 |
if(isset($all_post_meta['saswp_product_schema_gtin8_'.$schema_id])){
|
1140 |
$input1['hasMap'] = esc_url($all_post_meta['local_hasmap_'.$schema_id][0]);
|
1141 |
}
|
1142 |
|
1143 |
+
if( (isset($all_post_meta['local_latitude_'.$schema_id][0]) && $all_post_meta['local_latitude_'.$schema_id][0] != '') && (isset($all_post_meta['local_longitude_'.$schema_id][0]) && $all_post_meta['local_longitude_'.$schema_id][0] !='' ) ){
|
1144 |
|
1145 |
$input1['geo']['@type'] = 'GeoCoordinates';
|
1146 |
$input1['geo']['latitude'] = $all_post_meta['local_latitude_'.$schema_id][0];
|
output/other-schema.php
CHANGED
@@ -96,4 +96,44 @@ function saswp_wordlift_amp_schema( $amp_template ) {
|
|
96 |
<?php
|
97 |
|
98 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
}
|
96 |
<?php
|
97 |
|
98 |
}
|
99 |
+
}
|
100 |
+
|
101 |
+
add_filter('saswp_modify_recipe_schema_output', 'saswp_wp_recipe_maker_json_ld',10,1);
|
102 |
+
|
103 |
+
function saswp_wp_recipe_maker_json_ld($input1){
|
104 |
+
|
105 |
+
global $sd_data;
|
106 |
+
|
107 |
+
$recipe_json = array();
|
108 |
+
|
109 |
+
if(isset($sd_data['saswp-wp-recipe-maker']) && $sd_data['saswp-wp-recipe-maker'] == 1){
|
110 |
+
|
111 |
+
$recipe_ids = saswp_get_ids_from_content_by_type('wp_recipe_maker');
|
112 |
+
|
113 |
+
if($recipe_ids){
|
114 |
+
|
115 |
+
foreach($recipe_ids as $recipe){
|
116 |
+
|
117 |
+
if(class_exists('WPRM_Recipe_Manager')){
|
118 |
+
|
119 |
+
$recipe_arr = WPRM_Recipe_Manager::get_recipe( $recipe );
|
120 |
+
|
121 |
+
if($recipe_arr){
|
122 |
+
$recipe_json[] = saswp_wp_recipe_schema_json($recipe_arr);
|
123 |
+
}
|
124 |
+
|
125 |
+
}
|
126 |
+
|
127 |
+
}
|
128 |
+
|
129 |
+
if($recipe_json){
|
130 |
+
$input1 = $recipe_json[0];
|
131 |
+
}
|
132 |
+
|
133 |
+
}
|
134 |
+
|
135 |
+
}
|
136 |
+
|
137 |
+
return $input1;
|
138 |
+
|
139 |
}
|
output/output.php
CHANGED
@@ -153,8 +153,7 @@ function saswp_schema_output() {
|
|
153 |
}
|
154 |
$service_object = new saswp_output_service();
|
155 |
|
156 |
-
$all_schema_output = array();
|
157 |
-
$recipe_json = array();
|
158 |
|
159 |
$site_name = get_bloginfo();
|
160 |
$image_id = get_post_thumbnail_id();
|
@@ -674,21 +673,15 @@ function saswp_schema_output() {
|
|
674 |
|
675 |
case 'Course':
|
676 |
|
677 |
-
$description = saswp_get_the_excerpt();
|
678 |
-
|
679 |
-
if(!$description){
|
680 |
-
$description = get_bloginfo('description');
|
681 |
-
}
|
682 |
-
|
683 |
$input1 = array(
|
684 |
'@context' => saswp_context_url(),
|
685 |
'@type' => $schema_type ,
|
686 |
'@id' => trailingslashit(saswp_get_permalink()).'#course',
|
687 |
-
'name'
|
688 |
-
'description'
|
689 |
'url' => trailingslashit(saswp_get_permalink()),
|
690 |
-
'datePublished'
|
691 |
-
'dateModified'
|
692 |
'author' => saswp_get_author_details(),
|
693 |
'provider' => array(
|
694 |
'@type' => 'Organization',
|
@@ -1158,44 +1151,19 @@ function saswp_schema_output() {
|
|
1158 |
break;
|
1159 |
|
1160 |
case 'Recipe':
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
$recipe_ids = saswp_get_ids_from_content_by_type('wp_recipe_maker');
|
1165 |
-
|
1166 |
-
if($recipe_ids){
|
1167 |
-
|
1168 |
-
foreach($recipe_ids as $recipe){
|
1169 |
-
|
1170 |
-
if(class_exists('WPRM_Recipe_Manager')){
|
1171 |
-
|
1172 |
-
$recipe_arr = WPRM_Recipe_Manager::get_recipe( $recipe );
|
1173 |
-
|
1174 |
-
if($recipe_arr){
|
1175 |
-
$recipe_json[] = saswp_wp_recipe_schema_json($recipe_arr);
|
1176 |
-
}
|
1177 |
-
|
1178 |
-
}
|
1179 |
-
|
1180 |
-
}
|
1181 |
-
|
1182 |
-
}
|
1183 |
-
|
1184 |
-
|
1185 |
-
}else{
|
1186 |
-
|
1187 |
-
$input1 = array(
|
1188 |
'@context' => saswp_context_url(),
|
1189 |
'@type' => $schema_type ,
|
1190 |
'@id' => trailingslashit(saswp_get_permalink()).'#recipe',
|
1191 |
'url' => trailingslashit(saswp_get_permalink()),
|
1192 |
-
'name'
|
1193 |
-
'datePublished'
|
1194 |
-
'dateModified'
|
1195 |
-
'description'
|
1196 |
-
'keywords'
|
1197 |
'author' => saswp_get_author_details(),
|
1198 |
-
|
1199 |
|
1200 |
if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
|
1201 |
$input1['comment'] = saswp_get_comments(get_the_ID());
|
@@ -1207,12 +1175,10 @@ function saswp_schema_output() {
|
|
1207 |
$input1 = array_merge($input1, $extra_theme_review);
|
1208 |
}
|
1209 |
|
1210 |
-
|
1211 |
-
|
1212 |
-
}
|
1213 |
-
|
1214 |
$input1 = apply_filters('saswp_modify_recipe_schema_output', $input1 );
|
1215 |
-
|
1216 |
$input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
|
1217 |
|
1218 |
if($modified_schema == 1){
|
@@ -1913,12 +1879,7 @@ function saswp_schema_output() {
|
|
1913 |
}
|
1914 |
|
1915 |
}
|
1916 |
-
|
1917 |
-
if($recipe_json){
|
1918 |
-
foreach($recipe_json as $json){
|
1919 |
-
array_push($all_schema_output, $json);
|
1920 |
-
}
|
1921 |
-
}
|
1922 |
return apply_filters('saswp_modify_schema_output', $all_schema_output);
|
1923 |
}
|
1924 |
/**
|
153 |
}
|
154 |
$service_object = new saswp_output_service();
|
155 |
|
156 |
+
$all_schema_output = array();
|
|
|
157 |
|
158 |
$site_name = get_bloginfo();
|
159 |
$image_id = get_post_thumbnail_id();
|
673 |
|
674 |
case 'Course':
|
675 |
|
|
|
|
|
|
|
|
|
|
|
|
|
676 |
$input1 = array(
|
677 |
'@context' => saswp_context_url(),
|
678 |
'@type' => $schema_type ,
|
679 |
'@id' => trailingslashit(saswp_get_permalink()).'#course',
|
680 |
+
'name' => saswp_get_the_title(),
|
681 |
+
'description' => saswp_get_the_excerpt(),
|
682 |
'url' => trailingslashit(saswp_get_permalink()),
|
683 |
+
'datePublished' => esc_html($date),
|
684 |
+
'dateModified' => esc_html($modified_date),
|
685 |
'author' => saswp_get_author_details(),
|
686 |
'provider' => array(
|
687 |
'@type' => 'Organization',
|
1151 |
break;
|
1152 |
|
1153 |
case 'Recipe':
|
1154 |
+
|
1155 |
+
$input1 = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1156 |
'@context' => saswp_context_url(),
|
1157 |
'@type' => $schema_type ,
|
1158 |
'@id' => trailingslashit(saswp_get_permalink()).'#recipe',
|
1159 |
'url' => trailingslashit(saswp_get_permalink()),
|
1160 |
+
'name' => saswp_get_the_title(),
|
1161 |
+
'datePublished' => esc_html($date),
|
1162 |
+
'dateModified' => esc_html($modified_date),
|
1163 |
+
'description' => saswp_get_the_excerpt(),
|
1164 |
+
'keywords' => saswp_get_the_tags(),
|
1165 |
'author' => saswp_get_author_details(),
|
1166 |
+
);
|
1167 |
|
1168 |
if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
|
1169 |
$input1['comment'] = saswp_get_comments(get_the_ID());
|
1175 |
$input1 = array_merge($input1, $extra_theme_review);
|
1176 |
}
|
1177 |
|
1178 |
+
$input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
|
1179 |
+
|
|
|
|
|
1180 |
$input1 = apply_filters('saswp_modify_recipe_schema_output', $input1 );
|
1181 |
+
|
1182 |
$input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
|
1183 |
|
1184 |
if($modified_schema == 1){
|
1879 |
}
|
1880 |
|
1881 |
}
|
1882 |
+
|
|
|
|
|
|
|
|
|
|
|
1883 |
return apply_filters('saswp_modify_schema_output', $all_schema_output);
|
1884 |
}
|
1885 |
/**
|
output/service.php
CHANGED
@@ -1604,6 +1604,10 @@ Class saswp_output_service{
|
|
1604 |
$input1['offers']['priceCurrency'] = $custom_fields['saswp_product_schema_currency'];
|
1605 |
$input1['offers']['url'] = $custom_fields['saswp_product_schema_url'];
|
1606 |
}
|
|
|
|
|
|
|
|
|
1607 |
if(isset($custom_fields['saswp_product_schema_priceValidUntil'])){
|
1608 |
$input1['offers']['priceValidUntil'] = $custom_fields['saswp_product_schema_priceValidUntil'];
|
1609 |
|
1604 |
$input1['offers']['priceCurrency'] = $custom_fields['saswp_product_schema_currency'];
|
1605 |
$input1['offers']['url'] = $custom_fields['saswp_product_schema_url'];
|
1606 |
}
|
1607 |
+
if(isset($custom_fields['saswp_product_schema_vat'])){
|
1608 |
+
$input1['offers']['priceSpecification']['@type'] = 'priceSpecification';
|
1609 |
+
$input1['offers']['priceSpecification']['valueAddedTaxIncluded'] = $custom_fields['saswp_product_schema_vat'];
|
1610 |
+
}
|
1611 |
if(isset($custom_fields['saswp_product_schema_priceValidUntil'])){
|
1612 |
$input1['offers']['priceValidUntil'] = $custom_fields['saswp_product_schema_priceValidUntil'];
|
1613 |
|
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.4
|
6 |
-
Stable tag: 1.9.41.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -120,6 +120,16 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
|
|
120 |
|
121 |
== Changelog ==
|
122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
= 1.9.41.2 (17 June 2020) =
|
124 |
|
125 |
* Fixed: Notice message : Undefined variable: selected in C #1069
|
3 |
Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.4
|
6 |
+
Stable tag: 1.9.41.3
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
120 |
|
121 |
== Changelog ==
|
122 |
|
123 |
+
= 1.9.41.3 (20 June 2020) =
|
124 |
+
|
125 |
+
* Enhancement: Make stars color yellow as default. #1062
|
126 |
+
* Fixed: Recipe schema is generating twice in website #1073
|
127 |
+
* Fixed: Shortcode is being displayed in the description. #1074
|
128 |
+
* Fixed: JS bug after 1.9.41 improvement #1067
|
129 |
+
* Fixed: If the "Product Default Review" option is enabled then the collection review count is not showing #1066
|
130 |
+
* Added: VAT Schema Property in product #873
|
131 |
+
* Added: Veterinary Care schema type in MedicalBusiness inside LocalBusiness
|
132 |
+
|
133 |
= 1.9.41.2 (17 June 2020) =
|
134 |
|
135 |
* Fixed: Notice message : Undefined variable: selected in C #1069
|
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.41.
|
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.41.
|
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.41.3
|
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.41.3');
|
17 |
define('SASWP_DIR_NAME_FILE', __FILE__ );
|
18 |
define('SASWP_DIR_NAME', dirname( __FILE__ ));
|
19 |
define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
|