Version Description
= 8.1.08 =
- This version addresses various bug fixes, feature requests and security fixes.
Download this release
Release Info
Developer | opajaap |
Plugin | WP Photo Album Plus |
Version | 8.1.09.002 |
Comparing to | |
See all releases |
Code changes from version 8.1.08.004 to 8.1.09.002
- changelog.txt +4 -0
- js/wppa-all.js +1 -1
- js/wppa-gutenberg-wppa.js +4 -1
- js/wppa-spheric.js +2 -1
- js/wppa-spheric.min.js +1 -1
- theme/wppa-style.css +13 -0
- wppa-admin-functions.php +1 -1
- wppa-admin-styles.css +3 -3
- wppa-admin.php +1 -1
- wppa-adminbar.php +1 -1
- wppa-admins-choice-widget.php +1 -1
- wppa-ajax.php +35 -37
- wppa-album-admin-autosave.php +1 -1
- wppa-album-covers.php +2 -2
- wppa-album-navigator-widget.php +6 -9
- wppa-album-widget.php +18 -21
- wppa-audio.php +1 -1
- wppa-bestof-widget.php +19 -19
- wppa-boxes-html.php +20 -22
- wppa-breadcrumb.php +1 -1
- wppa-cache.php +10 -10
- wppa-cart.php +1 -1
- wppa-cloudinary.php +2 -2
- wppa-comment-admin.php +30 -37
- wppa-comment-widget.php +27 -17
- wppa-common-functions.php +2 -2
- wppa-cron.php +2 -2
- wppa-dashboard-widgets.php +76 -84
- wppa-edit-tags.php +2 -2
- wppa-functions.php +14 -10
- wppa-gutenberg-photo.php +3 -3
- wppa-links.php +2 -2
- wppa-mailing.php +2 -2
- wppa-maintenance.php +2 -6
- wppa-non-admin.php +39 -41
- wppa-photo-admin-autosave.php +3 -3
- wppa-photo-files.php +2 -2
- wppa-potd-widget.php +8 -5
- wppa-qr-widget.php +14 -12
- wppa-setting-functions.php +10 -16
- wppa-setting-see-also.php +8 -7
- wppa-settings-autosave.php +2 -2
- wppa-slideshow.php +5 -6
- wppa-styles.php +31 -35
- wppa-thumbnails.php +14 -31
- wppa-tinymce-common.php +2 -2
- wppa-utils.php +6 -12
- wppa-wpdb-update.php +1 -1
- wppa-wrappers.php +192 -137
- wppa.php +2 -2
changelog.txt
CHANGED
@@ -1,5 +1,9 @@
|
|
1 |
WP Photo Album Plus Changelog
|
2 |
|
|
|
|
|
|
|
|
|
3 |
= 8.1.08 =
|
4 |
|
5 |
* New selectable item in Album cover (title) link: manual entered. If selected, an extra input field appears where you can enter any url the cover title should link to.
|
1 |
WP Photo Album Plus Changelog
|
2 |
|
3 |
+
= 8.1.09 =
|
4 |
+
|
5 |
+
* siae="auto,500" i.e. responsive with maximum did not work as the maximum was not working. Fixed.
|
6 |
+
|
7 |
= 8.1.08 =
|
8 |
|
9 |
* New selectable item in Album cover (title) link: manual entered. If selected, an extra input field appears where you can enter any url the cover title should link to.
|
js/wppa-all.js
CHANGED
@@ -15,4 +15,4 @@ var wppaJsTouchVersion="8.0.01006";function wppaStartTime(){var p=(new Date).get
|
|
15 |
// wppa-zoom
|
16 |
var wppaJsZoomVersion="8.1.06.005";function wppaDoZoomPan(n,t){var h=jQuery;t&&(wppaZoomData[n]=t);var o=l(n);function p(t){var a,n,o,e,i,s=l(t);s.canvas&&(z()<s.time+10||(l(t,{time:z()}),(s.isLightbox&&!wppaOvlOpen||!s.isLightbox&&wppaOvlOpen)&&(s=l(0,{abort:!0})),s.abort?l(t,{manual:!1,buttondown:!1,pause:!1,ctx:null}):s.busy||(wppaDebugCounter++,e=(s=l(t,{busy:!0})).fromX,i=s.fromY,s.manual||(s.fromX+=s.deltaX,s.fromY+=s.deltaY,a=s.fromHeight/s.deltaFactor,n=s.fromWidth/s.deltaFactor,50<a&&(wppaIsFs()||a<=s.image.height)?(s.fromX-=(n-s.fromWidth)/2,s.fromY-=(a-s.fromHeight)/2,s.fromWidth=n,s.fromHeight=a):s.buttondown=!1),s.fromX=Math.max(0,Math.min(s.image.width-s.fromWidth,s.fromX)),s.fromY=Math.max(0,Math.min(s.image.height-s.fromHeight,s.fromY)),e==s.fromX&&i==s.fromY&&1==s.deltaFactor&&(s.buttondown=!1),o=screen.width/screen.height,e=(1-s.image.width/s.fromWidth)*s.canvas.width/2,i=(1-s.image.height/s.fromHeight)*s.canvas.height/2,s.ctx=s.canvas.getContext("2d"),o>s.imageRatio&&a>s.image.height&&wppaIsFs()||o<=s.imageRatio&&n>s.image.width&&wppaIsFs()?(s.enableManual=!1,s.ctx.clearRect(0,0,s.canvas.width,s.canvas.height),s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,e,i,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"default"})):(s.enableManual=!0,s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,0,0,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"grab"})),wppaIsFs()?(s.fsMaskTop=i-(s.canvas.height-screen.height)/2,s.fsMaskLeft=e-(s.canvas.width-screen.width)/2,s.fsMaskBottom=screen.height-s.fsMaskTop,s.fsMaskRight=screen.width-s.fsMaskLeft):(s.fsMaskTop=0,s.fsMaskLeft=0,s.fsMaskBottom=0,s.fsMaskRight=0),s.ctrlbarUpdate&&(wppaAdjustControlbar(),s.ctrlbarUpdate=!1),s.busy=!1,wppaIsElementInViewport(s.canvas)||(s.buttondown=!1),l(t,s),s.pause||!s.manual&&!s.buttondown||setTimeout(function(){p(t)},10),s.pause&&l(t,{pause:!1}))))}function a(t,a){var n,o=l(t);if(o){if(o.isLightbox){h("#wppa-overlay-zpc").css("display","");var e,i,s,r=!wppaIsFs(),c=r?(e=window.innerWidth||screen.width,window.innerHeight||screen.height):(e=screen.width,screen.height),d=0,u=8,m=8+(o.controls?o.icsize+10:0)+10;r?(u+=2*o.borderWidth,m+=2*o.borderWidth):u=40,n=r?c-m>(e-u)/o.imageRatio:(screenRatio=screen.width/screen.height,screenRatio<o.imageRatio),r&&n&&(d=(c-(s=(i=e-u)/o.imageRatio)-m)/2+20),r&&!n&&(s=(i=o.imageRatio*(c-(o.controls?o.icsize:0)-48))/o.imageRatio,d=20),!r&&n&&(i=(s=screen.height)*o.imageRatio,d=0),r||n||(s=(i=screen.width)/o.imageRatio,d=(screen.height-s)/2),h("#wppa-ovl-zoom-container").css({top:d}),h("#wppa-overlay-zpc").css({top:0,left:0}),o.canvasWidth=i,o.canvasHeight=s,o.canvas.width=o.canvasWidth,o.canvas.height=o.canvasHeight,r?(h("#wppa-ovl-zoom-container").css({backgroundColor:o.backgroundColor,padding:o.padding,borderRadius:o.borderRadius+"px",borderWidth:o.borderWidth+"px",width:i,marginLeft:0}),n?h("#wppa-overlay-zpc").css({left:4}):h("#wppa-overlay-zpc").css({left:(e-i)/2})):(h("#wppa-overlay-zpc").css({marginLeft:0}),h("#wppa-ovl-zoom-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",borderWidth:"0px",width:i,left:(e-i)/2,position:"fixed"})),o.ctrlbarUpdate=!0}else{if("force"!=a&&o.canvasWidth==h(o.div).parent().width())return;o.canvasWidth=h(o.div).parent().width(),o.canvasHeight=o.canvasWidth/o.imageRatio,o.canvas.width=o.canvasWidth,o.canvas.height=o.canvasHeight,o.ctrlbarUpdate=!0}l(t,o),setTimeout(function(){p(t)},1),h("#wppa-ovl-zoom-container").show()}}function e(t){var a=l(t),a=a.image.naturalWidth/a.canvas.width;a<1.5&&(a=1.5),l(t,{deltaX:a*=1.5,buttondown:!0,manual:!1}),p(t)}function i(t){var a=l(t),a=a.image.naturalWidth/a.canvas.width;a<1.5&&(a=1.5),l(t,{deltaX:-(a*=1.5),buttondown:!0,manual:!1}),p(t)}function s(t){var a=l(t),a=a.image.naturalHeight/a.canvas.height;a<1.5&&(a=1.5),l(t,{deltaY:-(a*=1.5),buttondown:!0,manual:!1}),p(t)}function r(t){var a=l(t),a=a.image.naturalHeight/a.canvas.height;a<1.5&&(a=1.5),l(t,{deltaY:a*=1.5,buttondown:!0,manual:!1}),p(t)}function c(t){l(t,{deltaFactor:1.005,buttondown:!0,manual:!1}),p(t)}function u(t){l(t,{deltaFactor:.995,buttondown:!0,manual:!1}),p(t)}function m(t){l(t,{deltaX:0,deltaY:0,deltaFactor:1,buttondown:!1})}function f(t,a){var n=l(t),o=g(a).X,e=g(a).Y;if(wppaIsFs()&&n.isLightbox&&(o<n.fsMaskLeft||o>n.fsMaskRight||e<n.fsMaskTop||e>n.fsMaskBottom))return l(0,{abort:!0}),void jQuery("#wppa-overlay-bg").trigger("click");n.enableManual&&(l(t,{manual:!0,savedCanvasX:o=b(t,a).X,savedCanvasY:e=b(t,a).Y,buttondown:!1}),p(t))}function w(t,a){a.preventDefault(),a.stopPropagation();var n,o=l(t),e=b(t,a).X,i=b(t,a).Y;o.manual&&(n=o.canvas.width/o.fromWidth,a=(o.savedCanvasX-e)/n+o.fromX,n=(o.savedCanvasY-i)/n+o.fromY,0<a&&0<n&&a+o.fromWidth<o.image.width&&n+o.fromHeight<o.image.height&&l(t,{fromX:a,fromY:n,savedCanvasX:e,savedCanvasY:i}))}function v(t){l(t,{manual:!1})}function l(t,a){if(!wppaZoomData[t])return!1;if(a)for(var n in a)wppaZoomData[t][n]=a[n];return wppaZoomData[t]}function g(t){var a;return t=t.touches?(a=t.touches[0].screenX,t.touches[0].screenY):(a=t.screenX,t.screenY),{X:a,Y:t}}function b(t,a){var n;return a=a.touches?(t=l(t),n=a.touches[0].screenX-t.fsMaskLeft,a.touches[0].screenY-t.fsMaskTop):(n=a.offsetX,a.offsetY),{X:n,Y:a}}function z(){return d=new Date,d.getTime()}o.initialized||o.abort||(o.isLightbox&&(h("#wppa-ovl-spin").show(),h("#wppa-ovl-zoom-container").hide()),o.image.complete?(h(image).css({width:image.naturalWidth,height:image.naturalHeight,maxWidth:image.naturalWidth,maxHeight:image.naturalHeight}),o.manual=!1,o.deltaX=0,o.deltaY=0,o.deltaFactor=1,o.busy=!1,o.div=h("#wppa-pan-div-"+o.itemId),o.canvas=document.getElementById("wppa-pan-canvas-"+o.itemId),o.left=h("#wppa-pctl-left-"+o.itemId),o.right=h("#wppa-pctl-right-"+o.itemId),o.up=h("#wppa-pctl-up-"+o.itemId),o.down=h("#wppa-pctl-down-"+o.itemId),o.zoomin=h("#wppa-pctl-zoomin-"+o.itemId),o.zoomout=h("#wppa-pctl-zoomout-"+o.itemId),o.prev=h("#wppa-pctl-prev-"+o.itemId),o.next=h("#wppa-pctl-next-"+o.itemId),o.exit=h("#wppa-exit-btn-2"),o.canvasWidth=o.width,o.canvasHeight=o.height,o.savedCanvasX=0,o.savedCanvasY=0,o.fromHeight=o.image.height,o.fromWidth=o.image.width,o.imageRatio=o.image.width/o.image.height,o.fromX=0,o.fromY=0,o.centerX=o.fromX+o.fromWidth/2,o.centerY=o.fromY+o.fromHeight/2,o.ctx=null,o.buttondown=!1,o.enableManual=!0,o.ctrlbarUpdate=!0,o.pause=!1,o.time=0,o.right.on("touchstart",function(t){e(n)}),o.right.on("touchend",function(t){m(n)}),o.left.on("touchstart",function(t){i(n)}),o.left.on("touchend",function(t){m(n)}),o.up.on("touchstart",function(t){s(n)}),o.up.on("touchend",function(t){m(n)}),o.down.on("touchstart",function(t){r(n)}),o.down.on("touchend",function(t){m(n)}),o.zoomin.on("touchstart",function(t){c(n)}),o.zoomin.on("touchend",function(t){m(n)}),o.zoomout.on("touchstart",function(t){u(n)}),o.zoomout.on("touchend",function(t){m(n)}),o.canvas&&(o.canvas.addEventListener("touchstart",function(t){f(n,t)}),o.canvas.addEventListener("touchmove",function(t){w(n,t)}),o.canvas.addEventListener("touchend",function(t){v(n)})),o.canvas&&(o.canvas.addEventListener("mousedown",function(t){f(n,t)}),o.canvas.addEventListener("mousemove",function(t){w(n,t)}),o.canvas.addEventListener("mouseup",function(t){v(n)}),o.canvas.addEventListener("mouseleave",function(t){(o=l(n)).manual&&l(n,{pause:!0})}),o.canvas.addEventListener("mouseenter",function(t){var a;l(a=n,{pause:!1}).manual&&p(a)}),document.getElementById("wppa-pan-canvas-"+o.itemId).addEventListener("wheel",function(t){var a;a=n,(t=t).preventDefault(),t.stopPropagation(),o=l(a),l(a,{deltaFactor:1+t.deltaY*o.zoomsensitivity/1e4,manual:!1,burrondown:!1}),p(a),setTimeout(function(){l(a,{deltaFactor:1})},25)})),o.right.on("mousedown",function(t){e(n)}),o.right.on("mouseup",function(t){m(n)}),o.left.on("mousedown",function(t){i(n)}),o.left.on("mouseup",function(t){m(n)}),o.up.on("mousedown",function(t){s(n)}),o.up.on("mouseup",function(t){m(n)}),o.down.on("mousedown",function(t){r(n)}),o.down.on("mouseup",function(t){m(n)}),o.zoomin.off("mousedown"),o.zoomin.on("mousedown",function(t){c(n)}),o.zoomin.off("mouseup"),o.zoomin.on("mouseup",function(t){m(n)}),o.zoomout.on("mousedown",function(t){u(n)}),o.zoomout.on("mouseup",function(t){m(n)}),o.isLightbox&&(h("body").on("quitimage",function(t){o=l(n,{abort:!0}),h(o.canvas).hide(),h("#wppa-pctl-div-"+o.itemId).hide(),h("#wppa-ovl-zoom-container").hide()}),h("#wppa-pctl-div-"+o.itemId).on("click",function(t){wppaKillEvent(t)})),o.isLightbox?(h(window).off("resize",wppaOvlShowSame),h(window).on("resize",wppaOvlShowSame)):h(window).on("wpparesizeend",function(t){a(n,t)}),a(n,"force"),o.initialized=!0,l(n,o),h("#wppa-ovl-spin").hide(),wppaProtect()):setTimeout(function(){wppaDoZoomPan(n)},200))}
|
17 |
// wppa-spheric
|
18 |
-
var wppaJsSphericVersion="8.1.
|
15 |
// wppa-zoom
|
16 |
var wppaJsZoomVersion="8.1.06.005";function wppaDoZoomPan(n,t){var h=jQuery;t&&(wppaZoomData[n]=t);var o=l(n);function p(t){var a,n,o,e,i,s=l(t);s.canvas&&(z()<s.time+10||(l(t,{time:z()}),(s.isLightbox&&!wppaOvlOpen||!s.isLightbox&&wppaOvlOpen)&&(s=l(0,{abort:!0})),s.abort?l(t,{manual:!1,buttondown:!1,pause:!1,ctx:null}):s.busy||(wppaDebugCounter++,e=(s=l(t,{busy:!0})).fromX,i=s.fromY,s.manual||(s.fromX+=s.deltaX,s.fromY+=s.deltaY,a=s.fromHeight/s.deltaFactor,n=s.fromWidth/s.deltaFactor,50<a&&(wppaIsFs()||a<=s.image.height)?(s.fromX-=(n-s.fromWidth)/2,s.fromY-=(a-s.fromHeight)/2,s.fromWidth=n,s.fromHeight=a):s.buttondown=!1),s.fromX=Math.max(0,Math.min(s.image.width-s.fromWidth,s.fromX)),s.fromY=Math.max(0,Math.min(s.image.height-s.fromHeight,s.fromY)),e==s.fromX&&i==s.fromY&&1==s.deltaFactor&&(s.buttondown=!1),o=screen.width/screen.height,e=(1-s.image.width/s.fromWidth)*s.canvas.width/2,i=(1-s.image.height/s.fromHeight)*s.canvas.height/2,s.ctx=s.canvas.getContext("2d"),o>s.imageRatio&&a>s.image.height&&wppaIsFs()||o<=s.imageRatio&&n>s.image.width&&wppaIsFs()?(s.enableManual=!1,s.ctx.clearRect(0,0,s.canvas.width,s.canvas.height),s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,e,i,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"default"})):(s.enableManual=!0,s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,0,0,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"grab"})),wppaIsFs()?(s.fsMaskTop=i-(s.canvas.height-screen.height)/2,s.fsMaskLeft=e-(s.canvas.width-screen.width)/2,s.fsMaskBottom=screen.height-s.fsMaskTop,s.fsMaskRight=screen.width-s.fsMaskLeft):(s.fsMaskTop=0,s.fsMaskLeft=0,s.fsMaskBottom=0,s.fsMaskRight=0),s.ctrlbarUpdate&&(wppaAdjustControlbar(),s.ctrlbarUpdate=!1),s.busy=!1,wppaIsElementInViewport(s.canvas)||(s.buttondown=!1),l(t,s),s.pause||!s.manual&&!s.buttondown||setTimeout(function(){p(t)},10),s.pause&&l(t,{pause:!1}))))}function a(t,a){var n,o=l(t);if(o){if(o.isLightbox){h("#wppa-overlay-zpc").css("display","");var e,i,s,r=!wppaIsFs(),c=r?(e=window.innerWidth||screen.width,window.innerHeight||screen.height):(e=screen.width,screen.height),d=0,u=8,m=8+(o.controls?o.icsize+10:0)+10;r?(u+=2*o.borderWidth,m+=2*o.borderWidth):u=40,n=r?c-m>(e-u)/o.imageRatio:(screenRatio=screen.width/screen.height,screenRatio<o.imageRatio),r&&n&&(d=(c-(s=(i=e-u)/o.imageRatio)-m)/2+20),r&&!n&&(s=(i=o.imageRatio*(c-(o.controls?o.icsize:0)-48))/o.imageRatio,d=20),!r&&n&&(i=(s=screen.height)*o.imageRatio,d=0),r||n||(s=(i=screen.width)/o.imageRatio,d=(screen.height-s)/2),h("#wppa-ovl-zoom-container").css({top:d}),h("#wppa-overlay-zpc").css({top:0,left:0}),o.canvasWidth=i,o.canvasHeight=s,o.canvas.width=o.canvasWidth,o.canvas.height=o.canvasHeight,r?(h("#wppa-ovl-zoom-container").css({backgroundColor:o.backgroundColor,padding:o.padding,borderRadius:o.borderRadius+"px",borderWidth:o.borderWidth+"px",width:i,marginLeft:0}),n?h("#wppa-overlay-zpc").css({left:4}):h("#wppa-overlay-zpc").css({left:(e-i)/2})):(h("#wppa-overlay-zpc").css({marginLeft:0}),h("#wppa-ovl-zoom-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",borderWidth:"0px",width:i,left:(e-i)/2,position:"fixed"})),o.ctrlbarUpdate=!0}else{if("force"!=a&&o.canvasWidth==h(o.div).parent().width())return;o.canvasWidth=h(o.div).parent().width(),o.canvasHeight=o.canvasWidth/o.imageRatio,o.canvas.width=o.canvasWidth,o.canvas.height=o.canvasHeight,o.ctrlbarUpdate=!0}l(t,o),setTimeout(function(){p(t)},1),h("#wppa-ovl-zoom-container").show()}}function e(t){var a=l(t),a=a.image.naturalWidth/a.canvas.width;a<1.5&&(a=1.5),l(t,{deltaX:a*=1.5,buttondown:!0,manual:!1}),p(t)}function i(t){var a=l(t),a=a.image.naturalWidth/a.canvas.width;a<1.5&&(a=1.5),l(t,{deltaX:-(a*=1.5),buttondown:!0,manual:!1}),p(t)}function s(t){var a=l(t),a=a.image.naturalHeight/a.canvas.height;a<1.5&&(a=1.5),l(t,{deltaY:-(a*=1.5),buttondown:!0,manual:!1}),p(t)}function r(t){var a=l(t),a=a.image.naturalHeight/a.canvas.height;a<1.5&&(a=1.5),l(t,{deltaY:a*=1.5,buttondown:!0,manual:!1}),p(t)}function c(t){l(t,{deltaFactor:1.005,buttondown:!0,manual:!1}),p(t)}function u(t){l(t,{deltaFactor:.995,buttondown:!0,manual:!1}),p(t)}function m(t){l(t,{deltaX:0,deltaY:0,deltaFactor:1,buttondown:!1})}function f(t,a){var n=l(t),o=g(a).X,e=g(a).Y;if(wppaIsFs()&&n.isLightbox&&(o<n.fsMaskLeft||o>n.fsMaskRight||e<n.fsMaskTop||e>n.fsMaskBottom))return l(0,{abort:!0}),void jQuery("#wppa-overlay-bg").trigger("click");n.enableManual&&(l(t,{manual:!0,savedCanvasX:o=b(t,a).X,savedCanvasY:e=b(t,a).Y,buttondown:!1}),p(t))}function w(t,a){a.preventDefault(),a.stopPropagation();var n,o=l(t),e=b(t,a).X,i=b(t,a).Y;o.manual&&(n=o.canvas.width/o.fromWidth,a=(o.savedCanvasX-e)/n+o.fromX,n=(o.savedCanvasY-i)/n+o.fromY,0<a&&0<n&&a+o.fromWidth<o.image.width&&n+o.fromHeight<o.image.height&&l(t,{fromX:a,fromY:n,savedCanvasX:e,savedCanvasY:i}))}function v(t){l(t,{manual:!1})}function l(t,a){if(!wppaZoomData[t])return!1;if(a)for(var n in a)wppaZoomData[t][n]=a[n];return wppaZoomData[t]}function g(t){var a;return t=t.touches?(a=t.touches[0].screenX,t.touches[0].screenY):(a=t.screenX,t.screenY),{X:a,Y:t}}function b(t,a){var n;return a=a.touches?(t=l(t),n=a.touches[0].screenX-t.fsMaskLeft,a.touches[0].screenY-t.fsMaskTop):(n=a.offsetX,a.offsetY),{X:n,Y:a}}function z(){return d=new Date,d.getTime()}o.initialized||o.abort||(o.isLightbox&&(h("#wppa-ovl-spin").show(),h("#wppa-ovl-zoom-container").hide()),o.image.complete?(h(image).css({width:image.naturalWidth,height:image.naturalHeight,maxWidth:image.naturalWidth,maxHeight:image.naturalHeight}),o.manual=!1,o.deltaX=0,o.deltaY=0,o.deltaFactor=1,o.busy=!1,o.div=h("#wppa-pan-div-"+o.itemId),o.canvas=document.getElementById("wppa-pan-canvas-"+o.itemId),o.left=h("#wppa-pctl-left-"+o.itemId),o.right=h("#wppa-pctl-right-"+o.itemId),o.up=h("#wppa-pctl-up-"+o.itemId),o.down=h("#wppa-pctl-down-"+o.itemId),o.zoomin=h("#wppa-pctl-zoomin-"+o.itemId),o.zoomout=h("#wppa-pctl-zoomout-"+o.itemId),o.prev=h("#wppa-pctl-prev-"+o.itemId),o.next=h("#wppa-pctl-next-"+o.itemId),o.exit=h("#wppa-exit-btn-2"),o.canvasWidth=o.width,o.canvasHeight=o.height,o.savedCanvasX=0,o.savedCanvasY=0,o.fromHeight=o.image.height,o.fromWidth=o.image.width,o.imageRatio=o.image.width/o.image.height,o.fromX=0,o.fromY=0,o.centerX=o.fromX+o.fromWidth/2,o.centerY=o.fromY+o.fromHeight/2,o.ctx=null,o.buttondown=!1,o.enableManual=!0,o.ctrlbarUpdate=!0,o.pause=!1,o.time=0,o.right.on("touchstart",function(t){e(n)}),o.right.on("touchend",function(t){m(n)}),o.left.on("touchstart",function(t){i(n)}),o.left.on("touchend",function(t){m(n)}),o.up.on("touchstart",function(t){s(n)}),o.up.on("touchend",function(t){m(n)}),o.down.on("touchstart",function(t){r(n)}),o.down.on("touchend",function(t){m(n)}),o.zoomin.on("touchstart",function(t){c(n)}),o.zoomin.on("touchend",function(t){m(n)}),o.zoomout.on("touchstart",function(t){u(n)}),o.zoomout.on("touchend",function(t){m(n)}),o.canvas&&(o.canvas.addEventListener("touchstart",function(t){f(n,t)}),o.canvas.addEventListener("touchmove",function(t){w(n,t)}),o.canvas.addEventListener("touchend",function(t){v(n)})),o.canvas&&(o.canvas.addEventListener("mousedown",function(t){f(n,t)}),o.canvas.addEventListener("mousemove",function(t){w(n,t)}),o.canvas.addEventListener("mouseup",function(t){v(n)}),o.canvas.addEventListener("mouseleave",function(t){(o=l(n)).manual&&l(n,{pause:!0})}),o.canvas.addEventListener("mouseenter",function(t){var a;l(a=n,{pause:!1}).manual&&p(a)}),document.getElementById("wppa-pan-canvas-"+o.itemId).addEventListener("wheel",function(t){var a;a=n,(t=t).preventDefault(),t.stopPropagation(),o=l(a),l(a,{deltaFactor:1+t.deltaY*o.zoomsensitivity/1e4,manual:!1,burrondown:!1}),p(a),setTimeout(function(){l(a,{deltaFactor:1})},25)})),o.right.on("mousedown",function(t){e(n)}),o.right.on("mouseup",function(t){m(n)}),o.left.on("mousedown",function(t){i(n)}),o.left.on("mouseup",function(t){m(n)}),o.up.on("mousedown",function(t){s(n)}),o.up.on("mouseup",function(t){m(n)}),o.down.on("mousedown",function(t){r(n)}),o.down.on("mouseup",function(t){m(n)}),o.zoomin.off("mousedown"),o.zoomin.on("mousedown",function(t){c(n)}),o.zoomin.off("mouseup"),o.zoomin.on("mouseup",function(t){m(n)}),o.zoomout.on("mousedown",function(t){u(n)}),o.zoomout.on("mouseup",function(t){m(n)}),o.isLightbox&&(h("body").on("quitimage",function(t){o=l(n,{abort:!0}),h(o.canvas).hide(),h("#wppa-pctl-div-"+o.itemId).hide(),h("#wppa-ovl-zoom-container").hide()}),h("#wppa-pctl-div-"+o.itemId).on("click",function(t){wppaKillEvent(t)})),o.isLightbox?(h(window).off("resize",wppaOvlShowSame),h(window).on("resize",wppaOvlShowSame)):h(window).on("wpparesizeend",function(t){a(n,t)}),a(n,"force"),o.initialized=!0,l(n,o),h("#wppa-ovl-spin").hide(),wppaProtect()):setTimeout(function(){wppaDoZoomPan(n)},200))}
|
17 |
// wppa-spheric
|
18 |
+
var wppaJsSphericVersion="8.1.09.001";function wppaDoSphericPan(n,e){var t;e&&((t=new Image).src=e.url,t.onload=function(){_wppaDoSphericPan(n,e)})}function _wppaDoSphericPan(t,n){var s=jQuery;n&&(wppaSphericData[t]=n);var w=f(t,w);function l(n){var e=f(n);!e.manCtrl&&b()<e.time+25||(f(n,{time:b()}),e.isLightbox&&(!wppaOvlOpen||wppaOvlActivePanorama!=e.id||wppaGlobalOvlPanoramaId>e.uId)&&(abort=!0),e.abort||((e.butDown||e.manCtrl)&&e.autorun&&(e.autorun=!1,e.dX=0),0==e.dX&&0==e.dY&&0==e.dFov&&(e.pause=!0),e.butDown&&(e.pause=!1),e.fov+=e.dFov,e.fov=Math.max(20,Math.min(120,e.fov)),e.wppaCamera=new THREE.PerspectiveCamera(e.fov,e.aspect,1,1e3),e.wppaCamera.target=new THREE.Vector3(0,0,0),e.lon+=e.dX,e.lat+=e.dY,e.lat=Math.max(-85,Math.min(85,e.lat)),e.wppaCamera.target.x=500*Math.sin(THREE.Math.degToRad(90-e.lat))*Math.cos(THREE.Math.degToRad(e.lon)),e.wppaCamera.target.y=500*Math.cos(THREE.Math.degToRad(90-e.lat)),e.wppaCamera.target.z=500*Math.sin(THREE.Math.degToRad(90-e.lat))*Math.sin(THREE.Math.degToRad(e.lon)),e.wppaCamera.lookAt(e.wppaCamera.target),e.wppaRenderer&&e.wppaRenderer.render(e.wppaScene,e.wppaCamera),wppaAdjustControlbar(),s("#wppa-ovl-spin").hide(),e.manCtrl,(e.autorun||!e.pause&&(e.manCtrl||e.butDown))&&e.wppaRenderer&&(e.timer=setTimeout(function(){l(n)},25)),f(n,e)))}function e(n,e){var t=!wppaIsFs();if(w=f(n)){if(w.isLightbox){if(!wppaOvlOpen)return;s("#wppa-overlay-pc").show(),s("#wppa-overlay-pc").css("width","");var a,o,p=(t=!wppaIsFs())?(o=window.innerWidth||screen.width,window.innerHeight||screen.height):(o=screen.width,screen.height),i=8,r=8+(w.controls?w.icsize+10:0)+30;t&&(i+=2*w.borderWidth,r+=2*w.borderWidth),a=(o-i)/2+r<p,r=t?a?(p-(c=(u=o-i)/2)-r)/2+20:(u=2*(c=p-r),20):(u=screen.width,c=screen.height,0),w.aspect=u/c,s("#wppa-ovl-sphericpan-container").css({top:r}),s("#wppa-overlay-pc").css({top:0}),t?(s("#wppa-ovl-sphericpan-container").css({backgroundColor:w.backgroundColor,padding:w.padding+"px",borderRadius:w.borderRadius+"px",width:u}),a?s("#wppa-overlay-pc").css({left:4}):s("#wppa-overlay-pc").css({left:(o-u)/2})):s("#wppa-ovl-sphericpan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",width:u,left:(o-u)/2}),w.wppaRenderer.setSize(u,c)}else{if("force"!=e&&0<w.width&&w.width==u&&w.height==c)return;var u=s(w.div).parent().width(),c=parseInt(u/2);if(!w.wppaRenderer)return;w.wppaRenderer.setSize(u,c)}w.width=u,w.height=c,f(n,w),w.timer=setTimeout(function(){l(n)},250)}}function a(n,e){e.preventDefault(),e.stopPropagation(),w=f(n,{manCtrl:!0,butDown:!1,autorun:!1,dX:0}),e.touches?f(n,{sX:e.touches[0].clientX,sY:e.touches[0].clientY}):f(n,{sX:e.clientX,sY:e.clientY}),f(n,{sLon:w.lon,sLat:w.lat}),l(n)}function o(n,e){e.preventDefault(),e.stopPropagation(),(w=f(n)).manCtrl&&(e.touches?f(n,{lon:.1*(w.sX-e.touches[0].clientX)+w.sLon,lat:.1*(e.touches[0].clientY-w.sY)+w.sLat,pause:!1}):f(n,{lon:.1*(w.sX-e.clientX)+w.sLon,lat:.1*(e.clientY-w.sY)+w.sLat,pause:!1}),l(n))}function p(n){f(n,{manCtrl:!1})}function i(n){w=f(n),f(n,{dFov:-.4*w.mFakt,butDown:!0}),l(n)}function r(n){w=f(n),f(n,{dFov:.4*w.mFakt,butDown:!0}),l(n)}function u(n){w=f(n),f(n,{dX:.2*w.mFakt,butDown:!0}),l(n)}function c(n){w=f(n),f(n,{dX:-.2*w.mFakt,butDown:!0}),l(n)}function h(n){w=f(n),f(n,{dY:.2*w.mFakt,butDown:!0}),l(n)}function m(n){w=f(n),f(n,{dY:-.2*w.mFakt,butDown:!0}),l(n)}function v(n){w=f(n),f(n,{dX:0,dY:0,dFov:0,butDown:!1,manCtrl:!1})}function f(n,e){if(!wppaSphericData[n])return!1;if(e)for(var t in e)wppaSphericData[n][t]=e[t];return wppaSphericData[n]}function b(){return d=new Date,d.getTime()}w.initialized||w.abort||w.isLightbox&&!wppaOvlOpen||(w.wppaRenderer&&(w.wppaRenderer.state.reset(),w.wppaSphere.dispose(),w.wppaSphereMaterial.dispose(),w.texture.dispose()),w.isLightbox&&wppaOvlOpen&&(s("#wppa-ovl-spin").show(),s("#wppa-overlay-ic").html("")),w.manCtrl=!1,w.butDown=!1,w.lon=180,w.lat=0,w.dFov=0,w.abort=!1,w.aspect=2,w.div=s("#wppa-pan-div-"+t),w.left=s("#wppa-pctl-left-"+t),w.right=s("#wppa-pctl-right-"+t),w.up=s("#wppa-pctl-up-"+t),w.down=s("#wppa-pctl-down-"+t),w.zoomin=s("#wppa-pctl-zoomin-"+t),w.zoomout=s("#wppa-pctl-zoomout-"+t),w.prev=s("#wppa-pctl-prev-"+t),w.next=s("#wppa-pctl-next-"+t),w.pause=!1,w.mFakt=wppaIsMobile?"2":"1",w.time=0,w.isLightbox&&(wppaGlobalOvlPanoramaId++,w.uId=wppaGlobalOvlPanoramaId),s(w.div).html(""),w.wppaRenderer||(w.wppaRenderer=new THREE.WebGLRenderer),w.wppaRenderer.setSize(w.width,w.height),s(w.div).append(w.wppaRenderer.domElement),w.wppaScene=new THREE.Scene,w.wppaSphere=new THREE.SphereGeometry(100,100,40),w.wppaSphere.applyMatrix4((new THREE.Matrix4).makeScale(-1,1,1)),w.texture=(new THREE.TextureLoader).load(w.url),w.wppaSphereMaterial=new THREE.MeshBasicMaterial({map:w.texture}),w.wppaSphereMesh=new THREE.Mesh(w.wppaSphere,w.wppaSphereMaterial),w.wppaScene.add(w.wppaSphereMesh),w.right.on("touchstart",function(n){u(t)}),w.right.on("touchend",function(n){v(t)}),w.left.on("touchstart",function(n){c(t)}),w.left.on("touchend",function(n){v(t)}),w.up.on("touchstart",function(n){h(t)}),w.up.on("touchend",function(n){v(t)}),w.down.on("touchstart",function(n){m(t)}),w.down.on("touchend",function(n){v(t)}),w.zoomin.on("touchstart",function(n){i(t)}),w.zoomin.on("touchend",function(n){v(t)}),w.zoomout.on("touchstart",function(n){r(t)}),w.zoomout.on("touchend",function(n){v(t)}),w.enableManual&&0<s("#wppa-pan-div-"+t+" canvas").length&&(s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchstart",function(n){a(t,n)}),s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchmove",function(n){o(t,n)}),s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchend",function(n){p(t)})),w.right.on("mousedown",function(n){u(t)}),w.right.on("mouseup",function(n){v(t)}),w.left.on("mousedown",function(n){c(t)}),w.left.on("mouseup",function(n){v(t)}),w.up.on("mousedown",function(n){h(t)}),w.up.on("mouseup",function(n){v(t)}),w.down.on("mousedown",function(n){m(t)}),w.down.on("mouseup",function(n){v(t)}),w.zoomin.off("mousedown"),w.zoomin.on("mousedown",function(n){i(t)}),w.zoomin.off("mouseup"),w.zoomin.on("mouseup",function(n){v(t)}),w.zoomout.on("mousedown",function(n){r(t)}),w.zoomout.on("mouseup",function(n){v(t)}),w.enableManual&&0<s("#wppa-pan-div-"+t+" canvas").length&&(s("#wppa-pan-div-"+t+" canvas").on("mousedown",function(n){a(t,n)}),s("#wppa-pan-div-"+t+" canvas").on("mousemove",function(n){o(t,n)}),s("#wppa-pan-div-"+t+" canvas").on("mouseup",function(n){p(t)}),s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("wheel",function(n){var e;e=t,(n=n).preventDefault(),n.stopPropagation(),w=f(e),f(e,{manCtrl:!1,butDown:!1,autorun:!1,dX:0,dFov:-n.deltaY*w.zoomsensitivity/60}),l(e),setTimeout(function(){f(e,{dFov:0})},25)})),w.isLightbox&&(s("body").on("quitimage",function(n){var e;w=f(e=t,{abort:!0,autorun:!1}),clearTimeout(w.timer),clearInterval(w.intervalTimer),s("#wppa-pan-div-"+e+" canvas").hide(),s("#wppa-pctl-div-"+e).hide(),s("#wppa-overlay-pc").hide()}),s("#wppa-pctl-div-"+t).on("click",function(n){wppaKillEvent(n)})),f(t,w),s(window).on("wpparesizeend",function(n){e(t,n)}),wppaProtect(),s(document).on("tabbychange",function(n){var e;e=t,w.wppaRenderer.state.reset(),w=f(e,{initialized:!1,abort:!0}),setTimeout(function(){f(e,{abort:!1}),wppaDoSphericPan(e)},200)}),e(t,"force"))}
|
js/wppa-gutenberg-wppa.js
CHANGED
@@ -713,11 +713,14 @@ function wppaGutenbergGetWppaShorcodeRendered( shortcode, divId ) {
|
|
713 |
'&occur=' + wppaPhotoDialogCounter,
|
714 |
async: true,
|
715 |
type: 'GET',
|
716 |
-
timeout:
|
717 |
beforeSend: function( xhr ) {
|
718 |
|
719 |
},
|
720 |
success: function( result, status, xhr ) {
|
|
|
|
|
|
|
721 |
jQuery( '#' + divId ).html( '<div id="wppa-container-'+wppaPhotoDialogCounter+'" style="clear:both;" ></div>' + result + '<div style="clear:both;" ></div>' );
|
722 |
},
|
723 |
error: function( xhr, status, error ) {
|
713 |
'&occur=' + wppaPhotoDialogCounter,
|
714 |
async: true,
|
715 |
type: 'GET',
|
716 |
+
timeout: 60000,
|
717 |
beforeSend: function( xhr ) {
|
718 |
|
719 |
},
|
720 |
success: function( result, status, xhr ) {
|
721 |
+
result = result.replace(/\[script/g, '<script');
|
722 |
+
result = result.replace(/\[\/script/g, '</script');
|
723 |
+
result = result.replace(/>/g, '>');
|
724 |
jQuery( '#' + divId ).html( '<div id="wppa-container-'+wppaPhotoDialogCounter+'" style="clear:both;" ></div>' + result + '<div style="clear:both;" ></div>' );
|
725 |
},
|
726 |
error: function( xhr, status, error ) {
|
js/wppa-spheric.js
CHANGED
@@ -2,10 +2,11 @@
|
|
2 |
//
|
3 |
// contains wppa functions for simple zoomable photos
|
4 |
//
|
5 |
-
var wppaJsSphericVersion = '8.1.
|
6 |
|
7 |
// The main proccedure
|
8 |
function wppaDoSphericPan(mocc, xdata) {
|
|
|
9 |
var img = new Image();
|
10 |
img.src = xdata.url;
|
11 |
img.onload = function () {
|
2 |
//
|
3 |
// contains wppa functions for simple zoomable photos
|
4 |
//
|
5 |
+
var wppaJsSphericVersion = '8.1.09.001';
|
6 |
|
7 |
// The main proccedure
|
8 |
function wppaDoSphericPan(mocc, xdata) {
|
9 |
+
if ( ! xdata ) return;
|
10 |
var img = new Image();
|
11 |
img.src = xdata.url;
|
12 |
img.onload = function () {
|
js/wppa-spheric.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var wppaJsSphericVersion="8.1.
|
1 |
+
var wppaJsSphericVersion="8.1.09.001";function wppaDoSphericPan(n,e){var t;e&&((t=new Image).src=e.url,t.onload=function(){_wppaDoSphericPan(n,e)})}function _wppaDoSphericPan(t,n){var s=jQuery;n&&(wppaSphericData[t]=n);var w=f(t,w);function l(n){var e=f(n);!e.manCtrl&&b()<e.time+25||(f(n,{time:b()}),e.isLightbox&&(!wppaOvlOpen||wppaOvlActivePanorama!=e.id||wppaGlobalOvlPanoramaId>e.uId)&&(abort=!0),e.abort||((e.butDown||e.manCtrl)&&e.autorun&&(e.autorun=!1,e.dX=0),0==e.dX&&0==e.dY&&0==e.dFov&&(e.pause=!0),e.butDown&&(e.pause=!1),e.fov+=e.dFov,e.fov=Math.max(20,Math.min(120,e.fov)),e.wppaCamera=new THREE.PerspectiveCamera(e.fov,e.aspect,1,1e3),e.wppaCamera.target=new THREE.Vector3(0,0,0),e.lon+=e.dX,e.lat+=e.dY,e.lat=Math.max(-85,Math.min(85,e.lat)),e.wppaCamera.target.x=500*Math.sin(THREE.Math.degToRad(90-e.lat))*Math.cos(THREE.Math.degToRad(e.lon)),e.wppaCamera.target.y=500*Math.cos(THREE.Math.degToRad(90-e.lat)),e.wppaCamera.target.z=500*Math.sin(THREE.Math.degToRad(90-e.lat))*Math.sin(THREE.Math.degToRad(e.lon)),e.wppaCamera.lookAt(e.wppaCamera.target),e.wppaRenderer&&e.wppaRenderer.render(e.wppaScene,e.wppaCamera),wppaAdjustControlbar(),s("#wppa-ovl-spin").hide(),e.manCtrl,(e.autorun||!e.pause&&(e.manCtrl||e.butDown))&&e.wppaRenderer&&(e.timer=setTimeout(function(){l(n)},25)),f(n,e)))}function e(n,e){var t=!wppaIsFs();if(w=f(n)){if(w.isLightbox){if(!wppaOvlOpen)return;s("#wppa-overlay-pc").show(),s("#wppa-overlay-pc").css("width","");var a,o,p=(t=!wppaIsFs())?(o=window.innerWidth||screen.width,window.innerHeight||screen.height):(o=screen.width,screen.height),i=8,r=8+(w.controls?w.icsize+10:0)+30;t&&(i+=2*w.borderWidth,r+=2*w.borderWidth),a=(o-i)/2+r<p,r=t?a?(p-(c=(u=o-i)/2)-r)/2+20:(u=2*(c=p-r),20):(u=screen.width,c=screen.height,0),w.aspect=u/c,s("#wppa-ovl-sphericpan-container").css({top:r}),s("#wppa-overlay-pc").css({top:0}),t?(s("#wppa-ovl-sphericpan-container").css({backgroundColor:w.backgroundColor,padding:w.padding+"px",borderRadius:w.borderRadius+"px",width:u}),a?s("#wppa-overlay-pc").css({left:4}):s("#wppa-overlay-pc").css({left:(o-u)/2})):s("#wppa-ovl-sphericpan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",width:u,left:(o-u)/2}),w.wppaRenderer.setSize(u,c)}else{if("force"!=e&&0<w.width&&w.width==u&&w.height==c)return;var u=s(w.div).parent().width(),c=parseInt(u/2);if(!w.wppaRenderer)return;w.wppaRenderer.setSize(u,c)}w.width=u,w.height=c,f(n,w),w.timer=setTimeout(function(){l(n)},250)}}function a(n,e){e.preventDefault(),e.stopPropagation(),w=f(n,{manCtrl:!0,butDown:!1,autorun:!1,dX:0}),e.touches?f(n,{sX:e.touches[0].clientX,sY:e.touches[0].clientY}):f(n,{sX:e.clientX,sY:e.clientY}),f(n,{sLon:w.lon,sLat:w.lat}),l(n)}function o(n,e){e.preventDefault(),e.stopPropagation(),(w=f(n)).manCtrl&&(e.touches?f(n,{lon:.1*(w.sX-e.touches[0].clientX)+w.sLon,lat:.1*(e.touches[0].clientY-w.sY)+w.sLat,pause:!1}):f(n,{lon:.1*(w.sX-e.clientX)+w.sLon,lat:.1*(e.clientY-w.sY)+w.sLat,pause:!1}),l(n))}function p(n){f(n,{manCtrl:!1})}function i(n){w=f(n),f(n,{dFov:-.4*w.mFakt,butDown:!0}),l(n)}function r(n){w=f(n),f(n,{dFov:.4*w.mFakt,butDown:!0}),l(n)}function u(n){w=f(n),f(n,{dX:.2*w.mFakt,butDown:!0}),l(n)}function c(n){w=f(n),f(n,{dX:-.2*w.mFakt,butDown:!0}),l(n)}function h(n){w=f(n),f(n,{dY:.2*w.mFakt,butDown:!0}),l(n)}function m(n){w=f(n),f(n,{dY:-.2*w.mFakt,butDown:!0}),l(n)}function v(n){w=f(n),f(n,{dX:0,dY:0,dFov:0,butDown:!1,manCtrl:!1})}function f(n,e){if(!wppaSphericData[n])return!1;if(e)for(var t in e)wppaSphericData[n][t]=e[t];return wppaSphericData[n]}function b(){return d=new Date,d.getTime()}w.initialized||w.abort||w.isLightbox&&!wppaOvlOpen||(w.wppaRenderer&&(w.wppaRenderer.state.reset(),w.wppaSphere.dispose(),w.wppaSphereMaterial.dispose(),w.texture.dispose()),w.isLightbox&&wppaOvlOpen&&(s("#wppa-ovl-spin").show(),s("#wppa-overlay-ic").html("")),w.manCtrl=!1,w.butDown=!1,w.lon=180,w.lat=0,w.dFov=0,w.abort=!1,w.aspect=2,w.div=s("#wppa-pan-div-"+t),w.left=s("#wppa-pctl-left-"+t),w.right=s("#wppa-pctl-right-"+t),w.up=s("#wppa-pctl-up-"+t),w.down=s("#wppa-pctl-down-"+t),w.zoomin=s("#wppa-pctl-zoomin-"+t),w.zoomout=s("#wppa-pctl-zoomout-"+t),w.prev=s("#wppa-pctl-prev-"+t),w.next=s("#wppa-pctl-next-"+t),w.pause=!1,w.mFakt=wppaIsMobile?"2":"1",w.time=0,w.isLightbox&&(wppaGlobalOvlPanoramaId++,w.uId=wppaGlobalOvlPanoramaId),s(w.div).html(""),w.wppaRenderer||(w.wppaRenderer=new THREE.WebGLRenderer),w.wppaRenderer.setSize(w.width,w.height),s(w.div).append(w.wppaRenderer.domElement),w.wppaScene=new THREE.Scene,w.wppaSphere=new THREE.SphereGeometry(100,100,40),w.wppaSphere.applyMatrix4((new THREE.Matrix4).makeScale(-1,1,1)),w.texture=(new THREE.TextureLoader).load(w.url),w.wppaSphereMaterial=new THREE.MeshBasicMaterial({map:w.texture}),w.wppaSphereMesh=new THREE.Mesh(w.wppaSphere,w.wppaSphereMaterial),w.wppaScene.add(w.wppaSphereMesh),w.right.on("touchstart",function(n){u(t)}),w.right.on("touchend",function(n){v(t)}),w.left.on("touchstart",function(n){c(t)}),w.left.on("touchend",function(n){v(t)}),w.up.on("touchstart",function(n){h(t)}),w.up.on("touchend",function(n){v(t)}),w.down.on("touchstart",function(n){m(t)}),w.down.on("touchend",function(n){v(t)}),w.zoomin.on("touchstart",function(n){i(t)}),w.zoomin.on("touchend",function(n){v(t)}),w.zoomout.on("touchstart",function(n){r(t)}),w.zoomout.on("touchend",function(n){v(t)}),w.enableManual&&0<s("#wppa-pan-div-"+t+" canvas").length&&(s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchstart",function(n){a(t,n)}),s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchmove",function(n){o(t,n)}),s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchend",function(n){p(t)})),w.right.on("mousedown",function(n){u(t)}),w.right.on("mouseup",function(n){v(t)}),w.left.on("mousedown",function(n){c(t)}),w.left.on("mouseup",function(n){v(t)}),w.up.on("mousedown",function(n){h(t)}),w.up.on("mouseup",function(n){v(t)}),w.down.on("mousedown",function(n){m(t)}),w.down.on("mouseup",function(n){v(t)}),w.zoomin.off("mousedown"),w.zoomin.on("mousedown",function(n){i(t)}),w.zoomin.off("mouseup"),w.zoomin.on("mouseup",function(n){v(t)}),w.zoomout.on("mousedown",function(n){r(t)}),w.zoomout.on("mouseup",function(n){v(t)}),w.enableManual&&0<s("#wppa-pan-div-"+t+" canvas").length&&(s("#wppa-pan-div-"+t+" canvas").on("mousedown",function(n){a(t,n)}),s("#wppa-pan-div-"+t+" canvas").on("mousemove",function(n){o(t,n)}),s("#wppa-pan-div-"+t+" canvas").on("mouseup",function(n){p(t)}),s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("wheel",function(n){var e;e=t,(n=n).preventDefault(),n.stopPropagation(),w=f(e),f(e,{manCtrl:!1,butDown:!1,autorun:!1,dX:0,dFov:-n.deltaY*w.zoomsensitivity/60}),l(e),setTimeout(function(){f(e,{dFov:0})},25)})),w.isLightbox&&(s("body").on("quitimage",function(n){var e;w=f(e=t,{abort:!0,autorun:!1}),clearTimeout(w.timer),clearInterval(w.intervalTimer),s("#wppa-pan-div-"+e+" canvas").hide(),s("#wppa-pctl-div-"+e).hide(),s("#wppa-overlay-pc").hide()}),s("#wppa-pctl-div-"+t).on("click",function(n){wppaKillEvent(n)})),f(t,w),s(window).on("wpparesizeend",function(n){e(t,n)}),wppaProtect(),s(document).on("tabbychange",function(n){var e;e=t,w.wppaRenderer.state.reset(),w=f(e,{initialized:!1,abort:!0}),setTimeout(function(){f(e,{abort:!1}),wppaDoSphericPan(e)},200)}),e(t,"force"))}
|
theme/wppa-style.css
CHANGED
@@ -28,6 +28,16 @@
|
|
28 |
}
|
29 |
|
30 |
/* Navigation */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
.prev {
|
32 |
}
|
33 |
.next {
|
@@ -610,6 +620,9 @@ display:none;
|
|
610 |
position:fixed;
|
611 |
top:0;
|
612 |
}
|
|
|
|
|
|
|
613 |
|
614 |
/* Global fs buttons */
|
615 |
#wppa-fulls-btn-1, #wppa-exit-fulls-btn-1, #wppa-ovl-spin {
|
28 |
}
|
29 |
|
30 |
/* Navigation */
|
31 |
+
.wppa-ajax-spin {
|
32 |
+
position:absolute;
|
33 |
+
display:none;
|
34 |
+
left:50%;
|
35 |
+
top:50%;
|
36 |
+
margin:0;
|
37 |
+
padding:0;
|
38 |
+
z-index:200100;
|
39 |
+
box-shadow:none;
|
40 |
+
}
|
41 |
.prev {
|
42 |
}
|
43 |
.next {
|
620 |
position:fixed;
|
621 |
top:0;
|
622 |
}
|
623 |
+
. wppa-ovl-preload {
|
624 |
+
z-index:200011;
|
625 |
+
}
|
626 |
|
627 |
/* Global fs buttons */
|
628 |
#wppa-fulls-btn-1, #wppa-exit-fulls-btn-1, #wppa-ovl-spin {
|
wppa-admin-functions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* gp admin functions
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* gp admin functions
|
6 |
+
* Version 8.1.09.001
|
7 |
*
|
8 |
*/
|
9 |
|
wppa-admin-styles.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/* admin-styles.css
|
2 |
*
|
3 |
* wp-photo-album-plus
|
4 |
-
* version 8.1.
|
5 |
*/
|
6 |
#files_list, #files_list2
|
7 |
{
|
@@ -445,7 +445,7 @@ border:1px solid black;
|
|
445 |
border-style: solid;
|
446 |
text-align: center;
|
447 |
margin: 0 4px 6px 0;
|
448 |
-
border-radius:
|
449 |
cursor: pointer;
|
450 |
}
|
451 |
#wppa-setting-tab-99 {
|
@@ -524,7 +524,7 @@ border:1px solid black;
|
|
524 |
background-color: #7f7;
|
525 |
width:0%;
|
526 |
height:15px;
|
527 |
-
border-radius:
|
528 |
line-height: 18px;
|
529 |
margin: 0;
|
530 |
}
|
1 |
/* admin-styles.css
|
2 |
*
|
3 |
* wp-photo-album-plus
|
4 |
+
* version 8.1.09.001
|
5 |
*/
|
6 |
#files_list, #files_list2
|
7 |
{
|
445 |
border-style: solid;
|
446 |
text-align: center;
|
447 |
margin: 0 4px 6px 0;
|
448 |
+
border-radius:8px;
|
449 |
cursor: pointer;
|
450 |
}
|
451 |
#wppa-setting-tab-99 {
|
524 |
background-color: #7f7;
|
525 |
width:0%;
|
526 |
height:15px;
|
527 |
+
border-radius:3px;
|
528 |
line-height: 18px;
|
529 |
margin: 0;
|
530 |
}
|
wppa-admin.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains the admin menu and startups the admin pages
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains the admin menu and startups the admin pages
|
6 |
+
* Version 8.1.09.001
|
7 |
*
|
8 |
*/
|
9 |
|
wppa-adminbar.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* enhances the admin bar with wppa+ menu
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* enhances the admin bar with wppa+ menu
|
6 |
+
* Version 8.1.09.001
|
7 |
*
|
8 |
*/
|
9 |
|
wppa-admins-choice-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the admins-choice widget
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the admins-choice widget
|
6 |
+
* Version 8.1.09.001
|
7 |
*
|
8 |
*/
|
9 |
|
wppa-ajax.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-ajax.php
|
3 |
*
|
4 |
* Functions used in ajax requests
|
5 |
-
* Version 8.1.
|
6 |
*
|
7 |
*/
|
8 |
|
@@ -1064,10 +1064,6 @@ global $wppa;
|
|
1064 |
break;
|
1065 |
|
1066 |
case 'getshortcodedrendered':
|
1067 |
-
// if ( isset( $_REQUEST['shortcode'] ) ) {
|
1068 |
-
// $_REQUEST['shortcode'] = str_replace( '@', '#', stripslashes( $_REQUEST['shortcode'] ) );
|
1069 |
-
// }
|
1070 |
-
|
1071 |
$shortcode = wppa_get( 'shortcode', '', 'gutsc' );
|
1072 |
wppa_load_theme();
|
1073 |
|
@@ -1078,8 +1074,10 @@ global $wppa;
|
|
1078 |
$result = do_shortcode( $shortcode );
|
1079 |
$result = str_replace( 'href=', 'data-href=', $result );
|
1080 |
$result = str_replace( 'onclick="', 'onclick="return false;', $result );
|
|
|
|
|
1081 |
|
1082 |
-
|
1083 |
<div
|
1084 |
id="wppa-gutenberg-div-' . $wppa['mocc'] . '"
|
1085 |
style="position:relative;width:100%" >
|
@@ -1259,7 +1257,7 @@ global $wppa;
|
|
1259 |
$ratingstatus = 'publish';
|
1260 |
}
|
1261 |
|
1262 |
-
// When done, we have to
|
1263 |
// So we have to do: process rating and find new $myavgrat, $allavgrat and $discount ( $occur, $photo and $index are known )
|
1264 |
// Error message format: '0||<errcode>||<errtext>
|
1265 |
// errcode = 900: user error, other codes: real errors
|
@@ -1494,7 +1492,7 @@ global $wppa;
|
|
1494 |
// Render
|
1495 |
$result = wppa_albums();
|
1496 |
$result = wppa_make_relative( $result );
|
1497 |
-
echo $result;
|
1498 |
|
1499 |
wppa_print_psjs();
|
1500 |
|
@@ -3009,24 +3007,24 @@ global $wppa;
|
|
3009 |
// Dispatch on option
|
3010 |
if ( $option == 'wppa_getspinnerpreview' ) {
|
3011 |
if ( wppa_get( 'type' ) == 'normal' ) {
|
3012 |
-
|
3013 |
-
|
3014 |
-
|
3015 |
-
|
3016 |
-
|
3017 |
-
|
3018 |
-
|
3019 |
-
) );
|
3020 |
}
|
3021 |
elseif ( wppa_get( 'type' ) == 'lightbox' ) {
|
3022 |
-
|
3023 |
-
|
3024 |
-
|
3025 |
-
|
3026 |
-
|
3027 |
-
|
3028 |
-
|
3029 |
-
) );
|
3030 |
}
|
3031 |
else {
|
3032 |
wppa_echo( 'Error' );
|
@@ -3045,7 +3043,7 @@ global $wppa;
|
|
3045 |
else {
|
3046 |
$output = '||1||Failed to update '.$tag.'||';
|
3047 |
}
|
3048 |
-
|
3049 |
wppa_exit();
|
3050 |
}
|
3051 |
elseif ( substr( $option, 0, 17 ) == 'wppa_iptc_status_' ) {
|
@@ -3059,7 +3057,7 @@ global $wppa;
|
|
3059 |
else {
|
3060 |
$output = '||1||Failed to update '.$tag.'||';
|
3061 |
}
|
3062 |
-
|
3063 |
wppa_exit();
|
3064 |
}
|
3065 |
elseif ( substr( $option, 0, 16 ) == 'wppa_exif_label_' ) {
|
@@ -3073,7 +3071,7 @@ global $wppa;
|
|
3073 |
else {
|
3074 |
$output = '||1||Failed to update '.$tag.'||';
|
3075 |
}
|
3076 |
-
|
3077 |
wppa_exit();
|
3078 |
}
|
3079 |
elseif ( substr( $option, 0, 17 ) == 'wppa_exif_status_' ) {
|
@@ -3087,7 +3085,7 @@ global $wppa;
|
|
3087 |
else {
|
3088 |
$output = '||1||Failed to update '.$tag.'||';
|
3089 |
}
|
3090 |
-
|
3091 |
wppa_exit();
|
3092 |
}
|
3093 |
elseif ( substr( $option, 0, 10 ) == 'wppa_caps-' ) { // Is capability setting
|
@@ -3127,7 +3125,7 @@ global $wppa;
|
|
3127 |
// Produce the response text
|
3128 |
$output = '||0||'.esc_attr( $title ).'||';
|
3129 |
|
3130 |
-
|
3131 |
wppa_clear_cache( ['qr' => true] );
|
3132 |
wppa_exit();
|
3133 |
break; // End update qr setting
|
@@ -3859,7 +3857,7 @@ global $wppa;
|
|
3859 |
// Produce the response text
|
3860 |
$output = '||'.$error.'||'.esc_attr( $title ).'||'.esc_js( $alert ).'||'.$crondata;
|
3861 |
|
3862 |
-
|
3863 |
if ( $option != 'wppa_heartbeat' &&
|
3864 |
$option != 'wppa_errorlog_purge' &&
|
3865 |
substr( $option, 0, 9 ) != 'wppa_log_' ) {
|
@@ -3891,7 +3889,7 @@ global $wppa;
|
|
3891 |
|
3892 |
// Not a cron job, run realtime
|
3893 |
else {
|
3894 |
-
|
3895 |
}
|
3896 |
|
3897 |
wppa_exit();
|
@@ -3904,7 +3902,7 @@ global $wppa;
|
|
3904 |
wppa_echo( 'Security check failure||'.$slug.'||Error||0' );
|
3905 |
wppa_exit();
|
3906 |
}
|
3907 |
-
|
3908 |
wppa_exit();
|
3909 |
break;
|
3910 |
|
@@ -3912,11 +3910,11 @@ global $wppa;
|
|
3912 |
require_once 'wppa-non-admin.php';
|
3913 |
|
3914 |
wppa_user_upload();
|
3915 |
-
|
3916 |
global $wppa_upload_succes_id;
|
3917 |
if ( ( wppa_get( 'fromtinymce' ) || wppa_get( 'fromgutenberg' ) ) && $wppa_upload_succes_id ) {
|
3918 |
wppa_echo( '||' . $wppa_upload_succes_id . '||' );
|
3919 |
-
|
3920 |
}
|
3921 |
wppa_exit();
|
3922 |
break;
|
@@ -3926,7 +3924,7 @@ global $wppa;
|
|
3926 |
$album = wppa_get( 'album' );
|
3927 |
$deftags = ( wppa_is_int( $album ) && $album > '0' ) ? wppa_get_album_item( $album, 'default_tags' ) : '';
|
3928 |
$tags = $deftags ? $tags . ',' . $deftags : $tags;
|
3929 |
-
|
3930 |
wppa_exit();
|
3931 |
break;
|
3932 |
|
@@ -4024,7 +4022,7 @@ function wppa_ajax_check_range( $value, $fixed, $low, $high, $title ) {
|
|
4024 |
function wppa_secfail( $id, $prolog = '' ) {
|
4025 |
|
4026 |
$text = sprintf( __( 'Security check failure %d', 'wp-photo-album-plus' ), $id );
|
4027 |
-
|
4028 |
wppa_exit();
|
4029 |
}
|
4030 |
|
@@ -4130,6 +4128,6 @@ function wppa_json_photo_update( $id, $txt, $err = '0', $thumbmod = false, $phot
|
|
4130 |
|
4131 |
wppa_log( 'dbg', $result );
|
4132 |
|
4133 |
-
|
4134 |
wppa_exit();
|
4135 |
}
|
2 |
/* wppa-ajax.php
|
3 |
*
|
4 |
* Functions used in ajax requests
|
5 |
+
* Version 8.1.09.001
|
6 |
*
|
7 |
*/
|
8 |
|
1064 |
break;
|
1065 |
|
1066 |
case 'getshortcodedrendered':
|
|
|
|
|
|
|
|
|
1067 |
$shortcode = wppa_get( 'shortcode', '', 'gutsc' );
|
1068 |
wppa_load_theme();
|
1069 |
|
1074 |
$result = do_shortcode( $shortcode );
|
1075 |
$result = str_replace( 'href=', 'data-href=', $result );
|
1076 |
$result = str_replace( 'onclick="', 'onclick="return false;', $result );
|
1077 |
+
$result = str_replace( '<script', '[script', $result );
|
1078 |
+
$result = str_replace( '</script', '[/script', $result );
|
1079 |
|
1080 |
+
wppa_echo ( '
|
1081 |
<div
|
1082 |
id="wppa-gutenberg-div-' . $wppa['mocc'] . '"
|
1083 |
style="position:relative;width:100%" >
|
1257 |
$ratingstatus = 'publish';
|
1258 |
}
|
1259 |
|
1260 |
+
// When done, we have to print $occur.'||'.$photo.'||'.$index.'||'.$myavgrat.'||'.$allavgrat.'||'.$discount.'||'.$hascommented.'||'.$message;
|
1261 |
// So we have to do: process rating and find new $myavgrat, $allavgrat and $discount ( $occur, $photo and $index are known )
|
1262 |
// Error message format: '0||<errcode>||<errtext>
|
1263 |
// errcode = 900: user error, other codes: real errors
|
1492 |
// Render
|
1493 |
$result = wppa_albums();
|
1494 |
$result = wppa_make_relative( $result );
|
1495 |
+
echo( $result );
|
1496 |
|
1497 |
wppa_print_psjs();
|
1498 |
|
3007 |
// Dispatch on option
|
3008 |
if ( $option == 'wppa_getspinnerpreview' ) {
|
3009 |
if ( wppa_get( 'type' ) == 'normal' ) {
|
3010 |
+
wppa_echo( wppa_get_spinner_svg_html( array( 'size' => 60,
|
3011 |
+
'display' => 'inline',
|
3012 |
+
'lightbox' => false,
|
3013 |
+
'position' => 'relative',
|
3014 |
+
'left' => '0',
|
3015 |
+
'top' => '0',
|
3016 |
+
'margin' => '0',
|
3017 |
+
) ) );
|
3018 |
}
|
3019 |
elseif ( wppa_get( 'type' ) == 'lightbox' ) {
|
3020 |
+
wppa_echo( wppa_get_spinner_svg_html( array( 'size' => 60,
|
3021 |
+
'display' => 'inline',
|
3022 |
+
'lightbox' => true,
|
3023 |
+
'position' => 'relative',
|
3024 |
+
'left' => '0',
|
3025 |
+
'top' => '0',
|
3026 |
+
'margin' => '0',
|
3027 |
+
) ) );
|
3028 |
}
|
3029 |
else {
|
3030 |
wppa_echo( 'Error' );
|
3043 |
else {
|
3044 |
$output = '||1||Failed to update '.$tag.'||';
|
3045 |
}
|
3046 |
+
wppa_echo( $output );
|
3047 |
wppa_exit();
|
3048 |
}
|
3049 |
elseif ( substr( $option, 0, 17 ) == 'wppa_iptc_status_' ) {
|
3057 |
else {
|
3058 |
$output = '||1||Failed to update '.$tag.'||';
|
3059 |
}
|
3060 |
+
wppa_echo( $output );
|
3061 |
wppa_exit();
|
3062 |
}
|
3063 |
elseif ( substr( $option, 0, 16 ) == 'wppa_exif_label_' ) {
|
3071 |
else {
|
3072 |
$output = '||1||Failed to update '.$tag.'||';
|
3073 |
}
|
3074 |
+
wppa_echo( $output );
|
3075 |
wppa_exit();
|
3076 |
}
|
3077 |
elseif ( substr( $option, 0, 17 ) == 'wppa_exif_status_' ) {
|
3085 |
else {
|
3086 |
$output = '||1||Failed to update '.$tag.'||';
|
3087 |
}
|
3088 |
+
wppa_echo( $output );
|
3089 |
wppa_exit();
|
3090 |
}
|
3091 |
elseif ( substr( $option, 0, 10 ) == 'wppa_caps-' ) { // Is capability setting
|
3125 |
// Produce the response text
|
3126 |
$output = '||0||'.esc_attr( $title ).'||';
|
3127 |
|
3128 |
+
wppa_echo( $output );
|
3129 |
wppa_clear_cache( ['qr' => true] );
|
3130 |
wppa_exit();
|
3131 |
break; // End update qr setting
|
3857 |
// Produce the response text
|
3858 |
$output = '||'.$error.'||'.esc_attr( $title ).'||'.esc_js( $alert ).'||'.$crondata;
|
3859 |
|
3860 |
+
wppa_echo( $output );
|
3861 |
if ( $option != 'wppa_heartbeat' &&
|
3862 |
$option != 'wppa_errorlog_purge' &&
|
3863 |
substr( $option, 0, 9 ) != 'wppa_log_' ) {
|
3889 |
|
3890 |
// Not a cron job, run realtime
|
3891 |
else {
|
3892 |
+
wppa_echo( wppa_do_maintenance_proc( $slug ) );
|
3893 |
}
|
3894 |
|
3895 |
wppa_exit();
|
3902 |
wppa_echo( 'Security check failure||'.$slug.'||Error||0' );
|
3903 |
wppa_exit();
|
3904 |
}
|
3905 |
+
wppa_echo( wppa_do_maintenance_popup( $slug ) );
|
3906 |
wppa_exit();
|
3907 |
break;
|
3908 |
|
3910 |
require_once 'wppa-non-admin.php';
|
3911 |
|
3912 |
wppa_user_upload();
|
3913 |
+
|
3914 |
global $wppa_upload_succes_id;
|
3915 |
if ( ( wppa_get( 'fromtinymce' ) || wppa_get( 'fromgutenberg' ) ) && $wppa_upload_succes_id ) {
|
3916 |
wppa_echo( '||' . $wppa_upload_succes_id . '||' );
|
3917 |
+
wppa_echo( wppa_get_myphotos_selection_body_for_tinymce( $wppa_upload_succes_id ) );
|
3918 |
}
|
3919 |
wppa_exit();
|
3920 |
break;
|
3924 |
$album = wppa_get( 'album' );
|
3925 |
$deftags = ( wppa_is_int( $album ) && $album > '0' ) ? wppa_get_album_item( $album, 'default_tags' ) : '';
|
3926 |
$tags = $deftags ? $tags . ',' . $deftags : $tags;
|
3927 |
+
wppa_echo( wppa_sanitize_tags( $tags, false, true ) );
|
3928 |
wppa_exit();
|
3929 |
break;
|
3930 |
|
4022 |
function wppa_secfail( $id, $prolog = '' ) {
|
4023 |
|
4024 |
$text = sprintf( __( 'Security check failure %d', 'wp-photo-album-plus' ), $id );
|
4025 |
+
wppa_echo ( $prolog . ' ' . $text );
|
4026 |
wppa_exit();
|
4027 |
}
|
4028 |
|
4128 |
|
4129 |
wppa_log( 'dbg', $result );
|
4130 |
|
4131 |
+
wppa_echo( $result );
|
4132 |
wppa_exit();
|
4133 |
}
|
wppa-album-admin-autosave.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* create, edit and delete albums
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* create, edit and delete albums
|
6 |
+
* Version 8.1.09.001
|
7 |
*
|
8 |
*/
|
9 |
|
wppa-album-covers.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Functions for album covers
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -1738,7 +1738,7 @@ function wppa_album_cover_view_link(
|
|
1738 |
if ( $href_content == '#' ) {
|
1739 |
wppa_out(
|
1740 |
'<a class="wppa-album-cover-link" onclick="' . $onclick_content . '" title="' . __( 'View the album' , 'wp-photo-album-plus' ) . ' ' .
|
1741 |
-
esc_attr( stripslashes( __( $album['name'] ) ) ) . '" style="cursor:pointer;"
|
1742 |
);
|
1743 |
}
|
1744 |
else {
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Functions for album covers
|
6 |
+
* Version 8.1.09.001
|
7 |
*
|
8 |
*/
|
9 |
|
1738 |
if ( $href_content == '#' ) {
|
1739 |
wppa_out(
|
1740 |
'<a class="wppa-album-cover-link" onclick="' . $onclick_content . '" title="' . __( 'View the album' , 'wp-photo-album-plus' ) . ' ' .
|
1741 |
+
esc_attr( stripslashes( __( $album['name'] ) ) ) . '" style="cursor:pointer;">'
|
1742 |
);
|
1743 |
}
|
1744 |
else {
|
wppa-album-navigator-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display album names linking to content
|
6 |
-
* Version 8.1.
|
7 |
*/
|
8 |
|
9 |
class AlbumNavigatorWidget extends WP_Widget {
|
@@ -215,7 +215,7 @@ class AlbumNavigatorWidget extends WP_Widget {
|
|
215 |
if ( ! empty( $albums ) ) {
|
216 |
wppa_cache_album( 'add', $albums );
|
217 |
$result .= '
|
218 |
-
<ul class="albnav-ul albnav-ul-' . $level . '
|
219 |
foreach ( $albums as $album ) {
|
220 |
$a = $album['id'];
|
221 |
$treecount = wppa_get_treecounts_a( $a );
|
@@ -223,11 +223,8 @@ class AlbumNavigatorWidget extends WP_Widget {
|
|
223 |
$has_children = wppa_has_children($a);
|
224 |
$result .= '
|
225 |
<li
|
226 |
-
class="anw-'.$w.'-'.$p.$propclass.' albnav albnav-li albnav-li-' . $level . '
|
227 |
-
style="
|
228 |
-
list-style:none;' .
|
229 |
-
( $level == '1' ? '' : 'display:none;' ) . '
|
230 |
-
"
|
231 |
>';
|
232 |
if ( $has_children ) {
|
233 |
$result .= '
|
@@ -237,7 +234,7 @@ class AlbumNavigatorWidget extends WP_Widget {
|
|
237 |
onclick="
|
238 |
jQuery(\'.anw-'.$w.'-'.$a.'\').css(\'display\',\'\');
|
239 |
jQuery(\'.anw-'.$w.'-'.$a.'-\').css(\'display\',\'none\');
|
240 |
-
"
|
241 |
( $a == $ca ? '»' : '+') .
|
242 |
'</span>
|
243 |
<span
|
@@ -247,7 +244,7 @@ class AlbumNavigatorWidget extends WP_Widget {
|
|
247 |
jQuery(\'.anw-'.$w.'-'.$a.'-\').css(\'display\',\'\');
|
248 |
jQuery(\'.anw-'.$w.'-'.$a.'\').css(\'display\',\'none\');
|
249 |
jQuery(\'.p-'.$w.'-'.$a.'\').css(\'display\',\'none\');
|
250 |
-
"
|
251 |
( $a == $ca ? '»' : '-') .
|
252 |
'</span>';
|
253 |
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display album names linking to content
|
6 |
+
* Version 8.1.09.001
|
7 |
*/
|
8 |
|
9 |
class AlbumNavigatorWidget extends WP_Widget {
|
215 |
if ( ! empty( $albums ) ) {
|
216 |
wppa_cache_album( 'add', $albums );
|
217 |
$result .= '
|
218 |
+
<ul class="albnav-ul albnav-ul-' . $level . '">';
|
219 |
foreach ( $albums as $album ) {
|
220 |
$a = $album['id'];
|
221 |
$treecount = wppa_get_treecounts_a( $a );
|
223 |
$has_children = wppa_has_children($a);
|
224 |
$result .= '
|
225 |
<li
|
226 |
+
class="anw-'.$w.'-'.$p.$propclass.' albnav albnav-li albnav-li-' . $level . '"
|
227 |
+
style="list-style:none;' . ( $level == '1' ? '' : 'display:none;' ) . '"
|
|
|
|
|
|
|
228 |
>';
|
229 |
if ( $has_children ) {
|
230 |
$result .= '
|
234 |
onclick="
|
235 |
jQuery(\'.anw-'.$w.'-'.$a.'\').css(\'display\',\'\');
|
236 |
jQuery(\'.anw-'.$w.'-'.$a.'-\').css(\'display\',\'none\');
|
237 |
+
">' .
|
238 |
( $a == $ca ? '»' : '+') .
|
239 |
'</span>
|
240 |
<span
|
244 |
jQuery(\'.anw-'.$w.'-'.$a.'-\').css(\'display\',\'\');
|
245 |
jQuery(\'.anw-'.$w.'-'.$a.'\').css(\'display\',\'none\');
|
246 |
jQuery(\'.p-'.$w.'-'.$a.'\').css(\'display\',\'none\');
|
247 |
+
">' .
|
248 |
( $a == $ca ? '»' : '-') .
|
249 |
'</span>';
|
250 |
}
|
wppa-album-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display thumbnail albums
|
6 |
-
* Version 8.1.
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
@@ -39,9 +39,9 @@ class AlbumWidget extends WP_Widget {
|
|
39 |
|
40 |
// Cache?
|
41 |
if ( $cache && wppa_is_file( $cachefile ) ) {
|
42 |
-
|
43 |
update_option( 'wppa_cache_hits', get_option( 'wppa_cache_hits', 0 ) +1 );
|
44 |
-
|
45 |
wppa( 'in_widget', false );
|
46 |
return;
|
47 |
}
|
@@ -215,8 +215,6 @@ class AlbumWidget extends WP_Widget {
|
|
215 |
id="i-' . strval( intval( $image['id'] ) ) . '-' . wppa( 'mocc' ) . '"
|
216 |
title="' . esc_attr( $title ) . '"
|
217 |
src="' . esc_url( $imgurl ) . '"
|
218 |
-
width="' . esc_attr( $width ) . '"
|
219 |
-
height="' . esc_attr( $height ) . '"
|
220 |
style="' . esc_attr( $imgstyle . ' cursor:pointer;' ) . '" ' .
|
221 |
$imgevents . ' ' .
|
222 |
wppa_get_imgalt( $image['id'] ) . '
|
@@ -278,8 +276,6 @@ class AlbumWidget extends WP_Widget {
|
|
278 |
id="i-' . strval( intval( $image['id'] ) ) . '-' . wppa( 'mocc' ) . '"
|
279 |
title="' . esc_attr( wppa_zoom_in( $image['id'] ) ) . '"
|
280 |
src="' . esc_url( $imgurl ) . '"
|
281 |
-
width="' . esc_attr( $width ) . '"
|
282 |
-
height="' . esc_attr( $height ) . '"
|
283 |
style="' . esc_attr( $imgstyle ) . '" ' .
|
284 |
$imgevents . ' ' .
|
285 |
wppa_get_imgalt( $image['id'] ) . '
|
@@ -311,8 +307,6 @@ class AlbumWidget extends WP_Widget {
|
|
311 |
id="i-' . strval( intval( $image['id'] ) ) . '-' . wppa( 'mocc' ) . '"
|
312 |
title="' . esc_attr( $title ) . '"
|
313 |
src="' . esc_url( $imgurl ) . '"
|
314 |
-
width="' . strval( intval( $width ) ) . '"
|
315 |
-
height="' . strval( intval( $height ) ) . '"
|
316 |
style="' . esc_attr( $imgstyle . ' cursor:pointer;' ) . '" ' .
|
317 |
$imgevents . ' ' . '
|
318 |
onclick="' . esc_url( $link['url'] ) . '" ' .
|
@@ -342,8 +336,6 @@ class AlbumWidget extends WP_Widget {
|
|
342 |
id="i-' . ( $imageid ? wppa_get_imgalt( $image['id'] ) : '' ) . '-' . wppa( 'mocc' ) . '"
|
343 |
title="' . esc_attr( $title ) . '"
|
344 |
src="' . esc_url( $imgurl ) . '"
|
345 |
-
width="' . strval( intval( $width ) ) . '"
|
346 |
-
height="' . strval( intval( $height ) ) . '"
|
347 |
style="' . esc_attr( $imgstyle ) . '" ' .
|
348 |
$imgevents . ' ' .
|
349 |
( $imageid ? wppa_get_imgalt( $image['id'] ) : '' ) . '
|
@@ -380,7 +372,7 @@ class AlbumWidget extends WP_Widget {
|
|
380 |
}
|
381 |
$result .= $widget_content . $after_widget;
|
382 |
|
383 |
-
|
384 |
|
385 |
// Cache?
|
386 |
if ( $cache ) {
|
@@ -412,8 +404,8 @@ class AlbumWidget extends WP_Widget {
|
|
412 |
$instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
|
413 |
|
414 |
// Widget title
|
415 |
-
|
416 |
-
wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) );
|
417 |
|
418 |
// Parent album selection
|
419 |
$albs = $wpdb->get_results( "SELECT id, name FROM $wpdb->wppa_albums ORDER BY name", ARRAY_A );
|
@@ -451,7 +443,7 @@ class AlbumWidget extends WP_Widget {
|
|
451 |
}
|
452 |
}
|
453 |
|
454 |
-
|
455 |
wppa_widget_selection( $this, 'parent', $instance['parent'], __( 'Album selection or Parent album', 'wp-photo-album-plus' ), $options, $values, $disabled ) .
|
456 |
|
457 |
// Include subalbums
|
@@ -467,12 +459,17 @@ class AlbumWidget extends WP_Widget {
|
|
467 |
wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) ) .
|
468 |
|
469 |
// Cache
|
470 |
-
wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) )
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
|
|
|
|
|
|
|
|
|
|
476 |
}
|
477 |
|
478 |
// Set defaults
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display thumbnail albums
|
6 |
+
* Version 8.1.09.001
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
39 |
|
40 |
// Cache?
|
41 |
if ( $cache && wppa_is_file( $cachefile ) ) {
|
42 |
+
wppa_echo( wppa_get_contents( $cachefile ) );
|
43 |
update_option( 'wppa_cache_hits', get_option( 'wppa_cache_hits', 0 ) +1 );
|
44 |
+
wppa_echo( wppa_widget_timer( 'show', $widget_title, true ) );
|
45 |
wppa( 'in_widget', false );
|
46 |
return;
|
47 |
}
|
215 |
id="i-' . strval( intval( $image['id'] ) ) . '-' . wppa( 'mocc' ) . '"
|
216 |
title="' . esc_attr( $title ) . '"
|
217 |
src="' . esc_url( $imgurl ) . '"
|
|
|
|
|
218 |
style="' . esc_attr( $imgstyle . ' cursor:pointer;' ) . '" ' .
|
219 |
$imgevents . ' ' .
|
220 |
wppa_get_imgalt( $image['id'] ) . '
|
276 |
id="i-' . strval( intval( $image['id'] ) ) . '-' . wppa( 'mocc' ) . '"
|
277 |
title="' . esc_attr( wppa_zoom_in( $image['id'] ) ) . '"
|
278 |
src="' . esc_url( $imgurl ) . '"
|
|
|
|
|
279 |
style="' . esc_attr( $imgstyle ) . '" ' .
|
280 |
$imgevents . ' ' .
|
281 |
wppa_get_imgalt( $image['id'] ) . '
|
307 |
id="i-' . strval( intval( $image['id'] ) ) . '-' . wppa( 'mocc' ) . '"
|
308 |
title="' . esc_attr( $title ) . '"
|
309 |
src="' . esc_url( $imgurl ) . '"
|
|
|
|
|
310 |
style="' . esc_attr( $imgstyle . ' cursor:pointer;' ) . '" ' .
|
311 |
$imgevents . ' ' . '
|
312 |
onclick="' . esc_url( $link['url'] ) . '" ' .
|
336 |
id="i-' . ( $imageid ? wppa_get_imgalt( $image['id'] ) : '' ) . '-' . wppa( 'mocc' ) . '"
|
337 |
title="' . esc_attr( $title ) . '"
|
338 |
src="' . esc_url( $imgurl ) . '"
|
|
|
|
|
339 |
style="' . esc_attr( $imgstyle ) . '" ' .
|
340 |
$imgevents . ' ' .
|
341 |
( $imageid ? wppa_get_imgalt( $image['id'] ) : '' ) . '
|
372 |
}
|
373 |
$result .= $widget_content . $after_widget;
|
374 |
|
375 |
+
wppa_echo( wppa_compress_html( $result ) );
|
376 |
|
377 |
// Cache?
|
378 |
if ( $cache ) {
|
404 |
$instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
|
405 |
|
406 |
// Widget title
|
407 |
+
wppa_echo(
|
408 |
+
wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) ) );
|
409 |
|
410 |
// Parent album selection
|
411 |
$albs = $wpdb->get_results( "SELECT id, name FROM $wpdb->wppa_albums ORDER BY name", ARRAY_A );
|
443 |
}
|
444 |
}
|
445 |
|
446 |
+
wppa_echo(
|
447 |
wppa_widget_selection( $this, 'parent', $instance['parent'], __( 'Album selection or Parent album', 'wp-photo-album-plus' ), $options, $values, $disabled ) .
|
448 |
|
449 |
// Include subalbums
|
459 |
wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) ) .
|
460 |
|
461 |
// Cache
|
462 |
+
wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) ) );
|
463 |
+
|
464 |
+
// Explanation
|
465 |
+
if ( current_user_can( 'wppa_settings' ) ) {
|
466 |
+
wppa_echo(
|
467 |
+
'<p>' .
|
468 |
+
__( 'You can set the sizes in this widget in the <b>Photo Albums -> Settings</b> admin page.', 'wp-photo-album-plus' ) .
|
469 |
+
' ' . __( 'Basic settings -> Widgets -> I -> Items 10 and 11', 'wp-photo-album-plus' ) .
|
470 |
+
wppa_see_also( 'widget', '1', '10.11' ) .
|
471 |
+
'</p>' );
|
472 |
+
};
|
473 |
}
|
474 |
|
475 |
// Set defaults
|
wppa-audio.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all audio routines
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all audio routines
|
6 |
+
* Version 8.1.09.001
|
7 |
*
|
8 |
*/
|
9 |
|
wppa-bestof-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the best rated photos
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -39,9 +39,9 @@ class BestOfWidget extends WP_Widget {
|
|
39 |
|
40 |
// Cache?
|
41 |
if ( $cache && wppa_is_file( $cachefile ) ) {
|
42 |
-
|
43 |
update_option( 'wppa_cache_hits', get_option( 'wppa_cache_hits', 0 ) +1 );
|
44 |
-
|
45 |
wppa( 'in_widget', false );
|
46 |
return;
|
47 |
}
|
@@ -87,8 +87,8 @@ class BestOfWidget extends WP_Widget {
|
|
87 |
}
|
88 |
$result .= $widget_content . $after_widget;
|
89 |
|
90 |
-
|
91 |
-
|
92 |
|
93 |
// Cache?
|
94 |
if ( $cache ) {
|
@@ -120,8 +120,8 @@ class BestOfWidget extends WP_Widget {
|
|
120 |
$instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
|
121 |
|
122 |
// Widget Title
|
123 |
-
|
124 |
-
wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) ) .
|
125 |
|
126 |
// Max number to diaplsy
|
127 |
wppa_widget_number( $this, 'count', $instance['count'], __( 'Max number of thumbnails', 'wp-photo-album-plus' ), '1', '25' );
|
@@ -134,8 +134,8 @@ class BestOfWidget extends WP_Widget {
|
|
134 |
'owner',
|
135 |
);
|
136 |
|
137 |
-
|
138 |
-
wppa_widget_selection( $this, 'display', $instance['display'], __( 'Select photos or owners', 'wp-photo-album-plus' ), $options, $values, array(), '' );
|
139 |
|
140 |
// Period
|
141 |
$options = array( __( 'Last week', 'wp-photo-album-plus' ),
|
@@ -152,8 +152,8 @@ class BestOfWidget extends WP_Widget {
|
|
152 |
'lastyear',
|
153 |
'thisyear',
|
154 |
);
|
155 |
-
|
156 |
-
wppa_widget_selection( $this, 'period', $instance['period'], __( 'Limit to ratings given during', 'wp-photo-album-plus' ), $options, $values, array(), '' );
|
157 |
|
158 |
// Sort by
|
159 |
$options = array( __( 'Number of max ratings', 'wp-photo-album-plus' ),
|
@@ -166,7 +166,7 @@ class BestOfWidget extends WP_Widget {
|
|
166 |
'ratingcount',
|
167 |
'totvalue',
|
168 |
);
|
169 |
-
|
170 |
wppa_widget_selection( $this, 'sortby', $instance['sortby'], __( 'Sort by', 'wp-photo-album-plus' ), $options, $values, array(), '' ) .
|
171 |
|
172 |
// Number of max ratings
|
@@ -179,7 +179,7 @@ class BestOfWidget extends WP_Widget {
|
|
179 |
wppa_widget_checkbox( $this, 'ratcount', $instance['ratcount'], __( 'Show number of ratings', 'wp-photo-album-plus' ) ) .
|
180 |
|
181 |
// Total value
|
182 |
-
wppa_widget_checkbox( $this, 'totvalue', $instance['totvalue'], __( 'Show the sum of all ratings', 'wp-photo-album-plus' ) );
|
183 |
|
184 |
// Link to
|
185 |
$options = array( __( '--- none ---', 'wp-photo-album-plus' ),
|
@@ -198,16 +198,16 @@ class BestOfWidget extends WP_Widget {
|
|
198 |
'upldrphotosslide',
|
199 |
'lightboxsingle',
|
200 |
);
|
201 |
-
|
202 |
-
wppa_widget_selection( $this, 'linktype', $instance['linktype'], __( 'Link to', 'wp-photo-album-plus' ), $options, $values, array(), '' );
|
203 |
|
204 |
// Loggedin only
|
205 |
-
|
206 |
-
wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) );
|
207 |
|
208 |
// Cache
|
209 |
-
|
210 |
-
wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) );
|
211 |
|
212 |
}
|
213 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the best rated photos
|
6 |
+
* Version 8.1.09.001
|
7 |
*
|
8 |
*/
|
9 |
|
39 |
|
40 |
// Cache?
|
41 |
if ( $cache && wppa_is_file( $cachefile ) ) {
|
42 |
+
wppa_echo( wppa_get_contents( $cachefile ) );
|
43 |
update_option( 'wppa_cache_hits', get_option( 'wppa_cache_hits', 0 ) +1 );
|
44 |
+
wppa_echo( wppa_widget_timer( 'show', $widget_title, true ) );
|
45 |
wppa( 'in_widget', false );
|
46 |
return;
|
47 |
}
|
87 |
}
|
88 |
$result .= $widget_content . $after_widget;
|
89 |
|
90 |
+
wppa_echo( wppa_compress_html( $result ) );
|
91 |
+
wppa_echo( wppa_widget_timer( 'show', $widget_title ) );
|
92 |
|
93 |
// Cache?
|
94 |
if ( $cache ) {
|
120 |
$instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
|
121 |
|
122 |
// Widget Title
|
123 |
+
wppa_echo(
|
124 |
+
wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) ) ) .
|
125 |
|
126 |
// Max number to diaplsy
|
127 |
wppa_widget_number( $this, 'count', $instance['count'], __( 'Max number of thumbnails', 'wp-photo-album-plus' ), '1', '25' );
|
134 |
'owner',
|
135 |
);
|
136 |
|
137 |
+
wppa_echo(
|
138 |
+
wppa_widget_selection( $this, 'display', $instance['display'], __( 'Select photos or owners', 'wp-photo-album-plus' ), $options, $values, array(), '' ) );
|
139 |
|
140 |
// Period
|
141 |
$options = array( __( 'Last week', 'wp-photo-album-plus' ),
|
152 |
'lastyear',
|
153 |
'thisyear',
|
154 |
);
|
155 |
+
wppa_echo(
|
156 |
+
wppa_widget_selection( $this, 'period', $instance['period'], __( 'Limit to ratings given during', 'wp-photo-album-plus' ), $options, $values, array(), '' ) );
|
157 |
|
158 |
// Sort by
|
159 |
$options = array( __( 'Number of max ratings', 'wp-photo-album-plus' ),
|
166 |
'ratingcount',
|
167 |
'totvalue',
|
168 |
);
|
169 |
+
wppa_echo(
|
170 |
wppa_widget_selection( $this, 'sortby', $instance['sortby'], __( 'Sort by', 'wp-photo-album-plus' ), $options, $values, array(), '' ) .
|
171 |
|
172 |
// Number of max ratings
|
179 |
wppa_widget_checkbox( $this, 'ratcount', $instance['ratcount'], __( 'Show number of ratings', 'wp-photo-album-plus' ) ) .
|
180 |
|
181 |
// Total value
|
182 |
+
wppa_widget_checkbox( $this, 'totvalue', $instance['totvalue'], __( 'Show the sum of all ratings', 'wp-photo-album-plus' ) ) );
|
183 |
|
184 |
// Link to
|
185 |
$options = array( __( '--- none ---', 'wp-photo-album-plus' ),
|
198 |
'upldrphotosslide',
|
199 |
'lightboxsingle',
|
200 |
);
|
201 |
+
wppa_echo(
|
202 |
+
wppa_widget_selection( $this, 'linktype', $instance['linktype'], __( 'Link to', 'wp-photo-album-plus' ), $options, $values, array(), '' ) );
|
203 |
|
204 |
// Loggedin only
|
205 |
+
wppa_echo(
|
206 |
+
wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) ) );
|
207 |
|
208 |
// Cache
|
209 |
+
wppa_echo(
|
210 |
+
wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) ) );
|
211 |
|
212 |
}
|
213 |
|
wppa-boxes-html.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various wppa boxes
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -2036,7 +2036,7 @@ global $wppa_locale;
|
|
2036 |
$pi .=
|
2037 |
'<img
|
2038 |
src="' . wppa_get_imgdir() . 'pinterest.png"
|
2039 |
-
style="height:' . $s . 'px;vertical-align:top;border-radius:' . $br . 'px
|
2040 |
alt="' . esc_attr( __( 'Share on Pinterest', 'wp-photo-album-plus' ) ) . '"
|
2041 |
/>';
|
2042 |
}
|
@@ -3584,7 +3584,7 @@ static $albums_granted;
|
|
3584 |
' style="width:100%;border-color:'.wppa_opt( 'bcolor' ).'"' .
|
3585 |
' >' .
|
3586 |
'<div id="bar-'.$yalb.'-'.$mocc.'" class="wppa-bar" ></div>' .
|
3587 |
-
'<div id="percent-'.$yalb.'-'.$mocc.'" class="wppa-percent"
|
3588 |
'</div>' .
|
3589 |
'<div id="message-'.$yalb.'-'.$mocc.'" class="wppa-message" ></div>';
|
3590 |
|
@@ -3802,7 +3802,7 @@ function wppa_user_albumedit_html( $alb, $width, $where = '', $mcr = false ) {
|
|
3802 |
' id="wppaalbum-custom-' . $idx . '-' . wppa( 'mocc' ) . '-' . $alb . '"' .
|
3803 |
' class="wppa-box-text wppa-file-' . $t . wppa( 'mocc' ) . '"' .
|
3804 |
' value="' . esc_attr( stripslashes( $custom_data[$idx] ) ) . '"' .
|
3805 |
-
' style="padding:0;
|
3806 |
' />';
|
3807 |
|
3808 |
}
|
@@ -3814,7 +3814,7 @@ function wppa_user_albumedit_html( $alb, $width, $where = '', $mcr = false ) {
|
|
3814 |
type="submit"
|
3815 |
name="wppa-albumeditsubmit"
|
3816 |
class="wppa-user-submit"
|
3817 |
-
style="margin:
|
3818 |
value="' . esc_attr( __( 'Update album', 'wp-photo-album-plus' ) ) . '"
|
3819 |
/>
|
3820 |
</form>
|
@@ -4978,7 +4978,7 @@ global $other_deps;
|
|
4978 |
' class="thumb-img"' .
|
4979 |
' id="a-' . $id . '-' . wppa( 'mocc' ) . '"' .
|
4980 |
' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
|
4981 |
-
' style="cursor:' . wppa_wait() . ';"' . // url( ' . wppa_get_imgdir() . wppa_opt( 'magnifier' ) . ' ),pointer
|
4982 |
' title="' . wppa_zoom_in( $id ) . '"' .
|
4983 |
wppa_get_lb_panorama_full_html( $id ) .
|
4984 |
' onclick="return false;"' .
|
@@ -5036,7 +5036,7 @@ global $other_deps;
|
|
5036 |
'<div style="height:' . $maxh . 'px;width:' . $maxw . 'px;" >' .
|
5037 |
'<img' .
|
5038 |
( $widget ? ' style="height:' . $maxh . 'px; width:' . $maxw . 'px;"' :
|
5039 |
-
' style="max-height:' . $maxh . 'px; max-width:' . $maxw . 'px;margin-top:' . $tm . 'px
|
5040 |
' src="' . wppa_get_photo_url( $id, true, '', $maxw, $maxh ) . '"' .
|
5041 |
' ' . wppa_get_imgalt( $id ) .
|
5042 |
' />' .
|
@@ -5051,7 +5051,7 @@ global $other_deps;
|
|
5051 |
$result .= wppa_get_medal_html_a( array( 'id' => $id, 'size' => 'M', 'where' => 'bot' ) );
|
5052 |
|
5053 |
// The subtitles
|
5054 |
-
$result .= "\n\t".'<div style="font-size:'.$fontsize.'px; line-height:'.$lineheight.'px; position:absolute; width:'.$maxw.'px
|
5055 |
$result .= sprintf( __( 'Photo by: %s', 'wp-photo-album-plus' ), $data[$id]['user'] ).'<br>';
|
5056 |
if ( $maxratings == 'yes' ) {
|
5057 |
$n = $data[$id]['maxratingcount'];
|
@@ -5071,7 +5071,7 @@ global $other_deps;
|
|
5071 |
}
|
5072 |
|
5073 |
$result .= '</div>';
|
5074 |
-
$result .= '<div style="clear:both"
|
5075 |
|
5076 |
$result .= "\n".'</div>';
|
5077 |
}
|
@@ -5133,7 +5133,7 @@ global $other_deps;
|
|
5133 |
|
5134 |
// The subtitles
|
5135 |
$result .= "\n" .
|
5136 |
-
'<div style="font-size:'.wppa_opt( 'fontsize_widget_thumb' ).'px; line-height:'.$lineheight.'px
|
5137 |
if ( $maxratings == 'yes' ) {
|
5138 |
$n = $data[$author]['maxratingcount'];
|
5139 |
$result .= sprintf( _n( '%d max rating', '%d max ratings', $n, 'wp-photo-album-plus' ), $n ).'<br>';
|
@@ -5205,10 +5205,10 @@ function wppa_calendar_box() {
|
|
5205 |
' style="' .
|
5206 |
'font-size:'.$fs.'px;' .
|
5207 |
( $bold ? 'font-weight:bold;' : '' ) .
|
5208 |
-
'line-height:'.$lh.'px
|
5209 |
'"' .
|
5210 |
' >' .
|
5211 |
-
'<div style="overflow:auto
|
5212 |
wppa_get_calendar_html() .
|
5213 |
'</div>' .
|
5214 |
'<div class="wppa-clear" >' .
|
@@ -5325,7 +5325,7 @@ global $photos_used;
|
|
5325 |
// Display minicovers
|
5326 |
$result .= '
|
5327 |
<div
|
5328 |
-
style="width:' . ( ( $cw + 2 ) * ( $to - $from ) ) . 'px;position:relative
|
5329 |
>';
|
5330 |
|
5331 |
switch( $calendar_type ) {
|
@@ -5357,7 +5357,7 @@ global $photos_used;
|
|
5357 |
float:left;
|
5358 |
text-align:center;
|
5359 |
cursor:pointer;
|
5360 |
-
width:' . $cw . 'px
|
5361 |
>' .
|
5362 |
__( $date->format( 'M' ) ) . '<br>' .
|
5363 |
__( $date->format( 'd' ) ) . '<br>' .
|
@@ -5397,7 +5397,7 @@ global $photos_used;
|
|
5397 |
float:left;
|
5398 |
text-align:center;
|
5399 |
cursor:pointer;
|
5400 |
-
width:' . $cw . 'px
|
5401 |
>' .
|
5402 |
__( date( 'M', $date * $secinday ) ) . '<br>' .
|
5403 |
__( date( 'd', $date * $secinday ) ) . '<br>' .
|
@@ -5437,7 +5437,7 @@ function wppa_real_calendar_box() {
|
|
5437 |
' id="wppa-calendar-' . wppa( 'mocc' ) . '"' .
|
5438 |
' class="wppa-box wppa-calendar"' .
|
5439 |
' >' .
|
5440 |
-
'<div style="overflow:visible;margin-bottom:3px
|
5441 |
wppa_get_real_calendar_html( $year, $month ) .
|
5442 |
'</div>' .
|
5443 |
'<div class="wppa-clear" >' .
|
@@ -5518,11 +5518,11 @@ global $photos_used;
|
|
5518 |
<div
|
5519 |
id="wppa-real-calendar-' . $mocc . '"
|
5520 |
class="wppa-real-calendar"
|
5521 |
-
style="font-size:' . $f . 'px
|
5522 |
>
|
5523 |
<table
|
5524 |
class="wppa-real-calendar-table"
|
5525 |
-
style="width:100%;border-bottom:1px solid gray;margin:0
|
5526 |
<thead class="wppa-real-calendar-head" >
|
5527 |
<tr class="wppa-real-calendar-navi" >';
|
5528 |
|
@@ -5531,8 +5531,7 @@ global $photos_used;
|
|
5531 |
$result .= '
|
5532 |
<td
|
5533 |
class="wppa-real-calendar-small wppa-real-calendar-inactive wppa-real-calendar-head-td-'.$mocc.'"
|
5534 |
-
style="margin-top:' . $m . 'px;margin-bottom:' . $m . 'px
|
5535 |
-
>' .
|
5536 |
( $year - 1 ) . '
|
5537 |
</td>';
|
5538 |
}
|
@@ -5704,8 +5703,7 @@ global $photos_used;
|
|
5704 |
$result .= '
|
5705 |
<td colspan="2"
|
5706 |
class="wppa-real-calendar-dummy"
|
5707 |
-
style="width:14
|
5708 |
-
>
|
5709 |
</td>';
|
5710 |
}
|
5711 |
else {
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various wppa boxes
|
6 |
+
* Version 8.1.09.001
|
7 |
*
|
8 |
*/
|
9 |
|
2036 |
$pi .=
|
2037 |
'<img
|
2038 |
src="' . wppa_get_imgdir() . 'pinterest.png"
|
2039 |
+
style="height:' . $s . 'px;vertical-align:top;border-radius:' . $br . 'px"
|
2040 |
alt="' . esc_attr( __( 'Share on Pinterest', 'wp-photo-album-plus' ) ) . '"
|
2041 |
/>';
|
2042 |
}
|
3584 |
' style="width:100%;border-color:'.wppa_opt( 'bcolor' ).'"' .
|
3585 |
' >' .
|
3586 |
'<div id="bar-'.$yalb.'-'.$mocc.'" class="wppa-bar" ></div>' .
|
3587 |
+
'<div id="percent-'.$yalb.'-'.$mocc.'" class="wppa-percent">0%</div>' .
|
3588 |
'</div>' .
|
3589 |
'<div id="message-'.$yalb.'-'.$mocc.'" class="wppa-message" ></div>';
|
3590 |
|
3802 |
' id="wppaalbum-custom-' . $idx . '-' . wppa( 'mocc' ) . '-' . $alb . '"' .
|
3803 |
' class="wppa-box-text wppa-file-' . $t . wppa( 'mocc' ) . '"' .
|
3804 |
' value="' . esc_attr( stripslashes( $custom_data[$idx] ) ) . '"' .
|
3805 |
+
' style="padding:0;width:100%"' .
|
3806 |
' />';
|
3807 |
|
3808 |
}
|
3814 |
type="submit"
|
3815 |
name="wppa-albumeditsubmit"
|
3816 |
class="wppa-user-submit"
|
3817 |
+
style="margin:6px 0;float:right"
|
3818 |
value="' . esc_attr( __( 'Update album', 'wp-photo-album-plus' ) ) . '"
|
3819 |
/>
|
3820 |
</form>
|
4978 |
' class="thumb-img"' .
|
4979 |
' id="a-' . $id . '-' . wppa( 'mocc' ) . '"' .
|
4980 |
' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
|
4981 |
+
' style="cursor:' . wppa_wait() . ';"' . // url( ' . wppa_get_imgdir() . wppa_opt( 'magnifier' ) . ' ),pointer"' .
|
4982 |
' title="' . wppa_zoom_in( $id ) . '"' .
|
4983 |
wppa_get_lb_panorama_full_html( $id ) .
|
4984 |
' onclick="return false;"' .
|
5036 |
'<div style="height:' . $maxh . 'px;width:' . $maxw . 'px;" >' .
|
5037 |
'<img' .
|
5038 |
( $widget ? ' style="height:' . $maxh . 'px; width:' . $maxw . 'px;"' :
|
5039 |
+
' style="max-height:' . $maxh . 'px; max-width:' . $maxw . 'px;margin-top:' . $tm . 'px"' ) .
|
5040 |
' src="' . wppa_get_photo_url( $id, true, '', $maxw, $maxh ) . '"' .
|
5041 |
' ' . wppa_get_imgalt( $id ) .
|
5042 |
' />' .
|
5051 |
$result .= wppa_get_medal_html_a( array( 'id' => $id, 'size' => 'M', 'where' => 'bot' ) );
|
5052 |
|
5053 |
// The subtitles
|
5054 |
+
$result .= "\n\t".'<div style="font-size:'.$fontsize.'px; line-height:'.$lineheight.'px; position:absolute; width:'.$maxw.'px">';
|
5055 |
$result .= sprintf( __( 'Photo by: %s', 'wp-photo-album-plus' ), $data[$id]['user'] ).'<br>';
|
5056 |
if ( $maxratings == 'yes' ) {
|
5057 |
$n = $data[$id]['maxratingcount'];
|
5071 |
}
|
5072 |
|
5073 |
$result .= '</div>';
|
5074 |
+
$result .= '<div style="clear:both"></div>';
|
5075 |
|
5076 |
$result .= "\n".'</div>';
|
5077 |
}
|
5133 |
|
5134 |
// The subtitles
|
5135 |
$result .= "\n" .
|
5136 |
+
'<div style="font-size:'.wppa_opt( 'fontsize_widget_thumb' ).'px; line-height:'.$lineheight.'px">';
|
5137 |
if ( $maxratings == 'yes' ) {
|
5138 |
$n = $data[$author]['maxratingcount'];
|
5139 |
$result .= sprintf( _n( '%d max rating', '%d max ratings', $n, 'wp-photo-album-plus' ), $n ).'<br>';
|
5205 |
' style="' .
|
5206 |
'font-size:'.$fs.'px;' .
|
5207 |
( $bold ? 'font-weight:bold;' : '' ) .
|
5208 |
+
'line-height:'.$lh.'px' .
|
5209 |
'"' .
|
5210 |
' >' .
|
5211 |
+
'<div style="overflow:auto">' .
|
5212 |
wppa_get_calendar_html() .
|
5213 |
'</div>' .
|
5214 |
'<div class="wppa-clear" >' .
|
5325 |
// Display minicovers
|
5326 |
$result .= '
|
5327 |
<div
|
5328 |
+
style="width:' . ( ( $cw + 2 ) * ( $to - $from ) ) . 'px;position:relative"
|
5329 |
>';
|
5330 |
|
5331 |
switch( $calendar_type ) {
|
5357 |
float:left;
|
5358 |
text-align:center;
|
5359 |
cursor:pointer;
|
5360 |
+
width:' . $cw . 'px"
|
5361 |
>' .
|
5362 |
__( $date->format( 'M' ) ) . '<br>' .
|
5363 |
__( $date->format( 'd' ) ) . '<br>' .
|
5397 |
float:left;
|
5398 |
text-align:center;
|
5399 |
cursor:pointer;
|
5400 |
+
width:' . $cw . 'px"
|
5401 |
>' .
|
5402 |
__( date( 'M', $date * $secinday ) ) . '<br>' .
|
5403 |
__( date( 'd', $date * $secinday ) ) . '<br>' .
|
5437 |
' id="wppa-calendar-' . wppa( 'mocc' ) . '"' .
|
5438 |
' class="wppa-box wppa-calendar"' .
|
5439 |
' >' .
|
5440 |
+
'<div style="overflow:visible;margin-bottom:3px">' .
|
5441 |
wppa_get_real_calendar_html( $year, $month ) .
|
5442 |
'</div>' .
|
5443 |
'<div class="wppa-clear" >' .
|
5518 |
<div
|
5519 |
id="wppa-real-calendar-' . $mocc . '"
|
5520 |
class="wppa-real-calendar"
|
5521 |
+
style="font-size:' . $f . 'px"
|
5522 |
>
|
5523 |
<table
|
5524 |
class="wppa-real-calendar-table"
|
5525 |
+
style="width:100%;border-bottom:1px solid gray;margin:0">
|
5526 |
<thead class="wppa-real-calendar-head" >
|
5527 |
<tr class="wppa-real-calendar-navi" >';
|
5528 |
|
5531 |
$result .= '
|
5532 |
<td
|
5533 |
class="wppa-real-calendar-small wppa-real-calendar-inactive wppa-real-calendar-head-td-'.$mocc.'"
|
5534 |
+
style="margin-top:' . $m . 'px;margin-bottom:' . $m . 'px">' .
|
|
|
5535 |
( $year - 1 ) . '
|
5536 |
</td>';
|
5537 |
}
|
5703 |
$result .= '
|
5704 |
<td colspan="2"
|
5705 |
class="wppa-real-calendar-dummy"
|
5706 |
+
style="width:14%">
|
|
|
5707 |
</td>';
|
5708 |
}
|
5709 |
else {
|
wppa-breadcrumb.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Functions for breadcrumbs
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Functions for breadcrumbs
|
6 |
+
* Version 8.1.09.001
|
7 |
*
|
8 |
*/
|
9 |
|
wppa-cache.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/*
|
4 |
/* Contains all wppa smart cache functions
|
5 |
/*
|
6 |
-
/* Version 8.1.
|
7 |
*/
|
8 |
|
9 |
// Test for caching
|
@@ -457,7 +457,7 @@ global $wpdb;
|
|
457 |
wp_die( 'You have no rights to do this' );
|
458 |
}
|
459 |
|
460 |
-
|
461 |
|
462 |
$sc_files = array();
|
463 |
$root = WPPA_CONTENT_PATH . '/' . wppa_opt( 'cache_root' ) . '/wppa-shortcode';
|
@@ -474,7 +474,7 @@ global $wpdb;
|
|
474 |
$files = array_merge( $sc_files, $wg_files );
|
475 |
$count = count( $files );
|
476 |
if ( $count ) {
|
477 |
-
|
478 |
<div class="wrap" >
|
479 |
<table class="wppa-table widefat wppa-setting-table striped" style="margin-top:12px;" >
|
480 |
<thead style="font-weight:bold;" >
|
@@ -536,7 +536,7 @@ global $wpdb;
|
|
536 |
if ( $meta['other'] == 'C' ) $meta['other'] = __( 'Any comment', 'wp-photo-album-plus' );
|
537 |
if ( $meta['page'] == '0' ) $meta['page'] = '';
|
538 |
}
|
539 |
-
|
540 |
<tr>
|
541 |
<td style="width:600px;" >' . $pfile . '</td>
|
542 |
<td style="width:75px;" >' . $size . '</td>
|
@@ -547,19 +547,19 @@ global $wpdb;
|
|
547 |
<td >' . $meta['other'] . '</td>
|
548 |
</tr>';
|
549 |
}
|
550 |
-
|
551 |
</tbody>
|
552 |
</table>';
|
553 |
|
554 |
if ( wppa_get( 'delete' ) ) {
|
555 |
wppa_clear_cache( ['force' => true] );
|
556 |
-
|
557 |
}
|
558 |
else {
|
559 |
$hits = get_option( 'wppa_cache_hits', '0' );
|
560 |
$miss = get_option( 'wppa_cache_misses', '1' );
|
561 |
$perc = sprintf( '%5.2f', 100 * $hits / ( $hits + $miss ) );
|
562 |
-
|
563 |
<p>' .
|
564 |
__( 'Caching is \'smart\'. This means that cache files are cleared when the display of a wppa widget or shortcode will change due to adding albums, photos comments or ratings.', 'wp-photo-album-plus' ) . '
|
565 |
<br>' .
|
@@ -577,18 +577,18 @@ global $wpdb;
|
|
577 |
sprintf(
|
578 |
__( 'Since last install / update of the plugin, there were %d cache hits, %d cache misses, i.e. a hitrate of %5.2f%%', 'wp-photo-album-plus' ),
|
579 |
$hits, $miss, $perc ) .
|
580 |
-
// __( 'Hits', 'wp-photo-album-plus' ) . ': ' . $perc . '% ' .
|
581 |
'</p>';
|
582 |
}
|
583 |
-
|
584 |
</div>';
|
585 |
}
|
586 |
else {
|
587 |
-
|
588 |
<div class="wrap" >' .
|
589 |
__( 'No cachefiles to remove.', 'wp-photo-album-plus' ) . '
|
590 |
</div>';
|
591 |
}
|
|
|
592 |
}
|
593 |
|
594 |
function wppa_cache_display_format( $text ) {
|
3 |
/*
|
4 |
/* Contains all wppa smart cache functions
|
5 |
/*
|
6 |
+
/* Version 8.1.09.001
|
7 |
*/
|
8 |
|
9 |
// Test for caching
|
457 |
wp_die( 'You have no rights to do this' );
|
458 |
}
|
459 |
|
460 |
+
wppa_echo( '<h1>' . __( 'WPPA Cache', 'wp-photo-album-plus' ) . '</h1>' );
|
461 |
|
462 |
$sc_files = array();
|
463 |
$root = WPPA_CONTENT_PATH . '/' . wppa_opt( 'cache_root' ) . '/wppa-shortcode';
|
474 |
$files = array_merge( $sc_files, $wg_files );
|
475 |
$count = count( $files );
|
476 |
if ( $count ) {
|
477 |
+
$result = '
|
478 |
<div class="wrap" >
|
479 |
<table class="wppa-table widefat wppa-setting-table striped" style="margin-top:12px;" >
|
480 |
<thead style="font-weight:bold;" >
|
536 |
if ( $meta['other'] == 'C' ) $meta['other'] = __( 'Any comment', 'wp-photo-album-plus' );
|
537 |
if ( $meta['page'] == '0' ) $meta['page'] = '';
|
538 |
}
|
539 |
+
$result .= '
|
540 |
<tr>
|
541 |
<td style="width:600px;" >' . $pfile . '</td>
|
542 |
<td style="width:75px;" >' . $size . '</td>
|
547 |
<td >' . $meta['other'] . '</td>
|
548 |
</tr>';
|
549 |
}
|
550 |
+
$result .= '
|
551 |
</tbody>
|
552 |
</table>';
|
553 |
|
554 |
if ( wppa_get( 'delete' ) ) {
|
555 |
wppa_clear_cache( ['force' => true] );
|
556 |
+
$result .= '<br><b>' . sprintf( __( '%d cachefiles deleted', 'wp-photo-album-plus' ), $count ) . '</br>';
|
557 |
}
|
558 |
else {
|
559 |
$hits = get_option( 'wppa_cache_hits', '0' );
|
560 |
$miss = get_option( 'wppa_cache_misses', '1' );
|
561 |
$perc = sprintf( '%5.2f', 100 * $hits / ( $hits + $miss ) );
|
562 |
+
$result .= '
|
563 |
<p>' .
|
564 |
__( 'Caching is \'smart\'. This means that cache files are cleared when the display of a wppa widget or shortcode will change due to adding albums, photos comments or ratings.', 'wp-photo-album-plus' ) . '
|
565 |
<br>' .
|
577 |
sprintf(
|
578 |
__( 'Since last install / update of the plugin, there were %d cache hits, %d cache misses, i.e. a hitrate of %5.2f%%', 'wp-photo-album-plus' ),
|
579 |
$hits, $miss, $perc ) .
|
|
|
580 |
'</p>';
|
581 |
}
|
582 |
+
$result .= '
|
583 |
</div>';
|
584 |
}
|
585 |
else {
|
586 |
+
$result = '
|
587 |
<div class="wrap" >' .
|
588 |
__( 'No cachefiles to remove.', 'wp-photo-album-plus' ) . '
|
589 |
</div>';
|
590 |
}
|
591 |
+
wppa_echo( $result );
|
592 |
}
|
593 |
|
594 |
function wppa_cache_display_format( $text ) {
|
wppa-cart.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains the interface to SCABN
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains the interface to SCABN
|
6 |
+
* Version 8.1.09.001
|
7 |
*
|
8 |
*/
|
9 |
|
wppa-cloudinary.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/* Only loads when php version >= 5.3
|
3 |
*
|
4 |
-
* Version 8.1.
|
5 |
*
|
6 |
*/
|
7 |
|
@@ -138,7 +138,7 @@ global $wppa_cloudinary_api;
|
|
138 |
if ( isset( $result->rate_limit_allowed ) ) {
|
139 |
if( $result->rate_limit_remaining < '10' ) {
|
140 |
wppa_log( 'Observation', 'Running out of Cloudinary API calls' );
|
141 |
-
|
142 |
}
|
143 |
}
|
144 |
}
|
1 |
<?php
|
2 |
/* Only loads when php version >= 5.3
|
3 |
*
|
4 |
+
* Version 8.1.09.001
|
5 |
*
|
6 |
*/
|
7 |
|
138 |
if ( isset( $result->rate_limit_allowed ) ) {
|
139 |
if( $result->rate_limit_remaining < '10' ) {
|
140 |
wppa_log( 'Observation', 'Running out of Cloudinary API calls' );
|
141 |
+
wppa_echo( 'Error: Running out of allowed Cloudinary Api calls. Please try to continue in an hour' );
|
142 |
}
|
143 |
}
|
144 |
}
|
wppa-comment-admin.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all comments
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -35,22 +35,22 @@ class WPPA_Comment_table extends WP_List_Table {
|
|
35 |
|
36 |
if ( 'top' === $which ) {
|
37 |
$comment_show = wppa_get_cookie( 'comadmin-show', 'all' );
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
<option value="all" ' . ( $comment_show == 'all' ? 'selected' : '' ) . ' >' . __( 'all', 'wp-photo-album-plus' ) . '</option>
|
42 |
<option value="pending" ' . ( $comment_show == 'pending' ? 'selected' : '' ) . '>' . __( 'pending', 'wp-photo-album-plus' ) . '</option>
|
43 |
<option value="approved" ' . ( $comment_show == 'approved' ? 'selected' : '' ) . '>' . __( 'approved', 'wp-photo-album-plus' ) . '</option>
|
44 |
<option value="spam" ' . ( $comment_show == 'spam' ? 'selected' : '' ) . '>' . __( 'spam', 'wp-photo-album-plus' ) . '</option>
|
45 |
-
</select>
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
}
|
55 |
}
|
56 |
|
@@ -351,12 +351,12 @@ function _wppa_comment_admin() {
|
|
351 |
$moderating = wppa_get( 'commentid' );
|
352 |
|
353 |
// Open page
|
354 |
-
|
355 |
-
|
356 |
<h1>' .
|
357 |
( $moderating ? __( 'Photo Albums -> Moderate Comment', 'wp-photo-album-plus' ) :
|
358 |
__( 'Photo Albums -> Comment admin', 'wp-photo-album-plus' ) ) .
|
359 |
-
'</h1>';
|
360 |
if ( $moderating ) {
|
361 |
$status_show = array( 'pending', 'spam' );
|
362 |
}
|
@@ -372,8 +372,8 @@ function _wppa_comment_admin() {
|
|
372 |
);
|
373 |
$spamtime = $t_to_txt[wppa_opt( 'spam_maxage' )];
|
374 |
|
375 |
-
|
376 |
-
|
377 |
<tbody>
|
378 |
<tr>
|
379 |
<td style="margin:0; font-weight:bold; color:#777777;">' . __( 'Total:', 'wp-photo-album-plus' ) . '</td>
|
@@ -394,32 +394,25 @@ function _wppa_comment_admin() {
|
|
394 |
<td style="margin:0; font-weight:bold; color:red;">' . __( 'Spam:', 'wp-photo-album-plus' ) . '</td>
|
395 |
<td style="margin:0; font-weight:bold;">' . $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->wppa_comments WHERE status = 'spam'" ) . '</td>
|
396 |
<td></td>
|
397 |
-
</tr>';
|
398 |
if ( $spamtime ) {
|
399 |
-
|
400 |
-
|
401 |
<td style="margin:0; font-weight:bold; color:red;">' . __( 'Auto deleted spam:', 'wp-photo-album-plus' ) . '</td>
|
402 |
<td style="margin:0; font-weight:bold;">' . wppa_get_option( 'wppa_spam_auto_delcount', '0' ) . '</td>
|
403 |
<td>' . sprintf( __( 'Comments marked as spam will be deleted when they are entered longer than %s ago.', 'wp-photo-album-plus' ), $spamtime ) . '</td>
|
404 |
-
</tr>';
|
405 |
}
|
406 |
-
|
407 |
-
|
408 |
-
</table>';
|
409 |
}
|
410 |
|
411 |
-
|
412 |
-
'<!-- Forms are NOT created automatically, so you need to wrap the table in one to use features like bulk actions -->
|
413 |
<form id="wppa-comment-form" method="GET" >
|
414 |
-
|
415 |
-
<!-- For plugins, we also need to ensure that the form posts back to our current page -->
|
416 |
-
<input type="hidden" name="page" value="wppa_manage_comments" />
|
417 |
-
|
418 |
-
<!-- Now we can render the completed list table -->';
|
419 |
$testListTable->display();
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
</div>';
|
424 |
-
|
425 |
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all comments
|
6 |
+
* Version 8.1.09.001
|
7 |
*
|
8 |
*/
|
9 |
|
35 |
|
36 |
if ( 'top' === $which ) {
|
37 |
$comment_show = wppa_get_cookie( 'comadmin-show', 'all' );
|
38 |
+
wppa_echo( '
|
39 |
+
<div class="alignleft actions">
|
40 |
+
<select id="wppa_comadmin_show" name="wppa_comadmin_show" onchange="" >
|
41 |
<option value="all" ' . ( $comment_show == 'all' ? 'selected' : '' ) . ' >' . __( 'all', 'wp-photo-album-plus' ) . '</option>
|
42 |
<option value="pending" ' . ( $comment_show == 'pending' ? 'selected' : '' ) . '>' . __( 'pending', 'wp-photo-album-plus' ) . '</option>
|
43 |
<option value="approved" ' . ( $comment_show == 'approved' ? 'selected' : '' ) . '>' . __( 'approved', 'wp-photo-album-plus' ) . '</option>
|
44 |
<option value="spam" ' . ( $comment_show == 'spam' ? 'selected' : '' ) . '>' . __( 'spam', 'wp-photo-album-plus' ) . '</option>
|
45 |
+
</select>
|
46 |
+
<input
|
47 |
+
type="button"
|
48 |
+
class="button"
|
49 |
+
style="margin: 1px 8px 0 0;"
|
50 |
+
onclick="wppa_setCookie(\'comadmin-show\', jQuery( \'#wppa_comadmin_show\' ).val(), \'365\'); document.location.reload(true);"
|
51 |
+
value="' . esc_attr( __( 'Filter', 'wp-photo-album-plus' ) ) . '"
|
52 |
+
/>
|
53 |
+
</div>' );
|
54 |
}
|
55 |
}
|
56 |
|
351 |
$moderating = wppa_get( 'commentid' );
|
352 |
|
353 |
// Open page
|
354 |
+
wppa_echo( '
|
355 |
+
<div class="wrap">
|
356 |
<h1>' .
|
357 |
( $moderating ? __( 'Photo Albums -> Moderate Comment', 'wp-photo-album-plus' ) :
|
358 |
__( 'Photo Albums -> Comment admin', 'wp-photo-album-plus' ) ) .
|
359 |
+
'</h1>' );
|
360 |
if ( $moderating ) {
|
361 |
$status_show = array( 'pending', 'spam' );
|
362 |
}
|
372 |
);
|
373 |
$spamtime = $t_to_txt[wppa_opt( 'spam_maxage' )];
|
374 |
|
375 |
+
wppa_echo( '
|
376 |
+
<table>
|
377 |
<tbody>
|
378 |
<tr>
|
379 |
<td style="margin:0; font-weight:bold; color:#777777;">' . __( 'Total:', 'wp-photo-album-plus' ) . '</td>
|
394 |
<td style="margin:0; font-weight:bold; color:red;">' . __( 'Spam:', 'wp-photo-album-plus' ) . '</td>
|
395 |
<td style="margin:0; font-weight:bold;">' . $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->wppa_comments WHERE status = 'spam'" ) . '</td>
|
396 |
<td></td>
|
397 |
+
</tr>' );
|
398 |
if ( $spamtime ) {
|
399 |
+
wppa_echo( '
|
400 |
+
<tr>
|
401 |
<td style="margin:0; font-weight:bold; color:red;">' . __( 'Auto deleted spam:', 'wp-photo-album-plus' ) . '</td>
|
402 |
<td style="margin:0; font-weight:bold;">' . wppa_get_option( 'wppa_spam_auto_delcount', '0' ) . '</td>
|
403 |
<td>' . sprintf( __( 'Comments marked as spam will be deleted when they are entered longer than %s ago.', 'wp-photo-album-plus' ), $spamtime ) . '</td>
|
404 |
+
</tr>' );
|
405 |
}
|
406 |
+
wppa_echo( '
|
407 |
+
</tbody>
|
408 |
+
</table>' );
|
409 |
}
|
410 |
|
411 |
+
wppa_echo( '
|
|
|
412 |
<form id="wppa-comment-form" method="GET" >
|
413 |
+
<input type="hidden" name="page" value="wppa_manage_comments" />' );
|
|
|
|
|
|
|
|
|
414 |
$testListTable->display();
|
415 |
+
wppa_echo( '
|
416 |
+
</form>
|
417 |
+
</div>' );
|
|
|
|
|
418 |
}
|
wppa-comment-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the recent commets on photos
|
6 |
-
* Version 8.1.
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
@@ -42,9 +42,9 @@ class wppaCommentWidget extends WP_Widget {
|
|
42 |
|
43 |
// Cache?
|
44 |
if ( $cache && wppa_is_file( $cachefile ) ) {
|
45 |
-
|
46 |
update_option( 'wppa_cache_hits', get_option( 'wppa_cache_hits', 0 ) +1 );
|
47 |
-
|
48 |
wppa( 'in_widget', false );
|
49 |
return;
|
50 |
}
|
@@ -70,7 +70,7 @@ class wppaCommentWidget extends WP_Widget {
|
|
70 |
$widget_content .= '
|
71 |
<div' .
|
72 |
' class="wppa-widget"' .
|
73 |
-
' style="width:' . $maxw . 'px;
|
74 |
' data-wppa="yes"' .
|
75 |
' >';
|
76 |
|
@@ -92,10 +92,15 @@ class wppaCommentWidget extends WP_Widget {
|
|
92 |
$title = '';
|
93 |
$comments = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_comments WHERE photo = %s AND status = 'approved' ORDER BY timestamp DESC", $id ), ARRAY_A );
|
94 |
if ( $comments ) {
|
|
|
95 |
$first_comment = $comments['0'];
|
96 |
foreach ( $comments as $comment ) {
|
97 |
-
|
98 |
-
|
|
|
|
|
|
|
|
|
99 |
}
|
100 |
}
|
101 |
$title = esc_attr( strip_tags( trim ( $title ) ) );
|
@@ -125,8 +130,8 @@ class wppaCommentWidget extends WP_Widget {
|
|
125 |
}
|
126 |
$result .= $widget_content . $after_widget;
|
127 |
|
128 |
-
|
129 |
-
|
130 |
|
131 |
// Cache?
|
132 |
if ( $cache ) {
|
@@ -157,22 +162,27 @@ class wppaCommentWidget extends WP_Widget {
|
|
157 |
$instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
|
158 |
|
159 |
// Title
|
160 |
-
|
161 |
-
wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) );
|
162 |
|
163 |
// Loggedin only
|
164 |
-
|
165 |
-
wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) );
|
166 |
|
167 |
// Cache
|
168 |
-
|
169 |
-
wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) );
|
170 |
|
171 |
-
|
172 |
'<p>' .
|
173 |
__( 'You can set the sizes in this widget in the <b>Photo Albums -> Settings</b> admin page.', 'wp-photo-album-plus' ) .
|
174 |
-
' ' . __( 'Basic settings -> Widgets -> I -> Items 4 and 5', 'wp-photo-album-plus' ) .
|
175 |
-
|
|
|
|
|
|
|
|
|
|
|
176 |
}
|
177 |
|
178 |
// Set defaults
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the recent commets on photos
|
6 |
+
* Version 8.1.09.001
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
42 |
|
43 |
// Cache?
|
44 |
if ( $cache && wppa_is_file( $cachefile ) ) {
|
45 |
+
wppa_echo( wppa_get_contents( $cachefile ) );
|
46 |
update_option( 'wppa_cache_hits', get_option( 'wppa_cache_hits', 0 ) +1 );
|
47 |
+
wppa_echo( wppa_widget_timer( 'show', $widget_title, true ) );
|
48 |
wppa( 'in_widget', false );
|
49 |
return;
|
50 |
}
|
70 |
$widget_content .= '
|
71 |
<div' .
|
72 |
' class="wppa-widget"' .
|
73 |
+
' style="width:' . $maxw . 'px;height:' . $maxh . 'px;margin:4px;display:inline;text-align:center;float:left"' .
|
74 |
' data-wppa="yes"' .
|
75 |
' >';
|
76 |
|
92 |
$title = '';
|
93 |
$comments = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_comments WHERE photo = %s AND status = 'approved' ORDER BY timestamp DESC", $id ), ARRAY_A );
|
94 |
if ( $comments ) {
|
95 |
+
$first = true;
|
96 |
$first_comment = $comments['0'];
|
97 |
foreach ( $comments as $comment ) {
|
98 |
+
if ( ! $first ) {
|
99 |
+
$title .= "

";
|
100 |
+
}
|
101 |
+
$first = false;
|
102 |
+
$title .= $comment['user'] . ' ' . __( 'wrote' , 'wp-photo-album-plus' ) . ' ' . wppa_get_time_since( $comment['timestamp'] ).":
";
|
103 |
+
$title .= stripslashes( $comment['comment'] );
|
104 |
}
|
105 |
}
|
106 |
$title = esc_attr( strip_tags( trim ( $title ) ) );
|
130 |
}
|
131 |
$result .= $widget_content . $after_widget;
|
132 |
|
133 |
+
wppa_echo( wppa_compress_html( $result ) );
|
134 |
+
wppa_echo( wppa_widget_timer( 'show', $widget_title ) );
|
135 |
|
136 |
// Cache?
|
137 |
if ( $cache ) {
|
162 |
$instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
|
163 |
|
164 |
// Title
|
165 |
+
wppa_echo(
|
166 |
+
wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) ) );
|
167 |
|
168 |
// Loggedin only
|
169 |
+
wppa_echo(
|
170 |
+
wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) ) );
|
171 |
|
172 |
// Cache
|
173 |
+
wppa_echo(
|
174 |
+
wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) ) );
|
175 |
|
176 |
+
wppa_echo(
|
177 |
'<p>' .
|
178 |
__( 'You can set the sizes in this widget in the <b>Photo Albums -> Settings</b> admin page.', 'wp-photo-album-plus' ) .
|
179 |
+
' ' . __( 'Basic settings -> Widgets -> I -> Items 4 and 5', 'wp-photo-album-plus' ) ) . '.';
|
180 |
+
if ( current_user_can( 'wppa_settings' ) ) {
|
181 |
+
wppa_echo( wppa_see_also( 'widget', 1, '4.5' ) );
|
182 |
+
}
|
183 |
+
wppa_echo(
|
184 |
+
'</p>' );
|
185 |
+
|
186 |
}
|
187 |
|
188 |
// Set defaults
|
wppa-common-functions.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-common-functions.php
|
3 |
*
|
4 |
* Functions used in admin and in themes
|
5 |
-
* Version 8.1.
|
6 |
*
|
7 |
*/
|
8 |
|
@@ -772,7 +772,7 @@ function wppa_dbg_msg( $txt = '', $color = 'blue', $force = false, $return = fal
|
|
772 |
return $result;
|
773 |
}
|
774 |
else {
|
775 |
-
|
776 |
}
|
777 |
}
|
778 |
}
|
2 |
/* wppa-common-functions.php
|
3 |
*
|
4 |
* Functions used in admin and in themes
|
5 |
+
* Version 8.1.09.001
|
6 |
*
|
7 |
*/
|
8 |
|
772 |
return $result;
|
773 |
}
|
774 |
else {
|
775 |
+
wppa_echo( $result );
|
776 |
}
|
777 |
}
|
778 |
}
|
wppa-cron.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all cron functions
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*
|
9 |
*/
|
@@ -73,7 +73,7 @@ global $is_reschedule;
|
|
73 |
|
74 |
// Inform calling Ajax proc about the results
|
75 |
if ( $from_settings_page ) {
|
76 |
-
|
77 |
}
|
78 |
|
79 |
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all cron functions
|
6 |
+
* Version 8.1.09.001
|
7 |
*
|
8 |
*
|
9 |
*/
|
73 |
|
74 |
// Inform calling Ajax proc about the results
|
75 |
if ( $from_settings_page ) {
|
76 |
+
wppa_echo( '||' . $slug . '||' . 'Cron job' . '||0||reload' );
|
77 |
}
|
78 |
|
79 |
}
|
wppa-dashboard-widgets.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* Contains dashboard widgets code
|
6 |
*
|
7 |
-
* Version 8.1.
|
8 |
*
|
9 |
*/
|
10 |
|
@@ -183,7 +183,6 @@ function wppa_show_email_subscription() {
|
|
183 |
</label>
|
184 |
</li>';
|
185 |
}
|
186 |
-
|
187 |
}
|
188 |
|
189 |
// Only show to moderators
|
@@ -241,12 +240,12 @@ function wppa_show_email_subscription() {
|
|
241 |
return;
|
242 |
}
|
243 |
|
244 |
-
|
245 |
__( 'Notify me when...', 'wp-photo-album-plus' ) . '
|
246 |
<br>
|
247 |
<ul>' . $body . '</ul>
|
248 |
<input type="hidden" id="wppa-ntfy-nonce" value="' . wp_create_nonce( 'wppa-ntfy-nonce' ) . '" />
|
249 |
-
<div style="clear:both;" ></div>';
|
250 |
}
|
251 |
|
252 |
// Activity feed
|
@@ -270,7 +269,7 @@ function wppa_show_activity_feed() {
|
|
270 |
global $wpdb;
|
271 |
|
272 |
// Recently uploaded photos
|
273 |
-
|
274 |
|
275 |
$void = wppa_get_void_pids();
|
276 |
if ( count ( $void ) ) {
|
@@ -285,8 +284,7 @@ global $wpdb;
|
|
285 |
ORDER BY timestamp DESC LIMIT 5", ARRAY_A );
|
286 |
|
287 |
if ( ! empty( $photos ) ) {
|
288 |
-
|
289 |
-
'<table>';
|
290 |
foreach( $photos as $photo ) {
|
291 |
$id = $photo['id'];
|
292 |
if ( wppa_user_is( 'administrator' ) ) {
|
@@ -295,35 +293,34 @@ global $wpdb;
|
|
295 |
else {
|
296 |
$href = wppa_get_photo_url( $id );
|
297 |
}
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
|
303 |
if ( wppa_is_video( $id ) ) {
|
304 |
-
|
305 |
-
|
306 |
-
|
|
|
307 |
'width' => '50',
|
308 |
'controls' => false,
|
309 |
'preload' => 'metadata',
|
310 |
'use_thumb' => true,
|
311 |
'autoplay' => false
|
312 |
-
) )
|
313 |
-
|
314 |
-
|
315 |
-
'<img src="' . esc_url( $url ) . '" style="width:16px;height:16px;position:absolute;right:0;bottom:0;z-index:100;" />' .
|
316 |
-
'</div>';
|
317 |
}
|
318 |
else {
|
319 |
-
|
320 |
-
|
321 |
}
|
322 |
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
$usr = wppa_get_user_by( 'login', $photo['owner'] );
|
328 |
if ( $usr ) {
|
329 |
$usr = $usr -> display_name;
|
@@ -331,34 +328,32 @@ global $wpdb;
|
|
331 |
else {
|
332 |
$usr = sanitize_user( $photo['owner'] );
|
333 |
}
|
334 |
-
|
335 |
sprintf( __( 'by %s in album %s', 'wp-photo-album-plus' ),
|
336 |
'<b>' . $usr . '</b>',
|
337 |
'<b>' . sanitize_text_field( wppa_get_album_name( $photo['album'] ) ) . '</b> (' . strval( intval( $photo['album'] ) ) . ')'
|
338 |
-
) .
|
339 |
-
|
340 |
-
wppa_local_date( '', $photo['timestamp'] ) .
|
341 |
-
|
342 |
-
|
343 |
}
|
344 |
-
|
345 |
-
'</table>';
|
346 |
}
|
347 |
else {
|
348 |
-
|
349 |
'<p>' .
|
350 |
__( 'There are no recently uploaded photos', 'wp-photo-album-plus' ) .
|
351 |
-
'</p>';
|
352 |
}
|
353 |
-
|
354 |
|
355 |
// Recent comments
|
356 |
-
|
357 |
$comments = $wpdb->get_results( "SELECT * FROM $wpdb->wppa_comments ORDER BY timestamp DESC LIMIT 5", ARRAY_A );
|
358 |
if ( ! empty( $comments ) ) {
|
359 |
|
360 |
-
|
361 |
-
'<table>';
|
362 |
foreach( $comments as $comment ) {
|
363 |
$photo = wppa_cache_photo( $comment['photo'] );
|
364 |
if ( wppa_user_is( 'administrator' ) ) {
|
@@ -367,31 +362,30 @@ global $wpdb;
|
|
367 |
else {
|
368 |
$href = wppa_get_photo_url( $photo['id'] );
|
369 |
}
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
sprintf( __( 'by %s', 'wp-photo-album-plus' ),
|
381 |
-
'<b>' . htmlspecialchars( $comment['user'] ) . '</b>' ) .
|
382 |
-
|
383 |
-
wppa_local_date( '', $comment['timestamp'] ) .
|
384 |
-
|
385 |
-
|
386 |
}
|
387 |
-
|
388 |
-
'</table>';
|
389 |
}
|
390 |
else {
|
391 |
-
|
392 |
'<p>' .
|
393 |
__( 'There are no recent comments on photos', 'wp-photo-album-plus' ) .
|
394 |
-
'</p>';
|
395 |
}
|
396 |
|
397 |
}
|
@@ -420,8 +414,7 @@ function wppa_show_potd_log() {
|
|
420 |
// Get data
|
421 |
$his = wppa_get_option( 'wppa_potd_log_data', array() );
|
422 |
if ( ! empty( $his ) ) {
|
423 |
-
|
424 |
-
'<table>';
|
425 |
foreach( $his as $item ) {
|
426 |
if ( wppa_photo_exists( $item['id'] ) ) {
|
427 |
$photo = wppa_cache_photo( $item['id'] );
|
@@ -432,40 +425,39 @@ function wppa_show_potd_log() {
|
|
432 |
else {
|
433 |
$href = wppa_get_photo_url( $photo['id'] );
|
434 |
}
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
__( 'First displayed at', 'wp-photo-album-plus' ) . ': ' . wppa_local_date( '', $time ) . '<br>' .
|
444 |
__( 'Name', 'wp-photo-album-plus' ) . ': ' . wppa_get_photo_name( $photo['id'] ) . '<br>' .
|
445 |
__( 'Description', 'wp-photo-album-plus' ) . ':<br>' .
|
446 |
-
htmlspecialchars( strip_tags( wppa_get_photo_desc( $photo['id'] ) ) ) .
|
447 |
-
|
448 |
-
|
449 |
}
|
450 |
else {
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
sprintf( __( 'Photo %d has been removed' ), $item['id'] ) .
|
455 |
-
|
456 |
-
|
457 |
-
__( 'First displayed at', 'wp-photo-album-plus' ) . ': ' . wppa_local_date( '', $item['tm'] ) . '<br>
|
458 |
-
|
459 |
-
|
460 |
}
|
461 |
}
|
462 |
-
|
463 |
-
'</table>';
|
464 |
}
|
465 |
else {
|
466 |
-
|
467 |
'<p>' .
|
468 |
__( 'There is no photo of the day history', 'wp-photo-album-plus' ) .
|
469 |
-
'</p>';
|
470 |
}
|
471 |
}
|
4 |
*
|
5 |
* Contains dashboard widgets code
|
6 |
*
|
7 |
+
* Version 8.1.09.001
|
8 |
*
|
9 |
*/
|
10 |
|
183 |
</label>
|
184 |
</li>';
|
185 |
}
|
|
|
186 |
}
|
187 |
|
188 |
// Only show to moderators
|
240 |
return;
|
241 |
}
|
242 |
|
243 |
+
wppa_echo(
|
244 |
__( 'Notify me when...', 'wp-photo-album-plus' ) . '
|
245 |
<br>
|
246 |
<ul>' . $body . '</ul>
|
247 |
<input type="hidden" id="wppa-ntfy-nonce" value="' . wp_create_nonce( 'wppa-ntfy-nonce' ) . '" />
|
248 |
+
<div style="clear:both;" ></div>' );
|
249 |
}
|
250 |
|
251 |
// Activity feed
|
269 |
global $wpdb;
|
270 |
|
271 |
// Recently uploaded photos
|
272 |
+
wppa_echo( '<h3>' . __( 'Recently uploaded photos', 'wp-photo-album-plus' ) . '</h3>' );
|
273 |
|
274 |
$void = wppa_get_void_pids();
|
275 |
if ( count ( $void ) ) {
|
284 |
ORDER BY timestamp DESC LIMIT 5", ARRAY_A );
|
285 |
|
286 |
if ( ! empty( $photos ) ) {
|
287 |
+
wppa_echo( '<table>' );
|
|
|
288 |
foreach( $photos as $photo ) {
|
289 |
$id = $photo['id'];
|
290 |
if ( wppa_user_is( 'administrator' ) ) {
|
293 |
else {
|
294 |
$href = wppa_get_photo_url( $id );
|
295 |
}
|
296 |
+
wppa_echo( '
|
297 |
+
<tr>
|
298 |
+
<td>
|
299 |
+
<a href="' . esc_url( $href ) . '" target="_blank" >' );
|
300 |
|
301 |
if ( wppa_is_video( $id ) ) {
|
302 |
+
$url = WPPA_UPLOAD_URL . '/icons/' . wppa_opt( 'video_icon' );
|
303 |
+
wppa_echo( '
|
304 |
+
<div style="position:relative;" >' .
|
305 |
+
wppa_get_video_html( array( 'id' => $id,
|
306 |
'width' => '50',
|
307 |
'controls' => false,
|
308 |
'preload' => 'metadata',
|
309 |
'use_thumb' => true,
|
310 |
'autoplay' => false
|
311 |
+
) ) . '
|
312 |
+
<img src="' . esc_url( $url ) . '" style="width:16px;height:16px;position:absolute;right:0;bottom:0;z-index:100;" />
|
313 |
+
</div>' );
|
|
|
|
|
314 |
}
|
315 |
else {
|
316 |
+
wppa_echo( '
|
317 |
+
<img src="' . esc_url( wppa_get_thumb_url( $id ) ) . '" style="max-width:50px;max-height:50px;" /> ' );
|
318 |
}
|
319 |
|
320 |
+
wppa_echo( '
|
321 |
+
</a>
|
322 |
+
</td>
|
323 |
+
<td>' );
|
324 |
$usr = wppa_get_user_by( 'login', $photo['owner'] );
|
325 |
if ( $usr ) {
|
326 |
$usr = $usr -> display_name;
|
328 |
else {
|
329 |
$usr = sanitize_user( $photo['owner'] );
|
330 |
}
|
331 |
+
wppa_echo(
|
332 |
sprintf( __( 'by %s in album %s', 'wp-photo-album-plus' ),
|
333 |
'<b>' . $usr . '</b>',
|
334 |
'<b>' . sanitize_text_field( wppa_get_album_name( $photo['album'] ) ) . '</b> (' . strval( intval( $photo['album'] ) ) . ')'
|
335 |
+
) . '
|
336 |
+
<br>' .
|
337 |
+
wppa_local_date( '', $photo['timestamp'] ) . '
|
338 |
+
</td>
|
339 |
+
</tr>' );
|
340 |
}
|
341 |
+
wppa_echo( '</table>' );
|
|
|
342 |
}
|
343 |
else {
|
344 |
+
wppa_echo(
|
345 |
'<p>' .
|
346 |
__( 'There are no recently uploaded photos', 'wp-photo-album-plus' ) .
|
347 |
+
'</p>' );
|
348 |
}
|
349 |
+
wppa_echo( '<br>' );
|
350 |
|
351 |
// Recent comments
|
352 |
+
wppa_echo( '<h3>' . __( 'Recent comments on photos', 'wp-photo-album-plus' ) . '</h3>' );
|
353 |
$comments = $wpdb->get_results( "SELECT * FROM $wpdb->wppa_comments ORDER BY timestamp DESC LIMIT 5", ARRAY_A );
|
354 |
if ( ! empty( $comments ) ) {
|
355 |
|
356 |
+
wppa_echo( '<table>' );
|
|
|
357 |
foreach( $comments as $comment ) {
|
358 |
$photo = wppa_cache_photo( $comment['photo'] );
|
359 |
if ( wppa_user_is( 'administrator' ) ) {
|
362 |
else {
|
363 |
$href = wppa_get_photo_url( $photo['id'] );
|
364 |
}
|
365 |
+
wppa_echo( '
|
366 |
+
<tr>
|
367 |
+
<td>
|
368 |
+
<a href="' . esc_url( $href ) . '" target="_blank" >
|
369 |
+
<img src="' . esc_url( wppa_get_thumb_url( $photo['id'] ) ) . '" style="max-width:50px;max-height:50px;" />
|
370 |
+
</a>
|
371 |
+
</td>
|
372 |
+
<td>
|
373 |
+
<i>' . sanitize_text_field( $comment['comment'] ) . '</i>
|
374 |
+
<br>' .
|
375 |
sprintf( __( 'by %s', 'wp-photo-album-plus' ),
|
376 |
+
'<b>' . htmlspecialchars( $comment['user'] ) . '</b>' ) . '
|
377 |
+
<br>' .
|
378 |
+
wppa_local_date( '', $comment['timestamp'] ) . '
|
379 |
+
</td>
|
380 |
+
</tr>' );
|
381 |
}
|
382 |
+
wppa_echo( '</table>' );
|
|
|
383 |
}
|
384 |
else {
|
385 |
+
wppa_echo(
|
386 |
'<p>' .
|
387 |
__( 'There are no recent comments on photos', 'wp-photo-album-plus' ) .
|
388 |
+
'</p>' );
|
389 |
}
|
390 |
|
391 |
}
|
414 |
// Get data
|
415 |
$his = wppa_get_option( 'wppa_potd_log_data', array() );
|
416 |
if ( ! empty( $his ) ) {
|
417 |
+
wppa_echo( '<table>' );
|
|
|
418 |
foreach( $his as $item ) {
|
419 |
if ( wppa_photo_exists( $item['id'] ) ) {
|
420 |
$photo = wppa_cache_photo( $item['id'] );
|
425 |
else {
|
426 |
$href = wppa_get_photo_url( $photo['id'] );
|
427 |
}
|
428 |
+
wppa_echo( '
|
429 |
+
<tr style="border-bottom:1px solid #444;" >
|
430 |
+
<td>
|
431 |
+
<a href="' . esc_url( $href ) . '" target="_blank" >
|
432 |
+
<img src="' . esc_url( wppa_get_thumb_url( $photo['id'] ) ) . '" style="max-width:50px;max-height:50px;" />
|
433 |
+
</a>
|
434 |
+
</td>
|
435 |
+
<td>' .
|
436 |
__( 'First displayed at', 'wp-photo-album-plus' ) . ': ' . wppa_local_date( '', $time ) . '<br>' .
|
437 |
__( 'Name', 'wp-photo-album-plus' ) . ': ' . wppa_get_photo_name( $photo['id'] ) . '<br>' .
|
438 |
__( 'Description', 'wp-photo-album-plus' ) . ':<br>' .
|
439 |
+
htmlspecialchars( strip_tags( wppa_get_photo_desc( $photo['id'] ) ) ) . '
|
440 |
+
</td>
|
441 |
+
</tr>' );
|
442 |
}
|
443 |
else {
|
444 |
+
wppa_echo( '
|
445 |
+
<tr style="border-bottom:1px solid #444;" >
|
446 |
+
<td>' .
|
447 |
+
sprintf( __( 'Photo %d has been removed' ), $item['id'] ) . '
|
448 |
+
</td>
|
449 |
+
<td>' .
|
450 |
+
__( 'First displayed at', 'wp-photo-album-plus' ) . ': ' . wppa_local_date( '', $item['tm'] ) . '<br>
|
451 |
+
</td>
|
452 |
+
</tr>' );
|
453 |
}
|
454 |
}
|
455 |
+
wppa_echo( '</table>' );
|
|
|
456 |
}
|
457 |
else {
|
458 |
+
wppa_echo(
|
459 |
'<p>' .
|
460 |
__( 'There is no photo of the day history', 'wp-photo-album-plus' ) .
|
461 |
+
'</p>' );
|
462 |
}
|
463 |
}
|
wppa-edit-tags.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-edit-tags.php
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
-
* Version 8.1.
|
6 |
*
|
7 |
*/
|
8 |
|
@@ -92,7 +92,7 @@ function _wppa_edit_tags() {
|
|
92 |
id="wppa_edit_tag_button"
|
93 |
type="button"
|
94 |
class="button-secundary"
|
95 |
-
style="float:left;
|
96 |
value="' . esc_attr( $label ) . '"
|
97 |
onclick="' . $onclick . '"
|
98 |
/>
|
2 |
/* wppa-edit-tags.php
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
+
* Version 8.1.09.001
|
6 |
*
|
7 |
*/
|
8 |
|
92 |
id="wppa_edit_tag_button"
|
93 |
type="button"
|
94 |
class="button-secundary"
|
95 |
+
style="float:left;border-radius:3px;font-size:11px;height:18px;margin 0 4px;padding: 0 6px"
|
96 |
value="' . esc_attr( $label ) . '"
|
97 |
onclick="' . $onclick . '"
|
98 |
/>
|
wppa-functions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various functions
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -3779,6 +3779,11 @@ function wppa_get_container_style() {
|
|
3779 |
// Responsive full width
|
3780 |
elseif ( wppa( 'auto_colwidth' ) ) {
|
3781 |
$result .= 'width:100%;clear:both;';
|
|
|
|
|
|
|
|
|
|
|
3782 |
}
|
3783 |
// Static
|
3784 |
else {
|
@@ -4266,9 +4271,7 @@ global $thumbs;
|
|
4266 |
<a href="' . get_permalink() . '" >
|
4267 |
<img
|
4268 |
src="' . wppa_get_photo_url( wppa( 'start_photo' ), '', $width, $height ) . '"
|
4269 |
-
style="' . $style . '"
|
4270 |
-
width="' . $width . '"
|
4271 |
-
height="' . $height . '" ' .
|
4272 |
$imgalt . '
|
4273 |
>
|
4274 |
</a>' );
|
@@ -5192,18 +5195,19 @@ global $wppa_upload_succes_id;
|
|
5192 |
// Clean alert text
|
5193 |
$alert = trim( $alert );
|
5194 |
|
|
|
|
|
|
|
|
|
|
|
|
|
5195 |
// Output
|
5196 |
-
|
5197 |
|
5198 |
// Alert only when requested or fail
|
5199 |
if ( wppa_opt( 'fe_alert' ) != '-none-' || $fail ) {
|
5200 |
wppa_alert( $alert, $reload );
|
5201 |
}
|
5202 |
-
|
5203 |
-
// Redirect to blogpost
|
5204 |
-
if ( $blogged ) {
|
5205 |
-
wppa_js( 'document.location.href=\'' . get_permalink( $post_id ) . '\';', 'now' );
|
5206 |
-
}
|
5207 |
}
|
5208 |
}
|
5209 |
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various functions
|
6 |
+
* Version 8.1.09.001
|
7 |
*
|
8 |
*/
|
9 |
|
3779 |
// Responsive full width
|
3780 |
elseif ( wppa( 'auto_colwidth' ) ) {
|
3781 |
$result .= 'width:100%;clear:both;';
|
3782 |
+
|
3783 |
+
// Responsive with maximum
|
3784 |
+
if ( wppa( 'max_width' ) ) {
|
3785 |
+
$result .= 'max-width:' . wppa( 'max_width' ) . 'px;';
|
3786 |
+
}
|
3787 |
}
|
3788 |
// Static
|
3789 |
else {
|
4271 |
<a href="' . get_permalink() . '" >
|
4272 |
<img
|
4273 |
src="' . wppa_get_photo_url( wppa( 'start_photo' ), '', $width, $height ) . '"
|
4274 |
+
style="' . $style . '"' .
|
|
|
|
|
4275 |
$imgalt . '
|
4276 |
>
|
4277 |
</a>' );
|
5195 |
// Clean alert text
|
5196 |
$alert = trim( $alert );
|
5197 |
|
5198 |
+
// Add link to blogpost
|
5199 |
+
if ( $blogged ) {
|
5200 |
+
$upload_message .=
|
5201 |
+
'<br><a style="font-size:1.25em;font-weight:bold;cursor:pointer" href="' . get_permalink( $post_id ) . '">' . __( 'Visit blog post', 'wp-photo-album-plus' ) . '</a>';
|
5202 |
+
}
|
5203 |
+
|
5204 |
// Output
|
5205 |
+
wppa_echo( $upload_message );
|
5206 |
|
5207 |
// Alert only when requested or fail
|
5208 |
if ( wppa_opt( 'fe_alert' ) != '-none-' || $fail ) {
|
5209 |
wppa_alert( $alert, $reload );
|
5210 |
}
|
|
|
|
|
|
|
|
|
|
|
5211 |
}
|
5212 |
}
|
5213 |
}
|
wppa-gutenberg-photo.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-gutenberg-photo.php
|
3 |
* Pachkage: wp-photo-album-plus
|
4 |
*
|
5 |
-
* Version 8.1.
|
6 |
*/
|
7 |
|
8 |
function wppa_gutenberg_photo_block() {
|
@@ -175,10 +175,10 @@ global $wpdb;
|
|
175 |
'<div
|
176 |
id="progress"
|
177 |
class="wppa-progress "
|
178 |
-
style="clear:both;width:70%;border-color:#777;height:18px;border:1px solid;padding:1px;border-radius:3px;line-height:18px;text-align:center
|
179 |
>
|
180 |
<div id="bar" class="wppa-bar" ></div>
|
181 |
-
<div id="percent" class="wppa-percent" >0%</div
|
182 |
</div>
|
183 |
<div id="message" class="wppa-message" ></div>
|
184 |
</form>
|
2 |
/* wppa-gutenberg-photo.php
|
3 |
* Pachkage: wp-photo-album-plus
|
4 |
*
|
5 |
+
* Version 8.1.09.001
|
6 |
*/
|
7 |
|
8 |
function wppa_gutenberg_photo_block() {
|
175 |
'<div
|
176 |
id="progress"
|
177 |
class="wppa-progress "
|
178 |
+
style="clear:both;width:70%;border-color:#777;height:18px;border:1px solid;padding:1px;border-radius:3px;line-height:18px;text-align:center"
|
179 |
>
|
180 |
<div id="bar" class="wppa-bar" ></div>
|
181 |
+
<div id="percent" class="wppa-percent" >0%</div>
|
182 |
</div>
|
183 |
<div id="message" class="wppa-message" ></div>
|
184 |
</form>
|
wppa-links.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* Frontend links
|
6 |
|
7 |
-
* Version 8.1.
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
@@ -883,7 +883,7 @@ function wppa_moderate_links( $type, $id, $comid = '' ) {
|
|
883 |
'</a><br class="wppa-approve-'.$comid.'" />';
|
884 |
break;
|
885 |
default:
|
886 |
-
|
887 |
break;
|
888 |
}
|
889 |
}
|
4 |
*
|
5 |
* Frontend links
|
6 |
|
7 |
+
* Version 8.1.09.001
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
883 |
'</a><br class="wppa-approve-'.$comid.'" />';
|
884 |
break;
|
885 |
default:
|
886 |
+
wppa_echo( 'error type='.$type );
|
887 |
break;
|
888 |
}
|
889 |
}
|
wppa-mailing.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* Contains mailing functions
|
6 |
*
|
7 |
-
* Version 8.1.
|
8 |
*
|
9 |
*/
|
10 |
|
@@ -1102,7 +1102,7 @@ function wppa_send_mail( $args ) {
|
|
1102 |
|
1103 |
// Failed
|
1104 |
if ( ! wppa_is_cron() ) {
|
1105 |
-
|
1106 |
}
|
1107 |
|
1108 |
// Registee failed mail
|
4 |
*
|
5 |
* Contains mailing functions
|
6 |
*
|
7 |
+
* Version 8.1.09.001
|
8 |
*
|
9 |
*/
|
10 |
|
1102 |
|
1103 |
// Failed
|
1104 |
if ( ! wppa_is_cron() ) {
|
1105 |
+
wppa_echo( __( 'Mail sending Failed', 'wp-photo-album-plus' ) );
|
1106 |
}
|
1107 |
|
1108 |
// Registee failed mail
|
wppa-maintenance.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains (not yet, but in the future maybe) all the maintenance routines
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -1586,11 +1586,7 @@ global $wppa_log_file;
|
|
1586 |
$result .= '
|
1587 |
</div></div>';
|
1588 |
|
1589 |
-
|
1590 |
-
// $the_js = 'if (jQuery("#wppa-maintenance-list").niceScroll) {jQuery(document).ready(function(){jQuery("#wppa-maintenance-list").niceScroll(".wppa-nicewrap",{' . wppa_opt( 'nicescroll_opts' ) . '});});};';
|
1591 |
-
// wppa_add_inline_script( 'wppa-admin', $the_js );
|
1592 |
-
|
1593 |
-
return htmlspecialchars( $header ) . '|' . $result;
|
1594 |
}
|
1595 |
|
1596 |
function wppa_recuperate( $id ) {
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains (not yet, but in the future maybe) all the maintenance routines
|
6 |
+
* Version 8.1.09.001
|
7 |
*
|
8 |
*/
|
9 |
|
1586 |
$result .= '
|
1587 |
</div></div>';
|
1588 |
|
1589 |
+
return $header . '|' . $result;
|
|
|
|
|
|
|
|
|
1590 |
}
|
1591 |
|
1592 |
function wppa_recuperate( $id ) {
|
wppa-non-admin.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the non admin stuff
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -86,7 +86,6 @@ global $wpdb;
|
|
86 |
}
|
87 |
else {
|
88 |
$imgurl = '';
|
89 |
-
// echo '<!-- WPPA+ No Photo id -->';
|
90 |
}
|
91 |
|
92 |
if ( $id ) {
|
@@ -111,20 +110,20 @@ global $wpdb;
|
|
111 |
$site = get_bloginfo( 'name' );
|
112 |
$creat = wppa_opt( 'twitter_account' );
|
113 |
|
114 |
-
|
115 |
<!-- WPPA+ Twitter Share data -->
|
116 |
<meta name="twitter:card" content="' . $card . '">
|
117 |
<meta name="twitter:site" content="' . esc_attr( $site ) . '">
|
118 |
<meta name="twitter:title" content="' . esc_attr( sanitize_text_field( $title ) ) . '">
|
119 |
<meta name="twitter:text:description" content="' . esc_attr( sanitize_text_field( $desc ) ) . '">
|
120 |
-
<meta name="twitter:image" content="' . esc_url( $imgurl ) . '">';
|
121 |
if ( $creat ) {
|
122 |
-
|
123 |
-
<meta name="twitter:creator" content="' . $creat . '">';
|
124 |
}
|
125 |
-
|
126 |
<!-- WPPA+ End Twitter Share data -->
|
127 |
-
';
|
128 |
}
|
129 |
|
130 |
if ( wppa_switch( 'og_tags_on' ) ) {
|
@@ -136,26 +135,26 @@ echo '
|
|
136 |
$url = wppa_convert_to_pretty( $url, false, true );
|
137 |
$site = get_bloginfo('name');
|
138 |
$mime = wppa_get_mime_type( $id );
|
139 |
-
|
140 |
<!-- WPPA+ Og Share data -->
|
141 |
<meta property="og:site_name" content="' . esc_attr( sanitize_text_field( $site ) ) . '" />
|
142 |
<meta property="og:type" content="article" />
|
143 |
<meta property="og:url" content="' . $url . '" />
|
144 |
-
<meta property="og:title" content="' . esc_attr( sanitize_text_field( $title ) ) . '" />';
|
145 |
if ( $mime ) {
|
146 |
-
|
147 |
<meta property="og:image" content="' . esc_url( sanitize_text_field( $imgurl ) ) . '" />
|
148 |
<meta property="og:image:type" content="' . $mime . '" />
|
149 |
<meta property="og:image:width" content="' . wppa_get_photox( $id ) . '" />
|
150 |
-
<meta property="og:image:height" content="' . wppa_get_photoy( $id ) . '" />';
|
151 |
}
|
152 |
if ( $desc ) {
|
153 |
-
|
154 |
-
<meta property="og:description" content="' . esc_attr( sanitize_text_field( $desc ) ) . '" />';
|
155 |
}
|
156 |
-
|
157 |
<!-- WPPA+ End Og Share data -->
|
158 |
-
';
|
159 |
}
|
160 |
}
|
161 |
}
|
@@ -170,17 +169,17 @@ echo '
|
|
170 |
$photos = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos WHERE album = %s AND status = 'featured'", $album ), ARRAY_A );
|
171 |
wppa_cache_photo( 'add', $photos );
|
172 |
if ( $photos ) {
|
173 |
-
|
174 |
foreach ( $photos as $photo ) {
|
175 |
$id = $photo['id'];
|
176 |
$content = esc_attr( sanitize_text_field( wppa_get_keywords( $id ) ) );
|
177 |
if ( $content && ! in_array( $content, $done ) ) {
|
178 |
-
|
179 |
-
<meta name="keywords" content="'.$content.'" >';
|
180 |
$done[] = $content;
|
181 |
}
|
182 |
}
|
183 |
-
|
184 |
}
|
185 |
}
|
186 |
}
|
@@ -190,38 +189,38 @@ echo '
|
|
190 |
$photos = $wpdb->get_results( "SELECT * FROM $wpdb->wppa_photos WHERE status = 'featured'", ARRAY_A);
|
191 |
wppa_cache_photo( 'add', $photos );
|
192 |
if ( $photos ) {
|
193 |
-
|
194 |
foreach ( $photos as $photo ) {
|
195 |
$thumb = $photo; // Set to global to reduce queries when getting the name
|
196 |
$id = $photo['id'];
|
197 |
$content = esc_attr( sanitize_text_field( wppa_get_keywords( $id ) ) );
|
198 |
if ( $content && ! in_array( $content, $done ) ) {
|
199 |
-
|
200 |
-
<meta name="keywords" content="'
|
201 |
$done[] = $content;
|
202 |
}
|
203 |
}
|
204 |
-
|
205 |
}
|
206 |
}
|
207 |
|
208 |
// Facebook Admin and App
|
209 |
if ( ( wppa_switch( 'share_on' ) || wppa_switch( 'share_on_widget' ) ) &&
|
210 |
( wppa_switch( 'facebook_comments' ) || wppa_switch( 'facebook_like' ) || wppa_switch( 'share_facebook' ) ) ) {
|
211 |
-
|
212 |
if ( wppa_opt( 'facebook_admin_id' ) ) {
|
213 |
-
|
214 |
}
|
215 |
if ( wppa_opt( 'facebook_app_id' ) ) {
|
216 |
-
|
217 |
}
|
218 |
if ( $imgurl ) {
|
219 |
-
|
220 |
-
<link rel="image_src" href="'.esc_url( $imgurl ).'" />';
|
221 |
}
|
222 |
-
|
223 |
<!-- WPPA+ END Facebook meta tags -->
|
224 |
-
';
|
225 |
}
|
226 |
}
|
227 |
|
@@ -272,8 +271,7 @@ global $wppa_session;
|
|
272 |
left:0;
|
273 |
width:100%;
|
274 |
height:10000px;
|
275 |
-
background-color:'.wppa_opt( 'ovl_bgcolor' ).'
|
276 |
-
"
|
277 |
onclick="wppaOvlOnclick(event)"
|
278 |
onwheel="return false;"
|
279 |
onscroll="return false;"
|
@@ -315,22 +313,22 @@ global $wppa_session;
|
|
315 |
// The preload images
|
316 |
'<img
|
317 |
id="wppa-pre-prev"
|
318 |
-
style="position:fixed;left:0;top:50%;width:100px;
|
319 |
-
class="wppa-preload"
|
320 |
title="Preload preveious image"
|
321 |
alt=""
|
322 |
/>
|
323 |
<img
|
324 |
id="wppa-pre-next"
|
325 |
-
style="position:fixed;right:0;top:50%;width:100px;
|
326 |
-
class="wppa-preload"
|
327 |
title="Preload next image"
|
328 |
alt=""
|
329 |
/>
|
330 |
<img
|
331 |
id="wppa-pre-curr"
|
332 |
-
style="position:fixed;left:0;top:0;
|
333 |
-
class="wppa-preload-curr"
|
334 |
title="Preload current image"
|
335 |
alt=""
|
336 |
/>' .
|
@@ -345,7 +343,7 @@ global $wppa_session;
|
|
345 |
wp_nonce_field( 'wppa-check', 'wppa-nonce', false, true ) .
|
346 |
wp_nonce_field( 'wppa-qr-nonce', 'wppa-qr-nonce', false, true );
|
347 |
|
348 |
-
|
349 |
|
350 |
// Do the upload if required and not yet done
|
351 |
wppa_user_upload();
|
@@ -375,7 +373,7 @@ global $wppa_locale;
|
|
375 |
var js, fjs = d.getElementsByTagName(s)[0];
|
376 |
if (d.getElementById(id)) return;
|
377 |
js = d.createElement(s); js.id = id;
|
378 |
-
js.src = "//connect.facebook.net/<?php
|
379 |
fjs.parentNode.insertBefore(js, fjs);
|
380 |
}(document, 'script', 'facebook-jssdk'));
|
381 |
</script>
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the non admin stuff
|
6 |
+
* Version 8.1.09.001
|
7 |
*
|
8 |
*/
|
9 |
|
86 |
}
|
87 |
else {
|
88 |
$imgurl = '';
|
|
|
89 |
}
|
90 |
|
91 |
if ( $id ) {
|
110 |
$site = get_bloginfo( 'name' );
|
111 |
$creat = wppa_opt( 'twitter_account' );
|
112 |
|
113 |
+
wppa_echo( '
|
114 |
<!-- WPPA+ Twitter Share data -->
|
115 |
<meta name="twitter:card" content="' . $card . '">
|
116 |
<meta name="twitter:site" content="' . esc_attr( $site ) . '">
|
117 |
<meta name="twitter:title" content="' . esc_attr( sanitize_text_field( $title ) ) . '">
|
118 |
<meta name="twitter:text:description" content="' . esc_attr( sanitize_text_field( $desc ) ) . '">
|
119 |
+
<meta name="twitter:image" content="' . esc_url( $imgurl ) . '">' );
|
120 |
if ( $creat ) {
|
121 |
+
wppa_echo( '
|
122 |
+
<meta name="twitter:creator" content="' . $creat . '">' );
|
123 |
}
|
124 |
+
wppa_echo( '
|
125 |
<!-- WPPA+ End Twitter Share data -->
|
126 |
+
' );
|
127 |
}
|
128 |
|
129 |
if ( wppa_switch( 'og_tags_on' ) ) {
|
135 |
$url = wppa_convert_to_pretty( $url, false, true );
|
136 |
$site = get_bloginfo('name');
|
137 |
$mime = wppa_get_mime_type( $id );
|
138 |
+
wppa_echo( '
|
139 |
<!-- WPPA+ Og Share data -->
|
140 |
<meta property="og:site_name" content="' . esc_attr( sanitize_text_field( $site ) ) . '" />
|
141 |
<meta property="og:type" content="article" />
|
142 |
<meta property="og:url" content="' . $url . '" />
|
143 |
+
<meta property="og:title" content="' . esc_attr( sanitize_text_field( $title ) ) . '" />' );
|
144 |
if ( $mime ) {
|
145 |
+
wppa_echo( '
|
146 |
<meta property="og:image" content="' . esc_url( sanitize_text_field( $imgurl ) ) . '" />
|
147 |
<meta property="og:image:type" content="' . $mime . '" />
|
148 |
<meta property="og:image:width" content="' . wppa_get_photox( $id ) . '" />
|
149 |
+
<meta property="og:image:height" content="' . wppa_get_photoy( $id ) . '" />' );
|
150 |
}
|
151 |
if ( $desc ) {
|
152 |
+
wppa_echo( '
|
153 |
+
<meta property="og:description" content="' . esc_attr( sanitize_text_field( $desc ) ) . '" />' );
|
154 |
}
|
155 |
+
wppa_echo( '
|
156 |
<!-- WPPA+ End Og Share data -->
|
157 |
+
' );
|
158 |
}
|
159 |
}
|
160 |
}
|
169 |
$photos = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos WHERE album = %s AND status = 'featured'", $album ), ARRAY_A );
|
170 |
wppa_cache_photo( 'add', $photos );
|
171 |
if ( $photos ) {
|
172 |
+
wppa_echo( "\n<!-- WPPA+ BEGIN Featured photos on this page -->" );
|
173 |
foreach ( $photos as $photo ) {
|
174 |
$id = $photo['id'];
|
175 |
$content = esc_attr( sanitize_text_field( wppa_get_keywords( $id ) ) );
|
176 |
if ( $content && ! in_array( $content, $done ) ) {
|
177 |
+
wppa_echo( '
|
178 |
+
<meta name="keywords" content="'.$content.'" >' );
|
179 |
$done[] = $content;
|
180 |
}
|
181 |
}
|
182 |
+
wppa_echo( "\n<!-- WPPA+ END Featured photos on this page -->\n" );
|
183 |
}
|
184 |
}
|
185 |
}
|
189 |
$photos = $wpdb->get_results( "SELECT * FROM $wpdb->wppa_photos WHERE status = 'featured'", ARRAY_A);
|
190 |
wppa_cache_photo( 'add', $photos );
|
191 |
if ( $photos ) {
|
192 |
+
wppa_echo( "\n<!-- WPPA+ BEGIN Featured photos on this site -->" );
|
193 |
foreach ( $photos as $photo ) {
|
194 |
$thumb = $photo; // Set to global to reduce queries when getting the name
|
195 |
$id = $photo['id'];
|
196 |
$content = esc_attr( sanitize_text_field( wppa_get_keywords( $id ) ) );
|
197 |
if ( $content && ! in_array( $content, $done ) ) {
|
198 |
+
wppa_echo( '
|
199 |
+
<meta name="keywords" content="' . $content . '" >' );
|
200 |
$done[] = $content;
|
201 |
}
|
202 |
}
|
203 |
+
wppa_echo( "\n<!-- WPPA+ END Featured photos on this site -->\n" );
|
204 |
}
|
205 |
}
|
206 |
|
207 |
// Facebook Admin and App
|
208 |
if ( ( wppa_switch( 'share_on' ) || wppa_switch( 'share_on_widget' ) ) &&
|
209 |
( wppa_switch( 'facebook_comments' ) || wppa_switch( 'facebook_like' ) || wppa_switch( 'share_facebook' ) ) ) {
|
210 |
+
wppa_echo( "\n<!-- WPPA+ BEGIN Facebook meta tags -->" );
|
211 |
if ( wppa_opt( 'facebook_admin_id' ) ) {
|
212 |
+
wppa_echo( "\n\t<meta property=\"fb:admins\" content=\"" . wppa_opt( 'facebook_admin_id' ) . "\" />" );
|
213 |
}
|
214 |
if ( wppa_opt( 'facebook_app_id' ) ) {
|
215 |
+
wppa_echo( "\n\t<meta property=\"fb:app_id\" content=\"" . wppa_opt( 'facebook_app_id' ) . "\" />" );
|
216 |
}
|
217 |
if ( $imgurl ) {
|
218 |
+
wppa_echo( '
|
219 |
+
<link rel="image_src" href="'.esc_url( $imgurl ).'" />' );
|
220 |
}
|
221 |
+
wppa_echo( '
|
222 |
<!-- WPPA+ END Facebook meta tags -->
|
223 |
+
' );
|
224 |
}
|
225 |
}
|
226 |
|
271 |
left:0;
|
272 |
width:100%;
|
273 |
height:10000px;
|
274 |
+
background-color:' . wppa_opt( 'ovl_bgcolor' ) . '"
|
|
|
275 |
onclick="wppaOvlOnclick(event)"
|
276 |
onwheel="return false;"
|
277 |
onscroll="return false;"
|
313 |
// The preload images
|
314 |
'<img
|
315 |
id="wppa-pre-prev"
|
316 |
+
style="position:fixed;left:0;top:50%;width:100px;visibility:hidden"
|
317 |
+
class="wppa-preload wppa-ovl-preload"
|
318 |
title="Preload preveious image"
|
319 |
alt=""
|
320 |
/>
|
321 |
<img
|
322 |
id="wppa-pre-next"
|
323 |
+
style="position:fixed;right:0;top:50%;width:100px;visibility:hidden"
|
324 |
+
class="wppa-preload wppa-ovl-preload"
|
325 |
title="Preload next image"
|
326 |
alt=""
|
327 |
/>
|
328 |
<img
|
329 |
id="wppa-pre-curr"
|
330 |
+
style="position:fixed;left:0;top:0;visibility:hidden"
|
331 |
+
class="wppa-preload-curr wppa-ovl-preload"
|
332 |
title="Preload current image"
|
333 |
alt=""
|
334 |
/>' .
|
343 |
wp_nonce_field( 'wppa-check', 'wppa-nonce', false, true ) .
|
344 |
wp_nonce_field( 'wppa-qr-nonce', 'wppa-qr-nonce', false, true );
|
345 |
|
346 |
+
wppa_echo( wppa_compress_html( $result ) );
|
347 |
|
348 |
// Do the upload if required and not yet done
|
349 |
wppa_user_upload();
|
373 |
var js, fjs = d.getElementsByTagName(s)[0];
|
374 |
if (d.getElementById(id)) return;
|
375 |
js = d.createElement(s); js.id = id;
|
376 |
+
js.src = "//connect.facebook.net/<?php wppa_echo( $wppa_locale ); ?>/all.js#xfbml=1";
|
377 |
fjs.parentNode.insertBefore(js, fjs);
|
378 |
}(document, 'script', 'facebook-jssdk'));
|
379 |
</script>
|
wppa-photo-admin-autosave.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* edit and delete photos
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -1322,7 +1322,7 @@ function wppaToggleExif( id, count ) {
|
|
1322 |
<input
|
1323 |
type="button"
|
1324 |
onclick="wppaTryFlip( ' . $id . ' )"
|
1325 |
-
value="' . esc_attr( __( 'Flip', 'wp-photo-album-plus' ) ) . ' —"
|
1326 |
/>
|
1327 |
<input
|
1328 |
type="button"
|
@@ -1516,7 +1516,7 @@ function wppaToggleExif( id, count ) {
|
|
1516 |
<input
|
1517 |
type="button"
|
1518 |
onclick="wppaTryMagick( ' . $id . ', \'magickflip\' )"
|
1519 |
-
value="' . esc_attr( __( 'Flip', 'wp-photo-album-plus' ) ) . ' —"
|
1520 |
title="-flip"
|
1521 |
/> ' );
|
1522 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* edit and delete photos
|
6 |
+
* Version 8.1.09.001
|
7 |
*
|
8 |
*/
|
9 |
|
1322 |
<input
|
1323 |
type="button"
|
1324 |
onclick="wppaTryFlip( ' . $id . ' )"
|
1325 |
+
value="' . esc_attr( __( 'Flip', 'wp-photo-album-plus' ) ) . ' —"
|
1326 |
/>
|
1327 |
<input
|
1328 |
type="button"
|
1516 |
<input
|
1517 |
type="button"
|
1518 |
onclick="wppaTryMagick( ' . $id . ', \'magickflip\' )"
|
1519 |
+
value="' . esc_attr( __( 'Flip', 'wp-photo-album-plus' ) ) . ' —"
|
1520 |
title="-flip"
|
1521 |
/> ' );
|
1522 |
|
wppa-photo-files.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-photo-files.php
|
3 |
*
|
4 |
* Functions used to create/manipulate photofiles
|
5 |
-
* Version 8.1.
|
6 |
*
|
7 |
*/
|
8 |
|
@@ -432,7 +432,7 @@ wppa_log('dbg', 'make called with'.$file.' '.$id.' '.$ext.' '.$do_thumb. ' exist
|
|
432 |
wppa_get_photox( $id, 'force' );
|
433 |
|
434 |
// Show progression
|
435 |
-
if ( is_admin() && ! wppa( 'ajax' ) )
|
436 |
|
437 |
// Update CDN
|
438 |
$cdn = wppa_cdn( 'admin' );
|
2 |
/* wppa-photo-files.php
|
3 |
*
|
4 |
* Functions used to create/manipulate photofiles
|
5 |
+
* Version 8.1.09.001
|
6 |
*
|
7 |
*/
|
8 |
|
432 |
wppa_get_photox( $id, 'force' );
|
433 |
|
434 |
// Show progression
|
435 |
+
if ( is_admin() && ! wppa( 'ajax' ) ) wppa_echo( '.' );
|
436 |
|
437 |
// Update CDN
|
438 |
$cdn = wppa_cdn( 'admin' );
|
wppa-potd-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the photo of the day widget
|
6 |
-
* Version 8.1.
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
@@ -250,10 +250,13 @@ class PhotoOfTheDay extends WP_Widget {
|
|
250 |
wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) );
|
251 |
|
252 |
// Explanation
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
|
|
|
|
|
|
257 |
}
|
258 |
|
259 |
// Set defaults
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the photo of the day widget
|
6 |
+
* Version 8.1.09.001
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
250 |
wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) );
|
251 |
|
252 |
// Explanation
|
253 |
+
if ( current_user_can( 'wppa_settings' ) ) {
|
254 |
+
wppa_echo (
|
255 |
+
'<p>' .
|
256 |
+
__( 'You can set the content and the sizes in this widget in the <b>Photo Albums -> Photo of the day</b> admin page.', 'wp-photo-album-plus' ) .
|
257 |
+
wppa_see_also( 'photos', 3 ) .
|
258 |
+
'</p>' );
|
259 |
+
}
|
260 |
}
|
261 |
|
262 |
// Set defaults
|
wppa-qr-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display qr code
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -58,8 +58,8 @@ class wppaQRWidget extends WP_Widget {
|
|
58 |
}
|
59 |
$result .= $widget_content . $after_widget;
|
60 |
|
61 |
-
|
62 |
-
|
63 |
|
64 |
wppa( 'in_widget', false );
|
65 |
|
@@ -84,19 +84,21 @@ class wppaQRWidget extends WP_Widget {
|
|
84 |
$instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
|
85 |
|
86 |
// Title
|
87 |
-
|
88 |
-
wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) );
|
89 |
|
90 |
// Loggedin only
|
91 |
-
|
92 |
-
wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) );
|
93 |
|
94 |
// Explanation
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
|
|
|
|
100 |
}
|
101 |
|
102 |
// Set defaults
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display qr code
|
6 |
+
* Version 8.1.09.001
|
7 |
*
|
8 |
*/
|
9 |
|
58 |
}
|
59 |
$result .= $widget_content . $after_widget;
|
60 |
|
61 |
+
wppa_echo( wppa_compress_html( $result ) );
|
62 |
+
wppa_echo( wppa_widget_timer( 'show', $widget_title ) );
|
63 |
|
64 |
wppa( 'in_widget', false );
|
65 |
|
84 |
$instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
|
85 |
|
86 |
// Title
|
87 |
+
wppa_echo(
|
88 |
+
wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) ) );
|
89 |
|
90 |
// Loggedin only
|
91 |
+
wppa_echo(
|
92 |
+
wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) ) );
|
93 |
|
94 |
// Explanation
|
95 |
+
if ( current_user_can( 'wppa_settings' ) ) {
|
96 |
+
wppa_echo(
|
97 |
+
'<p>' .
|
98 |
+
__( 'You can set the sizes and colors in this widget in the <b>Photo Albums -> Settings</b> admin page Tab Widgets -> III', 'wp-photo-album-plus' ) .
|
99 |
+
wppa_see_also( 'widget', '3' ) .
|
100 |
+
'</p>' );
|
101 |
+
};
|
102 |
}
|
103 |
|
104 |
// Set defaults
|
wppa-setting-functions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -169,8 +169,8 @@ global $wppa_opt;
|
|
169 |
$slug = substr( $xslug, 5 );
|
170 |
$tit = __('Slug =', 'wp-photo-album-plus' ).' '.$xslug."\n".__('Values = yes, no', 'wp-photo-album-plus' );
|
171 |
$title = wppa_switch( 'enable_shortcode_wppa_set' ) ? ' title="'.esc_attr( $tit ).'"' : '';
|
172 |
-
$html .= '<input style="float:left;
|
173 |
-
if ( wppa_switch( $slug ) ) $html .= ' checked
|
174 |
if ($onchange != '') $html .= ' onchange="'.esc_attr($onchange.';wppaAjaxUpdateOptionCheckBox(\''.$slug.'\', this);').'"';
|
175 |
else $html .= ' onchange="wppaAjaxUpdateOptionCheckBox(\''.$slug.'\', this)"';
|
176 |
|
@@ -187,16 +187,16 @@ global $wppa_opt;
|
|
187 |
function wppa_checkbox_e($xslug, $curval, $onchange = '', $class = '', $enabled = true) {
|
188 |
|
189 |
$slug = substr( $xslug, 5 );
|
190 |
-
$html = '<input style="float:left;
|
191 |
-
if ($curval) $html .= ' checked
|
192 |
if ( ! $enabled ) $html .= ' disabled';
|
193 |
if ($onchange != '') $html .= ' onchange="'.esc_attr( $onchange.';wppaAjaxUpdateOptionCheckBox(\''.$xslug.'\', this);').'"';
|
194 |
else $html .= ' onchange="wppaAjaxUpdateOptionCheckBox(\''.$xslug.'\', this)"';
|
195 |
|
196 |
if ($class != '') $html .= ' class="'.$class.'"';
|
197 |
-
$html .= '
|
198 |
if ($class != '') $html .= ' class="'.$class.'"';
|
199 |
-
$html .= '
|
200 |
|
201 |
return $html;
|
202 |
}
|
@@ -289,7 +289,7 @@ global $wppa_opt;
|
|
289 |
' value="' . esc_attr( $vals[$idx] ) . '" ' .
|
290 |
( $sel ? ' selected' : '' ) .
|
291 |
( $dis ? ' disabled' : '' ) .
|
292 |
-
'
|
293 |
$opt .
|
294 |
'</option>';
|
295 |
$idx++;
|
@@ -1013,14 +1013,8 @@ function wppa_setting_star( $onch ) {
|
|
1013 |
if ( strpos( $onch, 'wppaRefreshAfter()' ) !== false ) {
|
1014 |
$html = '
|
1015 |
<span
|
1016 |
-
style="
|
1017 |
-
|
1018 |
-
font-size:28px;
|
1019 |
-
line-height:8px;
|
1020 |
-
cursor:pointer;
|
1021 |
-
"
|
1022 |
-
title="' . __( 'After changing this setting the page will be reloaded', 'wp-photo-album-plus' ) . '"
|
1023 |
-
><sup>*</sup>
|
1024 |
</span>';
|
1025 |
return $html;
|
1026 |
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
+
* Version 8.1.09.002
|
7 |
*
|
8 |
*/
|
9 |
|
169 |
$slug = substr( $xslug, 5 );
|
170 |
$tit = __('Slug =', 'wp-photo-album-plus' ).' '.$xslug."\n".__('Values = yes, no', 'wp-photo-album-plus' );
|
171 |
$title = wppa_switch( 'enable_shortcode_wppa_set' ) ? ' title="'.esc_attr( $tit ).'"' : '';
|
172 |
+
$html .= '<input style="float:left;height:15px;margin:0px;padding:0px" type="checkbox" id="'.$slug.'"'.$title;
|
173 |
+
if ( wppa_switch( $slug ) ) $html .= ' checked';
|
174 |
if ($onchange != '') $html .= ' onchange="'.esc_attr($onchange.';wppaAjaxUpdateOptionCheckBox(\''.$slug.'\', this);').'"';
|
175 |
else $html .= ' onchange="wppaAjaxUpdateOptionCheckBox(\''.$slug.'\', this)"';
|
176 |
|
187 |
function wppa_checkbox_e($xslug, $curval, $onchange = '', $class = '', $enabled = true) {
|
188 |
|
189 |
$slug = substr( $xslug, 5 );
|
190 |
+
$html = '<input style="float:left;height:15px;margin:0px;padding:0px" type="checkbox" id="'.$slug.'"';
|
191 |
+
if ($curval) $html .= ' checked';
|
192 |
if ( ! $enabled ) $html .= ' disabled';
|
193 |
if ($onchange != '') $html .= ' onchange="'.esc_attr( $onchange.';wppaAjaxUpdateOptionCheckBox(\''.$xslug.'\', this);').'"';
|
194 |
else $html .= ' onchange="wppaAjaxUpdateOptionCheckBox(\''.$xslug.'\', this)"';
|
195 |
|
196 |
if ($class != '') $html .= ' class="'.$class.'"';
|
197 |
+
$html .= '/><img id="img_'.$xslug.'" src="'.wppa_get_imgdir().'star.ico" title="'.__('Setting unmodified', 'wp-photo-album-plus' ).'" style="padding-left:4px;float:left;height:16px;width:16px"';
|
198 |
if ($class != '') $html .= ' class="'.$class.'"';
|
199 |
+
$html .= '/>';
|
200 |
|
201 |
return $html;
|
202 |
}
|
289 |
' value="' . esc_attr( $vals[$idx] ) . '" ' .
|
290 |
( $sel ? ' selected' : '' ) .
|
291 |
( $dis ? ' disabled' : '' ) .
|
292 |
+
'>' .
|
293 |
$opt .
|
294 |
'</option>';
|
295 |
$idx++;
|
1013 |
if ( strpos( $onch, 'wppaRefreshAfter()' ) !== false ) {
|
1014 |
$html = '
|
1015 |
<span
|
1016 |
+
style="float:left;color:red;font-size:28px;line-height:8px;cursor:pointer"
|
1017 |
+
title="' . __( 'After changing this setting the page will be reloaded', 'wp-photo-album-plus' ) . '"><sup>*</sup>
|
|
|
|
|
|
|
|
|
|
|
|
|
1018 |
</span>';
|
1019 |
return $html;
|
1020 |
}
|
wppa-setting-see-also.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -197,15 +197,16 @@ global $wppa_subtab_names;
|
|
197 |
if ( $error ) {
|
198 |
$link .= '&wppa-error=1';
|
199 |
}
|
|
|
200 |
|
201 |
// Make the htnl
|
202 |
-
$result = '
|
203 |
-
|
204 |
href="' . $link . '"
|
205 |
-
title="' . esc_attr( 'Jump to related (sub)tab', 'wp-photo-album-plus' ) . '"
|
206 |
-
|
207 |
-
>' .
|
208 |
-
|
209 |
</a> ';
|
210 |
|
211 |
return $result;
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
+
* Version 8.1.09.002
|
7 |
*
|
8 |
*/
|
9 |
|
197 |
if ( $error ) {
|
198 |
$link .= '&wppa-error=1';
|
199 |
}
|
200 |
+
$new_tab = wppa_get( 'page' ) != 'wppa_options';
|
201 |
|
202 |
// Make the htnl
|
203 |
+
$result = ' ' . __( 'See also', 'wp-photo-album-plus' ) . ':
|
204 |
+
<a
|
205 |
href="' . $link . '"
|
206 |
+
title="' . esc_attr( 'Jump to related (sub)tab', 'wp-photo-album-plus' ) . '"' .
|
207 |
+
( $new_tab ? ' target="_blank"' : '' ) . '
|
208 |
+
style="cursor:pointer">' .
|
209 |
+
$wppa_tab_names[$tab] . ' -> ' . $wppa_subtab_names[$tab][$subtab] . '
|
210 |
</a> ';
|
211 |
|
212 |
return $result;
|
wppa-settings-autosave.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -711,7 +711,7 @@ global $wppa_subtab_names;
|
|
711 |
$desc = __('Enables photo support', 'wp-photo-album-plus' );
|
712 |
$help = __('This item can not be unchecked, this is the core feature of the plugin', 'wp-photo-album-plus' );
|
713 |
$slug = '';
|
714 |
-
$html = '<input type="checkbox" style="float:left
|
715 |
wppa_setting_new($slug, '0', $name, $desc, $html, $help);
|
716 |
|
717 |
$name = __('Enable Video', 'wp-photo-album-plus' );
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
+
* Version 8.1.09.002
|
7 |
*
|
8 |
*/
|
9 |
|
711 |
$desc = __('Enables photo support', 'wp-photo-album-plus' );
|
712 |
$help = __('This item can not be unchecked, this is the core feature of the plugin', 'wp-photo-album-plus' );
|
713 |
$slug = '';
|
714 |
+
$html = '<input type="checkbox" style="float:left" checked disabled>' . wppa_see_also( 'photos', '1' );
|
715 |
wppa_setting_new($slug, '0', $name, $desc, $html, $help);
|
716 |
|
717 |
$name = __('Enable Video', 'wp-photo-album-plus' );
|
wppa-slideshow.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* Contains all the slideshow high level functions
|
6 |
*
|
7 |
-
* Version 8.1.
|
8 |
*
|
9 |
*/
|
10 |
|
@@ -432,9 +432,9 @@ function wppa_slide_frame() {
|
|
432 |
else $pause = '';
|
433 |
|
434 |
// There are still users who turn off javascript...
|
435 |
-
wppa_out( '<noscript style="text-align:center
|
436 |
-
'<span style="color:red
|
437 |
-
__('To see the full size images, you need to enable javascript in your browser.', 'wp-photo-album-plus' ) .
|
438 |
'</span>' .
|
439 |
'</noscript>' );
|
440 |
|
@@ -1298,9 +1298,9 @@ function wppa_slide_filmstrip( $opt = '' ) {
|
|
1298 |
|
1299 |
$width = ( wppa_opt( 'film_thumbsize' ) + wppa_opt( 'tn_margin' ) ) * ( count( $thumbs ) + 2 * $preambule );
|
1300 |
$width += wppa_opt( 'tn_margin' ) + 100;
|
1301 |
-
$topmarg = wppa_opt( 'film_thumbsize' ) / 2 - 16;
|
1302 |
$height = wppa_opt( 'film_thumbsize' ) + wppa_opt( 'tn_margin' );
|
1303 |
$height1 = wppa_opt( 'film_thumbsize' );
|
|
|
1304 |
$marg = '42'; // 32
|
1305 |
$fs = '24';
|
1306 |
$fw = '42';
|
@@ -1444,7 +1444,6 @@ function wppa_startstop_icons() {
|
|
1444 |
// Create and output the html
|
1445 |
wppa_out( '<div' .
|
1446 |
' id="wppa-startstop-icon-' . wppa( 'mocc' ) . '"' .
|
1447 |
-
' alt="start stop"' .
|
1448 |
' style="' .
|
1449 |
'position:absolute;' .
|
1450 |
'left:50%;' .
|
4 |
*
|
5 |
* Contains all the slideshow high level functions
|
6 |
*
|
7 |
+
* Version 8.1.09.002
|
8 |
*
|
9 |
*/
|
10 |
|
432 |
else $pause = '';
|
433 |
|
434 |
// There are still users who turn off javascript...
|
435 |
+
wppa_out( '<noscript style="text-align:center">' .
|
436 |
+
'<span style="color:red">' .
|
437 |
+
__( 'To see the full size images, you need to enable javascript in your browser.', 'wp-photo-album-plus' ) .
|
438 |
'</span>' .
|
439 |
'</noscript>' );
|
440 |
|
1298 |
|
1299 |
$width = ( wppa_opt( 'film_thumbsize' ) + wppa_opt( 'tn_margin' ) ) * ( count( $thumbs ) + 2 * $preambule );
|
1300 |
$width += wppa_opt( 'tn_margin' ) + 100;
|
|
|
1301 |
$height = wppa_opt( 'film_thumbsize' ) + wppa_opt( 'tn_margin' );
|
1302 |
$height1 = wppa_opt( 'film_thumbsize' );
|
1303 |
+
$topmarg = $height / 2 - 12;
|
1304 |
$marg = '42'; // 32
|
1305 |
$fs = '24';
|
1306 |
$fw = '42';
|
1444 |
// Create and output the html
|
1445 |
wppa_out( '<div' .
|
1446 |
' id="wppa-startstop-icon-' . wppa( 'mocc' ) . '"' .
|
|
|
1447 |
' style="' .
|
1448 |
'position:absolute;' .
|
1449 |
'left:50%;' .
|
wppa-styles.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/* Package: wp-photo-album-plus
|
4 |
/*
|
5 |
/* Various style computation routines
|
6 |
-
/* Version 8.1.
|
7 |
/*
|
8 |
*/
|
9 |
|
@@ -209,10 +209,10 @@ function wppa_get_imgstyle_a( $id, $file, $xmax_size, $xvalign = '', $type = ''
|
|
209 |
switch ( $type ) {
|
210 |
case 'cover':
|
211 |
if ( wppa_opt( 'bcolor_img' ) != '' ) { // There is a border color given
|
212 |
-
$result['style'] .= '
|
213 |
}
|
214 |
else { // No border color: no border
|
215 |
-
$result['style'] .= '
|
216 |
}
|
217 |
if ( wppa_switch( 'coverphoto_responsive' ) ) {
|
218 |
|
@@ -225,16 +225,15 @@ function wppa_get_imgstyle_a( $id, $file, $xmax_size, $xvalign = '', $type = ''
|
|
225 |
}
|
226 |
}
|
227 |
else {
|
228 |
-
$result['style'] .= '
|
229 |
}
|
230 |
if ( wppa_switch( 'use_cover_opacity' ) && ! is_feed() ) {
|
231 |
$opac = wppa_opt( 'cover_opacity' );
|
232 |
-
$result['style'] .= '
|
233 |
-
'; filter:alpha( opacity=' . $opac . ' );';
|
234 |
}
|
235 |
if ( wppa_opt( 'coverimg_linktype' ) == 'lightbox' ) {
|
236 |
$result['cursor'] =
|
237 |
-
'
|
238 |
}
|
239 |
|
240 |
$result['style'] .= 'display:inline;';
|
@@ -248,12 +247,12 @@ function wppa_get_imgstyle_a( $id, $file, $xmax_size, $xvalign = '', $type = ''
|
|
248 |
case 'ltthumb': // Lasten widget
|
249 |
case 'albthumb': // Album widget
|
250 |
if ( $type == 'thumb' && wppa_get( 'hilite' ) && wppa_get( 'hilite' ) == $id ) {
|
251 |
-
$result['style'] .= '
|
252 |
}
|
253 |
else {
|
254 |
-
$result['style'] .= '
|
255 |
}
|
256 |
-
$result['style'] .= '
|
257 |
if ( $xvalign == 'optional' ) $valign = wppa_opt( 'valign' );
|
258 |
else $valign = $xvalign;
|
259 |
if ( $valign != 'default' ) { // Center horizontally
|
@@ -263,8 +262,7 @@ function wppa_get_imgstyle_a( $id, $file, $xmax_size, $xvalign = '', $type = ''
|
|
263 |
$delta = '0';
|
264 |
}
|
265 |
if ( $delta > '0' ) {
|
266 |
-
$result['style'] .= '
|
267 |
-
'px; margin-right:' . $delta . 'px;';
|
268 |
}
|
269 |
}
|
270 |
|
@@ -272,28 +270,27 @@ function wppa_get_imgstyle_a( $id, $file, $xmax_size, $xvalign = '', $type = ''
|
|
272 |
case 'top':
|
273 |
$delta = $max_size - $height;
|
274 |
if ( $delta < '0' ) $delta = '0';
|
275 |
-
$result['style'] .= '
|
276 |
$result['margin-bottom'] = $delta;
|
277 |
break;
|
278 |
case 'center':
|
279 |
$delta = round( ( $max_size - $height ) / 2 );
|
280 |
if ( $delta < '0' ) $delta = '0';
|
281 |
-
$result['style'] .= '
|
282 |
-
'px; margin-bottom: ' . $delta . 'px;';
|
283 |
$result['margin-top'] = $delta;
|
284 |
$result['margin-bottom'] = $delta;
|
285 |
break;
|
286 |
case 'bottom':
|
287 |
$delta = $max_size - $height;
|
288 |
if ( $delta < '0' ) $delta = '0';
|
289 |
-
$result['style'] .= '
|
290 |
$result['margin-top'] = $delta;
|
291 |
break;
|
292 |
default:
|
293 |
if ( is_numeric( $valign ) ) {
|
294 |
$delta = $valign;
|
295 |
-
$result['style'] .= '
|
296 |
-
$result['style'] .= '
|
297 |
$result['margin-top'] = $delta;
|
298 |
$result['margin-bottom'] = $delta;
|
299 |
}
|
@@ -301,7 +298,7 @@ function wppa_get_imgstyle_a( $id, $file, $xmax_size, $xvalign = '', $type = ''
|
|
301 |
if ( wppa_switch( 'use_thumb_opacity' ) && ! is_feed() ) {
|
302 |
$opac = wppa_opt( 'thumb_opacity' );
|
303 |
$result['style'] .=
|
304 |
-
'
|
305 |
}
|
306 |
|
307 |
// Cursor
|
@@ -332,15 +329,13 @@ function wppa_get_imgstyle_a( $id, $file, $xmax_size, $xvalign = '', $type = ''
|
|
332 |
break;
|
333 |
}
|
334 |
if ( $linktyp == 'none' ) {
|
335 |
-
$result['cursor'] = '
|
336 |
}
|
337 |
elseif ( $linktyp == 'lightbox' ) {
|
338 |
-
$result['cursor'] = '
|
339 |
-
// ' cursor:url(' . wppa_get_imgdir() .
|
340 |
-
// wppa_opt( 'magnifier' ) . '),pointer;';
|
341 |
}
|
342 |
else {
|
343 |
-
$result['cursor'] = '
|
344 |
}
|
345 |
|
346 |
break;
|
@@ -350,18 +345,18 @@ function wppa_get_imgstyle_a( $id, $file, $xmax_size, $xvalign = '', $type = ''
|
|
350 |
// These sizes fit within the rectangle define by Table I-B1,2
|
351 |
// times 2 for responsive themes,
|
352 |
// and are supplied for ver 4 browsers as they have undefined natural sizes.
|
353 |
-
$result['style'] .= '
|
354 |
-
$result['style'] .= '
|
355 |
}
|
356 |
else {
|
357 |
|
358 |
// These sizes fit within the rectangle define by Table I-B1,2
|
359 |
// and are supplied for ver 4 browsers as they have undefined natural sizes.
|
360 |
-
$result['style'] .= '
|
361 |
-
$result['style'] .= '
|
362 |
|
363 |
-
$result['style'] .= '
|
364 |
-
$result['style'] .= '
|
365 |
}
|
366 |
|
367 |
if ( wppa( 'is_slideonly' ) == '1' ) {
|
@@ -424,16 +419,16 @@ function wppa_get_imgstyle_a( $id, $file, $xmax_size, $xvalign = '', $type = ''
|
|
424 |
case '':
|
425 |
break;
|
426 |
case '0':
|
427 |
-
$result['style'] .= '
|
428 |
break;
|
429 |
default:
|
430 |
-
$result['style'] .= '
|
431 |
-
$result['style'] .= '
|
432 |
-
$result['style'] .= '
|
433 |
|
434 |
// If we do round corners...
|
435 |
if ( wppa_opt( 'bradius' ) > '0' ) { // then also here
|
436 |
-
$result['style'] .= '
|
437 |
wppa_opt( 'fullimage_border_width' ) . 'px;';
|
438 |
}
|
439 |
}
|
@@ -445,6 +440,7 @@ function wppa_get_imgstyle_a( $id, $file, $xmax_size, $xvalign = '', $type = ''
|
|
445 |
}
|
446 |
$result['width'] = $width;
|
447 |
$result['height'] = $height;
|
|
|
448 |
return $result;
|
449 |
}
|
450 |
|
3 |
/* Package: wp-photo-album-plus
|
4 |
/*
|
5 |
/* Various style computation routines
|
6 |
+
/* Version 8.1.09.001
|
7 |
/*
|
8 |
*/
|
9 |
|
209 |
switch ( $type ) {
|
210 |
case 'cover':
|
211 |
if ( wppa_opt( 'bcolor_img' ) != '' ) { // There is a border color given
|
212 |
+
$result['style'] .= 'border:1px solid ' . wppa_opt( 'bcolor_img' ) . ';';
|
213 |
}
|
214 |
else { // No border color: no border
|
215 |
+
$result['style'] .= 'border-width:0px;';
|
216 |
}
|
217 |
if ( wppa_switch( 'coverphoto_responsive' ) ) {
|
218 |
|
225 |
}
|
226 |
}
|
227 |
else {
|
228 |
+
$result['style'] .= 'width:' . $width . 'px;height:' . $height . 'px;';
|
229 |
}
|
230 |
if ( wppa_switch( 'use_cover_opacity' ) && ! is_feed() ) {
|
231 |
$opac = wppa_opt( 'cover_opacity' );
|
232 |
+
$result['style'] .= 'opacity:' . $opac/100 . ';';
|
|
|
233 |
}
|
234 |
if ( wppa_opt( 'coverimg_linktype' ) == 'lightbox' ) {
|
235 |
$result['cursor'] =
|
236 |
+
'cursor:' . wppa_wait() . ';';
|
237 |
}
|
238 |
|
239 |
$result['style'] .= 'display:inline;';
|
247 |
case 'ltthumb': // Lasten widget
|
248 |
case 'albthumb': // Album widget
|
249 |
if ( $type == 'thumb' && wppa_get( 'hilite' ) && wppa_get( 'hilite' ) == $id ) {
|
250 |
+
$result['style'] .= 'border:3px solid orange;box-sizing:border-box;';
|
251 |
}
|
252 |
else {
|
253 |
+
$result['style'] .= 'border-width:0px;';
|
254 |
}
|
255 |
+
$result['style'] .= 'width:' . $width . 'px;height:' . $height . 'px;';
|
256 |
if ( $xvalign == 'optional' ) $valign = wppa_opt( 'valign' );
|
257 |
else $valign = $xvalign;
|
258 |
if ( $valign != 'default' ) { // Center horizontally
|
262 |
$delta = '0';
|
263 |
}
|
264 |
if ( $delta > '0' ) {
|
265 |
+
$result['style'] .= 'margin-left:' . $delta . 'px;margin-right:' . $delta . 'px;';
|
|
|
266 |
}
|
267 |
}
|
268 |
|
270 |
case 'top':
|
271 |
$delta = $max_size - $height;
|
272 |
if ( $delta < '0' ) $delta = '0';
|
273 |
+
$result['style'] .= 'margin-bottom: ' . $delta . 'px;';
|
274 |
$result['margin-bottom'] = $delta;
|
275 |
break;
|
276 |
case 'center':
|
277 |
$delta = round( ( $max_size - $height ) / 2 );
|
278 |
if ( $delta < '0' ) $delta = '0';
|
279 |
+
$result['style'] .= 'margin-top: ' . $delta . 'px;margin-bottom:' . $delta . 'px;';
|
|
|
280 |
$result['margin-top'] = $delta;
|
281 |
$result['margin-bottom'] = $delta;
|
282 |
break;
|
283 |
case 'bottom':
|
284 |
$delta = $max_size - $height;
|
285 |
if ( $delta < '0' ) $delta = '0';
|
286 |
+
$result['style'] .= 'margin-top: ' . $delta . 'px;';
|
287 |
$result['margin-top'] = $delta;
|
288 |
break;
|
289 |
default:
|
290 |
if ( is_numeric( $valign ) ) {
|
291 |
$delta = $valign;
|
292 |
+
$result['style'] .= 'margin-top: ' . $delta . 'px;';
|
293 |
+
$result['style'] .= 'margin-bottom: ' . $delta . 'px;';
|
294 |
$result['margin-top'] = $delta;
|
295 |
$result['margin-bottom'] = $delta;
|
296 |
}
|
298 |
if ( wppa_switch( 'use_thumb_opacity' ) && ! is_feed() ) {
|
299 |
$opac = wppa_opt( 'thumb_opacity' );
|
300 |
$result['style'] .=
|
301 |
+
'opacity:' . $opac/100 . ';';
|
302 |
}
|
303 |
|
304 |
// Cursor
|
329 |
break;
|
330 |
}
|
331 |
if ( $linktyp == 'none' ) {
|
332 |
+
$result['cursor'] = 'cursor:default;';
|
333 |
}
|
334 |
elseif ( $linktyp == 'lightbox' ) {
|
335 |
+
// $result['cursor'] = 'cursor:wait;';
|
|
|
|
|
336 |
}
|
337 |
else {
|
338 |
+
$result['cursor'] = 'cursor:pointer;';
|
339 |
}
|
340 |
|
341 |
break;
|
345 |
// These sizes fit within the rectangle define by Table I-B1,2
|
346 |
// times 2 for responsive themes,
|
347 |
// and are supplied for ver 4 browsers as they have undefined natural sizes.
|
348 |
+
$result['style'] .= 'max-width:' . ( $width * 2 ) . 'px;';
|
349 |
+
$result['style'] .= 'max-height:' . ( $height * 2 ) . 'px;';
|
350 |
}
|
351 |
else {
|
352 |
|
353 |
// These sizes fit within the rectangle define by Table I-B1,2
|
354 |
// and are supplied for ver 4 browsers as they have undefined natural sizes.
|
355 |
+
$result['style'] .= 'max-width:' . $width . 'px;';
|
356 |
+
$result['style'] .= 'max-height:' . $height . 'px;';
|
357 |
|
358 |
+
$result['style'] .= 'width:' . $width . 'px;';
|
359 |
+
$result['style'] .= 'height:' . $height . 'px;';
|
360 |
}
|
361 |
|
362 |
if ( wppa( 'is_slideonly' ) == '1' ) {
|
419 |
case '':
|
420 |
break;
|
421 |
case '0':
|
422 |
+
$result['style'] .= 'border:1px solid ' . wppa_opt( 'bcolor_fullimg' ) . ';';
|
423 |
break;
|
424 |
default:
|
425 |
+
$result['style'] .= 'border: 1px solid ' . wppa_opt( 'bcolor_fullimg' ) . ';';
|
426 |
+
$result['style'] .= 'background-color:' . wppa_opt( 'bgcolor_fullimg' ) . ';';
|
427 |
+
$result['style'] .= 'padding:' . wppa_opt( 'fullimage_border_width' ) . 'px;';
|
428 |
|
429 |
// If we do round corners...
|
430 |
if ( wppa_opt( 'bradius' ) > '0' ) { // then also here
|
431 |
+
$result['style'] .= 'border-radius:' .
|
432 |
wppa_opt( 'fullimage_border_width' ) . 'px;';
|
433 |
}
|
434 |
}
|
440 |
}
|
441 |
$result['width'] = $width;
|
442 |
$result['height'] = $height;
|
443 |
+
// $result['style'] = rtrim( $result['style'], ';' );
|
444 |
return $result;
|
445 |
}
|
446 |
|
wppa-thumbnails.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Various funcions to display a thumbnail image
|
6 |
* Contains all possible frontend thumbnail types
|
7 |
*
|
8 |
-
* Version 8.1.
|
9 |
*
|
10 |
*/
|
11 |
|
@@ -263,9 +263,7 @@ global $wpdb;
|
|
263 |
( wppa_lazy() ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
|
264 |
$imgalt .
|
265 |
( $title ? ' title="' . $title . '"' : '' ) . '
|
266 |
-
|
267 |
-
height="' . $imgheight . '"
|
268 |
-
style="' . $imgstyle . ' cursor:pointer;"' .
|
269 |
$events . '
|
270 |
/>';
|
271 |
}
|
@@ -360,10 +358,8 @@ global $wpdb;
|
|
360 |
' id="i-' . $xid . '-' . $mocc . '"' .
|
361 |
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
|
362 |
' ' . $imgalt .
|
363 |
-
( $title ? ' title="' . $title . '"' : '' ) .
|
364 |
-
|
365 |
-
' height="' . $imgheight . '"' .
|
366 |
-
' style="' . $imgstyle . $cursor . '"' .
|
367 |
' ' . $events .
|
368 |
' />';
|
369 |
}
|
@@ -399,8 +395,6 @@ global $wpdb;
|
|
399 |
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
|
400 |
' ' . $imgalt .
|
401 |
( $title ? ' title="' . $title . '"' : '' ) .
|
402 |
-
' width="' . $imgwidth . '"' .
|
403 |
-
' height="' . $imgheight . '"' .
|
404 |
' style="' . $imgstyle . ' cursor:pointer;"' .
|
405 |
' ' . $events .
|
406 |
' />';
|
@@ -437,8 +431,6 @@ global $wpdb;
|
|
437 |
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
|
438 |
' ' . $imgalt .
|
439 |
( $title ? ' title="' . $title . '"' : '' ) .
|
440 |
-
' width="' . $imgwidth . '"' .
|
441 |
-
' height="' . $imgheight . '"' .
|
442 |
' style="' . $imgstyle . '"' .
|
443 |
' ' . $events .
|
444 |
' />';
|
@@ -470,8 +462,6 @@ global $wpdb;
|
|
470 |
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
|
471 |
' ' . $imgalt .
|
472 |
( $title ? ' title="' . $title . '"' : '' ) .
|
473 |
-
' width="' . $imgwidth . '"' .
|
474 |
-
' height="' . $imgheight . '"' .
|
475 |
' style="' . $imgstyle . '"' .
|
476 |
' ' . $events . ' />';
|
477 |
}
|
@@ -1022,8 +1012,6 @@ function wppa_the_thumbascoverphoto( $id, $src, $photo_left, $link, $imgattr_a,
|
|
1022 |
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $src . '"' .
|
1023 |
' ' . wppa_get_imgalt( $id ) .
|
1024 |
' class="image wppa-img"' .
|
1025 |
-
' width="' . $imgwidth . '"' .
|
1026 |
-
' height="' . $imgheight . '"' .
|
1027 |
' style="' . $imgattr . $cursor . '"' .
|
1028 |
' ' . $events .
|
1029 |
' />';
|
@@ -1061,8 +1049,6 @@ function wppa_the_thumbascoverphoto( $id, $src, $photo_left, $link, $imgattr_a,
|
|
1061 |
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $src . '"' .
|
1062 |
' ' . wppa_get_imgalt( $id ) .
|
1063 |
' class="image wppa-img"' .
|
1064 |
-
' width="' . $imgwidth . '"' .
|
1065 |
-
' height="' . $imgheight . '"' .
|
1066 |
' style="' . $imgattr . '"' .
|
1067 |
' ' . $events .
|
1068 |
' />';
|
@@ -1094,8 +1080,6 @@ function wppa_the_thumbascoverphoto( $id, $src, $photo_left, $link, $imgattr_a,
|
|
1094 |
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $src . '"' .
|
1095 |
' ' . wppa_get_imgalt( $id ) .
|
1096 |
' class="image wppa-img"' .
|
1097 |
-
' width="' . $imgwidth . '"' .
|
1098 |
-
' height="' . $imgheight . '"' .
|
1099 |
' style="' . $imgattr . '"' .
|
1100 |
' ' . $events .
|
1101 |
' onclick="' . $href . '"' .
|
@@ -1641,7 +1625,7 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
|
|
1641 |
// Open container if an image must be displayed
|
1642 |
if ( $display == 'thumbs' ) {
|
1643 |
$size = max( $imgstyle_a['width'], $imgstyle_a['height'] );
|
1644 |
-
$result .= '<div style="width:' . strval( intval( $size ) ) . 'px;
|
1645 |
}
|
1646 |
|
1647 |
// The medals if on top
|
@@ -1672,16 +1656,15 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
|
|
1672 |
) );
|
1673 |
}
|
1674 |
else {
|
1675 |
-
$result .= '
|
1676 |
-
|
1677 |
-
|
1678 |
-
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
' />';
|
1685 |
}
|
1686 |
}
|
1687 |
else {
|
5 |
* Various funcions to display a thumbnail image
|
6 |
* Contains all possible frontend thumbnail types
|
7 |
*
|
8 |
+
* Version 8.1.09.001
|
9 |
*
|
10 |
*/
|
11 |
|
263 |
( wppa_lazy() ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
|
264 |
$imgalt .
|
265 |
( $title ? ' title="' . $title . '"' : '' ) . '
|
266 |
+
style="' . $imgstyle . 'cursor:pointer"' .
|
|
|
|
|
267 |
$events . '
|
268 |
/>';
|
269 |
}
|
358 |
' id="i-' . $xid . '-' . $mocc . '"' .
|
359 |
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
|
360 |
' ' . $imgalt .
|
361 |
+
( $title ? ' title="' . $title . '"' : '' ) . '
|
362 |
+
style="' . $imgstyle . $cursor . '"' .
|
|
|
|
|
363 |
' ' . $events .
|
364 |
' />';
|
365 |
}
|
395 |
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
|
396 |
' ' . $imgalt .
|
397 |
( $title ? ' title="' . $title . '"' : '' ) .
|
|
|
|
|
398 |
' style="' . $imgstyle . ' cursor:pointer;"' .
|
399 |
' ' . $events .
|
400 |
' />';
|
431 |
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
|
432 |
' ' . $imgalt .
|
433 |
( $title ? ' title="' . $title . '"' : '' ) .
|
|
|
|
|
434 |
' style="' . $imgstyle . '"' .
|
435 |
' ' . $events .
|
436 |
' />';
|
462 |
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
|
463 |
' ' . $imgalt .
|
464 |
( $title ? ' title="' . $title . '"' : '' ) .
|
|
|
|
|
465 |
' style="' . $imgstyle . '"' .
|
466 |
' ' . $events . ' />';
|
467 |
}
|
1012 |
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $src . '"' .
|
1013 |
' ' . wppa_get_imgalt( $id ) .
|
1014 |
' class="image wppa-img"' .
|
|
|
|
|
1015 |
' style="' . $imgattr . $cursor . '"' .
|
1016 |
' ' . $events .
|
1017 |
' />';
|
1049 |
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $src . '"' .
|
1050 |
' ' . wppa_get_imgalt( $id ) .
|
1051 |
' class="image wppa-img"' .
|
|
|
|
|
1052 |
' style="' . $imgattr . '"' .
|
1053 |
' ' . $events .
|
1054 |
' />';
|
1080 |
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . $src . '"' .
|
1081 |
' ' . wppa_get_imgalt( $id ) .
|
1082 |
' class="image wppa-img"' .
|
|
|
|
|
1083 |
' style="' . $imgattr . '"' .
|
1084 |
' ' . $events .
|
1085 |
' onclick="' . $href . '"' .
|
1625 |
// Open container if an image must be displayed
|
1626 |
if ( $display == 'thumbs' ) {
|
1627 |
$size = max( $imgstyle_a['width'], $imgstyle_a['height'] );
|
1628 |
+
$result .= '<div style="width:' . strval( intval( $size ) ) . 'px;height:' . strval( intval( $size ) ) . 'px;overflow:hidden">';
|
1629 |
}
|
1630 |
|
1631 |
// The medals if on top
|
1656 |
) );
|
1657 |
}
|
1658 |
else {
|
1659 |
+
$result .= '
|
1660 |
+
<img
|
1661 |
+
id="i-' . $xid . '-' . $mocc . '" ' .
|
1662 |
+
( $title ? ' title="' . esc_attr( $title ) . '" ' : '' ) .
|
1663 |
+
( wppa_lazy() ? 'data-' : '' ) . 'src="' . esc_url( $imgurl ) . '"
|
1664 |
+
style="' . $imgstyle_a['style'] . ' cursor:pointer;" ' .
|
1665 |
+
$imgevents . ' ' .
|
1666 |
+
wppa_get_imgalt( $id ) . '
|
1667 |
+
>';
|
|
|
1668 |
}
|
1669 |
}
|
1670 |
else {
|
wppa-tinymce-common.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-tinymce-common.php
|
3 |
* Pachkage: wp-photo-album-plus
|
4 |
*
|
5 |
-
* Version 8.1.
|
6 |
*
|
7 |
*/
|
8 |
|
@@ -160,7 +160,7 @@ global $wpdb;
|
|
160 |
' style="clear:both;width:70%;border-color:#777;height:18px;border:1px solid;padding:1px;border-radius:3px;line-height: 18px;text-align: center;"' .
|
161 |
' >' .
|
162 |
'<div id="bar" class="wppa-bar" ></div>' .
|
163 |
-
'<div id="percent" class="wppa-percent" >0%</div
|
164 |
'</div>' .
|
165 |
'<div id="message" class="wppa-message" ></div>' .
|
166 |
|
2 |
/* wppa-tinymce-common.php
|
3 |
* Pachkage: wp-photo-album-plus
|
4 |
*
|
5 |
+
* Version 8.1.09.001
|
6 |
*
|
7 |
*/
|
8 |
|
160 |
' style="clear:both;width:70%;border-color:#777;height:18px;border:1px solid;padding:1px;border-radius:3px;line-height: 18px;text-align: center;"' .
|
161 |
' >' .
|
162 |
'<div id="bar" class="wppa-bar" ></div>' .
|
163 |
+
'<div id="percent" class="wppa-percent" >0%</div>' .
|
164 |
'</div>' .
|
165 |
'<div id="message" class="wppa-message" ></div>' .
|
166 |
|
wppa-utils.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains low-level utility routines
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -3622,8 +3622,6 @@ $border = false; // debug
|
|
3622 |
$result = '
|
3623 |
<svg
|
3624 |
version="1.1"
|
3625 |
-
xmlns="http://www.w3.org/2000/svg"
|
3626 |
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
3627 |
x="0px"
|
3628 |
y="0px"
|
3629 |
viewBox="0 0 30 30"
|
@@ -3632,10 +3630,9 @@ $border = false; // debug
|
|
3632 |
fill:' . $fillcolor . ';
|
3633 |
background-color:' . $bgcolor . ';
|
3634 |
text-decoration:none !important;
|
3635 |
-
vertical-align:middle
|
3636 |
-
( $bradius ? 'border-radius:' . $bradius . '
|
3637 |
-
( $border ? 'border:2px solid ' . $bgcolor . ';box-sizing:content-box
|
3638 |
-
"
|
3639 |
xml:space="preserve"
|
3640 |
>';
|
3641 |
|
@@ -4043,7 +4040,7 @@ function wppa_get_spinner_svg_html( $xargs = array() ) {
|
|
4043 |
'id' => 'wppa-spinner',
|
4044 |
'class' => 'wppa-spinner',
|
4045 |
'size' => '120',
|
4046 |
-
'position' => '
|
4047 |
'lightbox' => false,
|
4048 |
'display' => 'none',
|
4049 |
'left' => '50%',
|
@@ -4144,7 +4141,6 @@ function wppa_get_spinner_svg_html( $xargs = array() ) {
|
|
4144 |
' class="' . $args['class'] . ' uil-default"' .
|
4145 |
' width="' . $width . 'px"' .
|
4146 |
' height="' . $height . 'px"' .
|
4147 |
-
' xmlns="http://www.w3.org/2000/svg"' .
|
4148 |
' viewBox="' . $viewbox . '"' .
|
4149 |
' preserveAspectRatio="xMidYMid"' .
|
4150 |
' stroke="' . $stcol . '"' .
|
@@ -4156,13 +4152,11 @@ function wppa_get_spinner_svg_html( $xargs = array() ) {
|
|
4156 |
'margin-top:-' . $args['margin'] . 'px;' .
|
4157 |
'left:' . $args['left'] . ';' .
|
4158 |
'margin-left:-' . $args['margin'] . 'px;' .
|
4159 |
-
'z-index:200100;' .
|
4160 |
'opacity:1;' .
|
4161 |
'display:' . $args['display'] . ';' .
|
4162 |
'fill:' . $fgcol . ';' .
|
4163 |
'background-color:' . $bgcol . ';' .
|
4164 |
-
'
|
4165 |
-
'border-radius:' . $bradius .'px;' .
|
4166 |
'"' .
|
4167 |
' >';
|
4168 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains low-level utility routines
|
6 |
+
* Version 8.1.09.001
|
7 |
*
|
8 |
*/
|
9 |
|
3622 |
$result = '
|
3623 |
<svg
|
3624 |
version="1.1"
|
|
|
|
|
3625 |
x="0px"
|
3626 |
y="0px"
|
3627 |
viewBox="0 0 30 30"
|
3630 |
fill:' . $fillcolor . ';
|
3631 |
background-color:' . $bgcolor . ';
|
3632 |
text-decoration:none !important;
|
3633 |
+
vertical-align:middle' .
|
3634 |
+
( $bradius ? ';border-radius:' . $bradius . '%' : '' ) .
|
3635 |
+
( $border ? ';border:2px solid ' . $bgcolor . ';box-sizing:content-box' : '' ) . '"
|
|
|
3636 |
xml:space="preserve"
|
3637 |
>';
|
3638 |
|
4040 |
'id' => 'wppa-spinner',
|
4041 |
'class' => 'wppa-spinner',
|
4042 |
'size' => '120',
|
4043 |
+
'position' => 'absolute',
|
4044 |
'lightbox' => false,
|
4045 |
'display' => 'none',
|
4046 |
'left' => '50%',
|
4141 |
' class="' . $args['class'] . ' uil-default"' .
|
4142 |
' width="' . $width . 'px"' .
|
4143 |
' height="' . $height . 'px"' .
|
|
|
4144 |
' viewBox="' . $viewbox . '"' .
|
4145 |
' preserveAspectRatio="xMidYMid"' .
|
4146 |
' stroke="' . $stcol . '"' .
|
4152 |
'margin-top:-' . $args['margin'] . 'px;' .
|
4153 |
'left:' . $args['left'] . ';' .
|
4154 |
'margin-left:-' . $args['margin'] . 'px;' .
|
|
|
4155 |
'opacity:1;' .
|
4156 |
'display:' . $args['display'] . ';' .
|
4157 |
'fill:' . $fgcol . ';' .
|
4158 |
'background-color:' . $bgcol . ';' .
|
4159 |
+
'border-radius:' . $bradius .'px' .
|
|
|
4160 |
'"' .
|
4161 |
' >';
|
4162 |
|
wppa-wpdb-update.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains low-level wpdb routines that update records
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains low-level wpdb routines that update records
|
6 |
+
* Version 8.1.09.001
|
7 |
*
|
8 |
*/
|
9 |
|
wppa-wrappers.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Contains wrappers for standard php functions
|
6 |
* For security and bug reasons
|
7 |
*
|
8 |
-
* Version 8.1.
|
9 |
*
|
10 |
*/
|
11 |
|
@@ -724,186 +724,205 @@ function wppa_echo( $html, $a_tags = false, $a_prot = false, $return = false ) {
|
|
724 |
static $allowed_tags;
|
725 |
|
726 |
if ( ! is_array( $allowed_tags ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
727 |
$allowed_tags =
|
728 |
array(
|
729 |
-
'a' => array(
|
730 |
'href' => true,
|
731 |
'target' => true,
|
732 |
-
'title' => true,
|
733 |
-
'id' => true,
|
734 |
'onclick' => true,
|
735 |
-
'style' => true,
|
736 |
'data-rel' => true,
|
737 |
-
'
|
738 |
-
'
|
739 |
-
|
740 |
-
|
741 |
-
'
|
742 |
-
|
743 |
-
|
744 |
-
'audio' => array(
|
745 |
-
'id' => true,
|
746 |
'data-from' => true,
|
747 |
'controls' => true,
|
748 |
-
'style' => true,
|
749 |
'preload' => true,
|
750 |
'type' => true,
|
751 |
-
),
|
752 |
-
'b' =>
|
753 |
-
'br' =>
|
754 |
-
'div' =>
|
755 |
-
|
756 |
-
|
757 |
-
'style' => true,
|
758 |
-
'touch-action' => true,
|
759 |
-
'onclick' => true,
|
760 |
-
),
|
761 |
-
'em' => array(),
|
762 |
-
'form' => array(
|
763 |
-
'id' => true,
|
764 |
-
'class' => true,
|
765 |
'onsubmit' => true,
|
766 |
-
'name' => true,
|
767 |
'action' => true,
|
768 |
'method' => true,
|
769 |
'enctype' => true,
|
770 |
-
),
|
771 |
-
'h1' =>
|
772 |
-
'h2' =>
|
773 |
-
'h3' =>
|
774 |
-
'h4' =>
|
775 |
-
'h5' =>
|
776 |
-
'h6' =>
|
777 |
-
'i' =>
|
778 |
-
'img' => array(
|
779 |
-
'id' => true,
|
780 |
'alt' => true,
|
781 |
'src' => true,
|
782 |
'data-src' => true,
|
783 |
-
'style' => true,
|
784 |
'placeholder' => true,
|
785 |
'srcset' => true,
|
786 |
'onload' => true,
|
787 |
-
|
788 |
-
|
789 |
-
'onclick' => true,
|
790 |
-
),
|
791 |
-
'input' => array(
|
792 |
-
'id' => true,
|
793 |
'type' => true,
|
794 |
'value' => true,
|
795 |
-
'onclick' => true,
|
796 |
-
'id' => true,
|
797 |
-
'style' => true,
|
798 |
-
'class' => true,
|
799 |
-
'title' => true,
|
800 |
'onchange' => true,
|
801 |
-
'name' => true,
|
802 |
'checked' => true,
|
803 |
'min' => true,
|
804 |
'multiple' => true,
|
805 |
'onkeyup' => true,
|
806 |
-
|
|
|
|
|
807 |
'label' => array(
|
808 |
'for' => true,
|
809 |
),
|
810 |
-
'
|
811 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
812 |
'selected' =>true,
|
813 |
'value' => true,
|
814 |
-
'title' => true,
|
815 |
'disabled' => true,
|
816 |
-
),
|
817 |
-
'p' =>
|
818 |
-
'select' => array(
|
819 |
-
'id' => true,
|
820 |
'onchange' => true,
|
821 |
-
'title' => true,
|
822 |
-
'style' => true,
|
823 |
-
'name' => true,
|
824 |
-
'class' => true,
|
825 |
'value' => true,
|
826 |
'multiple' => true,
|
827 |
'onwheel' => true,
|
828 |
'onscroll' => true,
|
829 |
'onfocus' => true,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
830 |
),
|
831 |
-
'
|
832 |
-
'
|
833 |
),
|
834 |
-
'
|
835 |
-
'
|
836 |
-
'
|
|
|
|
|
|
|
|
|
|
|
837 |
'class' => true,
|
838 |
-
'
|
839 |
),
|
840 |
-
'
|
841 |
-
|
842 |
-
'
|
843 |
-
'
|
844 |
-
'
|
|
|
|
|
|
|
|
|
|
|
845 |
),
|
846 |
-
'
|
847 |
-
|
848 |
-
|
849 |
-
'
|
|
|
|
|
|
|
850 |
),
|
851 |
-
'
|
852 |
-
'
|
853 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
854 |
'onchange' => true,
|
855 |
-
|
856 |
-
|
857 |
-
'
|
858 |
-
|
859 |
-
|
860 |
-
'tfoot' => array(
|
861 |
-
'style' => true,
|
862 |
-
),
|
863 |
-
'tr' => array(
|
864 |
-
'id' => true,
|
865 |
-
'style' => true,
|
866 |
-
'class' => true,
|
867 |
-
),
|
868 |
-
'td' => array(
|
869 |
-
'id' => true,
|
870 |
-
'style' => true,
|
871 |
-
'class' => true,
|
872 |
'colspan' => true,
|
873 |
-
),
|
874 |
-
'th' =>
|
875 |
-
|
876 |
-
|
877 |
-
'class' => true,
|
878 |
-
),
|
879 |
-
'title' => array(),
|
880 |
-
'video' => array(
|
881 |
-
'id' => true,
|
882 |
'preload' => true,
|
883 |
-
'style' => true,
|
884 |
'type' => true,
|
885 |
'controls' => true,
|
886 |
'onmouseover' => true,
|
887 |
'onmouseout' => true,
|
888 |
-
),
|
889 |
'source' => array(
|
890 |
'src' => true,
|
891 |
'type' => true,
|
892 |
),
|
893 |
-
'ul' =>
|
894 |
-
|
895 |
-
|
896 |
-
),
|
897 |
-
'ol' => array(
|
898 |
-
'style' => true,
|
899 |
-
'class' => true,
|
900 |
-
),
|
901 |
-
'li' => array(
|
902 |
-
'style' => true,
|
903 |
-
'class' => true,
|
904 |
-
'id' => true,
|
905 |
-
'onclick' => true,
|
906 |
-
),
|
907 |
);
|
908 |
}
|
909 |
|
@@ -911,30 +930,66 @@ static $allowed_tags;
|
|
911 |
$p = $a_prot ? $a_prot : wp_allowed_protocols();
|
912 |
|
913 |
/* Start debugging */
|
914 |
-
$before =
|
915 |
-
$
|
916 |
-
$
|
|
|
|
|
917 |
if ( $before != $after ) {
|
918 |
-
|
919 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
920 |
}
|
921 |
/* End debugging */
|
922 |
|
923 |
if ( $return ) {
|
924 |
return wp_kses( $html, $t, $p );
|
925 |
-
// return $html;
|
926 |
}
|
927 |
else {
|
928 |
echo wp_kses( $html, $t, $p );
|
929 |
-
// echo $html;
|
930 |
}
|
931 |
-
|
932 |
}
|
|
|
933 |
add_filter( 'safe_style_css', function( $styles ) {
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
938 |
} );
|
939 |
|
940 |
function wppa_add_inline_script( $where, $script ) {
|
5 |
* Contains wrappers for standard php functions
|
6 |
* For security and bug reasons
|
7 |
*
|
8 |
+
* Version 8.1.09.002
|
9 |
*
|
10 |
*/
|
11 |
|
724 |
static $allowed_tags;
|
725 |
|
726 |
if ( ! is_array( $allowed_tags ) ) {
|
727 |
+
|
728 |
+
// Standard allowed attributes
|
729 |
+
$sa = array(
|
730 |
+
'id' => true,
|
731 |
+
'name' => true,
|
732 |
+
'title' => true,
|
733 |
+
'class' => true,
|
734 |
+
'style' => true,
|
735 |
+
'onclick' => true,
|
736 |
+
'onmouseover' => true,
|
737 |
+
'onmouseout' => true,
|
738 |
+
'onwheel' => true,
|
739 |
+
'onscroll' => true,
|
740 |
+
'data-wppa' => true,
|
741 |
+
'data-alt' => true,
|
742 |
+
'ontouchstart' => true,
|
743 |
+
'ontouchend' => true,
|
744 |
+
);
|
745 |
+
|
746 |
$allowed_tags =
|
747 |
array(
|
748 |
+
'a' => array_merge( $sa, array(
|
749 |
'href' => true,
|
750 |
'target' => true,
|
|
|
|
|
751 |
'onclick' => true,
|
|
|
752 |
'data-rel' => true,
|
753 |
+
'data-id' => true,
|
754 |
+
'data-lbtitle' => true,
|
755 |
+
'data-panorama' => true,
|
756 |
+
'data-pantype' => true,
|
757 |
+
'box-sizing' => true,
|
758 |
+
) ),
|
759 |
+
'aside' => $sa,
|
760 |
+
'audio' => array_merge( $sa, array(
|
|
|
761 |
'data-from' => true,
|
762 |
'controls' => true,
|
|
|
763 |
'preload' => true,
|
764 |
'type' => true,
|
765 |
+
) ),
|
766 |
+
'b' => $sa,
|
767 |
+
'br' => $sa,
|
768 |
+
'div' => $sa,
|
769 |
+
'em' => $sa,
|
770 |
+
'form' => array_merge( $sa, array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
771 |
'onsubmit' => true,
|
|
|
772 |
'action' => true,
|
773 |
'method' => true,
|
774 |
'enctype' => true,
|
775 |
+
) ),
|
776 |
+
'h1' => $sa,
|
777 |
+
'h2' => $sa,
|
778 |
+
'h3' => $sa,
|
779 |
+
'h4' => $sa,
|
780 |
+
'h5' => $sa,
|
781 |
+
'h6' => $sa,
|
782 |
+
'i' => $sa,
|
783 |
+
'img' => array_merge( $sa, array(
|
|
|
784 |
'alt' => true,
|
785 |
'src' => true,
|
786 |
'data-src' => true,
|
|
|
787 |
'placeholder' => true,
|
788 |
'srcset' => true,
|
789 |
'onload' => true,
|
790 |
+
) ),
|
791 |
+
'input' => array_merge( $sa, array(
|
|
|
|
|
|
|
|
|
792 |
'type' => true,
|
793 |
'value' => true,
|
|
|
|
|
|
|
|
|
|
|
794 |
'onchange' => true,
|
|
|
795 |
'checked' => true,
|
796 |
'min' => true,
|
797 |
'multiple' => true,
|
798 |
'onkeyup' => true,
|
799 |
+
'disabled' => true,
|
800 |
+
'accept' => true,
|
801 |
+
) ),
|
802 |
'label' => array(
|
803 |
'for' => true,
|
804 |
),
|
805 |
+
'link' => array(
|
806 |
+
'rel' => true,
|
807 |
+
'href' => true,
|
808 |
+
),
|
809 |
+
'meta' => array(
|
810 |
+
'name' => true,
|
811 |
+
'content' => true,
|
812 |
+
'property' => true,
|
813 |
+
),
|
814 |
+
'noscript' => array_merge( $sa, array(
|
815 |
+
'style' => true,
|
816 |
+
) ),
|
817 |
+
'option' => array_merge( $sa, array(
|
818 |
'selected' =>true,
|
819 |
'value' => true,
|
|
|
820 |
'disabled' => true,
|
821 |
+
) ),
|
822 |
+
'p' => $sa,
|
823 |
+
'select' => array_merge( $sa, array(
|
|
|
824 |
'onchange' => true,
|
|
|
|
|
|
|
|
|
825 |
'value' => true,
|
826 |
'multiple' => true,
|
827 |
'onwheel' => true,
|
828 |
'onscroll' => true,
|
829 |
'onfocus' => true,
|
830 |
+
) ),
|
831 |
+
'small' => $sa,
|
832 |
+
'span' => $sa,
|
833 |
+
'strong' => $sa,
|
834 |
+
'sup' => array(),
|
835 |
+
|
836 |
+
// Start svg
|
837 |
+
'svg' => array_merge( $sa, array(
|
838 |
+
'width' => true,
|
839 |
+
'height' => true,
|
840 |
+
'x' => true,
|
841 |
+
'y' => true,
|
842 |
+
'viewbox' => true,
|
843 |
+
'xml:space' => true,
|
844 |
+
'xmlns' => true,
|
845 |
+
'preserveaspectratio' => true,
|
846 |
+
'stroke' => true,
|
847 |
+
'version' => true,
|
848 |
+
) ),
|
849 |
+
'g' => array(
|
850 |
+
'transform' => true,
|
851 |
+
'fill' => true,
|
852 |
+
'fill-rule' => true,
|
853 |
+
'stroke-width' => true,
|
854 |
),
|
855 |
+
'path' => array(
|
856 |
+
'd' => true,
|
857 |
),
|
858 |
+
'rect' => array(
|
859 |
+
'width' => true,
|
860 |
+
'height'=> true,
|
861 |
+
'rx' => true,
|
862 |
+
'ry' => true,
|
863 |
+
'x' => true,
|
864 |
+
'y' => true,
|
865 |
+
'fill' => true,
|
866 |
'class' => true,
|
867 |
+
'transform' => true,
|
868 |
),
|
869 |
+
'animate' => array(
|
870 |
+
'attributename' => true,
|
871 |
+
'begin' => true,
|
872 |
+
'from' => true,
|
873 |
+
'to' => true,
|
874 |
+
'dur' => true,
|
875 |
+
'values' => true,
|
876 |
+
'repeatcount' => true,
|
877 |
+
'calcmode' => true,
|
878 |
+
'opacity' => true,
|
879 |
),
|
880 |
+
'animatetransform' => array(
|
881 |
+
'attributename' => true,
|
882 |
+
'type' => true,
|
883 |
+
'from' => true,
|
884 |
+
'to' => true,
|
885 |
+
'dur' => true,
|
886 |
+
'repeatcount' => true,
|
887 |
),
|
888 |
+
'circle' => array(
|
889 |
+
'cx' => true,
|
890 |
+
'cy' => true,
|
891 |
+
'r' => true,
|
892 |
+
'stroke-opacity' => true,
|
893 |
+
),
|
894 |
+
|
895 |
+
// End svg
|
896 |
+
|
897 |
+
'table' => $sa,
|
898 |
+
'tbody' => $sa,
|
899 |
+
'colgroup' => $sa,
|
900 |
+
'col' => $sa,
|
901 |
+
'textarea' => array_merge( $sa, array(
|
902 |
'onchange' => true,
|
903 |
+
) ),
|
904 |
+
'thead' => $sa,
|
905 |
+
'tfoot' => $sa,
|
906 |
+
'tr' => $sa,
|
907 |
+
'td' => array_merge( $sa, array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
908 |
'colspan' => true,
|
909 |
+
) ),
|
910 |
+
'th' => $sa,
|
911 |
+
'title' => $sa,
|
912 |
+
'video' => array_merge( $sa, array(
|
|
|
|
|
|
|
|
|
|
|
913 |
'preload' => true,
|
|
|
914 |
'type' => true,
|
915 |
'controls' => true,
|
916 |
'onmouseover' => true,
|
917 |
'onmouseout' => true,
|
918 |
+
) ),
|
919 |
'source' => array(
|
920 |
'src' => true,
|
921 |
'type' => true,
|
922 |
),
|
923 |
+
'ul' => $sa,
|
924 |
+
'ol' => $sa,
|
925 |
+
'li' => $sa,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
926 |
);
|
927 |
}
|
928 |
|
930 |
$p = $a_prot ? $a_prot : wp_allowed_protocols();
|
931 |
|
932 |
/* Start debugging */
|
933 |
+
$before = wppa_compress_html( $html );
|
934 |
+
$before = str_replace( ['" >',';"','; ', '&', 'style=" ', '"/>', ' style=""', ';;'], ['">','"',';', '&', 'style="', '" />', '', ';'], $before );
|
935 |
+
// $before = str_replace( ['" >',';"','; ', '&', 'style=" ', '"/>'], ['">','"',';', '&', 'style="', '" />'], $before );
|
936 |
+
$after = wp_kses( $before, $t, $p );
|
937 |
+
$after = str_replace( ['&'], ['&'], $after );
|
938 |
if ( $before != $after ) {
|
939 |
+
$found = true;
|
940 |
+
while ( $found ) {
|
941 |
+
$taglen = strpos($before, '>');
|
942 |
+
$bef = substr($before,0,$taglen);
|
943 |
+
$aft = substr($after,0,$taglen);
|
944 |
+
if ( $taglen && $bef == $aft ) {
|
945 |
+
$before = substr($before,$taglen+1);
|
946 |
+
$after = substr($after,$taglen+1);
|
947 |
+
}
|
948 |
+
else {
|
949 |
+
$found = false;
|
950 |
+
}
|
951 |
+
}
|
952 |
+
|
953 |
+
$data = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, 2 );
|
954 |
+
|
955 |
+
wppa_dump( 'From: ' . basename( $data[0]['file'] ) . ':' . $data[0]['line'] . ' ' . $data[0]['function'] . ' - ' . basename( $data[1]['file'] ) . ':' . $data[1]['line'] . ' ' . $data[1]['function'] );
|
956 |
+
wppa_dump( '---' );
|
957 |
+
wppa_dump( 'Before: ' . $before );
|
958 |
+
wppa_dump( '---' );
|
959 |
+
wppa_dump( 'After : ' . $after );
|
960 |
+
wppa_dump( '===' );
|
961 |
}
|
962 |
/* End debugging */
|
963 |
|
964 |
if ( $return ) {
|
965 |
return wp_kses( $html, $t, $p );
|
|
|
966 |
}
|
967 |
else {
|
968 |
echo wp_kses( $html, $t, $p );
|
|
|
969 |
}
|
|
|
970 |
}
|
971 |
+
|
972 |
add_filter( 'safe_style_css', function( $styles ) {
|
973 |
+
|
974 |
+
// wppa_dump();
|
975 |
+
// wppa_dump(var_export($styles, true));
|
976 |
+
$my_styles = [
|
977 |
+
'display',
|
978 |
+
'visibility',
|
979 |
+
'fill',
|
980 |
+
'text-decoration',
|
981 |
+
'opacity',
|
982 |
+
'list-style',
|
983 |
+
'position',
|
984 |
+
'top',
|
985 |
+
'left',
|
986 |
+
'right',
|
987 |
+
'bottom',
|
988 |
+
'z-index',
|
989 |
+
'box-shadow',
|
990 |
+
];
|
991 |
+
|
992 |
+
return array_merge( $styles, $my_styles );
|
993 |
} );
|
994 |
|
995 |
function wppa_add_inline_script( $where, $script ) {
|
wppa.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
* Plugin Name: WP Photo Album Plus
|
4 |
* Description: Easily manage and display your photo albums and slideshows within your WordPress site.
|
5 |
-
* Version: 8.1.
|
6 |
* Author: J.N. Breetvelt a.k.a. OpaJaap
|
7 |
* Author URI: http://wppa.opajaap.nl/
|
8 |
* Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
|
@@ -24,7 +24,7 @@ global $wp_version;
|
|
24 |
|
25 |
/* WPPA GLOBALS */
|
26 |
global $wppa_api_version;
|
27 |
-
$wppa_api_version = '8.1.
|
28 |
global $wppa_revno;
|
29 |
$wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
|
30 |
|
2 |
/*
|
3 |
* Plugin Name: WP Photo Album Plus
|
4 |
* Description: Easily manage and display your photo albums and slideshows within your WordPress site.
|
5 |
+
* Version: 8.1.09.002
|
6 |
* Author: J.N. Breetvelt a.k.a. OpaJaap
|
7 |
* Author URI: http://wppa.opajaap.nl/
|
8 |
* Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
|
24 |
|
25 |
/* WPPA GLOBALS */
|
26 |
global $wppa_api_version;
|
27 |
+
$wppa_api_version = '8.1.09.002'; // WPPA software version
|
28 |
global $wppa_revno;
|
29 |
$wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
|
30 |
|