diff --git a/assets/js/admin/editor-lang.php b/assets/js/admin/editor-lang.php index 15ba4487..627b5899 100644 --- a/assets/js/admin/editor-lang.php +++ b/assets/js/admin/editor-lang.php @@ -32,27 +32,27 @@ $raw = apply_filters( 'sportspress_tinymce_strings', array( 'shortcodes' => $shortcodes, - 'insert' => __( 'SportsPress Shortcodes', 'sportspress' ), - 'auto' => __( 'Auto', 'sportspress' ), - 'manual' => __( 'Manual', 'sportspress' ), - 'select' => __( 'Select...', 'sportspress' ), - 'event' => __( 'Event', 'sportspress' ), - 'details' => __( 'Details', 'sportspress' ), - 'results' => __( 'Results', 'sportspress' ), - 'countdown' => __( 'Countdown', 'sportspress' ), - 'performance' => __( 'Box Score', 'sportspress' ), - 'venue' => __( 'Venue', 'sportspress' ), - 'officials' => __( 'Officials', 'sportspress' ), - 'teams' => __( 'Teams', 'sportspress' ), - 'full' => __( 'Full Info', 'sportspress' ), - 'calendar' => __( 'Calendar', 'sportspress' ), - 'statistics' => __( 'Statistics', 'sportspress' ), - 'team' => __( 'Team', 'sportspress' ), - 'standings' => __( 'League Table', 'sportspress' ), - 'player' => __( 'Player', 'sportspress' ), - 'list' => __( 'List', 'sportspress' ), - 'blocks' => __( 'Blocks', 'sportspress' ), - 'gallery' => __( 'Gallery', 'sportspress' ), + 'insert' => esc_attr__( 'SportsPress Shortcodes', 'sportspress' ), + 'auto' => esc_attr__( 'Auto', 'sportspress' ), + 'manual' => esc_attr__( 'Manual', 'sportspress' ), + 'select' => esc_attr__( 'Select...', 'sportspress' ), + 'event' => esc_attr__( 'Event', 'sportspress' ), + 'details' => esc_attr__( 'Details', 'sportspress' ), + 'results' => esc_attr__( 'Results', 'sportspress' ), + 'countdown' => esc_attr__( 'Countdown', 'sportspress' ), + 'performance' => esc_attr__( 'Box Score', 'sportspress' ), + 'venue' => esc_attr__( 'Venue', 'sportspress' ), + 'officials' => esc_attr__( 'Officials', 'sportspress' ), + 'teams' => esc_attr__( 'Teams', 'sportspress' ), + 'full' => esc_attr__( 'Full Info', 'sportspress' ), + 'calendar' => esc_attr__( 'Calendar', 'sportspress' ), + 'statistics' => esc_attr__( 'Statistics', 'sportspress' ), + 'team' => esc_attr__( 'Team', 'sportspress' ), + 'standings' => esc_attr__( 'League Table', 'sportspress' ), + 'player' => esc_attr__( 'Player', 'sportspress' ), + 'list' => esc_attr__( 'List', 'sportspress' ), + 'blocks' => esc_attr__( 'Blocks', 'sportspress' ), + 'gallery' => esc_attr__( 'Gallery', 'sportspress' ), ) ); diff --git a/assets/js/leaflet.js b/assets/js/leaflet.js index 21f499c3..48a21b13 100644 --- a/assets/js/leaflet.js +++ b/assets/js/leaflet.js @@ -2,5 +2,5 @@ * Leaflet 1.7.1, a JS library for interactive maps. http://leafletjs.com * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade */ -!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.L={})}(this,function(t){"use strict";function h(t){for(var i,e,n=1,o=arguments.length;n=this.min.x&&e.x<=this.max.x&&i.y>=this.min.y&&e.y<=this.max.y},intersects:function(t){t=O(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>=i.x&&n.x<=e.x,r=o.y>=i.y&&n.y<=e.y;return s&&r},overlaps:function(t){t=O(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>i.x&&n.xi.y&&n.y=n.lat&&e.lat<=o.lat&&i.lng>=n.lng&&e.lng<=o.lng},intersects:function(t){t=N(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=i.lat&&n.lat<=e.lat,r=o.lng>=i.lng&&n.lng<=e.lng;return s&&r},overlaps:function(t){t=N(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>i.lat&&n.lati.lng&&n.lng';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}();function kt(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var Bt={ie:tt,ielt9:it,edge:et,webkit:nt,android:ot,android23:st,androidStock:at,opera:ht,chrome:ut,gecko:lt,safari:ct,phantom:_t,opera12:dt,win:pt,ie3d:mt,webkit3d:ft,gecko3d:gt,any3d:vt,mobile:yt,mobileWebkit:xt,mobileWebkit3d:wt,msPointer:Pt,pointer:Lt,touch:bt,mobileOpera:Tt,mobileGecko:Mt,retina:zt,passiveEvents:Ct,canvas:St,svg:Zt,vml:Et},At=Pt?"MSPointerDown":"pointerdown",It=Pt?"MSPointerMove":"pointermove",Ot=Pt?"MSPointerUp":"pointerup",Rt=Pt?"MSPointerCancel":"pointercancel",Nt={},Dt=!1;function jt(t,i,e,n){function o(t){Ut(t,r)}var s,r,a,h,u,l,c,_;function d(t){t.pointerType===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&0===t.buttons||Ut(t,h)}return"touchstart"===i?(u=t,l=e,c=n,_=p(function(t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Ri(t),Ut(t,l)}),u["_leaflet_touchstart"+c]=_,u.addEventListener(At,_,!1),Dt||(document.addEventListener(At,Wt,!0),document.addEventListener(It,Ht,!0),document.addEventListener(Ot,Ft,!0),document.addEventListener(Rt,Ft,!0),Dt=!0)):"touchmove"===i?(h=e,(a=t)["_leaflet_touchmove"+n]=d,a.addEventListener(It,d,!1)):"touchend"===i&&(r=e,(s=t)["_leaflet_touchend"+n]=o,s.addEventListener(Ot,o,!1),s.addEventListener(Rt,o,!1)),this}function Wt(t){Nt[t.pointerId]=t}function Ht(t){Nt[t.pointerId]&&(Nt[t.pointerId]=t)}function Ft(t){delete Nt[t.pointerId]}function Ut(t,i){for(var e in t.touches=[],Nt)t.touches.push(Nt[e]);t.changedTouches=[t],i(t)}var Vt=Pt?"MSPointerDown":Lt?"pointerdown":"touchstart",qt=Pt?"MSPointerUp":Lt?"pointerup":"touchend",Gt="_leaflet_";var Kt,Yt,Xt,Jt,$t,Qt,ti=fi(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ii=fi(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ei="webkitTransition"===ii||"OTransition"===ii?ii+"End":"transitionend";function ni(t){return"string"==typeof t?document.getElementById(t):t}function oi(t,i){var e,n=t.style[i]||t.currentStyle&&t.currentStyle[i];return n&&"auto"!==n||!document.defaultView||(n=(e=document.defaultView.getComputedStyle(t,null))?e[i]:null),"auto"===n?null:n}function si(t,i,e){var n=document.createElement(t);return n.className=i||"",e&&e.appendChild(n),n}function ri(t){var i=t.parentNode;i&&i.removeChild(t)}function ai(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function hi(t){var i=t.parentNode;i&&i.lastChild!==t&&i.appendChild(t)}function ui(t){var i=t.parentNode;i&&i.firstChild!==t&&i.insertBefore(t,i.firstChild)}function li(t,i){if(void 0!==t.classList)return t.classList.contains(i);var e=pi(t);return 0this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,i){this._enforcingBounds=!0;var e=this.getCenter(),n=this._limitCenter(e,this._zoom,N(t));return e.equals(n)||this.panTo(n,i),this._enforcingBounds=!1,this},panInside:function(t,i){var e,n,o=A((i=i||{}).paddingTopLeft||i.padding||[0,0]),s=A(i.paddingBottomRight||i.padding||[0,0]),r=this.getCenter(),a=this.project(r),h=this.project(t),u=this.getPixelBounds(),l=u.getSize().divideBy(2),c=O([u.min.add(o),u.max.subtract(s)]);return c.contains(h)||(this._enforcingBounds=!0,e=a.subtract(h),n=A(h.x+e.x,h.y+e.y),(h.xc.max.x)&&(n.x=a.x-e.x,0c.max.y)&&(n.y=a.y-e.y,0=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,i){for(var e,n=[],o="mouseout"===i||"mouseover"===i,s=t.target||t.srcElement,r=!1;s;){if((e=this._targets[m(s)])&&("click"===i||"preclick"===i)&&!t._simulated&&this._draggableMoved(e)){r=!0;break}if(e&&e.listens(i,!0)){if(o&&!Vi(s,t))break;if(n.push(e),o)break}if(s===this._container)break;s=s.parentNode}return n.length||r||o||!Vi(s,t)||(n=[this]),n},_handleDOMEvent:function(t){var i;this._loaded&&!Ui(t)&&("mousedown"!==(i=t.type)&&"keypress"!==i&&"keyup"!==i&&"keydown"!==i||Pi(t.target||t.srcElement),this._fireDOMEvent(t,i))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,i,e){var n;if("click"===t.type&&((n=h({},t)).type="preclick",this._fireDOMEvent(n,n.type,e)),!t._stopped&&(e=(e||[]).concat(this._findEventTargets(t,i))).length){var o=e[0];"contextmenu"===i&&o.listens(i,!0)&&Ri(t);var s,r={originalEvent:t};"keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type&&(s=o.getLatLng&&(!o._radius||o._radius<=10),r.containerPoint=s?this.latLngToContainerPoint(o.getLatLng()):this.mouseEventToContainerPoint(t),r.layerPoint=this.containerPointToLayerPoint(r.containerPoint),r.latlng=s?o.getLatLng():this.layerPointToLatLng(r.layerPoint));for(var a=0;athis.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(i),o=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==e.animate&&!this.getSize().contains(o))&&(M(function(){this._moveStart(!0,!1)._animateZoom(t,i,!0)},this),!0)},_animateZoom:function(t,i,e,n){this._mapPane&&(e&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=i,ci(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:i,noUpdate:n}),setTimeout(p(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&_i(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),M(function(){this._moveEnd(!0)},this))}});function Yi(t){return new Xi(t)}var Xi=S.extend({options:{position:"topright"},initialize:function(t){c(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var i=this._map;return i&&i.removeControl(this),this.options.position=t,i&&i.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var i=this._container=this.onAdd(t),e=this.getPosition(),n=t._controlCorners[e];return ci(i,"leaflet-control"),-1!==e.indexOf("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(ri(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0",n=document.createElement("div");return n.innerHTML=e,n.firstChild},_addItem:function(t){var i,e=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((i=document.createElement("input")).type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=n):i=this._createRadioElement("leaflet-base-layers_"+m(this),n),this._layerControlInputs.push(i),i.layerId=m(t.layer),zi(i,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("div");return e.appendChild(s),s.appendChild(i),s.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){var t,i,e=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=e.length-1;0<=s;s--)t=e[s],i=this._getLayer(t.layerId).layer,t.checked?n.push(i):t.checked||o.push(i);for(s=0;si.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),$i=Xi.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var i="leaflet-control-zoom",e=si("div",i+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,i+"-in",e,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,i+"-out",e,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),e},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,i,e,n,o){var s=si("a",e,n);return s.innerHTML=t,s.href="#",s.title=i,s.setAttribute("role","button"),s.setAttribute("aria-label",i),Oi(s),zi(s,"click",Ni),zi(s,"click",o,this),zi(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,i="leaflet-disabled";_i(this._zoomInButton,i),_i(this._zoomOutButton,i),!this._disabled&&t._zoom!==t.getMinZoom()||ci(this._zoomOutButton,i),!this._disabled&&t._zoom!==t.getMaxZoom()||ci(this._zoomInButton,i)}});Ki.mergeOptions({zoomControl:!0}),Ki.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new $i,this.addControl(this.zoomControl))});var Qi=Xi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var i="leaflet-control-scale",e=si("div",i),n=this.options;return this._addScales(n,i+"-line",e),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,i,e){t.metric&&(this._mScale=si("div",i,e)),t.imperial&&(this._iScale=si("div",i,e))},_update:function(){var t=this._map,i=t.getSize().y/2,e=t.distance(t.containerPointToLatLng([0,i]),t.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var i=this._getRoundNum(t),e=i<1e3?i+" m":i/1e3+" km";this._updateScale(this._mScale,e,i/t)},_updateImperial:function(t){var i,e,n,o=3.2808399*t;5280Leaflet'},initialize:function(t){c(this,t),this._attributions={}},onAdd:function(t){for(var i in(t.attributionControl=this)._container=si("div","leaflet-control-attribution"),Oi(this._container),t._layers)t._layers[i].getAttribution&&this.addAttribution(t._layers[i].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t=[];for(var i in this._attributions)this._attributions[i]&&t.push(i);var e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(" | ")}}});Ki.mergeOptions({attributionControl:!0}),Ki.addInitHook(function(){this.options.attributionControl&&(new te).addTo(this)});Xi.Layers=Ji,Xi.Zoom=$i,Xi.Scale=Qi,Xi.Attribution=te,Yi.layers=function(t,i,e){return new Ji(t,i,e)},Yi.zoom=function(t){return new $i(t)},Yi.scale=function(t){return new Qi(t)},Yi.attribution=function(t){return new te(t)};var ie=S.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}});ie.addTo=function(t,i){return t.addHandler(i,this),this};var ee,ne={Events:Z},oe=bt?"touchstart mousedown":"mousedown",se={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},re={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},ae=E.extend({options:{clickTolerance:3},initialize:function(t,i,e,n){c(this,n),this._element=t,this._dragStartTarget=i||t,this._preventOutline=e},enable:function(){this._enabled||(zi(this._dragStartTarget,oe,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ae._dragging===this&&this.finishDrag(),Si(this._dragStartTarget,oe,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var i,e;!t._simulated&&this._enabled&&(this._moved=!1,li(this._element,"leaflet-zoom-anim")||ae._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((ae._dragging=this)._preventOutline&&Pi(this._element),xi(),Xt(),this._moving||(this.fire("down"),i=t.touches?t.touches[0]:t,e=bi(this._element),this._startPoint=new k(i.clientX,i.clientY),this._parentScale=Ti(e),zi(document,re[t.type],this._onMove,this),zi(document,se[t.type],this._onUp,this))))},_onMove:function(t){var i,e;!t._simulated&&this._enabled&&(t.touches&&1i&&(e.push(t[n]),o=n);oi.max.x&&(e|=2),t.yi.max.y&&(e|=8),e}function de(t,i,e,n){var o,s=i.x,r=i.y,a=e.x-s,h=e.y-r,u=a*a+h*h;return 0this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()t.y!=n.y>t.y&&t.x<(n.x-e.x)*(t.y-e.y)/(n.y-e.y)+e.x&&(u=!u);return u||Oe.prototype._containsPoint.call(this,t,!0)}});var Ne=Ce.extend({initialize:function(t,i){c(this,i),this._layers={},t&&this.addData(t)},addData:function(t){var i,e,n,o=g(t)?t:t.features;if(o){for(i=0,e=o.length;iu.x&&(l=s.x+n-u.x+h.x),s.x-l-a.x<0&&(l=s.x-a.x),s.y+e+h.y>u.y&&(c=s.y+e-u.y+h.y),s.y-c-a.y<0&&(c=s.y-a.y),(l||c)&&t.fire("autopanstart").panBy([l,c]))},_onCloseButtonClick:function(t){this._close(),Ni(t)},_getAnchor:function(){return A(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Ki.mergeOptions({closePopupOnClick:!0}),Ki.include({openPopup:function(t,i,e){return t instanceof tn||(t=new tn(e).setContent(t)),i&&t.setLatLng(i),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Me.include({bindPopup:function(t,i){return t instanceof tn?(c(t,i),(this._popup=t)._source=this):(this._popup&&!i||(this._popup=new tn(i,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,i){return this._popup&&this._map&&(i=this._popup._prepareOpen(this,t,i),this._map.openPopup(this._popup,i)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var i=t.layer||t.target;this._popup&&this._map&&(Ni(t),i instanceof Be?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===i?this.closePopup():this.openPopup(i,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var en=Qe.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){Qe.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){Qe.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=Qe.prototype.getEvents.call(this);return bt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=si("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var i,e=this._map,n=this._container,o=e.latLngToContainerPoint(e.getCenter()),s=e.layerPointToContainerPoint(t),r=this.options.direction,a=n.offsetWidth,h=n.offsetHeight,u=A(this.options.offset),l=this._getAnchor(),c="top"===r?(i=a/2,h):"bottom"===r?(i=a/2,0):(i="center"===r?a/2:"right"===r?0:"left"===r?a:s.xthis.options.maxZoom||nthis.options.maxZoom||void 0!==this.options.minZoom&&oe.max.x)||!i.wrapLat&&(t.ye.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return N(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var i=this._map,e=this.getTileSize(),n=t.scaleBy(e),o=n.add(e);return[i.unproject(n,t.z),i.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var i=this._tileCoordsToNwSe(t),e=new R(i[0],i[1]);return this.options.noWrap||(e=this._map.wrapLatLngBounds(e)),e},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var i=t.split(":"),e=new k(+i[0],+i[1]);return e.z=+i[2],e},_removeTile:function(t){var i=this._tiles[t];i&&(ri(i.el),delete this._tiles[t],this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ci(t,"leaflet-tile");var i=this.getTileSize();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=a,t.onmousemove=a,it&&this.options.opacity<1&&mi(t,this.options.opacity),ot&&!st&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,i){var e=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),p(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&M(p(this._tileReady,this,t,null,o)),vi(o,e),this._tiles[n]={el:o,coords:t,current:!0},i.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,i,e){i&&this.fire("tileerror",{error:i,tile:e,coords:t});var n=this._tileCoordsToKey(t);(e=this._tiles[n])&&(e.loaded=+new Date,this._map._fadeAnimated?(mi(e.el,0),z(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this)):(e.active=!0,this._pruneTiles()),i||(ci(e.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:e.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),it||!this._map._fadeAnimated?M(this._pruneTiles,this):setTimeout(p(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var i=new k(this._wrapX?o(t.x,this._wrapX):t.x,this._wrapY?o(t.y,this._wrapY):t.y);return i.z=t.z,i},_pxBoundsToTileRange:function(t){var i=this.getTileSize();return new I(t.min.unscaleBy(i).floor(),t.max.unscaleBy(i).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});var sn=on.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,i){this._url=t,(i=c(this,i)).detectRetina&&zt&&0')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_n={_initContainer:function(){this._container=si("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(hn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var i=t._container=cn("shape");ci(i,"leaflet-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t._path=cn("path"),i.appendChild(t._path),this._updateStyle(t),this._layers[m(t)]=t},_addPath:function(t){var i=t._container;this._container.appendChild(i),t.options.interactive&&t.addInteractiveTarget(i)},_removePath:function(t){var i=t._container;ri(i),t.removeInteractiveTarget(i),delete this._layers[m(t)]},_updateStyle:function(t){var i=t._stroke,e=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(i=i||(t._stroke=cn("stroke")),o.appendChild(i),i.weight=n.weight+"px",i.color=n.color,i.opacity=n.opacity,n.dashArray?i.dashStyle=g(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):i.dashStyle="",i.endcap=n.lineCap.replace("butt","flat"),i.joinstyle=n.lineJoin):i&&(o.removeChild(i),t._stroke=null),n.fill?(e=e||(t._fill=cn("fill")),o.appendChild(e),e.color=n.fillColor||n.color,e.opacity=n.fillOpacity):e&&(o.removeChild(e),t._fill=null)},_updateCircle:function(t){var i=t._point.round(),e=Math.round(t._radius),n=Math.round(t._radiusY||e);this._setPath(t,t._empty()?"M0 0":"AL "+i.x+","+i.y+" "+e+","+n+" 0,23592600")},_setPath:function(t,i){t._path.v=i},_bringToFront:function(t){hi(t._container)},_bringToBack:function(t){ui(t._container)}},dn=Et?cn:J,pn=hn.extend({getEvents:function(){var t=hn.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=dn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=dn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ri(this._container),Si(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){var t,i,e;this._map._animatingZoom&&this._bounds||(hn.prototype._update.call(this),i=(t=this._bounds).getSize(),e=this._container,this._svgSize&&this._svgSize.equals(i)||(this._svgSize=i,e.setAttribute("width",i.x),e.setAttribute("height",i.y)),vi(e,t.min),e.setAttribute("viewBox",[t.min.x,t.min.y,i.x,i.y].join(" ")),this.fire("update"))},_initPath:function(t){var i=t._path=dn("path");t.options.className&&ci(i,t.options.className),t.options.interactive&&ci(i,"leaflet-interactive"),this._updateStyle(t),this._layers[m(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ri(t._path),t.removeInteractiveTarget(t._path),delete this._layers[m(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var i=t._path,e=t.options;i&&(e.stroke?(i.setAttribute("stroke",e.color),i.setAttribute("stroke-opacity",e.opacity),i.setAttribute("stroke-width",e.weight),i.setAttribute("stroke-linecap",e.lineCap),i.setAttribute("stroke-linejoin",e.lineJoin),e.dashArray?i.setAttribute("stroke-dasharray",e.dashArray):i.removeAttribute("stroke-dasharray"),e.dashOffset?i.setAttribute("stroke-dashoffset",e.dashOffset):i.removeAttribute("stroke-dashoffset")):i.setAttribute("stroke","none"),e.fill?(i.setAttribute("fill",e.fillColor||e.color),i.setAttribute("fill-opacity",e.fillOpacity),i.setAttribute("fill-rule",e.fillRule||"evenodd")):i.setAttribute("fill","none"))},_updatePoly:function(t,i){this._setPath(t,$(t._parts,i))},_updateCircle:function(t){var i=t._point,e=Math.max(Math.round(t._radius),1),n="a"+e+","+(Math.max(Math.round(t._radiusY),1)||e)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(i.x-e)+","+i.y+n+2*e+",0 "+n+2*-e+",0 ";this._setPath(t,o)},_setPath:function(t,i){t._path.setAttribute("d",i)},_bringToFront:function(t){hi(t._path)},_bringToBack:function(t){ui(t._path)}});function mn(t){return Zt||Et?new pn(t):null}Et&&pn.include(_n),Ki.include({getRenderer:function(t){var i=(i=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer());return this.hasLayer(i)||this.addLayer(i),i},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var i=this._paneRenderers[t];return void 0===i&&(i=this._createRenderer({pane:t}),this._paneRenderers[t]=i),i},_createRenderer:function(t){return this.options.preferCanvas&&ln(t)||mn(t)}});var fn=Re.extend({initialize:function(t,i){Re.prototype.initialize.call(this,this._boundsToLatLngs(t),i)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=N(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});pn.create=dn,pn.pointsToPath=$,Ne.geometryToLayer=De,Ne.coordsToLatLng=We,Ne.coordsToLatLngs=He,Ne.latLngToCoords=Fe,Ne.latLngsToCoords=Ue,Ne.getFeature=Ve,Ne.asFeature=qe,Ki.mergeOptions({boxZoom:!0});var gn=ie.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){zi(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Si(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ri(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Xt(),xi(),this._startPoint=this._map.mouseEventToContainerPoint(t),zi(document,{contextmenu:Ni,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=si("div","leaflet-zoom-box",this._container),ci(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var i=new I(this._point,this._startPoint),e=i.getSize();vi(this._box,i.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(ri(this._box),_i(this._container,"leaflet-crosshair")),Jt(),wi(),Si(document,{contextmenu:Ni,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){var i;1!==t.which&&1!==t.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(p(this._resetState,this),0),i=new R(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(i).fire("boxzoomend",{boxZoomBounds:i})))},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});Ki.addInitHook("addHandler","boxZoom",gn),Ki.mergeOptions({doubleClickZoom:!0});var vn=ie.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var i=this._map,e=i.getZoom(),n=i.options.zoomDelta,o=t.originalEvent.shiftKey?e-n:e+n;"center"===i.options.doubleClickZoom?i.setZoom(o):i.setZoomAround(t.containerPoint,o)}});Ki.addInitHook("addHandler","doubleClickZoom",vn),Ki.mergeOptions({dragging:!0,inertia:!st,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var yn=ie.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new ae(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))),ci(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){_i(this._map._container,"leaflet-grab"),_i(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,i=this._map;i._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=N(this._map.options.maxBounds),this._offsetLimit=O(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,i.fire("movestart").fire("dragstart"),i.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var i,e;this._map.options.inertia&&(i=this._lastTime=+new Date,e=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(e),this._times.push(i),this._prunePositions(i)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1i.max.x&&(t.x=this._viscousLimit(t.x,i.max.x)),t.y>i.max.y&&(t.y=this._viscousLimit(t.y,i.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,i=Math.round(t/2),e=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-i+e)%t+i-e,s=(n+i+e)%t-i-e,r=Math.abs(o+e)i.getMaxZoom()&&1=this.min.x&&e.x<=this.max.x&&i.y>=this.min.y&&e.y<=this.max.y},intersects:function(t){t=O(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>=i.x&&n.x<=e.x,r=o.y>=i.y&&n.y<=e.y;return s&&r},overlaps:function(t){t=O(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>i.x&&n.xi.y&&n.y=n.lat&&e.lat<=o.lat&&i.lng>=n.lng&&e.lng<=o.lng},intersects:function(t){t=N(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=i.lat&&n.lat<=e.lat,r=o.lng>=i.lng&&n.lng<=e.lng;return s&&r},overlaps:function(t){t=N(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>i.lat&&n.lati.lng&&n.lng';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}();function kt(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var Bt={ie:tt,ielt9:it,edge:et,webkit:nt,android:ot,android23:st,androidStock:at,opera:ht,chrome:ut,gecko:lt,safari:ct,phantom:_t,opera12:dt,win:pt,ie3d:mt,webkit3d:ft,gecko3d:gt,any3d:vt,mobile:yt,mobileWebkit:xt,mobileWebkit3d:wt,msPointer:Pt,pointer:Lt,touch:bt,mobileOpera:Tt,mobileGecko:Mt,retina:zt,passiveEvents:Ct,canvas:St,svg:Zt,vml:Et},At=Pt?"MSPointerDown":"pointerdown",It=Pt?"MSPointerMove":"pointermove",Ot=Pt?"MSPointerUp":"pointerup",Rt=Pt?"MSPointerCancel":"pointercancel",Nt={},Dt=!1;function jt(t,i,e,n){function o(t){Ut(t,r)}var s,r,a,h,u,l,c,_;function d(t){t.pointerType===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&0===t.buttons||Ut(t,h)}return"touchstart"===i?(u=t,l=e,c=n,_=p(function(t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Ri(t),Ut(t,l)}),u["_leaflet_touchstart"+c]=_,u.addEventListener(At,_,!1),Dt||(document.addEventListener(At,Wt,!0),document.addEventListener(It,Ht,!0),document.addEventListener(Ot,Ft,!0),document.addEventListener(Rt,Ft,!0),Dt=!0)):"touchmove"===i?(h=e,(a=t)["_leaflet_touchmove"+n]=d,a.addEventListener(It,d,!1)):"touchend"===i&&(r=e,(s=t)["_leaflet_touchend"+n]=o,s.addEventListener(Ot,o,!1),s.addEventListener(Rt,o,!1)),this}function Wt(t){Nt[t.pointerId]=t}function Ht(t){Nt[t.pointerId]&&(Nt[t.pointerId]=t)}function Ft(t){delete Nt[t.pointerId]}function Ut(t,i){for(var e in t.touches=[],Nt)t.touches.push(Nt[e]);t.changedTouches=[t],i(t)}var Vt=Pt?"MSPointerDown":Lt?"pointerdown":"touchstart",qt=Pt?"MSPointerUp":Lt?"pointerup":"touchend",Gt="_leaflet_";var Kt,Yt,Xt,Jt,$t,Qt,ti=fi(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ii=fi(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ei="webkitTransition"===ii||"OTransition"===ii?ii+"End":"transitionend";function ni(t){return"string"==typeof t?document.getElementById(t):t}function oi(t,i){var e,n=t.style[i]||t.currentStyle&&t.currentStyle[i];return n&&"auto"!==n||!document.defaultView||(n=(e=document.defaultView.getComputedStyle(t,null))?e[i]:null),"auto"===n?null:n}function si(t,i,e){var n=document.createElement(t);return n.className=i||"",e&&e.appendChild(n),n}function ri(t){var i=t.parentNode;i&&i.removeChild(t)}function ai(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function hi(t){var i=t.parentNode;i&&i.lastChild!==t&&i.appendChild(t)}function ui(t){var i=t.parentNode;i&&i.firstChild!==t&&i.insertBefore(t,i.firstChild)}function li(t,i){if(void 0!==t.classList)return t.classList.contains(i);var e=pi(t);return 0this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,i){this._enforcingBounds=!0;var e=this.getCenter(),n=this._limitCenter(e,this._zoom,N(t));return e.equals(n)||this.panTo(n,i),this._enforcingBounds=!1,this},panInside:function(t,i){var e,n,o=A((i=i||{}).paddingTopLeft||i.padding||[0,0]),s=A(i.paddingBottomRight||i.padding||[0,0]),r=this.getCenter(),a=this.project(r),h=this.project(t),u=this.getPixelBounds(),l=u.getSize().divideBy(2),c=O([u.min.add(o),u.max.subtract(s)]);return c.contains(h)||(this._enforcingBounds=!0,e=a.subtract(h),n=A(h.x+e.x,h.y+e.y),(h.xc.max.x)&&(n.x=a.x-e.x,0c.max.y)&&(n.y=a.y-e.y,0=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,i){for(var e,n=[],o="mouseout"===i||"mouseover"===i,s=t.target||t.srcElement,r=!1;s;){if((e=this._targets[m(s)])&&("click"===i||"preclick"===i)&&!t._simulated&&this._draggableMoved(e)){r=!0;break}if(e&&e.listens(i,!0)){if(o&&!Vi(s,t))break;if(n.push(e),o)break}if(s===this._container)break;s=s.parentNode}return n.length||r||o||!Vi(s,t)||(n=[this]),n},_handleDOMEvent:function(t){var i;this._loaded&&!Ui(t)&&("mousedown"!==(i=t.type)&&"keypress"!==i&&"keyup"!==i&&"keydown"!==i||Pi(t.target||t.srcElement),this._fireDOMEvent(t,i))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,i,e){var n;if("click"===t.type&&((n=h({},t)).type="preclick",this._fireDOMEvent(n,n.type,e)),!t._stopped&&(e=(e||[]).concat(this._findEventTargets(t,i))).length){var o=e[0];"contextmenu"===i&&o.listens(i,!0)&&Ri(t);var s,r={originalEvent:t};"keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type&&(s=o.getLatLng&&(!o._radius||o._radius<=10),r.containerPoint=s?this.latLngToContainerPoint(o.getLatLng()):this.mouseEventToContainerPoint(t),r.layerPoint=this.containerPointToLayerPoint(r.containerPoint),r.latlng=s?o.getLatLng():this.layerPointToLatLng(r.layerPoint));for(var a=0;athis.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(i),o=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==e.animate&&!this.getSize().contains(o))&&(M(function(){this._moveStart(!0,!1)._animateZoom(t,i,!0)},this),!0)},_animateZoom:function(t,i,e,n){this._mapPane&&(e&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=i,ci(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:i,noUpdate:n}),setTimeout(p(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&_i(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),M(function(){this._moveEnd(!0)},this))}});function Yi(t){return new Xi(t)}var Xi=S.extend({options:{position:"topright"},initialize:function(t){c(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var i=this._map;return i&&i.removeControl(this),this.options.position=t,i&&i.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var i=this._container=this.onAdd(t),e=this.getPosition(),n=t._controlCorners[e];return ci(i,"leaflet-control"),-1!==e.indexOf("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(ri(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0",n=document.createElement("div");return n.innerHTML=e,n.firstChild},_addItem:function(t){var i,e=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((i=document.createElement("input")).type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=n):i=this._createRadioElement("leaflet-base-layers_"+m(this),n),this._layerControlInputs.push(i),i.layerId=m(t.layer),zi(i,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("div");return e.appendChild(s),s.appendChild(i),s.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){var t,i,e=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=e.length-1;0<=s;s--)t=e[s],i=this._getLayer(t.layerId).layer,t.checked?n.push(i):t.checked||o.push(i);for(s=0;si.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),$i=Xi.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var i="leaflet-control-zoom",e=si("div",i+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,i+"-in",e,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,i+"-out",e,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),e},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,i,e,n,o){var s=si("a",e,n);return s.innerHTML=t,s.href="#",s.title=i,s.setAttribute("role","button"),s.setAttribute("aria-label",i),Oi(s),zi(s,"click",Ni),zi(s,"click",o,this),zi(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,i="leaflet-disabled";_i(this._zoomInButton,i),_i(this._zoomOutButton,i),!this._disabled&&t._zoom!==t.getMinZoom()||ci(this._zoomOutButton,i),!this._disabled&&t._zoom!==t.getMaxZoom()||ci(this._zoomInButton,i)}});Ki.mergeOptions({zoomControl:!0}),Ki.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new $i,this.addControl(this.zoomControl))});var Qi=Xi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var i="leaflet-control-scale",e=si("div",i),n=this.options;return this._addScales(n,i+"-line",e),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,i,e){t.metric&&(this._mScale=si("div",i,e)),t.imperial&&(this._iScale=si("div",i,e))},_update:function(){var t=this._map,i=t.getSize().y/2,e=t.distance(t.containerPointToLatLng([0,i]),t.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var i=this._getRoundNum(t),e=i<1e3?i+" m":i/1e3+" km";this._updateScale(this._mScale,e,i/t)},_updateImperial:function(t){var i,e,n,o=3.2808399*t;5280Leaflet'},initialize:function(t){c(this,t),this._attributions={}},onAdd:function(t){for(var i in(t.attributionControl=this)._container=si("div","leaflet-control-attribution"),Oi(this._container),t._layers)t._layers[i].getAttribution&&this.addAttribution(t._layers[i].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t=[];for(var i in this._attributions)this._attributions[i]&&t.push(i);var e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(" | ")}}});Ki.mergeOptions({attributionControl:!0}),Ki.addInitHook(function(){this.options.attributionControl&&(new te).addTo(this)});Xi.Layers=Ji,Xi.Zoom=$i,Xi.Scale=Qi,Xi.Attribution=te,Yi.layers=function(t,i,e){return new Ji(t,i,e)},Yi.zoom=function(t){return new $i(t)},Yi.scale=function(t){return new Qi(t)},Yi.attribution=function(t){return new te(t)};var ie=S.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}});ie.addTo=function(t,i){return t.addHandler(i,this),this};var ee,ne={Events:Z},oe=bt?"touchstart mousedown":"mousedown",se={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},re={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},ae=E.extend({options:{clickTolerance:3},initialize:function(t,i,e,n){c(this,n),this._element=t,this._dragStartTarget=i||t,this._preventOutline=e},enable:function(){this._enabled||(zi(this._dragStartTarget,oe,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ae._dragging===this&&this.finishDrag(),Si(this._dragStartTarget,oe,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var i,e;!t._simulated&&this._enabled&&(this._moved=!1,li(this._element,"leaflet-zoom-anim")||ae._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((ae._dragging=this)._preventOutline&&Pi(this._element),xi(),Xt(),this._moving||(this.fire("down"),i=t.touches?t.touches[0]:t,e=bi(this._element),this._startPoint=new k(i.clientX,i.clientY),this._parentScale=Ti(e),zi(document,re[t.type],this._onMove,this),zi(document,se[t.type],this._onUp,this))))},_onMove:function(t){var i,e;!t._simulated&&this._enabled&&(t.touches&&1i&&(e.push(t[n]),o=n);oi.max.x&&(e|=2),t.yi.max.y&&(e|=8),e}function de(t,i,e,n){var o,s=i.x,r=i.y,a=e.x-s,h=e.y-r,u=a*a+h*h;return 0this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()t.y!=n.y>t.y&&t.x<(n.x-e.x)*(t.y-e.y)/(n.y-e.y)+e.x&&(u=!u);return u||Oe.prototype._containsPoint.call(this,t,!0)}});var Ne=Ce.extend({initialize:function(t,i){c(this,i),this._layers={},t&&this.addData(t)},addData:function(t){var i,e,n,o=g(t)?t:t.features;if(o){for(i=0,e=o.length;iu.x&&(l=s.x+n-u.x+h.x),s.x-l-a.x<0&&(l=s.x-a.x),s.y+e+h.y>u.y&&(c=s.y+e-u.y+h.y),s.y-c-a.y<0&&(c=s.y-a.y),(l||c)&&t.fire("autopanstart").panBy([l,c]))},_onCloseButtonClick:function(t){this._close(),Ni(t)},_getAnchor:function(){return A(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Ki.mergeOptions({closePopupOnClick:!0}),Ki.include({openPopup:function(t,i,e){return t instanceof tn||(t=new tn(e).setContent(t)),i&&t.setLatLng(i),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Me.include({bindPopup:function(t,i){return t instanceof tn?(c(t,i),(this._popup=t)._source=this):(this._popup&&!i||(this._popup=new tn(i,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,i){return this._popup&&this._map&&(i=this._popup._prepareOpen(this,t,i),this._map.openPopup(this._popup,i)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var i=t.layer||t.target;this._popup&&this._map&&(Ni(t),i instanceof Be?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===i?this.closePopup():this.openPopup(i,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var en=Qe.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){Qe.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){Qe.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=Qe.prototype.getEvents.call(this);return bt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=si("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var i,e=this._map,n=this._container,o=e.latLngToContainerPoint(e.getCenter()),s=e.layerPointToContainerPoint(t),r=this.options.direction,a=n.offsetWidth,h=n.offsetHeight,u=A(this.options.offset),l=this._getAnchor(),c="top"===r?(i=a/2,h):"bottom"===r?(i=a/2,0):(i="center"===r?a/2:"right"===r?0:"left"===r?a:s.xthis.options.maxZoom||nthis.options.maxZoom||void 0!==this.options.minZoom&&oe.max.x)||!i.wrapLat&&(t.ye.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return N(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var i=this._map,e=this.getTileSize(),n=t.scaleBy(e),o=n.add(e);return[i.unproject(n,t.z),i.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var i=this._tileCoordsToNwSe(t),e=new R(i[0],i[1]);return this.options.noWrap||(e=this._map.wrapLatLngBounds(e)),e},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var i=t.split(":"),e=new k(+i[0],+i[1]);return e.z=+i[2],e},_removeTile:function(t){var i=this._tiles[t];i&&(ri(i.el),delete this._tiles[t],this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ci(t,"leaflet-tile");var i=this.getTileSize();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=a,t.onmousemove=a,it&&this.options.opacity<1&&mi(t,this.options.opacity),ot&&!st&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,i){var e=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),p(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&M(p(this._tileReady,this,t,null,o)),vi(o,e),this._tiles[n]={el:o,coords:t,current:!0},i.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,i,e){i&&this.fire("tileerror",{error:i,tile:e,coords:t});var n=this._tileCoordsToKey(t);(e=this._tiles[n])&&(e.loaded=+new Date,this._map._fadeAnimated?(mi(e.el,0),z(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this)):(e.active=!0,this._pruneTiles()),i||(ci(e.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:e.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),it||!this._map._fadeAnimated?M(this._pruneTiles,this):setTimeout(p(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var i=new k(this._wrapX?o(t.x,this._wrapX):t.x,this._wrapY?o(t.y,this._wrapY):t.y);return i.z=t.z,i},_pxBoundsToTileRange:function(t){var i=this.getTileSize();return new I(t.min.unscaleBy(i).floor(),t.max.unscaleBy(i).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});var sn=on.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,i){this._url=t,(i=c(this,i)).detectRetina&&zt&&0')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_n={_initContainer:function(){this._container=si("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(hn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var i=t._container=cn("shape");ci(i,"leaflet-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t._path=cn("path"),i.appendChild(t._path),this._updateStyle(t),this._layers[m(t)]=t},_addPath:function(t){var i=t._container;this._container.appendChild(i),t.options.interactive&&t.addInteractiveTarget(i)},_removePath:function(t){var i=t._container;ri(i),t.removeInteractiveTarget(i),delete this._layers[m(t)]},_updateStyle:function(t){var i=t._stroke,e=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(i=i||(t._stroke=cn("stroke")),o.appendChild(i),i.weight=n.weight+"px",i.color=n.color,i.opacity=n.opacity,n.dashArray?i.dashStyle=g(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):i.dashStyle="",i.endcap=n.lineCap.replace("butt","flat"),i.joinstyle=n.lineJoin):i&&(o.removeChild(i),t._stroke=null),n.fill?(e=e||(t._fill=cn("fill")),o.appendChild(e),e.color=n.fillColor||n.color,e.opacity=n.fillOpacity):e&&(o.removeChild(e),t._fill=null)},_updateCircle:function(t){var i=t._point.round(),e=Math.round(t._radius),n=Math.round(t._radiusY||e);this._setPath(t,t._empty()?"M0 0":"AL "+i.x+","+i.y+" "+e+","+n+" 0,23592600")},_setPath:function(t,i){t._path.v=i},_bringToFront:function(t){hi(t._container)},_bringToBack:function(t){ui(t._container)}},dn=Et?cn:J,pn=hn.extend({getEvents:function(){var t=hn.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=dn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=dn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ri(this._container),Si(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){var t,i,e;this._map._animatingZoom&&this._bounds||(hn.prototype._update.call(this),i=(t=this._bounds).getSize(),e=this._container,this._svgSize&&this._svgSize.equals(i)||(this._svgSize=i,e.setAttribute("width",i.x),e.setAttribute("height",i.y)),vi(e,t.min),e.setAttribute("viewBox",[t.min.x,t.min.y,i.x,i.y].join(" ")),this.fire("update"))},_initPath:function(t){var i=t._path=dn("path");t.options.className&&ci(i,t.options.className),t.options.interactive&&ci(i,"leaflet-interactive"),this._updateStyle(t),this._layers[m(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ri(t._path),t.removeInteractiveTarget(t._path),delete this._layers[m(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var i=t._path,e=t.options;i&&(e.stroke?(i.setAttribute("stroke",e.color),i.setAttribute("stroke-opacity",e.opacity),i.setAttribute("stroke-width",e.weight),i.setAttribute("stroke-linecap",e.lineCap),i.setAttribute("stroke-linejoin",e.lineJoin),e.dashArray?i.setAttribute("stroke-dasharray",e.dashArray):i.removeAttribute("stroke-dasharray"),e.dashOffset?i.setAttribute("stroke-dashoffset",e.dashOffset):i.removeAttribute("stroke-dashoffset")):i.setAttribute("stroke","none"),e.fill?(i.setAttribute("fill",e.fillColor||e.color),i.setAttribute("fill-opacity",e.fillOpacity),i.setAttribute("fill-rule",e.fillRule||"evenodd")):i.setAttribute("fill","none"))},_updatePoly:function(t,i){this._setPath(t,$(t._parts,i))},_updateCircle:function(t){var i=t._point,e=Math.max(Math.round(t._radius),1),n="a"+e+","+(Math.max(Math.round(t._radiusY),1)||e)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(i.x-e)+","+i.y+n+2*e+",0 "+n+2*-e+",0 ";this._setPath(t,o)},_setPath:function(t,i){t._path.setAttribute("d",i)},_bringToFront:function(t){hi(t._path)},_bringToBack:function(t){ui(t._path)}});function mn(t){return Zt||Et?new pn(t):null}Et&&pn.include(_n),Ki.include({getRenderer:function(t){var i=(i=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer());return this.hasLayer(i)||this.addLayer(i),i},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var i=this._paneRenderers[t];return void 0===i&&(i=this._createRenderer({pane:t}),this._paneRenderers[t]=i),i},_createRenderer:function(t){return this.options.preferCanvas&&ln(t)||mn(t)}});var fn=Re.extend({initialize:function(t,i){Re.prototype.initialize.call(this,this._boundsToLatLngs(t),i)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=N(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});pn.create=dn,pn.pointsToPath=$,Ne.geometryToLayer=De,Ne.coordsToLatLng=We,Ne.coordsToLatLngs=He,Ne.latLngToCoords=Fe,Ne.latLngsToCoords=Ue,Ne.getFeature=Ve,Ne.asFeature=qe,Ki.mergeOptions({boxZoom:!0});var gn=ie.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){zi(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Si(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ri(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Xt(),xi(),this._startPoint=this._map.mouseEventToContainerPoint(t),zi(document,{contextmenu:Ni,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=si("div","leaflet-zoom-box",this._container),ci(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var i=new I(this._point,this._startPoint),e=i.getSize();vi(this._box,i.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(ri(this._box),_i(this._container,"leaflet-crosshair")),Jt(),wi(),Si(document,{contextmenu:Ni,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){var i;1!==t.which&&1!==t.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(p(this._resetState,this),0),i=new R(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(i).fire("boxzoomend",{boxZoomBounds:i})))},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});Ki.addInitHook("addHandler","boxZoom",gn),Ki.mergeOptions({doubleClickZoom:!0});var vn=ie.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var i=this._map,e=i.getZoom(),n=i.options.zoomDelta,o=t.originalEvent.shiftKey?e-n:e+n;"center"===i.options.doubleClickZoom?i.setZoom(o):i.setZoomAround(t.containerPoint,o)}});Ki.addInitHook("addHandler","doubleClickZoom",vn),Ki.mergeOptions({dragging:!0,inertia:!st,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var yn=ie.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new ae(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))),ci(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){_i(this._map._container,"leaflet-grab"),_i(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,i=this._map;i._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=N(this._map.options.maxBounds),this._offsetLimit=O(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,i.fire("movestart").fire("dragstart"),i.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var i,e;this._map.options.inertia&&(i=this._lastTime=+new Date,e=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(e),this._times.push(i),this._prunePositions(i)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1i.max.x&&(t.x=this._viscousLimit(t.x,i.max.x)),t.y>i.max.y&&(t.y=this._viscousLimit(t.y,i.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,i=Math.round(t/2),e=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-i+e)%t+i-e,s=(n+i+e)%t-i-e,r=Math.abs(o+e)i.getMaxZoom()&&1 __( 'None', 'sportspress' ), - 'remove_text' => __( '— Remove —', 'sportspress' ), - 'days' => __( 'days', 'sportspress' ), - 'hrs' => __( 'hrs', 'sportspress' ), - 'mins' => __( 'mins', 'sportspress' ), - 'secs' => __( 'secs', 'sportspress' ), - 'displaying_posts' => html_entity_decode( __( 'Displaying %1$s–%2$s of %3$s', 'sportspress' ) ), + 'none' => esc_attr__( 'None', 'sportspress' ), + 'remove_text' => esc_attr__( '— Remove —', 'sportspress' ), + 'days' => esc_attr__( 'days', 'sportspress' ), + 'hrs' => esc_attr__( 'hrs', 'sportspress' ), + 'mins' => esc_attr__( 'mins', 'sportspress' ), + 'secs' => esc_attr__( 'secs', 'sportspress' ), + 'displaying_posts' => html_entity_decode( esc_attr__( 'Displaying %1$s–%2$s of %3$s', 'sportspress' ) ), ) ); diff --git a/includes/admin/class-sp-admin-dashboard.php b/includes/admin/class-sp-admin-dashboard.php index ebac8543..f51f31e8 100644 --- a/includes/admin/class-sp-admin-dashboard.php +++ b/includes/admin/class-sp-admin-dashboard.php @@ -33,8 +33,8 @@ if ( ! class_exists( 'SP_Admin_Dashboard' ) ) : * Init dashboard widgets */ public function init() { - // wp_add_dashboard_widget( 'sportspress_dashboard_news', __( 'Sports News', 'sportspress' ), array( $this, 'news_widget' ), null, null, 'side' ); - wp_add_dashboard_widget( 'sportspress_dashboard_status', __( 'SportsPress', 'sportspress' ), array( $this, 'status_widget' ) ); + // wp_add_dashboard_widget( 'sportspress_dashboard_news', esc_attr__( 'Sports News', 'sportspress' ), array( $this, 'news_widget' ), null, null, 'side' ); + wp_add_dashboard_widget( 'sportspress_dashboard_status', esc_attr__( 'SportsPress', 'sportspress' ), array( $this, 'status_widget' ) ); add_filter( 'dashboard_glance_items', array( $this, 'glance_items' ), 10, 1 ); } diff --git a/includes/admin/class-sp-admin-importers.php b/includes/admin/class-sp-admin-importers.php index 07f4dcb4..73c21d63 100644 --- a/includes/admin/class-sp-admin-importers.php +++ b/includes/admin/class-sp-admin-importers.php @@ -35,28 +35,28 @@ if ( ! class_exists( 'SP_Admin_Importers' ) ) : 'sportspress_importers', array( 'sp_event_csv' => array( - 'name' => __( 'SportsPress Events (CSV)', 'sportspress' ), - 'description' => __( 'Import events from a csv file.', 'sportspress' ), + 'name' => esc_attr__( 'SportsPress Events (CSV)', 'sportspress' ), + 'description' => esc_attr__( 'Import events from a csv file.', 'sportspress' ), 'callback' => array( $this, 'events_importer' ), ), 'sp_fixture_csv' => array( - 'name' => __( 'SportsPress Fixtures (CSV)', 'sportspress' ), - 'description' => __( 'Import upcoming events from a csv file.', 'sportspress' ), + 'name' => esc_attr__( 'SportsPress Fixtures (CSV)', 'sportspress' ), + 'description' => esc_attr__( 'Import upcoming events from a csv file.', 'sportspress' ), 'callback' => array( $this, 'fixtures_importer' ), ), 'sp_team_csv' => array( - 'name' => __( 'SportsPress Teams (CSV)', 'sportspress' ), - 'description' => __( 'Import teams from a csv file.', 'sportspress' ), + 'name' => esc_attr__( 'SportsPress Teams (CSV)', 'sportspress' ), + 'description' => esc_attr__( 'Import teams from a csv file.', 'sportspress' ), 'callback' => array( $this, 'teams_importer' ), ), 'sp_player_csv' => array( - 'name' => __( 'SportsPress Players (CSV)', 'sportspress' ), - 'description' => __( 'Import players from a csv file.', 'sportspress' ), + 'name' => esc_attr__( 'SportsPress Players (CSV)', 'sportspress' ), + 'description' => esc_attr__( 'Import players from a csv file.', 'sportspress' ), 'callback' => array( $this, 'players_importer' ), ), 'sp_staff_csv' => array( - 'name' => __( 'SportsPress Staff (CSV)', 'sportspress' ), - 'description' => __( 'Import staff from a csv file.', 'sportspress' ), + 'name' => esc_attr__( 'SportsPress Staff (CSV)', 'sportspress' ), + 'description' => esc_attr__( 'Import staff from a csv file.', 'sportspress' ), 'callback' => array( $this, 'staff_importer' ), ), ) @@ -64,8 +64,8 @@ if ( ! class_exists( 'SP_Admin_Importers' ) ) : if ( 'import.php' !== $pagenow ) { $importers['sp_event_performance_csv'] = array( - 'name' => __( 'SportsPress Box Score (CSV)', 'sportspress' ), - 'description' => '' . sprintf( __( 'Select %s', 'sportspress' ), __( 'Event', 'sportspress' ) ) . '', + 'name' => esc_attr__( 'SportsPress Box Score (CSV)', 'sportspress' ), + 'description' => '' . sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Event', 'sportspress' ) ) . '', 'callback' => array( $this, 'event_performance_importer' ), ); } diff --git a/includes/admin/class-sp-admin-menus.php b/includes/admin/class-sp-admin-menus.php index 60a68961..01971ce2 100755 --- a/includes/admin/class-sp-admin-menus.php +++ b/includes/admin/class-sp-admin-menus.php @@ -47,28 +47,28 @@ if ( ! class_exists( 'SP_Admin_Menus' ) ) : $menu[] = array( '', 'read', 'separator-sportspress', '', 'wp-menu-separator sportspress' ); } - $main_page = add_menu_page( __( 'SportsPress', 'sportspress' ), __( 'SportsPress', 'sportspress' ), 'manage_sportspress', 'sportspress', array( $this, 'settings_page' ), apply_filters( 'sportspress_menu_icon', null ), '51.5' ); + $main_page = add_menu_page( esc_attr__( 'SportsPress', 'sportspress' ), esc_attr__( 'SportsPress', 'sportspress' ), 'manage_sportspress', 'sportspress', array( $this, 'settings_page' ), apply_filters( 'sportspress_menu_icon', null ), '51.5' ); } /** * Add menu item */ public function config_menu() { - add_submenu_page( 'sportspress', __( 'Configure', 'sportspress' ), __( 'Configure', 'sportspress' ), 'manage_sportspress', 'sportspress-config', array( $this, 'config_page' ) ); + add_submenu_page( 'sportspress', esc_attr__( 'Configure', 'sportspress' ), esc_attr__( 'Configure', 'sportspress' ), 'manage_sportspress', 'sportspress-config', array( $this, 'config_page' ) ); } /** * Add menu item */ public function leagues_menu() { - add_submenu_page( 'sportspress', __( 'Leagues', 'sportspress' ), __( 'Leagues', 'sportspress' ), 'manage_sportspress', 'edit-tags.php?taxonomy=sp_league' ); + add_submenu_page( 'sportspress', esc_attr__( 'Leagues', 'sportspress' ), esc_attr__( 'Leagues', 'sportspress' ), 'manage_sportspress', 'edit-tags.php?taxonomy=sp_league' ); } /** * Add menu item */ public function seasons_menu() { - add_submenu_page( 'sportspress', __( 'Seasons', 'sportspress' ), __( 'Seasons', 'sportspress' ), 'manage_sportspress', 'edit-tags.php?taxonomy=sp_season' ); + add_submenu_page( 'sportspress', esc_attr__( 'Seasons', 'sportspress' ), esc_attr__( 'Seasons', 'sportspress' ), 'manage_sportspress', 'edit-tags.php?taxonomy=sp_season' ); } /** @@ -106,7 +106,7 @@ if ( ! class_exists( 'SP_Admin_Menus' ) ) : global $menu, $submenu; if ( isset( $submenu['sportspress'] ) && isset( $submenu['sportspress'][0] ) && isset( $submenu['sportspress'][0][0] ) ) { - $submenu['sportspress'][0][0] = __( 'Settings', 'sportspress' ); + $submenu['sportspress'][0][0] = esc_attr__( 'Settings', 'sportspress' ); } } @@ -253,23 +253,23 @@ if ( ! class_exists( 'SP_Admin_Menus' ) ) : } public function remove_add_new( $arr = array() ) { - return $arr[0] != __( 'Add New', 'sportspress' ); + return $arr[0] != esc_attr__( 'Add New', 'sportspress' ); } public function remove_leagues( $arr = array() ) { - return $arr[0] != __( 'Leagues', 'sportspress' ); + return $arr[0] != esc_attr__( 'Leagues', 'sportspress' ); } public function remove_positions( $arr = array() ) { - return $arr[0] != __( 'Positions', 'sportspress' ); + return $arr[0] != esc_attr__( 'Positions', 'sportspress' ); } public function remove_seasons( $arr = array() ) { - return $arr[0] != __( 'Seasons', 'sportspress' ); + return $arr[0] != esc_attr__( 'Seasons', 'sportspress' ); } public function remove_venues( $arr = array() ) { - return $arr[0] != __( 'Venues', 'sportspress' ); + return $arr[0] != esc_attr__( 'Venues', 'sportspress' ); } public static function highlight_admin_menu( $p = 'sportspress', $s = 'sportspress' ) { diff --git a/includes/admin/class-sp-admin-permalink-settings.php b/includes/admin/class-sp-admin-permalink-settings.php index 736c0275..c8d88746 100644 --- a/includes/admin/class-sp-admin-permalink-settings.php +++ b/includes/admin/class-sp-admin-permalink-settings.php @@ -26,17 +26,17 @@ if ( ! class_exists( 'SP_Admin_Permalink_Settings' ) ) : $this->slugs = apply_filters( 'sportspress_permalink_slugs', array( - array( 'event', __( 'Events', 'sportspress' ) ), - array( 'venue', __( 'Venues', 'sportspress' ) ), - array( 'calendar', __( 'Calendars', 'sportspress' ) ), - array( 'team', __( 'Teams', 'sportspress' ) ), - array( 'league', __( 'Leagues', 'sportspress' ) ), - array( 'season', __( 'Seasons', 'sportspress' ) ), - array( 'table', __( 'League Tables', 'sportspress' ) ), - array( 'player', __( 'Players', 'sportspress' ) ), - array( 'position', __( 'Positions', 'sportspress' ) ), - array( 'list', __( 'Player Lists', 'sportspress' ) ), - array( 'staff', __( 'Staff', 'sportspress' ) ), + array( 'event', esc_attr__( 'Events', 'sportspress' ) ), + array( 'venue', esc_attr__( 'Venues', 'sportspress' ) ), + array( 'calendar', esc_attr__( 'Calendars', 'sportspress' ) ), + array( 'team', esc_attr__( 'Teams', 'sportspress' ) ), + array( 'league', esc_attr__( 'Leagues', 'sportspress' ) ), + array( 'season', esc_attr__( 'Seasons', 'sportspress' ) ), + array( 'table', esc_attr__( 'League Tables', 'sportspress' ) ), + array( 'player', esc_attr__( 'Players', 'sportspress' ) ), + array( 'position', esc_attr__( 'Positions', 'sportspress' ) ), + array( 'list', esc_attr__( 'Player Lists', 'sportspress' ) ), + array( 'staff', esc_attr__( 'Staff', 'sportspress' ) ), ) ); @@ -49,7 +49,7 @@ if ( ! class_exists( 'SP_Admin_Permalink_Settings' ) ) : */ public function settings_init() { // Add a section to the permalinks page - add_settings_section( 'sportspress-permalink', __( 'SportsPress', 'sportspress' ), array( $this, 'settings' ), 'permalink' ); + add_settings_section( 'sportspress-permalink', esc_attr__( 'SportsPress', 'sportspress' ), array( $this, 'settings' ), 'permalink' ); // Add our settings foreach ( $this->slugs as $slug ) : @@ -78,7 +78,7 @@ if ( ! class_exists( 'SP_Admin_Permalink_Settings' ) ) : * Show the settings */ public function settings() { - echo wp_kses_post( wpautop( __( 'These settings control the permalinks used for SportsPress. These settings only apply when not using "default" permalinks above.', 'sportspress' ) ) ); + echo wp_kses_post( wpautop( esc_attr__( 'These settings control the permalinks used for SportsPress. These settings only apply when not using "default" permalinks above.', 'sportspress' ) ) ); } /** diff --git a/includes/admin/class-sp-admin-post-types.php b/includes/admin/class-sp-admin-post-types.php index 8304537c..b0c51fd8 100644 --- a/includes/admin/class-sp-admin-post-types.php +++ b/includes/admin/class-sp-admin-post-types.php @@ -74,38 +74,38 @@ if ( ! class_exists( 'SP_Admin_Post_Types' ) ) : $obj = get_post_type_object( $typenow ); for ( $i = 0; $i <= 10; $i++ ) : - $messages['post'][ $i ] = __( 'Settings saved.', 'sportspress' ) . + $messages['post'][ $i ] = esc_attr__( 'Settings saved.', 'sportspress' ) . ' ' . __( 'View All', 'sportspress' ) . ''; endfor; elseif ( is_sp_post_type( $typenow ) ) : $obj = get_post_type_object( $typenow ); - $messages['post'][1] = __( 'Changes saved.', 'sportspress' ) . + $messages['post'][1] = esc_attr__( 'Changes saved.', 'sportspress' ) . ' ' . $obj->labels->view_item . ''; - $messages['post'][4] = __( 'Changes saved.', 'sportspress' ); + $messages['post'][4] = esc_attr__( 'Changes saved.', 'sportspress' ); - $messages['post'][6] = __( 'Success!', 'sportspress' ) . + $messages['post'][6] = esc_attr__( 'Success!', 'sportspress' ) . ' ' . $obj->labels->view_item . ''; - $messages['post'][7] = __( 'Changes saved.', 'sportspress' ); + $messages['post'][7] = esc_attr__( 'Changes saved.', 'sportspress' ); - $messages['post'][8] = __( 'Success!', 'sportspress' ) . + $messages['post'][8] = esc_attr__( 'Success!', 'sportspress' ) . ' ' . - sprintf( __( 'Preview %s', 'sportspress' ), $obj->labels->singular_name ) . ''; + sprintf( esc_attr__( 'Preview %s', 'sportspress' ), $obj->labels->singular_name ) . ''; $messages['post'][9] = sprintf( __( 'Scheduled for: %1$s.', 'sportspress' ), - date_i18n( __( 'M j, Y @ G:i', 'sportspress' ), strtotime( $post->post_date ) ), + date_i18n( esc_attr__( 'M j, Y @ G:i', 'sportspress' ), strtotime( $post->post_date ) ), esc_url( get_permalink( $post->ID ) ) ) . ' ' . - sprintf( __( 'Preview %s', 'sportspress' ), $obj->labels->singular_name ) . ''; + sprintf( esc_attr__( 'Preview %s', 'sportspress' ), $obj->labels->singular_name ) . ''; - $messages['post'][10] = __( 'Success!', 'sportspress' ) . + $messages['post'][10] = esc_attr__( 'Success!', 'sportspress' ) . ' ' . - sprintf( __( 'Preview %s', 'sportspress' ), $obj->labels->singular_name ) . ''; + sprintf( esc_attr__( 'Preview %s', 'sportspress' ), $obj->labels->singular_name ) . ''; endif; return $messages; diff --git a/includes/admin/class-sp-admin-sample-data.php b/includes/admin/class-sp-admin-sample-data.php index 060118c4..fd7244f1 100644 --- a/includes/admin/class-sp-admin-sample-data.php +++ b/includes/admin/class-sp-admin-sample-data.php @@ -170,7 +170,7 @@ class SP_Admin_Sample_Data { $post['post_title'] = $team['name']; $post['post_type'] = 'sp_team'; $post['post_status'] = 'publish'; - $post['post_content'] = sprintf( $sample_content, __( 'Team', 'sportspress' ), __( 'Teams', 'sportspress' ), add_query_arg( 'post_type', 'sp_team', admin_url( 'edit.php' ) ) ); + $post['post_content'] = sprintf( $sample_content, esc_attr__( 'Team', 'sportspress' ), esc_attr__( 'Teams', 'sportspress' ), add_query_arg( 'post_type', 'sp_team', admin_url( 'edit.php' ) ) ); // Terms $post['tax_input'] = array(); @@ -230,7 +230,7 @@ class SP_Admin_Sample_Data { $post['post_title'] = $name; $post['post_type'] = 'sp_player'; $post['post_status'] = 'publish'; - $post['post_content'] = sprintf( $sample_content, __( 'Player', 'sportspress' ), __( 'Players', 'sportspress' ), add_query_arg( 'post_type', 'sp_player', admin_url( 'edit.php' ) ) ); + $post['post_content'] = sprintf( $sample_content, esc_attr__( 'Player', 'sportspress' ), esc_attr__( 'Players', 'sportspress' ), add_query_arg( 'post_type', 'sp_player', admin_url( 'edit.php' ) ) ); // Terms $post['tax_input'] = array(); @@ -342,7 +342,7 @@ class SP_Admin_Sample_Data { $post['post_title'] = $name; $post['post_type'] = 'sp_staff'; $post['post_status'] = 'publish'; - $post['post_content'] = sprintf( $sample_content, __( 'Staff', 'sportspress' ), __( 'Staff', 'sportspress' ), add_query_arg( 'post_type', 'sp_staff', admin_url( 'edit.php' ) ) ); + $post['post_content'] = sprintf( $sample_content, esc_attr__( 'Staff', 'sportspress' ), esc_attr__( 'Staff', 'sportspress' ), add_query_arg( 'post_type', 'sp_staff', admin_url( 'edit.php' ) ) ); // Terms $post['tax_input'] = array(); @@ -438,7 +438,7 @@ class SP_Admin_Sample_Data { 'post_title' => $teams[ $i ]['name'] . ' ' . get_option( 'sportspress_event_teams_delimiter', 'vs' ) . ' ' . $teams[ $away_index ]['name'], 'post_type' => 'sp_event', 'post_status' => $post_status, - 'post_content' => sprintf( $sample_content, __( 'Event', 'sportspress' ), __( 'Events', 'sportspress' ), add_query_arg( 'post_type', 'sp_event', admin_url( 'edit.php' ) ) ), + 'post_content' => sprintf( $sample_content, esc_attr__( 'Event', 'sportspress' ), esc_attr__( 'Events', 'sportspress' ), add_query_arg( 'post_type', 'sp_event', admin_url( 'edit.php' ) ) ), 'post_date' => $post_year . '-' . sprintf( '%02d', 3 + $i * 3 ) . '-' . sprintf( '%02d', 5 + $i * 10 ) . ' ' . ( 18 + $i ) . ':00:00', 'tax_input' => array( 'sp_league' => get_terms( @@ -568,7 +568,7 @@ class SP_Admin_Sample_Data { 'post_title' => _x( 'Fixtures & Results', 'example', 'sportspress' ), 'post_type' => 'sp_calendar', 'post_status' => 'publish', - 'post_content' => sprintf( $sample_content, __( 'Calendar', 'sportspress' ), __( 'Calendars', 'sportspress' ), add_query_arg( 'post_type', 'sp_calendar', admin_url( 'edit.php' ) ) ), + 'post_content' => sprintf( $sample_content, esc_attr__( 'Calendar', 'sportspress' ), esc_attr__( 'Calendars', 'sportspress' ), add_query_arg( 'post_type', 'sp_calendar', admin_url( 'edit.php' ) ) ), ); // Insert post @@ -618,7 +618,7 @@ class SP_Admin_Sample_Data { 'post_title' => $league->name . ' ' . $season->name, 'post_type' => 'sp_table', 'post_status' => 'publish', - 'post_content' => sprintf( $sample_content, __( 'League Table', 'sportspress' ), __( 'League Tables', 'sportspress' ), add_query_arg( 'post_type', 'sp_table', admin_url( 'edit.php' ) ) ), + 'post_content' => sprintf( $sample_content, esc_attr__( 'League Table', 'sportspress' ), esc_attr__( 'League Tables', 'sportspress' ), add_query_arg( 'post_type', 'sp_table', admin_url( 'edit.php' ) ) ), 'tax_input' => array( 'sp_league' => $league->term_id, 'sp_season' => $season->term_id, @@ -660,7 +660,7 @@ class SP_Admin_Sample_Data { 'post_title' => get_the_title( $team_id ) . ' ' . _x( 'Roster', 'example', 'sportspress' ), 'post_type' => 'sp_list', 'post_status' => 'publish', - 'post_content' => sprintf( $sample_content, __( 'Player List', 'sportspress' ), __( 'Player Lists', 'sportspress' ), add_query_arg( 'post_type', 'sp_list', admin_url( 'edit.php' ) ) ), + 'post_content' => sprintf( $sample_content, esc_attr__( 'Player List', 'sportspress' ), esc_attr__( 'Player Lists', 'sportspress' ), add_query_arg( 'post_type', 'sp_list', admin_url( 'edit.php' ) ) ), ); // Insert post @@ -705,7 +705,7 @@ class SP_Admin_Sample_Data { 'post_title' => _x( 'Player Ranking', 'example', 'sportspress' ), 'post_type' => 'sp_list', 'post_status' => 'publish', - 'post_content' => sprintf( $sample_content, __( 'Player List', 'sportspress' ), __( 'Player Lists', 'sportspress' ), add_query_arg( 'post_type', 'sp_list', admin_url( 'edit.php' ) ) ), + 'post_content' => sprintf( $sample_content, esc_attr__( 'Player List', 'sportspress' ), esc_attr__( 'Player Lists', 'sportspress' ), add_query_arg( 'post_type', 'sp_list', admin_url( 'edit.php' ) ) ), ); // Insert post diff --git a/includes/admin/class-sp-admin-settings.php b/includes/admin/class-sp-admin-settings.php index 72b0b1bf..ce727536 100644 --- a/includes/admin/class-sp-admin-settings.php +++ b/includes/admin/class-sp-admin-settings.php @@ -74,7 +74,7 @@ if ( ! class_exists( 'SP_Admin_Settings' ) ) : do_action( 'sportspress_update_options_' . $current_tab ); do_action( 'sportspress_update_options' ); - self::add_message( __( 'Your settings have been saved.', 'sportspress' ) ); + self::add_message( esc_attr__( 'Your settings have been saved.', 'sportspress' ) ); do_action( 'sportspress_settings_saved' ); } @@ -144,7 +144,7 @@ if ( ! class_exists( 'SP_Admin_Settings' ) ) : 'sportspress_settings', 'localized_strings', array( - 'none' => __( 'None', 'sportspress' ), + 'none' => esc_attr__( 'None', 'sportspress' ), ) ); diff --git a/includes/admin/class-sp-admin-setup-wizard.php b/includes/admin/class-sp-admin-setup-wizard.php index 6ca2c11c..458e5f28 100644 --- a/includes/admin/class-sp-admin-setup-wizard.php +++ b/includes/admin/class-sp-admin-setup-wizard.php @@ -57,37 +57,37 @@ class SP_Admin_Setup_Wizard { } $this->steps = array( 'introduction' => array( - 'name' => __( 'Introduction', 'sportspress' ), + 'name' => esc_attr__( 'Introduction', 'sportspress' ), 'view' => array( $this, 'sp_setup_introduction' ), 'handler' => '', ), 'basics' => array( - 'name' => __( 'Basic Setup', 'sportspress' ), + 'name' => esc_attr__( 'Basic Setup', 'sportspress' ), 'view' => array( $this, 'sp_setup_basics' ), 'handler' => array( $this, 'sp_setup_basics_save' ), ), 'teams' => array( - 'name' => __( 'Teams', 'sportspress' ), + 'name' => esc_attr__( 'Teams', 'sportspress' ), 'view' => array( $this, 'sp_setup_teams' ), 'handler' => array( $this, 'sp_setup_teams_save' ), ), 'players_staff' => array( - 'name' => __( 'Players', 'sportspress' ) . ' & ' . __( 'Staff', 'sportspress' ), + 'name' => esc_attr__( 'Players', 'sportspress' ) . ' & ' . esc_attr__( 'Staff', 'sportspress' ), 'view' => array( $this, 'sp_setup_players_staff' ), 'handler' => array( $this, 'sp_setup_players_staff_save' ), ), 'venue' => array( - 'name' => __( 'Venue', 'sportspress' ), + 'name' => esc_attr__( 'Venue', 'sportspress' ), 'view' => array( $this, 'sp_setup_venue' ), 'handler' => array( $this, 'sp_setup_venue_save' ), ), 'pages' => array( - 'name' => __( 'Pages', 'sportspress' ), + 'name' => esc_attr__( 'Pages', 'sportspress' ), 'view' => array( $this, 'sp_setup_pages' ), 'handler' => array( $this, 'sp_setup_pages_save' ), ), 'next_steps' => array( - 'name' => __( 'Ready!', 'sportspress' ), + 'name' => esc_attr__( 'Ready!', 'sportspress' ), 'view' => array( $this, 'sp_setup_ready' ), 'handler' => '', ), @@ -108,8 +108,8 @@ class SP_Admin_Setup_Wizard { $strings = apply_filters( 'sportspress_localized_strings', array( - 'none' => __( 'None', 'sportspress' ), - 'remove_text' => __( '— Remove —', 'sportspress' ), + 'none' => esc_attr__( 'None', 'sportspress' ), + 'remove_text' => esc_attr__( '— Remove —', 'sportspress' ), ) ); @@ -148,7 +148,7 @@ class SP_Admin_Setup_Wizard { -

' ) ); ?>

+

' ) ); ?>

__( 'Organize and publish calendars using different layouts.', 'sportspress' ), - 'sp_table' => __( 'Create automated league tables to keep track of team standings.', 'sportspress' ), - 'sp_list' => __( 'Create team rosters, player galleries, and ranking charts.', 'sportspress' ), + 'sp_calendar' => esc_attr__( 'Organize and publish calendars using different layouts.', 'sportspress' ), + 'sp_table' => esc_attr__( 'Create automated league tables to keep track of team standings.', 'sportspress' ), + 'sp_list' => esc_attr__( 'Create team rosters, player galleries, and ranking charts.', 'sportspress' ), ) ); ?> @@ -683,9 +683,9 @@ class SP_Admin_Setup_Wizard { $pages = apply_filters( 'sportspress_setup_pages', array( - 'sp_calendar' => __( 'Organize and publish calendars using different layouts.', 'sportspress' ), - 'sp_table' => __( 'Create automated league tables to keep track of team standings.', 'sportspress' ), - 'sp_list' => __( 'Create team rosters, player galleries, and ranking charts.', 'sportspress' ), + 'sp_calendar' => esc_attr__( 'Organize and publish calendars using different layouts.', 'sportspress' ), + 'sp_table' => esc_attr__( 'Create automated league tables to keep track of team standings.', 'sportspress' ), + 'sp_list' => esc_attr__( 'Create team rosters, player galleries, and ranking charts.', 'sportspress' ), ) ); @@ -815,7 +815,7 @@ class SP_Admin_Setup_Wizard { } $post['post_title'] = implode( ' ' . get_option( 'sportspress_event_teams_delimiter', 'vs' ) . ' ', $team_names ); } else { - $post['post_title'] = __( 'Event', 'sportspress' ); + $post['post_title'] = esc_attr__( 'Event', 'sportspress' ); } // Insert event @@ -857,12 +857,12 @@ class SP_Admin_Setup_Wizard { 'sportspress_setup_wizard_next_steps', array( 'first' => array( - 'label' => __( 'Next Steps', 'sportspress' ), - 'content' => '' . __( 'Schedule your first event!', 'sportspress' ) . '', + 'label' => esc_attr__( 'Next Steps', 'sportspress' ), + 'content' => '' . esc_attr__( 'Schedule your first event!', 'sportspress' ) . '', ), 'last' => array( - 'label' => __( 'Upgrade to Pro', 'sportspress' ), - 'content' => __( 'Get SportsPress Pro to get access to all modules. You can upgrade any time without losing any of your data.', 'sportspress' ) . ' ' . __( 'Learn more', 'sportspress' ) . '', + 'label' => esc_attr__( 'Upgrade to Pro', 'sportspress' ), + 'content' => esc_attr__( 'Get SportsPress Pro to get access to all modules. You can upgrade any time without losing any of your data.', 'sportspress' ) . ' ' . esc_attr__( 'Learn more', 'sportspress' ) . '', ), ) ); diff --git a/includes/admin/class-sp-admin-sports.php b/includes/admin/class-sp-admin-sports.php index 74ccaea4..9d78cce1 100644 --- a/includes/admin/class-sp-admin-sports.php +++ b/includes/admin/class-sp-admin-sports.php @@ -48,7 +48,7 @@ class SP_Admin_Sports { } $id = preg_replace( '/\\.[^.\\s]{3,4}$/', '', $file ); $presets[ $id ] = $data; - $name = array_key_exists( 'name', $data ) ? __( $data['name'], 'sportspress' ) : $id; + $name = array_key_exists( 'name', $data ) ? esc_attr__( $data['name'], 'sportspress' ) : $id; // Conditionally append filename in parentheses for clarity if ( false === strpos( str_replace( ' ', '', strtolower( $data['name'] ) ), str_replace( '-', '', $id ) ) ) { @@ -111,7 +111,7 @@ class SP_Admin_Sports { $name = $position; $sections = array( 0, 1 ); } else { - $name = sp_array_value( $position, 'name', __( 'Position', 'sportspress' ) ); + $name = sp_array_value( $position, 'name', esc_attr__( 'Position', 'sportspress' ) ); $sections = sp_array_value( $position, 'sections', array( 0, 1 ) ); } $term = wp_insert_term( $name, 'sp_position' ); @@ -321,12 +321,12 @@ class SP_Admin_Sports { return apply_filters( 'sportspress_sport_categories', array( - 'team-sports' => __( 'Team Sports', 'sportspress' ), - 'racket-sports' => __( 'Racket Sports', 'sportspress' ), - 'water-sports' => __( 'Water Sports', 'sportspress' ), - 'target-sports' => __( 'Target Sports', 'sportspress' ), - 'esports' => __( 'Esports', 'sportspress' ), - 'other' => __( 'Other', 'sportspress' ), + 'team-sports' => esc_attr__( 'Team Sports', 'sportspress' ), + 'racket-sports' => esc_attr__( 'Racket Sports', 'sportspress' ), + 'water-sports' => esc_attr__( 'Water Sports', 'sportspress' ), + 'target-sports' => esc_attr__( 'Target Sports', 'sportspress' ), + 'esports' => esc_attr__( 'Esports', 'sportspress' ), + 'other' => esc_attr__( 'Other', 'sportspress' ), ) ); } diff --git a/includes/admin/class-sp-admin-taxonomies.php b/includes/admin/class-sp-admin-taxonomies.php index 9d1e198a..81513a2d 100644 --- a/includes/admin/class-sp-admin-taxonomies.php +++ b/includes/admin/class-sp-admin-taxonomies.php @@ -193,8 +193,8 @@ class SP_Admin_Taxonomies { $options = apply_filters( 'sportspress_performance_sections', array( - 0 => __( 'Offense', 'sportspress' ), - 1 => __( + 0 => esc_attr__( 'Offense', 'sportspress' ), + 1 => esc_attr__( 'Defense', 'sportspress' ), @@ -232,8 +232,8 @@ class SP_Admin_Taxonomies { $options = apply_filters( 'sportspress_performance_sections', array( - 0 => __( 'Offense', 'sportspress' ), - 1 => __( + 0 => esc_attr__( 'Offense', 'sportspress' ), + 1 => esc_attr__( 'Defense', 'sportspress' ), @@ -291,7 +291,7 @@ class SP_Admin_Taxonomies { $new_columns = array(); if ( function_exists( 'get_term_meta' ) ) { - $new_columns['sp_order'] = __( 'Order', 'sportspress' ); + $new_columns['sp_order'] = esc_attr__( 'Order', 'sportspress' ); } if ( array_key_exists( 'posts', $columns ) ) { @@ -312,7 +312,7 @@ class SP_Admin_Taxonomies { */ public function venue_columns( $columns ) { $new_columns = array(); - $new_columns['sp_address'] = __( 'Address', 'sportspress' ); + $new_columns['sp_address'] = esc_attr__( 'Address', 'sportspress' ); if ( array_key_exists( 'posts', $columns ) ) { $new_columns['posts'] = $columns['posts']; @@ -334,10 +334,10 @@ class SP_Admin_Taxonomies { */ public function position_columns( $columns ) { $new_columns = array(); - $new_columns['sp_sections'] = __( 'Statistics', 'sportspress' ); + $new_columns['sp_sections'] = esc_attr__( 'Statistics', 'sportspress' ); if ( function_exists( 'get_term_meta' ) ) { - $new_columns['sp_order'] = __( 'Order', 'sportspress' ); + $new_columns['sp_order'] = esc_attr__( 'Order', 'sportspress' ); } if ( array_key_exists( 'posts', $columns ) ) { @@ -375,8 +375,8 @@ class SP_Admin_Taxonomies { $options = apply_filters( 'sportspress_performance_sections', array( - 0 => __( 'Offense', 'sportspress' ), - 1 => __( + 0 => esc_attr__( 'Offense', 'sportspress' ), + 1 => esc_attr__( 'Defense', 'sportspress' ), diff --git a/includes/admin/class-sp-admin-welcome.php b/includes/admin/class-sp-admin-welcome.php index dd23c65a..74cc64e4 100644 --- a/includes/admin/class-sp-admin-welcome.php +++ b/includes/admin/class-sp-admin-welcome.php @@ -48,8 +48,8 @@ class SP_Admin_Welcome { return; } - $welcome_page_name = __( 'About SportsPress', 'sportspress' ); - $welcome_page_title = __( 'Welcome to SportsPress', 'sportspress' ); + $welcome_page_name = esc_attr__( 'About SportsPress', 'sportspress' ); + $welcome_page_title = esc_attr__( 'Welcome to SportsPress', 'sportspress' ); switch ( $_GET['page'] ) { case 'sp-about': @@ -107,18 +107,18 @@ class SP_Admin_Welcome { unset( $version[2] ); $display_version = implode( '.', $version ); ?> -

' ) ); ?>

+

' ) ); ?>

version ) ); ?>
intro(); ?> -

Contribute to SportsPress.', 'sportspress' ) ), 'https://github.com/ThemeBoy/SportsPress/blob/master/CONTRIBUTING.md' ); ?>

+

Contribute to SportsPress.', 'sportspress' ) ), 'https://github.com/ThemeBoy/SportsPress/blob/master/CONTRIBUTING.md' ); ?>

contributors() ); ?> @@ -347,7 +347,7 @@ class SP_Admin_Welcome { intro(); ?> -

Translate SportsPress.', 'sportspress' ) ), 'https://translate.wordpress.org/projects/wp-plugins/sportspress' ); ?>

+

Translate SportsPress.', 'sportspress' ) ), 'https://translate.wordpress.org/projects/wp-plugins/sportspress' ); ?>

', esc_url( 'https://github.com/' . $contributor->login ), - esc_html( sprintf( __( 'View %s', 'sportspress' ), $contributor->login ) ) + esc_html( sprintf( esc_attr__( 'View %s', 'sportspress' ), $contributor->login ) ) ); $contributor_list .= sprintf( '%s', esc_url( $contributor->avatar_url ), esc_html( $contributor->login ) ); $contributor_list .= ''; diff --git a/includes/admin/importers/class-sp-event-importer.php b/includes/admin/importers/class-sp-event-importer.php index 058323bf..3dd22894 100644 --- a/includes/admin/importers/class-sp-event-importer.php +++ b/includes/admin/importers/class-sp-event-importer.php @@ -23,15 +23,15 @@ if ( class_exists( 'WP_Importer' ) ) { */ public function __construct() { $this->import_page = 'sp_event_csv'; - $this->import_label = __( 'Import Events', 'sportspress' ); + $this->import_label = esc_attr__( 'Import Events', 'sportspress' ); $this->columns = array( - 'post_date' => __( 'Date', 'sportspress' ), - 'post_time' => __( 'Time', 'sportspress' ), - 'sp_venue' => __( 'Venue', 'sportspress' ), - 'sp_team' => __( 'Teams', 'sportspress' ), - 'sp_results' => __( 'Results', 'sportspress' ), - 'sp_outcome' => __( 'Outcome', 'sportspress' ), - 'sp_player' => __( 'Players', 'sportspress' ), + 'post_date' => esc_attr__( 'Date', 'sportspress' ), + 'post_time' => esc_attr__( 'Time', 'sportspress' ), + 'sp_venue' => esc_attr__( 'Venue', 'sportspress' ), + 'sp_team' => esc_attr__( 'Teams', 'sportspress' ), + 'sp_results' => esc_attr__( 'Results', 'sportspress' ), + 'sp_outcome' => esc_attr__( 'Outcome', 'sportspress' ), + 'sp_player' => esc_attr__( 'Players', 'sportspress' ), ); $performance_labels = sp_get_var_labels( 'sp_performance' ); if ( $performance_labels && is_array( $performance_labels ) && sizeof( $performance_labels ) ) { @@ -156,7 +156,7 @@ if ( class_exists( 'WP_Importer' ) ) { 'post_type' => 'sp_event', 'post_status' => 'publish', 'post_date' => $date, - 'post_title' => __( 'Event', 'sportspress' ), + 'post_title' => esc_attr__( 'Event', 'sportspress' ), ); // Insert event @@ -338,7 +338,7 @@ if ( class_exists( 'WP_Importer' ) ) { $title = get_the_title( $id ); // Initialize event name - if ( __( 'Event', 'sportspress' ) === $title ) { + if ( esc_attr__( 'Event', 'sportspress' ) === $title ) { $title = ''; } else { $title .= ' ' . get_option( 'sportspress_event_teams_delimiter', 'vs' ) . ' '; @@ -494,8 +494,8 @@ if ( class_exists( 'WP_Importer' ) ) { function greet() { echo '
'; echo '

' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '

'; - echo '

' . sprintf( wp_kses_post( __( 'Events need to be defined with columns in a specific order (3+ columns). Click here to download a sample.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/events-sample.csv' ) . '

'; - echo '

' . sprintf( wp_kses_post( __( 'Supports CSV files generated by LeagueLobster.', 'sportspress' ) ), 'http://tboy.co/leaguelobster' ) . '

'; + echo '

' . sprintf( wp_kses_post( esc_attr__( 'Events need to be defined with columns in a specific order (3+ columns). Click here to download a sample.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/events-sample.csv' ) . '

'; + echo '

' . sprintf( wp_kses_post( esc_attr__( 'Supports CSV files generated by LeagueLobster.', 'sportspress' ) ), 'http://tboy.co/leaguelobster' ) . '

'; wp_import_upload_form( 'admin.php?import=sp_event_csv&step=1' ); echo '
'; } @@ -538,7 +538,7 @@ if ( class_exists( 'WP_Importer' ) ) { ); if ( ! sp_dropdown_taxonomies( $args ) ) : echo '

' . esc_html__( 'None', 'sportspress' ) . '

'; - sp_taxonomy_adder( 'sp_league', 'sp_team', __( 'Add New', 'sportspress' ) ); + sp_taxonomy_adder( 'sp_league', 'sp_team', esc_attr__( 'Add New', 'sportspress' ) ); endif; ?> @@ -551,11 +551,11 @@ if ( class_exists( 'WP_Importer' ) ) { 'taxonomy' => 'sp_season', 'name' => 'sp_season', 'values' => 'slug', - 'show_option_none' => __( '— Not set —', 'sportspress' ), + 'show_option_none' => esc_attr__( '— Not set —', 'sportspress' ), ); if ( ! sp_dropdown_taxonomies( $args ) ) : echo '

' . esc_html__( 'None', 'sportspress' ) . '

'; - sp_taxonomy_adder( 'sp_season', 'sp_team', __( 'Add New', 'sportspress' ) ); + sp_taxonomy_adder( 'sp_season', 'sp_team', esc_attr__( 'Add New', 'sportspress' ) ); endif; ?> diff --git a/includes/admin/importers/class-sp-event-performance-importer.php b/includes/admin/importers/class-sp-event-performance-importer.php index a6e30f0b..6faa1e0f 100644 --- a/includes/admin/importers/class-sp-event-performance-importer.php +++ b/includes/admin/importers/class-sp-event-performance-importer.php @@ -23,9 +23,9 @@ if ( class_exists( 'WP_Importer' ) ) { */ public function __construct() { $this->import_page = 'sp_event_performance_csv'; - $this->import_label = __( 'Import Box Score', 'sportspress' ); + $this->import_label = esc_attr__( 'Import Box Score', 'sportspress' ); $this->columns = array( - 'sp_player' => __( 'Player', 'sportspress' ), + 'sp_player' => esc_attr__( 'Player', 'sportspress' ), ); $performance_labels = sp_get_var_labels( 'sp_performance' ); if ( $performance_labels && is_array( $performance_labels ) && sizeof( $performance_labels ) ) { @@ -178,7 +178,7 @@ if ( class_exists( 'WP_Importer' ) ) { ) ); echo '

' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '

'; - echo '

' . sprintf( wp_kses_post( __( 'Box scores need to be defined with columns in a specific order. Click here to download a sample.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/event-performance-sample.csv' ) . '

'; + echo '

' . sprintf( wp_kses_post( esc_attr__( 'Box scores need to be defined with columns in a specific order. Click here to download a sample.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/event-performance-sample.csv' ) . '

'; wp_import_upload_form( add_query_arg( $args, 'admin.php' ) ); } else { echo '

' . sprintf( esc_html__( 'Select %s', 'sportspress' ), esc_html__( 'Event', 'sportspress' ) ) . '

'; diff --git a/includes/admin/importers/class-sp-fixture-importer.php b/includes/admin/importers/class-sp-fixture-importer.php index 7629c456..c59d5e48 100644 --- a/includes/admin/importers/class-sp-fixture-importer.php +++ b/includes/admin/importers/class-sp-fixture-importer.php @@ -23,14 +23,14 @@ if ( class_exists( 'WP_Importer' ) ) { */ public function __construct() { $this->import_page = 'sp_fixture_csv'; - $this->import_label = __( 'Import Fixtures', 'sportspress' ); + $this->import_label = esc_attr__( 'Import Fixtures', 'sportspress' ); $this->columns = array( - 'post_date' => __( 'Date', 'sportspress' ), - 'post_time' => __( 'Time', 'sportspress' ), - 'sp_venue' => __( 'Venue', 'sportspress' ), - 'sp_home' => __( 'Home', 'sportspress' ), - 'sp_away' => __( 'Away', 'sportspress' ), - 'sp_day' => __( 'Match Day', 'sportspress' ), + 'post_date' => esc_attr__( 'Date', 'sportspress' ), + 'post_time' => esc_attr__( 'Time', 'sportspress' ), + 'sp_venue' => esc_attr__( 'Venue', 'sportspress' ), + 'sp_home' => esc_attr__( 'Home', 'sportspress' ), + 'sp_away' => esc_attr__( 'Away', 'sportspress' ), + 'sp_day' => esc_attr__( 'Match Day', 'sportspress' ), ); $this->optionals = array( 'sp_day' ); } @@ -122,7 +122,7 @@ if ( class_exists( 'WP_Importer' ) ) { 'post_type' => 'sp_event', 'post_status' => 'publish', 'post_date' => $date, - 'post_title' => __( 'Event', 'sportspress' ), + 'post_title' => esc_attr__( 'Event', 'sportspress' ), ); // Insert event @@ -226,7 +226,7 @@ if ( class_exists( 'WP_Importer' ) ) { $title = get_the_title( $id ); // Initialize event name - if ( __( 'Event', 'sportspress' ) === $title ) { + if ( esc_attr__( 'Event', 'sportspress' ) === $title ) { $title = ''; } else { $title .= ' ' . get_option( 'sportspress_event_teams_delimiter', 'vs' ) . ' '; @@ -284,8 +284,8 @@ if ( class_exists( 'WP_Importer' ) ) { function greet() { echo '
'; echo '

' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '

'; - echo '

' . sprintf( wp_kses_post( __( 'Fixtures need to be defined with columns in a specific order (4+ columns). Click here to download a sample.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/fixtures-sample.csv' ) . '

'; - echo '

' . sprintf( wp_kses_post( __( 'Supports CSV files generated by LeagueLobster.', 'sportspress' ) ), 'http://tboy.co/leaguelobster' ) . '

'; + echo '

' . sprintf( wp_kses_post( esc_attr__( 'Fixtures need to be defined with columns in a specific order (4+ columns). Click here to download a sample.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/fixtures-sample.csv' ) . '

'; + echo '

' . sprintf( wp_kses_post( esc_attr__( 'Supports CSV files generated by LeagueLobster.', 'sportspress' ) ), 'http://tboy.co/leaguelobster' ) . '

'; wp_import_upload_form( 'admin.php?import=sp_fixture_csv&step=1' ); echo '
'; } @@ -319,11 +319,11 @@ if ( class_exists( 'WP_Importer' ) ) { 'taxonomy' => 'sp_league', 'name' => 'sp_league', 'values' => 'slug', - 'show_option_none' => __( '— Not set —', 'sportspress' ), + 'show_option_none' => esc_attr__( '— Not set —', 'sportspress' ), ); if ( ! sp_dropdown_taxonomies( $args ) ) : echo '

' . esc_html__( 'None', 'sportspress' ) . '

'; - sp_taxonomy_adder( 'sp_league', 'sp_team', __( 'Add New', 'sportspress' ) ); + sp_taxonomy_adder( 'sp_league', 'sp_team', esc_attr__( 'Add New', 'sportspress' ) ); endif; ?> @@ -336,11 +336,11 @@ if ( class_exists( 'WP_Importer' ) ) { 'taxonomy' => 'sp_season', 'name' => 'sp_season', 'values' => 'slug', - 'show_option_none' => __( '— Not set —', 'sportspress' ), + 'show_option_none' => esc_attr__( '— Not set —', 'sportspress' ), ); if ( ! sp_dropdown_taxonomies( $args ) ) : echo '

' . esc_html__( 'None', 'sportspress' ) . '

'; - sp_taxonomy_adder( 'sp_season', 'sp_team', __( 'Add New', 'sportspress' ) ); + sp_taxonomy_adder( 'sp_season', 'sp_team', esc_attr__( 'Add New', 'sportspress' ) ); endif; ?> diff --git a/includes/admin/importers/class-sp-official-importer.php b/includes/admin/importers/class-sp-official-importer.php index 29deb01d..d8148839 100644 --- a/includes/admin/importers/class-sp-official-importer.php +++ b/includes/admin/importers/class-sp-official-importer.php @@ -23,9 +23,9 @@ if ( class_exists( 'WP_Importer' ) ) { */ public function __construct() { $this->import_page = 'sp_official_csv'; - $this->import_label = __( 'Import Officials', 'sportspress' ); + $this->import_label = esc_attr__( 'Import Officials', 'sportspress' ); $this->columns = array( - 'post_title' => __( 'Name', 'sportspress' ), + 'post_title' => esc_attr__( 'Name', 'sportspress' ), ); parent::__construct(); } @@ -117,7 +117,7 @@ if ( class_exists( 'WP_Importer' ) ) { function greet() { echo '
'; echo '

' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '

'; - echo '

' . sprintf( wp_kses_post( __( 'Officials need to be defined with columns in a specific order. Click here to download a sample.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/officials-sample.csv' ) . '

'; + echo '

' . sprintf( wp_kses_post( esc_attr__( 'Officials need to be defined with columns in a specific order. Click here to download a sample.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/officials-sample.csv' ) . '

'; wp_import_upload_form( 'admin.php?import=sp_official_csv&step=1' ); echo '
'; } diff --git a/includes/admin/importers/class-sp-player-importer.php b/includes/admin/importers/class-sp-player-importer.php index d57b4734..4944d2aa 100644 --- a/includes/admin/importers/class-sp-player-importer.php +++ b/includes/admin/importers/class-sp-player-importer.php @@ -23,16 +23,16 @@ if ( class_exists( 'WP_Importer' ) ) { */ public function __construct() { $this->import_page = 'sp_player_csv'; - $this->import_label = __( 'Import Players', 'sportspress' ); + $this->import_label = esc_attr__( 'Import Players', 'sportspress' ); $this->columns = array( - 'sp_number' => __( 'Squad Number', 'sportspress' ), - 'post_title' => __( 'Name', 'sportspress' ), - 'sp_position' => __( 'Positions', 'sportspress' ), - 'sp_team' => __( 'Teams', 'sportspress' ), - 'sp_league' => __( 'Leagues', 'sportspress' ), - 'sp_season' => __( 'Seasons', 'sportspress' ), - 'sp_nationality' => __( 'Nationality', 'sportspress' ), - 'post_date' => __( 'Date of Birth', 'sportspress' ), + 'sp_number' => esc_attr__( 'Squad Number', 'sportspress' ), + 'post_title' => esc_attr__( 'Name', 'sportspress' ), + 'sp_position' => esc_attr__( 'Positions', 'sportspress' ), + 'sp_team' => esc_attr__( 'Teams', 'sportspress' ), + 'sp_league' => esc_attr__( 'Leagues', 'sportspress' ), + 'sp_season' => esc_attr__( 'Seasons', 'sportspress' ), + 'sp_nationality' => esc_attr__( 'Nationality', 'sportspress' ), + 'post_date' => esc_attr__( 'Date of Birth', 'sportspress' ), ); parent::__construct(); } @@ -250,7 +250,7 @@ if ( class_exists( 'WP_Importer' ) ) { function greet() { echo '
'; echo '

' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '

'; - echo '

' . sprintf( wp_kses_post( __( 'Players need to be defined with columns in a specific order (8 columns). Click here to download a sample.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/players-sample.csv' ) . '

'; + echo '

' . sprintf( wp_kses_post( esc_attr__( 'Players need to be defined with columns in a specific order (8 columns). Click here to download a sample.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/players-sample.csv' ) . '

'; wp_import_upload_form( 'admin.php?import=sp_player_csv&step=1' ); echo '
'; } diff --git a/includes/admin/importers/class-sp-staff-importer.php b/includes/admin/importers/class-sp-staff-importer.php index f7af08b6..ab702efd 100644 --- a/includes/admin/importers/class-sp-staff-importer.php +++ b/includes/admin/importers/class-sp-staff-importer.php @@ -23,14 +23,14 @@ if ( class_exists( 'WP_Importer' ) ) { */ public function __construct() { $this->import_page = 'sp_staff_csv'; - $this->import_label = __( 'Import Staff', 'sportspress' ); + $this->import_label = esc_attr__( 'Import Staff', 'sportspress' ); $this->columns = array( - 'post_title' => __( 'Name', 'sportspress' ), - 'sp_role' => __( 'Jobs', 'sportspress' ), - 'sp_team' => __( 'Teams', 'sportspress' ), - 'sp_league' => __( 'Leagues', 'sportspress' ), - 'sp_season' => __( 'Seasons', 'sportspress' ), - 'sp_nationality' => __( 'Nationality', 'sportspress' ), + 'post_title' => esc_attr__( 'Name', 'sportspress' ), + 'sp_role' => esc_attr__( 'Jobs', 'sportspress' ), + 'sp_team' => esc_attr__( 'Teams', 'sportspress' ), + 'sp_league' => esc_attr__( 'Leagues', 'sportspress' ), + 'sp_season' => esc_attr__( 'Seasons', 'sportspress' ), + 'sp_nationality' => esc_attr__( 'Nationality', 'sportspress' ), ); parent::__construct(); } @@ -198,7 +198,7 @@ if ( class_exists( 'WP_Importer' ) ) { function greet() { echo '
'; echo '

' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '

'; - echo '

' . sprintf( wp_kses_post( __( 'Staff need to be defined with columns in a specific order (6 columns). Click here to download a sample.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/staff-sample.csv' ) . '

'; + echo '

' . sprintf( wp_kses_post( esc_attr__( 'Staff need to be defined with columns in a specific order (6 columns). Click here to download a sample.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/staff-sample.csv' ) . '

'; wp_import_upload_form( 'admin.php?import=sp_staff_csv&step=1' ); echo '
'; } diff --git a/includes/admin/importers/class-sp-team-importer.php b/includes/admin/importers/class-sp-team-importer.php index bc8b3e0e..1f0762b0 100644 --- a/includes/admin/importers/class-sp-team-importer.php +++ b/includes/admin/importers/class-sp-team-importer.php @@ -23,14 +23,14 @@ if ( class_exists( 'WP_Importer' ) ) { */ public function __construct() { $this->import_page = 'sp_team_csv'; - $this->import_label = __( 'Import Teams', 'sportspress' ); + $this->import_label = esc_attr__( 'Import Teams', 'sportspress' ); $this->columns = array( - 'post_title' => __( 'Name', 'sportspress' ), - 'sp_league' => __( 'Leagues', 'sportspress' ), - 'sp_season' => __( 'Seasons', 'sportspress' ), - 'sp_url' => __( 'Site URL', 'sportspress' ), - 'sp_abbreviation' => __( 'Abbreviation', 'sportspress' ), - 'sp_venue' => __( 'Home', 'sportspress' ), + 'post_title' => esc_attr__( 'Name', 'sportspress' ), + 'sp_league' => esc_attr__( 'Leagues', 'sportspress' ), + 'sp_season' => esc_attr__( 'Seasons', 'sportspress' ), + 'sp_url' => esc_attr__( 'Site URL', 'sportspress' ), + 'sp_abbreviation' => esc_attr__( 'Abbreviation', 'sportspress' ), + 'sp_venue' => esc_attr__( 'Home', 'sportspress' ), ); parent::__construct(); } @@ -144,7 +144,7 @@ if ( class_exists( 'WP_Importer' ) ) { function greet() { echo '
'; echo '

' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '

'; - echo '

' . sprintf( wp_kses_post( __( 'Teams need to be defined with columns in a specific order (3 columns). Click here to download a sample.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/teams-sample.csv' ) . '

'; + echo '

' . sprintf( wp_kses_post( esc_attr__( 'Teams need to be defined with columns in a specific order (3 columns). Click here to download a sample.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/teams-sample.csv' ) . '

'; wp_import_upload_form( 'admin.php?import=sp_team_csv&step=1' ); echo '
'; } diff --git a/includes/admin/post-types/class-sp-admin-cpt-calendar.php b/includes/admin/post-types/class-sp-admin-cpt-calendar.php index f2d631ab..2e3b61cc 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-calendar.php +++ b/includes/admin/post-types/class-sp-admin-cpt-calendar.php @@ -49,13 +49,13 @@ if ( ! class_exists( 'SP_Admin_CPT_Calendar' ) ) : $columns = array_merge( array( 'cb' => '', - 'title' => __( 'Title', 'sportspress' ), - 'sp_league' => __( 'League', 'sportspress' ), - 'sp_season' => __( 'Season', 'sportspress' ), - 'sp_venue' => __( 'Venue', 'sportspress' ), - 'sp_team' => __( 'Team', 'sportspress' ), - 'sp_events' => __( 'Events', 'sportspress' ), - 'sp_layout' => __( 'Layout', 'sportspress' ), + 'title' => esc_attr__( 'Title', 'sportspress' ), + 'sp_league' => esc_attr__( 'League', 'sportspress' ), + 'sp_season' => esc_attr__( 'Season', 'sportspress' ), + 'sp_venue' => esc_attr__( 'Venue', 'sportspress' ), + 'sp_team' => esc_attr__( 'Team', 'sportspress' ), + 'sp_events' => esc_attr__( 'Events', 'sportspress' ), + 'sp_layout' => esc_attr__( 'Layout', 'sportspress' ), ), $existing_columns ); @@ -122,7 +122,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Calendar' ) ) : $selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null; $args = array( - 'show_option_all' => __( 'Show all leagues', 'sportspress' ), + 'show_option_all' => esc_attr__( 'Show all leagues', 'sportspress' ), 'taxonomy' => 'sp_league', 'name' => 'sp_league', 'selected' => $selected, @@ -131,7 +131,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Calendar' ) ) : $selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null; $args = array( - 'show_option_all' => __( 'Show all seasons', 'sportspress' ), + 'show_option_all' => esc_attr__( 'Show all seasons', 'sportspress' ), 'taxonomy' => 'sp_season', 'name' => 'sp_season', 'selected' => $selected, @@ -142,11 +142,11 @@ if ( ! class_exists( 'SP_Admin_CPT_Calendar' ) ) : $args = array( 'post_type' => 'sp_team', 'name' => 'team', - 'show_option_none' => __( 'Show all teams', 'sportspress' ), + 'show_option_none' => esc_attr__( 'Show all teams', 'sportspress' ), 'selected' => $selected, 'values' => 'ID', ); - esc_html ( wp_dropdown_pages( $args ) ); + wp_dropdown_pages( $args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } /** diff --git a/includes/admin/post-types/class-sp-admin-cpt-column.php b/includes/admin/post-types/class-sp-admin-cpt-column.php index 4ba91f88..05f9831b 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-column.php +++ b/includes/admin/post-types/class-sp-admin-cpt-column.php @@ -43,12 +43,12 @@ if ( ! class_exists( 'SP_Admin_CPT_Column' ) ) : public function edit_columns( $existing_columns ) { $columns = array( 'cb' => '', - 'title' => __( 'Label', 'sportspress' ), - 'sp_key' => __( 'Key', 'sportspress' ), - 'sp_equation' => __( 'Equation', 'sportspress' ), - 'sp_precision' => __( 'Decimal Places', 'sportspress' ), - 'sp_order' => __( 'Sort Order', 'sportspress' ), - 'sp_description' => __( 'Description', 'sportspress' ), + 'title' => esc_attr__( 'Label', 'sportspress' ), + 'sp_key' => esc_attr__( 'Key', 'sportspress' ), + 'sp_equation' => esc_attr__( 'Equation', 'sportspress' ), + 'sp_precision' => esc_attr__( 'Decimal Places', 'sportspress' ), + 'sp_order' => esc_attr__( 'Sort Order', 'sportspress' ), + 'sp_description' => esc_attr__( 'Description', 'sportspress' ), ); return apply_filters( 'sportspress_column_admin_columns', $columns ); } diff --git a/includes/admin/post-types/class-sp-admin-cpt-event.php b/includes/admin/post-types/class-sp-admin-cpt-event.php index b126de95..e03797a0 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-event.php +++ b/includes/admin/post-types/class-sp-admin-cpt-event.php @@ -64,7 +64,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Event' ) ) : */ public function enter_title_here( $text, $post ) { if ( $post->post_type == 'sp_event' ) { - return __( '(Auto)', 'sportspress' ); + return esc_attr__( '(Auto)', 'sportspress' ); } return $text; @@ -134,19 +134,19 @@ if ( ! class_exists( 'SP_Admin_CPT_Event' ) ) : $columns = array_merge( array( 'cb' => '', - 'sp_format' => '', + 'sp_format' => '', 'title' => null, - 'date' => __( 'Date', 'sportspress' ), - 'sp_time' => __( 'Time', 'sportspress' ), - 'sp_team' => __( 'Teams', 'sportspress' ), - 'sp_league' => __( 'League', 'sportspress' ), - 'sp_season' => __( 'Season', 'sportspress' ), - 'sp_venue' => __( 'Venue', 'sportspress' ), - 'sp_day' => __( 'Match Day', 'sportspress' ), + 'date' => esc_attr__( 'Date', 'sportspress' ), + 'sp_time' => esc_attr__( 'Time', 'sportspress' ), + 'sp_team' => esc_attr__( 'Teams', 'sportspress' ), + 'sp_league' => esc_attr__( 'League', 'sportspress' ), + 'sp_season' => esc_attr__( 'Season', 'sportspress' ), + 'sp_venue' => esc_attr__( 'Venue', 'sportspress' ), + 'sp_day' => esc_attr__( 'Match Day', 'sportspress' ), ), $existing_columns, array( - 'title' => __( 'Event', 'sportspress' ), + 'title' => esc_attr__( 'Event', 'sportspress' ), ) ); return apply_filters( 'sportspress_event_admin_columns', $columns ); @@ -236,7 +236,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Event' ) ) : $team_results = implode( ' | ', $team_results ); endif; - echo '' . ( $team_result == '' ? '-' : wp_kses_post( apply_filters( 'sportspress_event_team_result_admin', $team_result, $post_id, $team_id ) ) ) . ''; + echo '' . ( esc_attr( $team_result ) == '' ? '-' : wp_kses_post( apply_filters( 'sportspress_event_team_result_admin', $team_result, $post_id, $team_id ) ) ) . ''; echo ' '; echo esc_html( $team->post_title ); echo '
'; @@ -266,7 +266,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Event' ) ) : case 'sp_day': $day = get_post_meta( $post_id, 'sp_day', true ); if ( '' === $day ) { - $day = __( 'Default', 'sportspress' ); + $day = esc_attr__( 'Default', 'sportspress' ); } echo esc_html( $day ); break; @@ -287,15 +287,15 @@ if ( ! class_exists( 'SP_Admin_CPT_Event' ) ) : $args = array( 'post_type' => 'sp_team', 'name' => 'team', - 'show_option_none' => __( 'Show all teams', 'sportspress' ), + 'show_option_none' => esc_attr__( 'Show all teams', 'sportspress' ), 'selected' => $selected, 'values' => 'ID', ); - esc_html( wp_dropdown_pages( $args ) ); + wp_dropdown_pages( $args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped $selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null; $args = array( - 'show_option_all' => __( 'Show all leagues', 'sportspress' ), + 'show_option_all' => esc_attr__( 'Show all leagues', 'sportspress' ), 'taxonomy' => 'sp_league', 'name' => 'sp_league', 'selected' => $selected, @@ -304,7 +304,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Event' ) ) : $selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null; $args = array( - 'show_option_all' => __( 'Show all seasons', 'sportspress' ), + 'show_option_all' => esc_attr__( 'Show all seasons', 'sportspress' ), 'taxonomy' => 'sp_season', 'name' => 'sp_season', 'selected' => $selected, @@ -359,11 +359,11 @@ if ( ! class_exists( 'SP_Admin_CPT_Event' ) ) : $status = get_post_meta( $post->ID, 'sp_status', true ); if ( 'postponed' == $status ) { - $post_states = array( __( 'Postponed', 'sportspress' ) ); + $post_states = array( esc_attr__( 'Postponed', 'sportspress' ) ); } elseif ( 'cancelled' == $status ) { - $post_states = array( __( 'Canceled', 'sportspress' ) ); + $post_states = array( esc_attr__( 'Canceled', 'sportspress' ) ); } elseif ( 'tbd' == $status ) { - $post_states = array( __( 'TBD', 'sportspress' ) ); + $post_states = array( esc_attr__( 'TBD', 'sportspress' ) ); } return $post_states; diff --git a/includes/admin/post-types/class-sp-admin-cpt-list.php b/includes/admin/post-types/class-sp-admin-cpt-list.php index 7b92b7c5..3128043b 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-list.php +++ b/includes/admin/post-types/class-sp-admin-cpt-list.php @@ -49,12 +49,12 @@ if ( ! class_exists( 'SP_Admin_CPT_List' ) ) : $columns = array_merge( array( 'cb' => '', - 'title' => __( 'Title', 'sportspress' ), - 'sp_league' => __( 'League', 'sportspress' ), - 'sp_season' => __( 'Season', 'sportspress' ), - 'sp_team' => __( 'Team', 'sportspress' ), - 'sp_player' => __( 'Players', 'sportspress' ), - 'sp_layout' => __( 'Layout', 'sportspress' ), + 'title' => esc_attr__( 'Title', 'sportspress' ), + 'sp_league' => esc_attr__( 'League', 'sportspress' ), + 'sp_season' => esc_attr__( 'Season', 'sportspress' ), + 'sp_team' => esc_attr__( 'Team', 'sportspress' ), + 'sp_player' => esc_attr__( 'Players', 'sportspress' ), + 'sp_layout' => esc_attr__( 'Layout', 'sportspress' ), ), $existing_columns ); @@ -118,7 +118,7 @@ if ( ! class_exists( 'SP_Admin_CPT_List' ) ) : $selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null; $args = array( - 'show_option_all' => __( 'Show all leagues', 'sportspress' ), + 'show_option_all' => esc_attr__( 'Show all leagues', 'sportspress' ), 'taxonomy' => 'sp_league', 'name' => 'sp_league', 'selected' => $selected, @@ -127,7 +127,7 @@ if ( ! class_exists( 'SP_Admin_CPT_List' ) ) : $selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null; $args = array( - 'show_option_all' => __( 'Show all seasons', 'sportspress' ), + 'show_option_all' => esc_attr__( 'Show all seasons', 'sportspress' ), 'taxonomy' => 'sp_season', 'name' => 'sp_season', 'selected' => $selected, @@ -138,11 +138,11 @@ if ( ! class_exists( 'SP_Admin_CPT_List' ) ) : $args = array( 'post_type' => 'sp_team', 'name' => 'team', - 'show_option_none' => __( 'Show all teams', 'sportspress' ), + 'show_option_none' => esc_attr__( 'Show all teams', 'sportspress' ), 'selected' => $selected, 'values' => 'ID', ); - esc_html( wp_dropdown_pages( $args ) ); + wp_dropdown_pages( $args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } /** diff --git a/includes/admin/post-types/class-sp-admin-cpt-metric.php b/includes/admin/post-types/class-sp-admin-cpt-metric.php index 12397466..a5c96b85 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-metric.php +++ b/includes/admin/post-types/class-sp-admin-cpt-metric.php @@ -43,9 +43,9 @@ if ( ! class_exists( 'SP_Admin_CPT_Metric' ) ) : public function edit_columns( $existing_columns ) { $columns = array( 'cb' => '', - 'title' => __( 'Label', 'sportspress' ), - 'sp_key' => __( 'Variable', 'sportspress' ), - 'sp_description' => __( 'Description', 'sportspress' ), + 'title' => esc_attr__( 'Label', 'sportspress' ), + 'sp_key' => esc_attr__( 'Variable', 'sportspress' ), + 'sp_description' => esc_attr__( 'Description', 'sportspress' ), ); return apply_filters( 'sportspress_metric_admin_columns', $columns ); } diff --git a/includes/admin/post-types/class-sp-admin-cpt-official.php b/includes/admin/post-types/class-sp-admin-cpt-official.php index 7e0ca0f9..919a4dc4 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-official.php +++ b/includes/admin/post-types/class-sp-admin-cpt-official.php @@ -45,7 +45,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Official' ) ) : */ public function enter_title_here( $text, $post ) { if ( $post->post_type == 'sp_official' ) { - return __( 'Name', 'sportspress' ); + return esc_attr__( 'Name', 'sportspress' ); } return $text; diff --git a/includes/admin/post-types/class-sp-admin-cpt-outcome.php b/includes/admin/post-types/class-sp-admin-cpt-outcome.php index 0b7e881d..70616901 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-outcome.php +++ b/includes/admin/post-types/class-sp-admin-cpt-outcome.php @@ -43,10 +43,10 @@ if ( ! class_exists( 'SP_Admin_CPT_Outcome' ) ) : public function edit_columns( $existing_columns ) { $columns = array( 'cb' => '', - 'title' => __( 'Label', 'sportspress' ), - 'sp_key' => __( 'Variable', 'sportspress' ), - 'sp_abbreviation' => __( 'Abbreviation', 'sportspress' ), - 'sp_description' => __( 'Description', 'sportspress' ), + 'title' => esc_attr__( 'Label', 'sportspress' ), + 'sp_key' => esc_attr__( 'Variable', 'sportspress' ), + 'sp_abbreviation' => esc_attr__( 'Abbreviation', 'sportspress' ), + 'sp_description' => esc_attr__( 'Description', 'sportspress' ), ); return apply_filters( 'sportspress_outcome_admin_columns', $columns ); } diff --git a/includes/admin/post-types/class-sp-admin-cpt-performance.php b/includes/admin/post-types/class-sp-admin-cpt-performance.php index 32e032c7..53f84207 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-performance.php +++ b/includes/admin/post-types/class-sp-admin-cpt-performance.php @@ -43,12 +43,12 @@ if ( ! class_exists( 'SP_Admin_CPT_Performance' ) ) : public function edit_columns( $existing_columns ) { $columns = array( 'cb' => '', - 'sp_icon' => __( 'Icon', 'sportspress' ), - 'title' => __( 'Label', 'sportspress' ), - 'sp_key' => __( 'Variable', 'sportspress' ), - 'sp_section' => __( 'Category', 'sportspress' ), - 'sp_config_format' => __( 'Format', 'sportspress' ), - 'sp_description' => __( 'Description', 'sportspress' ), + 'sp_icon' => esc_attr__( 'Icon', 'sportspress' ), + 'title' => esc_attr__( 'Label', 'sportspress' ), + 'sp_key' => esc_attr__( 'Variable', 'sportspress' ), + 'sp_section' => esc_attr__( 'Category', 'sportspress' ), + 'sp_config_format' => esc_attr__( 'Format', 'sportspress' ), + 'sp_description' => esc_attr__( 'Description', 'sportspress' ), ); return apply_filters( 'sportspress_performance_admin_columns', $columns ); } diff --git a/includes/admin/post-types/class-sp-admin-cpt-player.php b/includes/admin/post-types/class-sp-admin-cpt-player.php index c62c8e5b..e0cbecb0 100755 --- a/includes/admin/post-types/class-sp-admin-cpt-player.php +++ b/includes/admin/post-types/class-sp-admin-cpt-player.php @@ -62,7 +62,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Player' ) ) : */ public function enter_title_here( $text, $post ) { if ( $post->post_type == 'sp_player' ) { - return __( 'Name', 'sportspress' ); + return esc_attr__( 'Name', 'sportspress' ); } return $text; @@ -76,16 +76,16 @@ if ( ! class_exists( 'SP_Admin_CPT_Player' ) ) : $columns = array_merge( array( 'cb' => '', - 'sp_number' => '', + 'sp_number' => '', 'title' => null, - 'sp_position' => __( 'Positions', 'sportspress' ), - 'sp_team' => __( 'Teams', 'sportspress' ), - 'sp_league' => __( 'Leagues', 'sportspress' ), - 'sp_season' => __( 'Seasons', 'sportspress' ), + 'sp_position' => esc_attr__( 'Positions', 'sportspress' ), + 'sp_team' => esc_attr__( 'Teams', 'sportspress' ), + 'sp_league' => esc_attr__( 'Leagues', 'sportspress' ), + 'sp_season' => esc_attr__( 'Seasons', 'sportspress' ), ), $existing_columns, array( - 'title' => __( 'Name', 'sportspress' ), + 'title' => esc_attr__( 'Name', 'sportspress' ), ) ); return apply_filters( 'sportspress_player_admin_columns', $columns ); @@ -156,7 +156,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Player' ) ) : if ( taxonomy_exists( 'sp_position' ) ) : $selected = isset( $_REQUEST['sp_position'] ) ? sanitize_key( $_REQUEST['sp_position'] ) : null; $args = array( - 'show_option_all' => __( 'Show all positions', 'sportspress' ), + 'show_option_all' => esc_attr__( 'Show all positions', 'sportspress' ), 'taxonomy' => 'sp_position', 'name' => 'sp_position', 'selected' => $selected, @@ -168,16 +168,16 @@ if ( ! class_exists( 'SP_Admin_CPT_Player' ) ) : $args = array( 'post_type' => 'sp_team', 'name' => 'team', - 'show_option_none' => __( 'Show all teams', 'sportspress' ), + 'show_option_none' => esc_attr__( 'Show all teams', 'sportspress' ), 'selected' => $selected, 'values' => 'ID', ); - esc_html( wp_dropdown_pages( $args ) ); + wp_dropdown_pages( $args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped if ( taxonomy_exists( 'sp_league' ) ) : $selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null; $args = array( - 'show_option_all' => __( 'Show all leagues', 'sportspress' ), + 'show_option_all' => esc_attr__( 'Show all leagues', 'sportspress' ), 'taxonomy' => 'sp_league', 'name' => 'sp_league', 'selected' => $selected, @@ -188,7 +188,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Player' ) ) : if ( taxonomy_exists( 'sp_season' ) ) : $selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null; $args = array( - 'show_option_all' => __( 'Show all seasons', 'sportspress' ), + 'show_option_all' => esc_attr__( 'Show all seasons', 'sportspress' ), 'taxonomy' => 'sp_season', 'name' => 'sp_season', 'selected' => $selected, diff --git a/includes/admin/post-types/class-sp-admin-cpt-result.php b/includes/admin/post-types/class-sp-admin-cpt-result.php index 2f6dc560..3b63c6b1 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-result.php +++ b/includes/admin/post-types/class-sp-admin-cpt-result.php @@ -43,9 +43,9 @@ if ( ! class_exists( 'SP_Admin_CPT_Result' ) ) : public function edit_columns( $existing_columns ) { $columns = array( 'cb' => '', - 'title' => __( 'Label', 'sportspress' ), - 'sp_key' => __( 'Variable', 'sportspress' ), - 'sp_description' => __( 'Description', 'sportspress' ), + 'title' => esc_attr__( 'Label', 'sportspress' ), + 'sp_key' => esc_attr__( 'Variable', 'sportspress' ), + 'sp_description' => esc_attr__( 'Description', 'sportspress' ), ); return apply_filters( 'sportspress_result_admin_columns', $columns ); } diff --git a/includes/admin/post-types/class-sp-admin-cpt-spec.php b/includes/admin/post-types/class-sp-admin-cpt-spec.php index 2ddaa9fc..13f0b236 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-spec.php +++ b/includes/admin/post-types/class-sp-admin-cpt-spec.php @@ -43,9 +43,9 @@ if ( ! class_exists( 'SP_Admin_CPT_Spec' ) ) : public function edit_columns( $existing_columns ) { $columns = array( 'cb' => '', - 'title' => __( 'Label', 'sportspress' ), - 'sp_key' => __( 'Variable', 'sportspress' ), - 'sp_description' => __( 'Description', 'sportspress' ), + 'title' => esc_attr__( 'Label', 'sportspress' ), + 'sp_key' => esc_attr__( 'Variable', 'sportspress' ), + 'sp_description' => esc_attr__( 'Description', 'sportspress' ), ); return apply_filters( 'sportspress_spec_admin_columns', $columns ); } diff --git a/includes/admin/post-types/class-sp-admin-cpt-staff.php b/includes/admin/post-types/class-sp-admin-cpt-staff.php index 7c69e239..a185548a 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-staff.php +++ b/includes/admin/post-types/class-sp-admin-cpt-staff.php @@ -53,7 +53,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Staff' ) ) : */ public function enter_title_here( $text, $post ) { if ( $post->post_type == 'sp_staff' ) { - return __( 'Name', 'sportspress' ); + return esc_attr__( 'Name', 'sportspress' ); } return $text; @@ -68,14 +68,14 @@ if ( ! class_exists( 'SP_Admin_CPT_Staff' ) ) : array( 'cb' => '', 'title' => null, - 'sp_role' => __( 'Job', 'sportspress' ), - 'sp_team' => __( 'Teams', 'sportspress' ), - 'sp_league' => __( 'Leagues', 'sportspress' ), - 'sp_season' => __( 'Seasons', 'sportspress' ), + 'sp_role' => esc_attr__( 'Job', 'sportspress' ), + 'sp_team' => esc_attr__( 'Teams', 'sportspress' ), + 'sp_league' => esc_attr__( 'Leagues', 'sportspress' ), + 'sp_season' => esc_attr__( 'Seasons', 'sportspress' ), ), $existing_columns, array( - 'title' => __( 'Name', 'sportspress' ), + 'title' => esc_attr__( 'Name', 'sportspress' ), ) ); return apply_filters( 'sportspress_staff_admin_columns', $columns ); @@ -89,7 +89,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Staff' ) ) : public function custom_columns( $column, $post_id ) { switch ( $column ) : case 'sp_role': - echo get_the_terms( $post_id, 'sp_role' ) ? the_terms( $post_id, 'sp_role' ) : '—'; + echo get_the_terms( $post_id, 'sp_role' ) ? wp_kses_post( the_terms( $post_id, 'sp_role' ) ) : '—'; break; case 'sp_team': $teams = (array) get_post_meta( $post_id, 'sp_team', false ); @@ -106,7 +106,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Staff' ) ) : if ( $team ) : echo esc_html( $team->post_title ); if ( in_array( $team_id, $current_teams ) ) : - echo ''; + echo ''; endif; echo '
'; endif; @@ -114,10 +114,10 @@ if ( ! class_exists( 'SP_Admin_CPT_Staff' ) ) : endif; break; case 'sp_league': - echo get_the_terms( $post_id, 'sp_league' ) ? the_terms( $post_id, 'sp_league' ) : '—'; + echo get_the_terms( $post_id, 'sp_league' ) ? wp_kses_post( the_terms( $post_id, 'sp_league' ) ) : '—'; break; case 'sp_season': - echo get_the_terms( $post_id, 'sp_season' ) ? the_terms( $post_id, 'sp_season' ) : '—'; + echo get_the_terms( $post_id, 'sp_season' ) ? wp_kses_post( the_terms( $post_id, 'sp_season' ) ) : '—'; break; endswitch; } @@ -136,15 +136,15 @@ if ( ! class_exists( 'SP_Admin_CPT_Staff' ) ) : $args = array( 'post_type' => 'sp_team', 'name' => 'team', - 'show_option_none' => __( 'Show all teams', 'sportspress' ), + 'show_option_none' => esc_attr__( 'Show all teams', 'sportspress' ), 'selected' => $selected, 'values' => 'ID', ); - wp_dropdown_pages( $args ); + wp_dropdown_pages( $args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped $selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null; $args = array( - 'show_option_all' => __( 'Show all leagues', 'sportspress' ), + 'show_option_all' => esc_attr__( 'Show all leagues', 'sportspress' ), 'taxonomy' => 'sp_league', 'name' => 'sp_league', 'selected' => $selected, @@ -153,7 +153,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Staff' ) ) : $selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null; $args = array( - 'show_option_all' => __( 'Show all seasons', 'sportspress' ), + 'show_option_all' => esc_attr__( 'Show all seasons', 'sportspress' ), 'taxonomy' => 'sp_season', 'name' => 'sp_season', 'selected' => $selected, diff --git a/includes/admin/post-types/class-sp-admin-cpt-statistic.php b/includes/admin/post-types/class-sp-admin-cpt-statistic.php index 3b4739fe..e10b07e1 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-statistic.php +++ b/includes/admin/post-types/class-sp-admin-cpt-statistic.php @@ -43,12 +43,12 @@ if ( ! class_exists( 'SP_Admin_CPT_Statistic' ) ) : public function edit_columns( $existing_columns ) { $columns = array( 'cb' => '', - 'sp_icon' => __( 'Icon', 'sportspress' ), - 'title' => __( 'Label', 'sportspress' ), - 'sp_key' => __( 'Key', 'sportspress' ), - 'sp_equation' => __( 'Equation', 'sportspress' ), - 'sp_precision' => __( 'Decimal Places', 'sportspress' ), - 'sp_description' => __( 'Description', 'sportspress' ), + 'sp_icon' => esc_attr__( 'Icon', 'sportspress' ), + 'title' => esc_attr__( 'Label', 'sportspress' ), + 'sp_key' => esc_attr__( 'Key', 'sportspress' ), + 'sp_equation' => esc_attr__( 'Equation', 'sportspress' ), + 'sp_precision' => esc_attr__( 'Decimal Places', 'sportspress' ), + 'sp_description' => esc_attr__( 'Description', 'sportspress' ), ); return apply_filters( 'sportspress_statistic_admin_columns', $columns ); } diff --git a/includes/admin/post-types/class-sp-admin-cpt-table.php b/includes/admin/post-types/class-sp-admin-cpt-table.php index 65a17120..90547bbb 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-table.php +++ b/includes/admin/post-types/class-sp-admin-cpt-table.php @@ -49,10 +49,10 @@ if ( ! class_exists( 'SP_Admin_CPT_Table' ) ) : $columns = array_merge( array( 'cb' => '', - 'title' => __( 'Title', 'sportspress' ), - 'sp_league' => __( 'League', 'sportspress' ), - 'sp_season' => __( 'Season', 'sportspress' ), - 'sp_team' => __( 'Teams', 'sportspress' ), + 'title' => esc_attr__( 'Title', 'sportspress' ), + 'sp_league' => esc_attr__( 'League', 'sportspress' ), + 'sp_season' => esc_attr__( 'Season', 'sportspress' ), + 'sp_team' => esc_attr__( 'Teams', 'sportspress' ), ), $existing_columns ); @@ -96,7 +96,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Table' ) ) : $selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null; $args = array( - 'show_option_all' => __( 'Show all leagues', 'sportspress' ), + 'show_option_all' => esc_attr__( 'Show all leagues', 'sportspress' ), 'taxonomy' => 'sp_league', 'name' => 'sp_league', 'selected' => $selected, @@ -105,7 +105,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Table' ) ) : $selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null; $args = array( - 'show_option_all' => __( 'Show all seasons', 'sportspress' ), + 'show_option_all' => esc_attr__( 'Show all seasons', 'sportspress' ), 'taxonomy' => 'sp_season', 'name' => 'sp_season', 'selected' => $selected, @@ -116,11 +116,11 @@ if ( ! class_exists( 'SP_Admin_CPT_Table' ) ) : $args = array( 'post_type' => 'sp_team', 'name' => 'team', - 'show_option_none' => __( 'Show all teams', 'sportspress' ), + 'show_option_none' => esc_attr__( 'Show all teams', 'sportspress' ), 'selected' => $selected, 'values' => 'ID', ); - esc_html( wp_dropdown_pages( $args ) ); + wp_dropdown_pages( $args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } /** diff --git a/includes/admin/post-types/class-sp-admin-cpt-team.php b/includes/admin/post-types/class-sp-admin-cpt-team.php index 057ab716..f914661a 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-team.php +++ b/includes/admin/post-types/class-sp-admin-cpt-team.php @@ -52,7 +52,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Team' ) ) : */ public function enter_title_here( $text, $post ) { if ( $post->post_type == 'sp_team' ) { - return __( 'Name', 'sportspress' ); + return esc_attr__( 'Name', 'sportspress' ); } return $text; @@ -66,16 +66,16 @@ if ( ! class_exists( 'SP_Admin_CPT_Team' ) ) : $columns = array_merge( array( 'cb' => '', - 'sp_icon' => '', + 'sp_icon' => '', 'title' => null, - 'sp_short_name' => __( 'Short Name', 'sportspress' ), - 'sp_abbreviation' => __( 'Abbreviation', 'sportspress' ), - 'sp_league' => __( 'Leagues', 'sportspress' ), - 'sp_season' => __( 'Seasons', 'sportspress' ), + 'sp_short_name' => esc_attr__( 'Short Name', 'sportspress' ), + 'sp_abbreviation' => esc_attr__( 'Abbreviation', 'sportspress' ), + 'sp_league' => esc_attr__( 'Leagues', 'sportspress' ), + 'sp_season' => esc_attr__( 'Seasons', 'sportspress' ), ), $existing_columns, array( - 'title' => __( 'Team', 'sportspress' ), + 'title' => esc_attr__( 'Team', 'sportspress' ), ) ); return apply_filters( 'sportspress_team_admin_columns', $columns ); @@ -120,7 +120,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Team' ) ) : $selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null; $args = array( - 'show_option_all' => __( 'Show all leagues', 'sportspress' ), + 'show_option_all' => esc_attr__( 'Show all leagues', 'sportspress' ), 'taxonomy' => 'sp_league', 'name' => 'sp_league', 'selected' => $selected, @@ -129,7 +129,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Team' ) ) : $selected = isset( $_REQUEST['sp_season'] ) ? sanitize_key( $_REQUEST['sp_season'] ) : null; $args = array( - 'show_option_all' => __( 'Show all seasons', 'sportspress' ), + 'show_option_all' => esc_attr__( 'Show all seasons', 'sportspress' ), 'taxonomy' => 'sp_season', 'name' => 'sp_season', 'selected' => $selected, diff --git a/includes/admin/post-types/class-sp-admin-cpt.php b/includes/admin/post-types/class-sp-admin-cpt.php index fd1e9fbd..75a63bdc 100644 --- a/includes/admin/post-types/class-sp-admin-cpt.php +++ b/includes/admin/post-types/class-sp-admin-cpt.php @@ -42,8 +42,8 @@ if ( ! class_exists( 'SP_Admin_CPT' ) ) : if ( $post_type == $this->type ) { $obj = get_post_type_object( $this->type ); - $strings['insertIntoPost'] = sprintf( __( 'Insert into %s', 'sportspress' ), $obj->labels->singular_name ); - $strings['uploadedToThisPost'] = sprintf( __( 'Uploaded to this %s', 'sportspress' ), $obj->labels->singular_name ); + $strings['insertIntoPost'] = sprintf( esc_attr__( 'Insert into %s', 'sportspress' ), $obj->labels->singular_name ); + $strings['uploadedToThisPost'] = sprintf( esc_attr__( 'Uploaded to this %s', 'sportspress' ), $obj->labels->singular_name ); } return $strings; diff --git a/includes/admin/post-types/class-sp-admin-meta-boxes.php b/includes/admin/post-types/class-sp-admin-meta-boxes.php index 993bcc94..f94fe61b 100644 --- a/includes/admin/post-types/class-sp-admin-meta-boxes.php +++ b/includes/admin/post-types/class-sp-admin-meta-boxes.php @@ -31,7 +31,7 @@ class SP_Admin_Meta_Boxes { $meta_boxes = array( 'sp_outcome' => array( 'details' => array( - 'title' => __( 'Details', 'sportspress' ), + 'title' => esc_attr__( 'Details', 'sportspress' ), 'save' => 'SP_Meta_Box_Outcome_Details::save', 'output' => 'SP_Meta_Box_Outcome_Details::output', 'context' => 'normal', @@ -40,14 +40,14 @@ class SP_Admin_Meta_Boxes { ), 'sp_result' => array( 'details' => array( - 'title' => __( 'Details', 'sportspress' ), + 'title' => esc_attr__( 'Details', 'sportspress' ), 'save' => 'SP_Meta_Box_Result_Details::save', 'output' => 'SP_Meta_Box_Result_Details::output', 'context' => 'side', 'priority' => 'default', ), 'equation' => array( - 'title' => __( 'Equation', 'sportspress' ), + 'title' => esc_attr__( 'Equation', 'sportspress' ), 'save' => 'SP_Meta_Box_Result_Equation::save', 'output' => 'SP_Meta_Box_Result_Equation::output', 'context' => 'normal', @@ -56,14 +56,14 @@ class SP_Admin_Meta_Boxes { ), 'sp_performance' => array( 'details' => array( - 'title' => __( 'Details', 'sportspress' ), + 'title' => esc_attr__( 'Details', 'sportspress' ), 'save' => 'SP_Meta_Box_Performance_Details::save', 'output' => 'SP_Meta_Box_Performance_Details::output', 'context' => 'normal', 'priority' => 'high', ), 'equation' => array( - 'title' => __( 'Equation', 'sportspress' ), + 'title' => esc_attr__( 'Equation', 'sportspress' ), 'save' => 'SP_Meta_Box_Performance_Equation::save', 'output' => 'SP_Meta_Box_Performance_Equation::output', 'context' => 'normal', @@ -72,14 +72,14 @@ class SP_Admin_Meta_Boxes { ), 'sp_column' => array( 'details' => array( - 'title' => __( 'Details', 'sportspress' ), + 'title' => esc_attr__( 'Details', 'sportspress' ), 'save' => 'SP_Meta_Box_Column_Details::save', 'output' => 'SP_Meta_Box_Column_Details::output', 'context' => 'side', 'priority' => 'default', ), 'equation' => array( - 'title' => __( 'Equation', 'sportspress' ), + 'title' => esc_attr__( 'Equation', 'sportspress' ), 'save' => 'SP_Meta_Box_Column_Equation::save', 'output' => 'SP_Meta_Box_Column_Equation::output', 'context' => 'normal', @@ -88,7 +88,7 @@ class SP_Admin_Meta_Boxes { ), 'sp_metric' => array( 'details' => array( - 'title' => __( 'Details', 'sportspress' ), + 'title' => esc_attr__( 'Details', 'sportspress' ), 'save' => 'SP_Meta_Box_Metric_Details::save', 'output' => 'SP_Meta_Box_Metric_Details::output', 'context' => 'normal', @@ -97,14 +97,14 @@ class SP_Admin_Meta_Boxes { ), 'sp_statistic' => array( 'details' => array( - 'title' => __( 'Details', 'sportspress' ), + 'title' => esc_attr__( 'Details', 'sportspress' ), 'save' => 'SP_Meta_Box_Statistic_Details::save', 'output' => 'SP_Meta_Box_Statistic_Details::output', 'context' => 'side', 'priority' => 'default', ), 'equation' => array( - 'title' => __( 'Equation', 'sportspress' ), + 'title' => esc_attr__( 'Equation', 'sportspress' ), 'save' => 'SP_Meta_Box_Statistic_Equation::save', 'output' => 'SP_Meta_Box_Statistic_Equation::output', 'context' => 'normal', @@ -113,48 +113,48 @@ class SP_Admin_Meta_Boxes { ), 'sp_event' => array( 'shortcode' => array( - 'title' => __( 'Shortcodes', 'sportspress' ), + 'title' => esc_attr__( 'Shortcodes', 'sportspress' ), 'output' => 'SP_Meta_Box_Event_Shortcode::output', 'context' => 'side', 'priority' => 'default', ), 'format' => array( - 'title' => __( 'Format', 'sportspress' ), + 'title' => esc_attr__( 'Format', 'sportspress' ), 'save' => 'SP_Meta_Box_Event_Format::save', 'output' => 'SP_Meta_Box_Event_Format::output', 'context' => 'side', 'priority' => 'default', ), 'mode' => array( - 'title' => __( 'Mode', 'sportspress' ), + 'title' => esc_attr__( 'Mode', 'sportspress' ), 'save' => 'SP_Meta_Box_Event_Mode::save', 'output' => 'SP_Meta_Box_Event_Mode::output', 'context' => 'side', 'priority' => 'default', ), 'details' => array( - 'title' => __( 'Details', 'sportspress' ), + 'title' => esc_attr__( 'Details', 'sportspress' ), 'save' => 'SP_Meta_Box_Event_Details::save', 'output' => 'SP_Meta_Box_Event_Details::output', 'context' => 'side', 'priority' => 'default', ), 'team' => array( - 'title' => __( 'Teams', 'sportspress' ), + 'title' => esc_attr__( 'Teams', 'sportspress' ), 'save' => 'SP_Meta_Box_Event_Teams::save', 'output' => 'SP_Meta_Box_Event_Teams::output', 'context' => 'side', 'priority' => 'default', ), 'results' => array( - 'title' => __( 'Results', 'sportspress' ), + 'title' => esc_attr__( 'Results', 'sportspress' ), 'save' => 'SP_Meta_Box_Event_Results::save', 'output' => 'SP_Meta_Box_Event_Results::output', 'context' => 'normal', 'priority' => 'high', ), 'performance' => array( - 'title' => __( 'Box Score', 'sportspress' ), + 'title' => esc_attr__( 'Box Score', 'sportspress' ), 'save' => 'SP_Meta_Box_Event_Performance::save', 'output' => 'SP_Meta_Box_Event_Performance::output', 'context' => 'normal', @@ -163,14 +163,14 @@ class SP_Admin_Meta_Boxes { ), 'sp_team' => array( 'details' => array( - 'title' => __( 'Details', 'sportspress' ), + 'title' => esc_attr__( 'Details', 'sportspress' ), 'save' => 'SP_Meta_Box_Team_Details::save', 'output' => 'SP_Meta_Box_Team_Details::output', 'context' => 'side', 'priority' => 'default', ), 'staff' => array( - 'title' => __( 'Staff', 'sportspress' ), + 'title' => esc_attr__( 'Staff', 'sportspress' ), 'save' => 'SP_Meta_Box_Team_Staff::save', 'output' => 'SP_Meta_Box_Team_Staff::output', 'context' => 'normal', @@ -179,34 +179,34 @@ class SP_Admin_Meta_Boxes { ), 'sp_player' => array( 'shortcode' => array( - 'title' => __( 'Shortcodes', 'sportspress' ), + 'title' => esc_attr__( 'Shortcodes', 'sportspress' ), 'output' => 'SP_Meta_Box_Player_Shortcode::output', 'context' => 'side', 'priority' => 'default', ), 'columns' => array( - 'title' => __( 'Columns', 'sportspress' ), + 'title' => esc_attr__( 'Columns', 'sportspress' ), 'save' => 'SP_Meta_Box_Player_Columns::save', 'output' => 'SP_Meta_Box_Player_Columns::output', 'context' => 'side', 'priority' => 'default', ), 'details' => array( - 'title' => __( 'Details', 'sportspress' ), + 'title' => esc_attr__( 'Details', 'sportspress' ), 'save' => 'SP_Meta_Box_Player_Details::save', 'output' => 'SP_Meta_Box_Player_Details::output', 'context' => 'side', 'priority' => 'default', ), 'metrics' => array( - 'title' => __( 'Metrics', 'sportspress' ), + 'title' => esc_attr__( 'Metrics', 'sportspress' ), 'save' => 'SP_Meta_Box_Player_Metrics::save', 'output' => 'SP_Meta_Box_Player_Metrics::output', 'context' => 'side', 'priority' => 'default', ), 'statistics' => array( - 'title' => __( 'Statistics', 'sportspress' ), + 'title' => esc_attr__( 'Statistics', 'sportspress' ), 'save' => 'SP_Meta_Box_Player_Statistics::save', 'output' => 'SP_Meta_Box_Player_Statistics::output', 'context' => 'normal', @@ -215,13 +215,13 @@ class SP_Admin_Meta_Boxes { ), 'sp_staff' => array( 'shortcode' => array( - 'title' => __( 'Shortcode', 'sportspress' ), + 'title' => esc_attr__( 'Shortcode', 'sportspress' ), 'output' => 'SP_Meta_Box_Staff_Shortcode::output', 'context' => 'side', 'priority' => 'default', ), 'details' => array( - 'title' => __( 'Details', 'sportspress' ), + 'title' => esc_attr__( 'Details', 'sportspress' ), 'save' => 'SP_Meta_Box_Staff_Details::save', 'output' => 'SP_Meta_Box_Staff_Details::output', 'context' => 'side', @@ -292,22 +292,22 @@ class SP_Admin_Meta_Boxes { */ public function rename_meta_boxes() { remove_meta_box( 'submitdiv', 'sp_event', 'side' ); - add_meta_box( 'submitdiv', __( 'Event', 'sportspress' ), 'post_submit_meta_box', 'sp_event', 'side', 'high' ); + add_meta_box( 'submitdiv', esc_attr__( 'Event', 'sportspress' ), 'post_submit_meta_box', 'sp_event', 'side', 'high' ); remove_meta_box( 'postimagediv', 'sp_team', 'side' ); - add_meta_box( 'postimagediv', __( 'Logo', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_team', 'side', 'low' ); + add_meta_box( 'postimagediv', esc_attr__( 'Logo', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_team', 'side', 'low' ); remove_meta_box( 'postimagediv', 'sp_player', 'side' ); - add_meta_box( 'postimagediv', __( 'Photo', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_player', 'side', 'low' ); + add_meta_box( 'postimagediv', esc_attr__( 'Photo', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_player', 'side', 'low' ); remove_meta_box( 'postimagediv', 'sp_staff', 'side' ); - add_meta_box( 'postimagediv', __( 'Photo', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_staff', 'side', 'low' ); + add_meta_box( 'postimagediv', esc_attr__( 'Photo', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_staff', 'side', 'low' ); remove_meta_box( 'postimagediv', 'sp_performance', 'side' ); - add_meta_box( 'postimagediv', __( 'Icon', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_performance', 'side', 'low' ); + add_meta_box( 'postimagediv', esc_attr__( 'Icon', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_performance', 'side', 'low' ); remove_meta_box( 'postimagediv', 'sp_statistic', 'side' ); - add_meta_box( 'postimagediv', __( 'Icon', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_statistic', 'side', 'low' ); + add_meta_box( 'postimagediv', esc_attr__( 'Icon', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_statistic', 'side', 'low' ); } /** diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-columns.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-columns.php index d6350576..dadd8f2d 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-columns.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-columns.php @@ -32,28 +32,28 @@ class SP_Meta_Box_Calendar_Columns { $columns = array(); if ( 'teams' === $title_format ) { - $columns['event'] = __( 'Home', 'sportspress' ) . ' | ' . __( 'Away', 'sportspress' ); + $columns['event'] = esc_attr__( 'Home', 'sportspress' ) . ' | ' . esc_attr__( 'Away', 'sportspress' ); } elseif ( 'homeaway' === $title_format ) { - $columns['event'] = __( 'Teams', 'sportspress' ); + $columns['event'] = esc_attr__( 'Teams', 'sportspress' ); } else { - $columns['event'] = __( 'Title', 'sportspress' ); + $columns['event'] = esc_attr__( 'Title', 'sportspress' ); } if ( 'time' === $time_format || 'separate' === $time_format ) { - $columns['time'] = __( 'Time', 'sportspress' ); + $columns['time'] = esc_attr__( 'Time', 'sportspress' ); } elseif ( 'combined' === $time_format ) { - $columns['time'] = __( 'Time/Results', 'sportspress' ); + $columns['time'] = esc_attr__( 'Time/Results', 'sportspress' ); } if ( 'results' === $time_format || 'separate' === $time_format ) { - $columns['results'] = __( 'Results', 'sportspress' ); + $columns['results'] = esc_attr__( 'Results', 'sportspress' ); } - $columns['league'] = __( 'League', 'sportspress' ); - $columns['season'] = __( 'Season', 'sportspress' ); - $columns['venue'] = __( 'Venue', 'sportspress' ); - $columns['article'] = __( 'Article', 'sportspress' ); - $columns['day'] = __( 'Match Day', 'sportspress' ); + $columns['league'] = esc_attr__( 'League', 'sportspress' ); + $columns['season'] = esc_attr__( 'Season', 'sportspress' ); + $columns['venue'] = esc_attr__( 'Venue', 'sportspress' ); + $columns['article'] = esc_attr__( 'Article', 'sportspress' ); + $columns['day'] = esc_attr__( 'Match Day', 'sportspress' ); $columns = apply_filters( 'sportspress_calendar_columns', $columns ); ?> diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php index 3e399dea..d53fbb99 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php @@ -52,22 +52,22 @@ class SP_Meta_Box_Calendar_Data { - + @@ -78,9 +78,9 @@ class SP_Meta_Box_Calendar_Data { @@ -89,42 +89,42 @@ class SP_Meta_Box_Calendar_Data { @@ -149,7 +149,7 @@ class SP_Meta_Box_Calendar_Data { echo ' alternate';} ?> "> - +
' . $team_result . ' '; + echo '' . esc_attr( $team_result ) . ' '; endif; echo esc_html( $name ) . '
'; @@ -200,15 +200,15 @@ class SP_Meta_Box_Calendar_Data { - ID ); ?> + ID ) ); ?> ID ); + echo wp_kses_post( apply_filters( 'sportspress_event_time_admin', get_post_time( get_option( 'time_format' ), false, $event, true ), $event->ID ) ); endif; ?> @@ -218,7 +218,7 @@ class SP_Meta_Box_Calendar_Data { - +
ID ) ) : ?> @@ -244,11 +244,11 @@ class SP_Meta_Box_Calendar_Data { post_content == null ) : - _e( 'None', 'sportspress' ); + esc_attr_e( 'None', 'sportspress' ); elseif ( $event->post_status == 'publish' ) : - _e( 'Recap', 'sportspress' ); + esc_attr_e( 'Recap', 'sportspress' ); else : - _e( 'Preview', 'sportspress' ); + esc_attr_e( 'Preview', 'sportspress' ); endif; ?>
@@ -274,8 +274,8 @@ class SP_Meta_Box_Calendar_Data { else : ?> - - + + - - + + ID, 'sp_order', true ); ?>
-

+

-

+

-

+

-

+

- + : - +

- - - + + + → - - - + + +

-

+

- +

-

+

'widefat', 'property' => 'multiple', 'chosen' => true, - 'placeholder' => __( 'All', 'sportspress' ), + 'placeholder' => esc_attr__( 'All', 'sportspress' ), ); if ( ! sp_dropdown_pages( $args ) ) : - sp_post_adder( 'sp_team', __( 'Add New', 'sportspress' ) ); + sp_post_adder( 'sp_team', esc_attr__( 'Add New', 'sportspress' ) ); endif; ?>

-

+

'widefat', 'property' => 'multiple', 'chosen' => true, - 'placeholder' => __( 'All', 'sportspress' ), + 'placeholder' => esc_attr__( 'All', 'sportspress' ), ); if ( ! sp_dropdown_pages( $args ) ) : - sp_post_adder( 'sp_player', __( 'Add New', 'sportspress' ) ); + sp_post_adder( 'sp_player', esc_attr__( 'Add New', 'sportspress' ) ); endif; ?>

-

+

-

+

diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-feeds.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-feeds.php index 0c8b31b4..6099e497 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-feeds.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-feeds.php @@ -44,7 +44,7 @@ class SP_Meta_Box_Calendar_Feeds { ?>

- +

diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-shortcode.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-shortcode.php index baef3e8a..9f408bbd 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-shortcode.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-shortcode.php @@ -27,7 +27,7 @@ class SP_Meta_Box_Calendar_Shortcode { } ?>

- +

-

+

-

+

-

+

diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php index 3e188bec..3bdfb47e 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php @@ -36,25 +36,25 @@ class SP_Meta_Box_Equation { switch ( $group ) : case 'player_event': $options['Events'] = array( - '$eventsattended' => __( 'Attended', 'sportspress' ), - '$eventsplayed' => __( 'Played', 'sportspress' ), - '$eventsstarted' => __( 'Started', 'sportspress' ), - '$eventssubbed' => __( 'Substituted', 'sportspress' ), - '$eventminutes' => __( 'Minutes', 'sportspress' ), + '$eventsattended' => esc_attr__( 'Attended', 'sportspress' ), + '$eventsplayed' => esc_attr__( 'Played', 'sportspress' ), + '$eventsstarted' => esc_attr__( 'Started', 'sportspress' ), + '$eventssubbed' => esc_attr__( 'Substituted', 'sportspress' ), + '$eventminutes' => esc_attr__( 'Minutes', 'sportspress' ), ); break; case 'team_event': $options['Events'] = array( - '$eventsplayed' => __( 'Played', 'sportspress' ), - '$eventminutes' => __( 'Minutes', 'sportspress' ), + '$eventsplayed' => esc_attr__( 'Played', 'sportspress' ), + '$eventminutes' => esc_attr__( 'Minutes', 'sportspress' ), ); break; case 'result': $options['Results'] = self::optgroup( 'sp_result', array( - 'for' => '(' . __( 'for', 'sportspress' ) . ')', - 'against' => '(' . __( + 'for' => '(' . esc_attr__( 'for', 'sportspress' ) . ')', + 'against' => '(' . esc_attr__( 'against', 'sportspress' ) . ')', @@ -68,20 +68,20 @@ class SP_Meta_Box_Equation { break; case 'preset': $options['Presets'] = array( - '$gamesback' => __( 'Games Back', 'sportspress' ), - '$homerecord' => __( 'Home Record', 'sportspress' ), - '$awayrecord' => __( 'Away Record', 'sportspress' ), - '$streak' => __( 'Streak', 'sportspress' ), - '$form' => __( 'Form', 'sportspress' ), - '$last5' => __( 'Last 5', 'sportspress' ), - '$last10' => __( 'Last 10', 'sportspress' ), + '$gamesback' => esc_attr__( 'Games Back', 'sportspress' ), + '$homerecord' => esc_attr__( 'Home Record', 'sportspress' ), + '$awayrecord' => esc_attr__( 'Away Record', 'sportspress' ), + '$streak' => esc_attr__( 'Streak', 'sportspress' ), + '$form' => esc_attr__( 'Form', 'sportspress' ), + '$last5' => esc_attr__( 'Last 5', 'sportspress' ), + '$last10' => esc_attr__( 'Last 10', 'sportspress' ), ); break; case 'subset': $options['Subsets'] = array( - '_home' => '@' . __( 'Home', 'sportspress' ), - '_away' => '@' . __( 'Away', 'sportspress' ), - '_venue' => '@' . __( 'Venue', 'sportspress' ), + '_home' => '@' . esc_attr__( 'Home', 'sportspress' ), + '_away' => '@' . esc_attr__( 'Away', 'sportspress' ), + '_venue' => '@' . esc_attr__( 'Venue', 'sportspress' ), ); break; case 'performance': @@ -127,7 +127,7 @@ class SP_Meta_Box_Equation { if ( $i % 2 == 0 ) : ?> class="alternate"> - + $value ) : diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-details.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-details.php index 0e5d9bda..5fece105 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-details.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-details.php @@ -27,16 +27,16 @@ class SP_Meta_Box_Event_Details { ?>

-

+

- +

-

+

- - + +

-

+

ID, 'sp_venue' ); @@ -58,14 +58,14 @@ class SP_Meta_Box_Event_Details { 'class' => 'sp-has-dummy', 'selected' => sp_get_the_term_id_or_meta( $post->ID, 'sp_venue' ), 'values' => 'term_id', - 'show_option_none' => __( '— Not set —', 'sportspress' ), + 'show_option_none' => esc_attr__( '— Not set —', 'sportspress' ), 'chosen' => true, ); if ( in_array( 'sp_venue', apply_filters( 'sportspress_event_auto_taxonomies', array( 'sp_venue' ) ) ) ) { - $args['show_option_all'] = __( '(Auto)', 'sportspress' ); + $args['show_option_all'] = esc_attr__( '(Auto)', 'sportspress' ); } if ( ! sp_dropdown_taxonomies( $args ) ) { - sp_taxonomy_adder( 'sp_venue', 'sp_event', __( 'Add New', 'sportspress' ) ); + sp_taxonomy_adder( 'sp_venue', 'sp_event', esc_attr__( 'Add New', 'sportspress' ) ); } ?>

diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-mode.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-mode.php index d39e43c8..9e8c2b2e 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-mode.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-mode.php @@ -26,8 +26,8 @@ class SP_Meta_Box_Event_Mode {
__( 'Team vs team', 'sportspress' ), - 'player' => __( 'Player vs player', 'sportspress' ), + 'team' => esc_attr__( 'Team vs team', 'sportspress' ), + 'player' => esc_attr__( 'Player vs player', 'sportspress' ), ) as $key => $mode ) : ?> >
diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-officials.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-officials.php index 71ca7adf..61635d61 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-officials.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-officials.php @@ -54,21 +54,21 @@ class SP_Meta_Box_Event_Officials { 'name' => 'sp_officials[' . $duty->term_id . '][]', 'selected' => sp_array_value( $officials, $duty->term_id, array() ), 'values' => 'ID', - 'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Officials', 'sportspress' ) ), + 'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Officials', 'sportspress' ) ), 'class' => 'widefat', 'property' => 'multiple', 'chosen' => true, ); if ( ! sp_dropdown_pages( $args ) ) { - sp_post_adder( 'sp_official', __( 'Add New', 'sportspress' ) ); + sp_post_adder( 'sp_official', esc_attr__( 'Add New', 'sportspress' ) ); } ?>

__( 'Defense', 'sportspress' ), - 0 => __( 'Offense', 'sportspress' ), + 1 => esc_attr__( 'Defense', 'sportspress' ), + 0 => esc_attr__( 'Offense', 'sportspress' ), ); } else { - $section_order = array( __( 'Offense', 'sportspress' ), __( 'Defense', 'sportspress' ) ); + $section_order = array( esc_attr__( 'Offense', 'sportspress' ), esc_attr__( 'Defense', 'sportspress' ) ); } foreach ( $section_order as $section_id => $section_label ) { @@ -563,11 +563,11 @@ endforeach; $times = false; } ?> -
-
+ array( 'class' => array(), 'name' => array() ), 'option' => array( 'value' => array() ) ) ); ?>
+ array( 'class' => array(), 'name' => array() ), 'option' => array( 'value' => array() ) ) ); ?>
- + @@ -576,10 +576,10 @@ endforeach; '; + echo ''; break; default: - echo ''; + echo ''; } ?> @@ -600,8 +600,8 @@ endforeach; $options = apply_filters( 'sportspress_event_performance_status_options', array( - 'lineup' => __( 'Starting Lineup', 'sportspress' ), - 'sub' => __( 'Substitute', 'sportspress' ), + 'lineup' => esc_attr__( 'Starting Lineup', 'sportspress' ), + 'sub' => esc_attr__( 'Substitute', 'sportspress' ), ) ); @@ -628,7 +628,7 @@ endforeach; $output = '

-

+

-

+

ID, 'sp_columns', true ); $orderby = get_post_meta( $post->ID, 'sp_orderby', true ); ?> -

+

-

+

    -
  • -
  • -
  • +
  • +
  • +
ID, 'sp_performance', 'block', $selected ); diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php index 9f58ae0f..a7c2ded2 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php @@ -47,22 +47,22 @@ class SP_Meta_Box_List_Data { $show_player_photo = get_option( 'sportspress_list_show_photos', 'no' ) == 'yes' ? true : false; ?>
    -
  • | -
  • +
  • | +
- + - + - + - + $label ) : ?> @@ -116,12 +116,12 @@ class SP_Meta_Box_List_Data { ?> - + @@ -134,12 +134,12 @@ class SP_Meta_Box_List_Data { $include = get_post_meta( $player_id, 'sp_team' ); $args = array( 'post_type' => 'sp_team', - 'name' => 'sp_players[' . $player_id . '][team]', + 'name' => 'sp_players[' . esc_attr( $player_id ) . '][team]', 'include' => $include, 'selected' => $selected, 'values' => 'ID', ); - wp_dropdown_pages( $args ); + wp_dropdown_pages( $args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> @@ -150,7 +150,7 @@ class SP_Meta_Box_List_Data { $args = array( 'taxonomy' => 'sp_position', 'name' => 'sp_players[' . $player_id . '][position]', - 'show_option_blank' => __( '(Auto)', 'sportspress' ), + 'show_option_blank' => esc_attr__( '(Auto)', 'sportspress' ), 'values' => 'term_id', 'orderby' => 'meta_value_num', 'meta_query' => array( @@ -194,7 +194,7 @@ class SP_Meta_Box_List_Data { echo esc_attr( $colspan ); ?> "> - + - + $label ) : if ( in_array( $key, array( 'number', 'team', 'position' ) ) ) { @@ -235,9 +235,9 @@ class SP_Meta_Box_List_Data { echo ' alternate';} ?> "> - + $label ) : @@ -261,7 +261,7 @@ class SP_Meta_Box_List_Data { echo esc_attr( $colspan ); ?> "> - +
-

+

-

+

- + : - +

- - - + + +

@@ -83,29 +83,29 @@ class SP_Meta_Box_List_Details { sp_taxonomy_field( $taxonomy, $post, true ); } ?> -

+

'sp_team', 'name' => 'sp_team', - 'show_option_all' => __( 'All', 'sportspress' ), + 'show_option_all' => esc_attr__( 'All', 'sportspress' ), 'selected' => $team_id, 'values' => 'ID', ); if ( ! sp_dropdown_pages( $args ) ) : - sp_post_adder( 'sp_team', __( 'Add New', 'sportspress' ) ); + sp_post_adder( 'sp_team', esc_attr__( 'Add New', 'sportspress' ) ); endif; ?>

-

+

-

-

+

array( - 'number' => __( 'Squad Number', 'sportspress' ), - 'name' => __( 'Name', 'sportspress' ), + 'number' => esc_attr__( 'Squad Number', 'sportspress' ), + 'name' => esc_attr__( 'Name', 'sportspress' ), ), 'post_type' => array( 'sp_performance', 'sp_metric', 'sp_statistic' ), 'name' => 'sp_orderby', @@ -146,21 +146,21 @@ class SP_Meta_Box_List_Details {

-

+

-

+

ID, 'sp_player', ( 'auto' == $select ? 'none' : 'block' ), $player_filters ); - sp_post_adder( 'sp_player', __( 'Add New', 'sportspress' ) ); + sp_post_adder( 'sp_player', esc_attr__( 'Add New', 'sportspress' ) ); } else { ?> -

-

+

+

diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-list-shortcode.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-list-shortcode.php index 72d232f8..b5a06b41 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-list-shortcode.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-list-shortcode.php @@ -27,7 +27,7 @@ class SP_Meta_Box_List_Shortcode { } ?>

- +

-

+

- - + +

diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-outcome-details.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-outcome-details.php index a9f52fff..41c24098 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-outcome-details.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-outcome-details.php @@ -37,13 +37,13 @@ class SP_Meta_Box_Outcome_Details extends SP_Meta_Box_Config { $condition = get_post_meta( $post->ID, 'sp_condition', true ); $main_result = get_option( 'sportspress_primary_result', null ); $result = get_page_by_path( $main_result, ARRAY_A, 'sp_result' ); - $label = sp_array_value( $result, 'post_title', __( 'Primary', 'sportspress' ) ); + $label = sp_array_value( $result, 'post_title', esc_attr__( 'Primary', 'sportspress' ) ); if ( '' === $color ) { $color = '#888888'; } ?> -

+

readonly="readonly">

-

+

-

+

-

+

diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-performance-details.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-performance-details.php index a3f8ff94..15cf7707 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-performance-details.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-performance-details.php @@ -56,7 +56,7 @@ class SP_Meta_Box_Performance_Details extends SP_Meta_Box_Config { $sendoff = false; } ?> -

+

readonly="readonly">

-

+

-

+

-

+

-

+

- - + +

- - "> + + ">

@@ -167,20 +167,20 @@ class SP_Meta_Box_Performance_Details extends SP_Meta_Box_Config { } ?>

- - + +

diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php index 27ede312..ba6101c1 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php @@ -83,11 +83,11 @@ class SP_Meta_Box_Player_Details { $current_teams = array_filter( get_post_meta( $post->ID, 'sp_current_team', false ) ); ?> -

+

-

-

- +

-

+

data( 0, true ); self::table( $post->ID, 0, $columns, $data, $placeholders, $merged, $seasons_teams, false, false, $formats, $total_types ); @@ -54,11 +54,11 @@ class SP_Meta_Box_Player_Statistics { // Determine order of sections if ( 1 == $sections ) { $section_order = array( - 1 => __( 'Defense', 'sportspress' ), - 0 => __( 'Offense', 'sportspress' ), + 1 => esc_attr__( 'Defense', 'sportspress' ), + 0 => esc_attr__( 'Offense', 'sportspress' ), ); } else { - $section_order = array( __( 'Offense', 'sportspress' ), __( 'Defense', 'sportspress' ) ); + $section_order = array( esc_attr__( 'Offense', 'sportspress' ), esc_attr__( 'Defense', 'sportspress' ) ); } $s = 0; @@ -75,7 +75,7 @@ class SP_Meta_Box_Player_Statistics { endforeach; if ( $show_career_totals ) { ?> -

+

data( 0, true, $section_id ); self::table( $post->ID, 0, $columns, $data, $placeholders, $merged, $seasons_teams, $has_checkboxes && $i == 0 && $s == 0, $s == 0, $formats, $total_types ); @@ -113,10 +113,10 @@ class SP_Meta_Box_Player_Statistics {
# - +
- + @@ -158,10 +158,10 @@ class SP_Meta_Box_Player_Statistics { echo $value ? esc_html( $value ) : esc_html( $placeholder ); } else { if ( 'time' === sp_array_value( $formats, $column, 'number' ) ) { - echo ''; - echo ''; + echo ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + echo ''; } else { - echo ''; + echo ''; } } ?> @@ -187,7 +187,7 @@ class SP_Meta_Box_Player_Statistics { if ( $i % 2 == 0 ) { echo ' alternate';} ?> - " data-league="" data-season=""> + " data-league="" data-season=""> @@ -275,10 +275,10 @@ class SP_Meta_Box_Player_Statistics { echo $timeval ? esc_html( $timeval ) : esc_html( $placeholder ); } else { if ( 'time' === sp_array_value( $formats, $column, 'number' ) ) { - echo ''; - echo ''; + echo ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + echo ''; } else { - echo ''; + echo ''; } } ?> diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-result-details.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-result-details.php index 252ab786..9e41388a 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-result-details.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-result-details.php @@ -34,7 +34,7 @@ class SP_Meta_Box_Result_Details extends SP_Meta_Box_Config { $readonly = false; } ?> -

+

readonly="readonly"> (for, against)

-

+

diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-spec-details.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-spec-details.php index 77966ea2..4c9d4c68 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-spec-details.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-spec-details.php @@ -31,26 +31,26 @@ class SP_Meta_Box_Spec_Details extends SP_Meta_Box_Config { $visible = 1; } ?> -

+

- - + +

diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php index 77236d6b..75c800a3 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php @@ -62,7 +62,7 @@ class SP_Meta_Box_Staff_Details { $past_teams = array_filter( get_post_meta( $post->ID, 'sp_past_team', false ) ); $current_teams = array_filter( get_post_meta( $post->ID, 'sp_current_team', false ) ); ?> -

+

'tax_input[sp_role][]', 'selected' => $role_ids, 'values' => 'term_id', - 'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Jobs', 'sportspress' ) ), + 'placeholder' => sprintf( esc_attr__( 'Select %s', 'sportspress' ), esc_attr__( 'Jobs', 'sportspress' ) ), 'class' => 'widefat', 'property' => 'multiple', 'chosen' => true, ); if ( ! sp_dropdown_taxonomies( $args ) ) : - sp_taxonomy_adder( 'sp_role', 'sp_staff', __( 'Add New', 'sportspress' ) ); + sp_taxonomy_adder( 'sp_role', 'sp_staff', esc_attr__( 'Add New', 'sportspress' ) ); endif; ?>

-

-

-

+

-

+

-

+

-

+

-

+

- - + +

diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php index 01ee68e9..5005043b 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php @@ -64,7 +64,7 @@ class SP_Meta_Box_Table_Data {

- + + ">

    -
  • | -
  • +
  • | +
@@ -94,9 +94,9 @@ class SP_Meta_Box_Table_Data { - + - + $label ) : ?> - + $label ) : ?> @@ -205,7 +205,7 @@ class SP_Meta_Box_Table_Data { ?> "> $label ) : @@ -223,10 +223,10 @@ class SP_Meta_Box_Table_Data {
-

+

-

+

- + : - +

- + - +

@@ -87,29 +87,29 @@ class SP_Meta_Box_Table_Details {

ID, $post_type, ( 'auto' == $select ? 'none' : 'block' ), array( 'sp_league', 'sp_season' ), null, 'sp_team' ); - sp_post_adder( $post_type, __( 'Add New', 'sportspress' ) ); + sp_post_adder( $post_type, esc_attr__( 'Add New', 'sportspress' ) ); } ?> -

+

> Published/Played
> Scheduled/Future

-

+

array( - 'default' => __( 'Default', 'sportspress' ), - 'name' => __( 'Name', 'sportspress' ), + 'default' => esc_attr__( 'Default', 'sportspress' ), + 'name' => esc_attr__( 'Name', 'sportspress' ), ), 'post_type' => array( 'sp_column' ), 'name' => 'sp_orderby', @@ -120,11 +120,11 @@ class SP_Meta_Box_Table_Details { ?>

> -

+

diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-table-mode.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-table-mode.php index 1ac0d369..dca09d20 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-table-mode.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-table-mode.php @@ -26,8 +26,8 @@ class SP_Meta_Box_Table_Mode {
__( 'Team vs team', 'sportspress' ), - 'player' => __( 'Player vs player', 'sportspress' ), + 'team' => esc_attr__( 'Team vs team', 'sportspress' ), + 'player' => esc_attr__( 'Player vs player', 'sportspress' ), ) as $key => $mode ) : ?> >
diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-table-shortcode.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-table-shortcode.php index 482be961..7134d720 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-table-shortcode.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-table-shortcode.php @@ -27,7 +27,7 @@ class SP_Meta_Box_Table_Shortcode { } ?>

- +

-

+

columns( 0 ); self::table( 0, $columns, $data, $placeholders ); @@ -61,7 +61,7 @@ endif;
- +
- +   @@ -214,7 +214,7 @@ class SP_Meta_Box_Player_Statistics { $args = array( 'post_type' => 'sp_team', 'name' => 'sp_leagues[' . $league_id . '][' . $div_id . ']', - 'show_option_none' => __( '— None —', 'sportspress' ), + 'show_option_none' => esc_attr__( '— None —', 'sportspress' ), 'sort_order' => 'ASC', 'sort_column' => 'menu_order', 'selected' => $value, @@ -235,7 +235,7 @@ class SP_Meta_Box_Player_Statistics { ), ); if ( ! sp_dropdown_pages( $args ) ) : - _e( '— None —', 'sportspress' ); + esc_attr_e( '— None —', 'sportspress' ); endif; ?>
- +
- + - +
- + @@ -83,7 +83,7 @@ endif; @@ -86,16 +86,16 @@ class SP_Meta_Box_Team_Lists { ?> "> - - - + + + @@ -82,16 +82,16 @@ class SP_Meta_Box_Team_Staff { ?> "> - - - + + + @@ -83,16 +83,16 @@ class SP_Meta_Box_Team_Tables { ?> "> - - - + + + id = 'events'; - $this->label = __( 'Events', 'sportspress' ); + $this->label = esc_attr__( 'Events', 'sportspress' ); $this->template = 'event'; add_filter( 'sportspress_settings_tabs_array', array( $this, 'add_settings_page' ), 20 ); @@ -45,7 +45,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : $settings = array_merge( array( array( - 'title' => __( 'Event Options', 'sportspress' ), + 'title' => esc_attr__( 'Event Options', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'event_options', @@ -56,8 +56,8 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : array_merge( array( array( - 'title' => __( 'Link', 'sportspress' ), - 'desc' => __( 'Link events', 'sportspress' ), + 'title' => esc_attr__( 'Link', 'sportspress' ), + 'desc' => esc_attr__( 'Link events', 'sportspress' ), 'id' => 'sportspress_link_events', 'default' => 'yes', 'type' => 'checkbox', @@ -71,8 +71,8 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : array( 'type' => 'event_tabs' ), array( - 'title' => __( 'Details', 'sportspress' ), - 'desc' => __( 'Date', 'sportspress' ), + 'title' => esc_attr__( 'Details', 'sportspress' ), + 'desc' => esc_attr__( 'Date', 'sportspress' ), 'id' => 'sportspress_event_show_date', 'default' => 'yes', 'type' => 'checkbox', @@ -80,7 +80,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : ), array( - 'desc' => __( 'Time', 'sportspress' ), + 'desc' => esc_attr__( 'Time', 'sportspress' ), 'id' => 'sportspress_event_show_time', 'default' => 'yes', 'type' => 'checkbox', @@ -88,7 +88,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : ), array( - 'desc' => __( 'Match Day', 'sportspress' ), + 'desc' => esc_attr__( 'Match Day', 'sportspress' ), 'id' => 'sportspress_event_show_day', 'default' => 'no', 'type' => 'checkbox', @@ -96,7 +96,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : ), array( - 'desc' => __( 'Full Time', 'sportspress' ), + 'desc' => esc_attr__( 'Full Time', 'sportspress' ), 'id' => 'sportspress_event_show_full_time', 'default' => 'no', 'type' => 'checkbox', @@ -106,23 +106,23 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : ), array( array( - 'title' => __( 'Default mode', 'sportspress' ), + 'title' => esc_attr__( 'Default mode', 'sportspress' ), 'id' => 'sportspress_mode', 'default' => 'team', 'type' => 'radio', 'options' => array( - 'team' => __( 'Team vs team', 'sportspress' ), - 'player' => __( 'Player vs player', 'sportspress' ), + 'team' => esc_attr__( 'Team vs team', 'sportspress' ), + 'player' => esc_attr__( 'Player vs player', 'sportspress' ), ), 'desc_tip' => _x( 'Who competes in events?', 'mode setting description', 'sportspress' ), ), array( - 'title' => __( 'Limit', 'sportspress' ), + 'title' => esc_attr__( 'Limit', 'sportspress' ), 'id' => 'sportspress_event_teams', 'class' => 'small-text', 'default' => '2', - 'desc' => __( 'teams', 'sportspress' ), + 'desc' => esc_attr__( 'teams', 'sportspress' ), 'type' => 'number', 'custom_attributes' => array( 'min' => 0, @@ -133,8 +133,8 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : array( 'type' => 'delimiter' ), array( - 'title' => __( 'Teams', 'sportspress' ), - 'desc' => __( 'Filter by league', 'sportspress' ), + 'title' => esc_attr__( 'Teams', 'sportspress' ), + 'desc' => esc_attr__( 'Filter by league', 'sportspress' ), 'id' => 'sportspress_event_filter_teams_by_league', 'default' => 'no', 'type' => 'checkbox', @@ -142,7 +142,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : ), array( - 'desc' => __( 'Filter by season', 'sportspress' ), + 'desc' => esc_attr__( 'Filter by season', 'sportspress' ), 'id' => 'sportspress_event_filter_teams_by_season', 'default' => 'no', 'type' => 'checkbox', @@ -150,11 +150,11 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : ), array( - 'title' => __( 'Full Time', 'sportspress' ), + 'title' => esc_attr__( 'Full Time', 'sportspress' ), 'id' => 'sportspress_event_minutes', 'class' => 'small-text', 'default' => '90', - 'desc' => __( 'mins', 'sportspress' ), + 'desc' => esc_attr__( 'mins', 'sportspress' ), 'type' => 'number', 'custom_attributes' => array( 'min' => 0, @@ -163,8 +163,8 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : ), array( - 'title' => __( 'Comments', 'sportspress' ), - 'desc' => __( 'Allow people to post comments on new articles', 'sportspress' ), + 'title' => esc_attr__( 'Comments', 'sportspress' ), + 'desc' => esc_attr__( 'Allow people to post comments on new articles', 'sportspress' ), 'id' => 'sportspress_event_comment_status', 'default' => 'no', 'type' => 'checkbox', @@ -180,7 +180,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : ), array( array( - 'title' => __( 'Venues', 'sportspress' ), + 'title' => esc_attr__( 'Venues', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'venue_options', @@ -190,34 +190,34 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : 'sportspress_venue_options', array( array( - 'title' => __( 'Link', 'sportspress' ), - 'desc' => __( 'Link venues', 'sportspress' ), + 'title' => esc_attr__( 'Link', 'sportspress' ), + 'desc' => esc_attr__( 'Link venues', 'sportspress' ), 'id' => 'sportspress_link_venues', 'default' => 'no', 'type' => 'checkbox', ), array( - 'title' => __( 'Venue Map', 'sportspress' ), - 'desc' => __( 'Display venue map', 'sportspress' ), + 'title' => esc_attr__( 'Venue Map', 'sportspress' ), + 'desc' => esc_attr__( 'Display venue map', 'sportspress' ), 'id' => 'sportspress_event_show_maps', 'default' => 'yes', 'type' => 'checkbox', ), array( - 'title' => __( 'Type', 'sportspress' ), + 'title' => esc_attr__( 'Type', 'sportspress' ), 'id' => 'sportspress_map_type', 'default' => 'ROADMAP', 'type' => 'radio', 'options' => array( - 'ROADMAP' => __( 'Default', 'sportspress' ), - 'SATELLITE' => __( 'Satellite', 'sportspress' ), + 'ROADMAP' => esc_attr__( 'Default', 'sportspress' ), + 'SATELLITE' => esc_attr__( 'Satellite', 'sportspress' ), ), ), array( - 'title' => __( 'Zoom', 'sportspress' ), + 'title' => esc_attr__( 'Zoom', 'sportspress' ), 'id' => 'sportspress_map_zoom', 'class' => 'small-text', 'default' => '15', @@ -239,7 +239,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : ), array( array( - 'title' => __( 'Teams', 'sportspress' ), + 'title' => esc_attr__( 'Teams', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'event_logo_options', @@ -249,27 +249,27 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : 'sportspress_event_logo_options', array( array( - 'title' => __( 'Order', 'sportspress' ), - 'desc' => __( 'Reverse order', 'sportspress' ), + 'title' => esc_attr__( 'Order', 'sportspress' ), + 'desc' => esc_attr__( 'Reverse order', 'sportspress' ), 'id' => 'sportspress_event_reverse_teams', 'default' => 'no', 'type' => 'checkbox', ), array( - 'title' => __( 'Layout', 'sportspress' ), + 'title' => esc_attr__( 'Layout', 'sportspress' ), 'id' => 'sportspress_event_logos_format', 'default' => 'inline', 'type' => 'radio', 'options' => array( - 'inline' => __( 'Inline', 'sportspress' ), - 'block' => __( 'Block', 'sportspress' ), + 'inline' => esc_attr__( 'Inline', 'sportspress' ), + 'block' => esc_attr__( 'Block', 'sportspress' ), ), ), array( - 'title' => __( 'Display', 'sportspress' ), - 'desc' => __( 'Name', 'sportspress' ), + 'title' => esc_attr__( 'Display', 'sportspress' ), + 'desc' => esc_attr__( 'Name', 'sportspress' ), 'id' => 'sportspress_event_logos_show_team_names', 'default' => 'yes', 'type' => 'checkbox', @@ -277,7 +277,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : ), array( - 'desc' => __( 'Time', 'sportspress' ), + 'desc' => esc_attr__( 'Time', 'sportspress' ), 'id' => 'sportspress_event_logos_show_time', 'default' => 'no', 'type' => 'checkbox', @@ -285,7 +285,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : ), array( - 'desc' => __( 'Results', 'sportspress' ), + 'desc' => esc_attr__( 'Results', 'sportspress' ), 'id' => 'sportspress_event_logos_show_results', 'default' => 'no', 'type' => 'checkbox', @@ -301,7 +301,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : ), array( array( - 'title' => __( 'Players', 'sportspress' ), + 'title' => esc_attr__( 'Players', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'eventplayer_options', @@ -311,13 +311,13 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : 'sportspress_eventplayer_options', array( array( - 'title' => __( 'Order', 'sportspress' ), + 'title' => esc_attr__( 'Order', 'sportspress' ), 'id' => 'sportspress_event_player_sort', 'default' => 'jersey', 'type' => 'radio', 'options' => array( - 'jersey' => __( 'Jersey (e.g. "33. John Doe")', 'sportspress' ), - 'name' => __( 'Name (e.g. "John Doe (33)")', 'sportspress' ), + 'jersey' => esc_attr__( 'Jersey (e.g. "33. John Doe")', 'sportspress' ), + 'name' => esc_attr__( 'Name (e.g. "John Doe (33)")', 'sportspress' ), ), 'desc_tip' => 'When editing an event, this determines how the checklist of players are sorted in the Teams metabox. This does not affect the Box Score section.', ), @@ -332,7 +332,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : ), array( array( - 'title' => __( 'Event Results', 'sportspress' ), + 'title' => esc_attr__( 'Event Results', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'result_options', @@ -342,19 +342,19 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : 'sportspress_result_options', array( array( - 'title' => __( 'Columns', 'sportspress' ), + 'title' => esc_attr__( 'Columns', 'sportspress' ), 'id' => 'sportspress_event_result_columns', 'default' => 'auto', 'type' => 'radio', 'options' => array( - 'auto' => __( 'Auto', 'sportspress' ), - 'manual' => __( 'Manual', 'sportspress' ), + 'auto' => esc_attr__( 'Auto', 'sportspress' ), + 'manual' => esc_attr__( 'Manual', 'sportspress' ), ), ), array( - 'title' => __( 'Outcome', 'sportspress' ), - 'desc' => __( 'Display outcome', 'sportspress' ), + 'title' => esc_attr__( 'Outcome', 'sportspress' ), + 'desc' => esc_attr__( 'Display outcome', 'sportspress' ), 'id' => 'sportspress_event_show_outcome', 'default' => 'no', 'type' => 'checkbox', @@ -369,7 +369,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : ), array( array( - 'title' => __( 'Box Score', 'sportspress' ), + 'title' => esc_attr__( 'Box Score', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'performance_options', @@ -380,8 +380,8 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : array_merge( array( array( - 'title' => __( 'Rows', 'sportspress' ), - 'desc' => __( 'Staff', 'sportspress' ), + 'title' => esc_attr__( 'Rows', 'sportspress' ), + 'desc' => esc_attr__( 'Staff', 'sportspress' ), 'id' => 'sportspress_event_show_staff', 'default' => 'yes', 'type' => 'checkbox', @@ -389,7 +389,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : ), array( - 'desc' => __( 'Players', 'sportspress' ), + 'desc' => esc_attr__( 'Players', 'sportspress' ), 'id' => 'sportspress_event_show_players', 'default' => 'yes', 'type' => 'checkbox', @@ -397,7 +397,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : ), array( - 'desc' => __( 'Total', 'sportspress' ), + 'desc' => esc_attr__( 'Total', 'sportspress' ), 'id' => 'sportspress_event_show_total', 'default' => 'yes', 'type' => 'checkbox', @@ -405,29 +405,29 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : ), array( - 'title' => __( 'Columns', 'sportspress' ), + 'title' => esc_attr__( 'Columns', 'sportspress' ), 'id' => 'sportspress_event_performance_columns', 'default' => 'auto', 'type' => 'radio', 'options' => array( - 'auto' => __( 'Auto', 'sportspress' ), - 'manual' => __( 'Manual', 'sportspress' ), + 'auto' => esc_attr__( 'Auto', 'sportspress' ), + 'manual' => esc_attr__( 'Manual', 'sportspress' ), ), ), array( - 'title' => __( 'Mode', 'sportspress' ), + 'title' => esc_attr__( 'Mode', 'sportspress' ), 'id' => 'sportspress_event_performance_mode', 'default' => 'values', 'type' => 'radio', 'options' => array( - 'values' => __( 'Values', 'sportspress' ), - 'icons' => __( 'Icons', 'sportspress' ), + 'values' => esc_attr__( 'Values', 'sportspress' ), + 'icons' => esc_attr__( 'Icons', 'sportspress' ), ), ), array( - 'title' => __( 'Awards', 'sportspress' ), + 'title' => esc_attr__( 'Awards', 'sportspress' ), 'id' => 'sportspress_event_performance_stars_type', 'default' => 0, 'type' => 'radio', @@ -440,8 +440,8 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : ), array( - 'title' => __( 'Positions', 'sportspress' ), - 'desc' => __( 'Top-level only', 'sportspress' ), + 'title' => esc_attr__( 'Positions', 'sportspress' ), + 'desc' => esc_attr__( 'Top-level only', 'sportspress' ), 'id' => 'sportspress_event_hide_child_positions', 'default' => 'no', 'type' => 'checkbox', @@ -451,8 +451,8 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : 'sportspress_event_performance_display_options', array( array( - 'title' => __( 'Display', 'sportspress' ), - 'desc' => __( 'Squad Number', 'sportspress' ), + 'title' => esc_attr__( 'Display', 'sportspress' ), + 'desc' => esc_attr__( 'Squad Number', 'sportspress' ), 'id' => 'sportspress_event_show_player_numbers', 'default' => 'yes', 'type' => 'checkbox', @@ -460,7 +460,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : ), array( - 'desc' => __( 'Position', 'sportspress' ), + 'desc' => esc_attr__( 'Position', 'sportspress' ), 'id' => 'sportspress_event_show_position', 'default' => 'yes', 'type' => 'checkbox', @@ -468,7 +468,7 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : ), array( - 'desc' => __( 'Minutes', 'sportspress' ), + 'desc' => esc_attr__( 'Minutes', 'sportspress' ), 'id' => 'sportspress_event_performance_show_minutes', 'default' => 'no', 'type' => 'checkbox', @@ -478,25 +478,25 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : ), array( array( - 'title' => __( 'Performance', 'sportspress' ), + 'title' => esc_attr__( 'Performance', 'sportspress' ), 'id' => 'sportspress_event_performance_sections', 'default' => -1, 'type' => 'radio', 'options' => array( - -1 => __( 'Combined', 'sportspress' ), - 0 => __( 'Offense', 'sportspress' ) . ' → ' . __( 'Defense', 'sportspress' ), - 1 => __( 'Defense', 'sportspress' ) . ' → ' . __( 'Offense', 'sportspress' ), + -1 => esc_attr__( 'Combined', 'sportspress' ), + 0 => esc_attr__( 'Offense', 'sportspress' ) . ' → ' . esc_attr__( 'Defense', 'sportspress' ), + 1 => esc_attr__( 'Defense', 'sportspress' ) . ' → ' . esc_attr__( 'Offense', 'sportspress' ), ), ), array( - 'title' => __( 'Total', 'sportspress' ), + 'title' => esc_attr__( 'Total', 'sportspress' ), 'id' => 'sportspress_event_total_performance', 'default' => 'all', 'type' => 'radio', 'options' => array( - 'all' => __( 'All', 'sportspress' ), - 'primary' => __( 'Primary', 'sportspress' ), + 'all' => esc_attr__( 'All', 'sportspress' ), + 'primary' => esc_attr__( 'Primary', 'sportspress' ), ), ), ) @@ -537,9 +537,9 @@ if ( ! class_exists( 'SP_Settings_Events' ) ) : $limit = 2; } if ( 3 >= $limit ) { - $example = str_repeat( __( 'Team', 'sportspress' ) . ' %1$s ', $limit ); + $example = str_repeat( esc_attr__( 'Team', 'sportspress' ) . ' %1$s ', $limit ); } else { - $example = str_repeat( __( 'Team', 'sportspress' ) . ' %1$s ', 3 ) . '…'; + $example = str_repeat( esc_attr__( 'Team', 'sportspress' ) . ' %1$s ', 3 ) . '…'; } $example = rtrim( $example, ' %1$s ' ); ?> diff --git a/includes/admin/settings/class-sp-settings-general.php b/includes/admin/settings/class-sp-settings-general.php index 4b8258e8..5127dfb3 100644 --- a/includes/admin/settings/class-sp-settings-general.php +++ b/includes/admin/settings/class-sp-settings-general.php @@ -24,7 +24,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) : */ public function __construct() { $this->id = 'general'; - $this->label = __( 'General', 'sportspress' ); + $this->label = esc_attr__( 'General', 'sportspress' ); add_filter( 'sportspress_settings_tabs_array', array( $this, 'add_settings_page' ), 20 ); add_action( 'sportspress_settings_' . $this->id, array( $this, 'output' ) ); @@ -42,7 +42,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) : $presets = SP_Admin_Sports::get_preset_options(); - $leagues = array( '' => __( '— Select —', 'sportspress' ) ); + $leagues = array( '' => esc_attr__( '— Select —', 'sportspress' ) ); $terms = get_terms( array( @@ -57,7 +57,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) : } } - $seasons = array( '' => __( '— Select —', 'sportspress' ) ); + $seasons = array( '' => esc_attr__( '— Select —', 'sportspress' ) ); $terms = get_terms( array( @@ -75,7 +75,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) : $settings = array_merge( array( array( - 'title' => __( 'General Options', 'sportspress' ), + 'title' => esc_attr__( 'General Options', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'general_options', @@ -87,7 +87,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) : array( 'type' => 'timezone' ), array( - 'title' => __( 'Sport', 'sportspress' ), + 'title' => esc_attr__( 'Sport', 'sportspress' ), 'id' => 'sportspress_sport', 'default' => 'none', 'type' => 'sport', @@ -95,7 +95,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) : ), array( - 'title' => __( 'Main League', 'sportspress' ), + 'title' => esc_attr__( 'Main League', 'sportspress' ), 'id' => 'sportspress_league', 'default' => null, 'type' => 'select', @@ -103,7 +103,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) : ), array( - 'title' => __( 'Current Season', 'sportspress' ), + 'title' => esc_attr__( 'Current Season', 'sportspress' ), 'id' => 'sportspress_season', 'default' => null, 'type' => 'select', @@ -117,7 +117,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) : 'id' => 'general_options', ), array( - 'title' => __( 'Styles and Scripts', 'sportspress' ), + 'title' => esc_attr__( 'Styles and Scripts', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'script_styling_options', @@ -134,24 +134,24 @@ if ( ! class_exists( 'SP_Settings_General' ) ) : $options, array( array( - 'title' => __( 'Align', 'sportspress' ), + 'title' => esc_attr__( 'Align', 'sportspress' ), 'id' => 'sportspress_table_text_align', 'default' => 'default', 'type' => 'radio', 'options' => array( - 'default' => __( 'Default', 'sportspress' ), - 'left' => __( 'Left', 'sportspress' ), - 'center' => __( 'Center', 'sportspress' ), - 'right' => __( 'Right', 'sportspress' ), + 'default' => esc_attr__( 'Default', 'sportspress' ), + 'left' => esc_attr__( 'Left', 'sportspress' ), + 'center' => esc_attr__( 'Center', 'sportspress' ), + 'right' => esc_attr__( 'Right', 'sportspress' ), ), ), array( - 'title' => __( 'Padding', 'sportspress' ), + 'title' => esc_attr__( 'Padding', 'sportspress' ), 'id' => 'sportspress_table_padding', 'class' => 'small-text', 'default' => null, - 'placeholder' => __( 'Auto', 'sportspress' ), + 'placeholder' => esc_attr__( 'Auto', 'sportspress' ), 'desc' => 'px', 'type' => 'number', 'custom_attributes' => array( @@ -166,7 +166,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) : $options, array( array( - 'title' => __( 'Custom CSS', 'sportspress' ), + 'title' => esc_attr__( 'Custom CSS', 'sportspress' ), 'id' => 'sportspress_custom_css', 'css' => 'width:100%; height: 130px;', 'type' => 'textarea', @@ -176,29 +176,29 @@ if ( ! class_exists( 'SP_Settings_General' ) ) : 'sportspress_general_script_options', array( array( - 'title' => __( 'Scripts', 'sportspress' ), - 'desc' => __( 'Live countdowns', 'sportspress' ), + 'title' => esc_attr__( 'Scripts', 'sportspress' ), + 'desc' => esc_attr__( 'Live countdowns', 'sportspress' ), 'id' => 'sportspress_enable_live_countdowns', 'default' => 'yes', 'type' => 'checkbox', 'checkboxgroup' => 'start', - 'desc_tip' => __( 'This will enable a script allowing the countdowns to be animated.', 'sportspress' ), + 'desc_tip' => esc_attr__( 'This will enable a script allowing the countdowns to be animated.', 'sportspress' ), ), array( - 'desc' => __( 'Shortcode menu', 'sportspress' ), + 'desc' => esc_attr__( 'Shortcode menu', 'sportspress' ), 'id' => 'sportspress_rich_editing', 'default' => 'yes', 'type' => 'checkbox', 'checkboxgroup' => 'end', - 'desc_tip' => __( 'This will enable a shortcode menu to be displayed in the visual editor.', 'sportspress' ), + 'desc_tip' => esc_attr__( 'This will enable a shortcode menu to be displayed in the visual editor.', 'sportspress' ), ), ) ), array( array( - 'title' => __( 'Tables', 'sportspress' ), - 'desc' => __( 'Responsive', 'sportspress' ), + 'title' => esc_attr__( 'Tables', 'sportspress' ), + 'desc' => esc_attr__( 'Responsive', 'sportspress' ), 'id' => 'sportspress_enable_responsive_tables', 'default' => 'no', 'type' => 'checkbox', @@ -206,7 +206,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) : ), array( - 'desc' => __( 'Scrollable', 'sportspress' ), + 'desc' => esc_attr__( 'Scrollable', 'sportspress' ), 'id' => 'sportspress_enable_scrollable_tables', 'default' => 'yes', 'type' => 'checkbox', @@ -214,7 +214,7 @@ if ( ! class_exists( 'SP_Settings_General' ) ) : ), array( - 'desc' => __( 'Sortable', 'sportspress' ), + 'desc' => esc_attr__( 'Sortable', 'sportspress' ), 'id' => 'sportspress_enable_sortable_tables', 'default' => 'yes', 'type' => 'checkbox', @@ -222,23 +222,23 @@ if ( ! class_exists( 'SP_Settings_General' ) ) : ), array( - 'title' => __( 'Widgets', 'sportspress' ), - 'desc' => __( 'Unique', 'sportspress' ), + 'title' => esc_attr__( 'Widgets', 'sportspress' ), + 'desc' => esc_attr__( 'Unique', 'sportspress' ), 'id' => 'sportspress_widget_unique', 'default' => 'no', 'type' => 'checkbox', - 'desc_tip' => __( 'Hide widget when same as content.', 'sportspress' ), + 'desc_tip' => esc_attr__( 'Hide widget when same as content.', 'sportspress' ), ), ) ); if ( apply_filters( 'sportspress_enable_header', false ) ) { $options[] = array( - 'title' => __( 'Header Offset', 'sportspress' ), + 'title' => esc_attr__( 'Header Offset', 'sportspress' ), 'id' => 'sportspress_header_offset', 'class' => 'small-text', 'default' => null, - 'placeholder' => __( 'Auto', 'sportspress' ), + 'placeholder' => esc_attr__( 'Auto', 'sportspress' ), 'desc' => 'px', 'type' => 'number', 'custom_attributes' => array( @@ -442,11 +442,11 @@ if ( ! class_exists( 'SP_Settings_General' ) ) : } // Show inputs - $this->color_picker( __( 'Primary', 'sportspress' ), 'sportspress_frontend_css_primary', $colors['primary'] ); - $this->color_picker( __( 'Background', 'sportspress' ), 'sportspress_frontend_css_background', $colors['background'] ); - $this->color_picker( __( 'Text', 'sportspress' ), 'sportspress_frontend_css_text', $colors['text'] ); - $this->color_picker( __( 'Heading', 'sportspress' ), 'sportspress_frontend_css_heading', $colors['heading'] ); - $this->color_picker( __( 'Link', 'sportspress' ), 'sportspress_frontend_css_link', $colors['link'] ); + $this->color_picker( esc_attr__( 'Primary', 'sportspress' ), 'sportspress_frontend_css_primary', $colors['primary'] ); + $this->color_picker( esc_attr__( 'Background', 'sportspress' ), 'sportspress_frontend_css_background', $colors['background'] ); + $this->color_picker( esc_attr__( 'Text', 'sportspress' ), 'sportspress_frontend_css_text', $colors['text'] ); + $this->color_picker( esc_attr__( 'Heading', 'sportspress' ), 'sportspress_frontend_css_heading', $colors['heading'] ); + $this->color_picker( esc_attr__( 'Link', 'sportspress' ), 'sportspress_frontend_css_link', $colors['link'] ); if ( ( $styles = SP_Frontend_Scripts::get_styles() ) && array_key_exists( 'sportspress-general', $styles ) ) : ?> diff --git a/includes/admin/settings/class-sp-settings-licenses.php b/includes/admin/settings/class-sp-settings-licenses.php index 1cca9140..5036d6fd 100644 --- a/includes/admin/settings/class-sp-settings-licenses.php +++ b/includes/admin/settings/class-sp-settings-licenses.php @@ -29,7 +29,7 @@ if ( ! class_exists( 'SP_Settings_Licenses' ) ) : */ public function __construct() { $this->id = 'licenses'; - $this->label = __( 'Licenses', 'sportspress' ); + $this->label = esc_attr__( 'Licenses', 'sportspress' ); $this->licenses = apply_filters( 'sportspress_licenses', @@ -159,7 +159,7 @@ if ( ! class_exists( 'SP_Settings_Licenses' ) ) : // Make sure the response came back okay if ( is_wp_error( $response ) ) { - SP_Admin_Settings::add_error( __( 'Sorry, there has been an error.', 'sportspress' ) ); + SP_Admin_Settings::add_error( esc_attr__( 'Sorry, there has been an error.', 'sportspress' ) ); return false; } @@ -172,9 +172,9 @@ if ( ! class_exists( 'SP_Settings_Licenses' ) ) : // Update License or display error if ( 'valid' == $license_data->license ) { update_site_option( 'sportspress_' . $id . '_license_key', $license ); - SP_Admin_Settings::add_override( __( 'License activated.', 'sportspress' ) ); + SP_Admin_Settings::add_override( esc_attr__( 'License activated.', 'sportspress' ) ); } else { - SP_Admin_Settings::add_error( __( 'License invalid.', 'sportspress' ) ); + SP_Admin_Settings::add_error( esc_attr__( 'License invalid.', 'sportspress' ) ); } } @@ -214,7 +214,7 @@ if ( ! class_exists( 'SP_Settings_Licenses' ) ) : // make sure the response came back okay if ( is_wp_error( $response ) ) { - SP_Admin_Settings::add_error( __( 'Sorry, there has been an error.', 'sportspress' ) ); + SP_Admin_Settings::add_error( esc_attr__( 'Sorry, there has been an error.', 'sportspress' ) ); return false; } @@ -224,9 +224,9 @@ if ( ! class_exists( 'SP_Settings_Licenses' ) ) : // $license_data->license will be either "deactivated" or "failed" if ( $license_data->license == 'deactivated' ) { delete_site_option( 'sportspress_' . $id . '_license_status' ); - SP_Admin_Settings::add_override( __( 'License deactivated.', 'sportspress' ) ); + SP_Admin_Settings::add_override( esc_attr__( 'License deactivated.', 'sportspress' ) ); } else { - SP_Admin_Settings::add_error( __( 'Sorry, there has been an error.', 'sportspress' ) ); + SP_Admin_Settings::add_error( esc_attr__( 'Sorry, there has been an error.', 'sportspress' ) ); } } } diff --git a/includes/admin/settings/class-sp-settings-modules.php b/includes/admin/settings/class-sp-settings-modules.php index 3f33bd26..54b3c6bb 100644 --- a/includes/admin/settings/class-sp-settings-modules.php +++ b/includes/admin/settings/class-sp-settings-modules.php @@ -29,17 +29,17 @@ if ( ! class_exists( 'SP_Settings_Modules' ) ) : */ public function __construct() { $this->id = 'modules'; - $this->label = __( 'Modules', 'sportspress' ); + $this->label = esc_attr__( 'Modules', 'sportspress' ); $this->sections = apply_filters( 'sportspress_module_sections', array( - 'general' => __( 'General', 'sportspress' ), - 'event' => __( 'Events', 'sportspress' ), - 'team' => __( 'Teams', 'sportspress' ), - 'player_staff' => __( 'Players', 'sportspress' ) . ' & ' . __( 'Staff', 'sportspress' ), - 'admin' => __( 'Dashboard', 'sportspress' ), - 'other' => __( 'Other', 'sportspress' ), + 'general' => esc_attr__( 'General', 'sportspress' ), + 'event' => esc_attr__( 'Events', 'sportspress' ), + 'team' => esc_attr__( 'Teams', 'sportspress' ), + 'player_staff' => esc_attr__( 'Players', 'sportspress' ) . ' & ' . esc_attr__( 'Staff', 'sportspress' ), + 'admin' => esc_attr__( 'Dashboard', 'sportspress' ), + 'other' => esc_attr__( 'Other', 'sportspress' ), ) ); @@ -143,46 +143,46 @@ if ( ! class_exists( 'SP_Settings_Modules' ) ) : $categories = array( 'documentation' => array( 'icon' => 'sp-icon-book', - 'label' => __( 'Documentation', 'sportspress' ), + 'label' => esc_attr__( 'Documentation', 'sportspress' ), 'links' => array( - 'http://tboy.co/installation' => __( 'Getting Started', 'sportspress' ), - 'http://tboy.co/manuals' => __( 'Manuals', 'sportspress' ), - 'http://tboy.co/videos' => __( 'Videos', 'sportspress' ), + 'http://tboy.co/installation' => esc_attr__( 'Getting Started', 'sportspress' ), + 'http://tboy.co/manuals' => esc_attr__( 'Manuals', 'sportspress' ), + 'http://tboy.co/videos' => esc_attr__( 'Videos', 'sportspress' ), ), ), 'help' => array( 'icon' => 'dashicons dashicons-heart', - 'label' => __( 'Help', 'sportspress' ), + 'label' => esc_attr__( 'Help', 'sportspress' ), 'links' => array( - 'http://tboy.co/forums' => __( 'Support Forums', 'sportspress' ), - 'http://tboy.co/ideas' => __( 'Feature Requests', 'sportspress' ), + 'http://tboy.co/forums' => esc_attr__( 'Support Forums', 'sportspress' ), + 'http://tboy.co/ideas' => esc_attr__( 'Feature Requests', 'sportspress' ), ), ), 'social' => array( 'icon' => 'dashicons dashicons-share', - 'label' => __( 'Connect', 'sportspress' ), + 'label' => esc_attr__( 'Connect', 'sportspress' ), 'links' => array( - 'http://tboy.co/twitter' => __( 'Twitter', 'sportspress' ), - 'http://tboy.co/facebook' => __( 'Facebook', 'sportspress' ), - 'http://tboy.co/youtube' => __( 'YouTube', 'sportspress' ), - 'http://tboy.co/gplus' => __( 'Google+', 'sportspress' ), + 'http://tboy.co/twitter' => esc_attr__( 'Twitter', 'sportspress' ), + 'http://tboy.co/facebook' => esc_attr__( 'Facebook', 'sportspress' ), + 'http://tboy.co/youtube' => esc_attr__( 'YouTube', 'sportspress' ), + 'http://tboy.co/gplus' => esc_attr__( 'Google+', 'sportspress' ), ), ), 'developers' => array( 'icon' => 'dashicons dashicons-editor-code', - 'label' => __( 'Developers', 'sportspress' ), + 'label' => esc_attr__( 'Developers', 'sportspress' ), 'links' => array( - 'http://tboy.co/developers' => __( 'Reference', 'sportspress' ), - 'http://tboy.co/slack' => __( 'Slack', 'sportspress' ), - 'http://tboy.co/github' => __( 'GitHub', 'sportspress' ), + 'http://tboy.co/developers' => esc_attr__( 'Reference', 'sportspress' ), + 'http://tboy.co/slack' => esc_attr__( 'Slack', 'sportspress' ), + 'http://tboy.co/github' => esc_attr__( 'GitHub', 'sportspress' ), ), ), ); if ( class_exists( 'SportsPress_Pro' ) ) { - $categories['help']['links']['http://support.themeboy.com/'] = __( 'Premium Support', 'sportspress' ); + $categories['help']['links']['http://support.themeboy.com/'] = esc_attr__( 'Premium Support', 'sportspress' ); } else { - $categories['help']['links'][ apply_filters( 'sportspress_pro_url', 'http://tboy.co/pro' ) ] = '' . __( 'Premium Support', 'sportspress' ) . ''; + $categories['help']['links'][ apply_filters( 'sportspress_pro_url', 'http://tboy.co/pro' ) ] = '' . esc_attr__( 'Premium Support', 'sportspress' ) . ''; } $categories = apply_filters( 'sportspress_modules_welcome_links', $categories ); @@ -218,7 +218,7 @@ if ( ! class_exists( 'SP_Settings_Modules' ) ) :
- + - + - + - + - +
- ID, $checked ) ); ?>> + ID, $checked ) ); ?>> - + post_title ); ?> ID, 'sp_league' ) ? the_terms( $list->ID, 'sp_league' ) : '—'; ?>ID, 'sp_season' ) ? the_terms( $list->ID, 'sp_season' ) : '—'; ?>ID, 'sp_league' ) ? wp_kses_post( the_terms( $list->ID, 'sp_league' ) ) : '—'; ?>ID, 'sp_season' ) ? wp_kses_post( the_terms( $list->ID, 'sp_season' ) ) : '—'; ?> formats->list, $format, '—' ) ); ?>
- +
- +
- + - + - + - +
- ID, $checked ) ); ?>> + ID, $checked ) ); ?>> - + post_title ); ?> ID, 'sp_role' ) ? the_terms( $staff->ID, 'sp_role' ) : '—'; ?>ID, 'sp_league' ) ? the_terms( $staff->ID, 'sp_league' ) : '—'; ?>ID, 'sp_season' ) ? the_terms( $staff->ID, 'sp_season' ) : '—'; ?>ID, 'sp_role' ) ? wp_kses_post( the_terms( $staff->ID, 'sp_role' ) ) : '—'; ?>ID, 'sp_league' ) ? wp_kses_post( the_terms( $staff->ID, 'sp_league' ) ) : '—'; ?>ID, 'sp_season' ) ? wp_kses_post( the_terms( $staff->ID, 'sp_season' ) ) : '—'; ?>
- +
- +
- + - + - + - +
- ID, $checked ) ); ?>> + ID, $checked ) ); ?>> - + post_title ); ?> ID, 'sp_league' ) ? the_terms( $table->ID, 'sp_league' ) : '—'; ?>ID, 'sp_season' ) ? the_terms( $table->ID, 'sp_season' ) : '—'; ?>ID, 'sp_league' ) ? wp_kses_post( the_terms( $table->ID, 'sp_league' ) ) : '—'; ?>ID, 'sp_season' ) ? wp_kses_post( the_terms( $table->ID, 'sp_season' ) ) : '—'; ?>
- +
- +
@@ -226,7 +226,7 @@ if ( ! class_exists( 'SP_Settings_Modules' ) ) : @@ -175,28 +175,28 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) : $posting = array(); // fsockopen/cURL - $posting['fsockopen_curl']['name'] = __( 'fsockopen/cURL', 'sportspress' ); + $posting['fsockopen_curl']['name'] = esc_attr__( 'fsockopen/cURL', 'sportspress' ); if ( function_exists( 'fsockopen' ) || function_exists( 'curl_init' ) ) { if ( function_exists( 'fsockopen' ) && function_exists( 'curl_init' ) ) { - $posting['fsockopen_curl']['note'] = __( 'Your server has fsockopen and cURL enabled.', 'sportspress' ); + $posting['fsockopen_curl']['note'] = esc_attr__( 'Your server has fsockopen and cURL enabled.', 'sportspress' ); } elseif ( function_exists( 'fsockopen' ) ) { - $posting['fsockopen_curl']['note'] = __( 'Your server has fsockopen enabled, cURL is disabled.', 'sportspress' ); + $posting['fsockopen_curl']['note'] = esc_attr__( 'Your server has fsockopen enabled, cURL is disabled.', 'sportspress' ); } else { - $posting['fsockopen_curl']['note'] = __( 'Your server has cURL enabled, fsockopen is disabled.', 'sportspress' ); + $posting['fsockopen_curl']['note'] = esc_attr__( 'Your server has cURL enabled, fsockopen is disabled.', 'sportspress' ); } $posting['fsockopen_curl']['success'] = true; } else { - $posting['fsockopen_curl']['note'] = __( 'Your server does not have fsockopen or cURL enabled - PayPal IPN and other scripts which communicate with other servers will not work. Contact your hosting provider.', 'sportspress' ) . ''; + $posting['fsockopen_curl']['note'] = esc_attr__( 'Your server does not have fsockopen or cURL enabled - PayPal IPN and other scripts which communicate with other servers will not work. Contact your hosting provider.', 'sportspress' ) . ''; $posting['fsockopen_curl']['success'] = false; } // SOAP - $posting['soap_client']['name'] = __( 'SOAP Client', 'sportspress' ); + $posting['soap_client']['name'] = esc_attr__( 'SOAP Client', 'sportspress' ); if ( class_exists( 'SoapClient' ) ) { - $posting['soap_client']['note'] = __( 'Your server has the SOAP Client class enabled.', 'sportspress' ); + $posting['soap_client']['note'] = esc_attr__( 'Your server has the SOAP Client class enabled.', 'sportspress' ); $posting['soap_client']['success'] = true; } else { - $posting['soap_client']['note'] = sprintf( __( 'Your server does not have the SOAP Client class enabled - some gateway plugins which use SOAP may not work as expected.', 'sportspress' ), 'http://php.net/manual/en/class.soapclient.php' ) . ''; + $posting['soap_client']['note'] = sprintf( esc_attr__( 'Your server does not have the SOAP Client class enabled - some gateway plugins which use SOAP may not work as expected.', 'sportspress' ), 'http://php.net/manual/en/class.soapclient.php' ) . ''; $posting['soap_client']['success'] = false; } @@ -248,7 +248,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) : // link the plugin name to the plugin url if available $plugin_name = $plugin_data['Name']; if ( ! empty( $plugin_data['PluginURI'] ) ) { - $plugin_name = '' . $plugin_name . ''; + $plugin_name = '' . $plugin_name . ''; } if ( strstr( $dirname, 'sportspress' ) ) { @@ -277,11 +277,11 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) : } if ( ! empty( $version_data['version'] ) && version_compare( $version_data['version'], $plugin_data['Version'], '>' ) ) { - $version_string = ' – ' . $version_data['version'] . ' ' . __( 'is available', 'sportspress' ) . ''; + $version_string = ' – ' . $version_data['version'] . ' ' . esc_attr__( 'is available', 'sportspress' ) . ''; } } - $sp_plugins[] = $plugin_name . ' ' . __( 'by', 'sportspress' ) . ' ' . $plugin_data['Author'] . ' ' . __( 'version', 'sportspress' ) . ' ' . $plugin_data['Version'] . $version_string; + $sp_plugins[] = $plugin_name . ' ' . esc_attr__( 'by', 'sportspress' ) . ' ' . $plugin_data['Author'] . ' ' . esc_attr__( 'version', 'sportspress' ) . ' ' . $plugin_data['Version'] . $version_string; } } @@ -306,7 +306,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) : - + @@ -636,7 +636,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) : $theme_version = $status->get_file_version( $theme_file ); if ( $core_version && ( empty( $theme_version ) || version_compare( $theme_version, $core_version, '<' ) ) ) { - $found_files[ $plugin_name ][] = sprintf( __( '%1$s version %2$s is out of date. The core version is %3$s', 'sportspress' ), basename( $theme_file ), $theme_version ? $theme_version : '-', $core_version ); + $found_files[ $plugin_name ][] = sprintf( esc_attr__( '%1$s version %2$s is out of date. The core version is %3$s', 'sportspress' ), basename( $theme_file ), $theme_version ? $theme_version : '-', $core_version ); } else { $found_files[ $plugin_name ][] = sprintf( '%s', basename( $theme_file ) ); } diff --git a/includes/admin/settings/class-sp-settings-teams.php b/includes/admin/settings/class-sp-settings-teams.php index 01339215..21f33dba 100644 --- a/includes/admin/settings/class-sp-settings-teams.php +++ b/includes/admin/settings/class-sp-settings-teams.php @@ -24,7 +24,7 @@ if ( ! class_exists( 'SP_Settings_Teams' ) ) : */ public function __construct() { $this->id = 'teams'; - $this->label = __( 'Teams', 'sportspress' ); + $this->label = esc_attr__( 'Teams', 'sportspress' ); $this->template = 'team'; add_filter( 'sportspress_settings_tabs_array', array( $this, 'add_settings_page' ), 20 ); @@ -44,7 +44,7 @@ if ( ! class_exists( 'SP_Settings_Teams' ) ) : $settings = array_merge( array( array( - 'title' => __( 'Team Options', 'sportspress' ), + 'title' => esc_attr__( 'Team Options', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'team_options', @@ -58,40 +58,40 @@ if ( ! class_exists( 'SP_Settings_Teams' ) ) : array( 'type' => 'team_tabs' ), array( - 'title' => __( 'Staff', 'sportspress' ), - 'desc' => __( 'Link staff', 'sportspress' ), + 'title' => esc_attr__( 'Staff', 'sportspress' ), + 'desc' => esc_attr__( 'Link staff', 'sportspress' ), 'id' => 'sportspress_team_link_staff', 'default' => 'no', 'type' => 'checkbox', ), array( - 'title' => __( 'Link', 'sportspress' ), - 'desc' => __( 'Link teams', 'sportspress' ), + 'title' => esc_attr__( 'Link', 'sportspress' ), + 'desc' => esc_attr__( 'Link teams', 'sportspress' ), 'id' => 'sportspress_link_teams', 'default' => 'no', 'type' => 'checkbox', ), array( - 'title' => __( 'Venue', 'sportspress' ), - 'desc' => __( 'Link venues', 'sportspress' ), + 'title' => esc_attr__( 'Venue', 'sportspress' ), + 'desc' => esc_attr__( 'Link venues', 'sportspress' ), 'id' => 'sportspress_team_link_venues', 'default' => 'no', 'type' => 'checkbox', ), array( - 'title' => __( 'Visit Site', 'sportspress' ), - 'desc' => __( 'Open link in a new window/tab', 'sportspress' ), + 'title' => esc_attr__( 'Visit Site', 'sportspress' ), + 'desc' => esc_attr__( 'Open link in a new window/tab', 'sportspress' ), 'id' => 'sportspress_team_site_target_blank', 'default' => 'no', 'type' => 'checkbox', ), array( - 'title' => __( 'Comments', 'sportspress' ), - 'desc' => __( 'Allow people to post comments on Team page', 'sportspress' ), + 'title' => esc_attr__( 'Comments', 'sportspress' ), + 'desc' => esc_attr__( 'Allow people to post comments on Team page', 'sportspress' ), 'id' => 'sportspress_team_comment_status', 'default' => 'no', 'type' => 'checkbox', diff --git a/includes/admin/settings/class-sp-settings-text.php b/includes/admin/settings/class-sp-settings-text.php index c7b7c249..ecf9c385 100644 --- a/includes/admin/settings/class-sp-settings-text.php +++ b/includes/admin/settings/class-sp-settings-text.php @@ -24,7 +24,7 @@ if ( ! class_exists( 'SP_Settings_Text' ) ) : */ public function __construct() { $this->id = 'text'; - $this->label = __( 'Text', 'sportspress' ); + $this->label = esc_attr__( 'Text', 'sportspress' ); add_filter( 'sportspress_settings_tabs_array', array( $this, 'add_settings_page' ), 20 ); add_action( 'sportspress_settings_' . $this->id, array( $this, 'output' ) ); @@ -40,9 +40,9 @@ if ( ! class_exists( 'SP_Settings_Text' ) ) : $settings = array( array( - 'title' => __( 'Text', 'sportspress' ), + 'title' => esc_attr__( 'Text', 'sportspress' ), 'type' => 'title', - 'desc' => __( 'The following options affect how words are displayed on the frontend.', 'sportspress' ), + 'desc' => esc_attr__( 'The following options affect how words are displayed on the frontend.', 'sportspress' ), 'id' => 'text_options', ), ); diff --git a/includes/admin/views/html-admin-config.php b/includes/admin/views/html-admin-config.php index 70460405..fd62aa34 100644 --- a/includes/admin/views/html-admin-config.php +++ b/includes/admin/views/html-admin-config.php @@ -4,7 +4,7 @@ $columns = get_option( 'sportspress_player_columns', 'auto' );

- +

- sections, $section, __( 'Modules', 'sportspress' ) ) ); ?> + sections, $section, esc_attr__( 'Modules', 'sportspress' ) ) ); ?>
- + @@ -234,7 +234,7 @@ if ( ! class_exists( 'SP_Settings_Modules' ) ) : - + diff --git a/includes/admin/settings/class-sp-settings-players.php b/includes/admin/settings/class-sp-settings-players.php index b4707d03..97aeafc2 100644 --- a/includes/admin/settings/class-sp-settings-players.php +++ b/includes/admin/settings/class-sp-settings-players.php @@ -24,7 +24,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) : */ public function __construct() { $this->id = 'players'; - $this->label = __( 'Players', 'sportspress' ); + $this->label = esc_attr__( 'Players', 'sportspress' ); $this->template = 'player'; add_filter( 'sportspress_settings_tabs_array', array( $this, 'add_settings_page' ), 20 ); @@ -44,7 +44,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) : $settings = array_merge( array( array( - 'title' => __( 'Player Options', 'sportspress' ), + 'title' => esc_attr__( 'Player Options', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'player_options', @@ -58,16 +58,16 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) : array( 'type' => 'player_tabs' ), array( - 'title' => __( 'Link', 'sportspress' ), - 'desc' => __( 'Link players', 'sportspress' ), + 'title' => esc_attr__( 'Link', 'sportspress' ), + 'desc' => esc_attr__( 'Link players', 'sportspress' ), 'id' => 'sportspress_link_players', 'default' => 'yes', 'type' => 'checkbox', ), array( - 'title' => __( 'Details', 'sportspress' ), - 'desc' => __( 'Squad Number', 'sportspress' ), + 'title' => esc_attr__( 'Details', 'sportspress' ), + 'desc' => esc_attr__( 'Squad Number', 'sportspress' ), 'id' => 'sportspress_player_show_number', 'default' => 'no', 'type' => 'checkbox', @@ -75,7 +75,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) : ), array( - 'desc' => __( 'Name', 'sportspress' ), + 'desc' => esc_attr__( 'Name', 'sportspress' ), 'id' => 'sportspress_player_show_name', 'default' => 'no', 'type' => 'checkbox', @@ -83,7 +83,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) : ), array( - 'desc' => __( 'Nationality', 'sportspress' ), + 'desc' => esc_attr__( 'Nationality', 'sportspress' ), 'id' => 'sportspress_player_show_nationality', 'default' => 'yes', 'type' => 'checkbox', @@ -91,7 +91,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) : ), array( - 'desc' => __( 'Position', 'sportspress' ), + 'desc' => esc_attr__( 'Position', 'sportspress' ), 'id' => 'sportspress_player_show_positions', 'default' => 'yes', 'type' => 'checkbox', @@ -99,7 +99,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) : ), array( - 'desc' => __( 'Current Team', 'sportspress' ), + 'desc' => esc_attr__( 'Current Team', 'sportspress' ), 'id' => 'sportspress_player_show_current_teams', 'default' => 'yes', 'type' => 'checkbox', @@ -107,7 +107,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) : ), array( - 'desc' => __( 'Past Teams', 'sportspress' ), + 'desc' => esc_attr__( 'Past Teams', 'sportspress' ), 'id' => 'sportspress_player_show_past_teams', 'default' => 'yes', 'type' => 'checkbox', @@ -115,7 +115,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) : ), array( - 'desc' => __( 'Leagues', 'sportspress' ), + 'desc' => esc_attr__( 'Leagues', 'sportspress' ), 'id' => 'sportspress_player_show_leagues', 'default' => 'no', 'type' => 'checkbox', @@ -123,7 +123,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) : ), array( - 'desc' => __( 'Seasons', 'sportspress' ), + 'desc' => esc_attr__( 'Seasons', 'sportspress' ), 'id' => 'sportspress_player_show_seasons', 'default' => 'no', 'type' => 'checkbox', @@ -131,8 +131,8 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) : ), array( - 'title' => __( 'Nationality', 'sportspress' ), - 'desc' => __( 'Display national flags', 'sportspress' ), + 'title' => esc_attr__( 'Nationality', 'sportspress' ), + 'desc' => esc_attr__( 'Display national flags', 'sportspress' ), 'id' => 'sportspress_player_show_flags', 'default' => 'yes', 'type' => 'checkbox', @@ -147,49 +147,49 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) : ), array( array( - 'title' => __( 'Statistics', 'sportspress' ), + 'title' => esc_attr__( 'Statistics', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'player_statistic_options', ), array( - 'title' => __( 'Columns', 'sportspress' ), + 'title' => esc_attr__( 'Columns', 'sportspress' ), 'id' => 'sportspress_player_columns', 'default' => 'auto', 'type' => 'radio', 'options' => array( - 'auto' => __( 'Auto', 'sportspress' ), - 'manual' => __( 'Manual', 'sportspress' ), + 'auto' => esc_attr__( 'Auto', 'sportspress' ), + 'manual' => esc_attr__( 'Manual', 'sportspress' ), ), ), array( - 'title' => __( 'Mode', 'sportspress' ), + 'title' => esc_attr__( 'Mode', 'sportspress' ), 'id' => 'sportspress_player_statistics_mode', 'default' => 'values', 'type' => 'radio', 'options' => array( - 'values' => __( 'Values', 'sportspress' ), - 'icons' => __( 'Icons', 'sportspress' ), + 'values' => esc_attr__( 'Values', 'sportspress' ), + 'icons' => esc_attr__( 'Icons', 'sportspress' ), ), ), array( - 'title' => __( 'Categories', 'sportspress' ), + 'title' => esc_attr__( 'Categories', 'sportspress' ), 'id' => 'sportspress_player_performance_sections', 'default' => -1, 'type' => 'radio', 'options' => array( - -1 => __( 'Combined', 'sportspress' ), - 0 => __( 'Offense', 'sportspress' ) . ' → ' . __( 'Defense', 'sportspress' ), - 1 => __( 'Defense', 'sportspress' ) . ' → ' . __( 'Offense', 'sportspress' ), + -1 => esc_attr__( 'Combined', 'sportspress' ), + 0 => esc_attr__( 'Offense', 'sportspress' ) . ' → ' . esc_attr__( 'Defense', 'sportspress' ), + 1 => esc_attr__( 'Defense', 'sportspress' ) . ' → ' . esc_attr__( 'Offense', 'sportspress' ), ), ), array( - 'title' => __( 'Display', 'sportspress' ), - 'desc' => __( 'Total', 'sportspress' ), + 'title' => esc_attr__( 'Display', 'sportspress' ), + 'desc' => esc_attr__( 'Total', 'sportspress' ), 'id' => 'sportspress_player_show_total', 'default' => 'no', 'type' => 'checkbox', @@ -197,7 +197,7 @@ if ( ! class_exists( 'SP_Settings_Players' ) ) : ), array( - 'desc' => __( 'Career Total', 'sportspress' ), + 'desc' => esc_attr__( 'Career Total', 'sportspress' ), 'id' => 'sportspress_player_show_career_total', 'default' => 'no', 'type' => 'checkbox', diff --git a/includes/admin/settings/class-sp-settings-staff.php b/includes/admin/settings/class-sp-settings-staff.php index 746daf4f..ecdde9e4 100644 --- a/includes/admin/settings/class-sp-settings-staff.php +++ b/includes/admin/settings/class-sp-settings-staff.php @@ -24,7 +24,7 @@ if ( ! class_exists( 'SP_Settings_Staff' ) ) : */ public function __construct() { $this->id = 'staff'; - $this->label = __( 'Staff', 'sportspress' ); + $this->label = esc_attr__( 'Staff', 'sportspress' ); $this->template = 'staff'; add_filter( 'sportspress_settings_tabs_array', array( $this, 'add_settings_page' ), 20 ); @@ -46,7 +46,7 @@ if ( ! class_exists( 'SP_Settings_Staff' ) ) : array_merge( array( array( - 'title' => __( 'Staff Options', 'sportspress' ), + 'title' => esc_attr__( 'Staff Options', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'staff_options', @@ -60,16 +60,16 @@ if ( ! class_exists( 'SP_Settings_Staff' ) ) : array( 'type' => 'staff_tabs' ), array( - 'title' => __( 'Link', 'sportspress' ), - 'desc' => __( 'Link staff', 'sportspress' ), + 'title' => esc_attr__( 'Link', 'sportspress' ), + 'desc' => esc_attr__( 'Link staff', 'sportspress' ), 'id' => 'sportspress_link_staff', 'default' => 'yes', 'type' => 'checkbox', ), array( - 'title' => __( 'Details', 'sportspress' ), - 'desc' => __( 'Nationality', 'sportspress' ), + 'title' => esc_attr__( 'Details', 'sportspress' ), + 'desc' => esc_attr__( 'Nationality', 'sportspress' ), 'id' => 'sportspress_staff_show_nationality', 'default' => 'yes', 'type' => 'checkbox', @@ -77,7 +77,7 @@ if ( ! class_exists( 'SP_Settings_Staff' ) ) : ), array( - 'desc' => __( 'Current Team', 'sportspress' ), + 'desc' => esc_attr__( 'Current Team', 'sportspress' ), 'id' => 'sportspress_staff_show_current_teams', 'default' => 'yes', 'type' => 'checkbox', @@ -85,7 +85,7 @@ if ( ! class_exists( 'SP_Settings_Staff' ) ) : ), array( - 'desc' => __( 'Past Teams', 'sportspress' ), + 'desc' => esc_attr__( 'Past Teams', 'sportspress' ), 'id' => 'sportspress_staff_show_past_teams', 'default' => 'yes', 'type' => 'checkbox', @@ -93,8 +93,8 @@ if ( ! class_exists( 'SP_Settings_Staff' ) ) : ), array( - 'title' => __( 'Nationality', 'sportspress' ), - 'desc' => __( 'Display national flags', 'sportspress' ), + 'title' => esc_attr__( 'Nationality', 'sportspress' ), + 'desc' => esc_attr__( 'Display national flags', 'sportspress' ), 'id' => 'sportspress_staff_show_flags', 'default' => 'yes', 'type' => 'checkbox', diff --git a/includes/admin/settings/class-sp-settings-status.php b/includes/admin/settings/class-sp-settings-status.php index 1464ce0e..980974cb 100644 --- a/includes/admin/settings/class-sp-settings-status.php +++ b/includes/admin/settings/class-sp-settings-status.php @@ -24,7 +24,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) : */ public function __construct() { $this->id = 'status'; - $this->label = __( 'System Status', 'sportspress' ); + $this->label = esc_attr__( 'System Status', 'sportspress' ); if ( defined( 'WP_DEBUG' ) && true === WP_DEBUG && current_user_can( 'manage_options' ) ) { add_filter( 'sportspress_settings_tabs_array', array( $this, 'add_settings_page' ), 99 ); @@ -105,7 +105,7 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) : $memory = sp_let_to_num( WP_MEMORY_LIMIT ); if ( $memory < 67108864 ) { - echo '' . sprintf( esc_html__( '%1$s - We recommend setting memory to at least 64MB. See: Increasing memory allocated to PHP', 'sportspress' ), esc_html( size_format( $memory ) ), 'http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP' ) . ''; + echo '' . wp_kses_post( sprintf( esc_attr__( '%1$s - We recommend setting memory to at least 64MB. See: Increasing memory allocated to PHP', 'sportspress' ), esc_html( size_format( $memory ) ), 'http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP' ) ) . ''; } else { echo '' . esc_html( size_format( $memory ) ) . ''; } @@ -164,9 +164,9 @@ if ( ! class_exists( 'SP_Settings_Status' ) ) : ' . sprintf( esc_html__( 'Default timezone is %s - it should be UTC', 'sportspress' ), $default_timezone ) . ''; + echo '' . sprintf( esc_html__( 'Default timezone is %s - it should be UTC', 'sportspress' ), esc_attr( $default_timezone ) ) . ''; } else { - echo '' . sprintf( esc_html__( 'Default timezone is %s', 'sportspress' ), $default_timezone ) . ''; + echo '' . sprintf( esc_html__( 'Default timezone is %s', 'sportspress' ), esc_attr( $default_timezone ) ) . ''; } ?>
:
:
@@ -20,18 +20,18 @@ $columns = get_option( 'sportspress_player_columns', 'auto' ); ?> @@ -86,22 +86,22 @@ endforeach; else : ?> @@ -179,29 +179,29 @@ endforeach; else : ?> @@ -301,18 +301,18 @@ endforeach; else : ?> @@ -432,25 +432,25 @@ endforeach; else : ?> diff --git a/includes/admin/views/html-admin-page-status.php b/includes/admin/views/html-admin-page-status.php index 5b285862..c3a877e8 100644 --- a/includes/admin/views/html-admin-page-status.php +++ b/includes/admin/views/html-admin-page-status.php @@ -1,9 +1,9 @@
-

+

-

-

+

+


@@ -11,45 +11,45 @@ - + - - + + - - + + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + - - + + - + @@ -134,28 +134,28 @@ $posting = array(); // fsockopen/cURL - $posting['fsockopen_curl']['name'] = __( 'fsockopen/cURL', 'sportspress' ); + $posting['fsockopen_curl']['name'] = esc_attr__( 'fsockopen/cURL', 'sportspress' ); if ( function_exists( 'fsockopen' ) || function_exists( 'curl_init' ) ) { if ( function_exists( 'fsockopen' ) && function_exists( 'curl_init' ) ) { - $posting['fsockopen_curl']['note'] = __( 'Your server has fsockopen and cURL enabled.', 'sportspress' ); + $posting['fsockopen_curl']['note'] = esc_attr__( 'Your server has fsockopen and cURL enabled.', 'sportspress' ); } elseif ( function_exists( 'fsockopen' ) ) { - $posting['fsockopen_curl']['note'] = __( 'Your server has fsockopen enabled, cURL is disabled.', 'sportspress' ); + $posting['fsockopen_curl']['note'] = esc_attr__( 'Your server has fsockopen enabled, cURL is disabled.', 'sportspress' ); } else { - $posting['fsockopen_curl']['note'] = __( 'Your server has cURL enabled, fsockopen is disabled.', 'sportspress' ); + $posting['fsockopen_curl']['note'] = esc_attr__( 'Your server has cURL enabled, fsockopen is disabled.', 'sportspress' ); } $posting['fsockopen_curl']['success'] = true; } else { - $posting['fsockopen_curl']['note'] = __( 'Your server does not have fsockopen or cURL enabled - PayPal IPN and other scripts which communicate with other servers will not work. Contact your hosting provider.', 'sportspress' ) . ''; + $posting['fsockopen_curl']['note'] = esc_attr__( 'Your server does not have fsockopen or cURL enabled - PayPal IPN and other scripts which communicate with other servers will not work. Contact your hosting provider.', 'sportspress' ) . ''; $posting['fsockopen_curl']['success'] = false; } // SOAP - $posting['soap_client']['name'] = __( 'SOAP Client', 'sportspress' ); + $posting['soap_client']['name'] = esc_attr__( 'SOAP Client', 'sportspress' ); if ( class_exists( 'SoapClient' ) ) { - $posting['soap_client']['note'] = __( 'Your server has the SOAP Client class enabled.', 'sportspress' ); + $posting['soap_client']['note'] = esc_attr__( 'Your server has the SOAP Client class enabled.', 'sportspress' ); $posting['soap_client']['success'] = true; } else { - $posting['soap_client']['note'] = sprintf( __( 'Your server does not have the SOAP Client class enabled - some gateway plugins which use SOAP may not work as expected.', 'sportspress' ), 'http://php.net/manual/en/class.soapclient.php' ) . ''; + $posting['soap_client']['note'] = sprintf( esc_attr__( 'Your server does not have the SOAP Client class enabled - some gateway plugins which use SOAP may not work as expected.', 'sportspress' ), 'http://php.net/manual/en/class.soapclient.php' ) . ''; $posting['soap_client']['success'] = false; } @@ -167,7 +167,7 @@ @@ -179,13 +179,13 @@ - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + @@ -477,7 +477,7 @@ @@ -485,7 +485,7 @@ - + @@ -527,7 +527,7 @@ ?> - + - + - + - + @@ -592,7 +592,7 @@ $theme_version = $this->get_file_version( $theme_file ); if ( $core_version && ( empty( $theme_version ) || version_compare( $theme_version, $core_version, '<' ) ) ) { - $found_files[ $plugin_name ][] = sprintf( __( '%1$s version %2$s is out of date. The core version is %3$s', 'sportspress' ), basename( $theme_file ), $theme_version ? $theme_version : '-', $core_version ); + $found_files[ $plugin_name ][] = sprintf( esc_attr__( '%1$s version %2$s is out of date. The core version is %3$s', 'sportspress' ), basename( $theme_file ), $theme_version ? $theme_version : '-', $core_version ); } else { $found_files[ $plugin_name ][] = sprintf( '%s', basename( $theme_file ) ); } @@ -603,14 +603,14 @@ if ( $found_files ) { foreach ( $found_files as $plugin_name => $found_plugin_files ) { ?> - - + + - - + + diff --git a/includes/admin/views/html-admin-settings.php b/includes/admin/views/html-admin-settings.php index 346194c8..c1f09575 100644 --- a/includes/admin/views/html-admin-settings.php +++ b/includes/admin/views/html-admin-settings.php @@ -1,11 +1,11 @@
-

' ); ?>

+

' ) ); ?>

- + diff --git a/includes/admin/views/html-notice-install.php b/includes/admin/views/html-notice-install.php index 83dc176c..66d490e6 100644 --- a/includes/admin/views/html-notice-install.php +++ b/includes/admin/views/html-notice-install.php @@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) { } ?>

-

+

- + "> +

diff --git a/includes/admin/views/html-notice-no-access.php b/includes/admin/views/html-notice-no-access.php index 2a5bd735..00e53183 100644 --- a/includes/admin/views/html-notice-no-access.php +++ b/includes/admin/views/html-notice-no-access.php @@ -4,5 +4,5 @@ if ( ! defined( 'ABSPATH' ) ) { } ?>
-

+

diff --git a/includes/admin/views/html-notice-template-check.php b/includes/admin/views/html-notice-template-check.php index 8817cce7..ae58d796 100644 --- a/includes/admin/views/html-notice-template-check.php +++ b/includes/admin/views/html-notice-template-check.php @@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) { } ?>
-

Your theme has bundled outdated copies of SportsPress template files – if you encounter functionality issues on the frontend this could the reason. Ensure you update or remove them (in general we recommend only bundling the template files you actually need to customize). See the system report for full details.', 'sportspress' ); ?>

+

Your theme has bundled outdated copies of SportsPress template files – if you encounter functionality issues on the frontend this could the reason. Ensure you update or remove them (in general we recommend only bundling the template files you actually need to customize). See the system report for full details.', 'sportspress' ); ?>

+ ">

diff --git a/includes/admin/views/html-notice-theme-support.php b/includes/admin/views/html-notice-theme-support.php index 8f1579a3..f9f7f636 100644 --- a/includes/admin/views/html-notice-theme-support.php +++ b/includes/admin/views/html-notice-theme-support.php @@ -4,11 +4,11 @@ if ( ! defined( 'ABSPATH' ) ) { } ?>
-

Your theme does not declare SportsPress support – if you encounter layout issues please read our integration guide or choose a SportsPress theme :)', 'sportspress' ); ?>

-

+

Your theme does not declare SportsPress support – if you encounter layout issues please read our integration guide or choose a SportsPress theme :)', 'sportspress' ); ?>

+

- - - + + +

diff --git a/includes/api/class-sp-rest-api.php b/includes/api/class-sp-rest-api.php index b7057ca3..d61c2162 100644 --- a/includes/api/class-sp-rest-api.php +++ b/includes/api/class-sp-rest-api.php @@ -70,7 +70,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_meta_recursive', 'update_callback' => 'SP_REST_API::update_post_meta_recursive', 'schema' => array( - 'description' => __( 'Teams', 'sportspress' ), + 'description' => esc_attr__( 'Teams', 'sportspress' ), 'type' => 'array', 'context' => array( 'view', 'edit', 'embed' ), 'arg_options' => array( @@ -86,7 +86,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : array( 'get_callback' => 'SP_REST_API::get_post_data', 'schema' => array( - 'description' => __( 'Main Results', 'sportspress' ), + 'description' => esc_attr__( 'Main Results', 'sportspress' ), 'type' => 'array', 'context' => array( 'view', 'embed' ), 'arg_options' => array( @@ -102,7 +102,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : array( 'get_callback' => 'SP_REST_API::get_post_data', 'schema' => array( - 'description' => __( 'Outcome', 'sportspress' ), + 'description' => esc_attr__( 'Outcome', 'sportspress' ), 'type' => 'array', 'context' => array( 'view', 'embed' ), 'arg_options' => array( @@ -118,7 +118,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : array( 'get_callback' => 'SP_REST_API::get_post_data', 'schema' => array( - 'description' => __( 'Winner', 'sportspress' ), + 'description' => esc_attr__( 'Winner', 'sportspress' ), 'type' => 'integer', 'context' => array( 'view', 'embed' ), 'arg_options' => array( @@ -135,7 +135,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_data', 'update_callback' => 'SP_REST_API::update_post_meta', 'schema' => array( - 'description' => __( 'Format', 'sportspress' ), + 'description' => esc_attr__( 'Format', 'sportspress' ), 'type' => 'string', 'context' => array( 'view', 'edit', 'embed' ), 'arg_options' => array( @@ -152,7 +152,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_data', 'update_callback' => 'SP_REST_API::update_post_meta', 'schema' => array( - 'description' => __( 'Mode', 'sportspress' ), + 'description' => esc_attr__( 'Mode', 'sportspress' ), 'type' => 'string', 'context' => array( 'view', 'edit', 'embed' ), 'arg_options' => array( @@ -169,7 +169,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_data', 'update_callback' => 'SP_REST_API::update_post_meta', 'schema' => array( - 'description' => __( 'Match Day', 'sportspress' ), + 'description' => esc_attr__( 'Match Day', 'sportspress' ), 'type' => 'string', 'context' => array( 'view', 'edit', 'embed' ), 'arg_options' => array( @@ -186,7 +186,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_data', 'update_callback' => 'SP_REST_API::update_post_meta', 'schema' => array( - 'description' => __( 'Full Time', 'sportspress' ), + 'description' => esc_attr__( 'Full Time', 'sportspress' ), 'type' => 'integer', 'context' => array( 'view', 'edit', 'embed' ), 'arg_options' => array( @@ -203,7 +203,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_meta_recursive', 'update_callback' => 'SP_REST_API::update_post_meta_recursive', 'schema' => array( - 'description' => __( 'Players', 'sportspress' ), + 'description' => esc_attr__( 'Players', 'sportspress' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'arg_options' => array( @@ -220,7 +220,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_meta_recursive', 'update_callback' => 'SP_REST_API::update_post_meta_recursive', 'schema' => array( - 'description' => __( 'Offense', 'sportspress' ), + 'description' => esc_attr__( 'Offense', 'sportspress' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'arg_options' => array( @@ -237,7 +237,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_meta_recursive', 'update_callback' => 'SP_REST_API::update_post_meta_recursive', 'schema' => array( - 'description' => __( 'Defense', 'sportspress' ), + 'description' => esc_attr__( 'Defense', 'sportspress' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'arg_options' => array( @@ -254,7 +254,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_meta_recursive', 'update_callback' => 'SP_REST_API::update_post_meta_recursive', 'schema' => array( - 'description' => __( 'Staff', 'sportspress' ), + 'description' => esc_attr__( 'Staff', 'sportspress' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'arg_options' => array( @@ -271,7 +271,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_data', 'update_callback' => 'SP_REST_API::update_post_meta_arrays', 'schema' => array( - 'description' => __( 'Results', 'sportspress' ), + 'description' => esc_attr__( 'Results', 'sportspress' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'arg_options' => array( @@ -288,7 +288,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_data', 'update_callback' => 'SP_REST_API::update_post_meta_arrays_multi', 'schema' => array( - 'description' => __( 'Box Score', 'sportspress' ), + 'description' => esc_attr__( 'Box Score', 'sportspress' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'arg_options' => array( @@ -305,7 +305,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_meta_recursive', 'update_callback' => 'SP_REST_API::update_post_meta_recursive', 'schema' => array( - 'description' => __( 'Staff', 'sportspress' ), + 'description' => esc_attr__( 'Staff', 'sportspress' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'arg_options' => array( @@ -322,7 +322,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_meta_recursive', 'update_callback' => 'SP_REST_API::update_post_meta_recursive', 'schema' => array( - 'description' => __( 'League Tables', 'sportspress' ), + 'description' => esc_attr__( 'League Tables', 'sportspress' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'arg_options' => array( @@ -339,7 +339,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_meta_recursive', 'update_callback' => 'SP_REST_API::update_post_meta_recursive', 'schema' => array( - 'description' => __( 'Player Lists', 'sportspress' ), + 'description' => esc_attr__( 'Player Lists', 'sportspress' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'arg_options' => array( @@ -355,7 +355,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : array( 'get_callback' => 'SP_REST_API::get_post_ids_with_meta', 'schema' => array( - 'description' => __( 'Events', 'sportspress' ), + 'description' => esc_attr__( 'Events', 'sportspress' ), 'type' => 'array', 'context' => array( 'view' ), 'arg_options' => array( @@ -372,7 +372,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_meta', 'update_callback' => 'SP_REST_API::update_post_meta', 'schema' => array( - 'description' => __( 'Abbreviation', 'sportspress' ), + 'description' => esc_attr__( 'Abbreviation', 'sportspress' ), 'type' => 'string', 'context' => array( 'view', 'edit', 'embed' ), 'arg_options' => array( @@ -389,7 +389,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_meta', 'update_callback' => 'SP_REST_API::update_post_meta', 'schema' => array( - 'description' => __( 'Site URL', 'sportspress' ), + 'description' => esc_attr__( 'Site URL', 'sportspress' ), 'type' => 'string', 'context' => array( 'view', 'edit', 'embed' ), 'arg_options' => array( @@ -406,7 +406,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_meta', 'update_callback' => 'SP_REST_API::update_post_meta', 'schema' => array( - 'description' => __( 'Squad Number', 'sportspress' ), + 'description' => esc_attr__( 'Squad Number', 'sportspress' ), 'type' => 'integer', 'context' => array( 'view', 'edit', 'embed' ), 'arg_options' => array( @@ -423,7 +423,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_meta_recursive', 'update_callback' => 'SP_REST_API::update_post_meta_recursive', 'schema' => array( - 'description' => __( 'Teams', 'sportspress' ), + 'description' => esc_attr__( 'Teams', 'sportspress' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'arg_options' => array( @@ -440,7 +440,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_meta_recursive', 'update_callback' => 'SP_REST_API::update_post_meta_recursive', 'schema' => array( - 'description' => __( 'Current Teams', 'sportspress' ), + 'description' => esc_attr__( 'Current Teams', 'sportspress' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'arg_options' => array( @@ -457,7 +457,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_meta_recursive', 'update_callback' => 'SP_REST_API::update_post_meta_recursive', 'schema' => array( - 'description' => __( 'Past Teams', 'sportspress' ), + 'description' => esc_attr__( 'Past Teams', 'sportspress' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'arg_options' => array( @@ -474,7 +474,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_data', 'update_callback' => 'SP_REST_API::update_post_meta_recursive', 'schema' => array( - 'description' => __( 'Nationalities', 'sportspress' ), + 'description' => esc_attr__( 'Nationalities', 'sportspress' ), 'type' => 'array', 'context' => array( 'view', 'embed' ), 'arg_options' => array( @@ -491,7 +491,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_data', 'update_callback' => 'SP_REST_API::update_post_meta_array', 'schema' => array( - 'description' => __( 'Metrics', 'sportspress' ), + 'description' => esc_attr__( 'Metrics', 'sportspress' ), 'context' => array( 'view', 'edit' ), 'arg_options' => array( 'sanitize_callback' => 'rest_sanitize_request_arg', @@ -507,7 +507,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_data', 'update_callback' => 'SP_REST_API::update_post_meta_arrays_multi', 'schema' => array( - 'description' => __( 'Statistics', 'sportspress' ), + 'description' => esc_attr__( 'Statistics', 'sportspress' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'arg_options' => array( @@ -524,7 +524,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_meta_recursive', 'update_callback' => 'SP_REST_API::update_post_meta_recursive', 'schema' => array( - 'description' => __( 'Teams', 'sportspress' ), + 'description' => esc_attr__( 'Teams', 'sportspress' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'arg_options' => array( @@ -541,7 +541,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_meta_recursive', 'update_callback' => 'SP_REST_API::update_post_meta_recursive', 'schema' => array( - 'description' => __( 'Current Teams', 'sportspress' ), + 'description' => esc_attr__( 'Current Teams', 'sportspress' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'arg_options' => array( @@ -558,7 +558,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_meta_recursive', 'update_callback' => 'SP_REST_API::update_post_meta_recursive', 'schema' => array( - 'description' => __( 'Past Teams', 'sportspress' ), + 'description' => esc_attr__( 'Past Teams', 'sportspress' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'arg_options' => array( @@ -575,7 +575,7 @@ if ( ! class_exists( 'SP_REST_API' ) ) : 'get_callback' => 'SP_REST_API::get_post_data', 'update_callback' => 'SP_REST_API::update_post_meta_recursive', 'schema' => array( - 'description' => __( 'Nationalities', 'sportspress' ), + 'description' => esc_attr__( 'Nationalities', 'sportspress' ), 'type' => 'array', 'context' => array( 'view', 'embed' ), 'arg_options' => array( diff --git a/includes/class-sp-ajax.php b/includes/class-sp-ajax.php index ee233e48..91a66c5f 100644 --- a/includes/class-sp-ajax.php +++ b/includes/class-sp-ajax.php @@ -469,7 +469,7 @@ class SP_AJAX {

esc_html

diff --git a/includes/class-sp-countries.php b/includes/class-sp-countries.php index b053587a..59505719 100644 --- a/includes/class-sp-countries.php +++ b/includes/class-sp-countries.php @@ -277,235 +277,235 @@ class SP_Countries { $this->countries = apply_filters( 'sportspress_countries', array( - 'afg' => __( 'Afghanistan', 'sportspress' ), - 'aia' => __( 'Anguilla', 'sportspress' ), - 'alb' => __( 'Albania', 'sportspress' ), - 'alg' => __( 'Algeria', 'sportspress' ), - 'and' => __( 'Andorra', 'sportspress' ), - 'ang' => __( 'Angola', 'sportspress' ), - 'arg' => __( 'Argentina', 'sportspress' ), - 'arm' => __( 'Armenia', 'sportspress' ), - 'aru' => __( 'Aruba', 'sportspress' ), - 'asa' => __( 'American Samoa', 'sportspress' ), - 'atg' => __( 'Antigua and Barbuda', 'sportspress' ), - 'aus' => __( 'Australia', 'sportspress' ), - 'aut' => __( 'Austria', 'sportspress' ), - 'aze' => __( 'Azerbaijan', 'sportspress' ), - 'bah' => __( 'Bahamas', 'sportspress' ), - 'ban' => __( 'Bangladesh', 'sportspress' ), - 'bdi' => __( 'Burundi', 'sportspress' ), - 'bel' => __( 'Belgium', 'sportspress' ), - 'ben' => __( 'Benin', 'sportspress' ), - 'ber' => __( 'Bermuda', 'sportspress' ), - 'bfa' => __( 'Burkina Faso', 'sportspress' ), - 'bhr' => __( 'Bahrain', 'sportspress' ), - 'bhu' => __( 'Bhutan', 'sportspress' ), - 'bih' => __( 'Bosnia and Herzegovina', 'sportspress' ), - 'blr' => __( 'Belarus', 'sportspress' ), - 'blz' => __( 'Belize', 'sportspress' ), - 'bol' => __( 'Bolivia', 'sportspress' ), - 'bot' => __( 'Botswana', 'sportspress' ), - 'bra' => __( 'Brazil', 'sportspress' ), - 'brb' => __( 'Barbados', 'sportspress' ), - 'bru' => __( 'Brunei', 'sportspress' ), - 'bul' => __( 'Bulgaria', 'sportspress' ), - 'cam' => __( 'Cambodia', 'sportspress' ), - 'can' => __( 'Canada', 'sportspress' ), - 'cay' => __( 'Cayman Islands', 'sportspress' ), - 'cgo' => __( 'Republic of the Congo', 'sportspress' ), - 'cha' => __( 'Chad', 'sportspress' ), - 'chi' => __( 'Chile', 'sportspress' ), - 'chn' => __( 'China', 'sportspress' ), - 'civ' => __( 'Ivory Coast', 'sportspress' ), - 'cmr' => __( 'Cameroon', 'sportspress' ), - 'cod' => __( 'Democratic Republic of the Congo', 'sportspress' ), - 'cok' => __( 'Cook Islands', 'sportspress' ), - 'col' => __( 'Colombia', 'sportspress' ), - 'com' => __( 'Comoros', 'sportspress' ), - 'cpv' => __( 'Cape Verde', 'sportspress' ), - 'crc' => __( 'Costa Rica', 'sportspress' ), - 'cro' => __( 'Croatia', 'sportspress' ), - 'cta' => __( 'Central African Republic', 'sportspress' ), - 'cub' => __( 'Cuba', 'sportspress' ), - 'cuw' => __( 'Curacao', 'sportspress' ), - 'cyp' => __( 'Cyprus', 'sportspress' ), - 'cze' => __( 'Czechia', 'sportspress' ), - 'den' => __( 'Denmark', 'sportspress' ), - 'dji' => __( 'Djibouti', 'sportspress' ), - 'dma' => __( 'Dominica', 'sportspress' ), - 'dom' => __( 'Dominican Republic', 'sportspress' ), - 'ecu' => __( 'Ecuador', 'sportspress' ), - 'egy' => __( 'Egypt', 'sportspress' ), - 'eng' => __( 'England', 'sportspress' ), - 'eqg' => __( 'Equatorial Guinea', 'sportspress' ), - 'eri' => __( 'Eritrea', 'sportspress' ), - 'esh' => __( 'Western Sahara', 'sportspress' ), - 'esp' => __( 'Spain', 'sportspress' ), - 'est' => __( 'Estonia', 'sportspress' ), - 'eth' => __( 'Ethiopia', 'sportspress' ), - 'fij' => __( 'Fiji', 'sportspress' ), - 'fin' => __( 'Finland', 'sportspress' ), - 'fra' => __( 'France', 'sportspress' ), - 'fro' => __( 'Faroe Islands', 'sportspress' ), - 'guf' => __( 'French Guiana', 'sportspress' ), - 'pyf' => __( 'French Polynesia', 'sportspress' ), - 'fsm' => __( 'Micronesia', 'sportspress' ), - 'gab' => __( 'Gabon', 'sportspress' ), - 'gam' => __( 'Gambia', 'sportspress' ), - 'gbr' => __( 'United Kingdom', 'sportspress' ), - 'geo' => __( 'Georgia', 'sportspress' ), - 'ger' => __( 'Germany', 'sportspress' ), - 'gha' => __( 'Ghana', 'sportspress' ), - 'gib' => __( 'Gibraltar', 'sportspress' ), - 'glp' => __( 'Guadeloupe', 'sportspress' ), - 'gnb' => __( 'Guinea-Bissau', 'sportspress' ), - 'gre' => __( 'Greece', 'sportspress' ), - 'grl' => __( 'Greenland', 'sportspress' ), - 'grn' => __( 'Grenada', 'sportspress' ), - 'gua' => __( 'Guatemala', 'sportspress' ), - 'gui' => __( 'Guinea', 'sportspress' ), - 'gum' => __( 'Guam', 'sportspress' ), - 'guy' => __( 'Guyana', 'sportspress' ), - 'hai' => __( 'Haiti', 'sportspress' ), - 'hkg' => __( 'Hong Kong', 'sportspress' ), - 'hon' => __( 'Honduras', 'sportspress' ), - 'hun' => __( 'Hungary', 'sportspress' ), - 'idn' => __( 'Indonesia', 'sportspress' ), - 'ind' => __( 'India', 'sportspress' ), - 'irl' => __( 'Ireland', 'sportspress' ), - 'irn' => __( 'Iran', 'sportspress' ), - 'irq' => __( 'Iraq', 'sportspress' ), - 'isl' => __( 'Iceland', 'sportspress' ), - 'isr' => __( 'Israel', 'sportspress' ), - 'ita' => __( 'Italy', 'sportspress' ), - 'jam' => __( 'Jamaica', 'sportspress' ), - 'jor' => __( 'Jordan', 'sportspress' ), - 'jpn' => __( 'Japan', 'sportspress' ), - 'kaz' => __( 'Kazakhstan', 'sportspress' ), - 'ken' => __( 'Kenya', 'sportspress' ), - 'kos' => __( 'Kosovo', 'sportspress' ), - 'kgz' => __( 'Kyrgyzstan', 'sportspress' ), - 'kir' => __( 'Kiribati', 'sportspress' ), - 'mtq' => __( 'Martinique', 'sportspress' ), - 'kor' => __( 'South Korea', 'sportspress' ), - 'ksa' => __( 'Saudi Arabia', 'sportspress' ), - 'kuw' => __( 'Kuwait', 'sportspress' ), - 'lao' => __( 'Laos', 'sportspress' ), - 'lbr' => __( 'Liberia', 'sportspress' ), - 'lby' => __( 'Libya', 'sportspress' ), - 'lca' => __( 'Saint Lucia', 'sportspress' ), - 'les' => __( 'Lesotho', 'sportspress' ), - 'lib' => __( 'Lebanon', 'sportspress' ), - 'lie' => __( 'Liechtenstein', 'sportspress' ), - 'ltu' => __( 'Lithuania', 'sportspress' ), - 'lux' => __( 'Luxembourg', 'sportspress' ), - 'lva' => __( 'Latvia', 'sportspress' ), - 'mac' => __( 'Macau', 'sportspress' ), - 'mad' => __( 'Madagascar', 'sportspress' ), - 'mar' => __( 'Morocco', 'sportspress' ), - 'mas' => __( 'Malaysia', 'sportspress' ), - 'mco' => __( 'Monaco', 'sportspress' ), - 'mda' => __( 'Moldova', 'sportspress' ), - 'mdv' => __( 'Maldives', 'sportspress' ), - 'mex' => __( 'Mexico', 'sportspress' ), - 'mhl' => __( 'Marshall Islands', 'sportspress' ), - 'mkd' => __( 'North Macedonia', 'sportspress' ), - 'mli' => __( 'Mali', 'sportspress' ), - 'mlt' => __( 'Malta', 'sportspress' ), - 'mne' => __( 'Montenegro', 'sportspress' ), - 'mng' => __( 'Mongolia', 'sportspress' ), - 'moz' => __( 'Mozambique', 'sportspress' ), - 'mri' => __( 'Mauritius', 'sportspress' ), - 'msr' => __( 'Montserrat', 'sportspress' ), - 'mtn' => __( 'Mauritania', 'sportspress' ), - 'mwi' => __( 'Malawi', 'sportspress' ), - 'mya' => __( 'Myanmar', 'sportspress' ), - 'nam' => __( 'Namibia', 'sportspress' ), - 'nca' => __( 'Nicaragua', 'sportspress' ), - 'ncl' => __( 'New Caledonia', 'sportspress' ), - 'ned' => __( 'Netherlands', 'sportspress' ), - 'nep' => __( 'Nepal', 'sportspress' ), - 'nga' => __( 'Nigeria', 'sportspress' ), - 'nig' => __( 'Niger', 'sportspress' ), - 'nir' => __( 'Northern Ireland', 'sportspress' ), - 'nor' => __( 'Norway', 'sportspress' ), - 'nru' => __( 'Nauru', 'sportspress' ), - 'nzl' => __( 'New Zealand', 'sportspress' ), - 'oma' => __( 'Oman', 'sportspress' ), - 'pak' => __( 'Pakistan', 'sportspress' ), - 'pan' => __( 'Panama', 'sportspress' ), - 'par' => __( 'Paraguay', 'sportspress' ), - 'per' => __( 'Peru', 'sportspress' ), - 'phi' => __( 'Philippines', 'sportspress' ), - 'ple' => __( 'Palestine', 'sportspress' ), - 'plw' => __( 'Palau', 'sportspress' ), - 'png' => __( 'Papua New Guinea', 'sportspress' ), - 'pol' => __( 'Poland', 'sportspress' ), - 'por' => __( 'Portugal', 'sportspress' ), - 'prk' => __( 'North Korea', 'sportspress' ), - 'pur' => __( 'Puerto Rico', 'sportspress' ), - 'qat' => __( 'Qatar', 'sportspress' ), - 'rou' => __( 'Romania', 'sportspress' ), - 'rsa' => __( 'South Africa', 'sportspress' ), - 'reu' => __( 'Reunion', 'sportspress' ), - 'rus' => __( 'Russia', 'sportspress' ), - 'rwa' => __( 'Rwanda', 'sportspress' ), - 'sam' => __( 'Samoa', 'sportspress' ), - 'sco' => __( 'Scotland', 'sportspress' ), - 'sdn' => __( 'Sudan', 'sportspress' ), - 'sen' => __( 'Senegal', 'sportspress' ), - 'sey' => __( 'Seychelles', 'sportspress' ), - 'sin' => __( 'Singapore', 'sportspress' ), - 'skn' => __( 'Saint Kitts and Nevis', 'sportspress' ), - 'sle' => __( 'Sierra Leone', 'sportspress' ), - 'slv' => __( 'El Salvador', 'sportspress' ), - 'smr' => __( 'San Marino', 'sportspress' ), - 'sol' => __( 'Solomon Islands', 'sportspress' ), - 'som' => __( 'Somalia', 'sportspress' ), - 'srb' => __( 'Serbia', 'sportspress' ), - 'sri' => __( 'Sri Lanka', 'sportspress' ), - 'ssd' => __( 'South Sudan', 'sportspress' ), - 'stp' => __( 'Sao Tome and Principe', 'sportspress' ), - 'sui' => __( 'Switzerland', 'sportspress' ), - 'sur' => __( 'Suriname', 'sportspress' ), - 'svk' => __( 'Slovakia', 'sportspress' ), - 'svn' => __( 'Slovenia', 'sportspress' ), - 'swe' => __( 'Sweden', 'sportspress' ), - 'swz' => __( 'Eswatini', 'sportspress' ), - 'sxm' => __( 'Sint Maarten', 'sportspress' ), - 'syr' => __( 'Syria', 'sportspress' ), - 'tah' => __( 'Tahiti', 'sportspress' ), - 'tan' => __( 'Tanzania', 'sportspress' ), - 'tca' => __( 'Turks and Caicos Islands', 'sportspress' ), - 'tga' => __( 'Tonga', 'sportspress' ), - 'tha' => __( 'Thailand', 'sportspress' ), - 'tjk' => __( 'Tajikistan', 'sportspress' ), - 'tkm' => __( 'Turkmenistan', 'sportspress' ), - 'tls' => __( 'East Timor', 'sportspress' ), - 'tog' => __( 'Togo', 'sportspress' ), - 'tpe' => __( 'Taiwan', 'sportspress' ), - 'tri' => __( 'Trinidad and Tobago', 'sportspress' ), - 'tun' => __( 'Tunisia', 'sportspress' ), - 'tur' => __( 'Turkey', 'sportspress' ), - 'tuv' => __( 'Tuvalu', 'sportspress' ), - 'uae' => __( 'United Arab Emirates', 'sportspress' ), - 'uga' => __( 'Uganda', 'sportspress' ), - 'ukr' => __( 'Ukraine', 'sportspress' ), - 'uru' => __( 'Uruguay', 'sportspress' ), - 'usa' => __( 'United States', 'sportspress' ), - 'uzb' => __( 'Uzbekistan', 'sportspress' ), - 'van' => __( 'Vanuatu', 'sportspress' ), - 'vat' => __( 'Vatican City', 'sportspress' ), - 'ven' => __( 'Venezuela', 'sportspress' ), - 'vgb' => __( 'British Virgin Islands', 'sportspress' ), - 'vie' => __( 'Vietnam', 'sportspress' ), - 'vin' => __( 'Saint Vincent and the Grenadines', 'sportspress' ), - 'vir' => __( 'US Virgin Islands', 'sportspress' ), - 'wal' => __( 'Wales', 'sportspress' ), - 'wif' => __( 'West Indies', 'sportspress' ), - 'yem' => __( 'Yemen', 'sportspress' ), - 'zam' => __( 'Zambia', 'sportspress' ), - 'zim' => __( 'Zimbabwe', 'sportspress' ), + 'afg' => esc_attr__( 'Afghanistan', 'sportspress' ), + 'aia' => esc_attr__( 'Anguilla', 'sportspress' ), + 'alb' => esc_attr__( 'Albania', 'sportspress' ), + 'alg' => esc_attr__( 'Algeria', 'sportspress' ), + 'and' => esc_attr__( 'Andorra', 'sportspress' ), + 'ang' => esc_attr__( 'Angola', 'sportspress' ), + 'arg' => esc_attr__( 'Argentina', 'sportspress' ), + 'arm' => esc_attr__( 'Armenia', 'sportspress' ), + 'aru' => esc_attr__( 'Aruba', 'sportspress' ), + 'asa' => esc_attr__( 'American Samoa', 'sportspress' ), + 'atg' => esc_attr__( 'Antigua and Barbuda', 'sportspress' ), + 'aus' => esc_attr__( 'Australia', 'sportspress' ), + 'aut' => esc_attr__( 'Austria', 'sportspress' ), + 'aze' => esc_attr__( 'Azerbaijan', 'sportspress' ), + 'bah' => esc_attr__( 'Bahamas', 'sportspress' ), + 'ban' => esc_attr__( 'Bangladesh', 'sportspress' ), + 'bdi' => esc_attr__( 'Burundi', 'sportspress' ), + 'bel' => esc_attr__( 'Belgium', 'sportspress' ), + 'ben' => esc_attr__( 'Benin', 'sportspress' ), + 'ber' => esc_attr__( 'Bermuda', 'sportspress' ), + 'bfa' => esc_attr__( 'Burkina Faso', 'sportspress' ), + 'bhr' => esc_attr__( 'Bahrain', 'sportspress' ), + 'bhu' => esc_attr__( 'Bhutan', 'sportspress' ), + 'bih' => esc_attr__( 'Bosnia and Herzegovina', 'sportspress' ), + 'blr' => esc_attr__( 'Belarus', 'sportspress' ), + 'blz' => esc_attr__( 'Belize', 'sportspress' ), + 'bol' => esc_attr__( 'Bolivia', 'sportspress' ), + 'bot' => esc_attr__( 'Botswana', 'sportspress' ), + 'bra' => esc_attr__( 'Brazil', 'sportspress' ), + 'brb' => esc_attr__( 'Barbados', 'sportspress' ), + 'bru' => esc_attr__( 'Brunei', 'sportspress' ), + 'bul' => esc_attr__( 'Bulgaria', 'sportspress' ), + 'cam' => esc_attr__( 'Cambodia', 'sportspress' ), + 'can' => esc_attr__( 'Canada', 'sportspress' ), + 'cay' => esc_attr__( 'Cayman Islands', 'sportspress' ), + 'cgo' => esc_attr__( 'Republic of the Congo', 'sportspress' ), + 'cha' => esc_attr__( 'Chad', 'sportspress' ), + 'chi' => esc_attr__( 'Chile', 'sportspress' ), + 'chn' => esc_attr__( 'China', 'sportspress' ), + 'civ' => esc_attr__( 'Ivory Coast', 'sportspress' ), + 'cmr' => esc_attr__( 'Cameroon', 'sportspress' ), + 'cod' => esc_attr__( 'Democratic Republic of the Congo', 'sportspress' ), + 'cok' => esc_attr__( 'Cook Islands', 'sportspress' ), + 'col' => esc_attr__( 'Colombia', 'sportspress' ), + 'com' => esc_attr__( 'Comoros', 'sportspress' ), + 'cpv' => esc_attr__( 'Cape Verde', 'sportspress' ), + 'crc' => esc_attr__( 'Costa Rica', 'sportspress' ), + 'cro' => esc_attr__( 'Croatia', 'sportspress' ), + 'cta' => esc_attr__( 'Central African Republic', 'sportspress' ), + 'cub' => esc_attr__( 'Cuba', 'sportspress' ), + 'cuw' => esc_attr__( 'Curacao', 'sportspress' ), + 'cyp' => esc_attr__( 'Cyprus', 'sportspress' ), + 'cze' => esc_attr__( 'Czechia', 'sportspress' ), + 'den' => esc_attr__( 'Denmark', 'sportspress' ), + 'dji' => esc_attr__( 'Djibouti', 'sportspress' ), + 'dma' => esc_attr__( 'Dominica', 'sportspress' ), + 'dom' => esc_attr__( 'Dominican Republic', 'sportspress' ), + 'ecu' => esc_attr__( 'Ecuador', 'sportspress' ), + 'egy' => esc_attr__( 'Egypt', 'sportspress' ), + 'eng' => esc_attr__( 'England', 'sportspress' ), + 'eqg' => esc_attr__( 'Equatorial Guinea', 'sportspress' ), + 'eri' => esc_attr__( 'Eritrea', 'sportspress' ), + 'esh' => esc_attr__( 'Western Sahara', 'sportspress' ), + 'esp' => esc_attr__( 'Spain', 'sportspress' ), + 'est' => esc_attr__( 'Estonia', 'sportspress' ), + 'eth' => esc_attr__( 'Ethiopia', 'sportspress' ), + 'fij' => esc_attr__( 'Fiji', 'sportspress' ), + 'fin' => esc_attr__( 'Finland', 'sportspress' ), + 'fra' => esc_attr__( 'France', 'sportspress' ), + 'fro' => esc_attr__( 'Faroe Islands', 'sportspress' ), + 'guf' => esc_attr__( 'French Guiana', 'sportspress' ), + 'pyf' => esc_attr__( 'French Polynesia', 'sportspress' ), + 'fsm' => esc_attr__( 'Micronesia', 'sportspress' ), + 'gab' => esc_attr__( 'Gabon', 'sportspress' ), + 'gam' => esc_attr__( 'Gambia', 'sportspress' ), + 'gbr' => esc_attr__( 'United Kingdom', 'sportspress' ), + 'geo' => esc_attr__( 'Georgia', 'sportspress' ), + 'ger' => esc_attr__( 'Germany', 'sportspress' ), + 'gha' => esc_attr__( 'Ghana', 'sportspress' ), + 'gib' => esc_attr__( 'Gibraltar', 'sportspress' ), + 'glp' => esc_attr__( 'Guadeloupe', 'sportspress' ), + 'gnb' => esc_attr__( 'Guinea-Bissau', 'sportspress' ), + 'gre' => esc_attr__( 'Greece', 'sportspress' ), + 'grl' => esc_attr__( 'Greenland', 'sportspress' ), + 'grn' => esc_attr__( 'Grenada', 'sportspress' ), + 'gua' => esc_attr__( 'Guatemala', 'sportspress' ), + 'gui' => esc_attr__( 'Guinea', 'sportspress' ), + 'gum' => esc_attr__( 'Guam', 'sportspress' ), + 'guy' => esc_attr__( 'Guyana', 'sportspress' ), + 'hai' => esc_attr__( 'Haiti', 'sportspress' ), + 'hkg' => esc_attr__( 'Hong Kong', 'sportspress' ), + 'hon' => esc_attr__( 'Honduras', 'sportspress' ), + 'hun' => esc_attr__( 'Hungary', 'sportspress' ), + 'idn' => esc_attr__( 'Indonesia', 'sportspress' ), + 'ind' => esc_attr__( 'India', 'sportspress' ), + 'irl' => esc_attr__( 'Ireland', 'sportspress' ), + 'irn' => esc_attr__( 'Iran', 'sportspress' ), + 'irq' => esc_attr__( 'Iraq', 'sportspress' ), + 'isl' => esc_attr__( 'Iceland', 'sportspress' ), + 'isr' => esc_attr__( 'Israel', 'sportspress' ), + 'ita' => esc_attr__( 'Italy', 'sportspress' ), + 'jam' => esc_attr__( 'Jamaica', 'sportspress' ), + 'jor' => esc_attr__( 'Jordan', 'sportspress' ), + 'jpn' => esc_attr__( 'Japan', 'sportspress' ), + 'kaz' => esc_attr__( 'Kazakhstan', 'sportspress' ), + 'ken' => esc_attr__( 'Kenya', 'sportspress' ), + 'kos' => esc_attr__( 'Kosovo', 'sportspress' ), + 'kgz' => esc_attr__( 'Kyrgyzstan', 'sportspress' ), + 'kir' => esc_attr__( 'Kiribati', 'sportspress' ), + 'mtq' => esc_attr__( 'Martinique', 'sportspress' ), + 'kor' => esc_attr__( 'South Korea', 'sportspress' ), + 'ksa' => esc_attr__( 'Saudi Arabia', 'sportspress' ), + 'kuw' => esc_attr__( 'Kuwait', 'sportspress' ), + 'lao' => esc_attr__( 'Laos', 'sportspress' ), + 'lbr' => esc_attr__( 'Liberia', 'sportspress' ), + 'lby' => esc_attr__( 'Libya', 'sportspress' ), + 'lca' => esc_attr__( 'Saint Lucia', 'sportspress' ), + 'les' => esc_attr__( 'Lesotho', 'sportspress' ), + 'lib' => esc_attr__( 'Lebanon', 'sportspress' ), + 'lie' => esc_attr__( 'Liechtenstein', 'sportspress' ), + 'ltu' => esc_attr__( 'Lithuania', 'sportspress' ), + 'lux' => esc_attr__( 'Luxembourg', 'sportspress' ), + 'lva' => esc_attr__( 'Latvia', 'sportspress' ), + 'mac' => esc_attr__( 'Macau', 'sportspress' ), + 'mad' => esc_attr__( 'Madagascar', 'sportspress' ), + 'mar' => esc_attr__( 'Morocco', 'sportspress' ), + 'mas' => esc_attr__( 'Malaysia', 'sportspress' ), + 'mco' => esc_attr__( 'Monaco', 'sportspress' ), + 'mda' => esc_attr__( 'Moldova', 'sportspress' ), + 'mdv' => esc_attr__( 'Maldives', 'sportspress' ), + 'mex' => esc_attr__( 'Mexico', 'sportspress' ), + 'mhl' => esc_attr__( 'Marshall Islands', 'sportspress' ), + 'mkd' => esc_attr__( 'North Macedonia', 'sportspress' ), + 'mli' => esc_attr__( 'Mali', 'sportspress' ), + 'mlt' => esc_attr__( 'Malta', 'sportspress' ), + 'mne' => esc_attr__( 'Montenegro', 'sportspress' ), + 'mng' => esc_attr__( 'Mongolia', 'sportspress' ), + 'moz' => esc_attr__( 'Mozambique', 'sportspress' ), + 'mri' => esc_attr__( 'Mauritius', 'sportspress' ), + 'msr' => esc_attr__( 'Montserrat', 'sportspress' ), + 'mtn' => esc_attr__( 'Mauritania', 'sportspress' ), + 'mwi' => esc_attr__( 'Malawi', 'sportspress' ), + 'mya' => esc_attr__( 'Myanmar', 'sportspress' ), + 'nam' => esc_attr__( 'Namibia', 'sportspress' ), + 'nca' => esc_attr__( 'Nicaragua', 'sportspress' ), + 'ncl' => esc_attr__( 'New Caledonia', 'sportspress' ), + 'ned' => esc_attr__( 'Netherlands', 'sportspress' ), + 'nep' => esc_attr__( 'Nepal', 'sportspress' ), + 'nga' => esc_attr__( 'Nigeria', 'sportspress' ), + 'nig' => esc_attr__( 'Niger', 'sportspress' ), + 'nir' => esc_attr__( 'Northern Ireland', 'sportspress' ), + 'nor' => esc_attr__( 'Norway', 'sportspress' ), + 'nru' => esc_attr__( 'Nauru', 'sportspress' ), + 'nzl' => esc_attr__( 'New Zealand', 'sportspress' ), + 'oma' => esc_attr__( 'Oman', 'sportspress' ), + 'pak' => esc_attr__( 'Pakistan', 'sportspress' ), + 'pan' => esc_attr__( 'Panama', 'sportspress' ), + 'par' => esc_attr__( 'Paraguay', 'sportspress' ), + 'per' => esc_attr__( 'Peru', 'sportspress' ), + 'phi' => esc_attr__( 'Philippines', 'sportspress' ), + 'ple' => esc_attr__( 'Palestine', 'sportspress' ), + 'plw' => esc_attr__( 'Palau', 'sportspress' ), + 'png' => esc_attr__( 'Papua New Guinea', 'sportspress' ), + 'pol' => esc_attr__( 'Poland', 'sportspress' ), + 'por' => esc_attr__( 'Portugal', 'sportspress' ), + 'prk' => esc_attr__( 'North Korea', 'sportspress' ), + 'pur' => esc_attr__( 'Puerto Rico', 'sportspress' ), + 'qat' => esc_attr__( 'Qatar', 'sportspress' ), + 'rou' => esc_attr__( 'Romania', 'sportspress' ), + 'rsa' => esc_attr__( 'South Africa', 'sportspress' ), + 'reu' => esc_attr__( 'Reunion', 'sportspress' ), + 'rus' => esc_attr__( 'Russia', 'sportspress' ), + 'rwa' => esc_attr__( 'Rwanda', 'sportspress' ), + 'sam' => esc_attr__( 'Samoa', 'sportspress' ), + 'sco' => esc_attr__( 'Scotland', 'sportspress' ), + 'sdn' => esc_attr__( 'Sudan', 'sportspress' ), + 'sen' => esc_attr__( 'Senegal', 'sportspress' ), + 'sey' => esc_attr__( 'Seychelles', 'sportspress' ), + 'sin' => esc_attr__( 'Singapore', 'sportspress' ), + 'skn' => esc_attr__( 'Saint Kitts and Nevis', 'sportspress' ), + 'sle' => esc_attr__( 'Sierra Leone', 'sportspress' ), + 'slv' => esc_attr__( 'El Salvador', 'sportspress' ), + 'smr' => esc_attr__( 'San Marino', 'sportspress' ), + 'sol' => esc_attr__( 'Solomon Islands', 'sportspress' ), + 'som' => esc_attr__( 'Somalia', 'sportspress' ), + 'srb' => esc_attr__( 'Serbia', 'sportspress' ), + 'sri' => esc_attr__( 'Sri Lanka', 'sportspress' ), + 'ssd' => esc_attr__( 'South Sudan', 'sportspress' ), + 'stp' => esc_attr__( 'Sao Tome and Principe', 'sportspress' ), + 'sui' => esc_attr__( 'Switzerland', 'sportspress' ), + 'sur' => esc_attr__( 'Suriname', 'sportspress' ), + 'svk' => esc_attr__( 'Slovakia', 'sportspress' ), + 'svn' => esc_attr__( 'Slovenia', 'sportspress' ), + 'swe' => esc_attr__( 'Sweden', 'sportspress' ), + 'swz' => esc_attr__( 'Eswatini', 'sportspress' ), + 'sxm' => esc_attr__( 'Sint Maarten', 'sportspress' ), + 'syr' => esc_attr__( 'Syria', 'sportspress' ), + 'tah' => esc_attr__( 'Tahiti', 'sportspress' ), + 'tan' => esc_attr__( 'Tanzania', 'sportspress' ), + 'tca' => esc_attr__( 'Turks and Caicos Islands', 'sportspress' ), + 'tga' => esc_attr__( 'Tonga', 'sportspress' ), + 'tha' => esc_attr__( 'Thailand', 'sportspress' ), + 'tjk' => esc_attr__( 'Tajikistan', 'sportspress' ), + 'tkm' => esc_attr__( 'Turkmenistan', 'sportspress' ), + 'tls' => esc_attr__( 'East Timor', 'sportspress' ), + 'tog' => esc_attr__( 'Togo', 'sportspress' ), + 'tpe' => esc_attr__( 'Taiwan', 'sportspress' ), + 'tri' => esc_attr__( 'Trinidad and Tobago', 'sportspress' ), + 'tun' => esc_attr__( 'Tunisia', 'sportspress' ), + 'tur' => esc_attr__( 'Turkey', 'sportspress' ), + 'tuv' => esc_attr__( 'Tuvalu', 'sportspress' ), + 'uae' => esc_attr__( 'United Arab Emirates', 'sportspress' ), + 'uga' => esc_attr__( 'Uganda', 'sportspress' ), + 'ukr' => esc_attr__( 'Ukraine', 'sportspress' ), + 'uru' => esc_attr__( 'Uruguay', 'sportspress' ), + 'usa' => esc_attr__( 'United States', 'sportspress' ), + 'uzb' => esc_attr__( 'Uzbekistan', 'sportspress' ), + 'van' => esc_attr__( 'Vanuatu', 'sportspress' ), + 'vat' => esc_attr__( 'Vatican City', 'sportspress' ), + 'ven' => esc_attr__( 'Venezuela', 'sportspress' ), + 'vgb' => esc_attr__( 'British Virgin Islands', 'sportspress' ), + 'vie' => esc_attr__( 'Vietnam', 'sportspress' ), + 'vin' => esc_attr__( 'Saint Vincent and the Grenadines', 'sportspress' ), + 'vir' => esc_attr__( 'US Virgin Islands', 'sportspress' ), + 'wal' => esc_attr__( 'Wales', 'sportspress' ), + 'wif' => esc_attr__( 'West Indies', 'sportspress' ), + 'yem' => esc_attr__( 'Yemen', 'sportspress' ), + 'zam' => esc_attr__( 'Zambia', 'sportspress' ), + 'zim' => esc_attr__( 'Zimbabwe', 'sportspress' ), ) ); diff --git a/includes/class-sp-event.php b/includes/class-sp-event.php index 49362309..4db7303d 100644 --- a/includes/class-sp-event.php +++ b/includes/class-sp-event.php @@ -66,7 +66,7 @@ class SP_Event extends SP_Custom_Post { return array( $columns, $usecolumns, $data ); else : // Add outcome to result columns - $columns['outcome'] = __( 'Outcome', 'sportspress' ); + $columns['outcome'] = esc_attr__( 'Outcome', 'sportspress' ); if ( is_array( $usecolumns ) ) : if ( 'manual' == get_option( 'sportspress_event_result_columns', 'auto' ) ) : foreach ( $columns as $key => $label ) : @@ -87,7 +87,7 @@ class SP_Event extends SP_Custom_Post { endif; if ( 'yes' == get_option( 'sportspress_event_show_outcome', 'no' ) ) : - $columns['outcome'] = __( 'Outcome', 'sportspress' ); + $columns['outcome'] = esc_attr__( 'Outcome', 'sportspress' ); endif; endif; $data[0] = $columns; @@ -179,7 +179,7 @@ class SP_Event extends SP_Custom_Post { else : // Add position to performance labels if ( taxonomy_exists( 'sp_position' ) ) : - $labels = array_merge( array( 'position' => __( 'Position', 'sportspress' ) ), $labels ); + $labels = array_merge( array( 'position' => esc_attr__( 'Position', 'sportspress' ) ), $labels ); endif; if ( 'manual' == get_option( 'sportspress_event_performance_columns', 'auto' ) && is_array( $columns ) ) : foreach ( $labels as $key => $label ) : @@ -457,7 +457,7 @@ class SP_Event extends SP_Custom_Post { $stats[ $index ]['label'] = $name; $stats[ $index ]['icon'] = sp_get_logo( $details['team'] ); } elseif ( 'sub' === $details['key'] ) { - $sub_name = sp_array_value( $player_names, $details['sub'], __( 'Substitute', 'sportspress' ) ); + $sub_name = sp_array_value( $player_names, $details['sub'], esc_attr__( 'Substitute', 'sportspress' ) ); $sub_number = sp_array_value( $player_numbers, $details['sub'] ); if ( '' !== $sub_number ) { @@ -468,7 +468,7 @@ class SP_Event extends SP_Custom_Post { $stats[ $index ]['sub_name'] = $sub_name; $stats[ $index ]['sub_number'] = $sub_number; - $stats[ $index ]['label'] = __( 'Substitute', 'sportspress' ); + $stats[ $index ]['label'] = esc_attr__( 'Substitute', 'sportspress' ); $stats[ $index ]['icon'] = ''; } else { $stats[ $index ]['label'] = sp_array_value( $performance_labels, $details['key'] ); diff --git a/includes/class-sp-feeds.php b/includes/class-sp-feeds.php index 0e2b7f5b..b628c300 100644 --- a/includes/class-sp-feeds.php +++ b/includes/class-sp-feeds.php @@ -24,15 +24,15 @@ class SP_Feeds { 'calendar' => array( 'ical' => array( 'apple' => array( - 'name' => __( 'Apple Calendar', 'sportspress' ), + 'name' => esc_attr__( 'Apple Calendar', 'sportspress' ), 'protocol' => 'webcal', ), 'outlook' => array( - 'name' => __( 'Outlook', 'sportspress' ), + 'name' => esc_attr__( 'Outlook', 'sportspress' ), 'protocol' => 'webcal', ), 'google' => array( - 'name' => __( 'Google', 'sportspress' ), + 'name' => esc_attr__( 'Google', 'sportspress' ), 'protocol' => 'webcal', 'prefix' => 'http://www.google.com/calendar/render?cid=', ), diff --git a/includes/class-sp-formats.php b/includes/class-sp-formats.php index 9cbc21b8..b649f5ee 100644 --- a/includes/class-sp-formats.php +++ b/includes/class-sp-formats.php @@ -26,21 +26,21 @@ class SP_Formats { 'sportspress_formats', array( 'event' => array( - 'league' => __( 'Competitive', 'sportspress' ), - 'friendly' => __( 'Friendly', 'sportspress' ), + 'league' => esc_attr__( 'Competitive', 'sportspress' ), + 'friendly' => esc_attr__( 'Friendly', 'sportspress' ), ), 'calendar' => array( - 'calendar' => __( 'Calendar', 'sportspress' ), - 'list' => __( 'List', 'sportspress' ), - 'blocks' => __( 'Blocks', 'sportspress' ), + 'calendar' => esc_attr__( 'Calendar', 'sportspress' ), + 'list' => esc_attr__( 'List', 'sportspress' ), + 'blocks' => esc_attr__( 'Blocks', 'sportspress' ), ), 'table' => array( - 'standings' => __( 'Standings', 'sportspress' ), - 'gallery' => __( 'Gallery', 'sportspress' ), + 'standings' => esc_attr__( 'Standings', 'sportspress' ), + 'gallery' => esc_attr__( 'Gallery', 'sportspress' ), ), 'list' => array( - 'list' => __( 'List', 'sportspress' ), - 'gallery' => __( 'Gallery', 'sportspress' ), + 'list' => esc_attr__( 'List', 'sportspress' ), + 'gallery' => esc_attr__( 'Gallery', 'sportspress' ), ), ) ); diff --git a/includes/class-sp-frontend-scripts.php b/includes/class-sp-frontend-scripts.php index cd9c7460..facd58c6 100644 --- a/includes/class-sp-frontend-scripts.php +++ b/includes/class-sp-frontend-scripts.php @@ -84,12 +84,12 @@ class SP_Frontend_Scripts { 'sportspress', 'localized_strings', array( - 'days' => __( 'days', 'sportspress' ), - 'hrs' => __( 'hrs', 'sportspress' ), - 'mins' => __( 'mins', 'sportspress' ), - 'secs' => __( 'secs', 'sportspress' ), - 'previous' => __( 'Previous', 'sportspress' ), - 'next' => __( + 'days' => esc_attr__( 'days', 'sportspress' ), + 'hrs' => esc_attr__( 'hrs', 'sportspress' ), + 'mins' => esc_attr__( 'mins', 'sportspress' ), + 'secs' => esc_attr__( 'secs', 'sportspress' ), + 'previous' => esc_attr__( 'Previous', 'sportspress' ), + 'next' => esc_attr__( 'Next', 'sportspress' ), @@ -198,46 +198,46 @@ class SP_Frontend_Scripts { echo '.sp-event-calendar tbody td a,.sp-event-calendar tbody td a:hover{background: none;}'; if ( isset( $colors['primary'] ) ) { - echo '.sp-data-table th,.sp-calendar th,.sp-data-table tfoot,.sp-calendar tfoot,.sp-button,.sp-heading{background:' . $colors['primary'] . ' !important}.sp-calendar tbody a{color:' . $colors['primary'] . ' !important}'; + echo '.sp-data-table th,.sp-calendar th,.sp-data-table tfoot,.sp-calendar tfoot,.sp-button,.sp-heading{background:' . esc_attr( $colors['primary'] ) . ' !important}.sp-calendar tbody a{color:' . esc_attr( $colors['primary'] ) . ' !important}'; } if ( isset( $colors['background'] ) ) { - echo '.sp-data-table tbody,.sp-calendar tbody{background: ' . $colors['background'] . ' !important}'; + echo '.sp-data-table tbody,.sp-calendar tbody{background: ' . esc_attr( $colors['background'] ) . ' !important}'; } if ( isset( $colors['text'] ) ) { - echo '.sp-data-table tbody,.sp-calendar tbody{color: ' . $colors['text'] . ' !important}'; + echo '.sp-data-table tbody,.sp-calendar tbody{color: ' . esc_attr( $colors['text'] ) . ' !important}'; } if ( isset( $colors['heading'] ) ) { - echo '.sp-data-table th,.sp-data-table th a,.sp-data-table tfoot,.sp-data-table tfoot a,.sp-calendar th,.sp-calendar th a,.sp-calendar tfoot,.sp-calendar tfoot a,.sp-button,.sp-heading{color: ' . $colors['heading'] . ' !important}'; + echo '.sp-data-table th,.sp-data-table th a,.sp-data-table tfoot,.sp-data-table tfoot a,.sp-calendar th,.sp-calendar th a,.sp-calendar tfoot,.sp-calendar tfoot a,.sp-button,.sp-heading{color: ' . esc_attr( $colors['heading'] ) . ' !important}'; } if ( isset( $colors['link'] ) ) { - echo '.sp-data-table tbody a,.sp-data-table tbody a:hover,.sp-calendar tbody a:focus{color: ' . $colors['link'] . ' !important}'; + echo '.sp-data-table tbody a,.sp-data-table tbody a:hover,.sp-calendar tbody a:focus{color: ' . esc_attr( $colors['link'] ) . ' !important}'; } if ( isset( $colors['highlight'] ) ) { - echo '.sp-highlight,.sp-calendar td#today{background: ' . $colors['highlight'] . ' !important}'; + echo '.sp-highlight,.sp-calendar td#today{background: ' . esc_attr( $colors['highlight'] ) . ' !important}'; } do_action( 'sportspress_frontend_css', $colors ); } if ( $align != 'default' ) { - echo '.sp-data-table th,.sp-data-table td{text-align: ' . $align . ' !important}'; + echo '.sp-data-table th,.sp-data-table td{text-align: ' . esc_attr( $align ) . ' !important}'; } if ( $padding != null ) { - echo '.sp-data-table th,.sp-data-table td{padding: ' . $padding . 'px !important}'; + echo '.sp-data-table th,.sp-data-table td{padding: ' . esc_attr( $padding ) . 'px !important}'; } if ( $offset != 0 ) { - echo ' @media only screen and (min-width: 40.063em) {.sp-header{top: ' . $offset . 'px}}'; + echo ' @media only screen and (min-width: 40.063em) {.sp-header{top: ' . esc_attr( $offset ) . 'px}}'; } if ( ! empty( $custom ) ) { - echo ' /* SportsPress Custom CSS */ ' . $custom; + echo ' /* SportsPress Custom CSS */ ' . wp_kses_post( $custom ); } echo ''; diff --git a/includes/class-sp-install.php b/includes/class-sp-install.php index 5fe9098b..42980bc1 100644 --- a/includes/class-sp-install.php +++ b/includes/class-sp-install.php @@ -599,7 +599,7 @@ if ( ! class_exists( 'SP_Install' ) ) : if ( preg_match( $regexp, $response['body'], $matches ) ) { $changelog = (array) preg_split( '~[\r\n]+~', trim( $matches[2] ) ); - _e( 'What\'s new:', 'sportspress' ) . '

'; + esc_attr_e( 'What\'s new:', 'sportspress' ) . '
'; $ul = false; diff --git a/includes/class-sp-league-table.php b/includes/class-sp-league-table.php index 32842803..8c23fd86 100644 --- a/includes/class-sp-league-table.php +++ b/includes/class-sp-league-table.php @@ -849,8 +849,8 @@ endif; } $labels = array_merge( array( - 'pos' => __( 'Pos', 'sportspress' ), - 'name' => __( + 'pos' => esc_attr__( 'Pos', 'sportspress' ), + 'name' => esc_attr__( 'Team', 'sportspress' ), diff --git a/includes/class-sp-modules.php b/includes/class-sp-modules.php index f75c80f0..9399a299 100644 --- a/includes/class-sp-modules.php +++ b/includes/class-sp-modules.php @@ -27,167 +27,167 @@ class SP_Modules { array( 'event' => array( 'calendars' => array( - 'label' => __( 'Calendars', 'sportspress' ), + 'label' => esc_attr__( 'Calendars', 'sportspress' ), 'icon' => 'sp-icon-calendar', - 'desc' => __( 'Organize and publish calendars using different layouts.', 'sportspress' ), + 'desc' => esc_attr__( 'Organize and publish calendars using different layouts.', 'sportspress' ), ), 'results_matrix' => array( - 'label' => __( 'Results Matrix', 'sportspress' ), + 'label' => esc_attr__( 'Results Matrix', 'sportspress' ), 'class' => 'SportsPress_Results_Matrix', 'icon' => 'sp-icon-matrix', 'link' => 'https://www.themeboy.com/sportspress-extensions/results-matrix/', - 'desc' => __( 'Display fixtures and results between teams in a grid layout.', 'sportspress' ), + 'desc' => esc_attr__( 'Display fixtures and results between teams in a grid layout.', 'sportspress' ), ), 'scoreboard' => array( - 'label' => __( 'Scoreboard', 'sportspress' ), + 'label' => esc_attr__( 'Scoreboard', 'sportspress' ), 'class' => 'SportsPress_Scoreboard', 'icon' => 'sp-icon-scoreboard', 'link' => 'https://www.themeboy.com/sportspress-extensions/scoreboard/', - 'desc' => __( 'Display multiple event results in a horizontal scoreboard.', 'sportspress' ), + 'desc' => esc_attr__( 'Display multiple event results in a horizontal scoreboard.', 'sportspress' ), ), 'google_maps' => array( - 'label' => __( 'Google Maps', 'sportspress' ), + 'label' => esc_attr__( 'Google Maps', 'sportspress' ), 'class' => 'SportsPress_Google_Maps', 'icon' => 'sp-icon-location', 'link' => 'https://www.themeboy.com/sportspress-extensions/google-maps/', - 'desc' => __( 'Use Google Maps instead of OpenStreetMap for venues.', 'sportspress' ), + 'desc' => esc_attr__( 'Use Google Maps instead of OpenStreetMap for venues.', 'sportspress' ), ), 'user_scores' => array( - 'label' => __( 'User Scores', 'sportspress' ), + 'label' => esc_attr__( 'User Scores', 'sportspress' ), 'class' => 'SportsPress_User_Scores', 'icon' => 'sp-icon-user-scores', 'link' => 'https://www.themeboy.com/sportspress-extensions/user-scores/', - 'desc' => __( 'Let players, staff, and visitors submit event scores for review.', 'sportspress' ), + 'desc' => esc_attr__( 'Let players, staff, and visitors submit event scores for review.', 'sportspress' ), ), 'match_stats' => array( - 'label' => __( 'Match Stats', 'sportspress' ), + 'label' => esc_attr__( 'Match Stats', 'sportspress' ), 'class' => 'SportsPress_Match_Stats', 'icon' => 'sp-icon-statistics', 'link' => 'https://www.themeboy.com/sportspress-extensions/match-stats/', - 'desc' => __( 'Display head-to-head team comparison charts in events.', 'sportspress' ), + 'desc' => esc_attr__( 'Display head-to-head team comparison charts in events.', 'sportspress' ), ), 'past_meetings' => array( - 'label' => __( 'Past Meetings', 'sportspress' ), + 'label' => esc_attr__( 'Past Meetings', 'sportspress' ), 'class' => 'SportsPress_Past_Meetings', 'icon' => 'sp-icon-history', 'link' => 'https://www.themeboy.com/sportspress-extensions/past-meetings/', - 'desc' => __( 'Display previous events between teams in list or blocks layout.', 'sportspress' ), + 'desc' => esc_attr__( 'Display previous events between teams in list or blocks layout.', 'sportspress' ), ), 'timelines' => array( - 'label' => __( 'Timelines', 'sportspress' ), + 'label' => esc_attr__( 'Timelines', 'sportspress' ), 'class' => 'SportsPress_Timelines', 'icon' => 'sp-icon-timeline', 'link' => 'https://www.themeboy.com/sportspress-extensions/timelines/', - 'desc' => __( 'Display a visual timeline of player performance in events.', 'sportspress' ), + 'desc' => esc_attr__( 'Display a visual timeline of player performance in events.', 'sportspress' ), ), 'tournaments' => array( - 'label' => __( 'Tournaments', 'sportspress' ), + 'label' => esc_attr__( 'Tournaments', 'sportspress' ), 'class' => 'SportsPress_Tournaments', 'icon' => 'sp-icon-tournament', 'link' => 'https://www.themeboy.com/sportspress-extensions/tournaments/', - 'desc' => __( 'Schedule tournaments and create interactive playoff brackets.', 'sportspress' ), + 'desc' => esc_attr__( 'Schedule tournaments and create interactive playoff brackets.', 'sportspress' ), ), ), 'team' => array( 'league_tables' => array( - 'label' => __( 'League Tables', 'sportspress' ), + 'label' => esc_attr__( 'League Tables', 'sportspress' ), 'icon' => 'sp-icon-chart', - 'desc' => __( 'Create automated league tables to keep track of team standings.', 'sportspress' ), + 'desc' => esc_attr__( 'Create automated league tables to keep track of team standings.', 'sportspress' ), ), 'league_menu' => array( - 'label' => __( 'League Menu', 'sportspress' ), + 'label' => esc_attr__( 'League Menu', 'sportspress' ), 'class' => 'SportsPress_League_Menu', 'icon' => 'sp-icon-menu', 'link' => 'https://www.themeboy.com/sportspress-extensions/league-menu/', - 'desc' => __( 'Add a global navigation bar to display logos that link to each team.', 'sportspress' ), + 'desc' => esc_attr__( 'Add a global navigation bar to display logos that link to each team.', 'sportspress' ), ), 'team_colors' => array( - 'label' => __( 'Team Colors', 'sportspress' ), + 'label' => esc_attr__( 'Team Colors', 'sportspress' ), 'class' => 'SportsPress_Team_Colors', 'icon' => 'sp-icon-color', 'link' => 'https://www.themeboy.com/sportspress-extensions/team-colors/', - 'desc' => __( 'Create a custom color palette for each team.', 'sportspress' ), + 'desc' => esc_attr__( 'Create a custom color palette for each team.', 'sportspress' ), ), 'team_access' => array( - 'label' => __( 'Team Access', 'sportspress' ), + 'label' => esc_attr__( 'Team Access', 'sportspress' ), 'class' => 'SportsPress_Team_Access', 'icon' => 'sp-icon-key', 'link' => 'https://www.themeboy.com/sportspress-extensions/team-access/', - 'desc' => __( 'Limit user access to data that is related to their team.', 'sportspress' ), + 'desc' => esc_attr__( 'Limit user access to data that is related to their team.', 'sportspress' ), ), ), 'player_staff' => array( 'player_lists' => array( - 'label' => __( 'Player Lists', 'sportspress' ), + 'label' => esc_attr__( 'Player Lists', 'sportspress' ), 'icon' => 'sp-icon-list', - 'desc' => __( 'Create team rosters, player galleries, and ranking charts.', 'sportspress' ), + 'desc' => esc_attr__( 'Create team rosters, player galleries, and ranking charts.', 'sportspress' ), ), 'midseason_transfers' => array( - 'label' => __( 'Midseason Transfers', 'sportspress' ), + 'label' => esc_attr__( 'Midseason Transfers', 'sportspress' ), 'class' => 'SportsPress_Midseason_Transfers', 'icon' => 'sp-icon-sub', 'link' => 'https://www.themeboy.com/sportspress-extensions/midseason-transfers/', - 'desc' => __( 'Statistics for players who transferred between teams during a season.', 'sportspress' ), + 'desc' => esc_attr__( 'Statistics for players who transferred between teams during a season.', 'sportspress' ), 'default' => 'yes', ), 'staff_directories' => array( - 'label' => __( 'Directories', 'sportspress' ), + 'label' => esc_attr__( 'Directories', 'sportspress' ), 'class' => 'SportsPress_Staff_Directories', 'icon' => 'sp-icon-archive', 'link' => 'https://www.themeboy.com/sportspress-extensions/directories/', - 'desc' => __( 'Organize and display staff in list and gallery layouts.', 'sportspress' ), + 'desc' => esc_attr__( 'Organize and display staff in list and gallery layouts.', 'sportspress' ), ), 'officials' => array( - 'label' => __( 'Officials', 'sportspress' ), + 'label' => esc_attr__( 'Officials', 'sportspress' ), 'icon' => 'sp-icon-whistle', - 'desc' => __( 'Manage referees, umpires, judges, timekeepers, and other officials.', 'sportspress' ), + 'desc' => esc_attr__( 'Manage referees, umpires, judges, timekeepers, and other officials.', 'sportspress' ), 'default' => 'no', ), ), 'admin' => array( 'tutorials' => array( - 'label' => __( 'Tutorials', 'sportspress' ), + 'label' => esc_attr__( 'Tutorials', 'sportspress' ), 'icon' => 'dashicons dashicons-video-alt3', - 'desc' => __( 'Display a dashboard page with SportsPress video tutorials.', 'sportspress' ), + 'desc' => esc_attr__( 'Display a dashboard page with SportsPress video tutorials.', 'sportspress' ), ), 'branding' => array( - 'label' => __( 'Branding', 'sportspress' ), + 'label' => esc_attr__( 'Branding', 'sportspress' ), 'class' => 'SportsPress_Branding', 'icon' => 'sp-icon-sportspress', 'link' => 'https://www.themeboy.com/sportspress-extensions/branding/', - 'desc' => __( 'Instantly rebrand the dashboard with your own logo and colors.', 'sportspress' ), + 'desc' => esc_attr__( 'Instantly rebrand the dashboard with your own logo and colors.', 'sportspress' ), ), 'duplicator' => array( - 'label' => __( 'Duplicator', 'sportspress' ), + 'label' => esc_attr__( 'Duplicator', 'sportspress' ), 'class' => 'SportsPress_Duplicator', 'icon' => 'sp-icon-copy', 'link' => 'https://www.themeboy.com/sportspress-extensions/duplicator/', - 'desc' => __( 'Clone anything with just one click. Great for creating multiple events.', 'sportspress' ), + 'desc' => esc_attr__( 'Clone anything with just one click. Great for creating multiple events.', 'sportspress' ), ), ), 'other' => array( 'twitter' => array( - 'label' => __( 'Twitter', 'sportspress' ), + 'label' => esc_attr__( 'Twitter', 'sportspress' ), 'class' => 'SportsPress_Twitter', 'icon' => 'dashicons dashicons-twitter', 'link' => 'https://www.themeboy.com/sportspress-extensions/twitter/', - 'desc' => __( 'Add a Twitter feed to team, player, and staff pages.', 'sportspress' ), - 'tip' => __( 'Free', 'sportspress' ), + 'desc' => esc_attr__( 'Add a Twitter feed to team, player, and staff pages.', 'sportspress' ), + 'tip' => esc_attr__( 'Free', 'sportspress' ), ), 'facebook' => array( - 'label' => __( 'Facebook', 'sportspress' ), + 'label' => esc_attr__( 'Facebook', 'sportspress' ), 'class' => 'SportsPress_Facebook', 'icon' => 'dashicons dashicons-facebook', 'link' => 'https://www.themeboy.com/sportspress-extensions/facebook/', - 'desc' => __( 'Add a Facebook Page widget to embed and promote each team.', 'sportspress' ), - 'tip' => __( 'Free', 'sportspress' ), + 'desc' => esc_attr__( 'Add a Facebook Page widget to embed and promote each team.', 'sportspress' ), + 'tip' => esc_attr__( 'Free', 'sportspress' ), ), 'sponsors' => array( - 'label' => __( 'Sponsors', 'sportspress' ), + 'label' => esc_attr__( 'Sponsors', 'sportspress' ), 'class' => 'SportsPress_Sponsors', 'icon' => 'sp-icon-megaphone', 'link' => 'https://www.themeboy.com/sportspress-extensions/sponsors/', - 'desc' => __( 'Attract sponsors by offering them advertising space on your website.', 'sportspress' ), + 'desc' => esc_attr__( 'Attract sponsors by offering them advertising space on your website.', 'sportspress' ), ), ), ) @@ -195,44 +195,44 @@ class SP_Modules { if ( class_exists( 'BuddyPress' ) ) { $this->data['other']['buddypress'] = array( - 'label' => __( 'BuddyPress', 'sportspress' ), + 'label' => esc_attr__( 'BuddyPress', 'sportspress' ), 'class' => 'BP_SportsPress_Component', 'icon' => 'sp-icon-buddypress', 'link' => 'https://www.themeboy.com/sportspress-extensions/buddypress/', - 'desc' => __( 'Easily display SportsPress player information in BuddyPress profiles.', 'sportspress' ), - 'tip' => __( 'Premium', 'sportspress' ), + 'desc' => esc_attr__( 'Easily display SportsPress player information in BuddyPress profiles.', 'sportspress' ), + 'tip' => esc_attr__( 'Premium', 'sportspress' ), ); } if ( class_exists( 'WooCommerce' ) ) { $this->data['other']['woocommerce'] = array( - 'label' => __( 'WooCommerce', 'sportspress' ), + 'label' => esc_attr__( 'WooCommerce', 'sportspress' ), 'class' => 'WooCommerce_SportsPress', 'icon' => 'sp-icon-woo', 'link' => 'https://www.themeboy.com/sportspress-extensions/woocommerce/', - 'desc' => __( 'Sell team merchandise by integrating WooCommerce with SportsPress.', 'sportspress' ), - 'tip' => __( 'Premium', 'sportspress' ), + 'desc' => esc_attr__( 'Sell team merchandise by integrating WooCommerce with SportsPress.', 'sportspress' ), + 'tip' => esc_attr__( 'Premium', 'sportspress' ), ); } if ( defined( 'WPSEO_FILE' ) ) { $this->data['other']['yoast_seo'] = array( - 'label' => __( 'Yoast SEO', 'sportspress' ), + 'label' => esc_attr__( 'Yoast SEO', 'sportspress' ), 'class' => 'Yoast_SEO_SportsPress', 'icon' => 'sp-icon-yoast', 'link' => 'https://www.themeboy.com/sportspress-extensions/yoast-seo/', - 'desc' => __( 'Generate custom titles for SportsPress pages using Yoast SEO.', 'sportspress' ), - 'tip' => __( 'Free', 'sportspress' ), + 'desc' => esc_attr__( 'Generate custom titles for SportsPress pages using Yoast SEO.', 'sportspress' ), + 'tip' => esc_attr__( 'Free', 'sportspress' ), ); } if ( is_multisite() ) { $this->data['other']['multisite'] = array( - 'label' => __( 'Multisite', 'sportspress' ), + 'label' => esc_attr__( 'Multisite', 'sportspress' ), 'class' => 'SportsPress_Multisite', 'icon' => 'sp-icon-globe', 'link' => 'https://www.themeboy.com/sportspress-extensions/multisite/', - 'desc' => __( 'Manage multiple sports and display different widgets all on one site.', 'sportspress' ), + 'desc' => esc_attr__( 'Manage multiple sports and display different widgets all on one site.', 'sportspress' ), ); } } diff --git a/includes/class-sp-player-list.php b/includes/class-sp-player-list.php index 5350be5b..b47e9df6 100644 --- a/includes/class-sp-player-list.php +++ b/includes/class-sp-player-list.php @@ -898,13 +898,13 @@ endif; if ( $key == 'number' ) : $labels[ $key ] = '#'; elseif ( $key == 'team' ) : - $labels[ $key ] = __( 'Team', 'sportspress' ); + $labels[ $key ] = esc_attr__( 'Team', 'sportspress' ); elseif ( $key == 'position' ) : - $labels[ $key ] = __( 'Position', 'sportspress' ); + $labels[ $key ] = esc_attr__( 'Position', 'sportspress' ); elseif ( $key == 'dob' && $showdob ) : - $labels[ $key ] = __( 'Date of Birth', 'sportspress' ); + $labels[ $key ] = esc_attr__( 'Date of Birth', 'sportspress' ); elseif ( $key == 'age' && $showage ) : - $labels[ $key ] = __( 'Age', 'sportspress' ); + $labels[ $key ] = esc_attr__( 'Age', 'sportspress' ); elseif ( array_key_exists( $key, $columns ) ) : $labels[ $key ] = $columns[ $key ]; endif; @@ -955,18 +955,18 @@ endif; if ( in_array( 'number', $this->columns ) ) { $labels['number'] = '#'; } - $labels['name'] = __( 'Player', 'sportspress' ); + $labels['name'] = esc_attr__( 'Player', 'sportspress' ); if ( in_array( 'team', $this->columns ) ) { - $labels['team'] = __( 'Team', 'sportspress' ); + $labels['team'] = esc_attr__( 'Team', 'sportspress' ); } if ( in_array( 'position', $this->columns ) ) { - $labels['position'] = __( 'Position', 'sportspress' ); + $labels['position'] = esc_attr__( 'Position', 'sportspress' ); } if ( in_array( 'dob', $this->columns ) && $showdob ) { - $labels['dob'] = __( 'Date of Birth', 'sportspress' ); + $labels['dob'] = esc_attr__( 'Date of Birth', 'sportspress' ); } if ( in_array( 'age', $this->columns ) && $showage ) { - $labels['age'] = __( 'Age', 'sportspress' ); + $labels['age'] = esc_attr__( 'Age', 'sportspress' ); } $merged[0] = array_merge( $labels, $columns ); diff --git a/includes/class-sp-player.php b/includes/class-sp-player.php index bfc7d42f..5d38bba8 100644 --- a/includes/class-sp-player.php +++ b/includes/class-sp-player.php @@ -271,7 +271,7 @@ class SP_Player extends SP_Custom_Post { endforeach; $div_ids[] = 0; - $season_names[0] = __( 'Total', 'sportspress' ); + $season_names[0] = esc_attr__( 'Total', 'sportspress' ); $data = array(); @@ -719,7 +719,7 @@ class SP_Player extends SP_Custom_Post { $team_name = '' . $team_name . ''; endif; else : - $team_name = __( 'Total', 'sportspress' ); + $team_name = esc_attr__( 'Total', 'sportspress' ); endif; // Add season name to row @@ -785,7 +785,7 @@ class SP_Player extends SP_Custom_Post { // Calculate total statistics $career = array( - 'name' => __( 'Total', 'sportspress' ), + 'name' => esc_attr__( 'Total', 'sportspress' ), 'team' => '-', ); @@ -833,7 +833,7 @@ class SP_Player extends SP_Custom_Post { if ( is_array( $usecolumns ) ) : foreach ( $usecolumns as $key ) : if ( $key == 'team' ) : - $labels[ $key ] = __( 'Team', 'sportspress' ); + $labels[ $key ] = esc_attr__( 'Team', 'sportspress' ); elseif ( array_key_exists( $key, $columns ) ) : $labels[ $key ] = $columns[ $key ]; endif; @@ -852,8 +852,8 @@ endif; $labels = array(); - $labels['name'] = __( 'Season', 'sportspress' ); - $labels['team'] = __( 'Team', 'sportspress' ); + $labels['name'] = esc_attr__( 'Season', 'sportspress' ); + $labels['team'] = esc_attr__( 'Team', 'sportspress' ); if ( 'no' === get_option( 'sportspress_player_show_total', 'no' ) ) { unset( $merged[-1] ); diff --git a/includes/class-sp-post-types.php b/includes/class-sp-post-types.php index 60d1122d..8dd59d5d 100644 --- a/includes/class-sp-post-types.php +++ b/includes/class-sp-post-types.php @@ -36,23 +36,23 @@ class SP_Post_types { if ( apply_filters( 'sportspress_has_leagues', true ) ) : $labels = array( - 'name' => __( 'Leagues', 'sportspress' ), - 'singular_name' => __( 'League', 'sportspress' ), - 'all_items' => __( 'All', 'sportspress' ), - 'edit_item' => __( 'Edit League', 'sportspress' ), - 'view_item' => __( 'View', 'sportspress' ), - 'update_item' => __( 'Update', 'sportspress' ), - 'add_new_item' => __( 'Add New', 'sportspress' ), - 'new_item_name' => __( 'Name', 'sportspress' ), - 'parent_item' => __( 'Parent', 'sportspress' ), - 'parent_item_colon' => __( 'Parent:', 'sportspress' ), - 'search_items' => __( 'Search', 'sportspress' ), - 'not_found' => __( 'No results found.', 'sportspress' ), + 'name' => esc_attr__( 'Leagues', 'sportspress' ), + 'singular_name' => esc_attr__( 'League', 'sportspress' ), + 'all_items' => esc_attr__( 'All', 'sportspress' ), + 'edit_item' => esc_attr__( 'Edit League', 'sportspress' ), + 'view_item' => esc_attr__( 'View', 'sportspress' ), + 'update_item' => esc_attr__( 'Update', 'sportspress' ), + 'add_new_item' => esc_attr__( 'Add New', 'sportspress' ), + 'new_item_name' => esc_attr__( 'Name', 'sportspress' ), + 'parent_item' => esc_attr__( 'Parent', 'sportspress' ), + 'parent_item_colon' => esc_attr__( 'Parent:', 'sportspress' ), + 'search_items' => esc_attr__( 'Search', 'sportspress' ), + 'not_found' => esc_attr__( 'No results found.', 'sportspress' ), ); $args = apply_filters( 'sportspress_register_taxonomy_league', array( - 'label' => __( 'Leagues', 'sportspress' ), + 'label' => esc_attr__( 'Leagues', 'sportspress' ), 'labels' => $labels, 'public' => true, 'show_ui' => $show, @@ -75,23 +75,23 @@ class SP_Post_types { if ( apply_filters( 'sportspress_has_seasons', true ) ) : $labels = array( - 'name' => __( 'Seasons', 'sportspress' ), - 'singular_name' => __( 'Season', 'sportspress' ), - 'all_items' => __( 'All', 'sportspress' ), - 'edit_item' => __( 'Edit Season', 'sportspress' ), - 'view_item' => __( 'View', 'sportspress' ), - 'update_item' => __( 'Update', 'sportspress' ), - 'add_new_item' => __( 'Add New', 'sportspress' ), - 'new_item_name' => __( 'Name', 'sportspress' ), - 'parent_item' => __( 'Parent', 'sportspress' ), - 'parent_item_colon' => __( 'Parent:', 'sportspress' ), - 'search_items' => __( 'Search', 'sportspress' ), - 'not_found' => __( 'No results found.', 'sportspress' ), + 'name' => esc_attr__( 'Seasons', 'sportspress' ), + 'singular_name' => esc_attr__( 'Season', 'sportspress' ), + 'all_items' => esc_attr__( 'All', 'sportspress' ), + 'edit_item' => esc_attr__( 'Edit Season', 'sportspress' ), + 'view_item' => esc_attr__( 'View', 'sportspress' ), + 'update_item' => esc_attr__( 'Update', 'sportspress' ), + 'add_new_item' => esc_attr__( 'Add New', 'sportspress' ), + 'new_item_name' => esc_attr__( 'Name', 'sportspress' ), + 'parent_item' => esc_attr__( 'Parent', 'sportspress' ), + 'parent_item_colon' => esc_attr__( 'Parent:', 'sportspress' ), + 'search_items' => esc_attr__( 'Search', 'sportspress' ), + 'not_found' => esc_attr__( 'No results found.', 'sportspress' ), ); $args = apply_filters( 'sportspress_register_taxonomy_season', array( - 'label' => __( 'Seasons', 'sportspress' ), + 'label' => esc_attr__( 'Seasons', 'sportspress' ), 'labels' => $labels, 'public' => true, 'show_ui' => $show, @@ -114,23 +114,23 @@ class SP_Post_types { if ( apply_filters( 'sportspress_has_venues', true ) ) : $labels = array( - 'name' => __( 'Venues', 'sportspress' ), - 'singular_name' => __( 'Venue', 'sportspress' ), - 'all_items' => __( 'All', 'sportspress' ), - 'edit_item' => __( 'Edit Venue', 'sportspress' ), - 'view_item' => __( 'View', 'sportspress' ), - 'update_item' => __( 'Update', 'sportspress' ), - 'add_new_item' => __( 'Add New', 'sportspress' ), - 'new_item_name' => __( 'Name', 'sportspress' ), - 'parent_item' => __( 'Parent', 'sportspress' ), - 'parent_item_colon' => __( 'Parent:', 'sportspress' ), - 'search_items' => __( 'Search', 'sportspress' ), - 'not_found' => __( 'No results found.', 'sportspress' ), + 'name' => esc_attr__( 'Venues', 'sportspress' ), + 'singular_name' => esc_attr__( 'Venue', 'sportspress' ), + 'all_items' => esc_attr__( 'All', 'sportspress' ), + 'edit_item' => esc_attr__( 'Edit Venue', 'sportspress' ), + 'view_item' => esc_attr__( 'View', 'sportspress' ), + 'update_item' => esc_attr__( 'Update', 'sportspress' ), + 'add_new_item' => esc_attr__( 'Add New', 'sportspress' ), + 'new_item_name' => esc_attr__( 'Name', 'sportspress' ), + 'parent_item' => esc_attr__( 'Parent', 'sportspress' ), + 'parent_item_colon' => esc_attr__( 'Parent:', 'sportspress' ), + 'search_items' => esc_attr__( 'Search', 'sportspress' ), + 'not_found' => esc_attr__( 'No results found.', 'sportspress' ), ); $args = apply_filters( 'sportspress_register_taxonomy_venue', array( - 'label' => __( 'Venues', 'sportspress' ), + 'label' => esc_attr__( 'Venues', 'sportspress' ), 'labels' => $labels, 'public' => true, 'show_ui' => $show, @@ -153,23 +153,23 @@ class SP_Post_types { if ( apply_filters( 'sportspress_has_positions', true ) ) : $labels = array( - 'name' => __( 'Positions', 'sportspress' ), - 'singular_name' => __( 'Position', 'sportspress' ), - 'all_items' => __( 'All', 'sportspress' ), - 'edit_item' => __( 'Edit Position', 'sportspress' ), - 'view_item' => __( 'View', 'sportspress' ), - 'update_item' => __( 'Update', 'sportspress' ), - 'add_new_item' => __( 'Add New', 'sportspress' ), - 'new_item_name' => __( 'Name', 'sportspress' ), - 'parent_item' => __( 'Parent', 'sportspress' ), - 'parent_item_colon' => __( 'Parent:', 'sportspress' ), - 'search_items' => __( 'Search', 'sportspress' ), - 'not_found' => __( 'No results found.', 'sportspress' ), + 'name' => esc_attr__( 'Positions', 'sportspress' ), + 'singular_name' => esc_attr__( 'Position', 'sportspress' ), + 'all_items' => esc_attr__( 'All', 'sportspress' ), + 'edit_item' => esc_attr__( 'Edit Position', 'sportspress' ), + 'view_item' => esc_attr__( 'View', 'sportspress' ), + 'update_item' => esc_attr__( 'Update', 'sportspress' ), + 'add_new_item' => esc_attr__( 'Add New', 'sportspress' ), + 'new_item_name' => esc_attr__( 'Name', 'sportspress' ), + 'parent_item' => esc_attr__( 'Parent', 'sportspress' ), + 'parent_item_colon' => esc_attr__( 'Parent:', 'sportspress' ), + 'search_items' => esc_attr__( 'Search', 'sportspress' ), + 'not_found' => esc_attr__( 'No results found.', 'sportspress' ), ); $args = apply_filters( 'sportspress_register_taxonomy_position', array( - 'label' => __( 'Positions', 'sportspress' ), + 'label' => esc_attr__( 'Positions', 'sportspress' ), 'labels' => $labels, 'public' => true, 'show_ui' => $show, @@ -192,23 +192,23 @@ class SP_Post_types { if ( apply_filters( 'sportspress_has_roles', true ) ) : $labels = array( - 'name' => __( 'Jobs', 'sportspress' ), - 'singular_name' => __( 'Job', 'sportspress' ), - 'all_items' => __( 'All', 'sportspress' ), - 'edit_item' => __( 'Edit Job', 'sportspress' ), - 'view_item' => __( 'View', 'sportspress' ), - 'update_item' => __( 'Update', 'sportspress' ), - 'add_new_item' => __( 'Add New', 'sportspress' ), - 'new_item_name' => __( 'Name', 'sportspress' ), - 'parent_item' => __( 'Parent', 'sportspress' ), - 'parent_item_colon' => __( 'Parent:', 'sportspress' ), - 'search_items' => __( 'Search', 'sportspress' ), - 'not_found' => __( 'No results found.', 'sportspress' ), + 'name' => esc_attr__( 'Jobs', 'sportspress' ), + 'singular_name' => esc_attr__( 'Job', 'sportspress' ), + 'all_items' => esc_attr__( 'All', 'sportspress' ), + 'edit_item' => esc_attr__( 'Edit Job', 'sportspress' ), + 'view_item' => esc_attr__( 'View', 'sportspress' ), + 'update_item' => esc_attr__( 'Update', 'sportspress' ), + 'add_new_item' => esc_attr__( 'Add New', 'sportspress' ), + 'new_item_name' => esc_attr__( 'Name', 'sportspress' ), + 'parent_item' => esc_attr__( 'Parent', 'sportspress' ), + 'parent_item_colon' => esc_attr__( 'Parent:', 'sportspress' ), + 'search_items' => esc_attr__( 'Search', 'sportspress' ), + 'not_found' => esc_attr__( 'No results found.', 'sportspress' ), ); $args = apply_filters( 'sportspress_register_taxonomy_role', array( - 'label' => __( 'Jobs', 'sportspress' ), + 'label' => esc_attr__( 'Jobs', 'sportspress' ), 'labels' => $labels, 'public' => true, 'show_ui' => $show, @@ -244,15 +244,15 @@ class SP_Post_types { 'sportspress_register_post_type_result', array( 'labels' => array( - 'name' => __( 'Event Results', 'sportspress' ), - 'singular_name' => __( 'Result', 'sportspress' ), - 'add_new_item' => __( 'Add New Result', 'sportspress' ), - 'edit_item' => __( 'Edit Result', 'sportspress' ), - 'new_item' => __( 'New', 'sportspress' ), - 'view_item' => __( 'View', 'sportspress' ), - 'search_items' => __( 'Search', 'sportspress' ), - 'not_found' => __( 'No results found.', 'sportspress' ), - 'not_found_in_trash' => __( 'No results found.', 'sportspress' ), + 'name' => esc_attr__( 'Event Results', 'sportspress' ), + 'singular_name' => esc_attr__( 'Result', 'sportspress' ), + 'add_new_item' => esc_attr__( 'Add New Result', 'sportspress' ), + 'edit_item' => esc_attr__( 'Edit Result', 'sportspress' ), + 'new_item' => esc_attr__( 'New', 'sportspress' ), + 'view_item' => esc_attr__( 'View', 'sportspress' ), + 'search_items' => esc_attr__( 'Search', 'sportspress' ), + 'not_found' => esc_attr__( 'No results found.', 'sportspress' ), + 'not_found_in_trash' => esc_attr__( 'No results found.', 'sportspress' ), ), 'public' => false, 'show_ui' => true, @@ -276,15 +276,15 @@ class SP_Post_types { 'sportspress_register_post_type_outcome', array( 'labels' => array( - 'name' => __( 'Event Outcomes', 'sportspress' ), - 'singular_name' => __( 'Outcome', 'sportspress' ), - 'add_new_item' => __( 'Add New Outcome', 'sportspress' ), - 'edit_item' => __( 'Edit Outcome', 'sportspress' ), - 'new_item' => __( 'New', 'sportspress' ), - 'view_item' => __( 'View', 'sportspress' ), - 'search_items' => __( 'Search', 'sportspress' ), - 'not_found' => __( 'No results found.', 'sportspress' ), - 'not_found_in_trash' => __( 'No results found.', 'sportspress' ), + 'name' => esc_attr__( 'Event Outcomes', 'sportspress' ), + 'singular_name' => esc_attr__( 'Outcome', 'sportspress' ), + 'add_new_item' => esc_attr__( 'Add New Outcome', 'sportspress' ), + 'edit_item' => esc_attr__( 'Edit Outcome', 'sportspress' ), + 'new_item' => esc_attr__( 'New', 'sportspress' ), + 'view_item' => esc_attr__( 'View', 'sportspress' ), + 'search_items' => esc_attr__( 'Search', 'sportspress' ), + 'not_found' => esc_attr__( 'No results found.', 'sportspress' ), + 'not_found_in_trash' => esc_attr__( 'No results found.', 'sportspress' ), ), 'public' => false, 'show_ui' => true, @@ -308,15 +308,15 @@ class SP_Post_types { 'sportspress_register_post_type_column', array( 'labels' => array( - 'name' => __( 'Table Columns', 'sportspress' ), - 'singular_name' => __( 'Column', 'sportspress' ), - 'add_new_item' => __( 'Add New Column', 'sportspress' ), - 'edit_item' => __( 'Edit Column', 'sportspress' ), - 'new_item' => __( 'New', 'sportspress' ), - 'view_item' => __( 'View', 'sportspress' ), - 'search_items' => __( 'Search', 'sportspress' ), - 'not_found' => __( 'No results found.', 'sportspress' ), - 'not_found_in_trash' => __( 'No results found.', 'sportspress' ), + 'name' => esc_attr__( 'Table Columns', 'sportspress' ), + 'singular_name' => esc_attr__( 'Column', 'sportspress' ), + 'add_new_item' => esc_attr__( 'Add New Column', 'sportspress' ), + 'edit_item' => esc_attr__( 'Edit Column', 'sportspress' ), + 'new_item' => esc_attr__( 'New', 'sportspress' ), + 'view_item' => esc_attr__( 'View', 'sportspress' ), + 'search_items' => esc_attr__( 'Search', 'sportspress' ), + 'not_found' => esc_attr__( 'No results found.', 'sportspress' ), + 'not_found_in_trash' => esc_attr__( 'No results found.', 'sportspress' ), ), 'public' => false, 'show_ui' => true, @@ -340,15 +340,15 @@ class SP_Post_types { 'sportspress_register_post_type_metric', array( 'labels' => array( - 'name' => __( 'Player Metrics', 'sportspress' ), - 'singular_name' => __( 'Metric', 'sportspress' ), - 'add_new_item' => __( 'Add New Metric', 'sportspress' ), - 'edit_item' => __( 'Edit Metric', 'sportspress' ), - 'new_item' => __( 'New', 'sportspress' ), - 'view_item' => __( 'View', 'sportspress' ), - 'search_items' => __( 'Search', 'sportspress' ), - 'not_found' => __( 'No results found.', 'sportspress' ), - 'not_found_in_trash' => __( 'No results found.', 'sportspress' ), + 'name' => esc_attr__( 'Player Metrics', 'sportspress' ), + 'singular_name' => esc_attr__( 'Metric', 'sportspress' ), + 'add_new_item' => esc_attr__( 'Add New Metric', 'sportspress' ), + 'edit_item' => esc_attr__( 'Edit Metric', 'sportspress' ), + 'new_item' => esc_attr__( 'New', 'sportspress' ), + 'view_item' => esc_attr__( 'View', 'sportspress' ), + 'search_items' => esc_attr__( 'Search', 'sportspress' ), + 'not_found' => esc_attr__( 'No results found.', 'sportspress' ), + 'not_found_in_trash' => esc_attr__( 'No results found.', 'sportspress' ), ), 'public' => false, 'show_ui' => true, @@ -372,20 +372,20 @@ class SP_Post_types { 'sportspress_register_post_type_performance', array( 'labels' => array( - 'name' => __( 'Player Performance', 'sportspress' ), - 'menu_name' => __( 'Performance', 'sportspress' ), - 'singular_name' => __( 'Player Performance', 'sportspress' ), - 'add_new_item' => __( 'Add New Performance', 'sportspress' ), - 'edit_item' => __( 'Edit Performance', 'sportspress' ), - 'new_item' => __( 'New', 'sportspress' ), - 'view_item' => __( 'View', 'sportspress' ), - 'search_items' => __( 'Search', 'sportspress' ), - 'not_found' => __( 'No results found.', 'sportspress' ), - 'not_found_in_trash' => __( 'No results found.', 'sportspress' ), - 'featured_image' => __( 'Icon', 'sportspress' ), - 'set_featured_image' => __( 'Select Icon', 'sportspress' ), - 'remove_featured_image' => __( 'Remove icon', 'sportspress' ), - 'use_featured_image' => __( 'Add icon', 'sportspress' ), + 'name' => esc_attr__( 'Player Performance', 'sportspress' ), + 'menu_name' => esc_attr__( 'Performance', 'sportspress' ), + 'singular_name' => esc_attr__( 'Player Performance', 'sportspress' ), + 'add_new_item' => esc_attr__( 'Add New Performance', 'sportspress' ), + 'edit_item' => esc_attr__( 'Edit Performance', 'sportspress' ), + 'new_item' => esc_attr__( 'New', 'sportspress' ), + 'view_item' => esc_attr__( 'View', 'sportspress' ), + 'search_items' => esc_attr__( 'Search', 'sportspress' ), + 'not_found' => esc_attr__( 'No results found.', 'sportspress' ), + 'not_found_in_trash' => esc_attr__( 'No results found.', 'sportspress' ), + 'featured_image' => esc_attr__( 'Icon', 'sportspress' ), + 'set_featured_image' => esc_attr__( 'Select Icon', 'sportspress' ), + 'remove_featured_image' => esc_attr__( 'Remove icon', 'sportspress' ), + 'use_featured_image' => esc_attr__( 'Add icon', 'sportspress' ), ), 'public' => false, 'show_ui' => true, @@ -409,20 +409,20 @@ class SP_Post_types { 'sportspress_register_post_type_statistic', array( 'labels' => array( - 'name' => __( 'Player Statistics', 'sportspress' ), - 'menu_name' => __( 'Statistics', 'sportspress' ), - 'singular_name' => __( 'Statistic', 'sportspress' ), - 'add_new_item' => __( 'Add New Statistic', 'sportspress' ), - 'edit_item' => __( 'Edit Statistic', 'sportspress' ), - 'new_item' => __( 'New', 'sportspress' ), - 'view_item' => __( 'View', 'sportspress' ), - 'search_items' => __( 'Search', 'sportspress' ), - 'not_found' => __( 'No results found.', 'sportspress' ), - 'not_found_in_trash' => __( 'No results found.', 'sportspress' ), - 'featured_image' => __( 'Icon', 'sportspress' ), - 'set_featured_image' => __( 'Select Icon', 'sportspress' ), - 'remove_featured_image' => __( 'Remove icon', 'sportspress' ), - 'use_featured_image' => __( 'Add icon', 'sportspress' ), + 'name' => esc_attr__( 'Player Statistics', 'sportspress' ), + 'menu_name' => esc_attr__( 'Statistics', 'sportspress' ), + 'singular_name' => esc_attr__( 'Statistic', 'sportspress' ), + 'add_new_item' => esc_attr__( 'Add New Statistic', 'sportspress' ), + 'edit_item' => esc_attr__( 'Edit Statistic', 'sportspress' ), + 'new_item' => esc_attr__( 'New', 'sportspress' ), + 'view_item' => esc_attr__( 'View', 'sportspress' ), + 'search_items' => esc_attr__( 'Search', 'sportspress' ), + 'not_found' => esc_attr__( 'No results found.', 'sportspress' ), + 'not_found_in_trash' => esc_attr__( 'No results found.', 'sportspress' ), + 'featured_image' => esc_attr__( 'Icon', 'sportspress' ), + 'set_featured_image' => esc_attr__( 'Select Icon', 'sportspress' ), + 'remove_featured_image' => esc_attr__( 'Remove icon', 'sportspress' ), + 'use_featured_image' => esc_attr__( 'Add icon', 'sportspress' ), ), 'public' => false, 'show_ui' => true, @@ -442,15 +442,15 @@ class SP_Post_types { $args = array( 'labels' => array( - 'name' => __( 'Events', 'sportspress' ), - 'singular_name' => __( 'Event', 'sportspress' ), - 'add_new_item' => __( 'Add New Event', 'sportspress' ), - 'edit_item' => __( 'Edit Event', 'sportspress' ), - 'new_item' => __( 'New', 'sportspress' ), - 'view_item' => __( 'View Event', 'sportspress' ), - 'search_items' => __( 'Search', 'sportspress' ), - 'not_found' => __( 'No results found.', 'sportspress' ), - 'not_found_in_trash' => __( 'No results found.', 'sportspress' ), + 'name' => esc_attr__( 'Events', 'sportspress' ), + 'singular_name' => esc_attr__( 'Event', 'sportspress' ), + 'add_new_item' => esc_attr__( 'Add New Event', 'sportspress' ), + 'edit_item' => esc_attr__( 'Edit Event', 'sportspress' ), + 'new_item' => esc_attr__( 'New', 'sportspress' ), + 'view_item' => esc_attr__( 'View Event', 'sportspress' ), + 'search_items' => esc_attr__( 'Search', 'sportspress' ), + 'not_found' => esc_attr__( 'No results found.', 'sportspress' ), + 'not_found_in_trash' => esc_attr__( 'No results found.', 'sportspress' ), ), 'public' => true, 'show_ui' => true, @@ -477,19 +477,19 @@ class SP_Post_types { $args = array( 'labels' => array( - 'name' => __( 'Teams', 'sportspress' ), - 'singular_name' => __( 'Team', 'sportspress' ), - 'add_new_item' => __( 'Add New Team', 'sportspress' ), - 'edit_item' => __( 'Edit Team', 'sportspress' ), - 'new_item' => __( 'New', 'sportspress' ), - 'view_item' => __( 'View Team', 'sportspress' ), - 'search_items' => __( 'Search', 'sportspress' ), - 'not_found' => __( 'No results found.', 'sportspress' ), - 'not_found_in_trash' => __( 'No results found.', 'sportspress' ), - 'featured_image' => __( 'Logo', 'sportspress' ), - 'set_featured_image' => __( 'Select Logo', 'sportspress' ), - 'remove_featured_image' => __( 'Remove Logo', 'sportspress' ), - 'use_featured_image' => __( 'Select Logo', 'sportspress' ), + 'name' => esc_attr__( 'Teams', 'sportspress' ), + 'singular_name' => esc_attr__( 'Team', 'sportspress' ), + 'add_new_item' => esc_attr__( 'Add New Team', 'sportspress' ), + 'edit_item' => esc_attr__( 'Edit Team', 'sportspress' ), + 'new_item' => esc_attr__( 'New', 'sportspress' ), + 'view_item' => esc_attr__( 'View Team', 'sportspress' ), + 'search_items' => esc_attr__( 'Search', 'sportspress' ), + 'not_found' => esc_attr__( 'No results found.', 'sportspress' ), + 'not_found_in_trash' => esc_attr__( 'No results found.', 'sportspress' ), + 'featured_image' => esc_attr__( 'Logo', 'sportspress' ), + 'set_featured_image' => esc_attr__( 'Select Logo', 'sportspress' ), + 'remove_featured_image' => esc_attr__( 'Remove Logo', 'sportspress' ), + 'use_featured_image' => esc_attr__( 'Select Logo', 'sportspress' ), ), 'public' => true, 'show_ui' => true, @@ -520,19 +520,19 @@ class SP_Post_types { 'sportspress_register_post_type_player', array( 'labels' => array( - 'name' => __( 'Players', 'sportspress' ), - 'singular_name' => __( 'Player', 'sportspress' ), - 'add_new_item' => __( 'Add New Player', 'sportspress' ), - 'edit_item' => __( 'Edit Player', 'sportspress' ), - 'new_item' => __( 'New', 'sportspress' ), - 'view_item' => __( 'View Player', 'sportspress' ), - 'search_items' => __( 'Search', 'sportspress' ), - 'not_found' => __( 'No results found.', 'sportspress' ), - 'not_found_in_trash' => __( 'No results found.', 'sportspress' ), - 'featured_image' => __( 'Photo', 'sportspress' ), - 'set_featured_image' => __( 'Select Photo', 'sportspress' ), - 'remove_featured_image' => __( 'Remove Photo', 'sportspress' ), - 'use_featured_image' => __( 'Select Photo', 'sportspress' ), + 'name' => esc_attr__( 'Players', 'sportspress' ), + 'singular_name' => esc_attr__( 'Player', 'sportspress' ), + 'add_new_item' => esc_attr__( 'Add New Player', 'sportspress' ), + 'edit_item' => esc_attr__( 'Edit Player', 'sportspress' ), + 'new_item' => esc_attr__( 'New', 'sportspress' ), + 'view_item' => esc_attr__( 'View Player', 'sportspress' ), + 'search_items' => esc_attr__( 'Search', 'sportspress' ), + 'not_found' => esc_attr__( 'No results found.', 'sportspress' ), + 'not_found_in_trash' => esc_attr__( 'No results found.', 'sportspress' ), + 'featured_image' => esc_attr__( 'Photo', 'sportspress' ), + 'set_featured_image' => esc_attr__( 'Select Photo', 'sportspress' ), + 'remove_featured_image' => esc_attr__( 'Remove Photo', 'sportspress' ), + 'use_featured_image' => esc_attr__( 'Select Photo', 'sportspress' ), ), 'public' => true, 'show_ui' => true, @@ -559,19 +559,19 @@ class SP_Post_types { 'sportspress_register_post_type_staff', array( 'labels' => array( - 'name' => __( 'Staff', 'sportspress' ), - 'singular_name' => __( 'Staff', 'sportspress' ), - 'add_new_item' => __( 'Add New Staff', 'sportspress' ), - 'edit_item' => __( 'Edit Staff', 'sportspress' ), - 'new_item' => __( 'New', 'sportspress' ), - 'view_item' => __( 'View Staff', 'sportspress' ), - 'search_items' => __( 'Search', 'sportspress' ), - 'not_found' => __( 'No results found.', 'sportspress' ), - 'not_found_in_trash' => __( 'No results found.', 'sportspress' ), - 'featured_image' => __( 'Photo', 'sportspress' ), - 'set_featured_image' => __( 'Select Photo', 'sportspress' ), - 'remove_featured_image' => __( 'Remove Photo', 'sportspress' ), - 'use_featured_image' => __( 'Select Photo', 'sportspress' ), + 'name' => esc_attr__( 'Staff', 'sportspress' ), + 'singular_name' => esc_attr__( 'Staff', 'sportspress' ), + 'add_new_item' => esc_attr__( 'Add New Staff', 'sportspress' ), + 'edit_item' => esc_attr__( 'Edit Staff', 'sportspress' ), + 'new_item' => esc_attr__( 'New', 'sportspress' ), + 'view_item' => esc_attr__( 'View Staff', 'sportspress' ), + 'search_items' => esc_attr__( 'Search', 'sportspress' ), + 'not_found' => esc_attr__( 'No results found.', 'sportspress' ), + 'not_found_in_trash' => esc_attr__( 'No results found.', 'sportspress' ), + 'featured_image' => esc_attr__( 'Photo', 'sportspress' ), + 'set_featured_image' => esc_attr__( 'Select Photo', 'sportspress' ), + 'remove_featured_image' => esc_attr__( 'Remove Photo', 'sportspress' ), + 'use_featured_image' => esc_attr__( 'Select Photo', 'sportspress' ), ), 'public' => true, 'show_ui' => true, diff --git a/includes/class-sp-team.php b/includes/class-sp-team.php index 0e19ead5..76247baf 100644 --- a/includes/class-sp-team.php +++ b/includes/class-sp-team.php @@ -63,7 +63,7 @@ class SP_Team extends SP_Custom_Post { endforeach; $div_ids[] = 0; - $season_names[0] = __( 'Total', 'sportspress' ); + $season_names[0] = esc_attr__( 'Total', 'sportspress' ); $data = array(); @@ -347,7 +347,7 @@ endif; $placeholders[ $div_id ] = array(); foreach ( $equations as $key => $value ) : if ( '$gamesback' == $value['equation'] ) { - $placeholders[ $div_id ][ $key ] = __( '(Auto)', 'sportspress' ); + $placeholders[ $div_id ][ $key ] = esc_attr__( '(Auto)', 'sportspress' ); } else { $placeholders[ $div_id ][ $key ] = sp_solve( $value['equation'], $totals, $value['precision'] ); } diff --git a/includes/class-sp-template-loader.php b/includes/class-sp-template-loader.php index b29e9361..eb16743f 100644 --- a/includes/class-sp-template-loader.php +++ b/includes/class-sp-template-loader.php @@ -170,9 +170,9 @@ class SP_Template_Loader { if ( is_singular( 'sp_event' ) ) { $status = sp_get_status( get_the_ID() ); if ( 'results' == $status ) { - $caption = __( 'Recap', 'sportspress' ); + $caption = esc_attr__( 'Recap', 'sportspress' ); } else { - $caption = __( 'Preview', 'sportspress' ); + $caption = esc_attr__( 'Preview', 'sportspress' ); } $content = self::add_content( $content, 'event', apply_filters( 'sportspress_event_content_priority', 10 ), $caption ); } diff --git a/includes/class-sp-templates.php b/includes/class-sp-templates.php index 47950ece..1d79ac85 100644 --- a/includes/class-sp-templates.php +++ b/includes/class-sp-templates.php @@ -28,13 +28,13 @@ class SP_Templates { 'sportspress_before_event_template', array( 'logos' => array( - 'title' => __( 'Teams', 'sportspress' ), + 'title' => esc_attr__( 'Teams', 'sportspress' ), 'option' => 'sportspress_event_show_logos', 'action' => 'sportspress_output_event_logos', 'default' => 'yes', ), 'excerpt' => array( - 'title' => __( 'Excerpt', 'sportspress' ), + 'title' => esc_attr__( 'Excerpt', 'sportspress' ), 'option' => 'sportspress_event_show_excerpt', 'action' => 'sportspress_output_post_excerpt', 'default' => 'yes', @@ -43,7 +43,7 @@ class SP_Templates { ), array( 'content' => array( - 'title' => __( 'Article', 'sportspress' ), + 'title' => esc_attr__( 'Article', 'sportspress' ), 'option' => 'sportspress_event_show_content', 'action' => 'sportspress_output_event_content', 'default' => 'yes', @@ -53,31 +53,31 @@ class SP_Templates { 'sportspress_after_event_template', array( 'video' => array( - 'title' => __( 'Video', 'sportspress' ), + 'title' => esc_attr__( 'Video', 'sportspress' ), 'option' => 'sportspress_event_show_video', 'action' => 'sportspress_output_event_video', 'default' => 'yes', ), 'details' => array( - 'title' => __( 'Details', 'sportspress' ), + 'title' => esc_attr__( 'Details', 'sportspress' ), 'option' => 'sportspress_event_show_details', 'action' => 'sportspress_output_event_details', 'default' => 'yes', ), 'venue' => array( - 'title' => __( 'Venue', 'sportspress' ), + 'title' => esc_attr__( 'Venue', 'sportspress' ), 'option' => 'sportspress_event_show_venue', 'action' => 'sportspress_output_event_venue', 'default' => 'yes', ), 'results' => array( - 'title' => __( 'Results', 'sportspress' ), + 'title' => esc_attr__( 'Results', 'sportspress' ), 'option' => 'sportspress_event_show_results', 'action' => 'sportspress_output_event_results', 'default' => 'yes', ), 'performance' => array( - 'title' => __( 'Box Score', 'sportspress' ), + 'title' => esc_attr__( 'Box Score', 'sportspress' ), 'option' => 'sportspress_event_show_performance', 'action' => 'sportspress_output_event_performance', 'default' => 'yes', @@ -89,7 +89,7 @@ class SP_Templates { apply_filters( 'sportspress_before_calendar_template', array() ), array( 'content' => array( - 'title' => __( 'Description', 'sportspress' ), + 'title' => esc_attr__( 'Description', 'sportspress' ), 'option' => 'sportspress_calendar_show_content', 'action' => 'sportspress_output_calendar_content', 'default' => 'yes', @@ -99,7 +99,7 @@ class SP_Templates { 'sportspress_after_calendar_template', array( 'data' => array( - 'title' => __( 'Calendar', 'sportspress' ), + 'title' => esc_attr__( 'Calendar', 'sportspress' ), 'option' => 'sportspress_calendar_show_data', 'action' => 'sportspress_output_calendar', 'default' => 'yes', @@ -112,13 +112,13 @@ class SP_Templates { 'sportspress_before_team_template', array( 'logo' => array( - 'title' => __( 'Logo', 'sportspress' ), + 'title' => esc_attr__( 'Logo', 'sportspress' ), 'option' => 'sportspress_team_show_logo', 'action' => 'sportspress_output_team_logo', 'default' => 'yes', ), 'excerpt' => array( - 'title' => __( 'Excerpt', 'sportspress' ), + 'title' => esc_attr__( 'Excerpt', 'sportspress' ), 'option' => 'sportspress_team_show_excerpt', 'action' => 'sportspress_output_post_excerpt', 'default' => 'yes', @@ -127,7 +127,7 @@ class SP_Templates { ), array( 'content' => array( - 'title' => __( 'Profile', 'sportspress' ), + 'title' => esc_attr__( 'Profile', 'sportspress' ), 'option' => 'sportspress_team_show_content', 'action' => 'sportspress_output_team_content', 'default' => 'yes', @@ -137,20 +137,20 @@ class SP_Templates { 'sportspress_after_team_template', array( 'link' => array( - 'title' => __( 'Visit Site', 'sportspress' ), - 'label' => __( 'Link', 'sportspress' ), + 'title' => esc_attr__( 'Visit Site', 'sportspress' ), + 'label' => esc_attr__( 'Link', 'sportspress' ), 'option' => 'sportspress_team_show_link', 'action' => 'sportspress_output_team_link', 'default' => 'no', ), 'details' => array( - 'title' => __( 'Details', 'sportspress' ), + 'title' => esc_attr__( 'Details', 'sportspress' ), 'option' => 'sportspress_team_show_details', 'action' => 'sportspress_output_team_details', 'default' => 'no', ), 'staff' => array( - 'title' => __( 'Staff', 'sportspress' ), + 'title' => esc_attr__( 'Staff', 'sportspress' ), 'option' => 'sportspress_team_show_staff', 'action' => 'sportspress_output_team_staff', 'default' => 'yes', @@ -162,7 +162,7 @@ class SP_Templates { apply_filters( 'sportspress_before_table_template', array() ), array( 'content' => array( - 'title' => __( 'Description', 'sportspress' ), + 'title' => esc_attr__( 'Description', 'sportspress' ), 'option' => 'sportspress_table_show_content', 'action' => 'sportspress_output_table_content', 'default' => 'yes', @@ -172,7 +172,7 @@ class SP_Templates { 'sportspress_after_table_template', array( 'data' => array( - 'title' => __( 'League Table', 'sportspress' ), + 'title' => esc_attr__( 'League Table', 'sportspress' ), 'option' => 'sportspress_table_show_data', 'action' => 'sportspress_output_league_table', 'default' => 'yes', @@ -185,26 +185,26 @@ class SP_Templates { 'sportspress_before_player_template', array( 'selector' => array( - 'title' => __( 'Dropdown', 'sportspress' ), - 'label' => __( 'Players', 'sportspress' ), + 'title' => esc_attr__( 'Dropdown', 'sportspress' ), + 'label' => esc_attr__( 'Players', 'sportspress' ), 'option' => 'sportspress_player_show_selector', 'action' => 'sportspress_output_player_selector', 'default' => 'yes', ), 'photo' => array( - 'title' => __( 'Photo', 'sportspress' ), + 'title' => esc_attr__( 'Photo', 'sportspress' ), 'option' => 'sportspress_player_show_photo', 'action' => 'sportspress_output_player_photo', 'default' => 'yes', ), 'details' => array( - 'title' => __( 'Details', 'sportspress' ), + 'title' => esc_attr__( 'Details', 'sportspress' ), 'option' => 'sportspress_player_show_details', 'action' => 'sportspress_output_player_details', 'default' => 'yes', ), 'excerpt' => array( - 'title' => __( 'Excerpt', 'sportspress' ), + 'title' => esc_attr__( 'Excerpt', 'sportspress' ), 'option' => 'sportspress_player_show_excerpt', 'action' => 'sportspress_output_post_excerpt', 'default' => 'yes', @@ -213,7 +213,7 @@ class SP_Templates { ), array( 'content' => array( - 'title' => __( 'Profile', 'sportspress' ), + 'title' => esc_attr__( 'Profile', 'sportspress' ), 'option' => 'sportspress_player_show_content', 'action' => 'sportspress_output_player_content', 'default' => 'yes', @@ -223,7 +223,7 @@ class SP_Templates { 'sportspress_after_player_template', array( 'statistics' => array( - 'title' => __( 'Statistics', 'sportspress' ), + 'title' => esc_attr__( 'Statistics', 'sportspress' ), 'option' => 'sportspress_player_show_statistics', 'action' => 'sportspress_output_player_statistics', 'default' => 'yes', @@ -235,7 +235,7 @@ class SP_Templates { apply_filters( 'sportspress_before_list_template', array() ), array( 'content' => array( - 'title' => __( 'Description', 'sportspress' ), + 'title' => esc_attr__( 'Description', 'sportspress' ), 'option' => 'sportspress_list_show_content', 'action' => 'sportspress_output_list_content', 'default' => 'yes', @@ -245,7 +245,7 @@ class SP_Templates { 'sportspress_after_list_template', array( 'data' => array( - 'title' => __( 'Player List', 'sportspress' ), + 'title' => esc_attr__( 'Player List', 'sportspress' ), 'option' => 'sportspress_list_show_data', 'action' => 'sportspress_output_player_list', 'default' => 'yes', @@ -258,26 +258,26 @@ class SP_Templates { 'sportspress_before_staff_template', array( 'selector' => array( - 'title' => __( 'Dropdown', 'sportspress' ), - 'label' => __( 'Staff', 'sportspress' ), + 'title' => esc_attr__( 'Dropdown', 'sportspress' ), + 'label' => esc_attr__( 'Staff', 'sportspress' ), 'option' => 'sportspress_staff_show_selector', 'action' => 'sportspress_output_staff_selector', 'default' => 'yes', ), 'photo' => array( - 'title' => __( 'Photo', 'sportspress' ), + 'title' => esc_attr__( 'Photo', 'sportspress' ), 'option' => 'sportspress_staff_show_photo', 'action' => 'sportspress_output_staff_photo', 'default' => 'yes', ), 'details' => array( - 'title' => __( 'Details', 'sportspress' ), + 'title' => esc_attr__( 'Details', 'sportspress' ), 'option' => 'sportspress_staff_show_details', 'action' => 'sportspress_output_staff_details', 'default' => 'yes', ), 'excerpt' => array( - 'title' => __( 'Excerpt', 'sportspress' ), + 'title' => esc_attr__( 'Excerpt', 'sportspress' ), 'option' => 'sportspress_staff_show_excerpt', 'action' => 'sportspress_output_post_excerpt', 'default' => 'yes', @@ -286,7 +286,7 @@ class SP_Templates { ), array( 'content' => array( - 'title' => __( 'Profile', 'sportspress' ), + 'title' => esc_attr__( 'Profile', 'sportspress' ), 'option' => 'sportspress_staff_show_content', 'action' => 'sportspress_output_staff_content', 'default' => 'yes', diff --git a/includes/libraries/class-tgm-plugin-activation.php b/includes/libraries/class-tgm-plugin-activation.php index 4af01773..e74bb954 100644 --- a/includes/libraries/class-tgm-plugin-activation.php +++ b/includes/libraries/class-tgm-plugin-activation.php @@ -331,13 +331,13 @@ if ( ! class_exists( 'TGM_Plugin_Activation' ) ) { // Load class strings. $this->strings = array( - 'page_title' => __( 'Install Required Plugins', 'tgmpa' ), - 'menu_title' => __( 'Install Plugins', 'tgmpa' ), + 'page_title' => esc_attr__( 'Install Required Plugins', 'tgmpa' ), + 'menu_title' => esc_attr__( 'Install Plugins', 'tgmpa' ), /* translators: %s: plugin name. */ - 'installing' => __( 'Installing Plugin: %s', 'tgmpa' ), + 'installing' => esc_attr__( 'Installing Plugin: %s', 'tgmpa' ), /* translators: %s: plugin name. */ - 'updating' => __( 'Updating Plugin: %s', 'tgmpa' ), - 'oops' => __( 'Something went wrong with the plugin API.', 'tgmpa' ), + 'updating' => esc_attr__( 'Updating Plugin: %s', 'tgmpa' ), + 'oops' => esc_attr__( 'Something went wrong with the plugin API.', 'tgmpa' ), 'notice_can_install_required' => _n_noop( /* translators: 1: plugin name(s). */ 'This theme requires the following plugin: %1$s.', @@ -389,19 +389,19 @@ if ( ! class_exists( 'TGM_Plugin_Activation' ) ) { 'Begin activating plugins', 'tgmpa' ), - 'return' => __( 'Return to Required Plugins Installer', 'tgmpa' ), - 'dashboard' => __( 'Return to the Dashboard', 'tgmpa' ), - 'plugin_activated' => __( 'Plugin activated successfully.', 'tgmpa' ), - 'activated_successfully' => __( 'The following plugin was activated successfully:', 'tgmpa' ), + 'return' => esc_attr__( 'Return to Required Plugins Installer', 'tgmpa' ), + 'dashboard' => esc_attr__( 'Return to the Dashboard', 'tgmpa' ), + 'plugin_activated' => esc_attr__( 'Plugin activated successfully.', 'tgmpa' ), + 'activated_successfully' => esc_attr__( 'The following plugin was activated successfully:', 'tgmpa' ), /* translators: 1: plugin name. */ - 'plugin_already_active' => __( 'No action taken. Plugin %1$s was already active.', 'tgmpa' ), + 'plugin_already_active' => esc_attr__( 'No action taken. Plugin %1$s was already active.', 'tgmpa' ), /* translators: 1: plugin name. */ - 'plugin_needs_higher_version' => __( 'Plugin not activated. A higher version of %s is needed for this theme. Please update the plugin.', 'tgmpa' ), + 'plugin_needs_higher_version' => esc_attr__( 'Plugin not activated. A higher version of %s is needed for this theme. Please update the plugin.', 'tgmpa' ), /* translators: 1: dashboard link. */ - 'complete' => __( 'All plugins installed and activated successfully. %1$s', 'tgmpa' ), - 'dismiss' => __( 'Dismiss this notice', 'tgmpa' ), - 'notice_cannot_install_activate' => __( 'There are one or more required or recommended plugins to install, update or activate.', 'tgmpa' ), - 'contact_admin' => __( 'Please contact the administrator of this site for help.', 'tgmpa' ), + 'complete' => esc_attr__( 'All plugins installed and activated successfully. %1$s', 'tgmpa' ), + 'dismiss' => esc_attr__( 'Dismiss this notice', 'tgmpa' ), + 'notice_cannot_install_activate' => esc_attr__( 'There are one or more required or recommended plugins to install, update or activate.', 'tgmpa' ), + 'contact_admin' => esc_attr__( 'Please contact the administrator of this site for help.', 'tgmpa' ), ); do_action( 'tgmpa_register' ); @@ -2383,10 +2383,10 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) { */ protected function get_plugin_advise_type_text( $required ) { if ( true === $required ) { - return __( 'Required', 'tgmpa' ); + return esc_attr__( 'Required', 'tgmpa' ); } - return __( 'Recommended', 'tgmpa' ); + return esc_attr__( 'Recommended', 'tgmpa' ); } /** @@ -2402,13 +2402,13 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) { switch ( $type ) { case 'repo': - $string = __( 'WordPress Repository', 'tgmpa' ); + $string = esc_attr__( 'WordPress Repository', 'tgmpa' ); break; case 'external': - $string = __( 'External Source', 'tgmpa' ); + $string = esc_attr__( 'External Source', 'tgmpa' ); break; case 'bundled': - $string = __( 'Pre-Packaged', 'tgmpa' ); + $string = esc_attr__( 'Pre-Packaged', 'tgmpa' ); break; } @@ -2425,25 +2425,25 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) { */ protected function get_plugin_status_text( $slug ) { if ( ! $this->tgmpa->is_plugin_installed( $slug ) ) { - return __( 'Not Installed', 'tgmpa' ); + return esc_attr__( 'Not Installed', 'tgmpa' ); } if ( ! $this->tgmpa->is_plugin_active( $slug ) ) { - $install_status = __( 'Installed But Not Activated', 'tgmpa' ); + $install_status = esc_attr__( 'Installed But Not Activated', 'tgmpa' ); } else { - $install_status = __( 'Active', 'tgmpa' ); + $install_status = esc_attr__( 'Active', 'tgmpa' ); } $update_status = ''; if ( $this->tgmpa->does_plugin_require_update( $slug ) && false === $this->tgmpa->does_plugin_have_update( $slug ) ) { - $update_status = __( 'Required Update not Available', 'tgmpa' ); + $update_status = esc_attr__( 'Required Update not Available', 'tgmpa' ); } elseif ( $this->tgmpa->does_plugin_require_update( $slug ) ) { - $update_status = __( 'Requires Update', 'tgmpa' ); + $update_status = esc_attr__( 'Requires Update', 'tgmpa' ); } elseif ( false !== $this->tgmpa->does_plugin_have_update( $slug ) ) { - $update_status = __( 'Update recommended', 'tgmpa' ); + $update_status = esc_attr__( 'Update recommended', 'tgmpa' ); } if ( '' === $update_status ) { @@ -2600,7 +2600,7 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) { } $output[] = sprintf( - '

%2$s' . __( 'Installed version:', 'tgmpa' ) . '

', + '

%2$s' . esc_attr__( 'Installed version:', 'tgmpa' ) . '

', $color, $installed ); @@ -2608,7 +2608,7 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) { if ( ! empty( $item['minimum_version'] ) ) { $output[] = sprintf( - '

%1$s' . __( 'Minimum required version:', 'tgmpa' ) . '

', + '

%1$s' . esc_attr__( 'Minimum required version:', 'tgmpa' ) . '

', $item['minimum_version'] ); } @@ -2620,7 +2620,7 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) { } $output[] = sprintf( - '

%2$s' . __( 'Available version:', 'tgmpa' ) . '

', + '

%2$s' . esc_attr__( 'Available version:', 'tgmpa' ) . '

', $color, $item['available_version'] ); @@ -2657,14 +2657,14 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) { public function get_columns() { $columns = array( 'cb' => '', - 'plugin' => __( 'Plugin', 'tgmpa' ), - 'source' => __( 'Source', 'tgmpa' ), - 'type' => __( 'Type', 'tgmpa' ), + 'plugin' => esc_attr__( 'Plugin', 'tgmpa' ), + 'source' => esc_attr__( 'Source', 'tgmpa' ), + 'type' => esc_attr__( 'Type', 'tgmpa' ), ); if ( 'all' === $this->view_context || 'update' === $this->view_context ) { - $columns['version'] = __( 'Version', 'tgmpa' ); - $columns['status'] = __( 'Status', 'tgmpa' ); + $columns['version'] = esc_attr__( 'Version', 'tgmpa' ); + $columns['status'] = esc_attr__( 'Status', 'tgmpa' ); } return apply_filters( 'tgmpa_table_columns', $columns ); @@ -2713,18 +2713,18 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) { // Display the 'Install' action link if the plugin is not yet available. if ( ! $this->tgmpa->is_plugin_installed( $item['slug'] ) ) { /* translators: %2$s: plugin name in screen reader markup */ - $actions['install'] = __( 'Install %2$s', 'tgmpa' ); + $actions['install'] = esc_attr__( 'Install %2$s', 'tgmpa' ); } else { // Display the 'Update' action link if an update is available and WP complies with plugin minimum. if ( false !== $this->tgmpa->does_plugin_have_update( $item['slug'] ) && $this->tgmpa->can_plugin_update( $item['slug'] ) ) { /* translators: %2$s: plugin name in screen reader markup */ - $actions['update'] = __( 'Update %2$s', 'tgmpa' ); + $actions['update'] = esc_attr__( 'Update %2$s', 'tgmpa' ); } // Display the 'Activate' action link, but only if the plugin meets the minimum version. if ( $this->tgmpa->can_plugin_activate( $item['slug'] ) ) { /* translators: %2$s: plugin name in screen reader markup */ - $actions['activate'] = __( 'Activate %2$s', 'tgmpa' ); + $actions['activate'] = esc_attr__( 'Activate %2$s', 'tgmpa' ); } } @@ -2827,16 +2827,16 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) { if ( 'update' !== $this->view_context && 'activate' !== $this->view_context ) { if ( current_user_can( 'install_plugins' ) ) { - $actions['tgmpa-bulk-install'] = __( 'Install', 'tgmpa' ); + $actions['tgmpa-bulk-install'] = esc_attr__( 'Install', 'tgmpa' ); } } if ( 'install' !== $this->view_context ) { if ( current_user_can( 'update_plugins' ) ) { - $actions['tgmpa-bulk-update'] = __( 'Update', 'tgmpa' ); + $actions['tgmpa-bulk-update'] = esc_attr__( 'Update', 'tgmpa' ); } if ( current_user_can( 'activate_plugins' ) ) { - $actions['tgmpa-bulk-activate'] = __( 'Activate', 'tgmpa' ); + $actions['tgmpa-bulk-activate'] = esc_attr__( 'Activate', 'tgmpa' ); } } @@ -2867,9 +2867,9 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) { // Did user actually select any plugins to install/update ? if ( empty( $_POST['plugin'] ) ) { if ( 'install' === $install_type ) { - $message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' ); + $message = esc_attr__( 'No plugins were selected to be installed. No action taken.', 'tgmpa' ); } else { - $message = __( 'No plugins were selected to be updated. No action taken.', 'tgmpa' ); + $message = esc_attr__( 'No plugins were selected to be updated. No action taken.', 'tgmpa' ); } echo '

', esc_html( $message ), '

'; @@ -2910,9 +2910,9 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) { // No need to proceed further if we have no plugins to handle. if ( empty( $plugins_to_install ) ) { if ( 'install' === $install_type ) { - $message = __( 'No plugins are available to be installed at this time.', 'tgmpa' ); + $message = esc_attr__( 'No plugins are available to be installed at this time.', 'tgmpa' ); } else { - $message = __( 'No plugins are available to be updated at this time.', 'tgmpa' ); + $message = esc_attr__( 'No plugins are available to be updated at this time.', 'tgmpa' ); } echo '

', esc_html( $message ), '

'; @@ -3268,8 +3268,8 @@ if ( ! function_exists( 'tgmpa_load_bulk_installer' ) ) { * @since 2.2.0 */ public function activate_strings() { - $this->strings['activation_failed'] = __( 'Plugin activation failed.', 'tgmpa' ); - $this->strings['activation_success'] = __( 'Plugin activated successfully.', 'tgmpa' ); + $this->strings['activation_failed'] = esc_attr__( 'Plugin activation failed.', 'tgmpa' ); + $this->strings['activation_success'] = esc_attr__( 'Plugin activated successfully.', 'tgmpa' ); } /** @@ -3612,29 +3612,29 @@ if ( ! function_exists( 'tgmpa_load_bulk_installer' ) ) { if ( 'update' === $this->options['install_type'] ) { parent::add_strings(); /* translators: 1: plugin name, 2: action number 3: total number of actions. */ - $this->upgrader->strings['skin_before_update_header'] = __( 'Updating Plugin %1$s (%2$d/%3$d)', 'tgmpa' ); + $this->upgrader->strings['skin_before_update_header'] = esc_attr__( 'Updating Plugin %1$s (%2$d/%3$d)', 'tgmpa' ); } else { /* translators: 1: plugin name, 2: error message. */ - $this->upgrader->strings['skin_update_failed_error'] = __( 'An error occurred while installing %1$s: %2$s.', 'tgmpa' ); + $this->upgrader->strings['skin_update_failed_error'] = esc_attr__( 'An error occurred while installing %1$s: %2$s.', 'tgmpa' ); /* translators: 1: plugin name. */ - $this->upgrader->strings['skin_update_failed'] = __( 'The installation of %1$s failed.', 'tgmpa' ); + $this->upgrader->strings['skin_update_failed'] = esc_attr__( 'The installation of %1$s failed.', 'tgmpa' ); if ( $this->tgmpa->is_automatic ) { // Automatic activation strings. - $this->upgrader->strings['skin_upgrade_start'] = __( 'The installation and activation process is starting. This process may take a while on some hosts, so please be patient.', 'tgmpa' ); + $this->upgrader->strings['skin_upgrade_start'] = esc_attr__( 'The installation and activation process is starting. This process may take a while on some hosts, so please be patient.', 'tgmpa' ); /* translators: 1: plugin name. */ - $this->upgrader->strings['skin_update_successful'] = __( '%1$s installed and activated successfully.', 'tgmpa' ) . ' ' . esc_html__( 'Show Details', 'tgmpa' ) . '.'; - $this->upgrader->strings['skin_upgrade_end'] = __( 'All installations and activations have been completed.', 'tgmpa' ); + $this->upgrader->strings['skin_update_successful'] = esc_attr__( '%1$s installed and activated successfully.', 'tgmpa' ) . ' ' . esc_html__( 'Show Details', 'tgmpa' ) . '.'; + $this->upgrader->strings['skin_upgrade_end'] = esc_attr__( 'All installations and activations have been completed.', 'tgmpa' ); /* translators: 1: plugin name, 2: action number 3: total number of actions. */ - $this->upgrader->strings['skin_before_update_header'] = __( 'Installing and Activating Plugin %1$s (%2$d/%3$d)', 'tgmpa' ); + $this->upgrader->strings['skin_before_update_header'] = esc_attr__( 'Installing and Activating Plugin %1$s (%2$d/%3$d)', 'tgmpa' ); } else { // Default installation strings. - $this->upgrader->strings['skin_upgrade_start'] = __( 'The installation process is starting. This process may take a while on some hosts, so please be patient.', 'tgmpa' ); + $this->upgrader->strings['skin_upgrade_start'] = esc_attr__( 'The installation process is starting. This process may take a while on some hosts, so please be patient.', 'tgmpa' ); /* translators: 1: plugin name. */ $this->upgrader->strings['skin_update_successful'] = esc_html__( '%1$s installed successfully.', 'tgmpa' ) . ' ' . esc_html__( 'Show Details', 'tgmpa' ) . '.'; - $this->upgrader->strings['skin_upgrade_end'] = __( 'All installations have been completed.', 'tgmpa' ); + $this->upgrader->strings['skin_upgrade_end'] = esc_attr__( 'All installations have been completed.', 'tgmpa' ); /* translators: 1: plugin name, 2: action number 3: total number of actions. */ - $this->upgrader->strings['skin_before_update_header'] = __( 'Installing Plugin %1$s (%2$d/%3$d)', 'tgmpa' ); + $this->upgrader->strings['skin_before_update_header'] = esc_attr__( 'Installing Plugin %1$s (%2$d/%3$d)', 'tgmpa' ); } } } diff --git a/includes/shortcodes/class-sp-shortcode-event-full.php b/includes/shortcodes/class-sp-shortcode-event-full.php index 88217b65..436d9d1d 100644 --- a/includes/shortcodes/class-sp-shortcode-event-full.php +++ b/includes/shortcodes/class-sp-shortcode-event-full.php @@ -65,9 +65,9 @@ class SP_Shortcode_Event_Full { } // Render the template - echo '
'; + echo '
'; if ( 'content' === $key ) { - echo $content; + echo wp_kses_post( $content ); // Template content hook do_action( 'sportspress_single_' . $type . '_content' ); } elseif ( 'excerpt' === $key ) { @@ -106,7 +106,7 @@ class SP_Shortcode_Event_Full { // Put tab content into buffer ob_start(); if ( 'content' === $key ) { - echo $content; + echo wp_kses_post( $content ); // Template content hook do_action( 'sportspress_single_' . $type . '_content' ); } elseif ( 'excerpt' === $key ) { @@ -148,7 +148,7 @@ class SP_Shortcode_Event_Full { $ob .= '
'; } - echo $ob; + echo wp_kses_post( $ob ); } } diff --git a/includes/sp-api-functions.php b/includes/sp-api-functions.php index 6b9f4cc6..8bc65165 100644 --- a/includes/sp-api-functions.php +++ b/includes/sp-api-functions.php @@ -30,7 +30,7 @@ function sp_get_time( $post = 0, $format = null ) { } function sp_the_time( $post = 0, $format = null ) { - echo sp_get_time( $post, $format ); + echo wp_kses_post( sp_get_time( $post, $format ) ); } function sp_get_date( $post = 0, $format = null ) { @@ -41,7 +41,7 @@ function sp_get_date( $post = 0, $format = null ) { } function sp_the_date( $post = 0, $format = null ) { - echo sp_get_date( $post, $format ); + echo wp_kses_post( sp_get_date( $post, $format ) ); } function sp_get_posts( $post_type = 'post', $args = array() ) { @@ -80,7 +80,7 @@ function sp_the_leagues( $post = 0, $delimiter = ', ' ) { $arr[] = $term->name; endforeach; } - echo implode( $delimiter, $arr ); + echo wp_kses_post( implode( $delimiter, $arr ) ); } function sp_the_seasons( $post = 0, $delimiter = ', ' ) { @@ -91,7 +91,7 @@ function sp_the_seasons( $post = 0, $delimiter = ', ' ) { $arr[] = $term->name; endforeach; } - echo implode( $delimiter, $arr ); + echo wp_kses_post( implode( $delimiter, $arr ) ); } /* @@ -140,7 +140,7 @@ function sp_get_main_results( $post = 0 ) { function sp_the_main_results( $post = 0, $delimiter = '-' ) { $results = sp_get_main_results( $post ); - echo implode( $delimiter, $results ); + echo wp_kses_post( implode( $delimiter, $results ) ); } function sp_update_main_results( $post = 0, $results = array() ) { @@ -158,7 +158,7 @@ function sp_get_main_results_or_time( $post = 0 ) { } function sp_the_main_results_or_time( $post = 0, $delimiter = '-' ) { - echo implode( $delimiter, sp_get_main_results_or_time( $post ) ); + echo wp_kses_post( implode( $delimiter, sp_get_main_results_or_time( $post ) ) ); } function sp_get_main_results_or_date( $post = 0, $format = null ) { @@ -307,7 +307,7 @@ function sp_the_venues( $post = 0, $delimiter = ', ' ) { $arr[] = $term->name; endforeach; } - echo implode( $delimiter, $arr ); + echo wp_kses_post( implode( $delimiter, $arr ) ); } function sp_is_home_venue( $post = 0, $event = 0 ) { @@ -321,7 +321,7 @@ function sp_is_home_venue( $post = 0, $event = 0 ) { } function sp_the_logo( $post = 0, $size = 'icon', $attr = array() ) { - echo sp_get_logo( $post, $size, $attr ); + echo wp_kses_post( sp_get_logo( $post, $size, $attr ) ); } function sp_team_logo( $post = 0 ) { @@ -338,7 +338,7 @@ function sp_team_abbreviation( $post = 0, $forced = false ) { } function sp_the_abbreviation( $post = 0, $forced = false ) { - echo sp_team_abbreviation( $post, $forced ); + echo wp_kses_post( sp_team_abbreviation( $post, $forced ) ); } function sp_team_short_name( $post = 0 ) { @@ -351,7 +351,7 @@ function sp_team_short_name( $post = 0 ) { } function sp_the_short_name( $post = 0 ) { - echo sp_team_short_name( $post ); + echo wp_kses_post( sp_team_short_name( $post ) ); } function sp_team_name( $post = 0, $length = 'full' ) { diff --git a/includes/sp-core-functions.php b/includes/sp-core-functions.php index 28b7566b..5342585d 100644 --- a/includes/sp-core-functions.php +++ b/includes/sp-core-functions.php @@ -73,7 +73,7 @@ function sp_get_template( $template_name, $args = array(), $template_path = '', $located = sp_locate_template( $template_name, $template_path, $default_path ); if ( ! file_exists( $located ) ) { - _doing_it_wrong( __FUNCTION__, sprintf( '%s does not exist.', $located ), '0.7' ); + _doing_it_wrong( __FUNCTION__, sprintf( '%s does not exist.', esc_html( $located ) ), '0.7' ); return; } @@ -511,7 +511,7 @@ if ( ! function_exists( 'sp_get_url' ) ) { if ( ! $url ) { return; } - return ' ' . $url . ''; + return ' ' . $url . ''; } } @@ -531,14 +531,14 @@ if ( ! function_exists( 'sp_get_post_condition' ) ) { $condition = get_post_meta( $post_id, 'sp_condition', true ); $main_result = get_option( 'sportspress_primary_result', null ); $result = get_page_by_path( $main_result, ARRAY_A, 'sp_result' ); - $label = sp_array_value( $result, 'post_title', __( 'Primary', 'sportspress' ) ); + $label = sp_array_value( $result, 'post_title', esc_attr__( 'Primary', 'sportspress' ) ); if ( $condition ) : $conditions = array( '0' => '—', - '>' => sprintf( __( 'Most %s', 'sportspress' ), $label ), - '<' => sprintf( __( 'Least %s', 'sportspress' ), $label ), - '=' => sprintf( __( 'Equal %s', 'sportspress' ), $label ), - 'else' => sprintf( __( 'Default', 'sportspress' ), $label ), + '>' => sprintf( esc_attr__( 'Most %s', 'sportspress' ), $label ), + '<' => sprintf( esc_attr__( 'Least %s', 'sportspress' ), $label ), + '=' => sprintf( esc_attr__( 'Equal %s', 'sportspress' ), $label ), + 'else' => sprintf( esc_attr__( 'Default', 'sportspress' ), $label ), ); return sp_array_value( $conditions, $condition, '—' ); else : @@ -564,11 +564,11 @@ if ( ! function_exists( 'sp_get_post_calculate' ) ) { if ( $calculate ) : return str_replace( array( 'total', 'average' ), - array( __( 'Total', 'sportspress' ), __( 'Average', 'sportspress' ) ), + array( esc_attr__( 'Total', 'sportspress' ), esc_attr__( 'Average', 'sportspress' ) ), $calculate ); else : - return __( 'Total', 'sportspress' ); + return esc_attr__( 'Total', 'sportspress' ); endif; } } @@ -611,17 +611,17 @@ if ( ! function_exists( 'sp_get_post_section' ) ) { $options = apply_filters( 'sportspress_performance_sections', array( - -1 => __( 'All', 'sportspress' ), - 0 => __( 'Offense', 'sportspress' ), - 1 => __( + -1 => esc_attr__( 'All', 'sportspress' ), + 0 => esc_attr__( 'Offense', 'sportspress' ), + 1 => esc_attr__( 'Defense', 'sportspress' ), ) ); - return sp_array_value( $options, $section, __( 'All', 'sportspress' ) ); + return sp_array_value( $options, $section, esc_attr__( 'All', 'sportspress' ) ); else : - return __( 'All', 'sportspress' ); + return esc_attr__( 'All', 'sportspress' ); endif; } } @@ -633,19 +633,19 @@ if ( ! function_exists( 'sp_get_post_format' ) ) { $options = apply_filters( 'sportspress_performance_formats', array( - 'number' => __( 'Number', 'sportspress' ), - 'time' => __( 'Time', 'sportspress' ), - 'text' => __( 'Text', 'sportspress' ), - 'equation' => __( 'Equation', 'sportspress' ), - 'checkbox' => __( + 'number' => esc_attr__( 'Number', 'sportspress' ), + 'time' => esc_attr__( 'Time', 'sportspress' ), + 'text' => esc_attr__( 'Text', 'sportspress' ), + 'equation' => esc_attr__( 'Equation', 'sportspress' ), + 'checkbox' => esc_attr__( 'Checkbox', 'sportspress' ), ) ); - return sp_array_value( $options, $format, __( 'Number', 'sportspress' ) ); + return sp_array_value( $options, $format, esc_attr__( 'Number', 'sportspress' ) ); else : - return __( 'Number', 'sportspress' ); + return esc_attr__( 'Number', 'sportspress' ); endif; } } @@ -674,8 +674,8 @@ if ( ! function_exists( 'sp_get_term_sections' ) ) { $sections = apply_filters( 'sportspress_performance_sections', array( - 0 => __( 'Offense', 'sportspress' ), - 1 => __( + 0 => esc_attr__( 'Offense', 'sportspress' ), + 1 => esc_attr__( 'Defense', 'sportspress' ), @@ -766,23 +766,23 @@ if ( ! function_exists( 'sp_dropdown_statuses' ) ) { ); $args = array_merge( $defaults, $args ); - printf( '', esc_attr( $args['name'] ), esc_attr( $args['class'] ) ); if ( $args['show_option_default'] ) : - printf( '', $args['show_option_default'] ); + printf( '', esc_attr( $args['show_option_default'] ) ); endif; $statuses = apply_filters( 'sportspress_statuses', array( - 'any' => __( 'All', 'sportspress' ), - 'publish' => __( 'Published', 'sportspress' ), - 'future' => __( 'Scheduled', 'sportspress' ), + 'any' => esc_attr__( 'All', 'sportspress' ), + 'publish' => esc_attr__( 'Published', 'sportspress' ), + 'future' => esc_attr__( 'Scheduled', 'sportspress' ), ) ); foreach ( $statuses as $value => $label ) : - printf( '', $value, selected( $value, $args['selected'], false ), $label ); + printf( '', esc_attr( $value ), selected( $value, $args['selected'], false ), esc_attr( $label ) ); endforeach; print( '' ); return true; @@ -800,28 +800,28 @@ if ( ! function_exists( 'sp_dropdown_dates' ) ) { ); $args = array_merge( $defaults, $args ); - printf( '', esc_attr( $args['name'] ), esc_attr( $args['class'] ) ); if ( $args['show_option_default'] ) : - printf( '', $args['show_option_default'] ); + printf( '', esc_attr( $args['show_option_default'] ) ); endif; $dates = apply_filters( 'sportspress_dates', array( - 0 => __( 'All', 'sportspress' ), - '-day' => __( 'Yesterday', 'sportspress' ), - 'day' => __( 'Today', 'sportspress' ), - '+day' => __( 'Tomorrow', 'sportspress' ), - '-w' => __( 'Last week', 'sportspress' ), - 'w' => __( 'This week', 'sportspress' ), - '+w' => __( 'Next week', 'sportspress' ), - 'range' => __( 'Date range:', 'sportspress' ), + 0 => esc_attr__( 'All', 'sportspress' ), + '-day' => esc_attr__( 'Yesterday', 'sportspress' ), + 'day' => esc_attr__( 'Today', 'sportspress' ), + '+day' => esc_attr__( 'Tomorrow', 'sportspress' ), + '-w' => esc_attr__( 'Last week', 'sportspress' ), + 'w' => esc_attr__( 'This week', 'sportspress' ), + '+w' => esc_attr__( 'Next week', 'sportspress' ), + 'range' => esc_attr__( 'Date range:', 'sportspress' ), ) ); foreach ( $dates as $value => $label ) : - printf( '', $value, selected( $value, $args['selected'], false ), $label ); + printf( '', esc_attr( $value ), selected( $value, $args['selected'], false ), esc_attr( $label ) ); endforeach; print( '' ); return true; @@ -876,20 +876,20 @@ if ( ! function_exists( 'sp_dropdown_taxonomies' ) ) { $terms = get_terms( $args['taxonomy'], $args ); - printf( '', $args['taxonomy'] ); + printf( '', esc_attr( $args['taxonomy'] ) ); if ( $terms ) : - printf( '', esc_attr( $name ), esc_attr( $class ) . ( $chosen ? ' chosen-select' . ( is_rtl() ? ' chosen-rtl' : '' ) : '' ), ( $placeholder != null ? 'data-placeholder="' . esc_attr( $placeholder ) . '" ' : '' ) . esc_attr( $property ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped if ( strpos( $property, 'multiple' ) === false ) : if ( $args['show_option_blank'] ) : - echo ''; + echo ''; endif; if ( $args['show_option_all'] ) : - printf( '', $args['show_option_all'] ); + printf( '', esc_attr( $args['show_option_all'] ) ); endif; if ( $args['show_option_none'] ) : - printf( '', $args['show_option_none'] ); + printf( '', esc_attr( $args['show_option_none'] ) ); endif; endif; @@ -899,7 +899,7 @@ if ( ! function_exists( 'sp_dropdown_taxonomies' ) ) { else : $selected_prop = selected( 'auto', $selected, false ); endif; - printf( '', $args['show_option_auto'] . ' ' . __( '(Auto)', 'sportspress' ) ); + printf( '', esc_attr( $args['show_option_auto'] ) . ' ' . esc_attr__( '(Auto)', 'sportspress' ) ); endif; foreach ( $terms as $term ) : @@ -916,7 +916,7 @@ if ( ! function_exists( 'sp_dropdown_taxonomies' ) ) { $selected_prop = selected( $this_value, $selected, false ); endif; - printf( '', $this_value, $selected_prop, $term->name ); + printf( '', esc_attr( $this_value ), esc_attr( $selected_prop ), esc_attr( $term->name ) ); if ( $args['include_children'] ) : $term_children = get_term_children( $term->term_id, $args['taxonomy'] ); @@ -936,7 +936,7 @@ if ( ! function_exists( 'sp_dropdown_taxonomies' ) ) { $selected_prop = selected( $this_value, $selected, false ); endif; - printf( '', $this_value, $selected_prop, '— ' . $term_child->name ); + printf( '', esc_attr( $this_value ), esc_attr( $selected_prop ), '— ' . esc_attr( $term_child->name ) ); endforeach; endif; endforeach; @@ -1014,21 +1014,21 @@ if ( ! function_exists( 'sp_dropdown_pages' ) ) { $posts = get_posts( $args ); if ( $posts || $args['prepend_options'] || $args['append_options'] ) : - printf( '', esc_attr( $name ), esc_attr( $id ), esc_attr( $class ) . ( $chosen ? ' chosen-select' . ( is_rtl() ? ' chosen-rtl' : '' ) : '' ), ( $placeholder != null ? 'data-placeholder="' . esc_attr( $placeholder ) . '" ' : '' ) . esc_attr( $property ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped if ( strpos( $property, 'multiple' ) === false ) : if ( $args['show_option_blank'] ) : printf( '' ); endif; if ( $args['show_option_none'] ) : - printf( '', $args['option_none_value'], selected( $selected, $args['option_none_value'], false ), ( $args['show_option_none'] === true ? '' : $args['show_option_none'] ) ); + printf( '', esc_attr( $args['option_none_value'] ), selected( $selected, esc_attr( $args['option_none_value'] ), false ), ( $args['show_option_none'] === true ? '' : esc_attr( $args['show_option_none'] ) ) ); endif; if ( $args['show_option_all'] ) : - printf( '', $args['option_all_value'], selected( $selected, $args['option_all_value'], false ), $args['show_option_all'] ); + printf( '', esc_attr( $args['option_all_value'] ), selected( $selected, esc_attr( $args['option_all_value'] ), false ), esc_attr( $args['show_option_all'] ) ); endif; if ( $args['prepend_options'] && is_array( $args['prepend_options'] ) ) : foreach ( $args['prepend_options'] as $slug => $label ) : - printf( '', $slug, selected( $selected, $slug, false ), $label ); + printf( '', esc_attr( $slug ), selected( $selected, $slug, false ), esc_attr( $label ) ); endforeach; endif; endif; @@ -1058,14 +1058,14 @@ if ( ! function_exists( 'sp_dropdown_pages' ) ) { $class = ''; endif; - printf( '', $this_value, $class, $selected_prop, $post->post_title . ( $args['show_dates'] ? ' (' . $post->post_date . ')' : '' ) ); + printf( '', esc_attr( $this_value ), esc_attr( $class ), esc_attr( $selected_prop ), esc_attr( $post->post_title ) . ( $args['show_dates'] ? ' (' . esc_attr( $post->post_date ) . ')' : '' ) ); endforeach; wp_reset_postdata(); if ( strpos( $property, 'multiple' ) === false ) : if ( $args['append_options'] && is_array( $args['append_options'] ) ) : foreach ( $args['append_options'] as $slug => $label ) : - printf( '', $slug, selected( $selected, $slug, false ), $label ); + printf( '', esc_attr( $slug ), selected( $selected, $slug, false ), esc_attr( $label ) ); endforeach; endif; endif; @@ -1110,7 +1110,7 @@ if ( ! function_exists( 'sp_posts' ) ) { continue; } if ( empty( $title ) ) { - $title = __( '(no title)', 'sportspress' ); + $title = esc_attr__( '(no title)', 'sportspress' ); } edit_post_link( $title, '', '', $id ); if ( ++$i !== $count ) { @@ -1138,7 +1138,7 @@ if ( ! function_exists( 'sp_post_checklist' ) ) { ?> []" />
    -
  • +
  • "> -
  • ', sizeof( $parents ) ); ?> +
  • ', sizeof( $parents ) ) ); ?>
  • -
  • +
@@ -1245,7 +1245,7 @@ if ( ! function_exists( 'sp_column_checklist' ) ) {
    -
  • +
  • -
  • +
@@ -1323,7 +1323,7 @@ if ( ! function_exists( 'sp_draft_or_post_title' ) ) { function sp_draft_or_post_title( $post = 0 ) { $title = get_the_title( $post ); if ( empty( $title ) ) { - $title = __( '(no title)', 'sportspress' ); + $title = esc_attr__( '(no title)', 'sportspress' ); } return $title; } @@ -1403,12 +1403,12 @@ if ( ! function_exists( 'sp_post_adder' ) ) { function sp_post_adder( $post_type = 'post', $label = null, $attributes = array() ) { $obj = get_post_type_object( $post_type ); if ( $label == null ) { - $label = __( 'Add New', 'sportspress' ); + $label = esc_attr__( 'Add New', 'sportspress' ); } ?>

- + +

@@ -1421,12 +1421,12 @@ if ( ! function_exists( 'sp_taxonomy_adder' ) ) { function sp_taxonomy_adder( $taxonomy = 'category', $post_type = null, $label = null ) { $obj = get_taxonomy( $taxonomy ); if ( $label == null ) { - $label = __( 'Add New', 'sportspress' ); + $label = esc_attr__( 'Add New', 'sportspress' ); } ?>

- + +

@@ -1706,8 +1706,8 @@ if ( ! function_exists( 'sp_taxonomy_field' ) ) { if ( $obj ) { $post_type = get_post_type( $post ); ?> -
-

labels->singular_name; ?>

+
+

labels->singular_name ); ?>

ID, $taxonomy ); @@ -1723,13 +1723,13 @@ if ( ! function_exists( 'sp_taxonomy_field' ) ) { if ( in_array( $post_type, sp_secondary_post_types() ) ) { switch ( $taxonomy ) { case 'sp_league': - $auto = __( 'Main League', 'sportspress' ); + $auto = esc_attr__( 'Main League', 'sportspress' ); if ( get_post_meta( $post->ID, 'sp_main_league', true ) ) { $term_ids[] = 'auto'; } break; case 'sp_season': - $auto = __( 'Current Season', 'sportspress' ); + $auto = esc_attr__( 'Current Season', 'sportspress' ); if ( get_post_meta( $post->ID, 'sp_current_season', true ) ) { $term_ids[] = 'auto'; } @@ -1745,7 +1745,7 @@ if ( ! function_exists( 'sp_taxonomy_field' ) ) { 'values' => 'term_id', 'class' => 'sp-has-dummy widefat' . ( $trigger ? ' sp-ajax-trigger' : '' ), 'chosen' => true, - 'placeholder' => $placeholder ? $placeholder : __( 'All', 'sportspress' ), + 'placeholder' => $placeholder ? $placeholder : esc_attr__( 'All', 'sportspress' ), ); if ( $multiple ) { $args['property'] = 'multiple'; @@ -1837,7 +1837,7 @@ function sp_review_link() { ?>

- +

Learn more about manual excerpts.': - $translated_text = __( 'The description is not prominent by default; however, some themes may show it.', 'sportspress' ); + $translated_text = esc_attr__( 'The description is not prominent by default; however, some themes may show it.', 'sportspress' ); break; case 'Slug': - $translated_text = ( in_array( $typenow, array( 'sp_column', 'sp_statistic' ) ) ) ? __( 'Key', 'sportspress' ) : __( 'Variable', 'sportspress' ); + $translated_text = ( in_array( $typenow, array( 'sp_column', 'sp_statistic' ) ) ) ? esc_attr__( 'Key', 'sportspress' ) : esc_attr__( 'Variable', 'sportspress' ); break; endswitch; endif; @@ -80,7 +80,7 @@ function sportspress_gettext( $translated_text, $untranslated_text, $domain = nu if ( is_sp_post_type( $typenow ) ) : switch ( $untranslated_text ) : case 'Author': - $translated_text = __( 'User', 'sportspress' ); + $translated_text = esc_attr__( 'User', 'sportspress' ); break; endswitch; endif; @@ -88,7 +88,7 @@ function sportspress_gettext( $translated_text, $untranslated_text, $domain = nu if ( in_array( $typenow, array( 'sp_event' ) ) ) : switch ( $untranslated_text ) : case 'Publish immediately': - $translated_text = __( 'Date/Time:', 'sportspress' ) . ' ' . __( 'Now', 'sportspress' ) . ''; + $translated_text = esc_attr__( 'Date/Time:', 'sportspress' ) . ' ' . esc_attr__( 'Now', 'sportspress' ) . ''; break; endswitch; endif; @@ -276,7 +276,7 @@ function sportspress_post_updated_messages( $messages ) { $obj = get_post_type_object( $typenow ); for ( $i = 0; $i <= 10; $i++ ) : - $messages['post'][ $i ] = __( 'Settings saved.', 'sportspress' ) . + $messages['post'][ $i ] = esc_attr__( 'Settings saved.', 'sportspress' ) . ' ' . __( 'View All', 'sportspress' ) . ''; endfor; @@ -284,31 +284,31 @@ function sportspress_post_updated_messages( $messages ) { elseif ( in_array( $typenow, array( 'sp_event', 'sp_team', 'sp_table', 'sp_player', 'sp_list', 'sp_staff' ) ) ) : $obj = get_post_type_object( $typenow ); - $messages['post'][1] = __( 'Changes saved.', 'sportspress' ) . + $messages['post'][1] = esc_attr__( 'Changes saved.', 'sportspress' ) . ' ' . $obj->labels->view_item . ''; - $messages['post'][4] = __( 'Changes saved.', 'sportspress' ); + $messages['post'][4] = esc_attr__( 'Changes saved.', 'sportspress' ); - $messages['post'][6] = __( 'Success!', 'sportspress' ) . + $messages['post'][6] = esc_attr__( 'Success!', 'sportspress' ) . ' ' . $obj->labels->view_item . ''; - $messages['post'][7] = __( 'Changes saved.', 'sportspress' ); + $messages['post'][7] = esc_attr__( 'Changes saved.', 'sportspress' ); - $messages['post'][8] = __( 'Success!', 'sportspress' ) . + $messages['post'][8] = esc_attr__( 'Success!', 'sportspress' ) . ' ' . - sprintf( __( 'Preview %s', 'sportspress' ), $obj->labels->singular_name ) . ''; + sprintf( esc_attr__( 'Preview %s', 'sportspress' ), $obj->labels->singular_name ) . ''; $messages['post'][9] = sprintf( __( 'Scheduled for: %1$s.', 'sportspress' ), - date_i18n( __( 'M j, Y @ G:i', 'sportspress' ), strtotime( $post->post_date ) ), + date_i18n( esc_attr__( 'M j, Y @ G:i', 'sportspress' ), strtotime( $post->post_date ) ), esc_url( get_permalink( $post->ID ) ) ) . ' ' . - sprintf( __( 'Preview %s', 'sportspress' ), $obj->labels->singular_name ) . ''; + sprintf( esc_attr__( 'Preview %s', 'sportspress' ), $obj->labels->singular_name ) . ''; - $messages['post'][10] = __( 'Success!', 'sportspress' ) . + $messages['post'][10] = esc_attr__( 'Success!', 'sportspress' ) . ' ' . - sprintf( __( 'Preview %s', 'sportspress' ), $obj->labels->singular_name ) . ''; + sprintf( esc_attr__( 'Preview %s', 'sportspress' ), $obj->labels->singular_name ) . ''; endif; diff --git a/includes/widgets/class-sp-widget-birthdays.php b/includes/widgets/class-sp-widget-birthdays.php index a90a7c03..073ac8e5 100644 --- a/includes/widgets/class-sp-widget-birthdays.php +++ b/includes/widgets/class-sp-widget-birthdays.php @@ -4,9 +4,9 @@ class SP_Widget_Birthdays extends WP_Widget { function __construct() { $widget_ops = array( 'classname' => 'widget_sportspress widget_birthdays widget_sp_birthdays', - 'description' => __( 'Display players and staff on their birthday.', 'sportspress' ), + 'description' => esc_attr__( 'Display players and staff on their birthday.', 'sportspress' ), ); - parent::__construct( 'sportspress-birthdays', __( 'Birthdays', 'sportspress' ), $widget_ops ); + parent::__construct( 'sportspress-birthdays', esc_attr__( 'Birthdays', 'sportspress' ), $widget_ops ); } function widget( $args, $instance ) { @@ -16,10 +16,10 @@ class SP_Widget_Birthdays extends WP_Widget { $birthday_format = empty( $instance['birthday_format'] ) ? 'birthday' : strip_tags( $instance['birthday_format'] ); do_action( 'sportspress_before_widget', $args, $instance, 'birthdays' ); - echo $before_widget; + echo wp_kses_post( $before_widget ); if ( $title ) { - echo $before_title . $title . $after_title; + echo wp_kses_post( $before_title . $title . $after_title ); } // Action to hook into @@ -36,7 +36,7 @@ class SP_Widget_Birthdays extends WP_Widget { // Action to hook into do_action( 'sportspress_after_widget_template', $args, $instance, 'birthdays' ); - echo $after_widget; + echo wp_kses_post( $after_widget ); do_action( 'sportspress_after_widget', $args, $instance, 'birthdays' ); } @@ -64,37 +64,37 @@ class SP_Widget_Birthdays extends WP_Widget { $title = strip_tags( $instance['title'] ); $date = strip_tags( $instance['date'] ); $options = array( - 'day' => __( 'Today', 'sportspress' ), - 'week' => __( 'This week', 'sportspress' ), - 'month' => __( 'This month', 'sportspress' ), + 'day' => esc_attr__( 'Today', 'sportspress' ), + 'week' => esc_attr__( 'This week', 'sportspress' ), + 'month' => esc_attr__( 'This month', 'sportspress' ), ); $birthday_format = strip_tags( $instance['birthday_format'] ); $birthday_options = array( - 'hide' => __( 'Hide', 'sportspress' ), - 'birthday' => __( 'Birthday', 'sportspress' ), - 'age' => __( 'Age', 'sportspress' ), - 'birthdayage' => __( 'Birthday (Age)', 'sportspress' ), + 'hide' => esc_attr__( 'Hide', 'sportspress' ), + 'birthday' => esc_attr__( 'Birthday', 'sportspress' ), + 'age' => esc_attr__( 'Age', 'sportspress' ), + 'birthdayage' => esc_attr__( 'Birthday (Age)', 'sportspress' ), ); // Action to hook into do_action( 'sportspress_before_widget_template_form', $this, $instance, 'birthdays' ); ?> -

-

+

+

- - $label ) { ?> - +

- - $label ) { ?> - +

diff --git a/includes/widgets/class-sp-widget-countdown.php b/includes/widgets/class-sp-widget-countdown.php index e917b3fe..296b1ba3 100644 --- a/includes/widgets/class-sp-widget-countdown.php +++ b/includes/widgets/class-sp-widget-countdown.php @@ -4,9 +4,9 @@ class SP_Widget_Countdown extends WP_Widget { function __construct() { $widget_ops = array( 'classname' => 'widget_sportspress widget_countdown widget_sp_countdown', - 'description' => __( 'A clock that counts down to an upcoming event.', 'sportspress' ), + 'description' => esc_attr__( 'A clock that counts down to an upcoming event.', 'sportspress' ), ); - parent::__construct( 'sportspress-countdown', __( 'Countdown', 'sportspress' ), $widget_ops ); + parent::__construct( 'sportspress-countdown', esc_attr__( 'Countdown', 'sportspress' ), $widget_ops ); } function widget( $args, $instance ) { @@ -25,10 +25,10 @@ class SP_Widget_Countdown extends WP_Widget { $show_status = empty( $instance['show_status'] ) ? false : $instance['show_status']; do_action( 'sportspress_before_widget', $args, $instance, 'countdown' ); - echo $before_widget; + echo wp_kses_post( $before_widget ); if ( $title ) { - echo $before_title . $title . $after_title; + echo wp_kses_post( $before_title . $title . $after_title ); } // Action to hook into @@ -54,7 +54,7 @@ class SP_Widget_Countdown extends WP_Widget { // Action to hook into do_action( 'sportspress_after_widget_template', $args, $instance, 'countdown' ); - echo $after_widget; + echo wp_kses_post( $after_widget ); do_action( 'sportspress_after_widget', $args, $instance, 'countdown' ); } @@ -113,69 +113,69 @@ class SP_Widget_Countdown extends WP_Widget { // Action to hook into do_action( 'sportspress_before_widget_template_form', $this, $instance, 'countdown' ); ?> -

-

+

+

-

-

+

+

-

+

'sp_calendar', 'name' => $this->get_field_name( 'calendar' ), 'id' => $this->get_field_id( 'calendar' ), 'selected' => $calendar, - 'show_option_all' => __( 'All', 'sportspress' ), + 'show_option_all' => esc_attr__( 'All', 'sportspress' ), 'values' => 'ID', 'class' => 'widefat', ); if ( ! sp_dropdown_pages( $args ) ) : - sp_post_adder( 'sp_calendar', __( 'Add New', 'sportspress' ) ); + sp_post_adder( 'sp_calendar', esc_attr__( 'Add New', 'sportspress' ) ); endif; ?>

-

- + + +

-

- + +

-

+

'sp_team', 'name' => $this->get_field_name( 'team' ), 'id' => $this->get_field_id( 'team' ), 'selected' => $team, - 'show_option_all' => __( 'All', 'sportspress' ), + 'show_option_all' => esc_attr__( 'All', 'sportspress' ), 'values' => 'ID', 'class' => 'widefat', ); if ( ! sp_dropdown_pages( $args ) ) : - sp_post_adder( 'sp_team', __( 'Add New', 'sportspress' ) ); + sp_post_adder( 'sp_team', esc_attr__( 'Add New', 'sportspress' ) ); endif; ?>

-

+

'sp_event', 'name' => $this->get_field_name( 'id' ), 'id' => $this->get_field_id( 'id' ), 'selected' => $id, - 'show_option_all' => __( '(Auto)', 'sportspress' ), + 'show_option_all' => esc_attr__( '(Auto)', 'sportspress' ), 'values' => 'ID', 'class' => 'widefat', 'show_dates' => true, @@ -183,25 +183,25 @@ class SP_Widget_Countdown extends WP_Widget { 'filter' => 'sp_team', ); if ( ! sp_dropdown_pages( $args ) ) : - sp_post_adder( 'sp_event', __( 'Add New', 'sportspress' ) ); + sp_post_adder( 'sp_event', esc_attr__( 'Add New', 'sportspress' ) ); endif; ?>

-

> -

+

> +

-

> -

+

> +

-

> -

+

> +

-

> -

+

> +

-

> -

+

> +

'widget_sportspress widget_sp_event_blocks', - 'description' => __( 'A list of events.', 'sportspress' ), + 'description' => esc_attr__( 'A list of events.', 'sportspress' ), ); - parent::__construct( 'sportspress-event-blocks', __( 'Event Blocks', 'sportspress' ), $widget_ops ); + parent::__construct( 'sportspress-event-blocks', esc_attr__( 'Event Blocks', 'sportspress' ), $widget_ops ); } function widget( $args, $instance ) { @@ -35,10 +35,10 @@ class SP_Widget_Event_Blocks extends WP_Widget { $show_all_events_link = empty( $instance['show_all_events_link'] ) ? false : $instance['show_all_events_link']; do_action( 'sportspress_before_widget', $args, $instance, 'event-blocks' ); - echo $before_widget; + echo wp_kses_post( $before_widget ); if ( $title ) { - echo $before_title . $title . $after_title; + echo wp_kses_post( $before_title . $title . $after_title ); } // Action to hook into @@ -66,7 +66,7 @@ class SP_Widget_Event_Blocks extends WP_Widget { // Action to hook into do_action( 'sportspress_after_widget_template', $args, $instance, 'event-blocks' ); - echo $after_widget; + echo wp_kses_post( $after_widget ); do_action( 'sportspress_after_widget', $args, $instance, 'event-blocks' ); } @@ -131,17 +131,17 @@ class SP_Widget_Event_Blocks extends WP_Widget { // Action to hook into do_action( 'sportspress_before_widget_template_form', $this, $instance, 'event-blocks' ); ?> -

-

+

+

-

-

+

+

-

+

'sp_calendar', - 'show_option_all' => __( 'All', 'sportspress' ), + 'show_option_all' => esc_attr__( 'All', 'sportspress' ), 'name' => $this->get_field_name( 'id' ), 'id' => $this->get_field_id( 'id' ), 'selected' => $id, @@ -149,15 +149,15 @@ class SP_Widget_Event_Blocks extends WP_Widget { 'class' => 'sp-event-calendar-select widefat', ); if ( ! sp_dropdown_pages( $args ) ) : - sp_post_adder( 'sp_calendar', __( 'Add New', 'sportspress' ) ); + sp_post_adder( 'sp_calendar', esc_attr__( 'Add New', 'sportspress' ) ); endif; ?>

-

+

__( 'Default', 'sportspress' ), + 'show_option_default' => esc_attr__( 'Default', 'sportspress' ), 'name' => $this->get_field_name( 'status' ), 'id' => $this->get_field_id( 'status' ), 'selected' => $status, @@ -168,10 +168,10 @@ class SP_Widget_Event_Blocks extends WP_Widget {

-

+

__( 'Default', 'sportspress' ), + 'show_option_default' => esc_attr__( 'Default', 'sportspress' ), 'name' => $this->get_field_name( 'date' ), 'id' => $this->get_field_id( 'date' ), 'selected' => $date, @@ -190,9 +190,9 @@ class SP_Widget_Event_Blocks extends WP_Widget { if ( $date_relative ) : ?> hidden"> - + : - +

- - + + → - - - + + +

-

-

+

+

-

-

+

+

-

- + + +

> -

+ hidden">> +

'widget_sportspress widget_calendar widget_sp_event_calendar', - 'description' => __( 'A calendar of events.', 'sportspress' ), + 'description' => esc_attr__( 'A calendar of events.', 'sportspress' ), ); - parent::__construct( 'sportspress-event-calendar', __( 'Event Calendar', 'sportspress' ), $widget_ops ); + parent::__construct( 'sportspress-event-calendar', esc_attr__( 'Event Calendar', 'sportspress' ), $widget_ops ); } function widget( $args, $instance ) { @@ -32,10 +32,10 @@ class SP_Widget_Event_Calendar extends WP_Widget { $show_all_events_link = empty( $instance['show_all_events_link'] ) ? false : $instance['show_all_events_link']; do_action( 'sportspress_before_widget', $args, $instance, 'event-calendar' ); - echo $before_widget; + echo wp_kses_post( $before_widget ); if ( $title ) { - echo $before_title . $title . $after_title; + echo wp_kses_post( $before_title . $title . $after_title ); } // Action to hook into @@ -61,7 +61,7 @@ class SP_Widget_Event_Calendar extends WP_Widget { // Action to hook into do_action( 'sportspress_after_widget_template', $args, $instance, 'event-calendar' ); - echo $after_widget; + echo wp_kses_post( $after_widget ); do_action( 'sportspress_after_widget', $args, $instance, 'event-calendar' ); } @@ -117,14 +117,14 @@ class SP_Widget_Event_Calendar extends WP_Widget { // Action to hook into do_action( 'sportspress_before_widget_template_form', $this, $instance, 'event-calendar' ); ?> -

-

+

+

-

+

'sp_calendar', - 'show_option_all' => __( 'All', 'sportspress' ), + 'show_option_all' => esc_attr__( 'All', 'sportspress' ), 'name' => $this->get_field_name( 'id' ), 'id' => $this->get_field_id( 'id' ), 'selected' => $id, @@ -132,15 +132,15 @@ class SP_Widget_Event_Calendar extends WP_Widget { 'class' => 'sp-event-calendar-select widefat', ); if ( ! sp_dropdown_pages( $args ) ) : - sp_post_adder( 'sp_calendar', __( 'Add New', 'sportspress' ) ); + sp_post_adder( 'sp_calendar', esc_attr__( 'Add New', 'sportspress' ) ); endif; ?>

-

+

__( 'Default', 'sportspress' ), + 'show_option_default' => esc_attr__( 'Default', 'sportspress' ), 'name' => $this->get_field_name( 'status' ), 'id' => $this->get_field_id( 'status' ), 'selected' => $status, @@ -151,10 +151,10 @@ class SP_Widget_Event_Calendar extends WP_Widget {

-

+

__( 'Default', 'sportspress' ), + 'show_option_default' => esc_attr__( 'Default', 'sportspress' ), 'name' => $this->get_field_name( 'date' ), 'id' => $this->get_field_id( 'date' ), 'selected' => $date, @@ -173,9 +173,9 @@ class SP_Widget_Event_Calendar extends WP_Widget { if ( $date_relative ) : ?> hidden"> - + : - +

- - + + → - - - + + +

-

-

+

+

> -

+ hidden">> +

'widget_sportspress widget_sp_event_list', - 'description' => __( 'A list of events.', 'sportspress' ), + 'description' => esc_attr__( 'A list of events.', 'sportspress' ), ); - parent::__construct( 'sportspress-event-list', __( 'Event List', 'sportspress' ), $widget_ops ); + parent::__construct( 'sportspress-event-list', esc_attr__( 'Event List', 'sportspress' ), $widget_ops ); } function widget( $args, $instance ) { @@ -36,10 +36,10 @@ class SP_Widget_Event_List extends WP_Widget { $show_all_events_link = empty( $instance['show_all_events_link'] ) ? false : $instance['show_all_events_link']; do_action( 'sportspress_before_widget', $args, $instance, 'event-list' ); - echo $before_widget; + echo wp_kses_post( $before_widget ); if ( $title ) { - echo $before_title . $title . $after_title; + echo wp_kses_post( $before_title . $title . $after_title ); } // Action to hook into @@ -68,7 +68,7 @@ class SP_Widget_Event_List extends WP_Widget { // Action to hook into do_action( 'sportspress_after_widget_template', $args, $instance, 'event-list' ); - echo $after_widget; + echo wp_kses_post( $after_widget ); do_action( 'sportspress_after_widget', $args, $instance, 'event-list' ); } @@ -138,17 +138,17 @@ class SP_Widget_Event_List extends WP_Widget { // Action to hook into do_action( 'sportspress_before_widget_template_form', $this, $instance, 'event-list' ); ?> -

-

+

+

-

-

+

+

-

+

'sp_calendar', - 'show_option_all' => __( 'All', 'sportspress' ), + 'show_option_all' => esc_attr__( 'All', 'sportspress' ), 'name' => $this->get_field_name( 'id' ), 'id' => $this->get_field_id( 'id' ), 'selected' => $id, @@ -156,15 +156,15 @@ class SP_Widget_Event_List extends WP_Widget { 'class' => 'sp-event-calendar-select widefat', ); if ( ! sp_dropdown_pages( $args ) ) : - sp_post_adder( 'sp_calendar', __( 'Add New', 'sportspress' ) ); + sp_post_adder( 'sp_calendar', esc_attr__( 'Add New', 'sportspress' ) ); endif; ?>

-

+

__( 'Default', 'sportspress' ), + 'show_option_default' => esc_attr__( 'Default', 'sportspress' ), 'name' => $this->get_field_name( 'status' ), 'id' => $this->get_field_id( 'status' ), 'selected' => $status, @@ -175,10 +175,10 @@ class SP_Widget_Event_List extends WP_Widget {

-

+

__( 'Default', 'sportspress' ), + 'show_option_default' => esc_attr__( 'Default', 'sportspress' ), 'name' => $this->get_field_name( 'date' ), 'id' => $this->get_field_id( 'date' ), 'selected' => $date, @@ -197,9 +197,9 @@ class SP_Widget_Event_List extends WP_Widget { if ( $date_relative ) : ?> hidden"> - + : - +

- - + + → - - - + + +

-

-

+

+

-

-

+

+

-

- + + +

-
+
get_field_name( 'columns' ) . '[]'; $field_id = $this->get_field_id( 'columns' ); ?> $label ) : ?> - + checked="checked">

@@ -278,8 +278,8 @@ class SP_Widget_Event_List extends WP_Widget { - hidden">> -

+ hidden">> +

'widget_sportspress widget_league_table widget_sp_league_table', - 'description' => __( 'Display a league table.', 'sportspress' ), + 'description' => esc_attr__( 'Display a league table.', 'sportspress' ), ); - parent::__construct( 'sportspress-league-table', __( 'League Table', 'sportspress' ), $widget_ops ); + parent::__construct( 'sportspress-league-table', esc_attr__( 'League Table', 'sportspress' ), $widget_ops ); } function widget( $args, $instance ) { @@ -30,10 +30,10 @@ class SP_Widget_League_Table extends WP_Widget { $show_full_table_link = empty( $instance['show_full_table_link'] ) ? false : $instance['show_full_table_link']; do_action( 'sportspress_before_widget', $args, $instance, 'league-table' ); - echo $before_widget; + echo wp_kses_post( $before_widget ); if ( $title ) { - echo $before_title . $title . $after_title; + echo wp_kses_post( $before_title . $title . $after_title ); } // Action to hook into @@ -54,7 +54,7 @@ class SP_Widget_League_Table extends WP_Widget { // Action to hook into do_action( 'sportspress_after_widget_template', $args, $instance, 'league-table' ); - echo $after_widget; + echo wp_kses_post( $after_widget ); do_action( 'sportspress_after_widget', $args, $instance, 'league-table' ); } @@ -99,34 +99,34 @@ class SP_Widget_League_Table extends WP_Widget { // Action to hook into do_action( 'sportspress_before_widget_template_form', $this, $instance, 'league-table' ); ?> -

-

+

+

-

-

+

+

-

+

'sp_table', 'name' => $this->get_field_name( 'id' ), 'id' => $this->get_field_id( 'id' ), - 'show_option_none' => __( '— Select —', 'sportspress' ), + 'show_option_none' => esc_attr__( '— Select —', 'sportspress' ), 'selected' => $id, 'values' => 'ID', 'class' => 'widefat', ); if ( ! sp_dropdown_pages( $args ) ) : - sp_post_adder( 'sp_table', __( 'Add New', 'sportspress' ) ); + sp_post_adder( 'sp_table', esc_attr__( 'Add New', 'sportspress' ) ); endif; ?>

-

-

+

+

-
+
'sp_column', @@ -141,19 +141,19 @@ class SP_Widget_League_Table extends WP_Widget { $field_id = $this->get_field_id( 'columns' ); ?> - + checked="checked">post_title ); ?>

-

> -
+

> +
- > -

+ > +

'widget_sportspress widget_player_gallery widget_sp_player_gallery', - 'description' => __( 'Display a gallery of players.', 'sportspress' ), + 'description' => esc_attr__( 'Display a gallery of players.', 'sportspress' ), ); - parent::__construct( 'sportspress-player-gallery', __( 'Player Gallery', 'sportspress' ), $widget_ops ); + parent::__construct( 'sportspress-player-gallery', esc_attr__( 'Player Gallery', 'sportspress' ), $widget_ops ); } function widget( $args, $instance ) { @@ -34,10 +34,10 @@ class SP_Widget_Player_Gallery extends WP_Widget { $show_all_players_link = empty( $instance['show_all_players_link'] ) ? false : $instance['show_all_players_link']; do_action( 'sportspress_before_widget', $args, $instance, 'player-gallery' ); - echo $before_widget; + echo wp_kses_post( $before_widget ); if ( $title ) { - echo $before_title . $title . $after_title; + echo wp_kses_post( $before_title . $title . $after_title ); } // Action to hook into @@ -60,7 +60,7 @@ class SP_Widget_Player_Gallery extends WP_Widget { // Action to hook into do_action( 'sportspress_after_widget_template', $args, $instance, 'player-gallery' ); - echo $after_widget; + echo wp_kses_post( $after_widget ); do_action( 'sportspress_after_widget', $args, $instance, 'player-gallery' ); } @@ -107,13 +107,13 @@ class SP_Widget_Player_Gallery extends WP_Widget { // Action to hook into do_action( 'sportspress_before_widget_template_form', $this, $instance, 'player-gallery' ); ?> -

-

+

+

-

-

+

+

-

+

'sp_list', @@ -124,28 +124,28 @@ class SP_Widget_Player_Gallery extends WP_Widget { 'class' => 'widefat', ); if ( ! sp_dropdown_pages( $args ) ) : - sp_post_adder( 'sp_list', __( 'Add New', 'sportspress' ) ); + sp_post_adder( 'sp_list', esc_attr__( 'Add New', 'sportspress' ) ); endif; ?>

-

-

+

+

-

-

+

+

-

+

array( - 'default' => __( 'Default', 'sportspress' ), - 'number' => __( 'Squad Number', 'sportspress' ), - 'name' => __( 'Name', 'sportspress' ), - 'eventsplayed' => __( 'Played', 'sportspress' ), + 'default' => esc_attr__( 'Default', 'sportspress' ), + 'number' => esc_attr__( 'Squad Number', 'sportspress' ), + 'name' => esc_attr__( 'Name', 'sportspress' ), + 'eventsplayed' => esc_attr__( 'Played', 'sportspress' ), ), 'append_options' => array( - 'rand' => __( 'Random', 'sportspress' ), + 'rand' => esc_attr__( 'Random', 'sportspress' ), ), 'post_type' => 'sp_performance', 'name' => $this->get_field_name( 'orderby' ), @@ -155,19 +155,19 @@ class SP_Widget_Player_Gallery extends WP_Widget { 'class' => 'sp-select-orderby widefat', ); if ( ! sp_dropdown_pages( $args ) ) : - sp_post_adder( 'sp_list', __( 'Add New', 'sportspress' ) ); + sp_post_adder( 'sp_list', esc_attr__( 'Add New', 'sportspress' ) ); endif; ?>

-

- > + +

-

> -

+

> +

'widget_sportspress widget_player_list widget_sp_player_list', - 'description' => __( 'Display a list of players.', 'sportspress' ), + 'description' => esc_attr__( 'Display a list of players.', 'sportspress' ), ); - parent::__construct( 'sportspress-player-list', __( 'Player List', 'sportspress' ), $widget_ops ); + parent::__construct( 'sportspress-player-list', esc_attr__( 'Player List', 'sportspress' ), $widget_ops ); } function widget( $args, $instance ) { @@ -34,10 +34,10 @@ class SP_Widget_Player_list extends WP_Widget { $show_all_players_link = empty( $instance['show_all_players_link'] ) ? false : $instance['show_all_players_link']; do_action( 'sportspress_before_widget', $args, $instance, 'player-list' ); - echo $before_widget; + echo wp_kses_post( $before_widget ); if ( $title ) { - echo $before_title . $title . $after_title; + echo wp_kses_post( $before_title . $title . $after_title ); } // Action to hook into @@ -60,7 +60,7 @@ class SP_Widget_Player_list extends WP_Widget { // Action to hook into do_action( 'sportspress_after_widget_template', $args, $instance, 'player-list' ); - echo $after_widget; + echo wp_kses_post( $after_widget ); do_action( 'sportspress_after_widget', $args, $instance, 'player-list' ); } @@ -107,13 +107,13 @@ class SP_Widget_Player_list extends WP_Widget { // Action to hook into do_action( 'sportspress_before_widget_template_form', $this, $instance, 'player-list' ); ?> -

-

+

+

-

-

+

+

-

+

'sp_list', @@ -124,16 +124,16 @@ class SP_Widget_Player_list extends WP_Widget { 'class' => 'widefat', ); if ( ! sp_dropdown_pages( $args ) ) : - sp_post_adder( 'sp_list', __( 'Add New', 'sportspress' ) ); + sp_post_adder( 'sp_list', esc_attr__( 'Add New', 'sportspress' ) ); endif; ?>

-

-

+

+

-
+
array( 'sp_metric', 'sp_performance', 'sp_statistic' ), @@ -147,40 +147,40 @@ class SP_Widget_Player_list extends WP_Widget { $field_name = $this->get_field_name( 'columns' ) . '[]'; $field_id = $this->get_field_id( 'columns' ); ?> - - + checked="checked">post_title ); ?>

-

+

array( - 'default' => __( 'Default', 'sportspress' ), - 'number' => __( 'Squad Number', 'sportspress' ), - 'name' => __( 'Name', 'sportspress' ), - 'eventsplayed' => __( 'Played', 'sportspress' ), + 'default' => esc_attr__( 'Default', 'sportspress' ), + 'number' => esc_attr__( 'Squad Number', 'sportspress' ), + 'name' => esc_attr__( 'Name', 'sportspress' ), + 'eventsplayed' => esc_attr__( 'Played', 'sportspress' ), ), 'post_type' => array( 'sp_metric', 'sp_performance', 'sp_statistic' ), 'name' => $this->get_field_name( 'orderby' ), @@ -190,19 +190,19 @@ class SP_Widget_Player_list extends WP_Widget { 'class' => 'sp-select-orderby widefat', ); if ( ! sp_dropdown_pages( $args ) ) : - sp_post_adder( 'sp_list', __( 'Add New', 'sportspress' ) ); + sp_post_adder( 'sp_list', esc_attr__( 'Add New', 'sportspress' ) ); endif; ?>

-

- > + +

-

> -

+

> +

'widget_sportspress widget_staff widget_sp_staff', - 'description' => __( 'Display a single staff member.', 'sportspress' ), + 'description' => esc_attr__( 'Display a single staff member.', 'sportspress' ), ); - parent::__construct( 'sportspress-staff', __( 'Staff', 'sportspress' ), $widget_ops ); + parent::__construct( 'sportspress-staff', esc_attr__( 'Staff', 'sportspress' ), $widget_ops ); } function widget( $args, $instance ) { @@ -15,16 +15,16 @@ class SP_Widget_Staff extends WP_Widget { $id = empty( $instance['id'] ) ? null : $instance['id']; do_action( 'sportspress_before_widget', $args, $instance, 'staff' ); - echo $before_widget; + echo wp_kses_post( $before_widget ); if ( $title ) { - echo $before_title . $title . $after_title; + echo wp_kses_post( $before_title . $title . $after_title ); } // Action to hook into do_action( 'sportspress_before_widget_template', $args, $instance, 'staff' ); - echo '

' . get_the_title( $id ) . '

'; + echo '

' . wp_kses_post( get_the_title( $id ) ) . '

'; sp_get_template( 'staff-photo.php', array( 'id' => $id ) ); sp_get_template( 'staff-details.php', array( 'id' => $id ) ); @@ -32,7 +32,7 @@ class SP_Widget_Staff extends WP_Widget { // Action to hook into do_action( 'sportspress_after_widget_template', $args, $instance, 'staff' ); - echo $after_widget; + echo wp_kses_post( $after_widget ); do_action( 'sportspress_after_widget', $args, $instance, 'staff' ); } @@ -61,10 +61,10 @@ class SP_Widget_Staff extends WP_Widget { // Action to hook into do_action( 'sportspress_before_widget_template_form', $this, $instance, 'staff' ); ?> -

-

+

+

-

+

'sp_staff', @@ -75,7 +75,7 @@ class SP_Widget_Staff extends WP_Widget { 'class' => 'widefat', ); if ( ! sp_dropdown_pages( $args ) ) : - sp_post_adder( 'sp_staff', __( 'Add New', 'sportspress' ) ); + sp_post_adder( 'sp_staff', esc_attr__( 'Add New', 'sportspress' ) ); endif; ?>

diff --git a/includes/widgets/class-sp-widget-team-gallery.php b/includes/widgets/class-sp-widget-team-gallery.php index c310e5d4..d98fa84b 100644 --- a/includes/widgets/class-sp-widget-team-gallery.php +++ b/includes/widgets/class-sp-widget-team-gallery.php @@ -4,9 +4,9 @@ class SP_Widget_Team_Gallery extends WP_Widget { function __construct() { $widget_ops = array( 'classname' => 'widget_sportspress widget_team_gallery widget_sp_team_gallery', - 'description' => __( 'Display a gallery of teams.', 'sportspress' ), + 'description' => esc_attr__( 'Display a gallery of teams.', 'sportspress' ), ); - parent::__construct( 'sportspress-team-gallery', __( 'Team Gallery', 'sportspress' ), $widget_ops ); + parent::__construct( 'sportspress-team-gallery', esc_attr__( 'Team Gallery', 'sportspress' ), $widget_ops ); } function widget( $args, $instance ) { @@ -33,10 +33,10 @@ class SP_Widget_Team_Gallery extends WP_Widget { $show_all_teams_link = empty( $instance['show_all_teams_link'] ) ? false : $instance['show_all_teams_link']; do_action( 'sportspress_before_widget', $args, $instance, 'team-gallery' ); - echo $before_widget; + echo wp_kses_post( $before_widget ); if ( $title ) { - echo $before_title . $title . $after_title; + echo wp_kses_post( $before_title . $title . $after_title ); } // Action to hook into @@ -58,7 +58,7 @@ class SP_Widget_Team_Gallery extends WP_Widget { // Action to hook into do_action( 'sportspress_after_widget_template', $args, $instance, 'team-gallery' ); - echo $after_widget; + echo wp_kses_post( $after_widget ); do_action( 'sportspress_after_widget', $args, $instance, 'team-gallery' ); } @@ -102,13 +102,13 @@ class SP_Widget_Team_Gallery extends WP_Widget { // Action to hook into do_action( 'sportspress_before_widget_template_form', $this, $instance, 'team-gallery' ); ?> -

-

+

+

-

-

+

+

-

+

'sp_table', @@ -119,26 +119,26 @@ class SP_Widget_Team_Gallery extends WP_Widget { 'class' => 'widefat', ); if ( ! sp_dropdown_pages( $args ) ) : - sp_post_adder( 'sp_table', __( 'Add New', 'sportspress' ) ); + sp_post_adder( 'sp_table', esc_attr__( 'Add New', 'sportspress' ) ); endif; ?>

-

-

+

+

-

-

+

+

-

- + + +

-

> -

+

> +

'sportspress', - 'title' => __( 'SportsPress', 'sportspress' ), + 'title' => esc_attr__( 'SportsPress', 'sportspress' ), 'href' => add_query_arg( 'page', 'sportspress', admin_url( 'admin.php' ) ), ); $wp_admin_bar->add_node( $args ); diff --git a/modules/sportspress-birthdays.php b/modules/sportspress-birthdays.php index 10612872..3c980832 100644 --- a/modules/sportspress-birthdays.php +++ b/modules/sportspress-birthdays.php @@ -74,9 +74,9 @@ if ( ! class_exists( 'SportsPress_Birthdays' ) ) : case 'Published on: %1$s': case 'Schedule for: %1$s': case 'Publish on: %1$s': - return __( 'Birthday: %1$s', 'sportspress' ); + return esc_attr__( 'Birthday: %1$s', 'sportspress' ); case 'Publish immediately': - return __( 'Birthday', 'sportspress' ); + return esc_attr__( 'Birthday', 'sportspress' ); case 'M j, Y @ G:i': return 'M j, Y'; case '%1$s %2$s, %3$s @ %4$s : %5$s': @@ -112,8 +112,8 @@ if ( ! class_exists( 'SportsPress_Birthdays' ) ) : $options, array( array( - 'title' => __( 'Birthday', 'sportspress' ), - 'desc' => __( 'Display birthday', 'sportspress' ), + 'title' => esc_attr__( 'Birthday', 'sportspress' ), + 'desc' => esc_attr__( 'Display birthday', 'sportspress' ), 'id' => 'sportspress_player_show_birthday', 'default' => 'no', 'type' => 'checkbox', @@ -121,7 +121,7 @@ if ( ! class_exists( 'SportsPress_Birthdays' ) ) : ), array( - 'desc' => __( 'Display age', 'sportspress' ), + 'desc' => esc_attr__( 'Display age', 'sportspress' ), 'id' => 'sportspress_player_show_age', 'default' => 'no', 'type' => 'checkbox', @@ -143,8 +143,8 @@ if ( ! class_exists( 'SportsPress_Birthdays' ) ) : $options, array( array( - 'title' => __( 'Birthday', 'sportspress' ), - 'desc' => __( 'Display birthday', 'sportspress' ), + 'title' => esc_attr__( 'Birthday', 'sportspress' ), + 'desc' => esc_attr__( 'Display birthday', 'sportspress' ), 'id' => 'sportspress_staff_show_birthday', 'default' => 'no', 'type' => 'checkbox', @@ -152,7 +152,7 @@ if ( ! class_exists( 'SportsPress_Birthdays' ) ) : ), array( - 'desc' => __( 'Display age', 'sportspress' ), + 'desc' => esc_attr__( 'Display age', 'sportspress' ), 'id' => 'sportspress_staff_show_age', 'default' => 'no', 'type' => 'checkbox', @@ -171,11 +171,11 @@ if ( ! class_exists( 'SportsPress_Birthdays' ) ) : */ public function add_player_details( $data, $post_id ) { if ( 'yes' == get_option( 'sportspress_player_show_birthday', 'no' ) ) { - $data[ __( 'Birthday', 'sportspress' ) ] = get_the_date( get_option( 'date_format' ), $post_id ); + $data[ esc_attr__( 'Birthday', 'sportspress' ) ] = get_the_date( get_option( 'date_format' ), $post_id ); } if ( 'yes' == get_option( 'sportspress_player_show_age', 'no' ) ) { - $data[ __( 'Age', 'sportspress' ) ] = $this->get_age( get_the_date( 'm-d-Y', $post_id ) ); + $data[ esc_attr__( 'Age', 'sportspress' ) ] = $this->get_age( get_the_date( 'm-d-Y', $post_id ) ); } return $data; @@ -188,11 +188,11 @@ if ( ! class_exists( 'SportsPress_Birthdays' ) ) : */ public function add_staff_details( $data, $post_id ) { if ( 'yes' == get_option( 'sportspress_staff_show_birthday', 'no' ) ) { - $data[ __( 'Birthday', 'sportspress' ) ] = get_the_date( get_option( 'date_format' ), $post_id ); + $data[ esc_attr__( 'Birthday', 'sportspress' ) ] = get_the_date( get_option( 'date_format' ), $post_id ); } if ( 'yes' == get_option( 'sportspress_staff_show_age', 'no' ) ) { - $data[ __( 'Age', 'sportspress' ) ] = $this->get_age( get_the_date( 'm-d-Y', $post_id ) ); + $data[ esc_attr__( 'Age', 'sportspress' ) ] = $this->get_age( get_the_date( 'm-d-Y', $post_id ) ); } return $data; @@ -213,13 +213,13 @@ if ( ! class_exists( 'SportsPress_Birthdays' ) ) :
  • ' . - _n( + esc_attr( _n( 'Generated %s calendar.', 'Generated %s calendars.', $count, 'sportspress' - ) . ' ' . __( 'View', 'sportspress' ) . '

    ', - $count + ) ) . ' ' . esc_attr__( 'View', 'sportspress' ) . '

    ', + esc_attr( $count ) ); } elseif ( ! empty( $_REQUEST['sp_bulk_postponed_events'] ) ) { $count = intval( $_REQUEST['sp_bulk_postponed_events'] ); printf( '

    ' . - _n( + esc_attr( _n( 'Postponed %s event.', 'Postponed %s events.', $count, 'sportspress' - ) . '

    ', - $count + ) ) . '

    ', + esc_attr( $count ) ); } elseif ( ! empty( $_REQUEST['sp_bulk_cancelled_events'] ) ) { $count = intval( $_REQUEST['sp_bulk_cancelled_events'] ); printf( '

    ' . - _n( + esc_attr( _n( 'Canceled %s event.', 'Canceled %s events.', $count, 'sportspress' - ) . '

    ', - $count + ) ) . '

    ', + esc_attr( $count ) ); } elseif ( ! empty( $_REQUEST['sp_bulk_ok_events'] ) ) { $count = intval( $_REQUEST['sp_bulk_ok_events'] ); printf( '

    ' . - _n( + esc_attr( _n( 'Set %s event as on time.', 'Set %s event as on time.', $count, 'sportspress' - ) . '

    ', - $count + ) ) . '

    ', + esc_attr( $count ) ); } } diff --git a/modules/sportspress-calendars.php b/modules/sportspress-calendars.php index 82365241..a5acc141 100644 --- a/modules/sportspress-calendars.php +++ b/modules/sportspress-calendars.php @@ -75,15 +75,15 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) : 'sportspress_register_post_type_calendar', array( 'labels' => array( - 'name' => __( 'Calendars', 'sportspress' ), - 'singular_name' => __( 'Calendar', 'sportspress' ), - 'add_new_item' => __( 'Add New Calendar', 'sportspress' ), - 'edit_item' => __( 'Edit Calendar', 'sportspress' ), - 'new_item' => __( 'New', 'sportspress' ), - 'view_item' => __( 'View Calendar', 'sportspress' ), - 'search_items' => __( 'Search', 'sportspress' ), - 'not_found' => __( 'No results found.', 'sportspress' ), - 'not_found_in_trash' => __( 'No results found.', 'sportspress' ), + 'name' => esc_attr__( 'Calendars', 'sportspress' ), + 'singular_name' => esc_attr__( 'Calendar', 'sportspress' ), + 'add_new_item' => esc_attr__( 'Add New Calendar', 'sportspress' ), + 'edit_item' => esc_attr__( 'Edit Calendar', 'sportspress' ), + 'new_item' => esc_attr__( 'New', 'sportspress' ), + 'view_item' => esc_attr__( 'View Calendar', 'sportspress' ), + 'search_items' => esc_attr__( 'Search', 'sportspress' ), + 'not_found' => esc_attr__( 'No results found.', 'sportspress' ), + 'not_found_in_trash' => esc_attr__( 'No results found.', 'sportspress' ), ), 'public' => true, 'show_ui' => true, @@ -150,7 +150,7 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) : 'get_callback' => 'SP_REST_API::get_post_meta', 'update_callback' => 'SP_REST_API::update_post_meta', 'schema' => array( - 'description' => __( 'Layout', 'sportspress' ), + 'description' => esc_attr__( 'Layout', 'sportspress' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'arg_options' => array( @@ -166,7 +166,7 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) : array( 'get_callback' => 'SP_REST_API::get_post_data', 'schema' => array( - 'description' => __( 'Events', 'sportspress' ), + 'description' => esc_attr__( 'Events', 'sportspress' ), 'type' => 'array', 'context' => array( 'view' ), 'arg_options' => array( @@ -185,40 +185,40 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) : public function add_meta_boxes( $meta_boxes ) { $meta_boxes['sp_calendar'] = array( 'shortcode' => array( - 'title' => __( 'Shortcode', 'sportspress' ), + 'title' => esc_attr__( 'Shortcode', 'sportspress' ), 'output' => 'SP_Meta_Box_Calendar_Shortcode::output', 'context' => 'side', 'priority' => 'default', ), 'feeds' => array( - 'title' => __( 'Feeds', 'sportspress' ), + 'title' => esc_attr__( 'Feeds', 'sportspress' ), 'output' => 'SP_Meta_Box_Calendar_Feeds::output', 'context' => 'side', 'priority' => 'default', ), 'format' => array( - 'title' => __( 'Layout', 'sportspress' ), + 'title' => esc_attr__( 'Layout', 'sportspress' ), 'save' => 'SP_Meta_Box_Calendar_Format::save', 'output' => 'SP_Meta_Box_Calendar_Format::output', 'context' => 'side', 'priority' => 'default', ), 'columns' => array( - 'title' => __( 'Columns', 'sportspress' ), + 'title' => esc_attr__( 'Columns', 'sportspress' ), 'save' => 'SP_Meta_Box_Calendar_Columns::save', 'output' => 'SP_Meta_Box_Calendar_Columns::output', 'context' => 'side', 'priority' => 'default', ), 'details' => array( - 'title' => __( 'Details', 'sportspress' ), + 'title' => esc_attr__( 'Details', 'sportspress' ), 'save' => 'SP_Meta_Box_Calendar_Details::save', 'output' => 'SP_Meta_Box_Calendar_Details::output', 'context' => 'side', 'priority' => 'default', ), 'data' => array( - 'title' => __( 'Events', 'sportspress' ), + 'title' => esc_attr__( 'Events', 'sportspress' ), 'save' => 'SP_Meta_Box_Calendar_Data::save', 'output' => 'SP_Meta_Box_Calendar_Data::output', 'context' => 'normal', @@ -250,7 +250,7 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) : $settings, array( array( - 'title' => __( 'Event List', 'sportspress' ), + 'title' => esc_attr__( 'Event List', 'sportspress' ), 'type' => 'title', 'id' => 'event_list_options', ), @@ -259,60 +259,60 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) : 'sportspress_event_list_options', array( array( - 'title' => __( 'Title', 'sportspress' ), - 'desc' => __( 'Display calendar title', 'sportspress' ), + 'title' => esc_attr__( 'Title', 'sportspress' ), + 'desc' => esc_attr__( 'Display calendar title', 'sportspress' ), 'id' => 'sportspress_event_list_show_title', 'default' => 'yes', 'type' => 'checkbox', ), array( - 'title' => __( 'Teams', 'sportspress' ), - 'desc' => __( 'Display logos', 'sportspress' ), + 'title' => esc_attr__( 'Teams', 'sportspress' ), + 'desc' => esc_attr__( 'Display logos', 'sportspress' ), 'id' => 'sportspress_event_list_show_logos', 'default' => 'no', 'type' => 'checkbox', ), array( - 'title' => __( 'Title Format', 'sportspress' ), + 'title' => esc_attr__( 'Title Format', 'sportspress' ), 'id' => 'sportspress_event_list_title_format', 'default' => 'title', 'type' => 'select', 'options' => array( - 'title' => __( 'Title', 'sportspress' ), - 'teams' => __( 'Teams', 'sportspress' ), - 'homeaway' => sprintf( '%s | %s', __( 'Home', 'sportspress' ), __( 'Away', 'sportspress' ) ), + 'title' => esc_attr__( 'Title', 'sportspress' ), + 'teams' => esc_attr__( 'Teams', 'sportspress' ), + 'homeaway' => sprintf( '%s | %s', esc_attr__( 'Home', 'sportspress' ), esc_attr__( 'Away', 'sportspress' ) ), ), ), array( - 'title' => __( 'Time/Results Format', 'sportspress' ), + 'title' => esc_attr__( 'Time/Results Format', 'sportspress' ), 'id' => 'sportspress_event_list_time_format', 'default' => 'combined', 'type' => 'select', 'options' => array( - 'combined' => __( 'Combined', 'sportspress' ), - 'separate' => __( 'Separate', 'sportspress' ), - 'time' => __( 'Time Only', 'sportspress' ), - 'results' => __( 'Results Only', 'sportspress' ), + 'combined' => esc_attr__( 'Combined', 'sportspress' ), + 'separate' => esc_attr__( 'Separate', 'sportspress' ), + 'time' => esc_attr__( 'Time Only', 'sportspress' ), + 'results' => esc_attr__( 'Results Only', 'sportspress' ), ), ), array( - 'title' => __( 'Pagination', 'sportspress' ), - 'desc' => __( 'Paginate', 'sportspress' ), + 'title' => esc_attr__( 'Pagination', 'sportspress' ), + 'desc' => esc_attr__( 'Paginate', 'sportspress' ), 'id' => 'sportspress_event_list_paginated', 'default' => 'yes', 'type' => 'checkbox', ), array( - 'title' => __( 'Limit', 'sportspress' ), + 'title' => esc_attr__( 'Limit', 'sportspress' ), 'id' => 'sportspress_event_list_rows', 'class' => 'small-text', 'default' => '10', - 'desc' => __( 'events', 'sportspress' ), + 'desc' => esc_attr__( 'events', 'sportspress' ), 'type' => 'number', 'custom_attributes' => array( 'min' => 1, @@ -327,7 +327,7 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) : 'id' => 'event_list_options', ), array( - 'title' => __( 'Event Blocks', 'sportspress' ), + 'title' => esc_attr__( 'Event Blocks', 'sportspress' ), 'type' => 'title', 'id' => 'event_blocks_options', ), @@ -336,24 +336,24 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) : 'sportspress_event_blocks_options', array( array( - 'title' => __( 'Title', 'sportspress' ), - 'desc' => __( 'Display calendar title', 'sportspress' ), + 'title' => esc_attr__( 'Title', 'sportspress' ), + 'desc' => esc_attr__( 'Display calendar title', 'sportspress' ), 'id' => 'sportspress_event_blocks_show_title', 'default' => 'no', 'type' => 'checkbox', ), array( - 'title' => __( 'Teams', 'sportspress' ), - 'desc' => __( 'Display logos', 'sportspress' ), + 'title' => esc_attr__( 'Teams', 'sportspress' ), + 'desc' => esc_attr__( 'Display logos', 'sportspress' ), 'id' => 'sportspress_event_blocks_show_logos', 'default' => 'yes', 'type' => 'checkbox', ), array( - 'title' => __( 'Details', 'sportspress' ), - 'desc' => __( 'Display league', 'sportspress' ), + 'title' => esc_attr__( 'Details', 'sportspress' ), + 'desc' => esc_attr__( 'Display league', 'sportspress' ), 'id' => 'sportspress_event_blocks_show_league', 'default' => 'no', 'type' => 'checkbox', @@ -361,7 +361,7 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) : ), array( - 'desc' => __( 'Display season', 'sportspress' ), + 'desc' => esc_attr__( 'Display season', 'sportspress' ), 'id' => 'sportspress_event_blocks_show_season', 'default' => 'no', 'type' => 'checkbox', @@ -369,7 +369,7 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) : ), array( - 'desc' => __( 'Display matchday', 'sportspress' ), + 'desc' => esc_attr__( 'Display matchday', 'sportspress' ), 'id' => 'sportspress_event_blocks_show_matchday', 'default' => 'no', 'type' => 'checkbox', @@ -377,7 +377,7 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) : ), array( - 'desc' => __( 'Display venue', 'sportspress' ), + 'desc' => esc_attr__( 'Display venue', 'sportspress' ), 'id' => 'sportspress_event_blocks_show_venue', 'default' => 'no', 'type' => 'checkbox', @@ -385,19 +385,19 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) : ), array( - 'title' => __( 'Pagination', 'sportspress' ), - 'desc' => __( 'Paginate', 'sportspress' ), + 'title' => esc_attr__( 'Pagination', 'sportspress' ), + 'desc' => esc_attr__( 'Paginate', 'sportspress' ), 'id' => 'sportspress_event_blocks_paginated', 'default' => 'yes', 'type' => 'checkbox', ), array( - 'title' => __( 'Limit', 'sportspress' ), + 'title' => esc_attr__( 'Limit', 'sportspress' ), 'id' => 'sportspress_event_blocks_rows', 'class' => 'small-text', 'default' => '5', - 'desc' => __( 'events', 'sportspress' ), + 'desc' => esc_attr__( 'events', 'sportspress' ), 'type' => 'number', 'custom_attributes' => array( 'min' => 1, @@ -426,14 +426,14 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) : $options, array( array( - 'title' => __( 'Events', 'sportspress' ), + 'title' => esc_attr__( 'Events', 'sportspress' ), 'id' => 'sportspress_team_events_format', 'default' => 'title', 'type' => 'select', 'options' => array( - 'blocks' => __( 'Blocks', 'sportspress' ), - 'calendar' => __( 'Calendar', 'sportspress' ), - 'list' => __( 'List', 'sportspress' ), + 'blocks' => esc_attr__( 'Blocks', 'sportspress' ), + 'calendar' => esc_attr__( 'Calendar', 'sportspress' ), + 'list' => esc_attr__( 'List', 'sportspress' ), ), ), ) @@ -450,7 +450,7 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) : $templates, array( 'events' => array( - 'title' => __( 'Events', 'sportspress' ), + 'title' => esc_attr__( 'Events', 'sportspress' ), 'option' => 'sportspress_player_show_events', 'action' => 'sportspress_output_player_events', 'default' => 'no', @@ -469,14 +469,14 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) : $options, array( array( - 'title' => __( 'Events', 'sportspress' ), + 'title' => esc_attr__( 'Events', 'sportspress' ), 'id' => 'sportspress_player_events_format', 'default' => 'title', 'type' => 'select', 'options' => array( - 'blocks' => __( 'Blocks', 'sportspress' ), - 'calendar' => __( 'Calendar', 'sportspress' ), - 'list' => __( 'List', 'sportspress' ), + 'blocks' => esc_attr__( 'Blocks', 'sportspress' ), + 'calendar' => esc_attr__( 'Calendar', 'sportspress' ), + 'list' => esc_attr__( 'List', 'sportspress' ), ), ), ) @@ -493,7 +493,7 @@ if ( ! class_exists( 'SportsPress_Calendars' ) ) : $templates, array( 'events' => array( - 'title' => __( 'Events', 'sportspress' ), + 'title' => esc_attr__( 'Events', 'sportspress' ), 'option' => 'sportspress_team_show_events', 'action' => 'sportspress_output_team_events', 'default' => 'no', diff --git a/modules/sportspress-comments-scheduled-events.php b/modules/sportspress-comments-scheduled-events.php index 19cb2d44..3d8da987 100644 --- a/modules/sportspress-comments-scheduled-events.php +++ b/modules/sportspress-comments-scheduled-events.php @@ -79,7 +79,7 @@ if ( ! class_exists( 'SportsPress_Comments_Scheduled_Events' ) ) : } } else { if ( get_option( 'comment_registration' ) ) { - return new WP_Error( 'not_logged_in', __( 'Sorry, you must be logged in to comment.' ), 403 ); + return new WP_Error( 'not_logged_in', esc_attr__( 'Sorry, you must be logged in to comment.' ), 403 ); } } @@ -87,17 +87,17 @@ if ( ! class_exists( 'SportsPress_Comments_Scheduled_Events' ) ) : if ( get_option( 'require_name_email' ) && ! $user->exists() ) { if ( '' == $comment_author_email || '' == $comment_author ) { - // return new WP_Error( 'require_name_email', __( 'ERROR: please fill the required fields (name, email).' ), 200 ); - wp_die( __( 'ERROR: please fill the required fields (name, email).' ), __( 'ERROR: please fill the required fields (name, email).' ), array( 'back_link' => true ) ); + // return new WP_Error( 'require_name_email', esc_attr__( 'ERROR: please fill the required fields (name, email).' ), 200 ); + wp_die( esc_attr__( 'ERROR: please fill the required fields (name, email).' ), esc_attr__( 'ERROR: please fill the required fields (name, email).' ), array( 'back_link' => true ) ); } elseif ( ! is_email( $comment_author_email ) ) { - // return new WP_Error( 'require_valid_email', __( 'ERROR: please enter a valid email address.' ), 200 ); - wp_die( __( 'ERROR: please enter a valid email address.' ), __( 'ERROR: please enter a valid email address.' ), array( 'back_link' => true ) ); + // return new WP_Error( 'require_valid_email', esc_attr__( 'ERROR: please enter a valid email address.' ), 200 ); + wp_die( esc_attr__( 'ERROR: please enter a valid email address.' ), esc_attr__( 'ERROR: please enter a valid email address.' ), array( 'back_link' => true ) ); } } if ( '' == $comment_content ) { - // return new WP_Error( 'require_valid_comment', __( 'ERROR: please type a comment.' ), 200 ); - wp_die( __( 'ERROR: please type a comment.' ), __( 'ERROR: please type a comment.' ), array( 'back_link' => true ) ); + // return new WP_Error( 'require_valid_comment', esc_attr__( 'ERROR: please type a comment.' ), 200 ); + wp_die( esc_attr__( 'ERROR: please type a comment.' ), esc_attr__( 'ERROR: please type a comment.' ), array( 'back_link' => true ) ); } $comment_parent = isset( $_POST['comment_parent'] ) ? absint( $_POST['comment_parent'] ) : 0; @@ -124,8 +124,8 @@ if ( ! class_exists( 'SportsPress_Comments_Scheduled_Events' ) ) : } if ( ! $comment_id ) { - // return new WP_Error( 'comment_save_error', __( 'ERROR: The comment could not be saved. Please try again later.' ), 500 ); - wp_die( __( 'ERROR: The comment could not be saved. Please try again later.' ), __( 'ERROR: The comment could not be saved. Please try again later.' ), array( 'back_link' => true ) ); + // return new WP_Error( 'comment_save_error', esc_attr__( 'ERROR: The comment could not be saved. Please try again later.' ), 500 ); + wp_die( esc_attr__( 'ERROR: The comment could not be saved. Please try again later.' ), esc_attr__( 'ERROR: The comment could not be saved. Please try again later.' ), array( 'back_link' => true ) ); } $comment = get_comment( $comment_id ); diff --git a/modules/sportspress-countdowns.php b/modules/sportspress-countdowns.php index e4203af4..44f51b88 100644 --- a/modules/sportspress-countdowns.php +++ b/modules/sportspress-countdowns.php @@ -85,7 +85,7 @@ if ( ! class_exists( 'SportsPress_Countdowns' ) ) : $settings, array( array( - 'title' => __( 'Countdown', 'sportspress' ), + 'title' => esc_attr__( 'Countdown', 'sportspress' ), 'type' => 'title', 'id' => 'countdown_options', ), @@ -94,15 +94,15 @@ if ( ! class_exists( 'SportsPress_Countdowns' ) ) : 'sportspress_countdown_options', array( array( - 'title' => __( 'Display', 'sportspress' ), - 'desc' => __( 'Logos', 'sportspress' ), + 'title' => esc_attr__( 'Display', 'sportspress' ), + 'desc' => esc_attr__( 'Logos', 'sportspress' ), 'id' => 'sportspress_countdown_show_logos', 'default' => 'no', 'type' => 'checkbox', 'checkboxgroup' => 'start', ), array( - 'desc' => __( 'Featured Image', 'sportspress' ), + 'desc' => esc_attr__( 'Featured Image', 'sportspress' ), 'id' => 'sportspress_countdown_show_thumbnail', 'default' => 'no', 'type' => 'checkbox', diff --git a/modules/sportspress-default-nationality.php b/modules/sportspress-default-nationality.php index 71f94f7f..a33166f1 100644 --- a/modules/sportspress-default-nationality.php +++ b/modules/sportspress-default-nationality.php @@ -54,12 +54,12 @@ if ( ! class_exists( 'SportsPress_Default_Nationality' ) ) : * Add option to SportsPress General Settings. */ public function add_general_options( $settings ) { - $countries[''] = __( '— None —', 'sportspress' ); + $countries[''] = esc_attr__( '— None —', 'sportspress' ); $sp_countries = new SP_Countries(); $countries = array_merge( $countries, $sp_countries->countries ); $settings[] = array( - 'title' => __( 'Default Nationality', 'sportspress' ), + 'title' => esc_attr__( 'Default Nationality', 'sportspress' ), 'id' => 'sportspress_default_nationality', 'default' => '', 'type' => 'select', diff --git a/modules/sportspress-event-specs.php b/modules/sportspress-event-specs.php index bbbc70b0..12e6bdc9 100644 --- a/modules/sportspress-event-specs.php +++ b/modules/sportspress-event-specs.php @@ -73,15 +73,15 @@ if ( ! class_exists( 'SportsPress_Event_Specs' ) ) : 'sportspress_register_post_type_spec', array( 'labels' => array( - 'name' => __( 'Event Specs', 'sportspress' ), - 'singular_name' => __( 'Event Spec', 'sportspress' ), - 'add_new_item' => __( 'Add New Event Spec', 'sportspress' ), - 'edit_item' => __( 'Edit Event Spec', 'sportspress' ), - 'new_item' => __( 'New', 'sportspress' ), - 'view_item' => __( 'View', 'sportspress' ), - 'search_items' => __( 'Search', 'sportspress' ), - 'not_found' => __( 'No results found.', 'sportspress' ), - 'not_found_in_trash' => __( 'No results found.', 'sportspress' ), + 'name' => esc_attr__( 'Event Specs', 'sportspress' ), + 'singular_name' => esc_attr__( 'Event Spec', 'sportspress' ), + 'add_new_item' => esc_attr__( 'Add New Event Spec', 'sportspress' ), + 'edit_item' => esc_attr__( 'Edit Event Spec', 'sportspress' ), + 'new_item' => esc_attr__( 'New', 'sportspress' ), + 'view_item' => esc_attr__( 'View', 'sportspress' ), + 'search_items' => esc_attr__( 'Search', 'sportspress' ), + 'not_found' => esc_attr__( 'No results found.', 'sportspress' ), + 'not_found_in_trash' => esc_attr__( 'No results found.', 'sportspress' ), ), 'public' => false, 'show_ui' => true, @@ -148,16 +148,16 @@ if ( ! class_exists( 'SportsPress_Event_Specs' ) ) : ?> @@ -205,7 +205,7 @@ endforeach; else : public function add_meta_boxes( $meta_boxes ) { $meta_boxes['sp_spec'] = array( 'details' => array( - 'title' => __( 'Specs', 'sportspress' ), + 'title' => esc_attr__( 'Specs', 'sportspress' ), 'save' => 'SP_Meta_Box_Spec_Details::save', 'output' => 'SP_Meta_Box_Spec_Details::output', 'context' => 'normal', @@ -213,7 +213,7 @@ endforeach; else : ), ); $meta_boxes['sp_event']['specs'] = array( - 'title' => __( 'Specs', 'sportspress' ), + 'title' => esc_attr__( 'Specs', 'sportspress' ), 'save' => 'SP_Meta_Box_Event_Specs::save', 'output' => 'SP_Meta_Box_Event_Specs::output', 'context' => 'side', @@ -245,7 +245,7 @@ endforeach; else : * @return array */ public function calendar_columns( $columns = array() ) { - $columns['event_specs'] = __( 'Event Specs', 'sportspress' ); + $columns['event_specs'] = esc_attr__( 'Event Specs', 'sportspress' ); return $columns; } @@ -263,7 +263,7 @@ endforeach; else : foreach ( $spec_labels as $spec_label ) { ?> specs( false ); $spec_labels = (array) sp_get_var_labels( 'sp_spec', null, false ); foreach ( $specs as $spec_label => $spec_value ) { - echo '
    ' . $spec_label . ': ' . $spec_value . '
    '; + echo '
    ' . wp_kses_post( $spec_label ) . ': ' . wp_kses_post( $spec_value ) . '
    '; } } } diff --git a/modules/sportspress-event-status.php b/modules/sportspress-event-status.php index b5873bd1..b698199d 100644 --- a/modules/sportspress-event-status.php +++ b/modules/sportspress-event-status.php @@ -68,10 +68,10 @@ if ( ! class_exists( 'SportsPress_Event_Status' ) ) : $this->statuses = apply_filters( 'sportspress_event_statuses', array( - 'ok' => __( 'On time', 'sportspress' ), - 'tbd' => __( 'TBD', 'sportspress' ), - 'postponed' => __( 'Postponed', 'sportspress' ), - 'cancelled' => __( 'Canceled', 'sportspress' ), + 'ok' => esc_attr__( 'On time', 'sportspress' ), + 'tbd' => esc_attr__( 'TBD', 'sportspress' ), + 'postponed' => esc_attr__( 'Postponed', 'sportspress' ), + 'cancelled' => esc_attr__( 'Canceled', 'sportspress' ), ) ); } @@ -89,11 +89,11 @@ if ( ! class_exists( 'SportsPress_Event_Status' ) ) : } ?>
    - statuses[ $status ]; ?> - + statuses[ $status ] ); ?> +
    statuses as $value => $label ) { ?> -
    +

    OK diff --git a/modules/sportspress-event-videos.php b/modules/sportspress-event-videos.php index 8c29f525..09ddd630 100644 --- a/modules/sportspress-event-videos.php +++ b/modules/sportspress-event-videos.php @@ -58,7 +58,7 @@ if ( ! class_exists( 'SportsPress_Event_Videos' ) ) : */ public function add_meta_box( $meta_boxes ) { $meta_boxes['sp_event']['video'] = array( - 'title' => __( 'Video', 'sportspress' ), + 'title' => esc_attr__( 'Video', 'sportspress' ), 'output' => 'SP_Meta_Box_Event_Video::output', 'save' => 'SP_Meta_Box_Event_Video::save', 'context' => 'side', diff --git a/modules/sportspress-gutenberg.php b/modules/sportspress-gutenberg.php index 351fa4ab..527e5dc7 100644 --- a/modules/sportspress-gutenberg.php +++ b/modules/sportspress-gutenberg.php @@ -69,7 +69,7 @@ if ( ! class_exists( 'SportsPress_Gutenberg' ) ) : array( array( 'slug' => 'sportspress', - 'title' => __( 'SportsPress', 'sportspress' ), + 'title' => esc_attr__( 'SportsPress', 'sportspress' ), ), ) ); @@ -84,11 +84,11 @@ if ( ! class_exists( 'SportsPress_Gutenberg' ) ) : $strings = apply_filters( 'sportspress_localized_strings', array( - 'event_calendar' => __( 'Event Calendar', 'sportspress' ), - 'properties' => __( 'Properties', 'sportspress' ), - 'title' => __( 'Title', 'sportspress' ), - 'select_calendar' => sprintf( __( 'Select %s:', 'sportspress' ), __( 'Calendar', 'sportspress' ) ), - 'all' => __( 'All', 'sportspress' ), + 'event_calendar' => esc_attr__( 'Event Calendar', 'sportspress' ), + 'properties' => esc_attr__( 'Properties', 'sportspress' ), + 'title' => esc_attr__( 'Title', 'sportspress' ), + 'select_calendar' => sprintf( esc_attr__( 'Select %s:', 'sportspress' ), esc_attr__( 'Calendar', 'sportspress' ) ), + 'all' => esc_attr__( 'All', 'sportspress' ), ) ); diff --git a/modules/sportspress-icons.php b/modules/sportspress-icons.php index 7eb5d450..b1e4e65d 100644 --- a/modules/sportspress-icons.php +++ b/modules/sportspress-icons.php @@ -188,7 +188,7 @@ if ( ! class_exists( 'SportsPress_Icons' ) ) : $icons .= ''; } - $icons .= ''; + $icons .= ''; // Get color value $value = get_post_meta( $id, 'sp_color', true ); @@ -198,9 +198,9 @@ if ( ! class_exists( 'SportsPress_Icons' ) ) : $color = '

    '; - $content = '

    ' . __( 'Select Icon', 'sportspress' ) . '

    + $content = '

    ' . esc_attr__( 'Select Icon', 'sportspress' ) . '

    ' . $icons . '

    -
    ' . $color . '
    +
    ' . $color . '
    ' . $content . '
    '; return $content; } diff --git a/modules/sportspress-lazy-loading.php b/modules/sportspress-lazy-loading.php index f271d630..3f1a60aa 100644 --- a/modules/sportspress-lazy-loading.php +++ b/modules/sportspress-lazy-loading.php @@ -210,11 +210,11 @@ if ( ! class_exists( 'SportsPress_Lazy_Loading' ) ) : } } ?> -
    - -all" class="posttypediv tabs-panel wp-tab-panel sp-tab-panel sp-ajax-checklist sp-select-all-range" style="display: ;"> +
      @@ -222,16 +222,16 @@ if ( ! class_exists( 'SportsPress_Lazy_Loading' ) ) :
    • +
    • -
    • -
    • +
    • +
    @@ -295,10 +295,10 @@ if ( ! class_exists( 'SportsPress_Lazy_Loading' ) ) : $strings = array_merge( $strings, array( - 'no_results_found' => __( 'No results found.', 'sportspress' ), - 'select_all' => __( 'Select All', 'sportspress' ), - 'show_all' => __( 'Show all', 'sportspress' ), - 'loading' => __( 'Loading…', 'sportspress' ), + 'no_results_found' => esc_attr__( 'No results found.', 'sportspress' ), + 'select_all' => esc_attr__( 'Select All', 'sportspress' ), + 'show_all' => esc_attr__( 'Show all', 'sportspress' ), + 'loading' => esc_attr__( 'Loading…', 'sportspress' ), 'option_filter_by_league' => get_option( 'sportspress_event_filter_teams_by_league', 'no' ), 'option_filter_by_season' => get_option( 'sportspress_event_filter_teams_by_season', 'no' ), ) diff --git a/modules/sportspress-league-tables.php b/modules/sportspress-league-tables.php index 8cd994c3..51990159 100644 --- a/modules/sportspress-league-tables.php +++ b/modules/sportspress-league-tables.php @@ -72,15 +72,15 @@ if ( ! class_exists( 'SportsPress_League_Tables' ) ) : 'sportspress_register_post_type_table', array( 'labels' => array( - 'name' => __( 'League Tables', 'sportspress' ), - 'singular_name' => __( 'League Table', 'sportspress' ), - 'add_new_item' => __( 'Add New League Table', 'sportspress' ), - 'edit_item' => __( 'Edit League Table', 'sportspress' ), - 'new_item' => __( 'New', 'sportspress' ), - 'view_item' => __( 'View League Table', 'sportspress' ), - 'search_items' => __( 'Search', 'sportspress' ), - 'not_found' => __( 'No results found.', 'sportspress' ), - 'not_found_in_trash' => __( 'No results found.', 'sportspress' ), + 'name' => esc_attr__( 'League Tables', 'sportspress' ), + 'singular_name' => esc_attr__( 'League Table', 'sportspress' ), + 'add_new_item' => esc_attr__( 'Add New League Table', 'sportspress' ), + 'edit_item' => esc_attr__( 'Edit League Table', 'sportspress' ), + 'new_item' => esc_attr__( 'New', 'sportspress' ), + 'view_item' => esc_attr__( 'View League Table', 'sportspress' ), + 'search_items' => esc_attr__( 'Search', 'sportspress' ), + 'not_found' => esc_attr__( 'No results found.', 'sportspress' ), + 'not_found_in_trash' => esc_attr__( 'No results found.', 'sportspress' ), ), 'public' => true, 'show_ui' => true, @@ -147,7 +147,7 @@ if ( ! class_exists( 'SportsPress_League_Tables' ) ) : 'get_callback' => 'SP_REST_API::get_post_data', 'update_callback' => 'SP_REST_API::update_post_meta_arrays', 'schema' => array( - 'description' => __( 'League Table', 'sportspress' ), + 'description' => esc_attr__( 'League Table', 'sportspress' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'arg_options' => array( @@ -166,7 +166,7 @@ if ( ! class_exists( 'SportsPress_League_Tables' ) ) : public function add_meta_boxes( $meta_boxes ) { if ( 'yes' == get_option( 'sportspress_team_column_editing', 'no' ) ) { $meta_boxes['sp_team']['columns'] = array( - 'title' => __( 'Table Columns', 'sportspress' ), + 'title' => esc_attr__( 'Table Columns', 'sportspress' ), 'output' => 'SP_Meta_Box_Team_Columns::output', 'save' => 'SP_Meta_Box_Team_Columns::save', 'context' => 'normal', @@ -174,7 +174,7 @@ if ( ! class_exists( 'SportsPress_League_Tables' ) ) : ); } $meta_boxes['sp_team']['tables'] = array( - 'title' => __( 'League Tables', 'sportspress' ), + 'title' => esc_attr__( 'League Tables', 'sportspress' ), 'output' => 'SP_Meta_Box_Team_Tables::output', 'save' => 'SP_Meta_Box_Team_Tables::save', 'context' => 'normal', @@ -182,34 +182,34 @@ if ( ! class_exists( 'SportsPress_League_Tables' ) ) : ); $meta_boxes['sp_table'] = array( 'mode' => array( - 'title' => __( 'Mode', 'sportspress' ), + 'title' => esc_attr__( 'Mode', 'sportspress' ), 'save' => 'SP_Meta_Box_Table_Mode::save', 'output' => 'SP_Meta_Box_Table_Mode::output', 'context' => 'side', 'priority' => 'default', ), 'shortcode' => array( - 'title' => __( 'Shortcode', 'sportspress' ), + 'title' => esc_attr__( 'Shortcode', 'sportspress' ), 'output' => 'SP_Meta_Box_Table_Shortcode::output', 'context' => 'side', 'priority' => 'default', ), 'format' => array( - 'title' => __( 'Layout', 'sportspress' ), + 'title' => esc_attr__( 'Layout', 'sportspress' ), 'save' => 'SP_Meta_Box_Table_Format::save', 'output' => 'SP_Meta_Box_Table_Format::output', 'context' => 'side', 'priority' => 'default', ), 'details' => array( - 'title' => __( 'Details', 'sportspress' ), + 'title' => esc_attr__( 'Details', 'sportspress' ), 'save' => 'SP_Meta_Box_Table_Details::save', 'output' => 'SP_Meta_Box_Table_Details::output', 'context' => 'side', 'priority' => 'default', ), 'data' => array( - 'title' => __( 'League Table', 'sportspress' ), + 'title' => esc_attr__( 'League Table', 'sportspress' ), 'save' => 'SP_Meta_Box_Table_Data::save', 'output' => 'SP_Meta_Box_Table_Data::output', 'context' => 'normal', @@ -240,7 +240,7 @@ if ( ! class_exists( 'SportsPress_League_Tables' ) ) : $settings, array( array( - 'title' => __( 'League Tables', 'sportspress' ), + 'title' => esc_attr__( 'League Tables', 'sportspress' ), 'type' => 'title', 'id' => 'table_options', ), @@ -249,35 +249,35 @@ if ( ! class_exists( 'SportsPress_League_Tables' ) ) : 'sportspress_table_options', array( array( - 'title' => __( 'Title', 'sportspress' ), - 'desc' => __( 'Display title', 'sportspress' ), + 'title' => esc_attr__( 'Title', 'sportspress' ), + 'desc' => esc_attr__( 'Display title', 'sportspress' ), 'id' => 'sportspress_table_show_title', 'default' => 'yes', 'type' => 'checkbox', ), array( - 'title' => __( 'Teams', 'sportspress' ), - 'desc' => __( 'Display logos', 'sportspress' ), + 'title' => esc_attr__( 'Teams', 'sportspress' ), + 'desc' => esc_attr__( 'Display logos', 'sportspress' ), 'id' => 'sportspress_table_show_logos', 'default' => 'yes', 'type' => 'checkbox', ), array( - 'title' => __( 'Pagination', 'sportspress' ), - 'desc' => __( 'Paginate', 'sportspress' ), + 'title' => esc_attr__( 'Pagination', 'sportspress' ), + 'desc' => esc_attr__( 'Paginate', 'sportspress' ), 'id' => 'sportspress_table_paginated', 'default' => 'yes', 'type' => 'checkbox', ), array( - 'title' => __( 'Limit', 'sportspress' ), + 'title' => esc_attr__( 'Limit', 'sportspress' ), 'id' => 'sportspress_table_rows', 'class' => 'small-text', 'default' => '10', - 'desc' => __( 'teams', 'sportspress' ), + 'desc' => esc_attr__( 'teams', 'sportspress' ), 'type' => 'number', 'custom_attributes' => array( 'min' => 1, @@ -286,11 +286,11 @@ if ( ! class_exists( 'SportsPress_League_Tables' ) ) : ), array( - 'title' => __( 'Form', 'sportspress' ), + 'title' => esc_attr__( 'Form', 'sportspress' ), 'id' => 'sportspress_form_limit', 'class' => 'small-text', 'default' => '5', - 'desc' => __( 'events', 'sportspress' ), + 'desc' => esc_attr__( 'events', 'sportspress' ), 'type' => 'number', 'custom_attributes' => array( 'min' => 1, @@ -299,21 +299,21 @@ if ( ! class_exists( 'SportsPress_League_Tables' ) ) : ), array( - 'title' => __( 'Pos', 'sportspress' ), - 'desc' => __( 'Always increment', 'sportspress' ), + 'title' => esc_attr__( 'Pos', 'sportspress' ), + 'desc' => esc_attr__( 'Always increment', 'sportspress' ), 'id' => 'sportspress_table_increment', 'default' => 'no', 'type' => 'checkbox', ), array( - 'title' => __( 'Tiebreaker', 'sportspress' ), + 'title' => esc_attr__( 'Tiebreaker', 'sportspress' ), 'id' => 'sportspress_table_tiebreaker', 'default' => 'none', 'type' => 'select', 'options' => array( - 'none' => __( 'None', 'sportspress' ), - 'h2h' => __( 'Head to head', 'sportspress' ), + 'none' => esc_attr__( 'None', 'sportspress' ), + 'h2h' => esc_attr__( 'Head to head', 'sportspress' ), ), ), ) @@ -337,8 +337,8 @@ if ( ! class_exists( 'SportsPress_League_Tables' ) ) : $templates, array( 'tables' => array( - 'title' => __( 'League Tables', 'sportspress' ), - 'label' => __( 'League Table', 'sportspress' ), + 'title' => esc_attr__( 'League Tables', 'sportspress' ), + 'label' => esc_attr__( 'League Table', 'sportspress' ), 'option' => 'sportspress_team_show_tables', 'action' => 'sportspress_output_team_tables', 'default' => 'yes', diff --git a/modules/sportspress-next-team-preset.php b/modules/sportspress-next-team-preset.php index f2d866c0..1915410d 100644 --- a/modules/sportspress-next-team-preset.php +++ b/modules/sportspress-next-team-preset.php @@ -67,7 +67,7 @@ if ( ! class_exists( 'SportsPress_Next_Team_Preset' ) ) : * @return array */ public function add_options( $options ) { - $options['Presets']['$nextteam'] = __( 'Next Team', 'sportspress' ); + $options['Presets']['$nextteam'] = esc_attr__( 'Next Team', 'sportspress' ); return $options; } @@ -168,8 +168,8 @@ if ( ! class_exists( 'SportsPress_Next_Team_Preset' ) ) : */ public function add_settings( $settings ) { $settings[] = array( - 'title' => __( 'Next Team', 'sportspress' ), - 'desc' => __( 'Filter by League', 'sportspress' ), + 'title' => esc_attr__( 'Next Team', 'sportspress' ), + 'desc' => esc_attr__( 'Filter by League', 'sportspress' ), 'id' => 'sportspress_table_next_team_filter_league', 'default' => 'no', 'type' => 'checkbox', diff --git a/modules/sportspress-officials.php b/modules/sportspress-officials.php index b6b6d627..f33b2b14 100644 --- a/modules/sportspress-officials.php +++ b/modules/sportspress-officials.php @@ -85,23 +85,23 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) : */ public static function register_taxonomy() { $labels = array( - 'name' => __( 'Duties', 'sportspress' ), - 'singular_name' => __( 'Duty', 'sportspress' ), - 'all_items' => __( 'All', 'sportspress' ), - 'edit_item' => __( 'Edit Duty', 'sportspress' ), - 'view_item' => __( 'View', 'sportspress' ), - 'update_item' => __( 'Update', 'sportspress' ), - 'add_new_item' => __( 'Add New', 'sportspress' ), - 'new_item_name' => __( 'Name', 'sportspress' ), - 'parent_item' => __( 'Parent', 'sportspress' ), - 'parent_item_colon' => __( 'Parent:', 'sportspress' ), - 'search_items' => __( 'Search', 'sportspress' ), - 'not_found' => __( 'No results found.', 'sportspress' ), + 'name' => esc_attr__( 'Duties', 'sportspress' ), + 'singular_name' => esc_attr__( 'Duty', 'sportspress' ), + 'all_items' => esc_attr__( 'All', 'sportspress' ), + 'edit_item' => esc_attr__( 'Edit Duty', 'sportspress' ), + 'view_item' => esc_attr__( 'View', 'sportspress' ), + 'update_item' => esc_attr__( 'Update', 'sportspress' ), + 'add_new_item' => esc_attr__( 'Add New', 'sportspress' ), + 'new_item_name' => esc_attr__( 'Name', 'sportspress' ), + 'parent_item' => esc_attr__( 'Parent', 'sportspress' ), + 'parent_item_colon' => esc_attr__( 'Parent:', 'sportspress' ), + 'search_items' => esc_attr__( 'Search', 'sportspress' ), + 'not_found' => esc_attr__( 'No results found.', 'sportspress' ), ); $args = apply_filters( 'sportspress_register_taxonomy_duty', array( - 'label' => __( 'Duties', 'sportspress' ), + 'label' => esc_attr__( 'Duties', 'sportspress' ), 'labels' => $labels, 'public' => false, 'show_ui' => true, @@ -138,19 +138,19 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) : 'sportspress_register_post_type_official', array( 'labels' => array( - 'name' => __( 'Officials', 'sportspress' ), - 'singular_name' => __( 'Official', 'sportspress' ), - 'add_new_item' => __( 'Add New Official', 'sportspress' ), - 'edit_item' => __( 'Edit Official', 'sportspress' ), - 'new_item' => __( 'New', 'sportspress' ), - 'view_item' => __( 'View Official', 'sportspress' ), - 'search_items' => __( 'Search', 'sportspress' ), - 'not_found' => __( 'No results found.', 'sportspress' ), - 'not_found_in_trash' => __( 'No results found.', 'sportspress' ), - 'featured_image' => __( 'Photo', 'sportspress' ), - 'set_featured_image' => __( 'Select Photo', 'sportspress' ), - 'remove_featured_image' => __( 'Remove Photo', 'sportspress' ), - 'use_featured_image' => __( 'Select Photo', 'sportspress' ), + 'name' => esc_attr__( 'Officials', 'sportspress' ), + 'singular_name' => esc_attr__( 'Official', 'sportspress' ), + 'add_new_item' => esc_attr__( 'Add New Official', 'sportspress' ), + 'edit_item' => esc_attr__( 'Edit Official', 'sportspress' ), + 'new_item' => esc_attr__( 'New', 'sportspress' ), + 'view_item' => esc_attr__( 'View Official', 'sportspress' ), + 'search_items' => esc_attr__( 'Search', 'sportspress' ), + 'not_found' => esc_attr__( 'No results found.', 'sportspress' ), + 'not_found_in_trash' => esc_attr__( 'No results found.', 'sportspress' ), + 'featured_image' => esc_attr__( 'Photo', 'sportspress' ), + 'set_featured_image' => esc_attr__( 'Select Photo', 'sportspress' ), + 'remove_featured_image' => esc_attr__( 'Remove Photo', 'sportspress' ), + 'use_featured_image' => esc_attr__( 'Select Photo', 'sportspress' ), ), 'public' => true, 'show_ui' => true, @@ -198,7 +198,7 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) : 'get_callback' => 'SP_REST_API::get_post_data', 'update_callback' => 'SP_REST_API::update_post_meta_arrays', 'schema' => array( - 'description' => __( 'Official', 'sportspress' ), + 'description' => esc_attr__( 'Official', 'sportspress' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'arg_options' => array( @@ -240,7 +240,7 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) : foreach ( $duties as $duty ) { ?>
    __( 'Officials', 'sportspress' ), + 'title' => esc_attr__( 'Officials', 'sportspress' ), 'output' => 'SP_Meta_Box_Event_Officials::output', 'save' => 'SP_Meta_Box_Event_Officials::save', 'context' => 'side', @@ -347,7 +347,7 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) : * @return array */ public function calendar_columns( $columns = array() ) { - $columns['officials'] = __( 'Officials', 'sportspress' ); + $columns['officials'] = esc_attr__( 'Officials', 'sportspress' ); return $columns; } @@ -361,7 +361,7 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) : $templates, array( 'officials' => array( - 'title' => __( 'Officials', 'sportspress' ), + 'title' => esc_attr__( 'Officials', 'sportspress' ), 'option' => 'sportspress_event_show_officials', 'action' => 'sportspress_output_event_officials', 'default' => 'yes', @@ -377,13 +377,13 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) : */ public function add_event_options( $options ) { $options[] = array( - 'title' => __( 'Officials', 'sportspress' ), + 'title' => esc_attr__( 'Officials', 'sportspress' ), 'id' => 'sportspress_event_officials_format', 'default' => 'table', 'type' => 'radio', 'options' => array( - 'table' => __( 'Table', 'sportspress' ), - 'list' => __( 'List', 'sportspress' ), + 'table' => esc_attr__( 'Table', 'sportspress' ), + 'list' => esc_attr__( 'List', 'sportspress' ), ), ); return $options; @@ -422,8 +422,8 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) : */ public function register_importer( $importers = array() ) { $importers['sp_official_csv'] = array( - 'name' => __( 'SportsPress Officials (CSV)', 'sportspress' ), - 'description' => __( 'Import officials from a csv file.', 'sportspress' ), + 'name' => esc_attr__( 'SportsPress Officials (CSV)', 'sportspress' ), + 'description' => esc_attr__( 'Import officials from a csv file.', 'sportspress' ), 'callback' => array( $this, 'officials_importer' ), ); return $importers; @@ -480,7 +480,7 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) : $new_columns = array(); if ( function_exists( 'get_term_meta' ) ) { - $new_columns['sp_order'] = __( 'Order', 'sportspress' ); + $new_columns['sp_order'] = esc_attr__( 'Order', 'sportspress' ); } if ( array_key_exists( 'posts', $columns ) ) { @@ -504,7 +504,7 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) : - + @@ -548,8 +548,8 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) : $options = apply_filters( 'sportspress_performance_sections', array( - 0 => __( 'Offense', 'sportspress' ), - 1 => __( + 0 => esc_attr__( 'Offense', 'sportspress' ), + 1 => esc_attr__( 'Defense', 'sportspress' ), @@ -583,7 +583,7 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) : * Add menu item */ public function duties_menu() { - add_submenu_page( 'edit.php?post_type=sp_official', __( 'Duties', 'sportspress' ), __( 'Duties', 'sportspress' ), 'manage_sp_event_terms', 'edit-tags.php?taxonomy=sp_duty' ); + add_submenu_page( 'edit.php?post_type=sp_official', esc_attr__( 'Duties', 'sportspress' ), esc_attr__( 'Duties', 'sportspress' ), 'manage_sp_event_terms', 'edit-tags.php?taxonomy=sp_duty' ); } /** diff --git a/modules/sportspress-openstreetmap.php b/modules/sportspress-openstreetmap.php index 63312890..e53a88aa 100644 --- a/modules/sportspress-openstreetmap.php +++ b/modules/sportspress-openstreetmap.php @@ -128,13 +128,13 @@ if ( ! class_exists( 'SportsPress_OpenStreetMap' ) ) : $lon_sec = floor( $lon_sec - ( $lon_min * 60 ) ); $lon_dir = $longitude > 0 ? 'E' : 'W'; ?> - /@,,z" target="_blank">
    + /@,,z" target="_blank">
    - -

    + +

    - - - - - + + + + + @@ -50,20 +50,20 @@ $columns = get_option( 'sportspress_player_columns', 'auto' ); - + - +
    ID ) ); ?> ID ) ); ?>

    post_excerpt ); ?>

    - - + +
    - -

    + +

    - +
    - - - - - - + + + + + + @@ -113,9 +113,9 @@ endforeach; else : if ( sizeof( $data ) > 0 ) : $default = end( $data ); reset( $data ); - printf( __( 'Default (%s)', 'sportspress' ), $default->post_title ); + printf( esc_html__( 'Default (%s)', 'sportspress' ), esc_html( $default->post_title ) ); else : - _e( 'Default', 'sportspress' ); + esc_attr_e( 'Default', 'sportspress' ); endif; ?> @@ -137,21 +137,21 @@ endforeach; else : - + - +
    ID ) ); ?> ID ) ); ?>

    post_excerpt ); ?>

    - - + +
    - -

    + +

    - +
    - - - - - - + + + + + + - + @@ -209,13 +209,13 @@ endforeach; else : @@ -246,7 +246,7 @@ endforeach; else : $icon = ' '; } - echo apply_filters( 'sportspress_performance_icon', $icon, $row->ID ); + echo wp_kses_post( apply_filters( 'sportspress_performance_icon', $icon, $row->ID ) ); ?> @@ -266,21 +266,21 @@ endforeach; else : - + - +
    - - + +
    >   - post_title ); ?>

    post_excerpt ); ?>

    - - + +
    - -

    + +

    - - - - - + + + + + @@ -331,20 +331,20 @@ endforeach; else : - + - +
    ID ) ); ?> ID ) ); ?>

    post_excerpt ); ?>

    - - + +
    @@ -366,16 +366,16 @@ endforeach; else : ?>
    - -

    + +

    - - - + + + @@ -392,20 +392,20 @@ endforeach; else : - + - +
    post_title ); ?> post_name ); ?>

    post_excerpt ); ?>

    - - + +
    - -

    + +

    - - - - - + + + + + - + @@ -479,7 +479,7 @@ endforeach; else : $icon = ' '; } - echo apply_filters( 'sportspress_performance_icon', $icon, $row->ID ); + echo wp_kses_post( apply_filters( 'sportspress_performance_icon', $icon, $row->ID ) ); ?> @@ -498,20 +498,20 @@ endforeach; else : - + - +
    - - + +
    ID ) ); ?>

    post_excerpt ); ?>

    - - + +
    ::
    ::
    :: version ); ?>
    ::
    ::
    ::
    ::
    :: ' . sprintf( __( '%1$s - We recommend setting memory to at least 64MB. See: Increasing memory allocated to PHP', 'sportspress' ), size_format( $memory ), 'http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP' ) . ''; + echo '' . wp_kses_post( sprintf( esc_attr__( '%1$s - We recommend setting memory to at least 64MB. See: Increasing memory allocated to PHP', 'sportspress' ), esc_html( size_format( $memory ) ), 'http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP' ) ) . ''; } else { - echo '' . size_format( $memory ) . ''; + echo '' . esc_html( size_format( $memory ) ) . ''; } ?>
    :: ' . __( 'Yes', 'sportspress' ) . ''; + echo '' . esc_html__( 'Yes', 'sportspress' ) . ''; } else { - echo '' . __( 'No', 'sportspress' ) . ''; + echo '' . esc_html__( 'No', 'sportspress' ) . ''; } ?>
    ::
    ::
    ::
    ::
    ::
    ::
    :: ' . sprintf( __( 'Default timezone is %s - it should be UTC', 'sportspress' ), $default_timezone ) . ''; + echo '' . sprintf( esc_html__( 'Default timezone is %s - it should be UTC', 'sportspress' ), esc_html( $default_timezone ) ) . ''; } else { - echo '' . sprintf( __( 'Default timezone is %s', 'sportspress' ), $default_timezone ) . ''; + echo '' . sprintf( esc_html__( 'Default timezone is %s', 'sportspress' ), esc_html( $default_timezone ) ) . ''; } ?>
    : - +
    :: ' . $plugin_name . ''; + $plugin_name = '' . $plugin_name . ''; } if ( strstr( $dirname, 'sportspress' ) ) { @@ -236,11 +236,11 @@ } if ( ! empty( $version_data['version'] ) && version_compare( $version_data['version'], $plugin_data['Version'], '>' ) ) { - $version_string = ' – ' . $version_data['version'] . ' ' . __( 'is available', 'sportspress' ) . ''; + $version_string = ' – ' . $version_data['version'] . ' ' . esc_attr__( 'is available', 'sportspress' ) . ''; } } - $sp_plugins[] = $plugin_name . ' ' . __( 'by', 'sportspress' ) . ' ' . $plugin_data['Author'] . ' ' . __( 'version', 'sportspress' ) . ' ' . $plugin_data['Version'] . $version_string; + $sp_plugins[] = $plugin_name . ' ' . esc_attr__( 'by', 'sportspress' ) . ' ' . $plugin_data['Author'] . ' ' . esc_attr__( 'version', 'sportspress' ) . ' ' . $plugin_data['Version'] . $version_string; } } @@ -248,7 +248,7 @@ if ( sizeof( $sp_plugins ) == 0 ) { echo '-'; } else { - echo implode( ',
    ', $sp_plugins ); + echo wp_kses_post( implode( ',
    ', $sp_plugins ) ); } ?> @@ -258,17 +258,17 @@
    ::
    ::
    ::
    ::
    ::
    ::
    ::
    ::
    ::
    ::
    ::
    - publish; ?> publish, future; ?> future, draft; ?> draft, private; ?> private, trash; ?> trash, {'auto-draft'}; ?> auto-draft, inherit; ?> inherit + publish ); ?> publish, future ); ?> future, draft ); ?> draft, private ); ?> private, trash ); ?> trash, {'auto-draft'} ); ?> auto-draft, inherit ); ?> inherit
    :: Name ); @@ -535,19 +535,19 @@
    :: Version; + echo esc_html( $active_theme->Version ); if ( ! empty( $theme_version_data['version'] ) && version_compare( $theme_version_data['version'], $active_theme->Version, '!=' ) ) { - echo ' – ' . $theme_version_data['version'] . ' ' . __( 'is available', 'sportspress' ) . ''; + echo ' – ' . esc_html( $theme_version_data['version'] ) . ' ' . esc_html__( 'is available', 'sportspress' ) . ''; } ?>
    :: {'Author URI'} ); @@ -558,7 +558,7 @@
    ():', $found_plugin_files ); ?> ():', $found_plugin_files ) ); ?> ::
    - -

    + +

    - - - + + + @@ -171,23 +171,23 @@ if ( ! class_exists( 'SportsPress_Event_Specs' ) ) : echo ' class="alternate"';} ?> > - - - - + + + + - +
    post_title; ?>post_name; ?>

    post_excerpt; ?>

    post_title ); ?>post_name ); ?>

    post_excerpt ); ?>

    - - + +
    - + - name; ?> + name ); ?> - ', $officials ); ?> + ', $officials ) ); ?> - ', $officials ); ?> + ', $officials ) ); ?>