Version Description
= 8.1.06 =
- 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.08.001 |
Comparing to | |
See all releases |
Code changes from version 8.1.07.004 to 8.1.08.001
- changelog.txt +4 -0
- js/wppa-admin-scripts.js +11 -1
- js/wppa-admin-scripts.min.js +1 -1
- wppa-admin-functions.php +2 -2
- wppa-ajax.php +12 -6
- wppa-album-admin-autosave.php +64 -34
- wppa-album-covers.php +11 -5
- wppa-boxes-html.php +3 -3
- wppa-comment-admin.php +5 -5
- wppa-common-functions.php +14 -16
- wppa-date-time.php +6 -6
- wppa-edit-tags.php +2 -2
- wppa-gutenberg-photo.php +5 -5
- wppa-gutenberg-wppa.php +27 -27
- wppa-import.php +7 -7
- wppa-items.php +5 -5
- wppa-mailing.php +13 -11
- wppa-multitag-widget.php +2 -2
- wppa-photo-admin-autosave.php +28 -28
- wppa-scripts.php +22 -7
- wppa-setting-functions.php +7 -7
- wppa-setup.php +2 -1
- wppa-slideshow-widget.php +12 -12
- wppa-tagcloud-widget.php +2 -2
- wppa-tinymce-common.php +5 -5
- wppa-tinymce-shortcodes.php +265 -264
- wppa-upldr-widget.php +3 -3
- wppa-upload.php +2 -2
- wppa-users.php +3 -3
- wppa-utils.php +9 -1
- wppa-watermark.php +9 -9
- wppa-widget-functions.php +4 -4
- wppa-wrappers.php +15 -1
- wppa.php +2 -2
changelog.txt
CHANGED
@@ -1,5 +1,9 @@
|
|
1 |
WP Photo Album Plus Changelog
|
2 |
|
|
|
|
|
|
|
|
|
3 |
= 8.1.07 =
|
4 |
|
5 |
* Maintenance release
|
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.
|
6 |
+
|
7 |
= 8.1.07 =
|
8 |
|
9 |
* Maintenance release
|
js/wppa-admin-scripts.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/* admin-scripts.js */
|
2 |
/* Package: wp-photo-album-plus
|
3 |
/*
|
4 |
-
/* Version 8.1.
|
5 |
/* Various js routines used in admin pages
|
6 |
*/
|
7 |
|
@@ -907,6 +907,16 @@ function _wppaAjaxUpdateAlbum( album, actionslug, value, isTmce, refresh ) {
|
|
907 |
return;
|
908 |
}
|
909 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
910 |
// No reload: Hide spinner
|
911 |
if ( actionslug == 'description' ) {
|
912 |
jQuery( '#wppa-album-spin' ).css( { visibility: 'hidden' } );
|
1 |
/* admin-scripts.js */
|
2 |
/* Package: wp-photo-album-plus
|
3 |
/*
|
4 |
+
/* Version 8.1.08.001
|
5 |
/* Various js routines used in admin pages
|
6 |
*/
|
7 |
|
907 |
return;
|
908 |
}
|
909 |
|
910 |
+
// Cover link
|
911 |
+
if ( actionslug == 'cover_linktype' ) {
|
912 |
+
if ( value == 'manual' ) {
|
913 |
+
jQuery( '#link-url-tr' ).show();
|
914 |
+
}
|
915 |
+
else {
|
916 |
+
jQuery( '#link-url-tr' ).hide();
|
917 |
+
}
|
918 |
+
}
|
919 |
+
|
920 |
// No reload: Hide spinner
|
921 |
if ( actionslug == 'description' ) {
|
922 |
jQuery( '#wppa-album-spin' ).css( { visibility: 'hidden' } );
|
js/wppa-admin-scripts.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function checkjQueryRev(e,t,a){var p=parseFloat(jQuery.fn.jquery);t.checked&&p<a&&(alert(e+"\nThe version of your jQuery library: "+p+" is too low for this feature. It requires version "+a),t.checked="")}function wppaReUpload(e,o,t,r){document.getElementById("wppa-re-up-form-"+o);var a=document.getElementById("wppa-re-up-file-"+o),u=document.getElementById("wppa-re-up-butn-"+o);e.preventDefault();a=a.files[0];if(a.type.match("image.*")){if(0==t.length)alert("Filename will be set to "+a.name);else if(a.name!=t&&!confirm("Filename is different.\nIf you continue, the filename will not be updated!.\n\nContinue?"))return void jQuery("#re-up-"+o).css("display","none");u.value="Uploading...",u.style.color="black";t=new FormData;t.append("photo",a,a.name);var l=new XMLHttpRequest,a="?action=wppa&wppa-action=update-photo&photo-id="+o+"&item=file&wppa-nonce="+document.getElementById("photo-nonce-"+o).value;l.open("POST",wppaAjaxUrl+a,!0),l.onload=function(){if(200===l.status){var e=wppaTrim(l.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":var t,a,p,n=JSON.parse(e[2]);for(t in n)switch(p=n[t],t){case"remark":p=(p=(p=p.replace(/</g,"<")).replace(/>/g,">")).replace(/\\/g,""),a="0"!=e[1]?'<span style="color:red;" >'+p+"</span>":'<span style="color:green;" >'+p+"</span>",r&&(a+=' <span style="color:blue;" >Reloading...</span>'),jQuery("#remark-"+o).html(a);break;case"photourl":wppaCropper[o]?wppaCropper[o].replace(p):jQuery("#photourl-"+o).attr("src",p),jQuery("#thumba-"+o).attr("href",p);break;case"thumburl":jQuery("#thumburl-"+o).attr("src",p);break;case"magickstack":jQuery("#magickstack-"+o).html(p),0<p.length?jQuery("#imstackbutton-"+o).css("display","inline"):jQuery("#imstackbutton-"+o).css("display","none");break;default:jQuery("#"+t+"-"+o).html(p)}u.value="Upload",jQuery("#re-up-"+o).css("display","none");break;case"99":document.getElementById("photoitem-"+o).innerHTML='<span style="color:red">'+e[2]+"</span>";break;default:document.getElementById("remark-"+o).innerHTML='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",u.value="Error occured",u.style.color="red"}}else alert("An error occurred!")},l.send(t)}else alert("File is not an image file!")}jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll",function(){wppaMakeLazyVisible("windowon")}),wppaMakeLazyVisible("docready")});var _wppaRefreshAfter=!1;function wppaRefreshAfter(){_wppaRefreshAfter=!0}function wppaCheckWidgetMethod(){var e,t,a;if("4"==document.getElementById("wppa-wm").value?(document.getElementById("wppa-wp").style.visibility="visible","day-of-week"==(a=jQuery("#wppa-wp").val())||"day-of-month"==a||"day-of-year"==a?jQuery(".wppa-order").css("visibility",""):jQuery(".wppa-order").css("visibility","hidden")):(document.getElementById("wppa-wp").style.visibility="hidden",jQuery(".wppa-order").css("visibility","hidden")),"1"==document.getElementById("wppa-wm").value)for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="visible",t++;else for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="hidden",t++}function wppa_tablecookieon(e){wppa_setCookie("table_"+e,"on","365")}function wppa_tablecookieoff(e){wppa_setCookie("table_"+e,"off","365")}function wppaCookieCheckbox(e,t){e.checked?wppa_setCookie(t,"on","365"):wppa_setCookie(t,"off","365")}function wppa_move_up(e){document.location=wppa_moveup_url+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value}function checkColor(e){var t=e.substr(5),e=jQuery("#"+t).val();jQuery("#colorbox-"+t).css("background-color",e)}function checkAll(e,t){e=document.getElementById(e);e&&(e.checked?jQuery(t).prop("checked",!0):jQuery(t).prop("checked",!1))}function impUpd(e,t){e.checked?(jQuery(t).val(wppa_update),jQuery(".hideifupdate").css("display","none")):(jQuery(t).val(wppa_import),jQuery(".hideifupdate").css("display",""))}function wppaAjaxDeletePhoto(t,e,a,p){wppaConsoleLog("imm="+p,"force");var n="",o="",n=e||'<div style="padding-left:5px;" >';a?o=a:aftrer="</div>",wppaFeAjaxLog("in");var r=wppaGetXmlHttp(),a=wppaAjaxUrl+"?action=wppa&wppa-action=delete-photo&photo-id="+t;a+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,p&&(a+="&wppa-immediate=1"),r.open("GET",a,!0),r.send(),r.onreadystatechange=function(){switch(r.readyState){case 1:document.getElementById("remark-"+t).innerHTML="server connection established";break;case 2:document.getElementById("remark-"+t).innerHTML="request received";break;case 3:document.getElementById("remark-"+t).innerHTML="processing request";break;case 4:var e;200==r.status?("ER"==(e=wppaTrim(r.responseText).split("||"))[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("remark-"+t).innerHTML=e[2]:(document.getElementById("photoitem-"+t).innerHTML=n+e[2]+o,wppaProcessFull(e[3],e[4])),jQuery(window).trigger("scroll"),wppaFeAjaxLog("out")):document.getElementById("photoitem-"+t).innerHTML=n+'<span style="color:red;" >Comm error '+r.status+": "+r.statusText+"</span>"+o}}}function wppaAjaxUndeletePhoto(t){wppaFeAjaxLog("in");var a=wppaGetXmlHttp(),e=wppaAjaxUrl+"?action=wppa&wppa-action=undelete-photo&photo-id="+t;e+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,a.open("GET",e,!0),a.send(),a.onreadystatechange=function(){switch(a.readyState){case 1:document.getElementById("remark-"+t).innerHTML="server connection established";break;case 2:document.getElementById("remark-"+t).innerHTML="request received";break;case 3:document.getElementById("remark-"+t).innerHTML="processing request";break;case 4:var e;200==a.status?("ER"==(e=wppaTrim(a.responseText).split("||"))[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("remark-"+t).innerHTML=e[2]:document.getElementById("photoitem-"+t).innerHTML='<div style="padding-left:5px;" >'+e[2]+"</div>",wppaFeAjaxLog("out")):document.getElementById("photoitem-"+t).innerHTML=before+'<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>"+after}}}function wppaAjaxApplyWatermark(t,e,a){wppaFeAjaxLog("in");var p=wppaGetXmlHttp();jQuery("#wppa-water-spin-"+t).css({visibility:"visible"});var n="action=wppa&wppa-action=watermark-photo&photo-id="+t;n+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,e&&(n+="&wppa-watermark-file="+e),a&&(n+="&wppa-watermark-pos="+a),p.open("POST",wppaAjaxUrl,!0),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(n),p.onreadystatechange=function(){var e;4==p.readyState&&(200==p.status?(""!=(e=wppaTrim(p.responseText).split("||"))[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?(document.getElementById("remark-"+t).innerHTML=e[2],setTimeout(function(){document.location.reload(!0)},500)):document.getElementById("remark-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>",jQuery("#wppa-water-spin-"+t).css({visibility:"hidden"}),wppaFeAjaxLog("out")):document.getElementById("remark-"+t).innerHTML='<span style="color:red;" >Comm error '+p.status+": "+p.statusText+"</span>")}}function wppaAjaxUpdateIptc(l,e,t,a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-iptc&photo-id="+l+"&item="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+l).value+"&value="+wppaEncode(t)+"&tagname="+a,async:!0,type:"POST",timeout:6e4,beforeSend:function(e){jQuery("#remark-"+l).html("Working, please wait...")},success:function(e,t,a){var p=wppaTrim(e).split("||");if(""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),"99"===p[1])jQuery("#photoitem-"+l).html(bef+'<span style="color:red">'+p[2]+"</span>"+aft);else{var n,o,r,u=JSON.parse(p[2]);for(n in u)switch(r=u[n],n){case"remark":r=(r=(r=r.replace(/</g,"<")).replace(/>/g,">")).replace(/\\/g,""),o="0"!=p[1]?'<span style="color:red;" >'+r+"</span>":'<span style="color:green;" >'+r+"</span>",jQuery("#remark-"+l).html(o);break;case"photourl":wppaCropper[l]?wppaCropper[l].replace(r):jQuery("#photourl-"+l).attr("src",r),jQuery("#thumba-"+l).attr("href",r);break;case"thumburl":jQuery("#thumburl-"+l).attr("src",r);break;case"magickstack":jQuery("#magickstack-"+l).html(r),0<r.length?jQuery("#imstackbutton-"+l).css("display","inline"):jQuery("#imstackbutton-"+l).css("display","none")}}wppaFeAjaxLog("out")},error:function(e,t,a){jQuery("#remark-"+l).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("wppaAjaxUpdatePhoto failed. Error = "+a+", status = "+t,"force")},complete:function(e,t,a){jQuery("#wppa-admin-spinner").css("display","none"),jQuery(window).trigger("scroll")}})}function wppaAjaxUpdatePhoto(l,i,e,s,c,d){c=c||"",d=d||"",wppaFeAjaxLog("in"),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-photo&photo-id="+l+"&item="+i+"&wppa-nonce="+document.getElementById("photo-nonce-"+l).value+"&value="+wppaEncode(e),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==i&&jQuery("#wppa-photo-spin-"+l).css({visibility:"visible"}),jQuery("#remark-"+l).html("Working, please wait...")},success:function(e,t,a){var p=wppaTrim(e).split("||");if(""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),"99"===p[1])jQuery("#photoitem-"+l).html(c+'<span style="color:red">'+p[2]+"</span>"+d);else{var n,o,r,u=JSON.parse(p[2]);for(n in u)switch(r=u[n],n){case"remark":r=(r=(r=r.replace(/</g,"<")).replace(/>/g,">")).replace(/\\/g,""),o="0"!=p[1]?'<span style="color:red;" >'+r+"</span>":'<span style="color:green;" >'+r+"</span>",s&&(o+=' <span style="color:blue;" >Reloading...</span>'),jQuery("#remark-"+l).html(o);break;case"photourl":wppaCropper[l]?wppaCropper[l].replace(r):jQuery("#photourl-"+l).attr("src",r),jQuery("#thumba-"+l).attr("href",r);break;case"thumburl":jQuery("#thumburl-"+l).attr("src",r);break;case"magickstack":jQuery("#magickstack-"+l).html(r),0<r.length?jQuery("#imstackbutton-"+l).css("display","inline"):jQuery("#imstackbutton-"+l).css("display","none");break;default:jQuery("#"+n+"-"+l).html(r)}}"description"==i&&jQuery("#wppa-photo-spin-"+l).css({visibility:"hidden"}),wppaFeAjaxLog("out")},error:function(e,t,a){jQuery("#remark-"+l).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("wppaAjaxUpdatePhoto failed. Error = "+a+", status = "+t,"force")},complete:function(e,t,a){var p=(p=document.location.href).replace(/&pano-val=./,"");s?setTimeout(function(){document.location.href=p},300):(jQuery("#wppa-admin-spinner").css("display","none"),jQuery(window).trigger("scroll"))}})}function wppaChangeScheduleAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetime-"+e).css("display","inline"):(jQuery(".wppa-datetime-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledtm",Math.rand()))}function wppaChangeScheduleDelAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetimedel-"+e).css("display","inline"):(jQuery(".wppa-datetimedel-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledel",Math.rand()))}var _wppaRefreshAfter=!1,wppaAjaxAlbumCount=0,wppaAlbumUpdateMatrix=new Array;function wppaAjaxUpdateAlbum(e,t,a,p){var n=0==jQuery("#wppaalbumdesc:visible").length;jQuery("#wppaalbumdesc-html").click();for(var o=wppaAlbumUpdateMatrix.length,r=0,u=!1,l=-1;r<o;)wppaAlbumUpdateMatrix[r][0]==e&&wppaAlbumUpdateMatrix[r][1]==t&&(u=!0,l=r),r++;u||(wppaAlbumUpdateMatrix[o]=[e,t,"undefined",!1,!1,p],l=o),wppaAlbumUpdateMatrix[l][3]="number"==typeof a?a:a.value,wppaAlbumUpdateMatrix[l][5]=p,wppaAjaxUpdateAlbumMonitor(n)}function wppaAjaxUpdateAlbumMonitor(e){for(var t=wppaAlbumUpdateMatrix.length,a=0;a<t;)wppaAlbumUpdateMatrix[a][2]==wppaAlbumUpdateMatrix[a][3]||wppaAlbumUpdateMatrix[a][4]||(wppaAlbumUpdateMatrix[a][4]=!0,_wppaAjaxUpdateAlbum(wppaAlbumUpdateMatrix[a][0],wppaAlbumUpdateMatrix[a][1],wppaAlbumUpdateMatrix[a][3],e,wppaAlbumUpdateMatrix[a][5])),a++;e&&jQuery("#wppaalbumdesc-tmce").click()}function _wppaAjaxUpdateAlbum(r,u,l,i,s){wppaAjaxAlbumCount++;jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-album&album-id="+r+"&item="+u+"&wppa-nonce="+document.getElementById("album-nonce-"+r).value+"&value="+wppaEncode(l),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==u&&jQuery("#wppa-album-spin").css({visibility:"visible"}),jQuery("#albumstatus-"+r).html("Working, please wait... ("+wppaAjaxAlbumCount+")")},success:function(e,t,a){e=wppaTrim(e).split("||");if(wppaAjaxAlbumCount--,""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?0==wppaAjaxAlbumCount?jQuery("#albumstatus-"+r).html(e[2]):jQuery("#albumstatus-"+r).html("Working, please wait... ("+wppaAjaxAlbumCount+")"):jQuery("#albumstatus-"+r).html='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",void 0!==e[3]&&wppaProcessFull(e[3],e[4]),s&&"0"==e[1])return jQuery("#albumstatus-"+r).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-admin-spinner").fadeIn(),void setTimeout(function(){wppaReload()},100);"description"==u&&jQuery("#wppa-album-spin").css({visibility:"hidden"});for(var p=0,n=-1,o=wppaAlbumUpdateMatrix.length;p<o;)wppaAlbumUpdateMatrix[p][0]==r&&wppaAlbumUpdateMatrix[p][1]==u&&(n=p),p++;wppaAlbumUpdateMatrix[n][2]=l||0,wppaAlbumUpdateMatrix[n][4]=!1,wppaAlbumUpdateMatrix[n][5]=!1,wppaAjaxUpdateAlbumMonitor(i)},error:function(e,t,a){wppaAjaxAlbumCount--,jQuery("#albumstatus-"+r).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("_wppaAjaxUpdateAlbum failed. Error = "+a+", status = "+t,"force")},complete:function(e,t,a){}})}function wppaProcessFull(e,t){"full"==e&&(jQuery("#full").css("display",""),jQuery("#notfull").css("display","none")),"notfull"==e&&(jQuery("#full").css("display","none"),0<t?jQuery("#notfull").attr("value",wppaUploadToThisAlbum+" (max "+t+")"):jQuery("#notfull").attr("value",wppaUploadToThisAlbum),jQuery("#notfull").css("display",""))}function wppaAjaxUpdateCommentStatus(t,a,e){var p=wppaGetXmlHttp(),e=wppaAjaxUrl+"?action=wppa&wppa-action=update-comment-status&wppa-photo-id="+t+"&wppa-comment-id="+a+"&wppa-comment-status="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;p.onreadystatechange=function(){var e;4==p.readyState&&(200==p.status?(""!=(e=wppaTrim(p.responseText).split("||"))[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?jQuery("#remark-"+t).html(e[2]):jQuery("#remark-"+t).html('<span style="color:red">'+e[2]+"</span>"),jQuery("#wppa-comment-spin-"+a).css("visibility","hidden")):jQuery("#remark-"+t).html('<span style="color:red;" >Comm error '+p.status+": "+p.statusText+"</span>"))},p.open("GET",e,!0),p.send()}function wppaAjaxUpdateOptionCheckBox(t,e){var a=wppaGetXmlHttp(),p=wppaAjaxUrl+"?action=wppa&wppa-action=update-option&wppa-option="+t;p+="&wppa-nonce="+document.getElementById("wppa-nonce").value,e.checked?p+="&value=yes":p+="&value=no",a.onreadystatechange=function(){switch(a.readyState){case 1:case 2:case 3:jQuery("#img_"+t).attr("src",wppaImageDirectory+"spinner.gif");break;case 4:var e=wppaTrim(a.responseText).split("||");""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),404!=a.status?("0"===e[1]?(jQuery("#img_"+t).attr("src",wppaImageDirectory+"tick.png"),jQuery("#img_"+t).attr("title",e[2])):(jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Error #"+e[1]+", message: "+e[2]+", status: "+a.status)),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))):(jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Communication error, status = "+a.status)),wppaCheckInconsistencies()}},a.open("GET",p,!0),a.send()}var wppaAlwaysContinue=100;function wppaMaintenanceProc(p,e,r){if(!r&&!e&&"yes"==document.getElementById(p+"_continue").value)return document.getElementById(p+"_continue").value="no",document.getElementById(p+"_button").value="Start!",void(0<jQuery("#"+p+"_togo").html()&&(jQuery("#"+p+"_status").html("Pausing..."),jQuery("#"+p+"_button").css("display","none")));r||(document.getElementById(p+"_continue").value="yes",document.getElementById(p+"_button").value="Stop!",""==jQuery("#"+p+"_status").html()&&jQuery("#"+p+"_status").html("Wait...")),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenance&slug="+p+"&wppa-nonce="+jQuery("#wppa-nonce").val()+(r?"&wppa-cron=1":""),async:!0,type:"POST",timeout:3e5,beforeSend:function(e){},success:function(e,t,a){var p=e.split("||"),n=p[1],o=!1;return n?(10<p[0].length&&(alert("An error occurred:\n"+p[0]),o=!0),jQuery("#"+n+"_status").html(p[2]),jQuery("#"+n+"_togo").html(p[3]),jQuery("#"+n+"_button").css("display",""),o||"0"==p[3]?"reload"==p[4]?(alert("This page will now be reloaded to finish the operation. Please stay tuned..."),void wppaReload()):void setTimeout("wppaMaintenanceProc('"+n+"', false)",20):void(document.getElementById(n+"_continue")&&"yes"==document.getElementById(n+"_continue").value?setTimeout("wppaMaintenanceProc('"+n+"', true)",20):(r||jQuery("#"+n+"_status").html("Pending"),setTimeout(function(){wppaAjaxUpdateTogo(n)},1e3)))):(alert("The server returned unexpected output:\n"+e+"\nIf the current procedure has a Skip One button, press it before retrying. Reloading page..."),void wppaReload())},error:function(e,t,a){wppaConsoleLog("wppaMaintenanceProc failed. Slug = "+p+", Error = "+a+", status = "+t,"force"),jQuery("#"+p+"_status").html("Server error #"+(11-wppaAlwaysContinue));t=!1;--wppaAlwaysContinue<1&&(t=confirm("10 Server errors happened.\nDo you want to continue?"))&&(wppaAlwaysContinue=100),(t||0<wppaAlwaysContinue)&&("wppa_remake"==p&&wppaAjaxUpdateOptionValue("wppa_remake_skip_one",0),"wppa_regen_thumbs"==p&&wppaAjaxUpdateOptionValue("wppa_regen_thumbs_skip_one",0),"wppa_create_o1_files"==p&&wppaAjaxUpdateOptionValue("wppa_create_o1_files_skip_one",0),setTimeout("wppaMaintenanceProc('"+p+"', true)",2e3))},complete:function(e,t,a){}})}function wppaAjaxPopupWindow(e){switch(e){case"wppa_list_index":0;break;case"wppa_list_errorlog":0;break;case"wppa_list_rating":0;break;case"wppa_list_session":0;break;case"wppa_list_comments":0}var t=.9*wppaWindowWidth(),a=wppaGetXmlHttp(),p=wppaAjaxUrl,e="action=wppa&wppa-action=maintenancepopup&slug="+e;e+="&wppa-nonce="+document.getElementById("wppa-nonce").value,a.open("POST",p,!1),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(e),4==a.readyState&&200==a.status&&(a=(e=wppaEntityDecode(a.responseText).split("|"))[0],e[0]="",e=e.join("|").substring(1),t={modal:!0,resizable:!0,width:t,show:{effect:"fadeIn",duration:800},closeText:wppaCloseText},jQuery("#wppa-modal-container").html(e).dialog(t).dialog("open"),jQuery("#wppa-modal-container").css({width:"100%"}),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"200200"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"50px"}),jQuery(".ui-dialog-title").html("<h2>"+a+"</h2>"),jQuery(".ui-button").css({position:"absolute",top:"12px",right:"12px"}),jQuery(".ui-button").attr("title",wppaCloseText),jQuery(".ui-widget-overlay").css({backgroundColor:"transparent"}),setTimeout(function(){jQuery("#wppa-maintenance-list").niceScroll&&jQuery("#wppa-maintenance-list").niceScroll(".wppa-nicewrap",{})},1e3))}function wppaAjaxUpdateOptionValue(l,e,t){var a="action=wppa&wppa-action=update-option&wppa-option="+wppaEncode(l)+"&wppa-nonce="+document.getElementById("wppa-nonce").value;0!=e&&(a+="number"==typeof e?"&value="+e:t?"&value="+wppaGetSelectionEnumByClass("."+l,","):"&value="+wppaEncode(e.value)),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e5,beforeSend:function(e){jQuery("#img_"+l.replace("#","H")).attr("src",wppaImageDirectory+"spinner.gif")},success:function(e,t,a){e=wppaTrim(e).split("||");if(""!=e[0])alert("The server returned unexpected output:\n"+e[0]);else if("0"===e[1]?(jQuery("#img_"+l.replace("#","H")).attr("src",wppaImageDirectory+"tick.png"),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))):(jQuery("#img_"+l.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),e[3]&&alert(e[3])),jQuery("#img_"+l.replace("#","H")).attr("title",e[2]),e[4])for(var p,n,o,r=e[4].split(";"),u=0;u<r.length;)p=r[u].split(":"),n=jQuery("#"+p[0]).html(),o=p[1],""!=n&&""==o&&(o='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+p[0]).html(o),u++},error:function(e){jQuery("#img_"+l.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+l.replace("#","H")).attr("title","Communication error")},complete:function(e){wppaCheckInconsistencies(),"spinner_shape"!=l&&"icon_corner_style"!=l||(wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")),"svg_color"!=l&&"svg_bg_color"!=l||wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),"ovl_svg_color"!=l&&"ovl_svg_bg_color"!=l||wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")}})}function wppaEncode(e){if(void 0!==e){if("number"==typeof e)return e;for(var t=(p=(p=e.replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0,p="";a<t.length;)p+=t[a],++a<t.length&&(p+="||PLUS||");return p}}function wppaCheckInconsistencies(){jQuery("#use_thumb_popup").prop("checked")&&"lightbox"==jQuery("#thumb_linktype").val()?jQuery(".popup-lightbox-err").css("display",""):jQuery(".popup-lightbox-err").css("display","none")}function wppaGetXmlHttp(){return xmlhttp=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),xmlhttp}function wppaPhotoStatusChange(e){if(jQuery("#psdesc-"+e).css({display:"none"}),elm=document.getElementById("status-"+e),elm){if("pending"!=elm.value&&"scheduled"!=elm.value||jQuery("#photoitem-"+e).css({backgroundColor:"#ffebe8",borderColor:"#cc0000"}),"publish"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffe0",borderColor:"#e6db55"}),"featured"==elm.value){jQuery("#photoitem-"+e).css({backgroundColor:"#e0ffe0",borderColor:"#55ee55"});var t=document.getElementById("pname-"+e).value.split(".");if(1<t.length)for(var a=0;a<t.length;)"jpg"!=t[a]&&"JPG"!=t[a]||jQuery("#psdesc-"+e).css({display:""}),a++}"gold"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#eeeecc",borderColor:"#ddddbb"}),"silver"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffff",borderColor:"#eeeeee"}),"bronze"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ddddbb",borderColor:"#ccccaa"}),"scheduled"==elm.value?jQuery(".wppa-datetime-"+e).css("display",""):jQuery(".wppa-datetime-"+e).css("display","none"),jQuery("#scheduledel-"+e).prop("checked")?jQuery(".wppa-del-datetime-"+e).css("display",""):jQuery(".wppa-del-datetime-"+e).css("display","none")}}function wppaSetComBgCol(e){"approved"==jQuery("#com-stat-"+e).val()?jQuery("#com-tr-"+e).css({backgroundColor:"#ffffe0"}):jQuery("#com-tr-"+e).css({backgroundColor:"#ffebe8"})}function wppaAddCat(e,t){wppaAddTag(e,t)}function wppaAddTag(e,t){t=document.getElementById(t);e&&(t.value?t.value+=","+e:t.value=e,"-clear-"==e&&(t.value=""))}function wppaRefresh(e){e=new String(document.location).split("#")[0]+"#"+e;document.location=e}function wppaReload(e){e?(url=document.location.href.split("#"),document.location.href=url[0]+e,setTimeout(function(){document.location.reload(!0)},10)):document.location.reload(!0)}var wppaFeCount=0;function wppaFeAjaxLog(e){"in"==e&&(0==wppaFeCount&&jQuery("#wppa-fe-exit").css("display","none"),wppaFeCount++,jQuery("#wppa-fe-count").html(wppaFeCount)),"out"==e&&(1==wppaFeCount&&(jQuery("#wppa-fe-count").html(""),jQuery("#wppa-fe-exit").css("display","inline"),wppaFeCount--),1<wppaFeCount&&(wppaFeCount--,jQuery("#wppa-fe-count").html(wppaFeCount)))}function wppaArrayToEnum(e,t){temp=e.sort(function(e,t){return e-t});for(var a,p="",n=-1,o=-2,r=0,u=!1,l=0;l<e.length;)0!=(a=e[l].valueOf())&&(r=n,a==++r?u=!0:u?(p+=n==o?t+n+t+a:t+t+n+t+a,u=!1):p+=t+a,u||(o=a,o++),n=a),l++;for(u&&(p+=".."+n);"."==p.substr(0,1);)p=p.substr(1);for(;p.substr(0,1)==t;)p=p.substr(1);return p}function wppaGetSelEnumToId(e,t){p=jQuery("."+e);var a=[];for(i=0,j=0;i<p.length;)p[i].selected&&(a[j]=p[i].value,j++),i++;jQuery("#"+t).val(wppaArrayToEnum(a,"."))}function wppaGetSelectionEnumByClass(e,t){var a,p=[],n=0,o=0;for(t=t||".",a=jQuery(e),o=n=0;n<a.length;)a[n].selected&&(p[o]=a[n].value,o++),n++;return wppaArrayToEnum(p,t)}function wppaEditSearch(e,t){t=jQuery("#"+t).val();0==t.length?alert("Please enter searchstring"):document.location.href=e+"&wppa-searchstring="+t}function wppaEditTrash(e){document.location.href=e}function wppaExportDbTable(p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=export-table&table="+p,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){jQuery("#"+p+"-spin").css("display","inline")},success:function(e,t,a){e=e.split("||");"0"==e[1]?document.location=e[2]:alert("Error: "+e[1]+"\n\n"+e[2])},error:function(e,t,a){alert("Export Db Table "+p+" failed. Error = "+a+", status = "+t)},complete:function(e,t,a){jQuery("#"+p+"-spin").css("display","none")}})}function wppaDismissAdminNotice(e,t){wppaAjaxUpdateOptionCheckBox(e,t),jQuery("#wppa-wr-").css("display","none")}function wppaAjaxUpdateTogo(n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=gettogo&slug="+n,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){wppaConsoleLog("Requesting togo for slug "+n,"force")},success:function(e,t,a){var p=e.split("|");jQuery("#"+n+"_togo").html(p[0]);e=jQuery("#"+n+"_status").html(),p=p[1];""!=e&&""==p&&(p='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+n+"_status").html(p),setTimeout(function(){wppaAjaxUpdateTogo(n)},1e3)},error:function(e){},complete:function(e){}})}function wppaIsEmpty(e){return(null==e||void 0===e||""==e||0==e)&&!0}function wppaTimedConfirm(e){var t={modal:!0,resizable:!1,width:400,show:{effect:"fadeIn",duration:800},closeText:"X",buttons:[{text:"NO",click:function(){jQuery(this).dialog("close")}},{text:"YES",click:function(){jQuery(this).dialog("close")}}]};jQuery("#wppa-modal-container").html(e).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"200200"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({float:"right",position:"relative",bottom:"40px"}),jQuery(".ui-dialog-titlebar-close").css({display:"none"}),jQuery(".ui-widget-overlay").css({backgroundColor:"transparent"}),jQuery(".ui-button").attr("title",wppaCloseText),setTimeout(function(){jQuery(".ui-button").trigger("click")},6e4)}function wppaAjaxGetSpinnerHtml(e,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-option&wppa-option=getspinnerpreview&type="+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,a){e=e.split("|");jQuery("#"+p).html(e[0])},error:function(e){},complete:function(e){}})}function wppaDragHorizon(t){var a=0,p=0;function n(e){(e=e||window.event).preventDefault(),a=p-e.clientY,p=e.clientY,t.style.top=t.offsetTop-a+"px"}function o(){document.onmouseup=null,document.onmousemove=null}t.onmousedown=function(e){(e=e||window.event).preventDefault(),pos3=e.clientX,p=e.clientY,document.onmouseup=o,document.onmousemove=n}}function wppaBulkActionChange(e,t){wppa_setCookie("wppa_bulk_action",e.value,365),"wppa-bulk-move-to"==e.value||"wppa-bulk-copy-to"==e.value?jQuery("#wppa-bulk-album").css("display","inline"):jQuery("#wppa-bulk-album").css("display","none"),"wppa-bulk-status"==e.value?jQuery("#wppa-bulk-status").css("display","inline"):jQuery("#wppa-bulk-status").css("display","none"),"wppa-bulk-owner"==e.value?jQuery("#wppa-bulk-owner").css("display","inline"):jQuery("#wppa-bulk-owner").css("display","none")}function wppaBulkDoitOnClick(){var e=jQuery(".wppa-bulk-photo"),t=0;for(i=0;i<e.length;i++)e[i].checked&&t++;if(0==t)return alert("No photos selected"),!1;var a=document.getElementById("wppa-bulk-action").value;switch(a){case"":return alert("No action selected"),!1;case"wppa-bulk-delete":case"wppa-bulk-delete-immediate":case"wppa-bulk-undelete":break;case"wppa-bulk-move-to":case"wppa-bulk-copy-to":if(0==document.getElementById("wppa-bulk-album").value)return alert("No album selected"),!1;break;case"wppa-bulk-status":if(0==document.getElementById("wppa-bulk-status").value)return alert("No status selected"),!1;break;case"wppa-bulk-owner":if(0==documnet.getElementById("wppa-bulk-owner").value)return alert("No new owner selected"),!1;break;default:return alert("Unimplemented action requested: "+a),!1}return!0}function wppaSetThumbsize(e){e=e.value;wppa_setCookie("wppa_bulk_thumbsize",e,365),jQuery(".wppa-bulk-thumb").css("max-width",e+"px"),jQuery(".wppa-bulk-thumb").css("max-height",e/2+"px"),jQuery(".wppa-bulk-dec").css("height",e/2+"px")}function wppaToggleConfirmDelete(e){jQuery(e).prop("checked")?wppa_setCookie("wppaConfirmDelete","checked",365):wppa_setCookie("wppaConfirmDelete","unchecked",365)}function wppaToggleConfirmMove(e){jQuery(e).prop("checked")?wppa_setCookie("wppaConfirmMove","checked",365):wppa_setCookie("wppaConfirmMove","unchecked",365)}function wppaSetConfirmDelete(e){"checked"==wppa_getCookie("wppaConfirmDelete")?jQuery("#"+e).prop("checked",!0):jQuery("#"+e).prop("checked",!1)}function wppaSetConfirmMove(e){"checked"==wppa_getCookie("wppaConfirmMove")?jQuery("#"+e).prop("checked",!0):jQuery("#"+e).prop("checked",!1)}function wppaAjaxReplaceLog(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenancepopup&slug=wppa_list_errorlog&raw=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:1e5,beforeSend:function(e){jQuery("#wppa-spinner").show()},success:function(e,t,a){e=wppaEntityDecode(e),jQuery("#wppa-logbody").html(e),jQuery("#wppa-spinner").hide()}})}function wppaTestAdminReady(){"complete"===document.readyState?jQuery("#wppa-admin-spinner").fadeOut():setTimeout("wppaTestAdminReady()",200)}function wppaCommentAdminUpdateHref(e){var t=encodeURIComponent(jQuery("#commenttext-"+e).val()),a=jQuery("#href-"+e).attr("href"),p=a.split("commenttext=");p[1]=t,a=p[0]+"commenttext="+p[1],jQuery("#href-"+e).attr("href",a),jQuery("#href-"+e).css("display","inline")}jQuery(document).ready(function(){var e;document.getElementById("wppa-bulk-action")&&(e=wppa_getCookie("wppa_bulk_action"),"wppa-bulk-move-to"!=(document.getElementById("wppa-bulk-action").value=e)&&"wppa-bulk-copy-to"!=e||(jQuery("#wppa-bulk-album").css("display","inline"),document.getElementById("wppa-bulk-album").value=wppa_getCookie("wppa_bulk_album")),"wppa-bulk-status"==e&&(jQuery("#wppa-bulk-status").css("display","inline"),document.getElementById("wppa-bulk-status").value=wppa_getCookie("wppa_bulk_status")),"wppa-bulk-owner"==e&&(jQuery("#wppa-bulk-owner").css("display","inline"),document.getElementById("wppa-bulk-owner").value=wppa_getCookie("wppa_bulk_owner")))}),jQuery(document).ready(function(){setTimeout("wppaTestAdminReady()",200)});
|
1 |
+
function checkjQueryRev(e,t,a){var p=parseFloat(jQuery.fn.jquery);t.checked&&p<a&&(alert(e+"\nThe version of your jQuery library: "+p+" is too low for this feature. It requires version "+a),t.checked="")}function wppaReUpload(e,o,t,r){document.getElementById("wppa-re-up-form-"+o);var a=document.getElementById("wppa-re-up-file-"+o),u=document.getElementById("wppa-re-up-butn-"+o);e.preventDefault();a=a.files[0];if(a.type.match("image.*")){if(0==t.length)alert("Filename will be set to "+a.name);else if(a.name!=t&&!confirm("Filename is different.\nIf you continue, the filename will not be updated!.\n\nContinue?"))return void jQuery("#re-up-"+o).css("display","none");u.value="Uploading...",u.style.color="black";t=new FormData;t.append("photo",a,a.name);var l=new XMLHttpRequest,a="?action=wppa&wppa-action=update-photo&photo-id="+o+"&item=file&wppa-nonce="+document.getElementById("photo-nonce-"+o).value;l.open("POST",wppaAjaxUrl+a,!0),l.onload=function(){if(200===l.status){var e=wppaTrim(l.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":var t,a,p,n=JSON.parse(e[2]);for(t in n)switch(p=n[t],t){case"remark":p=(p=(p=p.replace(/</g,"<")).replace(/>/g,">")).replace(/\\/g,""),a="0"!=e[1]?'<span style="color:red;" >'+p+"</span>":'<span style="color:green;" >'+p+"</span>",r&&(a+=' <span style="color:blue;" >Reloading...</span>'),jQuery("#remark-"+o).html(a);break;case"photourl":wppaCropper[o]?wppaCropper[o].replace(p):jQuery("#photourl-"+o).attr("src",p),jQuery("#thumba-"+o).attr("href",p);break;case"thumburl":jQuery("#thumburl-"+o).attr("src",p);break;case"magickstack":jQuery("#magickstack-"+o).html(p),0<p.length?jQuery("#imstackbutton-"+o).css("display","inline"):jQuery("#imstackbutton-"+o).css("display","none");break;default:jQuery("#"+t+"-"+o).html(p)}u.value="Upload",jQuery("#re-up-"+o).css("display","none");break;case"99":document.getElementById("photoitem-"+o).innerHTML='<span style="color:red">'+e[2]+"</span>";break;default:document.getElementById("remark-"+o).innerHTML='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",u.value="Error occured",u.style.color="red"}}else alert("An error occurred!")},l.send(t)}else alert("File is not an image file!")}jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll",function(){wppaMakeLazyVisible("windowon")}),wppaMakeLazyVisible("docready")});var _wppaRefreshAfter=!1;function wppaRefreshAfter(){_wppaRefreshAfter=!0}function wppaCheckWidgetMethod(){var e,t,a;if("4"==document.getElementById("wppa-wm").value?(document.getElementById("wppa-wp").style.visibility="visible","day-of-week"==(a=jQuery("#wppa-wp").val())||"day-of-month"==a||"day-of-year"==a?jQuery(".wppa-order").css("visibility",""):jQuery(".wppa-order").css("visibility","hidden")):(document.getElementById("wppa-wp").style.visibility="hidden",jQuery(".wppa-order").css("visibility","hidden")),"1"==document.getElementById("wppa-wm").value)for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="visible",t++;else for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="hidden",t++}function wppa_tablecookieon(e){wppa_setCookie("table_"+e,"on","365")}function wppa_tablecookieoff(e){wppa_setCookie("table_"+e,"off","365")}function wppaCookieCheckbox(e,t){e.checked?wppa_setCookie(t,"on","365"):wppa_setCookie(t,"off","365")}function wppa_move_up(e){document.location=wppa_moveup_url+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value}function checkColor(e){var t=e.substr(5),e=jQuery("#"+t).val();jQuery("#colorbox-"+t).css("background-color",e)}function checkAll(e,t){e=document.getElementById(e);e&&(e.checked?jQuery(t).prop("checked",!0):jQuery(t).prop("checked",!1))}function impUpd(e,t){e.checked?(jQuery(t).val(wppa_update),jQuery(".hideifupdate").css("display","none")):(jQuery(t).val(wppa_import),jQuery(".hideifupdate").css("display",""))}function wppaAjaxDeletePhoto(t,e,a,p){wppaConsoleLog("imm="+p,"force");var n="",o="",n=e||'<div style="padding-left:5px;" >';a?o=a:aftrer="</div>",wppaFeAjaxLog("in");var r=wppaGetXmlHttp(),a=wppaAjaxUrl+"?action=wppa&wppa-action=delete-photo&photo-id="+t;a+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,p&&(a+="&wppa-immediate=1"),r.open("GET",a,!0),r.send(),r.onreadystatechange=function(){switch(r.readyState){case 1:document.getElementById("remark-"+t).innerHTML="server connection established";break;case 2:document.getElementById("remark-"+t).innerHTML="request received";break;case 3:document.getElementById("remark-"+t).innerHTML="processing request";break;case 4:var e;200==r.status?("ER"==(e=wppaTrim(r.responseText).split("||"))[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("remark-"+t).innerHTML=e[2]:(document.getElementById("photoitem-"+t).innerHTML=n+e[2]+o,wppaProcessFull(e[3],e[4])),jQuery(window).trigger("scroll"),wppaFeAjaxLog("out")):document.getElementById("photoitem-"+t).innerHTML=n+'<span style="color:red;" >Comm error '+r.status+": "+r.statusText+"</span>"+o}}}function wppaAjaxUndeletePhoto(t){wppaFeAjaxLog("in");var a=wppaGetXmlHttp(),e=wppaAjaxUrl+"?action=wppa&wppa-action=undelete-photo&photo-id="+t;e+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,a.open("GET",e,!0),a.send(),a.onreadystatechange=function(){switch(a.readyState){case 1:document.getElementById("remark-"+t).innerHTML="server connection established";break;case 2:document.getElementById("remark-"+t).innerHTML="request received";break;case 3:document.getElementById("remark-"+t).innerHTML="processing request";break;case 4:var e;200==a.status?("ER"==(e=wppaTrim(a.responseText).split("||"))[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("remark-"+t).innerHTML=e[2]:document.getElementById("photoitem-"+t).innerHTML='<div style="padding-left:5px;" >'+e[2]+"</div>",wppaFeAjaxLog("out")):document.getElementById("photoitem-"+t).innerHTML=before+'<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>"+after}}}function wppaAjaxApplyWatermark(t,e,a){wppaFeAjaxLog("in");var p=wppaGetXmlHttp();jQuery("#wppa-water-spin-"+t).css({visibility:"visible"});var n="action=wppa&wppa-action=watermark-photo&photo-id="+t;n+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,e&&(n+="&wppa-watermark-file="+e),a&&(n+="&wppa-watermark-pos="+a),p.open("POST",wppaAjaxUrl,!0),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(n),p.onreadystatechange=function(){var e;4==p.readyState&&(200==p.status?(""!=(e=wppaTrim(p.responseText).split("||"))[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?(document.getElementById("remark-"+t).innerHTML=e[2],setTimeout(function(){document.location.reload(!0)},500)):document.getElementById("remark-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>",jQuery("#wppa-water-spin-"+t).css({visibility:"hidden"}),wppaFeAjaxLog("out")):document.getElementById("remark-"+t).innerHTML='<span style="color:red;" >Comm error '+p.status+": "+p.statusText+"</span>")}}function wppaAjaxUpdateIptc(l,e,t,a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-iptc&photo-id="+l+"&item="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+l).value+"&value="+wppaEncode(t)+"&tagname="+a,async:!0,type:"POST",timeout:6e4,beforeSend:function(e){jQuery("#remark-"+l).html("Working, please wait...")},success:function(e,t,a){var p=wppaTrim(e).split("||");if(""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),"99"===p[1])jQuery("#photoitem-"+l).html(bef+'<span style="color:red">'+p[2]+"</span>"+aft);else{var n,o,r,u=JSON.parse(p[2]);for(n in u)switch(r=u[n],n){case"remark":r=(r=(r=r.replace(/</g,"<")).replace(/>/g,">")).replace(/\\/g,""),o="0"!=p[1]?'<span style="color:red;" >'+r+"</span>":'<span style="color:green;" >'+r+"</span>",jQuery("#remark-"+l).html(o);break;case"photourl":wppaCropper[l]?wppaCropper[l].replace(r):jQuery("#photourl-"+l).attr("src",r),jQuery("#thumba-"+l).attr("href",r);break;case"thumburl":jQuery("#thumburl-"+l).attr("src",r);break;case"magickstack":jQuery("#magickstack-"+l).html(r),0<r.length?jQuery("#imstackbutton-"+l).css("display","inline"):jQuery("#imstackbutton-"+l).css("display","none")}}wppaFeAjaxLog("out")},error:function(e,t,a){jQuery("#remark-"+l).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("wppaAjaxUpdatePhoto failed. Error = "+a+", status = "+t,"force")},complete:function(e,t,a){jQuery("#wppa-admin-spinner").css("display","none"),jQuery(window).trigger("scroll")}})}function wppaAjaxUpdatePhoto(l,i,e,s,c,d){c=c||"",d=d||"",wppaFeAjaxLog("in"),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-photo&photo-id="+l+"&item="+i+"&wppa-nonce="+document.getElementById("photo-nonce-"+l).value+"&value="+wppaEncode(e),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==i&&jQuery("#wppa-photo-spin-"+l).css({visibility:"visible"}),jQuery("#remark-"+l).html("Working, please wait...")},success:function(e,t,a){var p=wppaTrim(e).split("||");if(""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),"99"===p[1])jQuery("#photoitem-"+l).html(c+'<span style="color:red">'+p[2]+"</span>"+d);else{var n,o,r,u=JSON.parse(p[2]);for(n in u)switch(r=u[n],n){case"remark":r=(r=(r=r.replace(/</g,"<")).replace(/>/g,">")).replace(/\\/g,""),o="0"!=p[1]?'<span style="color:red;" >'+r+"</span>":'<span style="color:green;" >'+r+"</span>",s&&(o+=' <span style="color:blue;" >Reloading...</span>'),jQuery("#remark-"+l).html(o);break;case"photourl":wppaCropper[l]?wppaCropper[l].replace(r):jQuery("#photourl-"+l).attr("src",r),jQuery("#thumba-"+l).attr("href",r);break;case"thumburl":jQuery("#thumburl-"+l).attr("src",r);break;case"magickstack":jQuery("#magickstack-"+l).html(r),0<r.length?jQuery("#imstackbutton-"+l).css("display","inline"):jQuery("#imstackbutton-"+l).css("display","none");break;default:jQuery("#"+n+"-"+l).html(r)}}"description"==i&&jQuery("#wppa-photo-spin-"+l).css({visibility:"hidden"}),wppaFeAjaxLog("out")},error:function(e,t,a){jQuery("#remark-"+l).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("wppaAjaxUpdatePhoto failed. Error = "+a+", status = "+t,"force")},complete:function(e,t,a){var p=(p=document.location.href).replace(/&pano-val=./,"");s?setTimeout(function(){document.location.href=p},300):(jQuery("#wppa-admin-spinner").css("display","none"),jQuery(window).trigger("scroll"))}})}function wppaChangeScheduleAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetime-"+e).css("display","inline"):(jQuery(".wppa-datetime-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledtm",Math.rand()))}function wppaChangeScheduleDelAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetimedel-"+e).css("display","inline"):(jQuery(".wppa-datetimedel-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledel",Math.rand()))}var _wppaRefreshAfter=!1,wppaAjaxAlbumCount=0,wppaAlbumUpdateMatrix=new Array;function wppaAjaxUpdateAlbum(e,t,a,p){var n=0==jQuery("#wppaalbumdesc:visible").length;jQuery("#wppaalbumdesc-html").click();for(var o=wppaAlbumUpdateMatrix.length,r=0,u=!1,l=-1;r<o;)wppaAlbumUpdateMatrix[r][0]==e&&wppaAlbumUpdateMatrix[r][1]==t&&(u=!0,l=r),r++;u||(wppaAlbumUpdateMatrix[o]=[e,t,"undefined",!1,!1,p],l=o),wppaAlbumUpdateMatrix[l][3]="number"==typeof a?a:a.value,wppaAlbumUpdateMatrix[l][5]=p,wppaAjaxUpdateAlbumMonitor(n)}function wppaAjaxUpdateAlbumMonitor(e){for(var t=wppaAlbumUpdateMatrix.length,a=0;a<t;)wppaAlbumUpdateMatrix[a][2]==wppaAlbumUpdateMatrix[a][3]||wppaAlbumUpdateMatrix[a][4]||(wppaAlbumUpdateMatrix[a][4]=!0,_wppaAjaxUpdateAlbum(wppaAlbumUpdateMatrix[a][0],wppaAlbumUpdateMatrix[a][1],wppaAlbumUpdateMatrix[a][3],e,wppaAlbumUpdateMatrix[a][5])),a++;e&&jQuery("#wppaalbumdesc-tmce").click()}function _wppaAjaxUpdateAlbum(r,u,l,i,s){wppaAjaxAlbumCount++;jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-album&album-id="+r+"&item="+u+"&wppa-nonce="+document.getElementById("album-nonce-"+r).value+"&value="+wppaEncode(l),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==u&&jQuery("#wppa-album-spin").css({visibility:"visible"}),jQuery("#albumstatus-"+r).html("Working, please wait... ("+wppaAjaxAlbumCount+")")},success:function(e,t,a){e=wppaTrim(e).split("||");if(wppaAjaxAlbumCount--,""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?0==wppaAjaxAlbumCount?jQuery("#albumstatus-"+r).html(e[2]):jQuery("#albumstatus-"+r).html("Working, please wait... ("+wppaAjaxAlbumCount+")"):jQuery("#albumstatus-"+r).html='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",void 0!==e[3]&&wppaProcessFull(e[3],e[4]),s&&"0"==e[1])return jQuery("#albumstatus-"+r).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-admin-spinner").fadeIn(),void setTimeout(function(){wppaReload()},100);"cover_linktype"==u&&("manual"==l?jQuery("#link-url-tr").show():jQuery("#link-url-tr").hide()),"description"==u&&jQuery("#wppa-album-spin").css({visibility:"hidden"});for(var p=0,n=-1,o=wppaAlbumUpdateMatrix.length;p<o;)wppaAlbumUpdateMatrix[p][0]==r&&wppaAlbumUpdateMatrix[p][1]==u&&(n=p),p++;wppaAlbumUpdateMatrix[n][2]=l||0,wppaAlbumUpdateMatrix[n][4]=!1,wppaAlbumUpdateMatrix[n][5]=!1,wppaAjaxUpdateAlbumMonitor(i)},error:function(e,t,a){wppaAjaxAlbumCount--,jQuery("#albumstatus-"+r).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("_wppaAjaxUpdateAlbum failed. Error = "+a+", status = "+t,"force")},complete:function(e,t,a){}})}function wppaProcessFull(e,t){"full"==e&&(jQuery("#full").css("display",""),jQuery("#notfull").css("display","none")),"notfull"==e&&(jQuery("#full").css("display","none"),0<t?jQuery("#notfull").attr("value",wppaUploadToThisAlbum+" (max "+t+")"):jQuery("#notfull").attr("value",wppaUploadToThisAlbum),jQuery("#notfull").css("display",""))}function wppaAjaxUpdateCommentStatus(t,a,e){var p=wppaGetXmlHttp(),e=wppaAjaxUrl+"?action=wppa&wppa-action=update-comment-status&wppa-photo-id="+t+"&wppa-comment-id="+a+"&wppa-comment-status="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;p.onreadystatechange=function(){var e;4==p.readyState&&(200==p.status?(""!=(e=wppaTrim(p.responseText).split("||"))[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?jQuery("#remark-"+t).html(e[2]):jQuery("#remark-"+t).html('<span style="color:red">'+e[2]+"</span>"),jQuery("#wppa-comment-spin-"+a).css("visibility","hidden")):jQuery("#remark-"+t).html('<span style="color:red;" >Comm error '+p.status+": "+p.statusText+"</span>"))},p.open("GET",e,!0),p.send()}function wppaAjaxUpdateOptionCheckBox(t,e){var a=wppaGetXmlHttp(),p=wppaAjaxUrl+"?action=wppa&wppa-action=update-option&wppa-option="+t;p+="&wppa-nonce="+document.getElementById("wppa-nonce").value,e.checked?p+="&value=yes":p+="&value=no",a.onreadystatechange=function(){switch(a.readyState){case 1:case 2:case 3:jQuery("#img_"+t).attr("src",wppaImageDirectory+"spinner.gif");break;case 4:var e=wppaTrim(a.responseText).split("||");""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),404!=a.status?("0"===e[1]?(jQuery("#img_"+t).attr("src",wppaImageDirectory+"tick.png"),jQuery("#img_"+t).attr("title",e[2])):(jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Error #"+e[1]+", message: "+e[2]+", status: "+a.status)),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))):(jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Communication error, status = "+a.status)),wppaCheckInconsistencies()}},a.open("GET",p,!0),a.send()}var wppaAlwaysContinue=100;function wppaMaintenanceProc(p,e,r){if(!r&&!e&&"yes"==document.getElementById(p+"_continue").value)return document.getElementById(p+"_continue").value="no",document.getElementById(p+"_button").value="Start!",void(0<jQuery("#"+p+"_togo").html()&&(jQuery("#"+p+"_status").html("Pausing..."),jQuery("#"+p+"_button").css("display","none")));r||(document.getElementById(p+"_continue").value="yes",document.getElementById(p+"_button").value="Stop!",""==jQuery("#"+p+"_status").html()&&jQuery("#"+p+"_status").html("Wait...")),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenance&slug="+p+"&wppa-nonce="+jQuery("#wppa-nonce").val()+(r?"&wppa-cron=1":""),async:!0,type:"POST",timeout:3e5,beforeSend:function(e){},success:function(e,t,a){var p=e.split("||"),n=p[1],o=!1;return n?(10<p[0].length&&(alert("An error occurred:\n"+p[0]),o=!0),jQuery("#"+n+"_status").html(p[2]),jQuery("#"+n+"_togo").html(p[3]),jQuery("#"+n+"_button").css("display",""),o||"0"==p[3]?"reload"==p[4]?(alert("This page will now be reloaded to finish the operation. Please stay tuned..."),void wppaReload()):void setTimeout("wppaMaintenanceProc('"+n+"', false)",20):void(document.getElementById(n+"_continue")&&"yes"==document.getElementById(n+"_continue").value?setTimeout("wppaMaintenanceProc('"+n+"', true)",20):(r||jQuery("#"+n+"_status").html("Pending"),setTimeout(function(){wppaAjaxUpdateTogo(n)},1e3)))):(alert("The server returned unexpected output:\n"+e+"\nIf the current procedure has a Skip One button, press it before retrying. Reloading page..."),void wppaReload())},error:function(e,t,a){wppaConsoleLog("wppaMaintenanceProc failed. Slug = "+p+", Error = "+a+", status = "+t,"force"),jQuery("#"+p+"_status").html("Server error #"+(11-wppaAlwaysContinue));t=!1;--wppaAlwaysContinue<1&&(t=confirm("10 Server errors happened.\nDo you want to continue?"))&&(wppaAlwaysContinue=100),(t||0<wppaAlwaysContinue)&&("wppa_remake"==p&&wppaAjaxUpdateOptionValue("wppa_remake_skip_one",0),"wppa_regen_thumbs"==p&&wppaAjaxUpdateOptionValue("wppa_regen_thumbs_skip_one",0),"wppa_create_o1_files"==p&&wppaAjaxUpdateOptionValue("wppa_create_o1_files_skip_one",0),setTimeout("wppaMaintenanceProc('"+p+"', true)",2e3))},complete:function(e,t,a){}})}function wppaAjaxPopupWindow(e){switch(e){case"wppa_list_index":0;break;case"wppa_list_errorlog":0;break;case"wppa_list_rating":0;break;case"wppa_list_session":0;break;case"wppa_list_comments":0}var t=.9*wppaWindowWidth(),a=wppaGetXmlHttp(),p=wppaAjaxUrl,e="action=wppa&wppa-action=maintenancepopup&slug="+e;e+="&wppa-nonce="+document.getElementById("wppa-nonce").value,a.open("POST",p,!1),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(e),4==a.readyState&&200==a.status&&(a=(e=wppaEntityDecode(a.responseText).split("|"))[0],e[0]="",e=e.join("|").substring(1),t={modal:!0,resizable:!0,width:t,show:{effect:"fadeIn",duration:800},closeText:wppaCloseText},jQuery("#wppa-modal-container").html(e).dialog(t).dialog("open"),jQuery("#wppa-modal-container").css({width:"100%"}),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"200200"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"50px"}),jQuery(".ui-dialog-title").html("<h2>"+a+"</h2>"),jQuery(".ui-button").css({position:"absolute",top:"12px",right:"12px"}),jQuery(".ui-button").attr("title",wppaCloseText),jQuery(".ui-widget-overlay").css({backgroundColor:"transparent"}),setTimeout(function(){jQuery("#wppa-maintenance-list").niceScroll&&jQuery("#wppa-maintenance-list").niceScroll(".wppa-nicewrap",{})},1e3))}function wppaAjaxUpdateOptionValue(l,e,t){var a="action=wppa&wppa-action=update-option&wppa-option="+wppaEncode(l)+"&wppa-nonce="+document.getElementById("wppa-nonce").value;0!=e&&(a+="number"==typeof e?"&value="+e:t?"&value="+wppaGetSelectionEnumByClass("."+l,","):"&value="+wppaEncode(e.value)),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e5,beforeSend:function(e){jQuery("#img_"+l.replace("#","H")).attr("src",wppaImageDirectory+"spinner.gif")},success:function(e,t,a){e=wppaTrim(e).split("||");if(""!=e[0])alert("The server returned unexpected output:\n"+e[0]);else if("0"===e[1]?(jQuery("#img_"+l.replace("#","H")).attr("src",wppaImageDirectory+"tick.png"),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))):(jQuery("#img_"+l.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),e[3]&&alert(e[3])),jQuery("#img_"+l.replace("#","H")).attr("title",e[2]),e[4])for(var p,n,o,r=e[4].split(";"),u=0;u<r.length;)p=r[u].split(":"),n=jQuery("#"+p[0]).html(),o=p[1],""!=n&&""==o&&(o='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+p[0]).html(o),u++},error:function(e){jQuery("#img_"+l.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+l.replace("#","H")).attr("title","Communication error")},complete:function(e){wppaCheckInconsistencies(),"spinner_shape"!=l&&"icon_corner_style"!=l||(wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")),"svg_color"!=l&&"svg_bg_color"!=l||wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),"ovl_svg_color"!=l&&"ovl_svg_bg_color"!=l||wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")}})}function wppaEncode(e){if(void 0!==e){if("number"==typeof e)return e;for(var t=(p=(p=e.replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0,p="";a<t.length;)p+=t[a],++a<t.length&&(p+="||PLUS||");return p}}function wppaCheckInconsistencies(){jQuery("#use_thumb_popup").prop("checked")&&"lightbox"==jQuery("#thumb_linktype").val()?jQuery(".popup-lightbox-err").css("display",""):jQuery(".popup-lightbox-err").css("display","none")}function wppaGetXmlHttp(){return xmlhttp=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),xmlhttp}function wppaPhotoStatusChange(e){if(jQuery("#psdesc-"+e).css({display:"none"}),elm=document.getElementById("status-"+e),elm){if("pending"!=elm.value&&"scheduled"!=elm.value||jQuery("#photoitem-"+e).css({backgroundColor:"#ffebe8",borderColor:"#cc0000"}),"publish"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffe0",borderColor:"#e6db55"}),"featured"==elm.value){jQuery("#photoitem-"+e).css({backgroundColor:"#e0ffe0",borderColor:"#55ee55"});var t=document.getElementById("pname-"+e).value.split(".");if(1<t.length)for(var a=0;a<t.length;)"jpg"!=t[a]&&"JPG"!=t[a]||jQuery("#psdesc-"+e).css({display:""}),a++}"gold"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#eeeecc",borderColor:"#ddddbb"}),"silver"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffff",borderColor:"#eeeeee"}),"bronze"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ddddbb",borderColor:"#ccccaa"}),"scheduled"==elm.value?jQuery(".wppa-datetime-"+e).css("display",""):jQuery(".wppa-datetime-"+e).css("display","none"),jQuery("#scheduledel-"+e).prop("checked")?jQuery(".wppa-del-datetime-"+e).css("display",""):jQuery(".wppa-del-datetime-"+e).css("display","none")}}function wppaSetComBgCol(e){"approved"==jQuery("#com-stat-"+e).val()?jQuery("#com-tr-"+e).css({backgroundColor:"#ffffe0"}):jQuery("#com-tr-"+e).css({backgroundColor:"#ffebe8"})}function wppaAddCat(e,t){wppaAddTag(e,t)}function wppaAddTag(e,t){t=document.getElementById(t);e&&(t.value?t.value+=","+e:t.value=e,"-clear-"==e&&(t.value=""))}function wppaRefresh(e){e=new String(document.location).split("#")[0]+"#"+e;document.location=e}function wppaReload(e){e?(url=document.location.href.split("#"),document.location.href=url[0]+e,setTimeout(function(){document.location.reload(!0)},10)):document.location.reload(!0)}var wppaFeCount=0;function wppaFeAjaxLog(e){"in"==e&&(0==wppaFeCount&&jQuery("#wppa-fe-exit").css("display","none"),wppaFeCount++,jQuery("#wppa-fe-count").html(wppaFeCount)),"out"==e&&(1==wppaFeCount&&(jQuery("#wppa-fe-count").html(""),jQuery("#wppa-fe-exit").css("display","inline"),wppaFeCount--),1<wppaFeCount&&(wppaFeCount--,jQuery("#wppa-fe-count").html(wppaFeCount)))}function wppaArrayToEnum(e,t){temp=e.sort(function(e,t){return e-t});for(var a,p="",n=-1,o=-2,r=0,u=!1,l=0;l<e.length;)0!=(a=e[l].valueOf())&&(r=n,a==++r?u=!0:u?(p+=n==o?t+n+t+a:t+t+n+t+a,u=!1):p+=t+a,u||(o=a,o++),n=a),l++;for(u&&(p+=".."+n);"."==p.substr(0,1);)p=p.substr(1);for(;p.substr(0,1)==t;)p=p.substr(1);return p}function wppaGetSelEnumToId(e,t){p=jQuery("."+e);var a=[];for(i=0,j=0;i<p.length;)p[i].selected&&(a[j]=p[i].value,j++),i++;jQuery("#"+t).val(wppaArrayToEnum(a,"."))}function wppaGetSelectionEnumByClass(e,t){var a,p=[],n=0,o=0;for(t=t||".",a=jQuery(e),o=n=0;n<a.length;)a[n].selected&&(p[o]=a[n].value,o++),n++;return wppaArrayToEnum(p,t)}function wppaEditSearch(e,t){t=jQuery("#"+t).val();0==t.length?alert("Please enter searchstring"):document.location.href=e+"&wppa-searchstring="+t}function wppaEditTrash(e){document.location.href=e}function wppaExportDbTable(p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=export-table&table="+p,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){jQuery("#"+p+"-spin").css("display","inline")},success:function(e,t,a){e=e.split("||");"0"==e[1]?document.location=e[2]:alert("Error: "+e[1]+"\n\n"+e[2])},error:function(e,t,a){alert("Export Db Table "+p+" failed. Error = "+a+", status = "+t)},complete:function(e,t,a){jQuery("#"+p+"-spin").css("display","none")}})}function wppaDismissAdminNotice(e,t){wppaAjaxUpdateOptionCheckBox(e,t),jQuery("#wppa-wr-").css("display","none")}function wppaAjaxUpdateTogo(n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=gettogo&slug="+n,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){wppaConsoleLog("Requesting togo for slug "+n,"force")},success:function(e,t,a){var p=e.split("|");jQuery("#"+n+"_togo").html(p[0]);e=jQuery("#"+n+"_status").html(),p=p[1];""!=e&&""==p&&(p='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+n+"_status").html(p),setTimeout(function(){wppaAjaxUpdateTogo(n)},1e3)},error:function(e){},complete:function(e){}})}function wppaIsEmpty(e){return(null==e||void 0===e||""==e||0==e)&&!0}function wppaTimedConfirm(e){var t={modal:!0,resizable:!1,width:400,show:{effect:"fadeIn",duration:800},closeText:"X",buttons:[{text:"NO",click:function(){jQuery(this).dialog("close")}},{text:"YES",click:function(){jQuery(this).dialog("close")}}]};jQuery("#wppa-modal-container").html(e).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"200200"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({float:"right",position:"relative",bottom:"40px"}),jQuery(".ui-dialog-titlebar-close").css({display:"none"}),jQuery(".ui-widget-overlay").css({backgroundColor:"transparent"}),jQuery(".ui-button").attr("title",wppaCloseText),setTimeout(function(){jQuery(".ui-button").trigger("click")},6e4)}function wppaAjaxGetSpinnerHtml(e,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-option&wppa-option=getspinnerpreview&type="+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,a){e=e.split("|");jQuery("#"+p).html(e[0])},error:function(e){},complete:function(e){}})}function wppaDragHorizon(t){var a=0,p=0;function n(e){(e=e||window.event).preventDefault(),a=p-e.clientY,p=e.clientY,t.style.top=t.offsetTop-a+"px"}function o(){document.onmouseup=null,document.onmousemove=null}t.onmousedown=function(e){(e=e||window.event).preventDefault(),pos3=e.clientX,p=e.clientY,document.onmouseup=o,document.onmousemove=n}}function wppaBulkActionChange(e,t){wppa_setCookie("wppa_bulk_action",e.value,365),"wppa-bulk-move-to"==e.value||"wppa-bulk-copy-to"==e.value?jQuery("#wppa-bulk-album").css("display","inline"):jQuery("#wppa-bulk-album").css("display","none"),"wppa-bulk-status"==e.value?jQuery("#wppa-bulk-status").css("display","inline"):jQuery("#wppa-bulk-status").css("display","none"),"wppa-bulk-owner"==e.value?jQuery("#wppa-bulk-owner").css("display","inline"):jQuery("#wppa-bulk-owner").css("display","none")}function wppaBulkDoitOnClick(){var e=jQuery(".wppa-bulk-photo"),t=0;for(i=0;i<e.length;i++)e[i].checked&&t++;if(0==t)return alert("No photos selected"),!1;var a=document.getElementById("wppa-bulk-action").value;switch(a){case"":return alert("No action selected"),!1;case"wppa-bulk-delete":case"wppa-bulk-delete-immediate":case"wppa-bulk-undelete":break;case"wppa-bulk-move-to":case"wppa-bulk-copy-to":if(0==document.getElementById("wppa-bulk-album").value)return alert("No album selected"),!1;break;case"wppa-bulk-status":if(0==document.getElementById("wppa-bulk-status").value)return alert("No status selected"),!1;break;case"wppa-bulk-owner":if(0==documnet.getElementById("wppa-bulk-owner").value)return alert("No new owner selected"),!1;break;default:return alert("Unimplemented action requested: "+a),!1}return!0}function wppaSetThumbsize(e){e=e.value;wppa_setCookie("wppa_bulk_thumbsize",e,365),jQuery(".wppa-bulk-thumb").css("max-width",e+"px"),jQuery(".wppa-bulk-thumb").css("max-height",e/2+"px"),jQuery(".wppa-bulk-dec").css("height",e/2+"px")}function wppaToggleConfirmDelete(e){jQuery(e).prop("checked")?wppa_setCookie("wppaConfirmDelete","checked",365):wppa_setCookie("wppaConfirmDelete","unchecked",365)}function wppaToggleConfirmMove(e){jQuery(e).prop("checked")?wppa_setCookie("wppaConfirmMove","checked",365):wppa_setCookie("wppaConfirmMove","unchecked",365)}function wppaSetConfirmDelete(e){"checked"==wppa_getCookie("wppaConfirmDelete")?jQuery("#"+e).prop("checked",!0):jQuery("#"+e).prop("checked",!1)}function wppaSetConfirmMove(e){"checked"==wppa_getCookie("wppaConfirmMove")?jQuery("#"+e).prop("checked",!0):jQuery("#"+e).prop("checked",!1)}function wppaAjaxReplaceLog(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenancepopup&slug=wppa_list_errorlog&raw=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:1e5,beforeSend:function(e){jQuery("#wppa-spinner").show()},success:function(e,t,a){e=wppaEntityDecode(e),jQuery("#wppa-logbody").html(e),jQuery("#wppa-spinner").hide()}})}function wppaTestAdminReady(){"complete"===document.readyState?jQuery("#wppa-admin-spinner").fadeOut():setTimeout("wppaTestAdminReady()",200)}function wppaCommentAdminUpdateHref(e){var t=encodeURIComponent(jQuery("#commenttext-"+e).val()),a=jQuery("#href-"+e).attr("href"),p=a.split("commenttext=");p[1]=t,a=p[0]+"commenttext="+p[1],jQuery("#href-"+e).attr("href",a),jQuery("#href-"+e).css("display","inline")}jQuery(document).ready(function(){var e;document.getElementById("wppa-bulk-action")&&(e=wppa_getCookie("wppa_bulk_action"),"wppa-bulk-move-to"!=(document.getElementById("wppa-bulk-action").value=e)&&"wppa-bulk-copy-to"!=e||(jQuery("#wppa-bulk-album").css("display","inline"),document.getElementById("wppa-bulk-album").value=wppa_getCookie("wppa_bulk_album")),"wppa-bulk-status"==e&&(jQuery("#wppa-bulk-status").css("display","inline"),document.getElementById("wppa-bulk-status").value=wppa_getCookie("wppa_bulk_status")),"wppa-bulk-owner"==e&&(jQuery("#wppa-bulk-owner").css("display","inline"),document.getElementById("wppa-bulk-owner").value=wppa_getCookie("wppa_bulk_owner")))}),jQuery(document).ready(function(){setTimeout("wppaTestAdminReady()",200)});
|
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 |
|
@@ -581,7 +581,7 @@ function wppa_admin_page_links( $curpage, $pagesize, $count, $link, $extra = ''
|
|
581 |
$i = '1';
|
582 |
while ( $i <= $npages ) {
|
583 |
if ( $i == $curpage ) {
|
584 |
-
$result .= '<option selected
|
585 |
}
|
586 |
else {
|
587 |
$result .= '<option value="' . esc_url( $pagurl . $i . $extra ) . '"' . ( $i == $npages ? ' title="' . esc_attr( $lastpagecount ) . '"' : '' ) . ' >' . $i . '</option>';
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* gp admin functions
|
6 |
+
* Version 8.1.08.001
|
7 |
*
|
8 |
*/
|
9 |
|
581 |
$i = '1';
|
582 |
while ( $i <= $npages ) {
|
583 |
if ( $i == $curpage ) {
|
584 |
+
$result .= '<option selected >' . $i . '</option>';
|
585 |
}
|
586 |
else {
|
587 |
$result .= '<option value="' . esc_url( $pagurl . $i . $extra ) . '"' . ( $i == $npages ? ' title="' . esc_attr( $lastpagecount ) . '"' : '' ) . ' >' . $i . '</option>';
|
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 |
|
@@ -228,7 +228,7 @@ global $wppa;
|
|
228 |
$desc = sanitize_text_field( $item['description'] );
|
229 |
|
230 |
if ( $desc != $last ) {
|
231 |
-
$sel = ( $oldvalue && $oldvalue == $desc ) ? 'selected
|
232 |
if ( $sel ) $result .= 'selected:' . $oldvalue;
|
233 |
$ddesc = strlen( $desc ) > '32' ? substr( $desc, 0, 30 ) . '...' : $desc;
|
234 |
$result .= '
|
@@ -342,7 +342,7 @@ global $wppa;
|
|
342 |
|
343 |
if ( $desc ) {
|
344 |
|
345 |
-
$sel = ( $oldvalue && $oldvalue == $desc ) ? 'selected
|
346 |
$ddesc = strlen( $desc ) > '42' ? substr( $desc, 0, 40 ) . '...' : $desc;
|
347 |
if ( wppa_is_valid_rational( $ddesc, false ) ) {
|
348 |
$t = explode( '/', $ddesc );
|
@@ -495,7 +495,7 @@ global $wppa;
|
|
495 |
if ( wppa_switch( 'search_comments' ) ) wppa_index_update( 'photo', $photoid );
|
496 |
}
|
497 |
wppa( 'no_esc', true );
|
498 |
-
|
499 |
wppa_exit();
|
500 |
break;
|
501 |
|
@@ -1035,13 +1035,13 @@ global $wppa;
|
|
1035 |
|
1036 |
case 'tinymcedialog':
|
1037 |
$result = wppa_make_tinymce_dialog();
|
1038 |
-
|
1039 |
wppa_exit();
|
1040 |
break;
|
1041 |
|
1042 |
case 'tinymcephotodialog':
|
1043 |
$result = wppa_make_tinymce_photo_dialog();
|
1044 |
-
|
1045 |
wppa_exit();
|
1046 |
break;
|
1047 |
|
@@ -1571,6 +1571,9 @@ global $wppa;
|
|
1571 |
if ( $item == 'description' ) {
|
1572 |
$value = wppa_get( 'value', '', 'html' );
|
1573 |
}
|
|
|
|
|
|
|
1574 |
else {
|
1575 |
$value = wppa_get( 'value', '', 'text' );
|
1576 |
}
|
@@ -1734,6 +1737,9 @@ global $wppa;
|
|
1734 |
case 'cover_linkpage':
|
1735 |
$itemname = __( 'Link to' , 'wp-photo-album-plus');
|
1736 |
break;
|
|
|
|
|
|
|
1737 |
case 'owner':
|
1738 |
$itemname = __( 'Owner' , 'wp-photo-album-plus');
|
1739 |
if ( $value != '--- public ---' && ! wppa_get_user_by( 'login', $value ) ) {
|
2 |
/* wppa-ajax.php
|
3 |
*
|
4 |
* Functions used in ajax requests
|
5 |
+
* Version 8.1.08.001
|
6 |
*
|
7 |
*/
|
8 |
|
228 |
$desc = sanitize_text_field( $item['description'] );
|
229 |
|
230 |
if ( $desc != $last ) {
|
231 |
+
$sel = ( $oldvalue && $oldvalue == $desc ) ? 'selected' : '';
|
232 |
if ( $sel ) $result .= 'selected:' . $oldvalue;
|
233 |
$ddesc = strlen( $desc ) > '32' ? substr( $desc, 0, 30 ) . '...' : $desc;
|
234 |
$result .= '
|
342 |
|
343 |
if ( $desc ) {
|
344 |
|
345 |
+
$sel = ( $oldvalue && $oldvalue == $desc ) ? 'selected' : '';
|
346 |
$ddesc = strlen( $desc ) > '42' ? substr( $desc, 0, 40 ) . '...' : $desc;
|
347 |
if ( wppa_is_valid_rational( $ddesc, false ) ) {
|
348 |
$t = explode( '/', $ddesc );
|
495 |
if ( wppa_switch( 'search_comments' ) ) wppa_index_update( 'photo', $photoid );
|
496 |
}
|
497 |
wppa( 'no_esc', true );
|
498 |
+
wppa_echo( wppa_comment_html( $photoid, $comment_allowed ) ); // Retrieve the new commentbox content
|
499 |
wppa_exit();
|
500 |
break;
|
501 |
|
1035 |
|
1036 |
case 'tinymcedialog':
|
1037 |
$result = wppa_make_tinymce_dialog();
|
1038 |
+
wppa_echo( $result );
|
1039 |
wppa_exit();
|
1040 |
break;
|
1041 |
|
1042 |
case 'tinymcephotodialog':
|
1043 |
$result = wppa_make_tinymce_photo_dialog();
|
1044 |
+
wppa_echo( $result );
|
1045 |
wppa_exit();
|
1046 |
break;
|
1047 |
|
1571 |
if ( $item == 'description' ) {
|
1572 |
$value = wppa_get( 'value', '', 'html' );
|
1573 |
}
|
1574 |
+
elseif( $item == 'cover_link' ) {
|
1575 |
+
$value = wppa_get( 'value', '', 'url' );
|
1576 |
+
}
|
1577 |
else {
|
1578 |
$value = wppa_get( 'value', '', 'text' );
|
1579 |
}
|
1737 |
case 'cover_linkpage':
|
1738 |
$itemname = __( 'Link to' , 'wp-photo-album-plus');
|
1739 |
break;
|
1740 |
+
case 'cover_link':
|
1741 |
+
$itemname = __( 'Link target (url)', 'wp-photo-album-plus' );
|
1742 |
+
break;
|
1743 |
case 'owner':
|
1744 |
$itemname = __( 'Owner' , 'wp-photo-album-plus');
|
1745 |
if ( $value != '--- public ---' && ! wppa_get_user_by( 'login', $value ) ) {
|
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 |
|
@@ -29,7 +29,7 @@ global $wppa_revno;
|
|
29 |
// Delete trashed comments
|
30 |
$wpdb->query( "DELETE FROM $wpdb->wppa_comments WHERE status = 'trash'" );
|
31 |
|
32 |
-
$sel = 'selected
|
33 |
|
34 |
// warn if the uploads directory is no writable
|
35 |
if ( ! is_writable( WPPA_UPLOAD_PATH ) ) {
|
@@ -396,6 +396,7 @@ global $wppa_revno;
|
|
396 |
$cats = stripslashes( trim( $albuminfo['cats'], ',' ) );
|
397 |
$default_tags = trim( $albuminfo['default_tags'], ',' );
|
398 |
$cover_linktype = $albuminfo['cover_linktype'];
|
|
|
399 |
$sname = $albuminfo['sname'];
|
400 |
$zoomable = $albuminfo['zoomable'];
|
401 |
$displayopts = $albuminfo['displayopts'];
|
@@ -730,7 +731,7 @@ global $wppa_revno;
|
|
730 |
title="' . esc_attr( $title ) . '"
|
731 |
>';
|
732 |
foreach ( array_keys( $options ) as $key ) {
|
733 |
-
$sel = $values[$key] == $p_order_by ? ' selected
|
734 |
$result .= '<option value="' . $values[$key] . '"' . $sel . ' >' . $options[$key] . '</option>';
|
735 |
}
|
736 |
$result .= '
|
@@ -738,7 +739,7 @@ global $wppa_revno;
|
|
738 |
}
|
739 |
|
740 |
// Child album order
|
741 |
-
$sel = ' selected
|
742 |
$opts = array(
|
743 |
__( '--- default ---', 'wp-photo-album-plus' ),
|
744 |
__( 'Random', 'wp-photo-album-plus' ),
|
@@ -775,7 +776,7 @@ global $wppa_revno;
|
|
775 |
// Alternative thumbnail size
|
776 |
if ( ! wppa_switch( 'alt_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
|
777 |
$title = sprintf( __( 'Alternate thumbnail size is set in Basic settings -> Thumbnails -> I -> Item 2 and is currently set to %s', 'wp-photo-album-plus' ), wppa_opt( 'thumbsize_alt' ) );
|
778 |
-
$sel = ' selected
|
779 |
$result .= __( 'Use alt thumbsize', 'wp-photo-album-plus' ) . ':
|
780 |
<select
|
781 |
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'alt_thumbsize\', this )"
|
@@ -792,7 +793,7 @@ global $wppa_revno;
|
|
792 |
|
793 |
// Cover type
|
794 |
if ( ! wppa_switch( 'covertype_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
|
795 |
-
$sel = ' selected
|
796 |
$title = sprintf( __( 'The default is set in Basic settings -> Albums -> III -> Item 4 and is set to %s', 'wp-photo-album-plus' ), wppa_opt( 'cover_type' ) );
|
797 |
$result .=
|
798 |
__( 'Cover Type', 'wp-photo-album-plus' ) . ':
|
@@ -837,7 +838,7 @@ global $wppa_revno;
|
|
837 |
$lims = array( '0', '0' );
|
838 |
}
|
839 |
if ( wppa_user_is( 'administrator' ) ) {
|
840 |
-
$sel = ' selected
|
841 |
$title = __( 'Set the upload limit (0 means unlimited).', 'wp-photo-album-plus' );
|
842 |
$result .= '
|
843 |
<input
|
@@ -903,9 +904,9 @@ global $wppa_revno;
|
|
903 |
$result .=
|
904 |
__( 'Photos are zoomable:', 'wp-photo-album-plus' ) . '
|
905 |
<select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'zoomable\', this )" title="' . esc_attr( $title ) . '" >
|
906 |
-
<option value="" '.($zoomable==''?'selected
|
907 |
-
<option value="on" '.($zoomable=='on'?'selected
|
908 |
-
<option value="off" '.($zoomable=='off'?'selected
|
909 |
</select> ';
|
910 |
|
911 |
// Overrulable display options / next 4 items
|
@@ -925,9 +926,9 @@ global $wppa_revno;
|
|
925 |
$result .=
|
926 |
__( 'Display photo names:', 'wp-photo-album-plus' ) . '
|
927 |
<select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt0\', this )" title="' . esc_attr( $title ) . '" >
|
928 |
-
<option value="0" '.($disp_opt[0]=='0'?'selected
|
929 |
-
<option value="1" '.($disp_opt[0]=='1'?'selected
|
930 |
-
<option value="-1" '.($disp_opt[0]=='-1'?'selected
|
931 |
</select>';
|
932 |
|
933 |
// Display description
|
@@ -937,9 +938,9 @@ global $wppa_revno;
|
|
937 |
$result .=
|
938 |
__( 'Display photo descriptions:', 'wp-photo-album-plus' ) . '
|
939 |
<select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt1\', this )" title="' . esc_attr( $title ) . '" >
|
940 |
-
<option value="0" '.($disp_opt[1]=='0'?'selected
|
941 |
-
<option value="1" '.($disp_opt[1]=='1'?'selected
|
942 |
-
<option value="-1" '.($disp_opt[1]=='-1'?'selected
|
943 |
</select>';
|
944 |
|
945 |
// Display rating
|
@@ -949,9 +950,9 @@ global $wppa_revno;
|
|
949 |
$result .=
|
950 |
__( 'Display rating:', 'wp-photo-album-plus' ) . '
|
951 |
<select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt2\', this )" title="' . esc_attr( $title ) . '" >
|
952 |
-
<option value="0" '.($disp_opt[2]=='0'?'selected
|
953 |
-
<option value="1" '.($disp_opt[2]=='1'?'selected
|
954 |
-
<option value="-1" '.($disp_opt[2]=='-1'?'selected
|
955 |
</select>';
|
956 |
|
957 |
// Display comments
|
@@ -961,9 +962,9 @@ global $wppa_revno;
|
|
961 |
$result .=
|
962 |
__( 'Display comments:', 'wp-photo-album-plus' ) . '
|
963 |
<select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt3\', this )" title="' . esc_attr( $title ) . '" >
|
964 |
-
<option value="0" '.($disp_opt[3]=='0'?'selected
|
965 |
-
<option value="1" '.($disp_opt[3]=='1'?'selected
|
966 |
-
<option value="-1" '.($disp_opt[3]=='-1'?'selected
|
967 |
</select>';
|
968 |
|
969 |
// Watermark
|
@@ -993,7 +994,7 @@ global $wppa_revno;
|
|
993 |
type="checkbox"
|
994 |
id="scheduledel"' .
|
995 |
( $scheduledel ? ' checked="checked"' : '' ) .
|
996 |
-
( $may_change ? '' : ' disabled
|
997 |
onchange="wppaChangeScheduleDelAlbum( ' . $id . ', this );"
|
998 |
/>
|
999 |
|
@@ -1175,7 +1176,7 @@ global $wppa_revno;
|
|
1175 |
' . __( 'Link type:', 'wp-photo-album-plus' ) . '
|
1176 |
</td>
|
1177 |
<td>';
|
1178 |
-
$sel = ' selected
|
1179 |
$lt = $cover_linktype;
|
1180 |
$result .= '
|
1181 |
<select onchange="wppaAjaxUpdateAlbum( '. $id . ', \'cover_linktype\', this )" >
|
@@ -1185,6 +1186,7 @@ global $wppa_revno;
|
|
1185 |
<option value="slide"' . ( $lt == 'slide' ? $sel : '' ) . ' >' . __( 'the album photos as slideshow', 'wp-photo-album-plus' ) . '</option>
|
1186 |
<option value="page"' . ( $lt == 'page' ? $sel : '' ) . ' >' . __( 'the link page with a clean url', 'wp-photo-album-plus' ) . '</option>
|
1187 |
<option value="none"' . ( $lt == 'none' ? $sel : '' ) . ' >' . __( 'no link at all', 'wp-photo-album-plus' ) . '</option>
|
|
|
1188 |
</select>
|
1189 |
<br>
|
1190 |
<span class="description">';
|
@@ -1201,6 +1203,34 @@ global $wppa_revno;
|
|
1201 |
</td>
|
1202 |
</tr>';
|
1203 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1204 |
// Link page
|
1205 |
if ( ! wppa_switch( 'link_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
|
1206 |
$result .= '
|
@@ -1235,7 +1265,7 @@ global $wppa_revno;
|
|
1235 |
$result .= '
|
1236 |
<option
|
1237 |
value="' . $page['ID'] . '"' .
|
1238 |
-
( $linkpage == $page['ID'] ? ' selected
|
1239 |
' >' .
|
1240 |
__( htmlspecialchars( $page['post_title'] ) ) .
|
1241 |
( $page['post_type'] == 'post' ? ' (' . htmlspecialchars( $page['post_date'] ) . ')' : '' ) .
|
@@ -1777,7 +1807,7 @@ global $wppa_revno;
|
|
1777 |
$result .= '
|
1778 |
<option value="" ></option>';
|
1779 |
foreach( $opts as $opt ) {
|
1780 |
-
$result .= '<option value="' . $opt . '" ' . ( $f == $opt ? 'selected
|
1781 |
}
|
1782 |
$result .=
|
1783 |
'</select>';
|
@@ -2890,31 +2920,31 @@ global $wpdb;
|
|
2890 |
}
|
2891 |
|
2892 |
$output .= '
|
2893 |
-
<option value="0" ' . ( $cur == '0' ? 'selected
|
2894 |
__( '--- default ---', 'wp-photo-album-plus' ) . '
|
2895 |
</option>
|
2896 |
-
<option value="-9" ' . ( $cur == '-9' ? 'selected
|
2897 |
__( '--- random ---', 'wp-photo-album-plus' ) . '
|
2898 |
</option>
|
2899 |
-
<option value="-1" ' . ( $cur == '-1' ? 'selected
|
2900 |
__( '--- random featured ---', 'wp-photo-album-plus' ) . '
|
2901 |
</option>
|
2902 |
-
<option value="-2" ' . ( $cur == '-2' ? 'selected
|
2903 |
__( '--- most recent added ---', 'wp-photo-album-plus' ) . '
|
2904 |
</option>
|
2905 |
-
<option value="-3" ' . ( $cur == '-3' ? 'selected
|
2906 |
__( '--- random from (grand)children ---', 'wp-photo-album-plus' ) . '
|
2907 |
</option>
|
2908 |
-
<option value="-4" ' . ( $cur == '-4' ? 'selected
|
2909 |
__( '--- most recent from (grand)children ---', 'wp-photo-album-plus' ) . '
|
2910 |
</option>
|
2911 |
-
<option value="-5" ' . ( $cur == '-5' ? 'selected
|
2912 |
__( '--- according to albums photo sequence ---', 'wp-photo-album-plus' ) . '
|
2913 |
</option>';
|
2914 |
|
2915 |
if ( ! empty($photos) ) foreach($photos as $photo) {
|
2916 |
if ($cur == $photo['id']) {
|
2917 |
-
$selected = 'selected
|
2918 |
}
|
2919 |
else {
|
2920 |
$selected = '';
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* create, edit and delete albums
|
6 |
+
* Version 8.1.08.001
|
7 |
*
|
8 |
*/
|
9 |
|
29 |
// Delete trashed comments
|
30 |
$wpdb->query( "DELETE FROM $wpdb->wppa_comments WHERE status = 'trash'" );
|
31 |
|
32 |
+
$sel = 'selected';
|
33 |
|
34 |
// warn if the uploads directory is no writable
|
35 |
if ( ! is_writable( WPPA_UPLOAD_PATH ) ) {
|
396 |
$cats = stripslashes( trim( $albuminfo['cats'], ',' ) );
|
397 |
$default_tags = trim( $albuminfo['default_tags'], ',' );
|
398 |
$cover_linktype = $albuminfo['cover_linktype'];
|
399 |
+
$cover_link = $albuminfo['cover_link'];
|
400 |
$sname = $albuminfo['sname'];
|
401 |
$zoomable = $albuminfo['zoomable'];
|
402 |
$displayopts = $albuminfo['displayopts'];
|
731 |
title="' . esc_attr( $title ) . '"
|
732 |
>';
|
733 |
foreach ( array_keys( $options ) as $key ) {
|
734 |
+
$sel = $values[$key] == $p_order_by ? ' selected' : '';
|
735 |
$result .= '<option value="' . $values[$key] . '"' . $sel . ' >' . $options[$key] . '</option>';
|
736 |
}
|
737 |
$result .= '
|
739 |
}
|
740 |
|
741 |
// Child album order
|
742 |
+
$sel = ' selected';
|
743 |
$opts = array(
|
744 |
__( '--- default ---', 'wp-photo-album-plus' ),
|
745 |
__( 'Random', 'wp-photo-album-plus' ),
|
776 |
// Alternative thumbnail size
|
777 |
if ( ! wppa_switch( 'alt_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
|
778 |
$title = sprintf( __( 'Alternate thumbnail size is set in Basic settings -> Thumbnails -> I -> Item 2 and is currently set to %s', 'wp-photo-album-plus' ), wppa_opt( 'thumbsize_alt' ) );
|
779 |
+
$sel = ' selected';
|
780 |
$result .= __( 'Use alt thumbsize', 'wp-photo-album-plus' ) . ':
|
781 |
<select
|
782 |
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'alt_thumbsize\', this )"
|
793 |
|
794 |
// Cover type
|
795 |
if ( ! wppa_switch( 'covertype_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
|
796 |
+
$sel = ' selected';
|
797 |
$title = sprintf( __( 'The default is set in Basic settings -> Albums -> III -> Item 4 and is set to %s', 'wp-photo-album-plus' ), wppa_opt( 'cover_type' ) );
|
798 |
$result .=
|
799 |
__( 'Cover Type', 'wp-photo-album-plus' ) . ':
|
838 |
$lims = array( '0', '0' );
|
839 |
}
|
840 |
if ( wppa_user_is( 'administrator' ) ) {
|
841 |
+
$sel = ' selected';
|
842 |
$title = __( 'Set the upload limit (0 means unlimited).', 'wp-photo-album-plus' );
|
843 |
$result .= '
|
844 |
<input
|
904 |
$result .=
|
905 |
__( 'Photos are zoomable:', 'wp-photo-album-plus' ) . '
|
906 |
<select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'zoomable\', this )" title="' . esc_attr( $title ) . '" >
|
907 |
+
<option value="" '.($zoomable==''?'selected': '').' >' . $def . '</option>
|
908 |
+
<option value="on" '.($zoomable=='on'?'selected': '').'>' . $yes . '</option>
|
909 |
+
<option value="off" '.($zoomable=='off'?'selected': '').'>' . $no . '</option>
|
910 |
</select> ';
|
911 |
|
912 |
// Overrulable display options / next 4 items
|
926 |
$result .=
|
927 |
__( 'Display photo names:', 'wp-photo-album-plus' ) . '
|
928 |
<select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt0\', this )" title="' . esc_attr( $title ) . '" >
|
929 |
+
<option value="0" '.($disp_opt[0]=='0'?'selected': '').' >' . $def . '</option>
|
930 |
+
<option value="1" '.($disp_opt[0]=='1'?'selected': '').'>' . $yes . '</option>
|
931 |
+
<option value="-1" '.($disp_opt[0]=='-1'?'selected': '').'>' . $no . '</option>
|
932 |
</select>';
|
933 |
|
934 |
// Display description
|
938 |
$result .=
|
939 |
__( 'Display photo descriptions:', 'wp-photo-album-plus' ) . '
|
940 |
<select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt1\', this )" title="' . esc_attr( $title ) . '" >
|
941 |
+
<option value="0" '.($disp_opt[1]=='0'?'selected': '').' >' . $def . '</option>
|
942 |
+
<option value="1" '.($disp_opt[1]=='1'?'selected': '').'>' . $yes . '</option>
|
943 |
+
<option value="-1" '.($disp_opt[1]=='-1'?'selected': '').'>' . $no . '</option>
|
944 |
</select>';
|
945 |
|
946 |
// Display rating
|
950 |
$result .=
|
951 |
__( 'Display rating:', 'wp-photo-album-plus' ) . '
|
952 |
<select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt2\', this )" title="' . esc_attr( $title ) . '" >
|
953 |
+
<option value="0" '.($disp_opt[2]=='0'?'selected': '').' >' . $def . '</option>
|
954 |
+
<option value="1" '.($disp_opt[2]=='1'?'selected': '').'>' . $yes . '</option>
|
955 |
+
<option value="-1" '.($disp_opt[2]=='-1'?'selected': '').'>' . $no . '</option>
|
956 |
</select>';
|
957 |
|
958 |
// Display comments
|
962 |
$result .=
|
963 |
__( 'Display comments:', 'wp-photo-album-plus' ) . '
|
964 |
<select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt3\', this )" title="' . esc_attr( $title ) . '" >
|
965 |
+
<option value="0" '.($disp_opt[3]=='0'?'selected': '').' >' . $def . '</option>
|
966 |
+
<option value="1" '.($disp_opt[3]=='1'?'selected': '').'>' . $yes . '</option>
|
967 |
+
<option value="-1" '.($disp_opt[3]=='-1'?'selected': '').'>' . $no . '</option>
|
968 |
</select>';
|
969 |
|
970 |
// Watermark
|
994 |
type="checkbox"
|
995 |
id="scheduledel"' .
|
996 |
( $scheduledel ? ' checked="checked"' : '' ) .
|
997 |
+
( $may_change ? '' : ' disabled' ) . '
|
998 |
onchange="wppaChangeScheduleDelAlbum( ' . $id . ', this );"
|
999 |
/>
|
1000 |
|
1176 |
' . __( 'Link type:', 'wp-photo-album-plus' ) . '
|
1177 |
</td>
|
1178 |
<td>';
|
1179 |
+
$sel = ' selected';
|
1180 |
$lt = $cover_linktype;
|
1181 |
$result .= '
|
1182 |
<select onchange="wppaAjaxUpdateAlbum( '. $id . ', \'cover_linktype\', this )" >
|
1186 |
<option value="slide"' . ( $lt == 'slide' ? $sel : '' ) . ' >' . __( 'the album photos as slideshow', 'wp-photo-album-plus' ) . '</option>
|
1187 |
<option value="page"' . ( $lt == 'page' ? $sel : '' ) . ' >' . __( 'the link page with a clean url', 'wp-photo-album-plus' ) . '</option>
|
1188 |
<option value="none"' . ( $lt == 'none' ? $sel : '' ) . ' >' . __( 'no link at all', 'wp-photo-album-plus' ) . '</option>
|
1189 |
+
<option value="manual"' . ( $lt == 'manual' ? $sel : '' ) . ' >' . __( 'manually entered', 'wp-photo-album-plus' ) . '</option>
|
1190 |
</select>
|
1191 |
<br>
|
1192 |
<span class="description">';
|
1203 |
</td>
|
1204 |
</tr>';
|
1205 |
|
1206 |
+
// Manually entered link
|
1207 |
+
if ( ! wppa_switch( 'link_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
|
1208 |
+
$result .= '
|
1209 |
+
<tr
|
1210 |
+
id="link-url-tr"
|
1211 |
+
style="' . ( $cover_linktype == 'manual' ? '' : 'display:none' ) . '"
|
1212 |
+
>
|
1213 |
+
<td>
|
1214 |
+
' . __( 'Link target (url):', 'wp-photo-album-plus' ) . '
|
1215 |
+
</td>
|
1216 |
+
<td>
|
1217 |
+
<input
|
1218 |
+
type="text"
|
1219 |
+
id="cover_link"
|
1220 |
+
value="' . esc_attr( $cover_link ) . '"
|
1221 |
+
style="width:100%"
|
1222 |
+
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'cover_link\', this )"
|
1223 |
+
/>
|
1224 |
+
<br>
|
1225 |
+
<span class="description">' .
|
1226 |
+
__( 'Enter the url you want the title to link to when you selected Link type manually entered.', 'wp-photo-album-plus' ) . '
|
1227 |
+
</span>
|
1228 |
+
</td>
|
1229 |
+
<td>
|
1230 |
+
</td>
|
1231 |
+
</tr>';
|
1232 |
+
}
|
1233 |
+
|
1234 |
// Link page
|
1235 |
if ( ! wppa_switch( 'link_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
|
1236 |
$result .= '
|
1265 |
$result .= '
|
1266 |
<option
|
1267 |
value="' . $page['ID'] . '"' .
|
1268 |
+
( $linkpage == $page['ID'] ? ' selected' : '' ) .
|
1269 |
' >' .
|
1270 |
__( htmlspecialchars( $page['post_title'] ) ) .
|
1271 |
( $page['post_type'] == 'post' ? ' (' . htmlspecialchars( $page['post_date'] ) . ')' : '' ) .
|
1807 |
$result .= '
|
1808 |
<option value="" ></option>';
|
1809 |
foreach( $opts as $opt ) {
|
1810 |
+
$result .= '<option value="' . $opt . '" ' . ( $f == $opt ? 'selected ' : '' ) . '>' . $opt . '</value>';
|
1811 |
}
|
1812 |
$result .=
|
1813 |
'</select>';
|
2920 |
}
|
2921 |
|
2922 |
$output .= '
|
2923 |
+
<option value="0" ' . ( $cur == '0' ? 'selected' : '' ) . '>' .
|
2924 |
__( '--- default ---', 'wp-photo-album-plus' ) . '
|
2925 |
</option>
|
2926 |
+
<option value="-9" ' . ( $cur == '-9' ? 'selected' : '' ) . '>' .
|
2927 |
__( '--- random ---', 'wp-photo-album-plus' ) . '
|
2928 |
</option>
|
2929 |
+
<option value="-1" ' . ( $cur == '-1' ? 'selected' : '' ) . '>' .
|
2930 |
__( '--- random featured ---', 'wp-photo-album-plus' ) . '
|
2931 |
</option>
|
2932 |
+
<option value="-2" ' . ( $cur == '-2' ? 'selected' : '' ) . '>' .
|
2933 |
__( '--- most recent added ---', 'wp-photo-album-plus' ) . '
|
2934 |
</option>
|
2935 |
+
<option value="-3" ' . ( $cur == '-3' ? 'selected' : '' ) . '>' .
|
2936 |
__( '--- random from (grand)children ---', 'wp-photo-album-plus' ) . '
|
2937 |
</option>
|
2938 |
+
<option value="-4" ' . ( $cur == '-4' ? 'selected' : '' ) . '>' .
|
2939 |
__( '--- most recent from (grand)children ---', 'wp-photo-album-plus' ) . '
|
2940 |
</option>
|
2941 |
+
<option value="-5" ' . ( $cur == '-5' ? 'selected' : '' ) . '>' .
|
2942 |
__( '--- according to albums photo sequence ---', 'wp-photo-album-plus' ) . '
|
2943 |
</option>';
|
2944 |
|
2945 |
if ( ! empty($photos) ) foreach($photos as $photo) {
|
2946 |
if ($cur == $photo['id']) {
|
2947 |
+
$selected = 'selected';
|
2948 |
}
|
2949 |
else {
|
2950 |
$selected = '';
|
wppa-album-covers.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Functions for album covers
|
6 |
-
* Version 8.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -1589,6 +1589,14 @@ function wppa_get_album_title_attr_a( $albumid, $linktype, $linkpage, $has_conte
|
|
1589 |
$onclick_title = '';
|
1590 |
$title_title = '';
|
1591 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1592 |
// Dispatch on linktype when page is not current
|
1593 |
if ( $linkpage > 0 ) {
|
1594 |
switch ( $linktype ) {
|
@@ -1616,9 +1624,8 @@ function wppa_get_album_title_attr_a( $albumid, $linktype, $linkpage, $has_conte
|
|
1616 |
case 'page':
|
1617 |
$href_title = get_page_link( $album['cover_linkpage'] );
|
1618 |
break;
|
1619 |
-
case 'none':
|
1620 |
-
break;
|
1621 |
default:
|
|
|
1622 |
}
|
1623 |
$href_title = wppa_convert_to_pretty( $href_title );
|
1624 |
$title_title = __( 'Link to' , 'wp-photo-album-plus');
|
@@ -1650,9 +1657,8 @@ function wppa_get_album_title_attr_a( $albumid, $linktype, $linkpage, $has_conte
|
|
1650 |
$onclick_title = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" . $ajax_title . "', '" . $href_title . "' )";
|
1651 |
$href_title = "#";
|
1652 |
break;
|
1653 |
-
case 'none':
|
1654 |
-
break;
|
1655 |
default:
|
|
|
1656 |
}
|
1657 |
$title_title =
|
1658 |
__( 'View the album' , 'wp-photo-album-plus') . ' ' . esc_attr( __( stripslashes( $album['name'] ) ) );
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Functions for album covers
|
6 |
+
* Version 8.1.08.001
|
7 |
*
|
8 |
*/
|
9 |
|
1589 |
$onclick_title = '';
|
1590 |
$title_title = '';
|
1591 |
|
1592 |
+
// Special case: manual enterd url
|
1593 |
+
if ( $linktype == 'manual' ) {
|
1594 |
+
$title_attr['href'] = $album['cover_link'];
|
1595 |
+
$title_attr['onclick'] = '';
|
1596 |
+
$title_attr['title'] = '';
|
1597 |
+
return $title_attr;
|
1598 |
+
}
|
1599 |
+
|
1600 |
// Dispatch on linktype when page is not current
|
1601 |
if ( $linkpage > 0 ) {
|
1602 |
switch ( $linktype ) {
|
1624 |
case 'page':
|
1625 |
$href_title = get_page_link( $album['cover_linkpage'] );
|
1626 |
break;
|
|
|
|
|
1627 |
default:
|
1628 |
+
break;
|
1629 |
}
|
1630 |
$href_title = wppa_convert_to_pretty( $href_title );
|
1631 |
$title_title = __( 'Link to' , 'wp-photo-album-plus');
|
1657 |
$onclick_title = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" . $ajax_title . "', '" . $href_title . "' )";
|
1658 |
$href_title = "#";
|
1659 |
break;
|
|
|
|
|
1660 |
default:
|
1661 |
+
break;
|
1662 |
}
|
1663 |
$title_title =
|
1664 |
__( 'View the album' , 'wp-photo-album-plus') . ' ' . esc_attr( __( stripslashes( $album['name'] ) ) );
|
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 |
|
@@ -441,7 +441,7 @@ global $wppa_session;
|
|
441 |
$cansubsearch = $sub && $wppa_session['use_searchstring'];
|
442 |
$value = $cansubsearch ? '' : wppa_test_for_search( true );
|
443 |
$root = $wppa_session['search_root'];
|
444 |
-
$rootboxset = $root ? '' : 'checked="checked" disabled
|
445 |
$fontsize = wppa_in_widget() ? 'font-size: 9px;' : '';
|
446 |
$mocc = wppa( 'mocc' );
|
447 |
$n_items = ( $catbox ? 1 : 0 ) + $selboxes + 1;
|
@@ -721,7 +721,7 @@ global $wppa_session;
|
|
721 |
type="checkbox"
|
722 |
name="wppa-subsearch"
|
723 |
class="wppa-search-sub-box"' .
|
724 |
-
( empty( $wppa_session['display_searchstring'] ) ? ' disabled
|
725 |
onchange="wppaSubboxChange(this)"
|
726 |
/> ' .
|
727 |
wppa_opt( 'search_in_results' ) . '
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various wppa boxes
|
6 |
+
* Version 8.1.08.001
|
7 |
*
|
8 |
*/
|
9 |
|
441 |
$cansubsearch = $sub && $wppa_session['use_searchstring'];
|
442 |
$value = $cansubsearch ? '' : wppa_test_for_search( true );
|
443 |
$root = $wppa_session['search_root'];
|
444 |
+
$rootboxset = $root ? '' : 'checked="checked" disabled';
|
445 |
$fontsize = wppa_in_widget() ? 'font-size: 9px;' : '';
|
446 |
$mocc = wppa( 'mocc' );
|
447 |
$n_items = ( $catbox ? 1 : 0 ) + $selboxes + 1;
|
721 |
type="checkbox"
|
722 |
name="wppa-subsearch"
|
723 |
class="wppa-search-sub-box"' .
|
724 |
+
( empty( $wppa_session['display_searchstring'] ) ? ' disabled' : '' ) . '
|
725 |
onchange="wppaSubboxChange(this)"
|
726 |
/> ' .
|
727 |
wppa_opt( 'search_in_results' ) . '
|
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 |
|
@@ -38,10 +38,10 @@ class WPPA_Comment_table extends WP_List_Table {
|
|
38 |
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
|
42 |
-
<option value="pending" ' . ( $comment_show == 'pending' ? 'selected
|
43 |
-
<option value="approved" ' . ( $comment_show == 'approved' ? 'selected
|
44 |
-
<option value="spam" ' . ( $comment_show == 'spam' ? 'selected
|
45 |
</select>' .
|
46 |
'<input' .
|
47 |
' type="button"' .
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all comments
|
6 |
+
* Version 8.1.08.001
|
7 |
*
|
8 |
*/
|
9 |
|
38 |
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"' .
|
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 |
|
@@ -1400,19 +1400,17 @@ function wppa_check_memory_limit( $verbose = true, $x = '0', $y = '0' ) {
|
|
1400 |
$free_memory = $memory_limit - memory_get_usage( true );
|
1401 |
|
1402 |
// Calculate number of pixels largest target resized image
|
1403 |
-
|
1404 |
|
1405 |
-
|
1406 |
-
$
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
else {
|
1415 |
-
$resizedpixels = wppa_get_minisize() * wppa_get_minisize() * 3 / 4;
|
1416 |
}
|
1417 |
|
1418 |
// Number of bytes per pixel ( found by trial and error )
|
@@ -1675,7 +1673,7 @@ global $wpdb;
|
|
1675 |
|
1676 |
$selected = $args['selected'] == '0' ? ' selected' : '';
|
1677 |
if ( $args['addpleaseselect'] ) $result .=
|
1678 |
-
'<option value="0" disabled
|
1679 |
__( '- select an album -', 'wp-photo-album-plus' ) .
|
1680 |
'</option>';
|
1681 |
|
@@ -1824,7 +1822,7 @@ global $wpdb;
|
|
1824 |
|
1825 |
$selected = $args['selected'] == '0' ? ' selected' : '';
|
1826 |
if ( $args['addpleaseselect'] ) $result .=
|
1827 |
-
'<option value="0" disabled
|
1828 |
__( '- select an album -', 'wp-photo-album-plus' ) .
|
1829 |
'</option>';
|
1830 |
|
@@ -1886,7 +1884,7 @@ global $wpdb;
|
|
1886 |
( $args['exclude'] == $album['id'] ) ||
|
1887 |
( $args['checkupload'] && ( ! wppa_allow_uploads( $album['id'] ) || ! $lim ) ) ||
|
1888 |
( $args['disableancestors'] && wppa_is_ancestor( $args['exclude'], $album['id'] ) )
|
1889 |
-
) $disabled = ' disabled
|
1890 |
if ( in_array( $album['id'], $selarr ) && ! $disabled ) $selected = ' selected'; else $selected = '';
|
1891 |
|
1892 |
$ok = true; // Assume this will be in the list
|
2 |
/* wppa-common-functions.php
|
3 |
*
|
4 |
* Functions used in admin and in themes
|
5 |
+
* Version 8.1.08.001
|
6 |
*
|
7 |
*/
|
8 |
|
1400 |
$free_memory = $memory_limit - memory_get_usage( true );
|
1401 |
|
1402 |
// Calculate number of pixels largest target resized image
|
1403 |
+
switch ( wppa_opt( 'resize_to' ) ) {
|
1404 |
|
1405 |
+
case '-1': // Not resize, look at minisize only
|
1406 |
+
$resizedpixels = wppa_get_minisize() * wppa_get_minisize() * 3 / 4;
|
1407 |
+
break;
|
1408 |
+
case '0': // Look at max slideshow size
|
1409 |
+
$resizedpixels = wppa_opt( 'fullsize' ) * wppa_opt( 'maxheight' );
|
1410 |
+
break;
|
1411 |
+
default: // XXXXxYYYY
|
1412 |
+
$to = explode( 'x', wppa_opt( 'resize_to' ) );
|
1413 |
+
$resizedpixels = $to['0'] * $to['1'];
|
|
|
|
|
1414 |
}
|
1415 |
|
1416 |
// Number of bytes per pixel ( found by trial and error )
|
1673 |
|
1674 |
$selected = $args['selected'] == '0' ? ' selected' : '';
|
1675 |
if ( $args['addpleaseselect'] ) $result .=
|
1676 |
+
'<option value="0" disabled '.$selected.' >' .
|
1677 |
__( '- select an album -', 'wp-photo-album-plus' ) .
|
1678 |
'</option>';
|
1679 |
|
1822 |
|
1823 |
$selected = $args['selected'] == '0' ? ' selected' : '';
|
1824 |
if ( $args['addpleaseselect'] ) $result .=
|
1825 |
+
'<option value="0" disabled '.$selected.' >' .
|
1826 |
__( '- select an album -', 'wp-photo-album-plus' ) .
|
1827 |
'</option>';
|
1828 |
|
1884 |
( $args['exclude'] == $album['id'] ) ||
|
1885 |
( $args['checkupload'] && ( ! wppa_allow_uploads( $album['id'] ) || ! $lim ) ) ||
|
1886 |
( $args['disableancestors'] && wppa_is_ancestor( $args['exclude'], $album['id'] ) )
|
1887 |
+
) $disabled = ' disabled'; else $disabled = '';
|
1888 |
if ( in_array( $album['id'], $selarr ) && ! $disabled ) $selected = ' selected'; else $selected = '';
|
1889 |
|
1890 |
$ok = true; // Assume this will be in the list
|
wppa-date-time.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* date and time related functions
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -150,7 +150,7 @@ function wppa_get_date_time_select_html( $type, $id, $selectable = true ) {
|
|
150 |
}
|
151 |
|
152 |
foreach ( array_keys( $opt_days ) as $key ) {
|
153 |
-
$sel = $val_days[$key] == $cur_day ? 'selected
|
154 |
$result .= '<option value="'.$val_days[$key].'" '.$sel.' >'.$opt_days[$key].'</option>';
|
155 |
}
|
156 |
$result .= '</select>';
|
@@ -170,7 +170,7 @@ function wppa_get_date_time_select_html( $type, $id, $selectable = true ) {
|
|
170 |
}
|
171 |
|
172 |
foreach ( array_keys( $opt_months ) as $key ) {
|
173 |
-
$sel = $val_months[$key] == $cur_month ? 'selected
|
174 |
$result .= '<option value="'.$val_months[$key].'" '.$sel.' >'.$opt_months[$key].'</option>';
|
175 |
}
|
176 |
$result .= '</select>';
|
@@ -190,7 +190,7 @@ function wppa_get_date_time_select_html( $type, $id, $selectable = true ) {
|
|
190 |
}
|
191 |
|
192 |
foreach ( array_keys( $opt_years ) as $key ) {
|
193 |
-
$sel = $val_years[$key] == $cur_year ? 'selected
|
194 |
$result .= '<option value="'.$val_years[$key].'" '.$sel.' >'.$opt_years[$key].'</option>';
|
195 |
}
|
196 |
$result .= '</select>';
|
@@ -211,7 +211,7 @@ function wppa_get_date_time_select_html( $type, $id, $selectable = true ) {
|
|
211 |
}
|
212 |
|
213 |
foreach ( array_keys( $opt_hours ) as $key ) {
|
214 |
-
$sel = $val_hours[$key] == $cur_hour ? 'selected
|
215 |
$result .= '<option value="'.$val_hours[$key].'" '.$sel.' >'.$opt_hours[$key].'</option>';
|
216 |
}
|
217 |
$result .= '</select>';
|
@@ -232,7 +232,7 @@ function wppa_get_date_time_select_html( $type, $id, $selectable = true ) {
|
|
232 |
}
|
233 |
|
234 |
foreach ( array_keys( $opt_mins ) as $key ) {
|
235 |
-
$sel = $val_mins[$key] == $cur_min ? 'selected
|
236 |
$result .= '<option value="'.$val_mins[$key].'" '.$sel.' >'.$opt_mins[$key].'</option>';
|
237 |
}
|
238 |
$result .= '</select>';
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* date and time related functions
|
6 |
+
* Version 8.1.08.001
|
7 |
*
|
8 |
*/
|
9 |
|
150 |
}
|
151 |
|
152 |
foreach ( array_keys( $opt_days ) as $key ) {
|
153 |
+
$sel = $val_days[$key] == $cur_day ? 'selected' : '';
|
154 |
$result .= '<option value="'.$val_days[$key].'" '.$sel.' >'.$opt_days[$key].'</option>';
|
155 |
}
|
156 |
$result .= '</select>';
|
170 |
}
|
171 |
|
172 |
foreach ( array_keys( $opt_months ) as $key ) {
|
173 |
+
$sel = $val_months[$key] == $cur_month ? 'selected' : '';
|
174 |
$result .= '<option value="'.$val_months[$key].'" '.$sel.' >'.$opt_months[$key].'</option>';
|
175 |
}
|
176 |
$result .= '</select>';
|
190 |
}
|
191 |
|
192 |
foreach ( array_keys( $opt_years ) as $key ) {
|
193 |
+
$sel = $val_years[$key] == $cur_year ? 'selected' : '';
|
194 |
$result .= '<option value="'.$val_years[$key].'" '.$sel.' >'.$opt_years[$key].'</option>';
|
195 |
}
|
196 |
$result .= '</select>';
|
211 |
}
|
212 |
|
213 |
foreach ( array_keys( $opt_hours ) as $key ) {
|
214 |
+
$sel = $val_hours[$key] == $cur_hour ? 'selected' : '';
|
215 |
$result .= '<option value="'.$val_hours[$key].'" '.$sel.' >'.$opt_hours[$key].'</option>';
|
216 |
}
|
217 |
$result .= '</select>';
|
232 |
}
|
233 |
|
234 |
foreach ( array_keys( $opt_mins ) as $key ) {
|
235 |
+
$sel = $val_mins[$key] == $cur_min ? 'selected' : '';
|
236 |
$result .= '<option value="'.$val_mins[$key].'" '.$sel.' >'.$opt_mins[$key].'</option>';
|
237 |
}
|
238 |
$result .= '</select>';
|
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 |
|
@@ -145,7 +145,7 @@ function wppa_tag_select( $options, $values ) {
|
|
145 |
$result .= '
|
146 |
<option
|
147 |
value="' . esc_attr( $values[$idx] ) . '"' .
|
148 |
-
( $val == $values[$idx] ? ' selected
|
149 |
>' .
|
150 |
$options[$idx] . '
|
151 |
</option>';
|
2 |
/* wppa-edit-tags.php
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
+
* Version 8.1.08.001
|
6 |
*
|
7 |
*/
|
8 |
|
145 |
$result .= '
|
146 |
<option
|
147 |
value="' . esc_attr( $values[$idx] ) . '"' .
|
148 |
+
( $val == $values[$idx] ? ' selected' : '' ) . '
|
149 |
>' .
|
150 |
$options[$idx] . '
|
151 |
</option>';
|
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() {
|
@@ -237,8 +237,8 @@ global $wpdb;
|
|
237 |
<option
|
238 |
class="wppa-photo-select-item-first"
|
239 |
value=""
|
240 |
-
disabled
|
241 |
-
( $selected ? '' : ' selected
|
242 |
style="color:#700"
|
243 |
> -- ' . __( 'Please select a photo', 'wp-photo-album-plus' ) . ' --
|
244 |
</option>';
|
@@ -302,8 +302,8 @@ global $wpdb;
|
|
302 |
$result .= '<option' .
|
303 |
' class="wppa-photo-select-item-first"' .
|
304 |
' value=""' .
|
305 |
-
' disabled
|
306 |
-
' selected
|
307 |
' style="color:#700"' .
|
308 |
' >' .
|
309 |
'-- ' . __( 'Please select a photo', 'wp-photo-album-plus' ) . ' --' .
|
2 |
/* wppa-gutenberg-photo.php
|
3 |
* Pachkage: wp-photo-album-plus
|
4 |
*
|
5 |
+
* Version 8.1.08.001
|
6 |
*/
|
7 |
|
8 |
function wppa_gutenberg_photo_block() {
|
237 |
<option
|
238 |
class="wppa-photo-select-item-first"
|
239 |
value=""
|
240 |
+
disabled' .
|
241 |
+
( $selected ? '' : ' selected' ) . '
|
242 |
style="color:#700"
|
243 |
> -- ' . __( 'Please select a photo', 'wp-photo-album-plus' ) . ' --
|
244 |
</option>';
|
302 |
$result .= '<option' .
|
303 |
' class="wppa-photo-select-item-first"' .
|
304 |
' value=""' .
|
305 |
+
' disabled' .
|
306 |
+
' selected' .
|
307 |
' style="color:#700"' .
|
308 |
' >' .
|
309 |
'-- ' . __( 'Please select a photo', 'wp-photo-album-plus' ) . ' --' .
|
wppa-gutenberg-wppa.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-gutenberg-wppa.php
|
3 |
* Pachkage: wp-photo-album-plus
|
4 |
*
|
5 |
-
* Version 8.1.
|
6 |
*/
|
7 |
|
8 |
function wppa_gutenberg_wppa_block() {
|
@@ -80,7 +80,7 @@ global $wpdb;
|
|
80 |
<th><label for="wppagallery-top-type">' . __( 'Type of WPPA display:', 'wp-photo-album-plus' ) . '</label></th>
|
81 |
<td>
|
82 |
<select id="wppagallery-top-type" name="type" onchange="wppaGutenbergGalleryEvaluate()" >
|
83 |
-
<option value="" selected
|
84 |
<option value="galerytype" >' . __( 'A gallery with covers and/or thumbnails', 'wp-photo-album-plus' ) . '</option>
|
85 |
<option value="slidestype" >' . __( 'A slideshow', 'wp-photo-album-plus' ) . '</option>
|
86 |
<option value="singletype" >' . __( 'A single image', 'wp-photo-album-plus' ) . '</option>
|
@@ -95,7 +95,7 @@ global $wpdb;
|
|
95 |
<th><label for="wppagallery-galery-type" >' . __( 'Type of gallery display:', 'wp-photo-album-plus' ) . '</label></th>
|
96 |
<td>
|
97 |
<select id="wppagallery-galery-type" name="type" onchange="wppaGutenbergGalleryEvaluate()" >
|
98 |
-
<option value="" selected
|
99 |
<option value="cover" >' . __( 'The cover(s) of specific album(s)', 'wp-photo-album-plus' ) . '</option>
|
100 |
<option value="content" >' . __( 'The content of specific album(s)', 'wp-photo-album-plus' ) . '</option>
|
101 |
<option value="covers" >' . __( 'The covers of the subalbums of specific album(s)', 'wp-photo-album-plus' ) . '</option>
|
@@ -109,7 +109,7 @@ global $wpdb;
|
|
109 |
<th><label for="wppagallery-slides-type">' . __( 'Type of slideshow:', 'wp-photo-album-plus' ) . '</label></th>
|
110 |
<td>
|
111 |
<select id="wppagallery-slides-type" name="type" onchange="wppaGutenbergGalleryEvaluate()" >
|
112 |
-
<option value="" selected
|
113 |
<option value="slide" >' . __( 'A fully featured slideshow', 'wp-photo-album-plus' ) . '</option>
|
114 |
<option value="slideonly" >' . __( 'A slideshow without supporting boxes', 'wp-photo-album-plus' ) . '</option>
|
115 |
<option value="slideonlyf" >' . __( 'A slideshow with a filmstrip only', 'wp-photo-album-plus' ) . '</option>
|
@@ -123,7 +123,7 @@ global $wpdb;
|
|
123 |
<th><label for="wppagallery-single-type">' . __( 'Type of single image:', 'wp-photo-album-plus' ) . '</label></th>
|
124 |
<td>
|
125 |
<select id="wppagallery-single-type" name="type" onchange="wppaGutenbergGalleryEvaluate()" >
|
126 |
-
<option value="" selected
|
127 |
<option value="photo" >' . __( 'A plain single photo', 'wp-photo-album-plus' ) . '</option>
|
128 |
<option value="mphoto" >' . __( 'A single photo with caption', 'wp-photo-album-plus' ) . '</option>
|
129 |
<option value="xphoto" >' . __( 'A single photo with extended caption', 'wp-photo-album-plus' ) . '</option>
|
@@ -137,7 +137,7 @@ global $wpdb;
|
|
137 |
<th><label for="wppagallery-search-type">' . __( 'Type of search:', 'wp-photo-album-plus' ) . '</label></th>
|
138 |
<td>
|
139 |
<select id="wppagallery-search-type" name="type" onchange="wppaGutenbergGalleryEvaluate()" >
|
140 |
-
<option value="" selected
|
141 |
<option value="search" >' . __( 'A search box', 'wp-photo-album-plus' ) . '</option>
|
142 |
<option value="supersearch" >' . __( 'A supersearch box', 'wp-photo-album-plus' ) . '</option>
|
143 |
<option value="tagcloud" >' . __( 'A tagcloud box', 'wp-photo-album-plus' ) . '</option>
|
@@ -153,7 +153,7 @@ global $wpdb;
|
|
153 |
<th><label for="wppagallery-miscel-type">' . __( 'Type miscellaneous:', 'wp-photo-album-plus' ) . '</label></th>
|
154 |
<td>
|
155 |
<select id="wppagallery-miscel-type" name="type" onchange="wppaGutenbergGalleryEvaluate()" >
|
156 |
-
<option value="" selected
|
157 |
<option value="generic" >' . __( 'A generic albums display', 'wp-photo-album-plus' ) . '</option>
|
158 |
<option value="upload">'.__('An upload box', 'wp-photo-album-plus').'</option>'.
|
159 |
'<option value="landing">'.__('A landing page shortcode', 'wp-photo-album-plus').'</option>'.
|
@@ -168,7 +168,7 @@ global $wpdb;
|
|
168 |
'<th><label for="wppagallery-admins">'.__('Users:', 'wp-photo-album-plus').'</label></th>'.
|
169 |
'<td>'.
|
170 |
'<select id="wppagallery-admins" name="admins" style="color:#070;" multiple="multiple" onchange="wppaGutenbergGalleryEvaluate()">'.
|
171 |
-
'<option value="" selected
|
172 |
foreach( $admins as $user ) {
|
173 |
$result .=
|
174 |
'<option value="'.$user->data->user_login.'" class="wppagallery-admin" style="color:#070;" >'.$user->data->user_login.'</option>';
|
@@ -188,7 +188,7 @@ global $wpdb;
|
|
188 |
'<th><label for="wppagallery-album-type">'.__('Kind of selection:', 'wp-photo-album-plus').'</label></th>'.
|
189 |
'<td>'.
|
190 |
'<select id="wppagallery-album-type" name="type" onchange="wppaGutenbergGalleryEvaluate()">'.
|
191 |
-
'<option value="" selected
|
192 |
'<option value="real">'.__('One or more wppa+ albums', 'wp-photo-album-plus').'</option>'.
|
193 |
'<option value="virtual">'.__('A special selection', 'wp-photo-album-plus').'</option>'.
|
194 |
'</select>'.
|
@@ -200,7 +200,7 @@ global $wpdb;
|
|
200 |
'<th><label for="wppagallery-album-virt">'.__('The selection to be used:', 'wp-photo-album-plus').'</label></th>'.
|
201 |
'<td>'.
|
202 |
'<select id="wppagallery-album-virt" name="album" class="wppagallery-album" onchange="wppaGutenbergGalleryEvaluate()">'.
|
203 |
-
'<option value="" disabled
|
204 |
'<option value="@last" >'.__('The most recently added album', 'wp-photo-album-plus').'</option>'.
|
205 |
'<option value="@topten" >'.__('The top rated photos', 'wp-photo-album-plus').'</option>'.
|
206 |
'<option value="@lasten" >'.__('The most recently uploaded photos', 'wp-photo-album-plus').'</option>'.
|
@@ -220,7 +220,7 @@ global $wpdb;
|
|
220 |
'<th><label for="wppagallery-album-virt-cover">'.__('The selection to be used:', 'wp-photo-album-plus').'</label></th>'.
|
221 |
'<td>'.
|
222 |
'<select id="wppagallery-album-virt-cover" name="album" class="wppagallery-album" onchange="wppaGutenbergGalleryEvaluate()">'.
|
223 |
-
'<option value="" disabled
|
224 |
'<option value="@last" >'.__('The most recently modified album', 'wp-photo-album-plus').'</option>'.
|
225 |
'<option value="@owner" >'.__('Albums owned by a certain user', 'wp-photo-album-plus').'</option>'.
|
226 |
'<option value="@cat" >'.__('Albums tagged with certain categories', 'wp-photo-album-plus').'</option>'.
|
@@ -235,17 +235,17 @@ global $wpdb;
|
|
235 |
'<td>';
|
236 |
if ( wppa_has_many_albums() ) {
|
237 |
$result .=
|
238 |
-
'<input id="wppagallery-album-real" style="max-width:400px;" name="album" onchange="wppaGutenbergGalleryEvaluate()" />'.
|
239 |
'<br />'.
|
240 |
__('Enter one or more album numbers, seperated by commas', 'wp-photo-album-plus');
|
241 |
}
|
242 |
else {
|
243 |
$result .=
|
244 |
-
'<select id="wppagallery-album-real" style="max-width:400px;"
|
245 |
if ( $albums ) {
|
246 |
|
247 |
// Please select
|
248 |
-
$result .= '<option id="wppagallery-album-0" value="0" disabled
|
249 |
|
250 |
// All standard albums
|
251 |
foreach ( $albums as $album ) {
|
@@ -292,7 +292,7 @@ global $wpdb;
|
|
292 |
if ( $albums ) {
|
293 |
|
294 |
// Please select
|
295 |
-
$result .= '<option id="wppagallery-album-0" class="wppagallery-album-ropt" value="0" selected
|
296 |
|
297 |
// All standard albums
|
298 |
foreach ( $albums as $album ) {
|
@@ -314,7 +314,7 @@ global $wpdb;
|
|
314 |
'<th><label for="wppagallery-owner">'.__('The album owner:', 'wp-photo-album-plus').'</label></th>'.
|
315 |
'<td>'.
|
316 |
'<select id="wppagallery-owner" name="owner" class="wppagallery-owner" onchange="wppaGutenbergGalleryEvaluate()">'.
|
317 |
-
'<option value="" disabled
|
318 |
'<option value="#me" >-- '.__('The logged in visitor', 'wp-photo-album-plus').' --</option>';
|
319 |
$users = wppa_get_users();
|
320 |
if ( $users ) foreach ( $users as $user ) {
|
@@ -336,7 +336,7 @@ global $wpdb;
|
|
336 |
if ( $albums ) {
|
337 |
|
338 |
// Please select
|
339 |
-
$result .= '<option class="wppagallery-album-p" value="" selected
|
340 |
|
341 |
// Generic
|
342 |
$result .= '<option class="wppagallery-album-p" value="zero" >-- '.__('The generic parent', 'wp-photo-album-plus').' --</option>';
|
@@ -362,7 +362,7 @@ global $wpdb;
|
|
362 |
if ($albums) {
|
363 |
|
364 |
// Please select
|
365 |
-
$result .= '<option id="wppagallery-album-0" value="0" selected
|
366 |
|
367 |
// All standard albums
|
368 |
foreach ( $albums as $album ) {
|
@@ -398,7 +398,7 @@ global $wpdb;
|
|
398 |
'<th><label for="wppagallery-albumcat">'.__('The album cat(s):', 'wp-photo-album-plus').'</label></th>'.
|
399 |
'<td>'.
|
400 |
'<select id="wppagallery-albumcat" style="color:#700 !important;" onchange="wppaGutenbergGalleryEvaluate()" multiple="multiple" >'.
|
401 |
-
'<option value="" disabled
|
402 |
if ( $cats ) foreach ( array_keys( $cats ) as $cat ) {
|
403 |
$result .= '<option class="wppagallery-albumcat" value="'.$cat.'" >'.$cat.'</option>';
|
404 |
}
|
@@ -415,7 +415,7 @@ global $wpdb;
|
|
415 |
if ( $photos ) {
|
416 |
|
417 |
// Please select
|
418 |
-
$result .= '<option value="" disabled
|
419 |
$result .= '<option value="@potd" >-- '.__('The photo of the day', 'wp-photo-album-plus').' --</option>';
|
420 |
|
421 |
// Most recent 100 photos
|
@@ -473,7 +473,7 @@ global $wpdb;
|
|
473 |
'<th><label for="wppagallery-phototags">'.__('The photo tag(s):', 'wp-photo-album-plus').'</label></th>'.
|
474 |
'<td>'.
|
475 |
'<select id="wppagallery-phototags" style="color:#700 !important;" multiple="multiple" onchange="wppaGutenbergGalleryEvaluate()">'.
|
476 |
-
'<option value="" disabled
|
477 |
if ( $tags ) foreach ( array_keys($tags) as $tag ) {
|
478 |
$result .= '<option class="wppagallery-phototags" value="'.$tag.'" >'.$tag.'</option>';
|
479 |
}
|
@@ -505,7 +505,7 @@ global $wpdb;
|
|
505 |
'<th><label>'.__('Search root:', 'wp-photo-album-plus').'</label></th>'.
|
506 |
'<td>'.
|
507 |
'<select id="wppagallery-rootalbum" onchange="wppaGutenbergGalleryEvaluate()" >'.
|
508 |
-
'<option value="0" selected
|
509 |
if ( $albums ) {
|
510 |
|
511 |
// All standard albums
|
@@ -524,12 +524,12 @@ global $wpdb;
|
|
524 |
'<th><label>'.__('Landing page:', 'wp-photo-album-plus').'</label></th>'.
|
525 |
'<td>'.
|
526 |
'<select id="wppagallery-landing" onchange="wppaGutenbergGalleryEvaluate()" >'.
|
527 |
-
'<option value="0" selected
|
528 |
if ( $pages ) {
|
529 |
foreach( $pages as $page ) {
|
530 |
$dis = '';
|
531 |
if ( strpos( $page['post_content'], '[wppa' ) === false ) {
|
532 |
-
$dis = ' disabled
|
533 |
}
|
534 |
$result .= '<option value="'.$page['ID'].'"'.$dis.' >'.__( $page['post_title'] ).'</option>';
|
535 |
}
|
@@ -546,13 +546,13 @@ global $wpdb;
|
|
546 |
'<input id="wppagallery-alltags" type="checkbox" checked="checked" name="alltags" onchange="wppaGutenbergGalleryEvaluate()"/>'.__('Enable all tags', 'wp-photo-album-plus').' '.
|
547 |
'<select id="wppagallery-seltags" style="color:#070; display:none;" name="seltags" multiple="multiple" onchange="wppaGutenbergGalleryEvaluate()">';
|
548 |
if ( $tags ) {
|
549 |
-
'<option value="" disabled
|
550 |
foreach( array_keys($tags) as $tag ) {
|
551 |
$result .= '<option class="wppagallery-taglist-tags" value="'.$tag.'" >'.$tag.'</option>';
|
552 |
}
|
553 |
}
|
554 |
else {
|
555 |
-
'<option value="" disabled
|
556 |
}
|
557 |
$result .= '</select>'.
|
558 |
'</td>'.
|
@@ -566,7 +566,7 @@ global $wpdb;
|
|
566 |
if ( $albums ) {
|
567 |
|
568 |
// Please select
|
569 |
-
$result .= '<option value="" selected
|
570 |
|
571 |
// All standard albums
|
572 |
foreach ( $albums as $album ) {
|
2 |
/* wppa-gutenberg-wppa.php
|
3 |
* Pachkage: wp-photo-album-plus
|
4 |
*
|
5 |
+
* Version 8.1.08.001
|
6 |
*/
|
7 |
|
8 |
function wppa_gutenberg_wppa_block() {
|
80 |
<th><label for="wppagallery-top-type">' . __( 'Type of WPPA display:', 'wp-photo-album-plus' ) . '</label></th>
|
81 |
<td>
|
82 |
<select id="wppagallery-top-type" name="type" onchange="wppaGutenbergGalleryEvaluate()" >
|
83 |
+
<option value="" selected disabled style="color:#700 !important;" >-- ' . __( 'Please select a display type', 'wp-photo-album-plus' ) . ' --</option>
|
84 |
<option value="galerytype" >' . __( 'A gallery with covers and/or thumbnails', 'wp-photo-album-plus' ) . '</option>
|
85 |
<option value="slidestype" >' . __( 'A slideshow', 'wp-photo-album-plus' ) . '</option>
|
86 |
<option value="singletype" >' . __( 'A single image', 'wp-photo-album-plus' ) . '</option>
|
95 |
<th><label for="wppagallery-galery-type" >' . __( 'Type of gallery display:', 'wp-photo-album-plus' ) . '</label></th>
|
96 |
<td>
|
97 |
<select id="wppagallery-galery-type" name="type" onchange="wppaGutenbergGalleryEvaluate()" >
|
98 |
+
<option value="" selected disabled style="color:#700 !important;" >-- ' . __( 'Please select a gallery type', 'wp-photo-album-plus' ) . ' --</option>
|
99 |
<option value="cover" >' . __( 'The cover(s) of specific album(s)', 'wp-photo-album-plus' ) . '</option>
|
100 |
<option value="content" >' . __( 'The content of specific album(s)', 'wp-photo-album-plus' ) . '</option>
|
101 |
<option value="covers" >' . __( 'The covers of the subalbums of specific album(s)', 'wp-photo-album-plus' ) . '</option>
|
109 |
<th><label for="wppagallery-slides-type">' . __( 'Type of slideshow:', 'wp-photo-album-plus' ) . '</label></th>
|
110 |
<td>
|
111 |
<select id="wppagallery-slides-type" name="type" onchange="wppaGutenbergGalleryEvaluate()" >
|
112 |
+
<option value="" selected disabled style="color:#700 !important;" >-- ' . __( 'Please select a slideshow type', 'wp-photo-album-plus' ) . ' --</option>
|
113 |
<option value="slide" >' . __( 'A fully featured slideshow', 'wp-photo-album-plus' ) . '</option>
|
114 |
<option value="slideonly" >' . __( 'A slideshow without supporting boxes', 'wp-photo-album-plus' ) . '</option>
|
115 |
<option value="slideonlyf" >' . __( 'A slideshow with a filmstrip only', 'wp-photo-album-plus' ) . '</option>
|
123 |
<th><label for="wppagallery-single-type">' . __( 'Type of single image:', 'wp-photo-album-plus' ) . '</label></th>
|
124 |
<td>
|
125 |
<select id="wppagallery-single-type" name="type" onchange="wppaGutenbergGalleryEvaluate()" >
|
126 |
+
<option value="" selected disabled style="color:#700 !important;" >-- ' . __( 'Please select a single image type', 'wp-photo-album-plus' ) . ' --</option>
|
127 |
<option value="photo" >' . __( 'A plain single photo', 'wp-photo-album-plus' ) . '</option>
|
128 |
<option value="mphoto" >' . __( 'A single photo with caption', 'wp-photo-album-plus' ) . '</option>
|
129 |
<option value="xphoto" >' . __( 'A single photo with extended caption', 'wp-photo-album-plus' ) . '</option>
|
137 |
<th><label for="wppagallery-search-type">' . __( 'Type of search:', 'wp-photo-album-plus' ) . '</label></th>
|
138 |
<td>
|
139 |
<select id="wppagallery-search-type" name="type" onchange="wppaGutenbergGalleryEvaluate()" >
|
140 |
+
<option value="" selected disabled style="color:#700 !important;" >-- ' . __( 'Please select a search type', 'wp-photo-album-plus' ) . ' --</option>
|
141 |
<option value="search" >' . __( 'A search box', 'wp-photo-album-plus' ) . '</option>
|
142 |
<option value="supersearch" >' . __( 'A supersearch box', 'wp-photo-album-plus' ) . '</option>
|
143 |
<option value="tagcloud" >' . __( 'A tagcloud box', 'wp-photo-album-plus' ) . '</option>
|
153 |
<th><label for="wppagallery-miscel-type">' . __( 'Type miscellaneous:', 'wp-photo-album-plus' ) . '</label></th>
|
154 |
<td>
|
155 |
<select id="wppagallery-miscel-type" name="type" onchange="wppaGutenbergGalleryEvaluate()" >
|
156 |
+
<option value="" selected disabled style="color:#700 !important;" >-- ' . __( 'Please select a miscellaneous display', 'wp-photo-album-plus' ) . ' --</option>
|
157 |
<option value="generic" >' . __( 'A generic albums display', 'wp-photo-album-plus' ) . '</option>
|
158 |
<option value="upload">'.__('An upload box', 'wp-photo-album-plus').'</option>'.
|
159 |
'<option value="landing">'.__('A landing page shortcode', 'wp-photo-album-plus').'</option>'.
|
168 |
'<th><label for="wppagallery-admins">'.__('Users:', 'wp-photo-album-plus').'</label></th>'.
|
169 |
'<td>'.
|
170 |
'<select id="wppagallery-admins" name="admins" style="color:#070;" multiple="multiple" onchange="wppaGutenbergGalleryEvaluate()">'.
|
171 |
+
'<option value="" selected style="color:#070;" >-- '.__('All', 'wp-photo-album-plus').' --</option>';
|
172 |
foreach( $admins as $user ) {
|
173 |
$result .=
|
174 |
'<option value="'.$user->data->user_login.'" class="wppagallery-admin" style="color:#070;" >'.$user->data->user_login.'</option>';
|
188 |
'<th><label for="wppagallery-album-type">'.__('Kind of selection:', 'wp-photo-album-plus').'</label></th>'.
|
189 |
'<td>'.
|
190 |
'<select id="wppagallery-album-type" name="type" onchange="wppaGutenbergGalleryEvaluate()">'.
|
191 |
+
'<option value="" selected disabled style="color:#700 !important;" >-- '.__('Please select a type of selection to be used', 'wp-photo-album-plus').' --</option>'.
|
192 |
'<option value="real">'.__('One or more wppa+ albums', 'wp-photo-album-plus').'</option>'.
|
193 |
'<option value="virtual">'.__('A special selection', 'wp-photo-album-plus').'</option>'.
|
194 |
'</select>'.
|
200 |
'<th><label for="wppagallery-album-virt">'.__('The selection to be used:', 'wp-photo-album-plus').'</label></th>'.
|
201 |
'<td>'.
|
202 |
'<select id="wppagallery-album-virt" name="album" class="wppagallery-album" onchange="wppaGutenbergGalleryEvaluate()">'.
|
203 |
+
'<option value="" disabled selected style="color:#700 !important;" >-- '.__('Please select a virtual album', 'wp-photo-album-plus').' --</option>'.
|
204 |
'<option value="@last" >'.__('The most recently added album', 'wp-photo-album-plus').'</option>'.
|
205 |
'<option value="@topten" >'.__('The top rated photos', 'wp-photo-album-plus').'</option>'.
|
206 |
'<option value="@lasten" >'.__('The most recently uploaded photos', 'wp-photo-album-plus').'</option>'.
|
220 |
'<th><label for="wppagallery-album-virt-cover">'.__('The selection to be used:', 'wp-photo-album-plus').'</label></th>'.
|
221 |
'<td>'.
|
222 |
'<select id="wppagallery-album-virt-cover" name="album" class="wppagallery-album" onchange="wppaGutenbergGalleryEvaluate()">'.
|
223 |
+
'<option value="" disabled selected style="color:#700 !important;" >-- '.__('Please select a virtual album', 'wp-photo-album-plus').' --</option>'.
|
224 |
'<option value="@last" >'.__('The most recently modified album', 'wp-photo-album-plus').'</option>'.
|
225 |
'<option value="@owner" >'.__('Albums owned by a certain user', 'wp-photo-album-plus').'</option>'.
|
226 |
'<option value="@cat" >'.__('Albums tagged with certain categories', 'wp-photo-album-plus').'</option>'.
|
235 |
'<td>';
|
236 |
if ( wppa_has_many_albums() ) {
|
237 |
$result .=
|
238 |
+
'<input id="wppagallery-album-real" style="max-width:400px;" name="album" value="" onchange="wppaGutenbergGalleryEvaluate()" />'.
|
239 |
'<br />'.
|
240 |
__('Enter one or more album numbers, seperated by commas', 'wp-photo-album-plus');
|
241 |
}
|
242 |
else {
|
243 |
$result .=
|
244 |
+
'<select id="wppagallery-album-real" style="max-width:400px;" value="" name="album" multiple onchange="wppaGutenbergGalleryEvaluate()">';
|
245 |
if ( $albums ) {
|
246 |
|
247 |
// Please select
|
248 |
+
$result .= '<option id="wppagallery-album-0" value="0" disabled selected style="color:#700 !important;" >-- '.__('Please select one or more albums', 'wp-photo-album-plus').' --</option>';
|
249 |
|
250 |
// All standard albums
|
251 |
foreach ( $albums as $album ) {
|
292 |
if ( $albums ) {
|
293 |
|
294 |
// Please select
|
295 |
+
$result .= '<option id="wppagallery-album-0" class="wppagallery-album-ropt" value="0" selected >-- '.__('All albums', 'wp-photo-album-plus').' --</option>';
|
296 |
|
297 |
// All standard albums
|
298 |
foreach ( $albums as $album ) {
|
314 |
'<th><label for="wppagallery-owner">'.__('The album owner:', 'wp-photo-album-plus').'</label></th>'.
|
315 |
'<td>'.
|
316 |
'<select id="wppagallery-owner" name="owner" class="wppagallery-owner" onchange="wppaGutenbergGalleryEvaluate()">'.
|
317 |
+
'<option value="" disabled selected style="color:#700 !important;" >-- '.__('Please select a user', 'wp-photo-album-plus').' --</option>'.
|
318 |
'<option value="#me" >-- '.__('The logged in visitor', 'wp-photo-album-plus').' --</option>';
|
319 |
$users = wppa_get_users();
|
320 |
if ( $users ) foreach ( $users as $user ) {
|
336 |
if ( $albums ) {
|
337 |
|
338 |
// Please select
|
339 |
+
$result .= '<option class="wppagallery-album-p" value="" selected >-- '.__('No parent specification', 'wp-photo-album-plus').' --</option>';
|
340 |
|
341 |
// Generic
|
342 |
$result .= '<option class="wppagallery-album-p" value="zero" >-- '.__('The generic parent', 'wp-photo-album-plus').' --</option>';
|
362 |
if ($albums) {
|
363 |
|
364 |
// Please select
|
365 |
+
$result .= '<option id="wppagallery-album-0" value="0" selected style="color:#700 !important;" >-- '.__('The generic parent', 'wp-photo-album-plus').' --</option>';
|
366 |
|
367 |
// All standard albums
|
368 |
foreach ( $albums as $album ) {
|
398 |
'<th><label for="wppagallery-albumcat">'.__('The album cat(s):', 'wp-photo-album-plus').'</label></th>'.
|
399 |
'<td>'.
|
400 |
'<select id="wppagallery-albumcat" style="color:#700 !important;" onchange="wppaGutenbergGalleryEvaluate()" multiple="multiple" >'.
|
401 |
+
'<option value="" disabled selected style="color:#700 !important;" >'.__('--- please select category ---', 'wp-photo-album-plus').'</option>';
|
402 |
if ( $cats ) foreach ( array_keys( $cats ) as $cat ) {
|
403 |
$result .= '<option class="wppagallery-albumcat" value="'.$cat.'" >'.$cat.'</option>';
|
404 |
}
|
415 |
if ( $photos ) {
|
416 |
|
417 |
// Please select
|
418 |
+
$result .= '<option value="" disabled selected style="color:#700 !important;" >-- '.__('Please select a photo', 'wp-photo-album-plus').' --</option>';
|
419 |
$result .= '<option value="@potd" >-- '.__('The photo of the day', 'wp-photo-album-plus').' --</option>';
|
420 |
|
421 |
// Most recent 100 photos
|
473 |
'<th><label for="wppagallery-phototags">'.__('The photo tag(s):', 'wp-photo-album-plus').'</label></th>'.
|
474 |
'<td>'.
|
475 |
'<select id="wppagallery-phototags" style="color:#700 !important;" multiple="multiple" onchange="wppaGutenbergGalleryEvaluate()">'.
|
476 |
+
'<option value="" disabled selected style="color:#700 !important;" >'.__('--- please select tag(s) ---', 'wp-photo-album-plus').'</option>';
|
477 |
if ( $tags ) foreach ( array_keys($tags) as $tag ) {
|
478 |
$result .= '<option class="wppagallery-phototags" value="'.$tag.'" >'.$tag.'</option>';
|
479 |
}
|
505 |
'<th><label>'.__('Search root:', 'wp-photo-album-plus').'</label></th>'.
|
506 |
'<td>'.
|
507 |
'<select id="wppagallery-rootalbum" onchange="wppaGutenbergGalleryEvaluate()" >'.
|
508 |
+
'<option value="0" selected >'.__('--- default ---', 'wp-photo-album-plus').'</option>';
|
509 |
if ( $albums ) {
|
510 |
|
511 |
// All standard albums
|
524 |
'<th><label>'.__('Landing page:', 'wp-photo-album-plus').'</label></th>'.
|
525 |
'<td>'.
|
526 |
'<select id="wppagallery-landing" onchange="wppaGutenbergGalleryEvaluate()" >'.
|
527 |
+
'<option value="0" selected >'.__('--- default ---', 'wp-photo-album-plus').'</option>';
|
528 |
if ( $pages ) {
|
529 |
foreach( $pages as $page ) {
|
530 |
$dis = '';
|
531 |
if ( strpos( $page['post_content'], '[wppa' ) === false ) {
|
532 |
+
$dis = ' disabled';
|
533 |
}
|
534 |
$result .= '<option value="'.$page['ID'].'"'.$dis.' >'.__( $page['post_title'] ).'</option>';
|
535 |
}
|
546 |
'<input id="wppagallery-alltags" type="checkbox" checked="checked" name="alltags" onchange="wppaGutenbergGalleryEvaluate()"/>'.__('Enable all tags', 'wp-photo-album-plus').' '.
|
547 |
'<select id="wppagallery-seltags" style="color:#070; display:none;" name="seltags" multiple="multiple" onchange="wppaGutenbergGalleryEvaluate()">';
|
548 |
if ( $tags ) {
|
549 |
+
'<option value="" disabled selected style="color:#700 !important;" >-- '.__('Please select the tags to show', 'wp-photo-album-plus').' --</option>';
|
550 |
foreach( array_keys($tags) as $tag ) {
|
551 |
$result .= '<option class="wppagallery-taglist-tags" value="'.$tag.'" >'.$tag.'</option>';
|
552 |
}
|
553 |
}
|
554 |
else {
|
555 |
+
'<option value="" disabled selected style="color:#700 !important;" >-- '.__('There are no tags', 'wp-photo-album-plus').' --</option>';
|
556 |
}
|
557 |
$result .= '</select>'.
|
558 |
'</td>'.
|
566 |
if ( $albums ) {
|
567 |
|
568 |
// Please select
|
569 |
+
$result .= '<option value="" selected >-- '.__('The generic parent', 'wp-photo-album-plus').' --</option>';
|
570 |
|
571 |
// All standard albums
|
572 |
foreach ( $albums as $album ) {
|
wppa-import.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the import pages and functions
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -267,8 +267,8 @@ global $wppa_session;
|
|
267 |
name="wppa-local-remote"
|
268 |
onchange="jQuery(\'#rem-rem-0\').show();jQuery(\'#wppa-import-set-source\').trigger(\'click\');"
|
269 |
>
|
270 |
-
<option value="local" ' . ( $source_type == 'local' ? 'selected
|
271 |
-
<option value="remote" ' . ( $source_type == 'remote' ? 'selected
|
272 |
</select>
|
273 |
<span id="rem-rem-0" style="display:none;" >' .
|
274 |
__( 'Working, please wait...', 'wp-photo-album-plus' ) . '
|
@@ -609,7 +609,7 @@ global $wppa_session;
|
|
609 |
__( 'Delay', 'wp-photo-album-plus' ) .
|
610 |
'<select id="wppa-delay" >' );
|
611 |
foreach ( $delays as $d ) {
|
612 |
-
wppa_echo( '<option value="' . ( $d * 1000 ) . '" ' . ( $d == '1' ? 'selected
|
613 |
}
|
614 |
wppa_echo( '
|
615 |
</select> s.
|
@@ -1117,7 +1117,7 @@ global $wppa_session;
|
|
1117 |
id="del-after-c"
|
1118 |
name="del-after-c"
|
1119 |
checked="checked"
|
1120 |
-
disabled
|
1121 |
/>
|
1122 |
<b>
|
1123 |
' .
|
@@ -3213,14 +3213,14 @@ static $void_dirs;
|
|
3213 |
}
|
3214 |
|
3215 |
// If currently in selected dir, set selected
|
3216 |
-
$sel = $root == $source ? ' selected
|
3217 |
|
3218 |
// Set disabled if there are no files inside
|
3219 |
$files = wppa_glob( $root . '/*', null, true );
|
3220 |
$n_files = ! empty( $files ) ? count( $files ) : 0;
|
3221 |
$dirs = wppa_glob( $root . '/*', GLOB_ONLYDIR, true );
|
3222 |
$n_dirs = ! empty( $dirs ) ? count( $dirs ) : 0;
|
3223 |
-
$dis = $n_files == $n_dirs ? ' disabled
|
3224 |
|
3225 |
// Check for (sub)depot
|
3226 |
$my_depot = __( '--- My depot --- ' ,'wp-photo-album-plus' );
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the import pages and functions
|
6 |
+
* Version 8.1.08.001
|
7 |
*
|
8 |
*/
|
9 |
|
267 |
name="wppa-local-remote"
|
268 |
onchange="jQuery(\'#rem-rem-0\').show();jQuery(\'#wppa-import-set-source\').trigger(\'click\');"
|
269 |
>
|
270 |
+
<option value="local" ' . ( $source_type == 'local' ? 'selected' : '' ) . '>' . __( 'Local', 'wp-photo-album-plus' ) . '</option>
|
271 |
+
<option value="remote" ' . ( $source_type == 'remote' ? 'selected' : '' ) . '>' . __( 'Remote' ,'wp-photo-album-plus' ) . '</option>
|
272 |
</select>
|
273 |
<span id="rem-rem-0" style="display:none;" >' .
|
274 |
__( 'Working, please wait...', 'wp-photo-album-plus' ) . '
|
609 |
__( 'Delay', 'wp-photo-album-plus' ) .
|
610 |
'<select id="wppa-delay" >' );
|
611 |
foreach ( $delays as $d ) {
|
612 |
+
wppa_echo( '<option value="' . ( $d * 1000 ) . '" ' . ( $d == '1' ? 'selected ' : '' ) . '>' . $d . '</option>' );
|
613 |
}
|
614 |
wppa_echo( '
|
615 |
</select> s.
|
1117 |
id="del-after-c"
|
1118 |
name="del-after-c"
|
1119 |
checked="checked"
|
1120 |
+
disabled
|
1121 |
/>
|
1122 |
<b>
|
1123 |
' .
|
3213 |
}
|
3214 |
|
3215 |
// If currently in selected dir, set selected
|
3216 |
+
$sel = $root == $source ? ' selected' : '';
|
3217 |
|
3218 |
// Set disabled if there are no files inside
|
3219 |
$files = wppa_glob( $root . '/*', null, true );
|
3220 |
$n_files = ! empty( $files ) ? count( $files ) : 0;
|
3221 |
$dirs = wppa_glob( $root . '/*', GLOB_ONLYDIR, true );
|
3222 |
$n_dirs = ! empty( $dirs ) ? count( $dirs ) : 0;
|
3223 |
+
$dis = $n_files == $n_dirs ? ' disabled' : '';
|
3224 |
|
3225 |
// Check for (sub)depot
|
3226 |
$my_depot = __( '--- My depot --- ' ,'wp-photo-album-plus' );
|
wppa-items.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains functions to retrieve album and photo items
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -311,7 +311,7 @@ function wppa_get_photo_name( $id, $xargs = array() ) {
|
|
311 |
// Translate keywords
|
312 |
$result = str_replace( 'w#id', $id, $result );
|
313 |
|
314 |
-
return $result;
|
315 |
}
|
316 |
|
317 |
// get the description of an image
|
@@ -362,7 +362,7 @@ function wppa_get_photo_desc( $id, $xargs = array() ) {
|
|
362 |
// CMTooltipGlossary on board?
|
363 |
$desc = wppa_filter_glossary( $desc );
|
364 |
|
365 |
-
return $desc;
|
366 |
}
|
367 |
|
368 |
// Translate keywords
|
@@ -694,7 +694,7 @@ function wppa_get_album_name( $id, $xargs = array() ) { // $extended = false ) {
|
|
694 |
$name = strip_shortcodes( $name );
|
695 |
}
|
696 |
|
697 |
-
return $name;
|
698 |
}
|
699 |
|
700 |
// get album description
|
@@ -775,7 +775,7 @@ function wppa_get_album_desc( $id, $xargs = array() ) {
|
|
775 |
}
|
776 |
|
777 |
// Done!
|
778 |
-
return $desc;
|
779 |
}
|
780 |
|
781 |
// Translate album keywords
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains functions to retrieve album and photo items
|
6 |
+
* Version 8.1.08.001
|
7 |
*
|
8 |
*/
|
9 |
|
311 |
// Translate keywords
|
312 |
$result = str_replace( 'w#id', $id, $result );
|
313 |
|
314 |
+
return wppa_utf8( $result );
|
315 |
}
|
316 |
|
317 |
// get the description of an image
|
362 |
// CMTooltipGlossary on board?
|
363 |
$desc = wppa_filter_glossary( $desc );
|
364 |
|
365 |
+
return wppa_utf8( $desc );
|
366 |
}
|
367 |
|
368 |
// Translate keywords
|
694 |
$name = strip_shortcodes( $name );
|
695 |
}
|
696 |
|
697 |
+
return wppa_utf8( $name );
|
698 |
}
|
699 |
|
700 |
// get album description
|
775 |
}
|
776 |
|
777 |
// Done!
|
778 |
+
return wppa_utf8( $desc );
|
779 |
}
|
780 |
|
781 |
// Translate album keywords
|
wppa-mailing.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* Contains mailing functions
|
6 |
*
|
7 |
-
* Version 8.1.
|
8 |
*
|
9 |
*/
|
10 |
|
@@ -47,13 +47,16 @@ function wppa_schedule_mailinglist( $type, $alb = 0, $pho = 0, $com = 0, $url =
|
|
47 |
$pending = get_transient( 'last_feuploadnotify_scheduled-' . $owner . '-' . $alb );
|
48 |
wppa_log( 'eml', 'Reading transient ' . 'last_feuploadnotify_scheduled-' . $owner . '-' . $alb . ' Value = ' . var_export( $pending, true ) );
|
49 |
|
50 |
-
if ( $pending ) {
|
51 |
-
return;
|
52 |
-
}
|
53 |
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
57 |
}
|
58 |
|
59 |
// wp_schedule_single_event( int $timestamp, string $hook, array $args = array(), bool $wp_error = false )
|
@@ -268,10 +271,9 @@ global $wpdb;
|
|
268 |
wppa_exit();
|
269 |
}
|
270 |
|
271 |
-
// See if there are more directly uploaded
|
272 |
-
|
273 |
-
$
|
274 |
-
$owner = wppa_get_photo_item( $pho, 'owner' );
|
275 |
$photos = $wpdb->get_col( "SELECT id
|
276 |
FROM $wpdb->wppa_photos
|
277 |
WHERE timestamp >= $timestamp
|
4 |
*
|
5 |
* Contains mailing functions
|
6 |
*
|
7 |
+
* Version 8.1.08.001
|
8 |
*
|
9 |
*/
|
10 |
|
47 |
$pending = get_transient( 'last_feuploadnotify_scheduled-' . $owner . '-' . $alb );
|
48 |
wppa_log( 'eml', 'Reading transient ' . 'last_feuploadnotify_scheduled-' . $owner . '-' . $alb . ' Value = ' . var_export( $pending, true ) );
|
49 |
|
50 |
+
if ( ! $pending ) {
|
|
|
|
|
51 |
|
52 |
+
// Save this one to signal next that this one is pending
|
53 |
+
set_transient( 'last_feuploadnotify_scheduled-' . $owner . '-' . $alb, $pho, HOUR_IN_SECONDS );
|
54 |
+
wppa_log( 'eml', 'Writing transient ' . 'last_feuploadnotify_scheduled-' . $owner . '-' . $alb . ' Value = ' . $pho );
|
55 |
+
}
|
56 |
+
else {
|
57 |
+
$pho = $pending;
|
58 |
+
$log_args = " Args: $alb, $pho, $com, $url, $start.";
|
59 |
+
}
|
60 |
}
|
61 |
|
62 |
// wp_schedule_single_event( int $timestamp, string $hook, array $args = array(), bool $wp_error = false )
|
271 |
wppa_exit();
|
272 |
}
|
273 |
|
274 |
+
// See if there are more directly uploaded by this user in this album
|
275 |
+
$timestamp = wppa_get_photo_item( $pho, 'timestamp' );
|
276 |
+
$owner = wppa_get_photo_item( $pho, 'owner' );
|
|
|
277 |
$photos = $wpdb->get_col( "SELECT id
|
278 |
FROM $wpdb->wppa_photos
|
279 |
WHERE timestamp >= $timestamp
|
wppa-multitag-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the multitag widget
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -112,7 +112,7 @@ class MultitagPhotos extends WP_Widget {
|
|
112 |
$tags = wppa_get_taglist();
|
113 |
$body = '<option value="" >' . __( '--- all ---', 'wp-photo-album-plus' ) . '</option>';
|
114 |
if ( $tags ) foreach ( array_keys( $tags ) as $tag ) {
|
115 |
-
if ( in_array( $tag, $stags ) ) $sel = ' selected
|
116 |
$body .= '<option value="' . esc_attr( $tag ) . '"' . $sel . ' >' . htmlspecialchars( $tag ) . '</option>';
|
117 |
}
|
118 |
echo
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the multitag widget
|
6 |
+
* Version 8.1.08.001
|
7 |
*
|
8 |
*/
|
9 |
|
112 |
$tags = wppa_get_taglist();
|
113 |
$body = '<option value="" >' . __( '--- all ---', 'wp-photo-album-plus' ) . '</option>';
|
114 |
if ( $tags ) foreach ( array_keys( $tags ) as $tag ) {
|
115 |
+
if ( in_array( $tag, $stags ) ) $sel = ' selected'; else $sel = '';
|
116 |
$body .= '<option value="' . esc_attr( $tag ) . '"' . $sel . ' >' . htmlspecialchars( $tag ) . '</option>';
|
117 |
}
|
118 |
echo
|
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 |
|
@@ -857,12 +857,12 @@ function wppaToggleExif( id, count ) {
|
|
857 |
__( 'Status:' , 'wp-photo-album-plus') . ' ', 'post' );
|
858 |
if ( ( current_user_can( 'wppa_admin' ) || current_user_can( 'wppa_moderate' ) ) ) {
|
859 |
if ( wppa_switch( 'ext_status_restricted' ) && ! wppa_user_is( 'administrator' ) ) {
|
860 |
-
$dis = ' disabled
|
861 |
}
|
862 |
else {
|
863 |
$dis = '';
|
864 |
}
|
865 |
-
$sel = ' selected
|
866 |
wppa_echo(
|
867 |
'<select' .
|
868 |
' id="status-' . $id . '"' .
|
@@ -929,7 +929,7 @@ function wppaToggleExif( id, count ) {
|
|
929 |
' type="checkbox"' .
|
930 |
' id="scheduledel-' . $id . '"' .
|
931 |
( $scheduledel ? ' checked="checked"' : '' ) .
|
932 |
-
( $may_change ? '' : ' disabled
|
933 |
' onchange="wppaTryScheduledel( ' . $id . ' )"' .
|
934 |
' />' .
|
935 |
' ' .
|
@@ -1156,13 +1156,13 @@ function wppaToggleExif( id, count ) {
|
|
1156 |
' id="stereo-' . $id . '"' .
|
1157 |
' onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'stereo\', this.value, true)"' .
|
1158 |
' >' .
|
1159 |
-
'<option value="0"' . ( $stereo == '0' ? ' selected
|
1160 |
__( 'no stereo image or ready anaglyph', 'wp-photo-album-plus' ) .
|
1161 |
'</option>' .
|
1162 |
-
'<option value="1"' . ( $stereo == '1' ? ' selected
|
1163 |
__( 'Left - right stereo image', 'wp-photo-album-plus' ) .
|
1164 |
'</option>' .
|
1165 |
-
'<option value="-1"' . ( $stereo == '-1' ? ' selected
|
1166 |
__( 'Right - left stereo image', 'wp-photo-album-plus' ) .
|
1167 |
'</option>' .
|
1168 |
'</select>' .
|
@@ -1199,9 +1199,9 @@ function wppaToggleExif( id, count ) {
|
|
1199 |
wppa_echo(
|
1200 |
__( 'Panorama' ) . ': ' .
|
1201 |
'<select onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'panorama\', this.value, true )">' .
|
1202 |
-
'<option value="0"' . ( $panorama == '0' ? ' selected
|
1203 |
-
'<option value="1"' . ( $panorama == '1' ? ' selected
|
1204 |
-
'<option value="2"' . ( $panorama == '2' ? ' selected
|
1205 |
'</select>' );
|
1206 |
|
1207 |
$source_file = wppa_get_source_path( $id );
|
@@ -1218,7 +1218,7 @@ function wppaToggleExif( id, count ) {
|
|
1218 |
<option value="">'.__('Select', 'wp-photo-album-plus').'</option>' );
|
1219 |
$t = array( 120, 150, 180, 210, 240, 270, 300, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450 );
|
1220 |
foreach( $t as $v ) {
|
1221 |
-
wppa_echo( '<option value="'.$v.'" '.($v==$angle?'selected
|
1222 |
}
|
1223 |
wppa_echo( '
|
1224 |
<option value="0">'.__('Undo', 'wp-photo-album-plus').'</option>
|
@@ -2018,13 +2018,13 @@ function wppaToggleExif( id, count ) {
|
|
2018 |
' >' .
|
2019 |
'<option' .
|
2020 |
' value="_self"' .
|
2021 |
-
( $linktarget == '_self' ? ' selected
|
2022 |
' >' .
|
2023 |
__( 'Same tab', 'wp-photo-album-plus' ) .
|
2024 |
'</option>' .
|
2025 |
'<option' .
|
2026 |
' value="_blank"' .
|
2027 |
-
( $linktarget == '_blank' ? ' selected
|
2028 |
' >' .
|
2029 |
__( 'New tab', 'wp-photo-album-plus' ) .
|
2030 |
'</option>' .
|
@@ -2322,10 +2322,10 @@ function wppaToggleExif( id, count ) {
|
|
2322 |
<td style="padding:0 4px">'.$comment['user'].'</td>
|
2323 |
<td style="padding:0 4px">'.wppa_get_time_since( $comment['timestamp'] ).'</td>' );
|
2324 |
if ( current_user_can( 'wppa_comments' ) || current_user_can( 'wppa_moderate' ) || ( wppa_get_user() == $photo['owner'] && wppa_switch( 'owner_moderate_comment' ) ) ) {
|
2325 |
-
$p = ( $comment['status'] == 'pending' ) ? 'selected
|
2326 |
-
$a = ( $comment['status'] == 'approved' ) ? 'selected
|
2327 |
-
$s = ( $comment['status'] == 'spam' ) ? 'selected
|
2328 |
-
$t = ( $comment['status'] == 'trash' ) ? 'selected
|
2329 |
wppa_echo(
|
2330 |
'<td style="padding:0 4px">' .
|
2331 |
'<select' .
|
@@ -2701,9 +2701,9 @@ function wppaTryMove( id, video ) {
|
|
2701 |
?>
|
2702 |
<?php $nextafterselhtml =
|
2703 |
'<select name="next-after">' .
|
2704 |
-
'<option value="-1" ' . ( $next_after == '-1' ? 'selected
|
2705 |
-
'<option value="0" ' . ( $next_after == '0' ? 'selected
|
2706 |
-
'<option value="1" ' . ( $next_after == '1' ? 'selected
|
2707 |
'</select>';
|
2708 |
wppa_echo( sprintf( __( 'Go to %s after Doit!.', 'wp-photo-album-plus'), $nextafterselhtml ) );
|
2709 |
if ( wppa_is_mobile() ) {
|
@@ -2894,15 +2894,15 @@ function wppaTryMove( id, video ) {
|
|
2894 |
<td>
|
2895 |
<?php if ( current_user_can( 'wppa_admin' ) || current_user_can( 'wppa_moderate' ) ) { ?>
|
2896 |
<select id="status-<?php wppa_echo( $photo['id'], 'post' ) ?>" onchange="wppaAjaxUpdatePhoto( <?php wppa_echo( $photo['id'], 'post' ) ?>, 'status', this.value); wppaPhotoStatusChange( <?php wppa_echo( $photo['id'], 'post' ) ?> ); ">
|
2897 |
-
<option value="pending" <?php if ( $photo['status']=='pending' ) wppa_echo( 'selected
|
2898 |
-
<option value="publish" <?php if ( $photo['status']=='publish' ) wppa_echo( 'selected
|
2899 |
<?php if ( wppa_switch( 'ext_status_restricted' ) && ! wppa_user_is( 'administrator' ) ) $dis = ' disabled'; else $dis = ''; ?>
|
2900 |
-
<option value="featured" <?php if ( $photo['status']=='featured' ) wppa_echo( 'selected
|
2901 |
-
<option value="gold" <?php if ( $photo['status'] == 'gold' ) wppa_echo( 'selected
|
2902 |
-
<option value="silver" <?php if ( $photo['status'] == 'silver' ) wppa_echo( 'selected
|
2903 |
-
<option value="bronze" <?php if ( $photo['status'] == 'bronze' ) wppa_echo( 'selected
|
2904 |
-
<option value="scheduled" <?php if ( $photo['status'] == 'scheduled' ) wppa_echo( 'selected
|
2905 |
-
<option value="private" <?php if ( $photo['status'] == 'private' ) wppa_echo( 'selected
|
2906 |
</select>
|
2907 |
<?php }
|
2908 |
else {
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* edit and delete photos
|
6 |
+
* Version 8.1.08.001
|
7 |
*
|
8 |
*/
|
9 |
|
857 |
__( 'Status:' , 'wp-photo-album-plus') . ' ', 'post' );
|
858 |
if ( ( current_user_can( 'wppa_admin' ) || current_user_can( 'wppa_moderate' ) ) ) {
|
859 |
if ( wppa_switch( 'ext_status_restricted' ) && ! wppa_user_is( 'administrator' ) ) {
|
860 |
+
$dis = ' disabled';
|
861 |
}
|
862 |
else {
|
863 |
$dis = '';
|
864 |
}
|
865 |
+
$sel = ' selected';
|
866 |
wppa_echo(
|
867 |
'<select' .
|
868 |
' id="status-' . $id . '"' .
|
929 |
' type="checkbox"' .
|
930 |
' id="scheduledel-' . $id . '"' .
|
931 |
( $scheduledel ? ' checked="checked"' : '' ) .
|
932 |
+
( $may_change ? '' : ' disabled' ) .
|
933 |
' onchange="wppaTryScheduledel( ' . $id . ' )"' .
|
934 |
' />' .
|
935 |
' ' .
|
1156 |
' id="stereo-' . $id . '"' .
|
1157 |
' onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'stereo\', this.value, true)"' .
|
1158 |
' >' .
|
1159 |
+
'<option value="0"' . ( $stereo == '0' ? ' selected' : '' ) . ' >' .
|
1160 |
__( 'no stereo image or ready anaglyph', 'wp-photo-album-plus' ) .
|
1161 |
'</option>' .
|
1162 |
+
'<option value="1"' . ( $stereo == '1' ? ' selected' : '' ) . ' >' .
|
1163 |
__( 'Left - right stereo image', 'wp-photo-album-plus' ) .
|
1164 |
'</option>' .
|
1165 |
+
'<option value="-1"' . ( $stereo == '-1' ? ' selected' : '' ) . ' >' .
|
1166 |
__( 'Right - left stereo image', 'wp-photo-album-plus' ) .
|
1167 |
'</option>' .
|
1168 |
'</select>' .
|
1199 |
wppa_echo(
|
1200 |
__( 'Panorama' ) . ': ' .
|
1201 |
'<select onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'panorama\', this.value, true )">' .
|
1202 |
+
'<option value="0"' . ( $panorama == '0' ? ' selected' : '' ) . ' >' . __( '- none -', 'wp-photo-album-plus' ) . '</option>' .
|
1203 |
+
'<option value="1"' . ( $panorama == '1' ? ' selected' : '' ) . ' >' . __( '360° Spheric', 'wp-photo-album-plus' ) . '</option>' .
|
1204 |
+
'<option value="2"' . ( $panorama == '2' ? ' selected' : '' ) . ' >' . __( 'Non 360° Flat', 'wp-photo-album-plus' ) . '</option>' .
|
1205 |
'</select>' );
|
1206 |
|
1207 |
$source_file = wppa_get_source_path( $id );
|
1218 |
<option value="">'.__('Select', 'wp-photo-album-plus').'</option>' );
|
1219 |
$t = array( 120, 150, 180, 210, 240, 270, 300, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450 );
|
1220 |
foreach( $t as $v ) {
|
1221 |
+
wppa_echo( '<option value="'.$v.'" '.($v==$angle?'selected ':' ').'>'.$v.'°</option>' );
|
1222 |
}
|
1223 |
wppa_echo( '
|
1224 |
<option value="0">'.__('Undo', 'wp-photo-album-plus').'</option>
|
2018 |
' >' .
|
2019 |
'<option' .
|
2020 |
' value="_self"' .
|
2021 |
+
( $linktarget == '_self' ? ' selected' : '' ) .
|
2022 |
' >' .
|
2023 |
__( 'Same tab', 'wp-photo-album-plus' ) .
|
2024 |
'</option>' .
|
2025 |
'<option' .
|
2026 |
' value="_blank"' .
|
2027 |
+
( $linktarget == '_blank' ? ' selected' : '' ) .
|
2028 |
' >' .
|
2029 |
__( 'New tab', 'wp-photo-album-plus' ) .
|
2030 |
'</option>' .
|
2322 |
<td style="padding:0 4px">'.$comment['user'].'</td>
|
2323 |
<td style="padding:0 4px">'.wppa_get_time_since( $comment['timestamp'] ).'</td>' );
|
2324 |
if ( current_user_can( 'wppa_comments' ) || current_user_can( 'wppa_moderate' ) || ( wppa_get_user() == $photo['owner'] && wppa_switch( 'owner_moderate_comment' ) ) ) {
|
2325 |
+
$p = ( $comment['status'] == 'pending' ) ? 'selected ' : '';
|
2326 |
+
$a = ( $comment['status'] == 'approved' ) ? 'selected ' : '';
|
2327 |
+
$s = ( $comment['status'] == 'spam' ) ? 'selected ' : '';
|
2328 |
+
$t = ( $comment['status'] == 'trash' ) ? 'selected ' : '';
|
2329 |
wppa_echo(
|
2330 |
'<td style="padding:0 4px">' .
|
2331 |
'<select' .
|
2701 |
?>
|
2702 |
<?php $nextafterselhtml =
|
2703 |
'<select name="next-after">' .
|
2704 |
+
'<option value="-1" ' . ( $next_after == '-1' ? 'selected' : '' ) . ' >' . __( 'the previous page', 'wp-photo-album-plus' ) . '</option>' .
|
2705 |
+
'<option value="0" ' . ( $next_after == '0' ? 'selected' : '' ) . ' >' . __( 'the same page', 'wp-photo-album-plus' ) . '</option>' .
|
2706 |
+
'<option value="1" ' . ( $next_after == '1' ? 'selected' : '' ) . ' >' . __( 'the next page', 'wp-photo-album-plus' ) . '</option>' .
|
2707 |
'</select>';
|
2708 |
wppa_echo( sprintf( __( 'Go to %s after Doit!.', 'wp-photo-album-plus'), $nextafterselhtml ) );
|
2709 |
if ( wppa_is_mobile() ) {
|
2894 |
<td>
|
2895 |
<?php if ( current_user_can( 'wppa_admin' ) || current_user_can( 'wppa_moderate' ) ) { ?>
|
2896 |
<select id="status-<?php wppa_echo( $photo['id'], 'post' ) ?>" onchange="wppaAjaxUpdatePhoto( <?php wppa_echo( $photo['id'], 'post' ) ?>, 'status', this.value); wppaPhotoStatusChange( <?php wppa_echo( $photo['id'], 'post' ) ?> ); ">
|
2897 |
+
<option value="pending" <?php if ( $photo['status']=='pending' ) wppa_echo( 'selected', 'post' )?> ><?php _e( 'Pending' , 'wp-photo-album-plus') ?></option>
|
2898 |
+
<option value="publish" <?php if ( $photo['status']=='publish' ) wppa_echo( 'selected', 'post' )?> ><?php _e( 'Publish' , 'wp-photo-album-plus') ?></option>
|
2899 |
<?php if ( wppa_switch( 'ext_status_restricted' ) && ! wppa_user_is( 'administrator' ) ) $dis = ' disabled'; else $dis = ''; ?>
|
2900 |
+
<option value="featured" <?php if ( $photo['status']=='featured' ) wppa_echo( 'selected', 'post' ); wppa_echo( $dis, 'post' )?> ><?php _e( 'Featured' , 'wp-photo-album-plus') ?></option>
|
2901 |
+
<option value="gold" <?php if ( $photo['status'] == 'gold' ) wppa_echo( 'selected', 'post' ); wppa_echo( $dis, 'post' )?> ><?php _e( 'Gold' , 'wp-photo-album-plus') ?></option>
|
2902 |
+
<option value="silver" <?php if ( $photo['status'] == 'silver' ) wppa_echo( 'selected', 'post' ); wppa_echo( $dis, 'post' )?> ><?php _e( 'Silver' , 'wp-photo-album-plus') ?></option>
|
2903 |
+
<option value="bronze" <?php if ( $photo['status'] == 'bronze' ) wppa_echo( 'selected', 'post' ); wppa_echo( $dis, 'post' )?> ><?php _e( 'Bronze' , 'wp-photo-album-plus') ?></option>
|
2904 |
+
<option value="scheduled" <?php if ( $photo['status'] == 'scheduled' ) wppa_echo( 'selected', 'post' ); wppa_echo( $dis, 'post' )?> ><?php _e( 'Scheduled' , 'wp-photo-album-plus') ?></option>
|
2905 |
+
<option value="private" <?php if ( $photo['status'] == 'private' ) wppa_echo( 'selected', 'post' ); wppa_echo( $dis , 'post' )?> ><?php _e( 'Private' , 'wp-photo-album-plus') ?></option>
|
2906 |
</select>
|
2907 |
<?php }
|
2908 |
else {
|
wppa-scripts.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* This file contains all functions for activating javascript
|
6 |
*
|
7 |
-
* Version 8.1.
|
8 |
*/
|
9 |
|
10 |
// Place all wppa related js declarations in the header, both admin and frontend
|
@@ -587,12 +587,27 @@ global $wppa_opt;
|
|
587 |
$footer );
|
588 |
}
|
589 |
|
590 |
-
//
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
596 |
}
|
597 |
|
598 |
// Easing we need, borrow it from nicescroller if not already loaded
|
4 |
*
|
5 |
* This file contains all functions for activating javascript
|
6 |
*
|
7 |
+
* Version 8.1.08.001
|
8 |
*/
|
9 |
|
10 |
// Place all wppa related js declarations in the header, both admin and frontend
|
587 |
$footer );
|
588 |
}
|
589 |
|
590 |
+
// Skip this when url like https://.../wp-admin/post-new.php
|
591 |
+
// or like https://.../wp-admin/post.php?post=2897&action=edit
|
592 |
+
// or like https://.../wp-admin/post-new.php?post_type=page
|
593 |
+
// or like https://.../wp-admin/edit.php?post_type=page
|
594 |
+
// This is required, otherwise the multiple selection boxes in shortcode generators do not scroll on wheel, but the background scrolls
|
595 |
+
$uri = $_SERVER['REQUEST_URI'];
|
596 |
+
$void = ['wp-admin/post-new.php', 'wp-admin/post.php?', 'wp-admin/edit.php?'];
|
597 |
+
$skip = false;
|
598 |
+
foreach( $void as $v ) {
|
599 |
+
if ( strpos( $uri, $v ) !== false ) $skip = true;
|
600 |
+
if ( $skip ) continue;
|
601 |
+
}
|
602 |
+
if ( ! $skip ) {
|
603 |
+
|
604 |
+
// Nicescroller
|
605 |
+
if ( ! wppa_is_mobile() && ( wppa_switch( 'nicescroll' ) || wppa_switch( 'nicescroll_window' ) || wppa_switch( 'load_nicescroller' ) ) ) {
|
606 |
+
$nice_url = WPPA_URL . '/vendor/nicescroll/jquery.nicescroll.min.js';
|
607 |
+
wp_enqueue_script( 'nicescrollr-inc-nicescroll-min-js', $nice_url, $js_depts, $wppa_api_version, $footer );
|
608 |
+
$easing_url = WPPA_URL . '/vendor/jquery-easing/jquery.easing.min.js';
|
609 |
+
wp_enqueue_script( 'nicescrollr-easing-min-js', $easing_url, $js_depts, $wppa_api_version, $footer );
|
610 |
+
}
|
611 |
}
|
612 |
|
613 |
// Easing we need, borrow it from nicescroller if not already loaded
|
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 |
|
@@ -189,7 +189,7 @@ function wppa_checkbox_e($xslug, $curval, $onchange = '', $class = '', $enabled
|
|
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="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 |
|
@@ -232,8 +232,8 @@ global $wppa_opt;
|
|
232 |
if ($idx == 0 && $first_disable) $dis = true;
|
233 |
$opt = trim($opts[$idx], '|');
|
234 |
if ($opt != $opts[$idx]) $dis = true;
|
235 |
-
if ($val == $vals[$idx]) $html .= ' selected
|
236 |
-
if ($dis) $html .= ' disabled
|
237 |
$html .= '>'.$opt.'</option>';
|
238 |
$idx++;
|
239 |
}
|
@@ -287,8 +287,8 @@ global $wppa_opt;
|
|
287 |
$html .= '<option' .
|
288 |
' class="' . $slug . '"' .
|
289 |
' value="' . esc_attr( $vals[$idx] ) . '" ' .
|
290 |
-
( $sel ? ' selected
|
291 |
-
( $dis ? ' disabled
|
292 |
' >' .
|
293 |
$opt .
|
294 |
'</option>';
|
@@ -324,7 +324,7 @@ function wppa_select_e( $xslug, $curval, $opts, $vals, $onchange = '', $class =
|
|
324 |
while ($idx < $cnt) {
|
325 |
$html .= "\n";
|
326 |
$html .= '<option value="'.esc_attr($vals[$idx]).'" ';
|
327 |
-
if ($val == $vals[$idx]) $html .= ' selected
|
328 |
$html .= '>'.$opts[$idx].'</option>';
|
329 |
$idx++;
|
330 |
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
+
* Version 8.1.08.001
|
7 |
*
|
8 |
*/
|
9 |
|
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="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 |
|
232 |
if ($idx == 0 && $first_disable) $dis = true;
|
233 |
$opt = trim($opts[$idx], '|');
|
234 |
if ($opt != $opts[$idx]) $dis = true;
|
235 |
+
if ($val == $vals[$idx]) $html .= ' selected';
|
236 |
+
if ($dis) $html .= ' disabled';
|
237 |
$html .= '>'.$opt.'</option>';
|
238 |
$idx++;
|
239 |
}
|
287 |
$html .= '<option' .
|
288 |
' class="' . $slug . '"' .
|
289 |
' value="' . esc_attr( $vals[$idx] ) . '" ' .
|
290 |
+
( $sel ? ' selected' : '' ) .
|
291 |
+
( $dis ? ' disabled' : '' ) .
|
292 |
' >' .
|
293 |
$opt .
|
294 |
'</option>';
|
324 |
while ($idx < $cnt) {
|
325 |
$html .= "\n";
|
326 |
$html .= '<option value="'.esc_attr($vals[$idx]).'" ';
|
327 |
+
if ($val == $vals[$idx]) $html .= ' selected';
|
328 |
$html .= '>'.$opts[$idx].'</option>';
|
329 |
$idx++;
|
330 |
}
|
wppa-setup.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the setup stuff
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -50,6 +50,7 @@ global $wppa_error;
|
|
50 |
p_order_by smallint(5) NOT NULL,
|
51 |
cover_linktype tinytext NOT NULL,
|
52 |
cover_linkpage bigint(20) NOT NULL,
|
|
|
53 |
owner text NOT NULL,
|
54 |
timestamp tinytext NOT NULL,
|
55 |
modified tinytext NOT NULL,
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the setup stuff
|
6 |
+
* Version 8.1.08.001
|
7 |
*
|
8 |
*/
|
9 |
|
50 |
p_order_by smallint(5) NOT NULL,
|
51 |
cover_linktype tinytext NOT NULL,
|
52 |
cover_linkpage bigint(20) NOT NULL,
|
53 |
+
cover_link tinytext NOT NULL,
|
54 |
owner text NOT NULL,
|
55 |
timestamp tinytext NOT NULL,
|
56 |
modified tinytext NOT NULL,
|
wppa-slideshow-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display a slideshow in the sidebar
|
6 |
-
* Version 8.
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
@@ -187,7 +187,7 @@ class SlideshowWidget extends WP_Widget {
|
|
187 |
|
188 |
// Album
|
189 |
$body =
|
190 |
-
'<option value="-2"' . ( $instance['album'] == '-2' ? ' selected
|
191 |
wppa_album_select_a( array (
|
192 |
'selected' => $instance['album'],
|
193 |
'path' => true,
|
@@ -207,16 +207,16 @@ class SlideshowWidget extends WP_Widget {
|
|
207 |
|
208 |
// Max
|
209 |
$body =
|
210 |
-
'<option value="10" ' . ( $instance['maxslides'] == '10' ? 'selected
|
211 |
-
'<option value="25" ' . ( $instance['maxslides'] == '25' ? 'selected
|
212 |
-
'<option value="50" ' . ( $instance['maxslides'] == '50' ? 'selected
|
213 |
-
'<option value="75" ' . ( $instance['maxslides'] == '75' ? 'selected
|
214 |
-
'<option value="100" ' . ( $instance['maxslides'] == '100' ? 'selected
|
215 |
-
'<option value="150" ' . ( $instance['maxslides'] == '150' ? 'selected
|
216 |
-
'<option value="200" ' . ( $instance['maxslides'] == '200' ? 'selected
|
217 |
-
'<option value="250" ' . ( $instance['maxslides'] == '250' ? 'selected
|
218 |
-
'<option value="350" ' . ( $instance['maxslides'] == '350' ? 'selected
|
219 |
-
'<option value="500" ' . ( $instance['maxslides'] == '500' ? 'selected
|
220 |
echo
|
221 |
wppa_widget_selection_frame( $this, 'maxslides', $body, __( 'Max slides', 'wp-photo-album-plus' ), false, __( 'High numbers may cause slow pageloads!', 'wp-photo-album-plus' ) );
|
222 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display a slideshow in the sidebar
|
6 |
+
* Version 8.1.08.001
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
187 |
|
188 |
// Album
|
189 |
$body =
|
190 |
+
'<option value="-2"' . ( $instance['album'] == '-2' ? ' selected' : '' ) . ' >' . __( '--- all ---', 'wp-photo-album-plus' ) . '</option>' .
|
191 |
wppa_album_select_a( array (
|
192 |
'selected' => $instance['album'],
|
193 |
'path' => true,
|
207 |
|
208 |
// Max
|
209 |
$body =
|
210 |
+
'<option value="10" ' . ( $instance['maxslides'] == '10' ? 'selected' : '' ) . ' >10</option>' .
|
211 |
+
'<option value="25" ' . ( $instance['maxslides'] == '25' ? 'selected' : '' ) . ' >25</option>' .
|
212 |
+
'<option value="50" ' . ( $instance['maxslides'] == '50' ? 'selected' : '' ) . ' >50</option>' .
|
213 |
+
'<option value="75" ' . ( $instance['maxslides'] == '75' ? 'selected' : '' ) . ' >75</option>' .
|
214 |
+
'<option value="100" ' . ( $instance['maxslides'] == '100' ? 'selected' : '' ) . ' >100</option>' .
|
215 |
+
'<option value="150" ' . ( $instance['maxslides'] == '150' ? 'selected' : '' ) . ' >150</option>' .
|
216 |
+
'<option value="200" ' . ( $instance['maxslides'] == '200' ? 'selected' : '' ) . ' >200</option>' .
|
217 |
+
'<option value="250" ' . ( $instance['maxslides'] == '250' ? 'selected' : '' ) . ' >250</option>' .
|
218 |
+
'<option value="350" ' . ( $instance['maxslides'] == '350' ? 'selected' : '' ) . ' >350</option>' .
|
219 |
+
'<option value="500" ' . ( $instance['maxslides'] == '500' ? 'selected' : '' ) . ' >500</option>';
|
220 |
echo
|
221 |
wppa_widget_selection_frame( $this, 'maxslides', $body, __( 'Max slides', 'wp-photo-album-plus' ), false, __( 'High numbers may cause slow pageloads!', 'wp-photo-album-plus' ) );
|
222 |
|
wppa-tagcloud-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the tagcloud widget
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -108,7 +108,7 @@ class TagcloudPhotos extends WP_Widget {
|
|
108 |
$body =
|
109 |
'<option value="" >' . __( '--- all ---', 'wp-photo-album-plus' ) . '</option>';
|
110 |
if ( $tags ) foreach ( array_keys( $tags ) as $tag ) {
|
111 |
-
if ( in_array( $tag, $stags ) ) $sel = ' selected
|
112 |
$body .= '<option value="' . esc_attr( $tag ) . '"' . $sel . ' >' . htmlspecialchars( $tag ) . '</option>';
|
113 |
}
|
114 |
echo
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the tagcloud widget
|
6 |
+
* Version 8.1.08.001
|
7 |
*
|
8 |
*/
|
9 |
|
108 |
$body =
|
109 |
'<option value="" >' . __( '--- all ---', 'wp-photo-album-plus' ) . '</option>';
|
110 |
if ( $tags ) foreach ( array_keys( $tags ) as $tag ) {
|
111 |
+
if ( in_array( $tag, $stags ) ) $sel = ' selected'; else $sel = '';
|
112 |
$body .= '<option value="' . esc_attr( $tag ) . '"' . $sel . ' >' . htmlspecialchars( $tag ) . '</option>';
|
113 |
}
|
114 |
echo
|
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 |
|
@@ -231,8 +231,8 @@ global $wpdb;
|
|
231 |
$result .= '<option' .
|
232 |
' class="wppa-photo-select-item-first"' .
|
233 |
' value=""' .
|
234 |
-
' disabled
|
235 |
-
( $selected ? '' : ' selected
|
236 |
' style="color:#700"' .
|
237 |
' >' .
|
238 |
'-- ' . __( 'Please select a photo', 'wp-photo-album-plus' ) . ' --' .
|
@@ -295,8 +295,8 @@ global $wpdb;
|
|
295 |
$result .= '<option' .
|
296 |
' class="wppa-photo-select-item-first"' .
|
297 |
' value=""' .
|
298 |
-
' disabled
|
299 |
-
' selected
|
300 |
' style="color:#700"' .
|
301 |
' >' .
|
302 |
'-- ' . __( 'Please select a photo', 'wp-photo-album-plus' ) . ' --' .
|
2 |
/* wppa-tinymce-common.php
|
3 |
* Pachkage: wp-photo-album-plus
|
4 |
*
|
5 |
+
* Version 8.1.08.001
|
6 |
*
|
7 |
*/
|
8 |
|
231 |
$result .= '<option' .
|
232 |
' class="wppa-photo-select-item-first"' .
|
233 |
' value=""' .
|
234 |
+
' disabled' .
|
235 |
+
( $selected ? '' : ' selected' ) .
|
236 |
' style="color:#700"' .
|
237 |
' >' .
|
238 |
'-- ' . __( 'Please select a photo', 'wp-photo-album-plus' ) . ' --' .
|
295 |
$result .= '<option' .
|
296 |
' class="wppa-photo-select-item-first"' .
|
297 |
' value=""' .
|
298 |
+
' disabled' .
|
299 |
+
' selected' .
|
300 |
' style="color:#700"' .
|
301 |
' >' .
|
302 |
'-- ' . __( 'Please select a photo', 'wp-photo-album-plus' ) . ' --' .
|
wppa-tinymce-shortcodes.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-tinymce-shortcodes.php
|
3 |
* Pachkage: wp-photo-album-plus
|
4 |
*
|
5 |
-
* Version 8.1.
|
6 |
*/
|
7 |
|
8 |
if ( ! defined( 'ABSPATH' ) )
|
@@ -88,314 +88,329 @@ global $wpdb;
|
|
88 |
}
|
89 |
|
90 |
// Make the html
|
91 |
-
$result =
|
92 |
-
|
93 |
-
|
94 |
|
95 |
// Top type selection
|
96 |
-
'<tr
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
|
110 |
// Top type I: gallery sub type
|
111 |
-
'<tr id="wppagallery-galery-type-tr" style="display:none;"
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
|
124 |
// Top type II: slide sub type
|
125 |
-
'<tr id="wppagallery-slides-type-tr" style="display:none;"
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
|
138 |
// Top type III: single sub type
|
139 |
-
'<tr id="wppagallery-single-type-tr" style="display:none;"
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
|
152 |
// Top type IV: search sub type
|
153 |
-
'<tr id="wppagallery-search-type-tr" style="display:none;"
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
|
168 |
// Top type V: other sub type
|
169 |
-
'<tr id="wppagallery-miscel-type-tr" style="display:none;"
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
|
183 |
// Administrators ( for admins choice, show admin only if current user is an admin or superuser )
|
184 |
-
'<tr id="wppagallery-admins-tr" style="display:none;"
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
foreach( $admins as $user ) {
|
190 |
-
$result .=
|
191 |
-
|
192 |
}
|
193 |
$users = wppa_get_option( 'wppa_super_users', array() );
|
194 |
foreach( $users as $user ) {
|
195 |
$result .=
|
196 |
-
'<option value="'
|
197 |
}
|
198 |
-
$result .=
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
|
203 |
// Real or Virtual albums
|
204 |
-
'<tr id="wppagallery-album-type-tr" style="display:none;"
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
|
215 |
// Virtual albums
|
216 |
-
'<tr id="wppagallery-album-virt-tr" style="display:none;"
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
|
235 |
// Virtual albums that have covers
|
236 |
-
'<tr id="wppagallery-album-virt-cover-tr" style="display:none;"
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
|
249 |
// Real albums
|
250 |
-
'<tr id="wppagallery-album-real-tr" style="display:none;"
|
251 |
-
|
252 |
-
|
253 |
if ( wppa_has_many_albums() ) {
|
254 |
$result .=
|
255 |
-
'<input id="wppagallery-album-real" style="max-width:400px;" name="album" onchange="wppaGalleryEvaluate()" />
|
256 |
-
|
257 |
-
__('Enter one or more album numbers, seperated by commas', 'wp-photo-album-plus');
|
258 |
}
|
259 |
else {
|
260 |
$result .=
|
261 |
-
'<select
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
262 |
if ( $albums ) {
|
263 |
|
264 |
// Please select
|
265 |
-
$result .= '<option id="wppagallery-album-0" value="0" disabled
|
266 |
|
267 |
// All standard albums
|
268 |
foreach ( $albums as $album ) {
|
269 |
$id = $album['id'];
|
270 |
-
$result .= '<option class="wppagallery-album-r" value="' . $id . '"
|
271 |
}
|
272 |
}
|
273 |
else {
|
274 |
-
$result .= '<option value="0" style="color:#700;"
|
275 |
}
|
276 |
$result .= '</select>';
|
277 |
}
|
278 |
$result .=
|
279 |
-
'</td>
|
280 |
-
|
281 |
if ( ! wppa_has_many_albums() ) {
|
282 |
$result .=
|
283 |
-
'<tr id="wppagallery-album-real-search-tr" style="display:none;"
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
__('Enter a (part of) the album name to limit the options in the selection box above.', 'wp-photo-album-plus').
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
}
|
294 |
|
295 |
// Real albums optional
|
296 |
$result .=
|
297 |
-
'<tr id="wppagallery-album-realopt-tr" style="display:none;"
|
298 |
-
|
299 |
-
|
300 |
if ( wppa_has_many_albums() ) {
|
301 |
$result .=
|
302 |
-
'<input id="wppagallery-album-realopt" style="max-width:400px;" name="album" onchange="wppaGalleryEvaluate()" value="0" />
|
303 |
-
|
304 |
-
__('Optinally enter one or more album numbers, seperated by commas, or 0 for all albums', 'wp-photo-album-plus');
|
305 |
}
|
306 |
else {
|
307 |
$result .=
|
308 |
-
'<select
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
309 |
if ( $albums ) {
|
310 |
|
311 |
// Please select
|
312 |
-
$result .= '<option id="wppagallery-album-0" class="wppagallery-album-ropt" value="0" selected
|
313 |
|
314 |
// All standard albums
|
315 |
foreach ( $albums as $album ) {
|
316 |
$id = $album['id'];
|
317 |
-
$result .= '<option class="wppagallery-album-ropt" value="' . $id . '"
|
318 |
}
|
319 |
}
|
320 |
else {
|
321 |
-
$result .= '<option value="0"
|
322 |
}
|
323 |
$result .= '</select>';
|
324 |
}
|
325 |
$result .=
|
326 |
-
'</td>
|
327 |
-
|
328 |
|
329 |
// Owner selection
|
330 |
-
'<tr id="wppagallery-owner-tr" style="display:none"
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
$users = wppa_get_users();
|
337 |
if ( $users ) foreach ( $users as $user ) {
|
338 |
-
$result .= '<option value="'
|
339 |
}
|
340 |
else { // Too many
|
341 |
-
$result .= '<option value="xxx"
|
342 |
}
|
343 |
$result .=
|
344 |
-
'</select>
|
345 |
-
|
346 |
-
|
347 |
|
348 |
// Owner Parent album
|
349 |
-
'<tr id="wppagallery-owner-parent-tr" style="display:none;"
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
if ( $albums ) {
|
354 |
|
355 |
// Please select
|
356 |
-
$result .= '<option class="wppagallery-album-p" value="" selected
|
357 |
|
358 |
// Generic
|
359 |
-
$result .= '<option class="wppagallery-album-p" value="zero"
|
360 |
|
361 |
// All standard albums
|
362 |
foreach ( $albums as $album ) {
|
363 |
$id = $album['id'];
|
364 |
-
$result .= '<option class="wppagallery-album-p" value="'.$id.'"
|
365 |
}
|
366 |
}
|
367 |
else {
|
368 |
-
$result .= '<option value="0"
|
369 |
}
|
370 |
$result .= '</select>'.
|
371 |
'</td>'.
|
372 |
'</tr>'.
|
373 |
|
374 |
// Album parent
|
375 |
-
'<tr id="wppagallery-album-parent-tr" style="display:none;"
|
376 |
'<th><label for="wppagallery-album-parent">'.__('Parent album:', 'wp-photo-album-plus').'</label></th>'.
|
377 |
'<td>'.
|
378 |
'<select id="wppagallery-album-parent-parent" style="color:#070 !important;max-width:400px;" name="parentalbum" onchange="wppaGalleryEvaluate()">';
|
379 |
if ($albums) {
|
380 |
|
381 |
// Please select
|
382 |
-
$result .= '<option id="wppagallery-album-0" value="0" selected
|
383 |
|
384 |
// All standard albums
|
385 |
foreach ( $albums as $album ) {
|
386 |
$id = $album['id'];
|
387 |
-
$result .= '<option class="wppagallery-album" value="'.$id.'"
|
388 |
}
|
389 |
}
|
390 |
else {
|
391 |
-
$result .= '<option value="0"
|
392 |
}
|
393 |
$result .= '</select>'.
|
394 |
'</td>'.
|
395 |
'</tr>'.
|
396 |
|
397 |
// Album count
|
398 |
-
'<tr id="wppagallery-album-count-tr" style="display:none;"
|
399 |
'<th><label for="wppagallery-album-count">'.__('Max Albums:', 'wp-photo-album-plus').'</label></th>'.
|
400 |
'<td>'.
|
401 |
'<input id="wppagallery-album-count" type="text" style="color:#070;" value="1" onchange="wppaGalleryEvaluate()" />'.
|
@@ -403,7 +418,7 @@ global $wpdb;
|
|
403 |
'</tr>'.
|
404 |
|
405 |
// Photo count
|
406 |
-
'<tr id="wppagallery-photo-count-tr" style="display:none;"
|
407 |
'<th><label for="wppagallery-photo-count">'.__('Max Photos:', 'wp-photo-album-plus').'</label></th>'.
|
408 |
'<td>'.
|
409 |
'<input id="wppagallery-photo-count" type="text" style="color:#070;" value="1" onchange="wppaGalleryEvaluate()" />'.
|
@@ -411,13 +426,13 @@ global $wpdb;
|
|
411 |
'</tr>'.
|
412 |
|
413 |
// Albums with certain cats
|
414 |
-
'<tr id="wppagallery-albumcat-tr" style="display:none;"
|
415 |
'<th><label for="wppagallery-albumcat">'.__('The album cat(s):', 'wp-photo-album-plus').'</label></th>'.
|
416 |
'<td>'.
|
417 |
-
'<select id="wppagallery-albumcat" style="color:#700 !important;" onchange="wppaGalleryEvaluate()" multiple="multiple"
|
418 |
-
'<option value="" disabled
|
419 |
if ( $cats ) foreach ( array_keys( $cats ) as $cat ) {
|
420 |
-
$result .= '<option class="wppagallery-albumcat" value="'.$cat.'"
|
421 |
}
|
422 |
$result .=
|
423 |
'</select>'.
|
@@ -425,15 +440,15 @@ global $wpdb;
|
|
425 |
'</tr>'.
|
426 |
|
427 |
// Photo selection
|
428 |
-
'<tr id="wppagallery-photo-tr" style="display:none;"
|
429 |
-
'<th><label for="wppagallery-photo" class="wppagallery-photo"
|
430 |
'<td>'.
|
431 |
-
'<select id="wppagallery-photo" name="photo" class="wppagallery-photo" onchange="wppaGalleryEvaluate()"
|
432 |
if ( $photos ) {
|
433 |
|
434 |
// Please select
|
435 |
-
$result .= '<option value="" disabled
|
436 |
-
$result .= '<option value="#potd"
|
437 |
|
438 |
// Most recent 100 photos
|
439 |
foreach ( $photos as $photo ) {
|
@@ -454,34 +469,20 @@ global $wpdb;
|
|
454 |
else {
|
455 |
$value = $val;
|
456 |
}
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
* This causes AJAX to return an empty string.
|
461 |
-
*/
|
462 |
-
$fgb = '<option' .
|
463 |
-
' value="' . $value . '"' .
|
464 |
-
' >' .
|
465 |
-
$name .
|
466 |
-
' (' . wppa_get_album_name( $photo['album'] ) . ')' .
|
467 |
-
'</option>';
|
468 |
-
|
469 |
-
if(!seems_utf8($fgb)) {
|
470 |
-
$fgb = utf8_encode($fgb);
|
471 |
-
}
|
472 |
-
$result .= $fgb;
|
473 |
-
/** end by fgbmaster */
|
474 |
}
|
475 |
-
$result .= '<option value="#last"
|
476 |
-
'<option value="#potd"
|
477 |
}
|
478 |
else {
|
479 |
-
$result .= '<option value="0"
|
480 |
}
|
481 |
$result .=
|
482 |
'</select>'.
|
483 |
'<br>'.
|
484 |
-
'<small style="display:none;" class="wppagallery-photo"
|
485 |
__('Specify the photo to be used', 'wp-photo-album-plus').'<br>'.
|
486 |
sprintf( __('You can select from a maximum of %d most recently added photos', 'wp-photo-album-plus'), wppa_opt( 'generator_max' ) ).'<br>'.
|
487 |
'</small>'.
|
@@ -489,20 +490,20 @@ global $wpdb;
|
|
489 |
'</tr>'.
|
490 |
|
491 |
// Photo preview
|
492 |
-
'<tr id="wppagallery-photo-preview-tr" style="display:none;"
|
493 |
-
'<th><label for="wppagallery-photo-preview"
|
494 |
-
'<td id="wppagallery-photo-preview" style="text-align:center;"
|
495 |
'</td >'.
|
496 |
'</tr>'.
|
497 |
|
498 |
// Photos with certain tags
|
499 |
-
'<tr id="wppagallery-phototags-tr" style="display:none;"
|
500 |
'<th><label for="wppagallery-phototags">'.__('The photo tag(s):', 'wp-photo-album-plus').'</label></th>'.
|
501 |
'<td>'.
|
502 |
'<select id="wppagallery-phototags" style="color:#700 !important;" multiple="multiple" onchange="wppaGalleryEvaluate()">'.
|
503 |
-
'<option value="" disabled
|
504 |
if ( $tags ) foreach ( array_keys($tags) as $tag ) {
|
505 |
-
$result .= '<option class="wppagallery-phototags" value="'.$tag.'"
|
506 |
}
|
507 |
$result .=
|
508 |
'</select>'.
|
@@ -510,7 +511,7 @@ global $wpdb;
|
|
510 |
'</tr>'.
|
511 |
|
512 |
// Tags and cats additional settings
|
513 |
-
'<tr id="wppagallery-tags-cats-tr" style="display:none;"
|
514 |
'<th><label>'.__('Or / And:', 'wp-photo-album-plus').'</label></th>'.
|
515 |
'<td>'.
|
516 |
'<input id="wppagallery-or" type="radio" name="andor" value="or" onchange="wppaGalleryEvaluate()"/>'.__('Meet any', 'wp-photo-album-plus').' '.
|
@@ -519,7 +520,7 @@ global $wpdb;
|
|
519 |
'</tr>'.
|
520 |
|
521 |
// Search additional settings
|
522 |
-
'<tr id="wppagallery-search-tr" style="display:none;"
|
523 |
'<th><label>'.__('Additional features:', 'wp-photo-album-plus').'</label></th>'.
|
524 |
'<td>'.
|
525 |
'<input id="wppagallery-sub" type="checkbox" name="sub" onchange="wppaGalleryEvaluate()"/>'.__('Enable Subsearch', 'wp-photo-album-plus').' '.
|
@@ -528,17 +529,17 @@ global $wpdb;
|
|
528 |
'</tr>'.
|
529 |
|
530 |
// Optiona root album
|
531 |
-
'<tr id="wppagallery-rootalbum-tr" style="display:none;"
|
532 |
'<th><label>'.__('Search root:', 'wp-photo-album-plus').'</label></th>'.
|
533 |
'<td>'.
|
534 |
-
'<select id="wppagallery-rootalbum" onchange="wppaGalleryEvaluate()"
|
535 |
-
'<option value="0" selected
|
536 |
if ( $albums ) {
|
537 |
|
538 |
// All standard albums
|
539 |
foreach ( $albums as $album ) {
|
540 |
$id = $album['id'];
|
541 |
-
$result .= '<option class="wppagallery-rootalbum" value="'.$id.'"
|
542 |
}
|
543 |
}
|
544 |
$result .=
|
@@ -547,16 +548,16 @@ global $wpdb;
|
|
547 |
'</tr>'.
|
548 |
|
549 |
// Landing page
|
550 |
-
'<tr id="wppagallery-landing-tr" style="display:none;"
|
551 |
'<th><label>'.__('Landing page:', 'wp-photo-album-plus').'</label></th>'.
|
552 |
'<td>'.
|
553 |
-
'<select id="wppagallery-landing" onchange="wppaGalleryEvaluate()"
|
554 |
-
'<option value="0" selected
|
555 |
if ( $pages ) {
|
556 |
foreach( $pages as $page ) {
|
557 |
$dis = '';
|
558 |
if ( strpos( $page['post_content'], '[wppa' ) === false ) {
|
559 |
-
$dis = ' disabled
|
560 |
}
|
561 |
$result .= '<option value="'.$page['ID'].'"'.$dis.' >'.__( $page['post_title'] ).'</option>';
|
562 |
}
|
@@ -567,59 +568,59 @@ global $wpdb;
|
|
567 |
'</tr>'.
|
568 |
|
569 |
// Tagcloud/list additional settings
|
570 |
-
'<tr id="wppagallery-taglist-tr" style="display:none;"
|
571 |
'<th><label>'.__('Additional features:', 'wp-photo-album-plus').'</label></th>'.
|
572 |
'<td>'.
|
573 |
'<input id="wppagallery-alltags" type="checkbox" checked="checked" name="alltags" onchange="wppaGalleryEvaluate()"/>'.__('Enable all tags', 'wp-photo-album-plus').' '.
|
574 |
'<select id="wppagallery-seltags" style="color:#070; display:none;" name="seltags" multiple="multiple" onchange="wppaGalleryEvaluate()">';
|
575 |
if ( $tags ) {
|
576 |
-
'<option value="" disabled
|
577 |
foreach( array_keys($tags) as $tag ) {
|
578 |
-
$result .= '<option class="wppagallery-taglist-tags" value="'.$tag.'"
|
579 |
}
|
580 |
}
|
581 |
else {
|
582 |
-
'<option value="" disabled
|
583 |
}
|
584 |
$result .= '</select>'.
|
585 |
'</td>'.
|
586 |
'</tr>'.
|
587 |
|
588 |
// Superview additional settings: optional parent
|
589 |
-
'<tr id="wppagallery-album-super-tr" style="display:none;"
|
590 |
'<th><label for="wppagallery-album-super">'.__('Parent album:', 'wp-photo-album-plus').'</label></th>'.
|
591 |
'<td>'.
|
592 |
'<select id="wppagallery-album-super-parent" style="color:#070;max-width:400px;" name="parentalbum" onchange="wppaGalleryEvaluate()">';
|
593 |
if ( $albums ) {
|
594 |
|
595 |
// Please select
|
596 |
-
$result .= '<option value="" selected
|
597 |
|
598 |
// All standard albums
|
599 |
foreach ( $albums as $album ) {
|
600 |
$id = $album['id'];
|
601 |
-
$result .= '<option class="wppagallery-album" value="'.$id.'"
|
602 |
}
|
603 |
}
|
604 |
else {
|
605 |
-
$result .= '<option value="0"
|
606 |
}
|
607 |
$result .= '</select>'.
|
608 |
'</td>'.
|
609 |
'</tr>'.
|
610 |
|
611 |
// Calendar
|
612 |
-
'<tr id="wppagallery-calendar-tr" style="display:none;"
|
613 |
'<th><label for="wppagallery-calendar">'.__('Calendar type:', 'wp-photo-album-plus').'</lable></th>'.
|
614 |
'<td>'.
|
615 |
-
'<select id="wppagallery-calendar-type" style="color:#070;max-width:400px;" onchange="wppaGalleryEvaluate()"
|
616 |
-
'<option value="exifdtm"
|
617 |
-
'<option value="timestamp"
|
618 |
-
'<option value="modified"
|
619 |
'</select>'.
|
620 |
'<br>'.
|
621 |
-
'<input type="checkbox" id="wppagallery-calendar-reverse" onchange="wppaGalleryEvaluate()"
|
622 |
-
'<input type="checkbox" id="wppagallery-calendar-allopen" onchange="wppaGalleryEvaluate()"
|
623 |
'</td>'.
|
624 |
'</tr>'.
|
625 |
|
@@ -630,9 +631,9 @@ global $wpdb;
|
|
630 |
'<input type="text" id="wppagallery-size" value="" style="color:#070;" onchange="wppaGalleryEvaluate();"/>'.
|
631 |
'<br>'.
|
632 |
'<small>'.
|
633 |
-
__('Specify the horizontal size in pixels or <span style="color:blue"
|
634 |
-
__('A value less than <span style="color:blue"
|
635 |
-
__('For responsive with a fixed maximum, add the max to auto e.g. <span style="color:blue"
|
636 |
__('Leave this blank for default size', 'wp-photo-album-plus').
|
637 |
'</small>'.
|
638 |
'</td>'.
|
@@ -643,10 +644,10 @@ global $wpdb;
|
|
643 |
'<th><label for="wppagallery-align">'.__('Horizontal alignment:', 'wp-photo-album-plus').'</label></th>'.
|
644 |
'<td>'.
|
645 |
'<select id="wppagallery-align" name="align" style="color:#070;" onchange="wppaGalleryEvaluate();">'.
|
646 |
-
'<option value="none"
|
647 |
-
'<option value="left"
|
648 |
-
'<option value="center"
|
649 |
-
'<option value="right"
|
650 |
'</select>'.
|
651 |
'<br>'.
|
652 |
'<small>'.__('Specify the alignment to be used or --- none ---', 'wp-photo-album-plus').'</small>'.
|
@@ -654,23 +655,23 @@ global $wpdb;
|
|
654 |
'</tr>'.
|
655 |
|
656 |
// Cache
|
657 |
-
'<tr id="wppagallery-cache-tr"
|
658 |
-
<th><label for="wppagallery-cache"
|
659 |
<td>
|
660 |
<input type="checkbox" id="wppagallery-cache" onchange="wppaGalleryEvaluate()" />'.__('Cache this shortcode', 'wp-photo-album-plus').'
|
661 |
</td>
|
662 |
</tr>'.
|
663 |
|
664 |
// Delay
|
665 |
-
'<tr id="wppagallery-delay-tr"
|
666 |
-
<th><label for="wppagallery-delay"
|
667 |
<td>
|
668 |
<input type="checkbox" id="wppagallery-delay" onchange="wppaGalleryEvaluate()" />'.__('Delay this shortcode', 'wp-photo-album-plus').'
|
669 |
</td>
|
670 |
</tr>'.
|
671 |
|
672 |
'</table>'.
|
673 |
-
'<div id="wppagallery-shortcode-preview-container"
|
674 |
'<input type="text" id="wppagallery-shortcode-preview" style="background-color:#ddd; width:100%; height:26px;" value="[wppa]" />'.
|
675 |
'</div>'.
|
676 |
'<div><small>'.__( 'This is a preview of the shortcode that is being generated.', 'wp-photo-album-plus' ).'</small></div>'.
|
2 |
/* wppa-tinymce-shortcodes.php
|
3 |
* Pachkage: wp-photo-album-plus
|
4 |
*
|
5 |
+
* Version 8.1.08.001
|
6 |
*/
|
7 |
|
8 |
if ( ! defined( 'ABSPATH' ) )
|
88 |
}
|
89 |
|
90 |
// Make the html
|
91 |
+
$result = '
|
92 |
+
<div id="wppagallery-form" title="' . esc_attr( __( 'Insert gallery', 'wp-photo-album-plus' ) ) . '">
|
93 |
+
<table id="wppagallery-table" class="form-table">' .
|
94 |
|
95 |
// Top type selection
|
96 |
+
'<tr>
|
97 |
+
<th><label for="wppagallery-top-type">' . __( 'Type of WPPA display:', 'wp-photo-album-plus' ) . '</label></th>
|
98 |
+
<td>
|
99 |
+
<select id="wppagallery-top-type" name="type" onchange="wppaGalleryEvaluate()">
|
100 |
+
<option value="" selected disabled style="color:#700 !important;">-- ' . __( 'Please select a display type', 'wp-photo-album-plus' ) . ' --</option>
|
101 |
+
<option value="galerytype">' . __( 'A gallery with covers and/or thumbnails', 'wp-photo-album-plus' ) . '</option>
|
102 |
+
<option value="slidestype">' . __( 'A slideshow', 'wp-photo-album-plus' ) . '</option>
|
103 |
+
<option value="singletype">' . __( 'A single image', 'wp-photo-album-plus' ) . '</option>
|
104 |
+
<option value="searchtype">' . __( 'A search/selection box', 'wp-photo-album-plus' ) . '</option>
|
105 |
+
<option value="misceltype">' . __( 'An other box type', 'wp-photo-album-plus' ) . '</option>
|
106 |
+
</select>
|
107 |
+
</td>
|
108 |
+
</tr>' .
|
109 |
|
110 |
// Top type I: gallery sub type
|
111 |
+
'<tr id="wppagallery-galery-type-tr" style="display:none;">
|
112 |
+
<th><label for="wppagallery-galery-type">' . __( 'Type of gallery display:', 'wp-photo-album-plus' ) . '</label></th>
|
113 |
+
<td>
|
114 |
+
<select id="wppagallery-galery-type" name="type" onchange="wppaGalleryEvaluate()">
|
115 |
+
<option value="" selected disabled style="color:#700 !important;">-- ' . __( 'Please select a gallery type', 'wp-photo-album-plus' ) . ' --</option>
|
116 |
+
<option value="cover">' . __( 'The cover(s) of specific album(s)', 'wp-photo-album-plus' ) . '</option>
|
117 |
+
<option value="content">' . __( 'The content of specific album(s)', 'wp-photo-album-plus' ) . '</option>
|
118 |
+
<option value="covers">' . __( 'The covers of the subalbums of specific album(s)', 'wp-photo-album-plus' ) . '</option>
|
119 |
+
<option value="thumbs">' . __( 'The thumbnails of specific album(s)', 'wp-photo-album-plus' ) . '</option>
|
120 |
+
</select>
|
121 |
+
</td>
|
122 |
+
</tr>' .
|
123 |
|
124 |
// Top type II: slide sub type
|
125 |
+
'<tr id="wppagallery-slides-type-tr" style="display:none;">
|
126 |
+
<th><label for="wppagallery-slides-type">' . __( 'Type of slideshow:', 'wp-photo-album-plus' ) . '</label></th>
|
127 |
+
<td>
|
128 |
+
<select id="wppagallery-slides-type" name="type" onchange="wppaGalleryEvaluate()">
|
129 |
+
<option value="" selected disabled style="color:#700 !important;">-- ' . __( 'Please select a slideshow type', 'wp-photo-album-plus' ) . ' --</option>
|
130 |
+
<option value="slide">' . __( 'A fully featured slideshow', 'wp-photo-album-plus' ) . '</option>
|
131 |
+
<option value="slideonly">' . __( 'A slideshow without supporting boxes', 'wp-photo-album-plus' ) . '</option>
|
132 |
+
<option value="slideonlyf">' . __( 'A slideshow with a filmstrip only', 'wp-photo-album-plus' ) . '</option>
|
133 |
+
<option value="filmonly">' . __( 'A filmstrip only', 'wp-photo-album-plus' ) . '</option>
|
134 |
+
</select>
|
135 |
+
</td>
|
136 |
+
</tr>' .
|
137 |
|
138 |
// Top type III: single sub type
|
139 |
+
'<tr id="wppagallery-single-type-tr" style="display:none;">
|
140 |
+
<th><label for="wppagallery-single-type">' . __( 'Type of single image:', 'wp-photo-album-plus' ) . '</label></th>
|
141 |
+
<td>
|
142 |
+
<select id="wppagallery-single-type" name="type" onchange="wppaGalleryEvaluate()">
|
143 |
+
<option value="" selected disabled style="color:#700 !important;">-- ' . __( 'Please select a single image type', 'wp-photo-album-plus' ) . ' --</option>
|
144 |
+
<option value="photo">' . __( 'A plain single photo', 'wp-photo-album-plus' ) . '</option>
|
145 |
+
<option value="mphoto">' . __( 'A single photo with caption', 'wp-photo-album-plus' ) . '</option>
|
146 |
+
<option value="xphoto">' . __( 'A single photo with extended caption', 'wp-photo-album-plus' ) . '</option>
|
147 |
+
<option value="slphoto">' . __( 'A single photo in the style of a slideshow', 'wp-photo-album-plus' ) . '</option>
|
148 |
+
</select>
|
149 |
+
</td>
|
150 |
+
</tr>'.
|
151 |
|
152 |
// Top type IV: search sub type
|
153 |
+
'<tr id="wppagallery-search-type-tr" style="display:none;">
|
154 |
+
<th><label for="wppagallery-search-type">' . __( 'Type of search:', 'wp-photo-album-plus' ) . '</label></th>
|
155 |
+
<td>
|
156 |
+
<select id="wppagallery-search-type" name="type" onchange="wppaGalleryEvaluate()">
|
157 |
+
<option value="" selected disabled style="color:#700 !important;">-- ' . __( 'Please select a search type', 'wp-photo-album-plus' ) . ' --</option>
|
158 |
+
<option value="search">' . __( 'A search box', 'wp-photo-album-plus' ) . '</option>
|
159 |
+
<option value="supersearch">' . __( 'A supersearch box', 'wp-photo-album-plus' ) . '</option>
|
160 |
+
<option value="tagcloud">' . __( 'A tagcloud box', 'wp-photo-album-plus' ) . '</option>
|
161 |
+
<option value="multitag">' . __( 'A multitag box', 'wp-photo-album-plus' ) . '</option>
|
162 |
+
<option value="superview">' . __( 'A superview box', 'wp-photo-album-plus' ) . '</option>
|
163 |
+
<option value="calendar">' . __( 'A calendar box', 'wp-photo-album-plus' ) . '</option>
|
164 |
+
</select>
|
165 |
+
</td>
|
166 |
+
</tr>' .
|
167 |
|
168 |
// Top type V: other sub type
|
169 |
+
'<tr id="wppagallery-miscel-type-tr" style="display:none;">
|
170 |
+
<th><label for="wppagallery-miscel-type">' . __( 'Type miscellaneous:', 'wp-photo-album-plus' ) . '</label></th>
|
171 |
+
<td>
|
172 |
+
<select id="wppagallery-miscel-type" name="type" onchange="wppaGalleryEvaluate()">
|
173 |
+
<option value="" selected disabled style="color:#700 !important;">-- ' . __( 'Please select a miscellaneous display', 'wp-photo-album-plus' ) . ' --</option>
|
174 |
+
<option value="generic">' . __( 'A generic albums display', 'wp-photo-album-plus' ) . '</option>
|
175 |
+
<option value="upload">' . __( 'An upload box', 'wp-photo-album-plus' ) . '</option>
|
176 |
+
<option value="landing">' . __( 'A landing page shortcode', 'wp-photo-album-plus' ) . '</option>
|
177 |
+
<option value="stereo">' . __( 'A 3D stereo settings box', 'wp-photo-album-plus' ) . '</option>
|
178 |
+
<option value="choice">' . __( 'An admins choice box', 'wp-photo-album-plus' ) . '</option>
|
179 |
+
</select>
|
180 |
+
</td>
|
181 |
+
</tr>' .
|
182 |
|
183 |
// Administrators ( for admins choice, show admin only if current user is an admin or superuser )
|
184 |
+
'<tr id="wppagallery-admins-tr" style="display:none;">
|
185 |
+
<th><label for="wppagallery-admins">' . __( 'Users:', 'wp-photo-album-plus' ) . '</label></th>
|
186 |
+
<td>
|
187 |
+
<select id="wppagallery-admins" name="admins" style="color:#070;" multiple="multiple" onchange="wppaGalleryEvaluate()">
|
188 |
+
<option value="" selected style="color:#070;">-- ' . __( 'All', 'wp-photo-album-plus' ) . ' --</option>';
|
189 |
foreach( $admins as $user ) {
|
190 |
+
$result .= '
|
191 |
+
<option value="' . $user->data->user_login . '" class="wppagallery-admin" style="color:#070;">' . $user->data->display_name . '</option>';
|
192 |
}
|
193 |
$users = wppa_get_option( 'wppa_super_users', array() );
|
194 |
foreach( $users as $user ) {
|
195 |
$result .=
|
196 |
+
'<option value="' . $user . '" class="wppagallery-admin">' . $user . '</option>';
|
197 |
}
|
198 |
+
$result .= '
|
199 |
+
</select>
|
200 |
+
</td>
|
201 |
+
</tr>' .
|
202 |
|
203 |
// Real or Virtual albums
|
204 |
+
'<tr id="wppagallery-album-type-tr" style="display:none;">
|
205 |
+
<th><label for="wppagallery-album-type">' . __( 'Kind of selection:', 'wp-photo-album-plus' ) . '</label></th>
|
206 |
+
<td>
|
207 |
+
<select id="wppagallery-album-type" name="type" onchange="wppaGalleryEvaluate()">
|
208 |
+
<option value="" selected disabled style="color:#700 !important;">-- ' . __( 'Please select a type of selection to be used', 'wp-photo-album-plus' ) . ' --</option>
|
209 |
+
<option value="real">' . __( 'One or more wppa+ albums', 'wp-photo-album-plus' ) . '</option>
|
210 |
+
<option value="virtual">' . __( 'A special selection', 'wp-photo-album-plus' ) . '</option>
|
211 |
+
</select>
|
212 |
+
</td>
|
213 |
+
</tr>' .
|
214 |
|
215 |
// Virtual albums
|
216 |
+
'<tr id="wppagallery-album-virt-tr" style="display:none;">
|
217 |
+
<th><label for="wppagallery-album-virt">' . __( 'The selection to be used:', 'wp-photo-album-plus' ) . '</label></th>
|
218 |
+
<td>
|
219 |
+
<select id="wppagallery-album-virt" name="album" class="wppagallery-album" onchange="wppaGalleryEvaluate()">
|
220 |
+
<option value="" disabled selected style="color:#700 !important;">-- ' . __( 'Please select a virtual album', 'wp-photo-album-plus' ) . ' --</option>
|
221 |
+
<option value="#last">' . __( 'The most recently modified album', 'wp-photo-album-plus' ) . '</option>
|
222 |
+
<option value="#topten">' . __( 'The top rated photos', 'wp-photo-album-plus' ) . '</option>
|
223 |
+
<option value="#lasten">' . __( 'The most recently uploaded photos', 'wp-photo-album-plus' ) . '</option>
|
224 |
+
<option value="#featen">' . __( 'A random selection of featured photos', 'wp-photo-album-plus' ) . '</option>
|
225 |
+
<option value="#comten">' . __( 'The most recently commented photos', 'wp-photo-album-plus' ) . '</option>
|
226 |
+
<option value="#tags">' . __( 'Photos tagged with certain tags', 'wp-photo-album-plus' ) . '</option>
|
227 |
+
<option value="#cat">' . __( 'Albums tagged with a certain category', 'wp-photo-album-plus' ) . '</option>
|
228 |
+
<option value="#owner">' . __( 'Photos in albums owned by a certain user', 'wp-photo-album-plus' ) . '</option>
|
229 |
+
<option value="#upldr">' . __( 'Photos uploaded by a certain user', 'wp-photo-album-plus' ) . '</option>
|
230 |
+
<option value="#all">' . __( 'All photos in the system', 'wp-photo-album-plus' ) . '</option>
|
231 |
+
</select>
|
232 |
+
</td>
|
233 |
+
</tr>' .
|
234 |
|
235 |
// Virtual albums that have covers
|
236 |
+
'<tr id="wppagallery-album-virt-cover-tr" style="display:none;">
|
237 |
+
<th><label for="wppagallery-album-virt-cover">' . __( 'The selection to be used:', 'wp-photo-album-plus' ) . '</label></th>
|
238 |
+
<td>
|
239 |
+
<select id="wppagallery-album-virt-cover" name="album" class="wppagallery-album" onchange="wppaGalleryEvaluate()">
|
240 |
+
<option value="" disabled selected style="color:#700 !important;">-- '.__('Please select a virtual album', 'wp-photo-album-plus').' --</option>
|
241 |
+
<option value="#last">' . __( 'The most recently added album', 'wp-photo-album-plus' ) . '</option>
|
242 |
+
<option value="#owner">' . __( 'Albums owned by a certain user', 'wp-photo-album-plus' ) . '</option>
|
243 |
+
<option value="#cat">' . __( 'Albums tagged with certain categories', 'wp-photo-album-plus' ) . '</option>
|
244 |
+
<option value="#all">' . __( 'All albums in the system', 'wp-photo-album-plus' ) . '</option>
|
245 |
+
</select>
|
246 |
+
</td>
|
247 |
+
</tr>' .
|
248 |
|
249 |
// Real albums
|
250 |
+
'<tr id="wppagallery-album-real-tr" style="display:none;">
|
251 |
+
<th><label for="wppagallery-album-real">' . __( 'The Album(s) to be used:', 'wp-photo-album-plus' ) . '</label></th>
|
252 |
+
<td>';
|
253 |
if ( wppa_has_many_albums() ) {
|
254 |
$result .=
|
255 |
+
'<input id="wppagallery-album-real" style="max-width:400px;" name="album" onchange="wppaGalleryEvaluate()" />
|
256 |
+
<br>' . __( 'Enter one or more album numbers, seperated by commas', 'wp-photo-album-plus' );
|
|
|
257 |
}
|
258 |
else {
|
259 |
$result .=
|
260 |
+
'<select
|
261 |
+
id="wppagallery-album-real"
|
262 |
+
style="max-width:400px;"
|
263 |
+
name="album"
|
264 |
+
multiple="multiple"
|
265 |
+
onchange="wppaGalleryEvaluate()"
|
266 |
+
onfocus="function(e){e.stopImmediatePropagation();e.preventDefault();};alert(\'focus\');return fakse;"
|
267 |
+
onwheel="function(e){e.stopImmediatePropagation();e.preventDefault();};alert(\'wheel\');return fakse;"
|
268 |
+
onscroll="function(e){e.stopImmediatePropagation();e.preventDefault();};alert(\'scroll\');return false;"
|
269 |
+
>';
|
270 |
if ( $albums ) {
|
271 |
|
272 |
// Please select
|
273 |
+
$result .= '<option id="wppagallery-album-0" value="0" disabled selected style="color:#700 !important;">-- ' . __( 'Please select one or more albums', 'wp-photo-album-plus' ) . ' --</option>';
|
274 |
|
275 |
// All standard albums
|
276 |
foreach ( $albums as $album ) {
|
277 |
$id = $album['id'];
|
278 |
+
$result .= '<option class="wppagallery-album-r" value="' . $id . '">' . wppa_get_album_name( $id ) . ' (' . $id . ')</option>';
|
279 |
}
|
280 |
}
|
281 |
else {
|
282 |
+
$result .= '<option value="0" style="color:#700;">' . __( 'There are no albums yet', 'wp-photo-album-plus' ) . '</option>';
|
283 |
}
|
284 |
$result .= '</select>';
|
285 |
}
|
286 |
$result .=
|
287 |
+
'</td>
|
288 |
+
</tr>';
|
289 |
if ( ! wppa_has_many_albums() ) {
|
290 |
$result .=
|
291 |
+
'<tr id="wppagallery-album-real-search-tr" style="display:none;">
|
292 |
+
<th><label for="">' . __( 'Filter album:', 'wp-photo-album-plus' ) . '</label></th>
|
293 |
+
<td>
|
294 |
+
<input id="wppagallery-album-real-search" type="text" onkeyup="wppaGalleryEvaluate()" />
|
295 |
+
<br>
|
296 |
+
<small>' .
|
297 |
+
__( 'Enter a (part of) the album name to limit the options in the selection box above.', 'wp-photo-album-plus' ) . '
|
298 |
+
</small>
|
299 |
+
</td>
|
300 |
+
</tr>';
|
301 |
}
|
302 |
|
303 |
// Real albums optional
|
304 |
$result .=
|
305 |
+
'<tr id="wppagallery-album-realopt-tr" style="display:none;">
|
306 |
+
<th><label for="wppagallery-album-realopt">' . __( 'The Album(s) to be used:', 'wp-photo-album-plus' ) . '</label></th>
|
307 |
+
<td>';
|
308 |
if ( wppa_has_many_albums() ) {
|
309 |
$result .=
|
310 |
+
'<input id="wppagallery-album-realopt" style="max-width:400px;" name="album" onchange="wppaGalleryEvaluate()" value="0" />
|
311 |
+
<br>' .
|
312 |
+
__( 'Optinally enter one or more album numbers, seperated by commas, or 0 for all albums', 'wp-photo-album-plus' );
|
313 |
}
|
314 |
else {
|
315 |
$result .=
|
316 |
+
'<select
|
317 |
+
id="wppagallery-album-realopt"
|
318 |
+
style="max-width:400px;"
|
319 |
+
name="album"
|
320 |
+
multiple
|
321 |
+
onchange="wppaGalleryEvaluate()"
|
322 |
+
onwheel="function(e){e.stopPropagation();}"
|
323 |
+
>';
|
324 |
if ( $albums ) {
|
325 |
|
326 |
// Please select
|
327 |
+
$result .= '<option id="wppagallery-album-0" class="wppagallery-album-ropt" value="0" selected >-- ' . __( 'All albums', 'wp-photo-album-plus' ) . ' --</option>';
|
328 |
|
329 |
// All standard albums
|
330 |
foreach ( $albums as $album ) {
|
331 |
$id = $album['id'];
|
332 |
+
$result .= '<option class="wppagallery-album-ropt" value="' . $id . '">' . wppa_get_album_name( $id ) . ' (' . $id . ')</option>';
|
333 |
}
|
334 |
}
|
335 |
else {
|
336 |
+
$result .= '<option value="0">' . __( 'There are no albums yet', 'wp-photo-album-plus' ) . '</option>';
|
337 |
}
|
338 |
$result .= '</select>';
|
339 |
}
|
340 |
$result .=
|
341 |
+
'</td>
|
342 |
+
</tr>' .
|
343 |
|
344 |
// Owner selection
|
345 |
+
'<tr id="wppagallery-owner-tr" style="display:none">
|
346 |
+
<th><label for="wppagallery-owner">' . __( 'The album owner:', 'wp-photo-album-plus' ) . '</label></th>
|
347 |
+
<td>
|
348 |
+
<select id="wppagallery-owner" name="owner" class="wppagallery-owner" onchange="wppaGalleryEvaluate()">
|
349 |
+
<option value="" disabled selected style="color:#700 !important;">-- ' . __( 'Please select a user', 'wp-photo-album-plus' ) . ' --</option>
|
350 |
+
<option value="#me">-- ' . __( 'The logged in visitor', 'wp-photo-album-plus' ) . ' --</option>';
|
351 |
$users = wppa_get_users();
|
352 |
if ( $users ) foreach ( $users as $user ) {
|
353 |
+
$result .= '<option value="' . $user['user_login'] . '">' . $user['display_name'] . '</option>';
|
354 |
}
|
355 |
else { // Too many
|
356 |
+
$result .= '<option value="xxx">-- ' . __( 'Too many users, edit manually', 'wp-photo-album-plus' ) . ' --</option>';
|
357 |
}
|
358 |
$result .=
|
359 |
+
'</select>
|
360 |
+
</td>
|
361 |
+
</tr>' .
|
362 |
|
363 |
// Owner Parent album
|
364 |
+
'<tr id="wppagallery-owner-parent-tr" style="display:none;">
|
365 |
+
<th><label for="wppagallery-owner-parent">' . __( 'Parent album:', 'wp-photo-album-plus' ) . '</label></th>
|
366 |
+
<td>
|
367 |
+
<select id="wppagallery-owner-parent" style="color:#070 !important;max-width:400px;" name="parentalbum" multiple="multiple" onchange="wppaGalleryEvaluate()">';
|
368 |
if ( $albums ) {
|
369 |
|
370 |
// Please select
|
371 |
+
$result .= '<option class="wppagallery-album-p" value="" selected >-- '.__('No parent specification', 'wp-photo-album-plus').' --</option>';
|
372 |
|
373 |
// Generic
|
374 |
+
$result .= '<option class="wppagallery-album-p" value="zero">-- '.__('The generic parent', 'wp-photo-album-plus').' --</option>';
|
375 |
|
376 |
// All standard albums
|
377 |
foreach ( $albums as $album ) {
|
378 |
$id = $album['id'];
|
379 |
+
$result .= '<option class="wppagallery-album-p" value="'.$id.'">' . wppa_get_album_name( $id ) . ' (' . $id . ')</option>';
|
380 |
}
|
381 |
}
|
382 |
else {
|
383 |
+
$result .= '<option value="0">'.__('There are no albums yet', 'wp-photo-album-plus').'</option>';
|
384 |
}
|
385 |
$result .= '</select>'.
|
386 |
'</td>'.
|
387 |
'</tr>'.
|
388 |
|
389 |
// Album parent
|
390 |
+
'<tr id="wppagallery-album-parent-tr" style="display:none;">'.
|
391 |
'<th><label for="wppagallery-album-parent">'.__('Parent album:', 'wp-photo-album-plus').'</label></th>'.
|
392 |
'<td>'.
|
393 |
'<select id="wppagallery-album-parent-parent" style="color:#070 !important;max-width:400px;" name="parentalbum" onchange="wppaGalleryEvaluate()">';
|
394 |
if ($albums) {
|
395 |
|
396 |
// Please select
|
397 |
+
$result .= '<option id="wppagallery-album-0" value="0" selected style="color:#700 !important;">-- '.__('The generic parent', 'wp-photo-album-plus').' --</option>';
|
398 |
|
399 |
// All standard albums
|
400 |
foreach ( $albums as $album ) {
|
401 |
$id = $album['id'];
|
402 |
+
$result .= '<option class="wppagallery-album" value="'.$id.'">'.stripslashes(__($album['name'])).' ('.$id.')</option>';
|
403 |
}
|
404 |
}
|
405 |
else {
|
406 |
+
$result .= '<option value="0">'.__('There are no albums yet', 'wp-photo-album-plus').'</option>';
|
407 |
}
|
408 |
$result .= '</select>'.
|
409 |
'</td>'.
|
410 |
'</tr>'.
|
411 |
|
412 |
// Album count
|
413 |
+
'<tr id="wppagallery-album-count-tr" style="display:none;">'.
|
414 |
'<th><label for="wppagallery-album-count">'.__('Max Albums:', 'wp-photo-album-plus').'</label></th>'.
|
415 |
'<td>'.
|
416 |
'<input id="wppagallery-album-count" type="text" style="color:#070;" value="1" onchange="wppaGalleryEvaluate()" />'.
|
418 |
'</tr>'.
|
419 |
|
420 |
// Photo count
|
421 |
+
'<tr id="wppagallery-photo-count-tr" style="display:none;">'.
|
422 |
'<th><label for="wppagallery-photo-count">'.__('Max Photos:', 'wp-photo-album-plus').'</label></th>'.
|
423 |
'<td>'.
|
424 |
'<input id="wppagallery-photo-count" type="text" style="color:#070;" value="1" onchange="wppaGalleryEvaluate()" />'.
|
426 |
'</tr>'.
|
427 |
|
428 |
// Albums with certain cats
|
429 |
+
'<tr id="wppagallery-albumcat-tr" style="display:none;">'.
|
430 |
'<th><label for="wppagallery-albumcat">'.__('The album cat(s):', 'wp-photo-album-plus').'</label></th>'.
|
431 |
'<td>'.
|
432 |
+
'<select id="wppagallery-albumcat" style="color:#700 !important;" onchange="wppaGalleryEvaluate()" multiple="multiple">'.
|
433 |
+
'<option value="" disabled selected style="color:#700 !important;">'.__('--- please select category ---', 'wp-photo-album-plus').'</option>';
|
434 |
if ( $cats ) foreach ( array_keys( $cats ) as $cat ) {
|
435 |
+
$result .= '<option class="wppagallery-albumcat" value="'.$cat.'">'.$cat.'</option>';
|
436 |
}
|
437 |
$result .=
|
438 |
'</select>'.
|
440 |
'</tr>'.
|
441 |
|
442 |
// Photo selection
|
443 |
+
'<tr id="wppagallery-photo-tr" style="display:none;">'.
|
444 |
+
'<th><label for="wppagallery-photo" class="wppagallery-photo">'.__('The Photo to be used:', 'wp-photo-album-plus').'</label></th>'.
|
445 |
'<td>'.
|
446 |
+
'<select id="wppagallery-photo" name="photo" class="wppagallery-photo" onchange="wppaGalleryEvaluate()">';
|
447 |
if ( $photos ) {
|
448 |
|
449 |
// Please select
|
450 |
+
$result .= '<option value="" disabled selected style="color:#700 !important;">-- '.__('Please select a photo', 'wp-photo-album-plus').' --</option>';
|
451 |
+
$result .= '<option value="#potd">-- '.__('The photo of the day', 'wp-photo-album-plus').' --</option>';
|
452 |
|
453 |
// Most recent 100 photos
|
454 |
foreach ( $photos as $photo ) {
|
469 |
else {
|
470 |
$value = $val;
|
471 |
}
|
472 |
+
|
473 |
+
$result .= '
|
474 |
+
<option value="' . $value . '">' . $name . ' (' . wppa_get_album_name( $photo['album'] ) . ')</option>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
475 |
}
|
476 |
+
$result .= '<option value="#last">-- '.__('The most recently uploaded photo', 'wp-photo-album-plus').' --</option>'.
|
477 |
+
'<option value="#potd">-- '.__('The photo of the day', 'wp-photo-album-plus').' --</option>';
|
478 |
}
|
479 |
else {
|
480 |
+
$result .= '<option value="0">'.__('There are no photos yet', 'wp-photo-album-plus').'</option>';
|
481 |
}
|
482 |
$result .=
|
483 |
'</select>'.
|
484 |
'<br>'.
|
485 |
+
'<small style="display:none;" class="wppagallery-photo">'.
|
486 |
__('Specify the photo to be used', 'wp-photo-album-plus').'<br>'.
|
487 |
sprintf( __('You can select from a maximum of %d most recently added photos', 'wp-photo-album-plus'), wppa_opt( 'generator_max' ) ).'<br>'.
|
488 |
'</small>'.
|
490 |
'</tr>'.
|
491 |
|
492 |
// Photo preview
|
493 |
+
'<tr id="wppagallery-photo-preview-tr" style="display:none;">'.
|
494 |
+
'<th><label for="wppagallery-photo-preview">'.__('Preview image:', 'wp-photo-album-plus').'</label></th>'.
|
495 |
+
'<td id="wppagallery-photo-preview" style="text-align:center;">'.
|
496 |
'</td >'.
|
497 |
'</tr>'.
|
498 |
|
499 |
// Photos with certain tags
|
500 |
+
'<tr id="wppagallery-phototags-tr" style="display:none;">'.
|
501 |
'<th><label for="wppagallery-phototags">'.__('The photo tag(s):', 'wp-photo-album-plus').'</label></th>'.
|
502 |
'<td>'.
|
503 |
'<select id="wppagallery-phototags" style="color:#700 !important;" multiple="multiple" onchange="wppaGalleryEvaluate()">'.
|
504 |
+
'<option value="" disabled selected style="color:#700 !important;">'.__('--- please select tag(s) ---', 'wp-photo-album-plus').'</option>';
|
505 |
if ( $tags ) foreach ( array_keys($tags) as $tag ) {
|
506 |
+
$result .= '<option class="wppagallery-phototags" value="'.$tag.'">'.$tag.'</option>';
|
507 |
}
|
508 |
$result .=
|
509 |
'</select>'.
|
511 |
'</tr>'.
|
512 |
|
513 |
// Tags and cats additional settings
|
514 |
+
'<tr id="wppagallery-tags-cats-tr" style="display:none;">'.
|
515 |
'<th><label>'.__('Or / And:', 'wp-photo-album-plus').'</label></th>'.
|
516 |
'<td>'.
|
517 |
'<input id="wppagallery-or" type="radio" name="andor" value="or" onchange="wppaGalleryEvaluate()"/>'.__('Meet any', 'wp-photo-album-plus').' '.
|
520 |
'</tr>'.
|
521 |
|
522 |
// Search additional settings
|
523 |
+
'<tr id="wppagallery-search-tr" style="display:none;">'.
|
524 |
'<th><label>'.__('Additional features:', 'wp-photo-album-plus').'</label></th>'.
|
525 |
'<td>'.
|
526 |
'<input id="wppagallery-sub" type="checkbox" name="sub" onchange="wppaGalleryEvaluate()"/>'.__('Enable Subsearch', 'wp-photo-album-plus').' '.
|
529 |
'</tr>'.
|
530 |
|
531 |
// Optiona root album
|
532 |
+
'<tr id="wppagallery-rootalbum-tr" style="display:none;">'.
|
533 |
'<th><label>'.__('Search root:', 'wp-photo-album-plus').'</label></th>'.
|
534 |
'<td>'.
|
535 |
+
'<select id="wppagallery-rootalbum" onchange="wppaGalleryEvaluate()">'.
|
536 |
+
'<option value="0" selected >'.__('--- default ---', 'wp-photo-album-plus').'</option>';
|
537 |
if ( $albums ) {
|
538 |
|
539 |
// All standard albums
|
540 |
foreach ( $albums as $album ) {
|
541 |
$id = $album['id'];
|
542 |
+
$result .= '<option class="wppagallery-rootalbum" value="'.$id.'">'.stripslashes(__($album['name'])).' ('.$id.')</option>';
|
543 |
}
|
544 |
}
|
545 |
$result .=
|
548 |
'</tr>'.
|
549 |
|
550 |
// Landing page
|
551 |
+
'<tr id="wppagallery-landing-tr" style="display:none;">'.
|
552 |
'<th><label>'.__('Landing page:', 'wp-photo-album-plus').'</label></th>'.
|
553 |
'<td>'.
|
554 |
+
'<select id="wppagallery-landing" onchange="wppaGalleryEvaluate()">'.
|
555 |
+
'<option value="0" selected >'.__('--- default ---', 'wp-photo-album-plus').'</option>';
|
556 |
if ( $pages ) {
|
557 |
foreach( $pages as $page ) {
|
558 |
$dis = '';
|
559 |
if ( strpos( $page['post_content'], '[wppa' ) === false ) {
|
560 |
+
$dis = ' disabled';
|
561 |
}
|
562 |
$result .= '<option value="'.$page['ID'].'"'.$dis.' >'.__( $page['post_title'] ).'</option>';
|
563 |
}
|
568 |
'</tr>'.
|
569 |
|
570 |
// Tagcloud/list additional settings
|
571 |
+
'<tr id="wppagallery-taglist-tr" style="display:none;">'.
|
572 |
'<th><label>'.__('Additional features:', 'wp-photo-album-plus').'</label></th>'.
|
573 |
'<td>'.
|
574 |
'<input id="wppagallery-alltags" type="checkbox" checked="checked" name="alltags" onchange="wppaGalleryEvaluate()"/>'.__('Enable all tags', 'wp-photo-album-plus').' '.
|
575 |
'<select id="wppagallery-seltags" style="color:#070; display:none;" name="seltags" multiple="multiple" onchange="wppaGalleryEvaluate()">';
|
576 |
if ( $tags ) {
|
577 |
+
'<option value="" disabled selected style="color:#700 !important;">-- '.__('Please select the tags to show', 'wp-photo-album-plus').' --</option>';
|
578 |
foreach( array_keys($tags) as $tag ) {
|
579 |
+
$result .= '<option class="wppagallery-taglist-tags" value="'.$tag.'">'.$tag.'</option>';
|
580 |
}
|
581 |
}
|
582 |
else {
|
583 |
+
'<option value="" disabled selected style="color:#700 !important;">-- '.__('There are no tags', 'wp-photo-album-plus').' --</option>';
|
584 |
}
|
585 |
$result .= '</select>'.
|
586 |
'</td>'.
|
587 |
'</tr>'.
|
588 |
|
589 |
// Superview additional settings: optional parent
|
590 |
+
'<tr id="wppagallery-album-super-tr" style="display:none;">'.
|
591 |
'<th><label for="wppagallery-album-super">'.__('Parent album:', 'wp-photo-album-plus').'</label></th>'.
|
592 |
'<td>'.
|
593 |
'<select id="wppagallery-album-super-parent" style="color:#070;max-width:400px;" name="parentalbum" onchange="wppaGalleryEvaluate()">';
|
594 |
if ( $albums ) {
|
595 |
|
596 |
// Please select
|
597 |
+
$result .= '<option value="" selected >-- '.__('The generic parent', 'wp-photo-album-plus').' --</option>';
|
598 |
|
599 |
// All standard albums
|
600 |
foreach ( $albums as $album ) {
|
601 |
$id = $album['id'];
|
602 |
+
$result .= '<option class="wppagallery-album" value="'.$id.'">'.stripslashes(__($album['name'])).' ('.$id.')</option>';
|
603 |
}
|
604 |
}
|
605 |
else {
|
606 |
+
$result .= '<option value="0">'.__('There are no albums yet', 'wp-photo-album-plus').'</option>';
|
607 |
}
|
608 |
$result .= '</select>'.
|
609 |
'</td>'.
|
610 |
'</tr>'.
|
611 |
|
612 |
// Calendar
|
613 |
+
'<tr id="wppagallery-calendar-tr" style="display:none;">'.
|
614 |
'<th><label for="wppagallery-calendar">'.__('Calendar type:', 'wp-photo-album-plus').'</lable></th>'.
|
615 |
'<td>'.
|
616 |
+
'<select id="wppagallery-calendar-type" style="color:#070;max-width:400px;" onchange="wppaGalleryEvaluate()">'.
|
617 |
+
'<option value="exifdtm">'.__('By EXIF date', 'wp-photo-album-plus').'</option>'.
|
618 |
+
'<option value="timestamp">'.__('By date of upload', 'wp-photo-album-plus').'</option>'.
|
619 |
+
'<option value="modified">'.__('By date last modified', 'wp-photo-album-plus').'</option>'.
|
620 |
'</select>'.
|
621 |
'<br>'.
|
622 |
+
'<input type="checkbox" id="wppagallery-calendar-reverse" onchange="wppaGalleryEvaluate()">'.__('Last date first', 'wp-photo-album-plus').' '.
|
623 |
+
'<input type="checkbox" id="wppagallery-calendar-allopen" onchange="wppaGalleryEvaluate()">'.__('Initially display all', 'wp-photo-album-plus').
|
624 |
'</td>'.
|
625 |
'</tr>'.
|
626 |
|
631 |
'<input type="text" id="wppagallery-size" value="" style="color:#070;" onchange="wppaGalleryEvaluate();"/>'.
|
632 |
'<br>'.
|
633 |
'<small>'.
|
634 |
+
__('Specify the horizontal size in pixels or <span style="color:blue">auto</span>.', 'wp-photo-album-plus').' '.
|
635 |
+
__('A value less than <span style="color:blue">100</span> will automatically be interpreted as a <span style="color:blue">percentage</span> of the available space.', 'wp-photo-album-plus').
|
636 |
+
__('For responsive with a fixed maximum, add the max to auto e.g. <span style="color:blue">auto,550</span>', 'wp-photo-album-plus' ).'<br>'.
|
637 |
__('Leave this blank for default size', 'wp-photo-album-plus').
|
638 |
'</small>'.
|
639 |
'</td>'.
|
644 |
'<th><label for="wppagallery-align">'.__('Horizontal alignment:', 'wp-photo-album-plus').'</label></th>'.
|
645 |
'<td>'.
|
646 |
'<select id="wppagallery-align" name="align" style="color:#070;" onchange="wppaGalleryEvaluate();">'.
|
647 |
+
'<option value="none">'.__('--- none ---', 'wp-photo-album-plus').'</option>'.
|
648 |
+
'<option value="left">'.__('left', 'wp-photo-album-plus').'</option>'.
|
649 |
+
'<option value="center">'.__('center', 'wp-photo-album-plus').'</option>'.
|
650 |
+
'<option value="right">'.__('right', 'wp-photo-album-plus').'</option>'.
|
651 |
'</select>'.
|
652 |
'<br>'.
|
653 |
'<small>'.__('Specify the alignment to be used or --- none ---', 'wp-photo-album-plus').'</small>'.
|
655 |
'</tr>'.
|
656 |
|
657 |
// Cache
|
658 |
+
'<tr id="wppagallery-cache-tr">
|
659 |
+
<th><label for="wppagallery-cache">'.__('Cache:', 'wp-photo-album-plus').'</label></th>
|
660 |
<td>
|
661 |
<input type="checkbox" id="wppagallery-cache" onchange="wppaGalleryEvaluate()" />'.__('Cache this shortcode', 'wp-photo-album-plus').'
|
662 |
</td>
|
663 |
</tr>'.
|
664 |
|
665 |
// Delay
|
666 |
+
'<tr id="wppagallery-delay-tr">
|
667 |
+
<th><label for="wppagallery-delay">'.__('Delay:', 'wp-photo-album-plus').'</label></th>
|
668 |
<td>
|
669 |
<input type="checkbox" id="wppagallery-delay" onchange="wppaGalleryEvaluate()" />'.__('Delay this shortcode', 'wp-photo-album-plus').'
|
670 |
</td>
|
671 |
</tr>'.
|
672 |
|
673 |
'</table>'.
|
674 |
+
'<div id="wppagallery-shortcode-preview-container">'.
|
675 |
'<input type="text" id="wppagallery-shortcode-preview" style="background-color:#ddd; width:100%; height:26px;" value="[wppa]" />'.
|
676 |
'</div>'.
|
677 |
'<div><small>'.__( 'This is a preview of the shortcode that is being generated.', 'wp-photo-album-plus' ).'</small></div>'.
|
wppa-upldr-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display a list of users linking to their photos
|
6 |
-
* Version 8.1.
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
@@ -248,7 +248,7 @@ class UpldrWidget extends WP_Widget {
|
|
248 |
}
|
249 |
|
250 |
// Please select
|
251 |
-
$sel = $instance['parent'] ? '' : 'selected
|
252 |
echo '<option class="parentalbums-'.$this->get_widget_id().'" value="" '.$sel.'>-- '.__('All albums', 'wp-photo-album-plus').' --</option>';
|
253 |
|
254 |
// Find the albums currently selected
|
@@ -257,7 +257,7 @@ class UpldrWidget extends WP_Widget {
|
|
257 |
// All standard albums
|
258 |
foreach ( $albums as $album ) {
|
259 |
$s = in_array( $album['id'], $selalbs );
|
260 |
-
$sel = $s ? 'selected
|
261 |
echo '<option class="parentalbums-'.$this->get_widget_id().'" value="' . esc_attr( $album['id'] ) . '" '.$sel.'>'.stripslashes( __( $album['name'] , 'wp-photo-album-plus') ) . ' (' . $album['id'] . ')</option>';
|
262 |
}
|
263 |
?>
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display a list of users linking to their photos
|
6 |
+
* Version 8.1.08.001
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
248 |
}
|
249 |
|
250 |
// Please select
|
251 |
+
$sel = $instance['parent'] ? '' : 'selected ';
|
252 |
echo '<option class="parentalbums-'.$this->get_widget_id().'" value="" '.$sel.'>-- '.__('All albums', 'wp-photo-album-plus').' --</option>';
|
253 |
|
254 |
// Find the albums currently selected
|
257 |
// All standard albums
|
258 |
foreach ( $albums as $album ) {
|
259 |
$s = in_array( $album['id'], $selalbs );
|
260 |
+
$sel = $s ? 'selected ' : '';
|
261 |
echo '<option class="parentalbums-'.$this->get_widget_id().'" value="' . esc_attr( $album['id'] ) . '" '.$sel.'>'.stripslashes( __( $album['name'] , 'wp-photo-album-plus') ) . ' (' . $album['id'] . ')</option>';
|
262 |
}
|
263 |
?>
|
wppa-upload.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the upload pages and functions
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -309,7 +309,7 @@ global $upload_album;
|
|
309 |
type="submit"
|
310 |
class="button-primary"
|
311 |
name="wppa-upload-multiple"
|
312 |
-
disabled
|
313 |
value="' . __( 'Upload now', 'wp-photo-album-plus' ) . '"
|
314 |
onclick="if ( document.getElementById( \'wppa-album-s\' ).value == 0 ) { alert( \'' . __( 'Please select an album' , 'wp-photo-album-plus' ) . '\' ); return false; }"
|
315 |
/> ';
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the upload pages and functions
|
6 |
+
* Version 8.1.08.001
|
7 |
*
|
8 |
*/
|
9 |
|
309 |
type="submit"
|
310 |
class="button-primary"
|
311 |
name="wppa-upload-multiple"
|
312 |
+
disabled
|
313 |
value="' . __( 'Upload now', 'wp-photo-album-plus' ) . '"
|
314 |
onclick="if ( document.getElementById( \'wppa-album-s\' ).value == 0 ) { alert( \'' . __( 'Please select an album' , 'wp-photo-album-plus' ) . '\' ); return false; }"
|
315 |
/> ';
|
wppa-users.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains user and capabilities related routines
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -43,10 +43,10 @@ function wppa_get_user_select( $select = '' ) {
|
|
43 |
$result = '';
|
44 |
$iam = $select == '' ? wppa_get_user() : $select;
|
45 |
$users = wppa_get_users();
|
46 |
-
$sel = $select == '--- public ---' ? 'selected
|
47 |
$result .= '<option value="--- public ---" '.$sel.'>'.__( '--- public ---' , 'wp-photo-album-plus').'</option>';
|
48 |
foreach ( $users as $usr ) {
|
49 |
-
if ( $usr['user_login'] == $iam ) $sel = 'selected
|
50 |
else $sel = '';
|
51 |
$result .= '<option value="' . esc_attr( $usr['user_login'] ) . '" ' . $sel . '>' . sanitize_text_field( $usr['display_name'] ) . '</option>';
|
52 |
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains user and capabilities related routines
|
6 |
+
* Version 8.1.07.005
|
7 |
*
|
8 |
*/
|
9 |
|
43 |
$result = '';
|
44 |
$iam = $select == '' ? wppa_get_user() : $select;
|
45 |
$users = wppa_get_users();
|
46 |
+
$sel = $select == '--- public ---' ? 'selected' : '';
|
47 |
$result .= '<option value="--- public ---" '.$sel.'>'.__( '--- public ---' , 'wp-photo-album-plus').'</option>';
|
48 |
foreach ( $users as $usr ) {
|
49 |
+
if ( $usr['user_login'] == $iam ) $sel = 'selected';
|
50 |
else $sel = '';
|
51 |
$result .= '<option value="' . esc_attr( $usr['user_login'] ) . '" ' . $sel . '>' . sanitize_text_field( $usr['display_name'] ) . '</option>';
|
52 |
}
|
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.07.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -5113,4 +5113,12 @@ function wppa_is_caching() {
|
|
5113 |
$caching = $temp['caching'];
|
5114 |
|
5115 |
return $caching;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5116 |
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains low-level utility routines
|
6 |
+
* Version 8.1.07.005
|
7 |
*
|
8 |
*/
|
9 |
|
5113 |
$caching = $temp['caching'];
|
5114 |
|
5115 |
return $caching;
|
5116 |
+
}
|
5117 |
+
|
5118 |
+
// Make sure text is utf8 encoded
|
5119 |
+
function wppa_utf8( $string ) {
|
5120 |
+
if ( ! seems_utf8( $string ) ) {
|
5121 |
+
$string = utf8_encode( $string );
|
5122 |
+
}
|
5123 |
+
return $string;
|
5124 |
}
|
wppa-watermark.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-watermark.php
|
3 |
*
|
4 |
* Functions used for the application of watermarks
|
5 |
-
* Version 8.
|
6 |
*
|
7 |
*/
|
8 |
|
@@ -650,28 +650,28 @@ function wppa_watermark_file_select( $key, $album = '0' ) {
|
|
650 |
/* Produce the html */
|
651 |
// If not system, allow blank entry for system/album default
|
652 |
if ( $key != 'system' ) {
|
653 |
-
$sel = $select == '--- dafault ---' ? 'selected
|
654 |
$result .= '<option value="" '.$sel.' >' . __( '--- default ---', 'wp-photo-album-plus' ) . '</option>';
|
655 |
}
|
656 |
// None
|
657 |
-
$sel = $select == '--- none ---' ? 'selected
|
658 |
$result .= '<option value="--- none ---" '.$sel.' >'.__( '--- none ---' , 'wp-photo-album-plus' ).'</option>';
|
659 |
|
660 |
// Picture based watermarks
|
661 |
if ( $files ) foreach ( $files as $file ) {
|
662 |
-
$sel = $select == basename( $file ) ? 'selected
|
663 |
$result .= '<option value="'.basename( $file ).'" '.$sel.'>'.basename( $file ).'</option>';
|
664 |
}
|
665 |
|
666 |
// Text based watermarks
|
667 |
if ( function_exists( 'imagettfbbox' ) ) {
|
668 |
-
$sel = $select == '---name---' ? 'selected
|
669 |
$result .= '<option value="---name---" '.$sel.' >'.__( '--- text: name ---' , 'wp-photo-album-plus' ).'</option>';
|
670 |
-
$sel = $select == '---filename---' ? 'selected
|
671 |
$result .= '<option value="---filename---" '.$sel.' >'.__( '--- text: filename ---' , 'wp-photo-album-plus' ).'</option>';
|
672 |
-
$sel = $select == '---description---' ? 'selected
|
673 |
$result .= '<option value="---description---" '.$sel.' >'.__( '--- text: description ---' , 'wp-photo-album-plus' ).'</option>';
|
674 |
-
$sel = $select == '---predef---' ? 'selected
|
675 |
$result .= '<option value="---predef---" '.$sel.' >'.__( '--- text: pre-defined ---' , 'wp-photo-album-plus' ).'</option>';
|
676 |
}
|
677 |
|
@@ -723,7 +723,7 @@ function wppa_watermark_pos_select( $key, $album = '0' ) {
|
|
723 |
}
|
724 |
|
725 |
while ( $idx < 9 ) {
|
726 |
-
$sel = $select == $val[$idx] ? 'selected
|
727 |
$result .= '<option value="'.$val[$idx].'" '.$sel.'>'.$opt[$idx].'</option>';
|
728 |
$idx++;
|
729 |
}
|
2 |
/* wppa-watermark.php
|
3 |
*
|
4 |
* Functions used for the application of watermarks
|
5 |
+
* Version 8.1.08.001
|
6 |
*
|
7 |
*/
|
8 |
|
650 |
/* Produce the html */
|
651 |
// If not system, allow blank entry for system/album default
|
652 |
if ( $key != 'system' ) {
|
653 |
+
$sel = $select == '--- dafault ---' ? 'selected' : '';
|
654 |
$result .= '<option value="" '.$sel.' >' . __( '--- default ---', 'wp-photo-album-plus' ) . '</option>';
|
655 |
}
|
656 |
// None
|
657 |
+
$sel = $select == '--- none ---' ? 'selected' : '';
|
658 |
$result .= '<option value="--- none ---" '.$sel.' >'.__( '--- none ---' , 'wp-photo-album-plus' ).'</option>';
|
659 |
|
660 |
// Picture based watermarks
|
661 |
if ( $files ) foreach ( $files as $file ) {
|
662 |
+
$sel = $select == basename( $file ) ? 'selected' : '';
|
663 |
$result .= '<option value="'.basename( $file ).'" '.$sel.'>'.basename( $file ).'</option>';
|
664 |
}
|
665 |
|
666 |
// Text based watermarks
|
667 |
if ( function_exists( 'imagettfbbox' ) ) {
|
668 |
+
$sel = $select == '---name---' ? 'selected' : '';
|
669 |
$result .= '<option value="---name---" '.$sel.' >'.__( '--- text: name ---' , 'wp-photo-album-plus' ).'</option>';
|
670 |
+
$sel = $select == '---filename---' ? 'selected' : '';
|
671 |
$result .= '<option value="---filename---" '.$sel.' >'.__( '--- text: filename ---' , 'wp-photo-album-plus' ).'</option>';
|
672 |
+
$sel = $select == '---description---' ? 'selected' : '';
|
673 |
$result .= '<option value="---description---" '.$sel.' >'.__( '--- text: description ---' , 'wp-photo-album-plus' ).'</option>';
|
674 |
+
$sel = $select == '---predef---' ? 'selected' : '';
|
675 |
$result .= '<option value="---predef---" '.$sel.' >'.__( '--- text: pre-defined ---' , 'wp-photo-album-plus' ).'</option>';
|
676 |
}
|
677 |
|
723 |
}
|
724 |
|
725 |
while ( $idx < 9 ) {
|
726 |
+
$sel = $select == $val[$idx] ? 'selected' : '';
|
727 |
$result .= '<option value="'.$val[$idx].'" '.$sel.'>'.$opt[$idx].'</option>';
|
728 |
$idx++;
|
729 |
}
|
wppa-widget-functions.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-widget-functions.php
|
3 |
/* Package: wp-photo-album-plus
|
4 |
/*
|
5 |
-
/* Version 8.1.
|
6 |
/*
|
7 |
*/
|
8 |
|
@@ -366,7 +366,7 @@ function wppa_widget_checkbox( $class, $item, $value, $label, $subtext = '', $di
|
|
366 |
' name="' . $class->get_field_name( $item ) . '"' .
|
367 |
' type="checkbox"' .
|
368 |
wppa_checked( $value ) .
|
369 |
-
( $disabled ? ' disabled
|
370 |
( $onchange ? ' onchange="' . esc_attr( $onchange ) . '"' : '' ) .
|
371 |
' /> ' .
|
372 |
'<label' .
|
@@ -481,8 +481,8 @@ function wppa_widget_selection( $class, $item, $value, $label, $options, $values
|
|
481 |
$result .=
|
482 |
'<option' .
|
483 |
' value="' . $values[$key] . '"' .
|
484 |
-
( $value == $values[$key] ? ' selected
|
485 |
-
( isset( $disabled[$key] ) && $disabled[$key] ? ' disabled
|
486 |
' >' .
|
487 |
__( $options[$key] ) .
|
488 |
'</option>';
|
2 |
/* wppa-widget-functions.php
|
3 |
/* Package: wp-photo-album-plus
|
4 |
/*
|
5 |
+
/* Version 8.1.08.001
|
6 |
/*
|
7 |
*/
|
8 |
|
366 |
' name="' . $class->get_field_name( $item ) . '"' .
|
367 |
' type="checkbox"' .
|
368 |
wppa_checked( $value ) .
|
369 |
+
( $disabled ? ' disabled' : '' ) .
|
370 |
( $onchange ? ' onchange="' . esc_attr( $onchange ) . '"' : '' ) .
|
371 |
' /> ' .
|
372 |
'<label' .
|
481 |
$result .=
|
482 |
'<option' .
|
483 |
' value="' . $values[$key] . '"' .
|
484 |
+
( $value == $values[$key] ? ' selected' : '' ) .
|
485 |
+
( isset( $disabled[$key] ) && $disabled[$key] ? ' disabled' : '' ) .
|
486 |
' >' .
|
487 |
__( $options[$key] ) .
|
488 |
'</option>';
|
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 |
|
@@ -797,6 +797,10 @@ static $allowed_tags;
|
|
797 |
'checked' => true,
|
798 |
'min' => true,
|
799 |
'multiple' => true,
|
|
|
|
|
|
|
|
|
800 |
),
|
801 |
'option' => array(
|
802 |
'class' => true,
|
@@ -813,6 +817,11 @@ static $allowed_tags;
|
|
813 |
'style' => true,
|
814 |
'name' => true,
|
815 |
'class' => true,
|
|
|
|
|
|
|
|
|
|
|
816 |
),
|
817 |
'small' => array(
|
818 |
'style' => true,
|
@@ -852,6 +861,11 @@ static $allowed_tags;
|
|
852 |
'class' => true,
|
853 |
'colspan' => true,
|
854 |
),
|
|
|
|
|
|
|
|
|
|
|
855 |
'title' => array(),
|
856 |
'video' => array(
|
857 |
'id' => true,
|
5 |
* Contains wrappers for standard php functions
|
6 |
* For security and bug reasons
|
7 |
*
|
8 |
+
* Version 8.1.08.001
|
9 |
*
|
10 |
*/
|
11 |
|
797 |
'checked' => true,
|
798 |
'min' => true,
|
799 |
'multiple' => true,
|
800 |
+
'onkeyup' => true,
|
801 |
+
),
|
802 |
+
'label' => array(
|
803 |
+
'for' => true,
|
804 |
),
|
805 |
'option' => array(
|
806 |
'class' => true,
|
817 |
'style' => true,
|
818 |
'name' => true,
|
819 |
'class' => true,
|
820 |
+
'value' => true,
|
821 |
+
'multiple' => true,
|
822 |
+
'onwheel' => true,
|
823 |
+
'onscroll' => true,
|
824 |
+
'onfocus' => true,
|
825 |
),
|
826 |
'small' => array(
|
827 |
'style' => true,
|
861 |
'class' => true,
|
862 |
'colspan' => true,
|
863 |
),
|
864 |
+
'th' => array(
|
865 |
+
'id' => true,
|
866 |
+
'style' => true,
|
867 |
+
'class' => true,
|
868 |
+
),
|
869 |
'title' => array(),
|
870 |
'video' => array(
|
871 |
'id' => true,
|
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.08.001
|
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.08.001'; // WPPA software version
|
28 |
global $wppa_revno;
|
29 |
$wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
|
30 |
|