WP Photo Album Plus - Version 8.2.03.001

Version Description

= 8.1.08 =

  • This version addresses various bug fixes, feature requests and security fixes.
Download this release

Release Info

Developer opajaap
Plugin Icon wp plugin WP Photo Album Plus
Version 8.2.03.001
Comparing to
See all releases

Code changes from version 8.2.02.009 to 8.2.03.001

blocks/slideshow/editor.css CHANGED
@@ -12,3 +12,7 @@
12
  border: 1px solid #000;
13
  padding: 0 4px;
14
  }
 
 
 
 
12
  border: 1px solid #000;
13
  padding: 0 4px;
14
  }
15
+ .wp-block-wp-photo-album-plus-slideshow select {
16
+ max-width: fit-content !important;
17
+ width: fit-content !important;
18
+ }
blocks/upload/editor.css CHANGED
@@ -13,5 +13,6 @@
13
  padding: 0 4px;
14
  }
15
  .wp-block-wp-photo-album-plus-upload select {
16
- /* max-width: fit-content; */
 
17
  }
13
  padding: 0 4px;
14
  }
15
  .wp-block-wp-photo-album-plus-upload select {
16
+ max-width: fit-content !important;
17
+ width: fit-content !important;
18
  }
js/wppa-admin-scripts.js CHANGED
@@ -1,7 +1,7 @@
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
- /* Version 8.2.02.008
5
  /* Various js routines used in admin pages
6
  */
7
 
@@ -918,9 +918,11 @@ function _wppaAjaxUpdateAlbum( album, actionslug, value, isTmce, refresh ) {
918
  if ( actionslug == 'cover_linktype' ) {
919
  if ( value == 'manual' ) {
920
  jQuery( '#link-url-tr' ).show();
 
921
  }
922
  else {
923
  jQuery( '#link-url-tr' ).hide();
 
924
  }
925
  }
926
 
@@ -950,6 +952,7 @@ function _wppaAjaxUpdateAlbum( album, actionslug, value, isTmce, refresh ) {
950
  // Update monitor
951
  wppaAjaxUpdateAlbumMonitor( isTmce ); // Check for more to do
952
 
 
953
  },
954
  error: function( xhr, status, error ) {
955
 
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
+ /* Version 8.2.03.001
5
  /* Various js routines used in admin pages
6
  */
7
 
918
  if ( actionslug == 'cover_linktype' ) {
919
  if ( value == 'manual' ) {
920
  jQuery( '#link-url-tr' ).show();
921
+ jQuery( '#-link-url-tr' ).hide();
922
  }
923
  else {
924
  jQuery( '#link-url-tr' ).hide();
925
+ jQuery( '#-link-url-tr' ).show();
926
  }
927
  }
928
 
952
  // Update monitor
953
  wppaAjaxUpdateAlbumMonitor( isTmce ); // Check for more to do
954
 
955
+
956
  },
957
  error: function( xhr, status, error ) {
958
 
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 i=new XMLHttpRequest,a="?action=wppa&wppa-action=update-photo&photo-id="+o+"&item=file&wppa-nonce="+document.getElementById("photo-nonce-"+o).value;i.open("POST",wppaAjaxUrl+a,!0),i.onload=function(){if(200===i.status){var e=wppaTrim(i.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(/&lt;/g,"<")).replace(/&gt;/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!")},i.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(i,e,t,a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-iptc&photo-id="+i+"&item="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+i).value+"&value="+wppaEncode(t)+"&tagname="+a,async:!0,type:"POST",timeout:6e4,beforeSend:function(e){jQuery("#remark-"+i).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-"+i).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(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/\\/g,""),o="0"!=p[1]?'<span style="color:red;" >'+r+"</span>":'<span style="color:green;" >'+r+"</span>",jQuery("#remark-"+i).html(o);break;case"photourl":wppaCropper[i]?wppaCropper[i].replace(r):jQuery("#photourl-"+i).attr("src",r),jQuery("#thumba-"+i).attr("href",r);break;case"thumburl":jQuery("#thumburl-"+i).attr("src",r);break;case"magickstack":jQuery("#magickstack-"+i).html(r),0<r.length?jQuery("#imstackbutton-"+i).css("display","inline"):jQuery("#imstackbutton-"+i).css("display","none")}}wppaFeAjaxLog("out")},error:function(e,t,a){jQuery("#remark-"+i).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(i,l,e,s,c,d){c=c||"",d=d||"",wppaFeAjaxLog("in"),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-photo&photo-id="+i+"&item="+l+"&wppa-nonce="+document.getElementById("photo-nonce-"+i).value+"&value="+wppaEncode(e),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==l&&jQuery("#wppa-photo-spin-"+i).css({visibility:"visible"}),jQuery("#remark-"+i).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-"+i).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(/&lt;/g,"<")).replace(/&gt;/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-"+i).html(o);break;case"photourl":wppaCropper[i]?wppaCropper[i].replace(r):jQuery("#photourl-"+i).attr("src",r),jQuery("#thumba-"+i).attr("href",r);break;case"thumburl":jQuery("#thumburl-"+i).attr("src",r);break;case"magickstack":jQuery("#magickstack-"+i).html(r),0<r.length?jQuery("#imstackbutton-"+i).css("display","inline"):jQuery("#imstackbutton-"+i).css("display","none");break;default:jQuery("#"+n+"-"+i).html(r)}}"description"==l&&jQuery("#wppa-photo-spin-"+i).css({visibility:"hidden"}),wppaFeAjaxLog("out")},error:function(e,t,a){jQuery("#remark-"+i).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,i=-1;r<o;)wppaAlbumUpdateMatrix[r][0]==e&&wppaAlbumUpdateMatrix[r][1]==t&&(u=!0,i=r),r++;u||(wppaAlbumUpdateMatrix[o]=[e,t,"undefined",!1,!1,p],i=o),a=a.value||a,wppaAlbumUpdateMatrix[i][3]=a,wppaAlbumUpdateMatrix[i][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,i,l,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(i),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"==i?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]=i||0,wppaAlbumUpdateMatrix[n][4]=!1,wppaAlbumUpdateMatrix[n][5]=!1,wppaAjaxUpdateAlbumMonitor(l)},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(i,e,t){var a="action=wppa&wppa-action=update-option&wppa-option="+wppaEncode(i)+"&wppa-nonce="+document.getElementById("wppa-nonce").value;0!=e&&(a+="number"==typeof e?"&value="+e:t?"&value="+wppaGetSelectionEnumByClass("."+i,","):"&value="+wppaEncode(e.value)),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e5,beforeSend:function(e){jQuery("#img_"+i.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_"+i.replace("#","H")).attr("src",wppaImageDirectory+"tick.png"),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))):(jQuery("#img_"+i.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),e[3]&&alert(e[3])),jQuery("#img_"+i.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_"+i.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+i.replace("#","H")).attr("title","Communication error")},complete:function(e){wppaCheckInconsistencies(),"spinner_shape"!=i&&"icon_corner_style"!=i||(wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")),"svg_color"!=i&&"svg_bg_color"!=i||wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),"ovl_svg_color"!=i&&"ovl_svg_bg_color"!=i||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,i=0;i<e.length;)0!=(a=e[i].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),i++;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")}function wppaGetTinyMceContent(e){return"none"!=jQuery("#"+e).css("display")?jQuery("#"+e).val():tinymce.get(e).getContent()}function wppaInitMagick(t){var e,a,p;wppaCropper[t]||(e=document.querySelector("#fs-img-"+t),a=document.getElementById("button-"+t),p="ratio"==wppaImageMagickDefaultAspect?e.naturalWidth/e.naturalHeight:"NaN"==wppaImageMagickDefaultAspect?"":wppaImageMagickDefaultAspect,wppaCropper[t]=new Cropper(e,{zoomable:!1,viewMode:2,background:!1,dragMode:"move",responsive:!0,movable:!1,aspectRatio:p}),a.onclick=function(){var e=wppaCropper[t].getData(!0),e=e.width+"x"+e.height+(e.x<0?"-":"+")+e.x+(e.y<0?"-":"+")+e.y;wppaTryMagick(t,"crop",e)})}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 i=new XMLHttpRequest,a="?action=wppa&wppa-action=update-photo&photo-id="+o+"&item=file&wppa-nonce="+document.getElementById("photo-nonce-"+o).value;i.open("POST",wppaAjaxUrl+a,!0),i.onload=function(){if(200===i.status){var e=wppaTrim(i.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(/&lt;/g,"<")).replace(/&gt;/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!")},i.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(i,e,t,a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-iptc&photo-id="+i+"&item="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+i).value+"&value="+wppaEncode(t)+"&tagname="+a,async:!0,type:"POST",timeout:6e4,beforeSend:function(e){jQuery("#remark-"+i).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-"+i).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(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/\\/g,""),o="0"!=p[1]?'<span style="color:red;" >'+r+"</span>":'<span style="color:green;" >'+r+"</span>",jQuery("#remark-"+i).html(o);break;case"photourl":wppaCropper[i]?wppaCropper[i].replace(r):jQuery("#photourl-"+i).attr("src",r),jQuery("#thumba-"+i).attr("href",r);break;case"thumburl":jQuery("#thumburl-"+i).attr("src",r);break;case"magickstack":jQuery("#magickstack-"+i).html(r),0<r.length?jQuery("#imstackbutton-"+i).css("display","inline"):jQuery("#imstackbutton-"+i).css("display","none")}}wppaFeAjaxLog("out")},error:function(e,t,a){jQuery("#remark-"+i).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(i,l,e,s,c,d){c=c||"",d=d||"",wppaFeAjaxLog("in"),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-photo&photo-id="+i+"&item="+l+"&wppa-nonce="+document.getElementById("photo-nonce-"+i).value+"&value="+wppaEncode(e),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==l&&jQuery("#wppa-photo-spin-"+i).css({visibility:"visible"}),jQuery("#remark-"+i).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-"+i).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(/&lt;/g,"<")).replace(/&gt;/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-"+i).html(o);break;case"photourl":wppaCropper[i]?wppaCropper[i].replace(r):jQuery("#photourl-"+i).attr("src",r),jQuery("#thumba-"+i).attr("href",r);break;case"thumburl":jQuery("#thumburl-"+i).attr("src",r);break;case"magickstack":jQuery("#magickstack-"+i).html(r),0<r.length?jQuery("#imstackbutton-"+i).css("display","inline"):jQuery("#imstackbutton-"+i).css("display","none");break;default:jQuery("#"+n+"-"+i).html(r)}}"description"==l&&jQuery("#wppa-photo-spin-"+i).css({visibility:"hidden"}),wppaFeAjaxLog("out")},error:function(e,t,a){jQuery("#remark-"+i).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,i=-1;r<o;)wppaAlbumUpdateMatrix[r][0]==e&&wppaAlbumUpdateMatrix[r][1]==t&&(u=!0,i=r),r++;u||(wppaAlbumUpdateMatrix[o]=[e,t,"undefined",!1,!1,p],i=o),a=a.value||a,wppaAlbumUpdateMatrix[i][3]=a,wppaAlbumUpdateMatrix[i][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,i,l,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(i),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"==i?(jQuery("#link-url-tr").show(),jQuery("#-link-url-tr").hide()):(jQuery("#link-url-tr").hide(),jQuery("#-link-url-tr").show())),"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]=i||0,wppaAlbumUpdateMatrix[n][4]=!1,wppaAlbumUpdateMatrix[n][5]=!1,wppaAjaxUpdateAlbumMonitor(l)},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(i,e,t){var a="action=wppa&wppa-action=update-option&wppa-option="+wppaEncode(i)+"&wppa-nonce="+document.getElementById("wppa-nonce").value;0!=e&&(a+="number"==typeof e?"&value="+e:t?"&value="+wppaGetSelectionEnumByClass("."+i,","):"&value="+wppaEncode(e.value)),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e5,beforeSend:function(e){jQuery("#img_"+i.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_"+i.replace("#","H")).attr("src",wppaImageDirectory+"tick.png"),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))):(jQuery("#img_"+i.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),e[3]&&alert(e[3])),jQuery("#img_"+i.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_"+i.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+i.replace("#","H")).attr("title","Communication error")},complete:function(e){wppaCheckInconsistencies(),"spinner_shape"!=i&&"icon_corner_style"!=i||(wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")),"svg_color"!=i&&"svg_bg_color"!=i||wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),"ovl_svg_color"!=i&&"ovl_svg_bg_color"!=i||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,i=0;i<e.length;)0!=(a=e[i].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),i++;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")}function wppaGetTinyMceContent(e){return"none"!=jQuery("#"+e).css("display")?jQuery("#"+e).val():tinymce.get(e).getContent()}function wppaInitMagick(t){var e,a,p;wppaCropper[t]||(e=document.querySelector("#fs-img-"+t),a=document.getElementById("button-"+t),p="ratio"==wppaImageMagickDefaultAspect?e.naturalWidth/e.naturalHeight:"NaN"==wppaImageMagickDefaultAspect?"":wppaImageMagickDefaultAspect,wppaCropper[t]=new Cropper(e,{zoomable:!1,viewMode:2,background:!1,dragMode:"move",responsive:!0,movable:!1,aspectRatio:p}),a.onclick=function(){var e=wppaCropper[t].getData(!0),e=e.width+"x"+e.height+(e.x<0?"-":"+")+e.x+(e.y<0?"-":"+")+e.y;wppaTryMagick(t,"crop",e)})}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)});
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, f
5
  Requires at least: 3.9
6
  Tested up to: 6.0
7
  Requires PHP: 5.5
8
- Stable tag: 8.2.01.008
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
5
  Requires at least: 3.9
6
  Tested up to: 6.0
7
  Requires PHP: 5.5
8
+ Stable tag: 8.2.02.010
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
wppa-admin-styles.css CHANGED
@@ -1,7 +1,7 @@
1
  /* admin-styles.css
2
  *
3
  * wp-photo-album-plus
4
- * version 8.2.02.009
5
  */
6
  #files_list, #files_list2
7
  {
@@ -410,82 +410,81 @@ border:1px solid black;
410
  }
411
 
412
  /* Settigs page */
413
-
414
- .wppa-master-tabs {
415
- position:relative;
416
- top:24px;
417
- }
418
- .wppa-setting-tabs {
419
- position:relative;
420
- top:24px;
421
- }
422
- .wppa-setting-tabs li {
423
- border-color: darkgrey;
424
- border-width: 1px;
425
- float: left;
426
- background-color: white;
427
- padding: 8px 10px;
428
- font-size: 22px;
429
- color: darkgrey;
430
- border-style: solid;
431
- text-align: center;
432
- margin: 0 4px 0 0;
433
- border-top-left-radius: 8px;
434
- border-top-right-radius: 8px;
435
- cursor: pointer;
436
- }
437
- .wppa-master-tabs li {
438
- border-color: darkgrey;
439
- border-width: 1px;
440
- float: left;
441
- background-color: white;
442
- padding: 8px 10px;
443
- font-size: 22px;
444
- color: darkgrey;
445
- border-style: solid;
446
- text-align: center;
447
- margin: 0 4px 6px 0;
448
- border-radius:8px;
449
- cursor: pointer;
450
- }
451
- #wppa-setting-tab-99 {
452
- float: right;
453
- }
454
- .wppa-tabdesc h3 {
455
- margin: 0 0 9px 0;
456
- padding: 6px 0 0 0;
457
- }
458
- .wppa-master-tabs .active {
459
- color: black;
460
- background-color:#dddddd;
461
- }
462
- .wppa-setting-tabs .active {
463
- color: black;
464
- border-bottom-color: white;
465
- background-color:#dddddd;
466
- }
467
- #wppa-setting-content {
468
- clear:both;
469
- background-color: white;
470
- border-left:1px solid black;
471
- border-right:1px solid black;
472
- border-bottom:1px solid black;
473
- position:relative;
474
- top:24px;
475
- border-color:darkgrey;
476
- margin-bottom:12px;
477
- }
478
- .wppa-colorbox {
479
- height: 28px !important;
480
- }
481
- .wppa-doit-button {
482
- float:left;
483
- border-radius:3px;
484
- font-size: 11px !important;
485
- margin: 0 4px;
486
- padding: 0 6px;
487
- border: 1px solid darkgrey !important;
488
- }
489
 
490
  #wppa-cloudinary-table table, #wppa-cloudinary-table tbody, #wppa-cloudinary-table tr, #wppa-cloudinary-table td {
491
  margin:0;
@@ -544,7 +543,7 @@ border:1px solid black;
544
  }
545
 
546
  .wppa-admin-button {
547
- margin:0 1px !important;
548
  }
549
 
550
  /* Album admin new */
@@ -558,7 +557,7 @@ details.hidden {
558
  }
559
 
560
  .wppa-summary-toplevel {
561
- background-color: #686;
562
  color: white;
563
  font-size: 1.5em;
564
  margin-bottom: 6px;
@@ -566,7 +565,7 @@ details.hidden {
566
  cursor:pointer;
567
  }
568
  .wppa-summary-sublevel {
569
- background-color: #8a8;
570
  color: white;
571
  font-size: 1.2em;
572
  margin-bottom: 6px;
@@ -593,7 +592,7 @@ details.hidden {
593
  }
594
 
595
  .wppa-flex div {
596
- max-width: 200px;
597
  margin-right: 4px;
598
  }
599
 
@@ -603,13 +602,16 @@ details.hidden {
603
  margin-bottom: 10px;
604
  }
605
 
606
- .wppa-flex div h4 {
 
607
  font-size: 1.2em;
 
608
  margin: 0 6px 0 0;
609
-
610
  padding: 0 8px;
611
  line-height: 2;
612
  min-height: 30px;
 
613
 
614
  background: rgba(255, 255, 255, 0.5);
615
  border-color: rgba(220, 220, 222, 0.75);
1
  /* admin-styles.css
2
  *
3
  * wp-photo-album-plus
4
+ * version 8.2.02.010
5
  */
6
  #files_list, #files_list2
7
  {
410
  }
411
 
412
  /* Settigs page */
413
+ .wppa-master-tabs {
414
+ position:relative;
415
+ top:24px;
416
+ }
417
+ .wppa-setting-tabs {
418
+ position:relative;
419
+ top:24px;
420
+ }
421
+ .wppa-setting-tabs li {
422
+ border-color: darkgrey;
423
+ border-width: 1px;
424
+ float: left;
425
+ background-color: white;
426
+ padding: 8px 10px;
427
+ font-size: 22px;
428
+ color: darkgrey;
429
+ border-style: solid;
430
+ text-align: center;
431
+ margin: 0 4px 0 0;
432
+ border-top-left-radius: 8px;
433
+ border-top-right-radius: 8px;
434
+ cursor: pointer;
435
+ }
436
+ .wppa-master-tabs li {
437
+ border-color: darkgrey;
438
+ border-width: 1px;
439
+ float: left;
440
+ background-color: white;
441
+ padding: 8px 10px;
442
+ font-size: 22px;
443
+ color: darkgrey;
444
+ border-style: solid;
445
+ text-align: center;
446
+ margin: 0 4px 6px 0;
447
+ border-radius:8px;
448
+ cursor: pointer;
449
+ }
450
+ #wppa-setting-tab-99 {
451
+ float: right;
452
+ }
453
+ .wppa-tabdesc h3 {
454
+ margin: 0 0 9px 0;
455
+ padding: 6px 0 0 0;
456
+ }
457
+ .wppa-master-tabs .active {
458
+ color: black;
459
+ background-color:#dddddd;
460
+ }
461
+ .wppa-setting-tabs .active {
462
+ color: black;
463
+ border-bottom-color: white;
464
+ background-color:#dddddd;
465
+ }
466
+ #wppa-setting-content {
467
+ clear:both;
468
+ background-color: white;
469
+ border-left:1px solid black;
470
+ border-right:1px solid black;
471
+ border-bottom:1px solid black;
472
+ position:relative;
473
+ top:24px;
474
+ border-color:darkgrey;
475
+ margin-bottom:12px;
476
+ }
477
+ .wppa-colorbox {
478
+ height: 28px !important;
479
+ }
480
+ .wppa-doit-button {
481
+ float:left;
482
+ border-radius:3px;
483
+ font-size: 11px !important;
484
+ margin: 0 4px;
485
+ padding: 0 6px;
486
+ border: 1px solid darkgrey !important;
487
+ }
 
488
 
489
  #wppa-cloudinary-table table, #wppa-cloudinary-table tbody, #wppa-cloudinary-table tr, #wppa-cloudinary-table td {
490
  margin:0;
543
  }
544
 
545
  .wppa-admin-button {
546
+ margin:0 0 0 6px !important;
547
  }
548
 
549
  /* Album admin new */
557
  }
558
 
559
  .wppa-summary-toplevel {
560
+ background-color: #666;
561
  color: white;
562
  font-size: 1.5em;
563
  margin-bottom: 6px;
565
  cursor:pointer;
566
  }
567
  .wppa-summary-sublevel {
568
+ background-color: #888;
569
  color: white;
570
  font-size: 1.2em;
571
  margin-bottom: 6px;
592
  }
593
 
594
  .wppa-flex div {
595
+
596
  margin-right: 4px;
597
  }
598
 
602
  margin-bottom: 10px;
603
  }
604
 
605
+ /* like disabled input */
606
+ .wppa-ldi {
607
  font-size: 1.2em;
608
+ font-weight: 600;
609
  margin: 0 6px 0 0;
610
+
611
  padding: 0 8px;
612
  line-height: 2;
613
  min-height: 30px;
614
+ width: fit-content;
615
 
616
  background: rgba(255, 255, 255, 0.5);
617
  border-color: rgba(220, 220, 222, 0.75);
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
- * Version 8.2.02.001
6
  *
7
  */
8
 
@@ -1063,23 +1063,6 @@ global $wppa;
1063
  wppa_exit();
1064
  break;
1065
 
1066
- /* Required for Native blocks
1067
- case 'albumselect-html':
1068
- $result = '
1069
- <select id="upload-albumselect">'. // onchange="wppaALbumSelectChange()">' .
1070
- wppa_album_select_a(array('addpleaseselect' => true,
1071
- 'addall' => true,
1072
- 'path' => true,
1073
- 'sort' => true,
1074
- 'optionclass' => 'upload-album-option',
1075
- 'selected' => '0',
1076
- )) . '
1077
- </select>';
1078
- echo( $result );
1079
- wppa_exit();
1080
- break;
1081
- */
1082
-
1083
  case 'getshortcodedrendered':
1084
  $shortcode = wppa_get( 'shortcode', '', 'gutsc' );
1085
  wppa_load_theme();
@@ -2674,7 +2657,7 @@ case 'albumselect-html':
2674
 
2675
  // A photo
2676
  else {
2677
- wppa_log( 'OBS', 'Trying to add to WP media: '.wppa_get_hires_url( $photo ) );
2678
  $thumb_id = media_sideload_image( wppa_get_hires_url( $photo ), 0, wppa_get_photo_desc( $photo ) );
2679
 
2680
  if ( is_wp_error( $thumb_id ) ) {
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
+ * Version 8.2.02.010
6
  *
7
  */
8
 
1063
  wppa_exit();
1064
  break;
1065
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1066
  case 'getshortcodedrendered':
1067
  $shortcode = wppa_get( 'shortcode', '', 'gutsc' );
1068
  wppa_load_theme();
2657
 
2658
  // A photo
2659
  else {
2660
+ // wppa_log( 'OBS', 'Trying to add to WP media: '.wppa_get_hires_url( $photo ) );
2661
  $thumb_id = media_sideload_image( wppa_get_hires_url( $photo ), 0, wppa_get_photo_desc( $photo ) );
2662
 
2663
  if ( is_wp_error( $thumb_id ) ) {
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.2.02.009
7
  *
8
  */
9
 
@@ -579,7 +579,7 @@ global $wppa_revno;
579
  </div>'); // end action-container
580
  /* End header */
581
 
582
- /* Main nody album admin */
583
  wppa_echo( '
584
  <details class="wppa-toplevel-details">
585
  <summary class="toplevel wppa-summary-toplevel"> ' .
@@ -594,13 +594,26 @@ global $wppa_revno;
594
  <br>' . __( 'The <b style="color:#070" >Remark</b> fields keep you informed on the actions taken at the background.', 'wp-photo-album-plus' ) . '
595
  </h2>' );
596
 
 
 
 
 
 
 
 
 
 
 
 
597
  // The tabs
598
  wppa_echo('
599
  <div id="tabs" style="margin-bottom:23px">
600
  <ul class="widefat wppa-setting-tabs">
601
- <li class="wppa-albumadmin-tab active" onclick="wppaChangeAlbumAdminTab(this,\'#albumitem-' . $id . '\');">' . __( 'General Album Settings', 'wp-photo-album-plus' ) . '</li>
602
- <li class="wppa-albumadmin-tab" onclick="wppaChangeAlbumAdminTab(this,\'#subalbumitem-' . $id . '\');">' . __( 'Subalbums', 'wp-photo-album-plus' ) . '</li>
603
- <li class="wppa-albumadmin-tab" onclick="wppaChangeAlbumAdminTab(this,\'#albumactions-' . $id . '\');">' . __( 'Album actions', 'wp-photo-album-plus' ) . '</li>
 
 
604
  </ul>
605
  <div style="clear:both"></div>
606
  </div>');
@@ -620,7 +633,7 @@ global $wppa_revno;
620
  <div
621
  id="albumitem-' . $id . '"
622
  class="wppa-table-wrap wppa-tabcontent"
623
- style="width:100%;position:relative;background-color:#ddd;padding-bottom:12px;padding-left:12px;"
624
  >' );
625
 
626
  // Section 0: More or less static data
@@ -634,31 +647,31 @@ global $wppa_revno;
634
  <label>' .
635
  __( 'Album number', 'wp-photo-album-plus' ) . '
636
  </label><br>
637
- <h4>' .
638
  $id . '
639
- </h4>
640
  </div>
641
  <div>
642
  <label>' .
643
  __( 'Crypt', 'wp-photo-album-plus' ) . '
644
  </label><br>
645
- <h4>' .
646
  $crypt . '
647
- </h4>
648
  </div>
649
  <div>
650
  <label>' .
651
  __( 'Created', 'wp-photo-album-plus' ) . '
652
  </label><br>
653
- <h4>' .
654
  wppa_local_date( '', $timestamp ) . '
655
- </h4>
656
  </div>
657
  <div>
658
  <label>' .
659
  __( 'Modified', 'wp-photo-album-plus' ) . '
660
  </label><br>
661
- <h4>';
662
  if ( $modified > $timestamp ) {
663
  $result .= wppa_local_date( '', $modified );
664
  }
@@ -666,7 +679,7 @@ global $wppa_revno;
666
  $result .= __( 'Not modified', 'wp-photo-album-plus' );
667
  }
668
  $result .= '
669
- </h4>
670
  </div>';
671
 
672
  // Views
@@ -676,17 +689,17 @@ global $wppa_revno;
676
  <label>' .
677
  __( 'Album Views', 'wp-photo-album-plus' ) . '
678
  </label><br>
679
- <h4>' .
680
  $views . '
681
- </h4>
682
  </div>
683
  <div>
684
  <label>' .
685
  __( 'Photo views', 'wp-photo-album-plus' ) . '
686
  </label><br>
687
- <h4>' .
688
  $pviews . '
689
- </h4>
690
  </div>';
691
  if ( $nsub ) {
692
  $result .= '
@@ -694,9 +707,9 @@ global $wppa_revno;
694
  <label>' .
695
  __( 'Inc subalbums', 'wp-photo-album-plus' ) . '
696
  </label><br>
697
- <h4>' .
698
  $tpviews . '
699
- </h4>
700
  </div>';
701
  }
702
  }
@@ -709,9 +722,9 @@ global $wppa_revno;
709
  <label>' .
710
  __( 'Clicks:', 'wp-photo-album-plus' ) . '
711
  </label><br>
712
- <h4>' .
713
  array_sum( $click_arr ) . '
714
- </h4>
715
  </div>';
716
  }
717
 
@@ -952,52 +965,6 @@ global $wppa_revno;
952
  wppa_echo( $result );
953
  }
954
 
955
- // Subalbum order
956
- {
957
- $sel = ' selected';
958
- $opts = array(
959
- __( '--- default ---', 'wp-photo-album-plus' ),
960
- __( 'Random', 'wp-photo-album-plus' ),
961
- __( 'Order #', 'wp-photo-album-plus' ),
962
- __( 'Order # reverse', 'wp-photo-album-plus' ),
963
- __( 'Name', 'wp-photo-album-plus' ),
964
- __( 'Name reverse', 'wp-photo-album-plus' ),
965
- __( 'Timestamp', 'wp-photo-album-plus' ),
966
- __( 'Timestamp reverse', 'wp-photo-album-plus' ),
967
- );
968
- $vals = array( '0', '3', '1', '-1', '2', '-2', '5', '-5' );
969
-
970
- $df = wppa_opt( 'list_albums_by' );
971
- if ( $df == '0' ) $dflt = __( 'not specified', 'wp-photo-album-plus' );
972
- else foreach( array_keys( $vals ) as $key ) {
973
- if ( $df == $vals[$key] ) {
974
- $dflt = $opts[$key];
975
- }
976
- }
977
-
978
- $title = sprintf( __( 'The default is set in %s and is currently set to %s', 'wp-photo-album-plus' ), wppa_setting_path( 'b', 'misc', 1, 1 ), $dflt );
979
-
980
- $result = '
981
- <div>
982
- <label
983
- for="subalbumorder">' .
984
- __( 'Subalbum sort order', 'wp-photo-album-plus' ) . '
985
- </label><br>
986
- <select
987
- id="subalbumorder"
988
- style="max-width:200px;"
989
- onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'suba_order_by\', this )"
990
- title="' . esc_attr( $title ) . '"
991
- >';
992
- for ( $i = 0; $i < 7; $i++ ) {
993
- $result .= '<option value="' . esc_attr( $vals[$i] ) . '" ' . ( $suba_order_by == $vals[$i] ? $sel : '' ) . ' >' . $opts[$i] . '</option>';
994
- }
995
- $result .= '
996
- </select>
997
- </div>';
998
- wppa_echo( $result );
999
- }
1000
-
1001
  // Alternative thumbnail size
1002
  if ( ! wppa_switch( 'alt_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
1003
  $title = sprintf( __( 'The alternate thumbnail size is set in %s and is currently set to %s', 'wp-photo-album-plus' ), wppa_setting_path( 'b', 'thumbs', 1, 2 ), wppa_opt( 'thumbsize_alt' ) );
@@ -1025,60 +992,6 @@ global $wppa_revno;
1025
  </div>' );
1026
  }
1027
 
1028
- // Cover type
1029
- if ( ! wppa_switch( 'covertype_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
1030
- $sel = ' selected';
1031
- $title = sprintf( __( 'The default is set in %s and is currently set to %s', 'wp-photo-album-plus' ), wppa_setting_path( 'b', 'covers', 3, 4 ), wppa_opt( 'cover_type' ) );
1032
-
1033
- wppa_echo( '
1034
- <div
1035
- style="max-width: 200px;margin-right: 4px;">
1036
- <label
1037
- for="covertype">' .
1038
- __( 'Cover&nbsp;Type', 'wp-photo-album-plus' ) . '
1039
- </label><br>
1040
- <select
1041
- id="covertype"
1042
- style="max-width:200px;"
1043
- onchange="wppaAjaxUpdateAlbum( '. $id . ', \'cover_type\', this )"
1044
- title="' . esc_attr( $title ) . '"
1045
- >
1046
- <option value=""' . ( $cover_type == '' ? $sel : '' ) . ' >' .
1047
- __( '--- default ---', 'wp-photo-album-plus' ) . '
1048
- </option>
1049
- <option value="default"' . ( $cover_type == 'default' ? $sel : '' ) . ' >' .
1050
- __( 'Standard', 'wp-photo-album-plus' ) . '
1051
- </option>
1052
- <option value="longdesc"' . ( $cover_type == 'longdesc' ? $sel : '' ) . ' >' .
1053
- __( 'Long Descriptions', 'wp-photo-album-plus' ) . '
1054
- </option>
1055
- <option value="imagefactory"' . ( $cover_type == 'imagefactory' ? $sel : '' ) . ' >' .
1056
- __( 'Image Factory', 'wp-photo-album-plus' ) . '
1057
- </option>
1058
- <option value="default-mcr"' . ( $cover_type == 'default-mcr' ? $sel : '' ) . ' >' .
1059
- __( 'Standard mcr', 'wp-photo-album-plus' ) . '
1060
- </option>
1061
- <option value="longdesc-mcr"' . ( $cover_type == 'longdesc-mcr' ? $sel : '' ) . ' >' .
1062
- __( 'Long Descriptions mcr', 'wp-photo-album-plus' ) . '
1063
- </option>
1064
- <option value="imagefactory-mcr"' . ( $cover_type == 'imagefactory-mcr' ? $sel : '' ) . ' >' .
1065
- __( 'Image Factory mcr', 'wp-photo-album-plus' ) . '
1066
- </option>
1067
- </select>
1068
- </div>' );
1069
- }
1070
-
1071
- // Cover photo
1072
- {
1073
- wppa_echo( '
1074
- <div>
1075
- <label>' .
1076
- __( 'Cover&nbsp;Photo:', 'wp-photo-album-plus' ) . '
1077
- </label><br>' .
1078
- wppa_main_photo( $main_photo, $cover_type ) . '
1079
- </div>' );
1080
- }
1081
-
1082
  // Upload limit
1083
  {
1084
  $result = '
@@ -1158,144 +1071,6 @@ global $wppa_revno;
1158
  </div>' );
1159
  }
1160
 
1161
- // Need this the next 5 items
1162
- {
1163
- $yes = __( 'yes', 'wp-photo-album-plus' );
1164
- $no = __( 'no', 'wp-photo-album-plus' );
1165
- $def = __( 'default', 'wp-photo-album-plus' );
1166
- }
1167
-
1168
- // Zoomable
1169
- {
1170
- $title = __( 'When set other than default, this setting will overrule the default settings.', 'wp-photo-album-plus' ) . ' ' .
1171
- sprintf( __( 'The default is set in %s and is currently %s', 'wp-photo-album-plus' ), wppa_setting_path( 'b', 'photos', 1, 4 ), ( wppa_switch( 'zoom_on' ) ? $yes : $no ) );
1172
-
1173
- wppa_echo( '
1174
- <div>
1175
- <label
1176
- for="zoomable">' .
1177
- __( 'Photos are zoomable:', 'wp-photo-album-plus' ) . '
1178
- </label><br>
1179
- <select
1180
- id="zoomable"
1181
- onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'zoomable\', this )"
1182
- title="' . esc_attr( $title ) . '" >
1183
- <option value=""'.($zoomable==''?' selected': '').'>' . $def . '</option>
1184
- <option value="on"'.($zoomable=='on'?' selected': '').'>' . $yes . '</option>
1185
- <option value="off"'.($zoomable=='off'?' selected': '').'>' . $no . '</option>
1186
- </select>
1187
- </div>' );
1188
- }
1189
-
1190
- // Overrulable display options / next 4 items
1191
- {
1192
- if ( $displayopts ) {
1193
- $disp_opt = explode( ',', $displayopts );
1194
- }
1195
- for ( $i = 0; $i < 4; $i++ ) {
1196
- if ( ! isset( $disp_opt[$i] ) ) {
1197
- $disp_opt[$i] = '0';
1198
- }
1199
- }
1200
- $title_head = __( 'When set other than default, this setting will overrule the default settings.', 'wp-photo-album-plus' ) . '&#013;' .
1201
- __( 'The defaults are set in', 'wp-photo-album-plus' ). ':&#013;';
1202
- }
1203
-
1204
- // Display name
1205
- {
1206
- $title = $title_head .
1207
- wppa_setting_path( 'b', 'slide', 1, 17, wppa_switch( 'show_full_name' ) ? $yes : $no ) . ',&#013;' .
1208
- wppa_setting_path( 'b', 'thumbs', 2, 1, wppa_switch( 'thumb_text_name' ) ? $yes : $no ) . ' ' . __( 'and' , 'wp-photo-album-plus' ) . '&#013;' .
1209
- wppa_setting_path( 'b', 'lightbox', 1, 3, wppa_switch( 'ovl_name' ) ? $yes : $no ) . '.';
1210
-
1211
- wppa_echo( '
1212
- <div>
1213
- <label
1214
- for="showname">' .
1215
- __( 'Show names:', 'wp-photo-album-plus' ) . '
1216
- </label><br>
1217
- <select
1218
- id="showname"
1219
- onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt0\', this )"
1220
- title="' . esc_attr( $title ) . '">
1221
- <option value="0"'.($disp_opt[0]=='0'?' selected': '').'>' . $def . '</option>
1222
- <option value="1"'.($disp_opt[0]=='1'?' selected': '').'>' . $yes . '</option>
1223
- <option value="-1"'.($disp_opt[0]=='-1'?' selected': '').'>' . $no . '</option>
1224
- </select>
1225
- </div>' );
1226
- }
1227
-
1228
- // Display description
1229
- {
1230
- $title = $title_head .
1231
- wppa_setting_path( 'b', 'slide', 1, 20, wppa_switch( 'show_full_desc' ) ? $yes : $no ) . ',&#013;' .
1232
- wppa_setting_path( 'b', 'thumbs', 2, 3, wppa_switch( 'thumb_text_desc' ) ? $yes : $no ) . ' ' . __( 'and' , 'wp-photo-album-plus' ) . '&#013;' .
1233
- wppa_setting_path( 'b', 'lightbox', 1, 4, wppa_switch( 'ovl_desc' ) ? $yes : $no ) . '.';
1234
-
1235
- wppa_echo( '
1236
- <div>
1237
- <label
1238
- for="showdesc">' .
1239
- __( 'Show descriptions:', 'wp-photo-album-plus' ) . '
1240
- </label><br>
1241
- <select
1242
- id="showdesc"
1243
- onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt1\', this )"
1244
- title="' . esc_attr( $title ) . '" >
1245
- <option value="0"'.($disp_opt[1]=='0'?' selected': '').'>' . $def . '</option>
1246
- <option value="1"'.($disp_opt[1]=='1'?' selected': '').'>' . $yes . '</option>
1247
- <option value="-1"'.($disp_opt[1]=='-1'?' selected': '').'>' . $no . '</option>
1248
- </select>
1249
- </div>' );
1250
- }
1251
-
1252
- // Display rating
1253
- {
1254
- $title = $title_head .
1255
- wppa_setting_path( 'b', 'general', 1, 5, wppa_switch( 'rating_on' ) ? $yes : $no ) . ',&#013;' .
1256
- wppa_setting_path( 'b', 'thumbs', 2, 3, wppa_switch( 'thumb_text_rating' ) ? $yes : $no ) . ' ' . __( 'and' , 'wp-photo-album-plus' ) . '&#013;' .
1257
- wppa_setting_path( 'b', 'lightbox', 1, 5, wppa_switch( 'ovl_rating' ) ? $yes : $no ) . '.';
1258
-
1259
- wppa_echo( '
1260
- <div>
1261
- <label
1262
- for="showrating">' .
1263
- __( 'Show rating:', 'wp-photo-album-plus' ) . '
1264
- </label><br>
1265
- <select
1266
- id="showrating"
1267
- onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt2\', this )"
1268
- title="' . esc_attr( $title ) . '" >
1269
- <option value="0"'.($disp_opt[2]=='0'?' selected': '').'>' . $def . '</option>
1270
- <option value="1"'.($disp_opt[2]=='1'?' selected': '').'>' . $yes . '</option>
1271
- <option value="-1"'.($disp_opt[2]=='-1'?' selected': '').'>' . $no . '</option>
1272
- </select>
1273
- </div>' );
1274
- }
1275
-
1276
- // Display comments
1277
- {
1278
- $title = $title_head .
1279
- wppa_setting_path( 'b', 'general', 1, 4, wppa_switch( 'show_comments' ) ? $yes : $no ) . ' ' . __( 'and' , 'wp-photo-album-plus' ) . '&#013;' .
1280
- wppa_setting_path( 'b', 'thumbs', 2, 4, wppa_switch( 'thumb_text_comcount' ) ? $yes : $no ) . '.';
1281
-
1282
- wppa_echo( '
1283
- <div>
1284
- <label
1285
- for="showcomments">' .
1286
- __( 'Show comments:', 'wp-photo-album-plus' ) . '
1287
- </label><br>
1288
- <select
1289
- id="showcomments"
1290
- onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt3\', this )"
1291
- title="' . esc_attr( $title ) . '" >
1292
- <option value="0"'.($disp_opt[3]=='0'?' selected': '').'>' . $def . '</option>
1293
- <option value="1"'.($disp_opt[3]=='1'?' selected': '').'>' . $yes . '</option>
1294
- <option value="-1"'.($disp_opt[3]=='-1'?' selected': '').'>' . $no . '</option>
1295
- </select>
1296
- </div>' );
1297
- }
1298
-
1299
  // Watermark
1300
  if ( wppa_switch( 'watermark_on' ) ) {
1301
 
@@ -1359,21 +1134,7 @@ global $wppa_revno;
1359
  }
1360
  // End Section 1: Short settable items, wppa-flex div
1361
 
1362
-
1363
- // Status - Remark - field
1364
- {
1365
- wppa_echo( '
1366
- <h3 style="margin-left:1em">' .
1367
- esc_html__( 'Remark', 'wp-photo-album-plus' ) . ':&nbsp;
1368
- <span
1369
- id="albumstatus-' . $id . '"
1370
- style="font-weight:bold;color:#00AA00">' .
1371
- esc_html( $remark ) . '
1372
- </span>
1373
- </h3>' );
1374
- }
1375
-
1376
- // Section 2: name, description, custom, links
1377
  {
1378
  wppa_echo( '
1379
  <!-- Album Section 2 -->
@@ -1506,31 +1267,6 @@ global $wppa_revno;
1506
  wppa_echo( $result );
1507
  }
1508
 
1509
- // Default photo tags
1510
- {
1511
- wppa_echo( '
1512
- <tr>
1513
- <td>
1514
- ' . __( 'Default photo tags:', 'wp-photo-album-plus' ) . '
1515
- </td>
1516
- <td>
1517
- <input
1518
- type="text"
1519
- id="default_tags"
1520
- value="' . esc_attr( $default_tags ) . '"
1521
- style="width:100%"
1522
- onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'default_tags\', this )"
1523
- />
1524
- <br>
1525
- <span class="description">' .
1526
- __( 'Enter the tags that you want to be assigned to new photos in this album.', 'wp-photo-album-plus' ) . '
1527
- </span>
1528
- </td>
1529
- <td>
1530
- </td>
1531
- </tr>' );
1532
- }
1533
-
1534
  // Custom
1535
  if ( wppa_switch( 'album_custom_fields' ) ) {
1536
  $result = '';
@@ -1571,125 +1307,6 @@ global $wppa_revno;
1571
  wppa_echo( $result );
1572
  }
1573
 
1574
- // Link type
1575
- {
1576
- $result = '
1577
- <tr>
1578
- <td>
1579
- ' . __( 'Link type:', 'wp-photo-album-plus' ) . '
1580
- </td>
1581
- <td>';
1582
- $sel = ' selected';
1583
- $lt = $cover_linktype;
1584
- $result .= '
1585
- <select onchange="wppaAjaxUpdateAlbum( '. $id . ', \'cover_linktype\', this )" >
1586
- <option value="content"' . ( $lt == 'content' ? $sel : '' ) . ' >' . __( 'the subalbums and thumbnails', 'wp-photo-album-plus' ) . '</option>
1587
- <option value="albums"' . ( $lt == 'albums' ? $sel : '' ) . ' >' . __( 'the subalbums', 'wp-photo-album-plus' ) . '</option>
1588
- <option value="thumbs"' . ( $lt == 'thumbs' ? $sel : '' ) . ' >' . __( 'the thumbnails', 'wp-photo-album-plus' ) . '</option>
1589
- <option value="slide"' . ( $lt == 'slide' ? $sel : '' ) . ' >' . __( 'the album photos as slideshow', 'wp-photo-album-plus' ) . '</option>
1590
- <option value="page"' . ( $lt == 'page' ? $sel : '' ) . ' >' . __( 'the link page with a clean url', 'wp-photo-album-plus' ) . '</option>
1591
- <option value="none"' . ( $lt == 'none' ? $sel : '' ) . ' >' . __( 'no link at all', 'wp-photo-album-plus' ) . '</option>
1592
- <option value="manual"' . ( $lt == 'manual' ? $sel : '' ) . ' >' . __( 'manually entered', 'wp-photo-album-plus' ) . '</option>
1593
- </select>
1594
- <br>
1595
- <span class="description">';
1596
- if ( wppa_switch( 'auto_page' ) ) {
1597
- $result .= __( 'If you select "the link page with a clean url", select an Auto Page of one of the photos in this album.', 'wp-photo-album-plus' );
1598
- }
1599
- else {
1600
- $result .= __( 'If you select "the link page with a clean url", make sure you enter the correct shortcode on the target page.', 'wp-photo-album-plus' );
1601
- }
1602
- $result .= '
1603
- </span>
1604
- </td>
1605
- <td>
1606
- </td>
1607
- </tr>';
1608
- wppa_echo( $result );
1609
- }
1610
-
1611
- // Manually entered link
1612
- if ( ! wppa_switch( 'link_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
1613
- $result = '
1614
- <tr
1615
- id="link-url-tr"
1616
- style="' . ( $cover_linktype == 'manual' ? '' : 'display:none' ) . '"
1617
- >
1618
- <td>
1619
- ' . __( 'Link target (url):', 'wp-photo-album-plus' ) . '
1620
- </td>
1621
- <td>
1622
- <input
1623
- type="text"
1624
- id="cover_link"
1625
- value="' . esc_attr( $cover_link ) . '"
1626
- style="width:100%"
1627
- onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'cover_link\', this )"
1628
- />
1629
- <br>
1630
- <span class="description">' .
1631
- __( 'Enter the url you want the title to link to when you selected Link type manually entered.', 'wp-photo-album-plus' ) . '
1632
- </span>
1633
- </td>
1634
- <td>
1635
- </td>
1636
- </tr>';
1637
- wppa_echo( $result );
1638
- }
1639
-
1640
- // Link page
1641
- if ( ! wppa_switch( 'link_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
1642
- $result = '
1643
- <tr>
1644
- <td>
1645
- ' . __( 'Link to:', 'wp-photo-album-plus' ) . '
1646
- </td>
1647
- <td>';
1648
- $query = "SELECT ID, post_type, post_title, post_date FROM $wpdb->posts
1649
- WHERE ( post_type = 'page' OR post_type = 'post' )
1650
- AND post_status = 'publish'
1651
- ORDER BY post_title ASC";
1652
- $pages = $wpdb->get_results( $query, ARRAY_A );
1653
- if ( empty( $pages ) ) {
1654
- _e( 'There are no posts/pages (yet) to link to.', 'wp-photo-album-plus' );
1655
- }
1656
- else {
1657
- $linkpage = $albuminfo['cover_linkpage'];
1658
- if ( ! is_numeric( $linkpage ) ) {
1659
- $linkpage = '0';
1660
- }
1661
-
1662
- $result .= '
1663
- <select
1664
- onchange="wppaAjaxUpdateAlbum( '. $id . ' , \'cover_linkpage\', this )"
1665
- style="max-width:100%;"
1666
- >
1667
- <option value="0"' . ( $linkpage == '0' ? $sel : '' ) . ' >' .
1668
- __( '--- the same page or post ---', 'wp-photo-album-plus' ) .
1669
- '</option>';
1670
- foreach ( $pages as $page ) {
1671
- $result .= '
1672
- <option
1673
- value="' . $page['ID'] . '"' .
1674
- ( $linkpage == $page['ID'] ? ' selected' : '' ) . '>' .
1675
- __( htmlspecialchars( $page['post_title'] ) ) .
1676
- ( $page['post_type'] == 'post' ? ' (' . htmlspecialchars( $page['post_date'] ) . ')' : '' ) .
1677
- '</option>';
1678
- }
1679
- $result .= '
1680
- </select>
1681
- <br>
1682
- <span class="description" >' .
1683
- __( 'If you want, you can link the title to a WP page or post instead of the album\'s content. If so, select the page the title links to.', 'wp-photo-album-plus' ) .
1684
- '</span>';
1685
- }
1686
- $result .= '
1687
- </td>
1688
- <td>
1689
- </td>
1690
- </tr>';
1691
- wppa_echo( $result );
1692
- }
1693
 
1694
  // Schedule
1695
  {
@@ -1734,11 +1351,11 @@ global $wppa_revno;
1734
  </div>' ); // Tab 1
1735
 
1736
 
1737
- // Tab 2: Subalbums
1738
  wppa_echo( '
1739
  <div id="subalbumitem-' . $id . '"
1740
  class="wppa-table-wrap wppa-tabcontent"
1741
- style="width:100%;position:relative;display:none;background-color:#ddd;padding-bottom:12px;padding-left:12px;"
1742
  >' );
1743
 
1744
  // Explanation
@@ -1815,120 +1432,519 @@ global $wppa_revno;
1815
  />' );
1816
  }
1817
 
1818
- // Subalbums sequence
1819
- if ( $has_children ) {
1820
- wppa_album_sequence( $edit_id );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1821
  }
1822
 
1823
- // End Tab 2
 
 
 
1824
  wppa_echo( '
1825
  </div>' );
1826
 
1827
-
1828
- // Tab 3: Album Actions
1829
  wppa_echo( '
1830
  <div
1831
- id="albumactions-' . $id . '"
1832
  class="wppa-table-wrap wppa-tabcontent"
1833
- style="width:100%;position:relative;display:none;background-color:#ddd;padding-bottom:12px;padding-left:12px;"
1834
  >' );
1835
 
1836
  // Explanation
1837
  wppa_echo( '
1838
  <h2 class="description" style="margin:1em">' .
1839
- __( 'The following buttons perform actions onto all items in this album', 'wp-photo-album-plus' ) . '
1840
  </h2>' );
1841
 
1842
- // Apply default tags
1843
- {
1844
- wppa_echo( '
1845
- <input
1846
- type="button"
1847
- class="wppa-admin-button button"
1848
- title="' . esc_attr( __( 'Tag all photos in this album with the default tags.', 'wp-photo-album-plus' ) ) . '"
1849
- onclick="wppaTryApplyDeftags( ' . $id . ' )"
1850
- value="' . esc_attr( __( 'Apply default tags', 'wp-photo-album-plus' ) ) . '"
1851
- />
1852
- <input
1853
- type="button"
1854
- class="wppa-admin-button button"
1855
- title="' . esc_attr( __( 'Add the default tags to all photos in this album.', 'wp-photo-album-plus' ) ) . '"
1856
- onclick="wppaTryAddDeftags( ' . $id . ' )"
1857
- value="' . esc_attr( __( 'Add default tags', 'wp-photo-album-plus' ) ) . '"
1858
- />' );
1859
- }
1860
 
1861
- // Schedule all
1862
- {
1863
- wppa_echo( '
1864
- <input
1865
- type="button"
1866
- class="wppa-admin-button button"
1867
- title="' . esc_attr( __( 'Schedule all photos in this album for later publishing.', 'wp-photo-album-plus' ) ) . '"
1868
- onclick="wppaTryScheduleAll( ' . $id . ' )"
1869
- value="' . esc_attr( __( 'Schedule all', 'wp-photo-album-plus' ) ) . '"
1870
- />' );
1871
- }
1872
 
1873
- // Reset Ratings
1874
- if ( wppa_switch( 'rating_on') ) {
1875
- $onc = 'if (confirm(\'' . esc_js( __( 'Are you sure you want to clear the ratings in this album?', 'wp-photo-album-plus' ) ) . '\')) { wppaRefreshAfter(); wppaAjaxUpdateAlbum( ' . $id . ', \'clear_ratings\', 0 ); }';
1876
- wppa_echo( '
1877
- <input
1878
- type="button"
1879
- class="wppa-admin-button button"
1880
- onclick="' . $onc . '"
1881
- value="' . esc_attr( __( 'Reset ratings', 'wp-photo-album-plus' ) ) . '"
1882
- />' );
1883
- }
1884
 
1885
- // Apply New photo desc
1886
- if ( wppa_switch( 'apply_newphoto_desc') ) {
1887
- $onc = 'if ( confirm(\'Are you sure you want to set the description of all photos to \n\n'.esc_js(wppa_opt( 'newphoto_description')).'\')) document.location=\''.wppa_ea_url($albuminfo['id'], 'edit').'&applynewdesc=1\'';
1888
- wppa_echo( '
1889
- <input
1890
- type="button"
1891
- class="wppa-admin-button button"
1892
- onclick="' . $onc . '"
1893
- value="' . esc_attr( __( 'Apply new photo desc', 'wp-photo-album-plus' ) ) . '"
1894
- />' );
1895
- }
 
 
 
 
 
1896
 
1897
- // Remake all
1898
- if ( wppa_user_is( 'administrator' ) ) {
1899
- $onc = 'if ( confirm(\'Are you sure you want to remake the files for all photos in this album?\')) document.location=\''.wppa_ea_url($albuminfo['id'], 'edit').'&remakealbum=1\'';
1900
- wppa_echo( '
1901
- <input
1902
- type="button"
1903
- class="wppa-admin-button button"
1904
- onclick="' . $onc . '"
1905
- value="' . esc_attr( __( 'Remake all', 'wp-photo-album-plus' ) ) . '"
1906
- />' );
1907
- }
 
 
1908
 
1909
- // Set all to pano
1910
- if ( wppa_switch( 'enable_panorama' ) ) {
 
 
 
 
1911
 
1912
- wppa_echo( '
1913
- <input
1914
- type="button"
1915
- class="wppa-admin-button button"
1916
- onclick="wppaTrySetAllPanorama(' . $albuminfo['id'] . ')"
1917
- value="' . esc_attr( __( 'Set all to panorama', 'wp-photo-album-plus' ) ).':"
1918
- />
1919
- <select id="pano-opt"
1920
- style="">
1921
- <option value="9" disabled selected>' . __( 'Select a mode', 'wp-photo-album-plus' ) . '</option>
1922
- <option value="0">' . __( '- none -', 'wp-photo-album-plus' ) . '</option>
1923
- <option value="1">' . __( '360&deg; Spheric', 'wp-photo-album-plus' ) . '</option>
1924
- <option value="2">' . __( 'Non 360&deg; Flat', 'wp-photo-album-plus' ) . '</option>
1925
- </select>' );
1926
- }
 
1927
 
1928
- // End Tab 3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1929
  wppa_echo( '
1930
  </div>' );
1931
 
 
1932
  // End of outer details block
1933
  wppa_echo( '
1934
  </details>' );
@@ -3494,6 +3510,60 @@ global $wpdb;
3494
  }
3495
  }
3496
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3497
  // Check album order
3498
  if ( $albumorder_col != 'a_order' ) {
3499
  if ( $parent == '0') {
@@ -3502,16 +3572,23 @@ global $wpdb;
3502
  esc_html__( 'You can edit top-level album sequence number here when you set the album sequence to "Order #" or "Order # desc" in Basic settings -> Misc -> I -> Item 1.' );
3503
  }
3504
  else {
3505
- $result =
 
3506
  esc_html__( 'You can edit subalbum sequence number here when you set the album sequence to "Order #" or "Order # desc" in the "Subalbum sort order:" selection box above.' );
3507
  }
3508
  $result .= '<br>';
3509
 
3510
  wppa_echo( $result );
3511
- return;
3512
  }
3513
 
 
 
3514
  $result = '
 
 
 
 
3515
  <h2 style="margin:1em">' .
3516
  __( 'Manage album order', 'wp-photo-album-plus' ) . '
3517
  -
@@ -3568,7 +3645,8 @@ global $wpdb;
3568
  </td>
3569
  </tr>
3570
  </tbody>
3571
- </table>';
 
3572
  wppa_echo( $result );
3573
 
3574
 
@@ -3830,6 +3908,7 @@ global $wpdb;
3830
  $result .= '
3831
  </div>
3832
  <div style="clear:both;"></div>
 
3833
  </div>';
3834
 
3835
  wppa_echo( $result );
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
+ * Version 8.2.03.001
7
  *
8
  */
9
 
579
  </div>'); // end action-container
580
  /* End header */
581
 
582
+ /* Main body album admin */
583
  wppa_echo( '
584
  <details class="wppa-toplevel-details">
585
  <summary class="toplevel wppa-summary-toplevel"> ' .
594
  <br>' . __( 'The <b style="color:#070" >Remark</b> fields keep you informed on the actions taken at the background.', 'wp-photo-album-plus' ) . '
595
  </h2>' );
596
 
597
+ // Status - Remark - field
598
+ wppa_echo( '
599
+ <h3 style="margin-left:1em">' .
600
+ esc_html__( 'Remark', 'wp-photo-album-plus' ) . ':&nbsp;
601
+ <span
602
+ id="albumstatus-' . $id . '"
603
+ style="font-weight:bold;color:#00AA00">' .
604
+ esc_html( $remark ) . '
605
+ </span>
606
+ </h3>' );
607
+
608
  // The tabs
609
  wppa_echo('
610
  <div id="tabs" style="margin-bottom:23px">
611
  <ul class="widefat wppa-setting-tabs">
612
+ <li class="wppa-albumadmin-tab active" onclick="wppaChangeAlbumAdminTab(this,\'#albumitem-' . $id . '\');">' . __( 'Album', 'wp-photo-album-plus' ) . '</li>
613
+ <li class="wppa-albumadmin-tab" onclick="wppaChangeAlbumAdminTab(this,\'#subalbumitem-' . $id . '\');">' . __( 'Related', 'wp-photo-album-plus' ) . '</li>
614
+ <li class="wppa-albumadmin-tab" onclick="wppaChangeAlbumAdminTab(this,\'#albumactions-' . $id . '\');">' . __( 'Content', 'wp-photo-album-plus' ) . '</li>
615
+ <li class="wppa-albumadmin-tab" onclick="wppaChangeAlbumAdminTab(this,\'#albumcovers-' . $id . '\');">' . __( 'Cover', 'wp-photo-album-plus' ) . '</li>
616
+ <li class="wppa-albumadmin-tab" onclick="wppaChangeAlbumAdminTab(this,\'#itemdisplay-' . $id . '\');">' . __( 'Display', 'wp-photo-album-plus' ) . '</li>
617
  </ul>
618
  <div style="clear:both"></div>
619
  </div>');
633
  <div
634
  id="albumitem-' . $id . '"
635
  class="wppa-table-wrap wppa-tabcontent"
636
+ style="position:relative;background-color:#ddd;padding-bottom:12px;padding-left:12px;"
637
  >' );
638
 
639
  // Section 0: More or less static data
647
  <label>' .
648
  __( 'Album number', 'wp-photo-album-plus' ) . '
649
  </label><br>
650
+ <div class="wppa-ldi">' .
651
  $id . '
652
+ </div>
653
  </div>
654
  <div>
655
  <label>' .
656
  __( 'Crypt', 'wp-photo-album-plus' ) . '
657
  </label><br>
658
+ <div class="wppa-ldi">' .
659
  $crypt . '
660
+ </div>
661
  </div>
662
  <div>
663
  <label>' .
664
  __( 'Created', 'wp-photo-album-plus' ) . '
665
  </label><br>
666
+ <div class="wppa-ldi">' .
667
  wppa_local_date( '', $timestamp ) . '
668
+ </div>
669
  </div>
670
  <div>
671
  <label>' .
672
  __( 'Modified', 'wp-photo-album-plus' ) . '
673
  </label><br>
674
+ <div class="wppa-ldi">';
675
  if ( $modified > $timestamp ) {
676
  $result .= wppa_local_date( '', $modified );
677
  }
679
  $result .= __( 'Not modified', 'wp-photo-album-plus' );
680
  }
681
  $result .= '
682
+ </div>
683
  </div>';
684
 
685
  // Views
689
  <label>' .
690
  __( 'Album Views', 'wp-photo-album-plus' ) . '
691
  </label><br>
692
+ <div class="wppa-ldi">' .
693
  $views . '
694
+ </div>
695
  </div>
696
  <div>
697
  <label>' .
698
  __( 'Photo views', 'wp-photo-album-plus' ) . '
699
  </label><br>
700
+ <div class="wppa-ldi">' .
701
  $pviews . '
702
+ </div>
703
  </div>';
704
  if ( $nsub ) {
705
  $result .= '
707
  <label>' .
708
  __( 'Inc subalbums', 'wp-photo-album-plus' ) . '
709
  </label><br>
710
+ <div class="wppa-ldi">' .
711
  $tpviews . '
712
+ </div>
713
  </div>';
714
  }
715
  }
722
  <label>' .
723
  __( 'Clicks:', 'wp-photo-album-plus' ) . '
724
  </label><br>
725
+ <div class="wppa-ldi">' .
726
  array_sum( $click_arr ) . '
727
+ </div>
728
  </div>';
729
  }
730
 
965
  wppa_echo( $result );
966
  }
967
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
968
  // Alternative thumbnail size
969
  if ( ! wppa_switch( 'alt_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
970
  $title = sprintf( __( 'The alternate thumbnail size is set in %s and is currently set to %s', 'wp-photo-album-plus' ), wppa_setting_path( 'b', 'thumbs', 1, 2 ), wppa_opt( 'thumbsize_alt' ) );
992
  </div>' );
993
  }
994
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
995
  // Upload limit
996
  {
997
  $result = '
1071
  </div>' );
1072
  }
1073
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1074
  // Watermark
1075
  if ( wppa_switch( 'watermark_on' ) ) {
1076
 
1134
  }
1135
  // End Section 1: Short settable items, wppa-flex div
1136
 
1137
+ // Section 2: name, description, custom
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1138
  {
1139
  wppa_echo( '
1140
  <!-- Album Section 2 -->
1267
  wppa_echo( $result );
1268
  }
1269
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1270
  // Custom
1271
  if ( wppa_switch( 'album_custom_fields' ) ) {
1272
  $result = '';
1307
  wppa_echo( $result );
1308
  }
1309
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1310
 
1311
  // Schedule
1312
  {
1351
  </div>' ); // Tab 1
1352
 
1353
 
1354
+ // Tab 2: Related albums
1355
  wppa_echo( '
1356
  <div id="subalbumitem-' . $id . '"
1357
  class="wppa-table-wrap wppa-tabcontent"
1358
+ style="position:relative;display:none;background-color:#ddd;padding-bottom:12px;padding-left:12px;"
1359
  >' );
1360
 
1361
  // Explanation
1432
  />' );
1433
  }
1434
 
1435
+ // Subalbums sequence
1436
+ if ( $has_children ) {
1437
+ wppa_album_sequence( $edit_id );
1438
+ }
1439
+
1440
+ // End Tab 2
1441
+ wppa_echo( '
1442
+ </div>' );
1443
+
1444
+
1445
+ // Tab 3: Album Actions
1446
+ wppa_echo( '
1447
+ <div
1448
+ id="albumactions-' . $id . '"
1449
+ class="wppa-table-wrap wppa-tabcontent"
1450
+ style="position:relative;display:none;background-color:#ddd;padding-bottom:12px;padding-left:12px;"
1451
+ >' );
1452
+
1453
+ // Explanation
1454
+ wppa_echo( '
1455
+ <h2 class="description" style="margin:1em">' .
1456
+ __( 'The following buttons perform actions onto all items in this album', 'wp-photo-album-plus' ) . '
1457
+ </h2>' );
1458
+
1459
+ wppa_echo( '<div class="wppa-flex">' );
1460
+
1461
+ // Default photo tags
1462
+ {
1463
+ wppa_echo( '
1464
+ <div>
1465
+ <label>' .
1466
+ __( 'Default photo tags:', 'wp-photo-album-plus' ) . '
1467
+ </label><br>
1468
+ <input
1469
+ type="text"
1470
+ id="default_tags"
1471
+ value="' . esc_attr( $default_tags ) . '"
1472
+ style="width:100%"
1473
+ onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'default_tags\', this )"
1474
+ />
1475
+ <br>
1476
+ <span class="description">' .
1477
+ __( 'Enter the tags that you want to be assigned to new photos in this album.', 'wp-photo-album-plus' ) . '
1478
+ </span>
1479
+ </div>' );
1480
+ }
1481
+
1482
+ // Apply default tags
1483
+ {
1484
+ wppa_echo( '
1485
+ <div>
1486
+ <label>&nbsp;</label><br>
1487
+ <input
1488
+ type="button"
1489
+ class="wppa-admin-button button"
1490
+ title="' . esc_attr( __( 'Tag all photos in this album with the default tags.', 'wp-photo-album-plus' ) ) . '"
1491
+ onclick="wppaTryApplyDeftags( ' . $id . ' )"
1492
+ value="' . esc_attr( __( 'Apply default tags', 'wp-photo-album-plus' ) ) . '"
1493
+ />
1494
+ <input
1495
+ type="button"
1496
+ class="wppa-admin-button button"
1497
+ title="' . esc_attr( __( 'Add the default tags to all photos in this album.', 'wp-photo-album-plus' ) ) . '"
1498
+ onclick="wppaTryAddDeftags( ' . $id . ' )"
1499
+ value="' . esc_attr( __( 'Add default tags', 'wp-photo-album-plus' ) ) . '"
1500
+ />
1501
+ </div>' );
1502
+ }
1503
+
1504
+ // Schedule all
1505
+ {
1506
+ wppa_echo( '
1507
+ <div>
1508
+ <label>&nbsp;</label><br>
1509
+ <input
1510
+ type="button"
1511
+ class="wppa-admin-button button"
1512
+ title="' . esc_attr( __( 'Schedule all photos in this album for later publishing.', 'wp-photo-album-plus' ) ) . '"
1513
+ onclick="wppaTryScheduleAll( ' . $id . ' )"
1514
+ value="' . esc_attr( __( 'Schedule all', 'wp-photo-album-plus' ) ) . '"
1515
+ />
1516
+ </div>' );
1517
+ }
1518
+
1519
+ // Reset Ratings
1520
+ if ( wppa_switch( 'rating_on') ) {
1521
+ $onc = 'if (confirm(\'' . esc_js( __( 'Are you sure you want to clear the ratings in this album?', 'wp-photo-album-plus' ) ) . '\')) { wppaRefreshAfter(); wppaAjaxUpdateAlbum( ' . $id . ', \'clear_ratings\', 0 ); }';
1522
+ wppa_echo( '
1523
+ <div>
1524
+ <label>&nbsp;</label><br>
1525
+ <input
1526
+ type="button"
1527
+ class="wppa-admin-button button"
1528
+ onclick="' . $onc . '"
1529
+ value="' . esc_attr( __( 'Reset ratings', 'wp-photo-album-plus' ) ) . '"
1530
+ />
1531
+ </div>' );
1532
+ }
1533
+
1534
+ // Apply New photo desc
1535
+ if ( wppa_switch( 'apply_newphoto_desc') ) {
1536
+ $onc = 'if ( confirm(\'Are you sure you want to set the description of all photos to \n\n'.esc_js(wppa_opt( 'newphoto_description')).'\')) document.location=\''.wppa_ea_url($albuminfo['id'], 'edit').'&applynewdesc=1\'';
1537
+ wppa_echo( '
1538
+ <div>
1539
+ <label>&nbsp;</label><br>
1540
+ <input
1541
+ type="button"
1542
+ class="wppa-admin-button button"
1543
+ onclick="' . $onc . '"
1544
+ value="' . esc_attr( __( 'Apply new photo desc', 'wp-photo-album-plus' ) ) . '"
1545
+ />
1546
+ </div>' );
1547
+ }
1548
+
1549
+ // Remake all
1550
+ if ( wppa_user_is( 'administrator' ) ) {
1551
+ $onc = 'if ( confirm(\'Are you sure you want to remake the files for all photos in this album?\')) document.location=\''.wppa_ea_url($albuminfo['id'], 'edit').'&remakealbum=1\'';
1552
+ wppa_echo( '
1553
+ <div>
1554
+ <label>&nbsp;</label><br>
1555
+ <input
1556
+ type="button"
1557
+ class="wppa-admin-button button"
1558
+ onclick="' . $onc . '"
1559
+ value="' . esc_attr( __( 'Remake all', 'wp-photo-album-plus' ) ) . '"
1560
+ />
1561
+ </div>' );
1562
+ }
1563
+
1564
+ // Set all to pano
1565
+ if ( wppa_switch( 'enable_panorama' ) ) {
1566
+
1567
+ wppa_echo( '
1568
+ <div>
1569
+ <label>&nbsp;</label><br>
1570
+ <input
1571
+ type="button"
1572
+ class="wppa-admin-button button"
1573
+ onclick="wppaTrySetAllPanorama(' . $albuminfo['id'] . ')"
1574
+ value="' . esc_attr( __( 'Set all to panorama', 'wp-photo-album-plus' ) ).':"
1575
+ />
1576
+ <select id="pano-opt"
1577
+ style="">
1578
+ <option value="9" disabled selected>' . __( 'Select a mode', 'wp-photo-album-plus' ) . '</option>
1579
+ <option value="0">' . __( '- none -', 'wp-photo-album-plus' ) . '</option>
1580
+ <option value="1">' . __( '360&deg; Spheric', 'wp-photo-album-plus' ) . '</option>
1581
+ <option value="2">' . __( 'Non 360&deg; Flat', 'wp-photo-album-plus' ) . '</option>
1582
+ </select>
1583
+ </div>' );
1584
+ }
1585
+
1586
+ // End wppa-flex div
1587
+ wppa_echo( '</div>' );
1588
+
1589
+ // End Tab 3
1590
+ wppa_echo( '
1591
+ </div>' );
1592
+
1593
+ // Tab 4 ALbum cover settings
1594
+ wppa_echo( '
1595
+ <div
1596
+ id="albumcovers-' . $id . '"
1597
+ class="wppa-table-wrap wppa-tabcontent"
1598
+ style="position:relative;display:none;background-color:#ddd;padding-bottom:12px;padding-left:12px;"
1599
+ >' );
1600
+
1601
+ // Explanation
1602
+ wppa_echo( '
1603
+ <h2 class="description" style="margin:1em">' .
1604
+ __( 'The following settings apply to the album cover', 'wp-photo-album-plus' ) . '
1605
+ </h2>' );
1606
+
1607
+ wppa_echo( '<div class="wppa-flex">' );
1608
+
1609
+ // Cover type
1610
+ if ( ! wppa_switch( 'covertype_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
1611
+ $sel = ' selected';
1612
+ $title = sprintf( __( 'The default is set in %s and is currently set to %s', 'wp-photo-album-plus' ), wppa_setting_path( 'b', 'covers', 3, 4 ), wppa_opt( 'cover_type' ) );
1613
+
1614
+ wppa_echo( '
1615
+ <div
1616
+ style="max-width: 200px;margin-right: 4px;">
1617
+ <label
1618
+ for="covertype">' .
1619
+ __( 'Cover&nbsp;Type', 'wp-photo-album-plus' ) . '
1620
+ </label><br>
1621
+ <select
1622
+ id="covertype"
1623
+ style="max-width:200px;"
1624
+ onchange="wppaAjaxUpdateAlbum( '. $id . ', \'cover_type\', this )"
1625
+ title="' . esc_attr( $title ) . '"
1626
+ >
1627
+ <option value=""' . ( $cover_type == '' ? $sel : '' ) . ' >' .
1628
+ __( '--- default ---', 'wp-photo-album-plus' ) . '
1629
+ </option>
1630
+ <option value="default"' . ( $cover_type == 'default' ? $sel : '' ) . ' >' .
1631
+ __( 'Standard', 'wp-photo-album-plus' ) . '
1632
+ </option>
1633
+ <option value="longdesc"' . ( $cover_type == 'longdesc' ? $sel : '' ) . ' >' .
1634
+ __( 'Long Descriptions', 'wp-photo-album-plus' ) . '
1635
+ </option>
1636
+ <option value="imagefactory"' . ( $cover_type == 'imagefactory' ? $sel : '' ) . ' >' .
1637
+ __( 'Image Factory', 'wp-photo-album-plus' ) . '
1638
+ </option>
1639
+ <option value="default-mcr"' . ( $cover_type == 'default-mcr' ? $sel : '' ) . ' >' .
1640
+ __( 'Standard mcr', 'wp-photo-album-plus' ) . '
1641
+ </option>
1642
+ <option value="longdesc-mcr"' . ( $cover_type == 'longdesc-mcr' ? $sel : '' ) . ' >' .
1643
+ __( 'Long Descriptions mcr', 'wp-photo-album-plus' ) . '
1644
+ </option>
1645
+ <option value="imagefactory-mcr"' . ( $cover_type == 'imagefactory-mcr' ? $sel : '' ) . ' >' .
1646
+ __( 'Image Factory mcr', 'wp-photo-album-plus' ) . '
1647
+ </option>
1648
+ </select>
1649
+ </div>' );
1650
+ }
1651
+
1652
+ // Cover photo
1653
+ {
1654
+ wppa_echo( '
1655
+ <div>
1656
+ <label>' .
1657
+ __( 'Cover&nbsp;Photo:', 'wp-photo-album-plus' ) . '
1658
+ </label><br>' .
1659
+ wppa_main_photo( $main_photo, $cover_type ) . '
1660
+ </div>' );
1661
+ }
1662
+
1663
+ // Link type
1664
+ {
1665
+ $result = '
1666
+ <div>
1667
+ <label>' .
1668
+ __( 'Link type:', 'wp-photo-album-plus' ) . '
1669
+ </label><br>';
1670
+ $sel = ' selected';
1671
+ $lt = $cover_linktype;
1672
+ if ( wppa_switch( 'auto_page' ) ) {
1673
+ $title = __( 'If you select "the link page with a clean url", select an Auto Page of one of the photos in this album.', 'wp-photo-album-plus' );
1674
+ }
1675
+ else {
1676
+ $title = __( 'If you select "the link page with a clean url", make sure you enter the correct shortcode on the target page.', 'wp-photo-album-plus' );
1677
+ }
1678
+ $result .= '
1679
+ <select
1680
+ title="' . esc_attr( $title ) . '"
1681
+ onchange="wppaAjaxUpdateAlbum( '. $id . ', \'cover_linktype\', this )" >
1682
+ <option value="content"' . ( $lt == 'content' ? $sel : '' ) . ' >' . __( 'the subalbums and thumbnails', 'wp-photo-album-plus' ) . '</option>
1683
+ <option value="albums"' . ( $lt == 'albums' ? $sel : '' ) . ' >' . __( 'the subalbums', 'wp-photo-album-plus' ) . '</option>
1684
+ <option value="thumbs"' . ( $lt == 'thumbs' ? $sel : '' ) . ' >' . __( 'the thumbnails', 'wp-photo-album-plus' ) . '</option>
1685
+ <option value="slide"' . ( $lt == 'slide' ? $sel : '' ) . ' >' . __( 'the album photos as slideshow', 'wp-photo-album-plus' ) . '</option>
1686
+ <option value="page"' . ( $lt == 'page' ? $sel : '' ) . ' >' . __( 'the link page with a clean url', 'wp-photo-album-plus' ) . '</option>
1687
+ <option value="none"' . ( $lt == 'none' ? $sel : '' ) . ' >' . __( 'no link at all', 'wp-photo-album-plus' ) . '</option>
1688
+ <option value="manual"' . ( $lt == 'manual' ? $sel : '' ) . ' >' . __( 'manually entered', 'wp-photo-album-plus' ) . '</option>
1689
+ </select>
1690
+ <br>
1691
+ <span class="description">';
1692
+
1693
+ $result .= '
1694
+ </span>
1695
+ </div>';
1696
+ wppa_echo( $result );
1697
+ }
1698
+
1699
+ // Manually entered link
1700
+ if ( ! wppa_switch( 'link_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
1701
+ $result = '
1702
+ <div
1703
+ id="link-url-tr"
1704
+ style="' . ( $cover_linktype == 'manual' ? '' : 'display:none' ) . '"
1705
+ >
1706
+ <label>' .
1707
+ __( 'Link target (url):', 'wp-photo-album-plus' ) . '
1708
+ </label><br>';
1709
+ $title = __( 'Enter the url you want the title to link to when you selected Link type manually entered.', 'wp-photo-album-plus' );
1710
+ $result .= '
1711
+ <input
1712
+ type="text"
1713
+ title="' . $title . '"
1714
+ id="cover_link"
1715
+ value="' . esc_attr( $cover_link ) . '"
1716
+ style="width:100%"
1717
+ onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'cover_link\', this )"
1718
+ />
1719
+ </div>';
1720
+ wppa_echo( $result );
1721
+ }
1722
+
1723
+ // Link page
1724
+ if ( ! wppa_switch( 'link_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
1725
+ $result = '
1726
+ <div
1727
+ id="-link-url-tr"
1728
+ style="' . ( $cover_linktype != 'manual' ? '' : 'display:none' ) . '"
1729
+ >
1730
+ <label>' .
1731
+ __( 'Link to:', 'wp-photo-album-plus' ) . '
1732
+ </label><br>';
1733
+ $query = "SELECT ID, post_type, post_title, post_date FROM $wpdb->posts
1734
+ WHERE ( post_type = 'page' OR post_type = 'post' )
1735
+ AND post_status = 'publish'
1736
+ ORDER BY post_title ASC";
1737
+ $pages = $wpdb->get_results( $query, ARRAY_A );
1738
+ if ( empty( $pages ) ) {
1739
+ $result .= __( 'There are no posts/pages (yet) to link to.', 'wp-photo-album-plus' );
1740
+ }
1741
+ else {
1742
+ $linkpage = $albuminfo['cover_linkpage'];
1743
+ if ( ! is_numeric( $linkpage ) ) {
1744
+ $linkpage = '0';
1745
+ }
1746
+ $title = __( 'If you want, you can link the title to a WP page or post instead of the album\'s content. If so, select the page the title links to.', 'wp-photo-album-plus' ) .
1747
+
1748
+ $result .= '
1749
+ <select
1750
+ onchange="wppaAjaxUpdateAlbum( '. $id . ' , \'cover_linkpage\', this )"
1751
+ title="' . esc_attr( $title ) . '"
1752
+ style="max-width:100%;"
1753
+ >
1754
+ <option value="0"' . ( $linkpage == '0' ? $sel : '' ) . ' >' .
1755
+ __( '--- the same page or post ---', 'wp-photo-album-plus' ) .
1756
+ '</option>';
1757
+ foreach ( $pages as $page ) {
1758
+ $result .= '
1759
+ <option
1760
+ value="' . $page['ID'] . '"' .
1761
+ ( $linkpage == $page['ID'] ? ' selected' : '' ) . '>' .
1762
+ __( htmlspecialchars( $page['post_title'] ) ) .
1763
+ ( $page['post_type'] == 'post' ? ' (' . htmlspecialchars( $page['post_date'] ) . ')' : '' ) .
1764
+ '</option>';
1765
+ }
1766
+ $result .= '
1767
+ </select>';
1768
+
1769
+
1770
+
1771
+ }
1772
+ $result .= '
1773
+ </div>';
1774
+
1775
+ wppa_echo( $result );
1776
  }
1777
 
1778
+ // End wppa-flex div
1779
+ wppa_echo( '</div>' );
1780
+
1781
+ // End Tab 4
1782
  wppa_echo( '
1783
  </div>' );
1784
 
1785
+ // Tab 5 Display
 
1786
  wppa_echo( '
1787
  <div
1788
+ id="itemdisplay-' . $id . '"
1789
  class="wppa-table-wrap wppa-tabcontent"
1790
+ style="position:relative;display:none;background-color:#ddd;padding-bottom:12px;padding-left:12px;"
1791
  >' );
1792
 
1793
  // Explanation
1794
  wppa_echo( '
1795
  <h2 class="description" style="margin:1em">' .
1796
+ __( 'The following settings can overrule systemwide settings on a per album basis', 'wp-photo-album-plus' ) . '
1797
  </h2>' );
1798
 
1799
+ wppa_echo( '<div class="wppa-flex">' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1800
 
1801
+ // Need this the next 5 items
1802
+ {
1803
+ $yes = __( 'yes', 'wp-photo-album-plus' );
1804
+ $no = __( 'no', 'wp-photo-album-plus' );
1805
+ $def = __( 'default', 'wp-photo-album-plus' );
1806
+ }
 
 
 
 
 
1807
 
1808
+ // Zoomable
1809
+ {
1810
+ $title = __( 'When set other than default, this setting will overrule the default settings.', 'wp-photo-album-plus' ) . ' ' .
1811
+ sprintf( __( 'The default is set in %s and is currently %s', 'wp-photo-album-plus' ), wppa_setting_path( 'b', 'photos', 1, 4 ), ( wppa_switch( 'zoom_on' ) ? $yes : $no ) );
 
 
 
 
 
 
 
1812
 
1813
+ wppa_echo( '
1814
+ <div>
1815
+ <label
1816
+ for="zoomable">' .
1817
+ __( 'Photos are zoomable:', 'wp-photo-album-plus' ) . '
1818
+ </label><br>
1819
+ <select
1820
+ id="zoomable"
1821
+ onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'zoomable\', this )"
1822
+ title="' . esc_attr( $title ) . '" >
1823
+ <option value=""'.($zoomable==''?' selected': '').'>' . $def . '</option>
1824
+ <option value="on"'.($zoomable=='on'?' selected': '').'>' . $yes . '</option>
1825
+ <option value="off"'.($zoomable=='off'?' selected': '').'>' . $no . '</option>
1826
+ </select>
1827
+ </div>' );
1828
+ }
1829
 
1830
+ // Overrulable display options / next 4 items
1831
+ {
1832
+ if ( $displayopts ) {
1833
+ $disp_opt = explode( ',', $displayopts );
1834
+ }
1835
+ for ( $i = 0; $i < 4; $i++ ) {
1836
+ if ( ! isset( $disp_opt[$i] ) ) {
1837
+ $disp_opt[$i] = '0';
1838
+ }
1839
+ }
1840
+ $title_head = __( 'When set other than default, this setting will overrule the default settings.', 'wp-photo-album-plus' ) . '&#013;' .
1841
+ __( 'The defaults are set in', 'wp-photo-album-plus' ). ':&#013;';
1842
+ }
1843
 
1844
+ // Display name
1845
+ {
1846
+ $title = $title_head .
1847
+ wppa_setting_path( 'b', 'slide', 1, 17, wppa_switch( 'show_full_name' ) ? $yes : $no ) . ',&#013;' .
1848
+ wppa_setting_path( 'b', 'thumbs', 2, 1, wppa_switch( 'thumb_text_name' ) ? $yes : $no ) . ' ' . __( 'and' , 'wp-photo-album-plus' ) . '&#013;' .
1849
+ wppa_setting_path( 'b', 'lightbox', 1, 3, wppa_switch( 'ovl_name' ) ? $yes : $no ) . '.';
1850
 
1851
+ wppa_echo( '
1852
+ <div>
1853
+ <label
1854
+ for="showname">' .
1855
+ __( 'Show names:', 'wp-photo-album-plus' ) . '
1856
+ </label><br>
1857
+ <select
1858
+ id="showname"
1859
+ onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt0\', this )"
1860
+ title="' . esc_attr( $title ) . '">
1861
+ <option value="0"'.($disp_opt[0]=='0'?' selected': '').'>' . $def . '</option>
1862
+ <option value="1"'.($disp_opt[0]=='1'?' selected': '').'>' . $yes . '</option>
1863
+ <option value="-1"'.($disp_opt[0]=='-1'?' selected': '').'>' . $no . '</option>
1864
+ </select>
1865
+ </div>' );
1866
+ }
1867
 
1868
+ // Display description
1869
+ {
1870
+ $title = $title_head .
1871
+ wppa_setting_path( 'b', 'slide', 1, 20, wppa_switch( 'show_full_desc' ) ? $yes : $no ) . ',&#013;' .
1872
+ wppa_setting_path( 'b', 'thumbs', 2, 3, wppa_switch( 'thumb_text_desc' ) ? $yes : $no ) . ' ' . __( 'and' , 'wp-photo-album-plus' ) . '&#013;' .
1873
+ wppa_setting_path( 'b', 'lightbox', 1, 4, wppa_switch( 'ovl_desc' ) ? $yes : $no ) . '.';
1874
+
1875
+ wppa_echo( '
1876
+ <div>
1877
+ <label
1878
+ for="showdesc">' .
1879
+ __( 'Show descriptions:', 'wp-photo-album-plus' ) . '
1880
+ </label><br>
1881
+ <select
1882
+ id="showdesc"
1883
+ onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt1\', this )"
1884
+ title="' . esc_attr( $title ) . '" >
1885
+ <option value="0"'.($disp_opt[1]=='0'?' selected': '').'>' . $def . '</option>
1886
+ <option value="1"'.($disp_opt[1]=='1'?' selected': '').'>' . $yes . '</option>
1887
+ <option value="-1"'.($disp_opt[1]=='-1'?' selected': '').'>' . $no . '</option>
1888
+ </select>
1889
+ </div>' );
1890
+ }
1891
+
1892
+ // Display rating
1893
+ {
1894
+ $title = $title_head .
1895
+ wppa_setting_path( 'b', 'general', 1, 5, wppa_switch( 'rating_on' ) ? $yes : $no ) . ',&#013;' .
1896
+ wppa_setting_path( 'b', 'thumbs', 2, 3, wppa_switch( 'thumb_text_rating' ) ? $yes : $no ) . ' ' . __( 'and' , 'wp-photo-album-plus' ) . '&#013;' .
1897
+ wppa_setting_path( 'b', 'lightbox', 1, 5, wppa_switch( 'ovl_rating' ) ? $yes : $no ) . '.';
1898
+
1899
+ wppa_echo( '
1900
+ <div>
1901
+ <label
1902
+ for="showrating">' .
1903
+ __( 'Show rating:', 'wp-photo-album-plus' ) . '
1904
+ </label><br>
1905
+ <select
1906
+ id="showrating"
1907
+ onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt2\', this )"
1908
+ title="' . esc_attr( $title ) . '" >
1909
+ <option value="0"'.($disp_opt[2]=='0'?' selected': '').'>' . $def . '</option>
1910
+ <option value="1"'.($disp_opt[2]=='1'?' selected': '').'>' . $yes . '</option>
1911
+ <option value="-1"'.($disp_opt[2]=='-1'?' selected': '').'>' . $no . '</option>
1912
+ </select>
1913
+ </div>' );
1914
+ }
1915
+
1916
+ // Display comments
1917
+ {
1918
+ $title = $title_head .
1919
+ wppa_setting_path( 'b', 'general', 1, 4, wppa_switch( 'show_comments' ) ? $yes : $no ) . ' ' . __( 'and' , 'wp-photo-album-plus' ) . '&#013;' .
1920
+ wppa_setting_path( 'b', 'thumbs', 2, 4, wppa_switch( 'thumb_text_comcount' ) ? $yes : $no ) . '.';
1921
+
1922
+ wppa_echo( '
1923
+ <div>
1924
+ <label
1925
+ for="showcomments">' .
1926
+ __( 'Show comments:', 'wp-photo-album-plus' ) . '
1927
+ </label><br>
1928
+ <select
1929
+ id="showcomments"
1930
+ onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt3\', this )"
1931
+ title="' . esc_attr( $title ) . '" >
1932
+ <option value="0"'.($disp_opt[3]=='0'?' selected': '').'>' . $def . '</option>
1933
+ <option value="1"'.($disp_opt[3]=='1'?' selected': '').'>' . $yes . '</option>
1934
+ <option value="-1"'.($disp_opt[3]=='-1'?' selected': '').'>' . $no . '</option>
1935
+ </select>
1936
+ </div>' );
1937
+ }
1938
+
1939
+
1940
+ // End wppa-flex div
1941
+ wppa_echo( '</div>' );
1942
+
1943
+ // End Tab 5
1944
  wppa_echo( '
1945
  </div>' );
1946
 
1947
+
1948
  // End of outer details block
1949
  wppa_echo( '
1950
  </details>' );
3510
  }
3511
  }
3512
 
3513
+ // Subalbum order
3514
+ {
3515
+ $sel = ' selected';
3516
+ $opts = array(
3517
+ __( '--- default ---', 'wp-photo-album-plus' ),
3518
+ __( 'Random', 'wp-photo-album-plus' ),
3519
+ __( 'Order #', 'wp-photo-album-plus' ),
3520
+ __( 'Order # reverse', 'wp-photo-album-plus' ),
3521
+ __( 'Name', 'wp-photo-album-plus' ),
3522
+ __( 'Name reverse', 'wp-photo-album-plus' ),
3523
+ __( 'Timestamp', 'wp-photo-album-plus' ),
3524
+ __( 'Timestamp reverse', 'wp-photo-album-plus' ),
3525
+ );
3526
+ $vals = array( '0', '3', '1', '-1', '2', '-2', '5', '-5' );
3527
+
3528
+ $df = wppa_opt( 'list_albums_by' );
3529
+ if ( $df == '0' ) $dflt = __( 'not specified', 'wp-photo-album-plus' );
3530
+ else foreach( array_keys( $vals ) as $key ) {
3531
+ if ( $df == $vals[$key] ) {
3532
+ $dflt = $opts[$key];
3533
+ }
3534
+ }
3535
+ }
3536
+ $title = sprintf( __( 'The default is set in %s and is currently set to %s', 'wp-photo-album-plus' ), wppa_setting_path( 'b', 'misc', 1, 1 ), $dflt );
3537
+ $suba_order_by = wppa_get_album_item( $parent, 'suba_order_by' );
3538
+ $result = '
3539
+ <div style="margin-left:6px">
3540
+ <label
3541
+ for="subalbumorder">' .
3542
+ __( 'Subalbum sort order', 'wp-photo-album-plus' ) . '
3543
+ </label><br>
3544
+ <select
3545
+ id="subalbumorder"
3546
+ style="max-width:200px;"
3547
+ onchange="
3548
+ wppaAjaxUpdateAlbum( ' . $parent . ', \'suba_order_by\', this );
3549
+ var ord=Math.abs(jQuery(this).val());
3550
+ var dft=Math.abs(' . wppa_opt('wppa_list_albums_by') . ');
3551
+ if (ord == 1 || (ord == 0 && dft == 1)) {
3552
+ jQuery(\'#wppa-album-sequence\').show();
3553
+ }
3554
+ else {
3555
+ jQuery(\'#wppa-album-sequence\').hide();
3556
+ }"
3557
+ title="' . esc_attr( $title ) . '"
3558
+ >';
3559
+ for ( $i = 0; $i < 7; $i++ ) {
3560
+ $result .= '<option value="' . esc_attr( $vals[$i] ) . '" ' . ( $suba_order_by == $vals[$i] ? $sel : '' ) . ' >' . $opts[$i] . '</option>';
3561
+ }
3562
+ $result .= '
3563
+ </select>
3564
+ </div>';
3565
+ wppa_echo( $result );
3566
+
3567
  // Check album order
3568
  if ( $albumorder_col != 'a_order' ) {
3569
  if ( $parent == '0') {
3572
  esc_html__( 'You can edit top-level album sequence number here when you set the album sequence to "Order #" or "Order # desc" in Basic settings -> Misc -> I -> Item 1.' );
3573
  }
3574
  else {
3575
+ $result = '
3576
+ <br>' .
3577
  esc_html__( 'You can edit subalbum sequence number here when you set the album sequence to "Order #" or "Order # desc" in the "Subalbum sort order:" selection box above.' );
3578
  }
3579
  $result .= '<br>';
3580
 
3581
  wppa_echo( $result );
3582
+ // return;
3583
  }
3584
 
3585
+
3586
+
3587
  $result = '
3588
+ <div
3589
+ style="' . ( $albumorder_col != 'a_order' ? 'display:none' : '' ) . '"
3590
+ id="wppa-album-sequence"
3591
+ >
3592
  <h2 style="margin:1em">' .
3593
  __( 'Manage album order', 'wp-photo-album-plus' ) . '
3594
  -
3645
  </td>
3646
  </tr>
3647
  </tbody>
3648
+ </table>
3649
+ ';
3650
  wppa_echo( $result );
3651
 
3652
 
3908
  $result .= '
3909
  </div>
3910
  <div style="clear:both;"></div>
3911
+ </div>
3912
  </div>';
3913
 
3914
  wppa_echo( $result );
wppa-cache.php CHANGED
@@ -493,7 +493,7 @@ global $wpdb;
493
  <thead style="font-weight:bold">
494
  <tr>
495
  <td colspan="3" ><h3 style="margin:0.1em">' . __( 'File data', 'wp-photo-album-plus' ) . '</h3></td>
496
- <td colspan="4" style="border-left:1px solid #c3c4c7"><h3 style="margin:0.1em">' . __( 'Dependancies', 'wp-photo-album-plus' ) . '</h3></td>
497
  </tr>
498
  <tr>
499
  <td><b>' . __( 'Name', 'wp-photo-album-plus' ) . '</b></td>
493
  <thead style="font-weight:bold">
494
  <tr>
495
  <td colspan="3" ><h3 style="margin:0.1em">' . __( 'File data', 'wp-photo-album-plus' ) . '</h3></td>
496
+ <td colspan="4" style="border-left:1px solid #c3c4c7"><h3 style="margin:0.1em">' . __( 'Dependencies', 'wp-photo-album-plus' ) . '</h3></td>
497
  </tr>
498
  <tr>
499
  <td><b>' . __( 'Name', 'wp-photo-album-plus' ) . '</b></td>
wppa-functions.php CHANGED
@@ -3047,32 +3047,20 @@ function wppa_get_slide_desc( $id ) {
3047
 
3048
  function wppa_get_slide_name_a( $id ) {
3049
 
3050
- $name = '';
3051
- $fullname = '';
3052
  $alb = wppa_get_photo_item( $id, 'album' );
3053
  $disp = wppa_is_item_displayable( $alb, 'name', 'show_full_name' );
3054
 
3055
  if ( $disp && ( ! wppa( 'is_slideonly' ) || wppa( 'name_on' ) ) && ! wppa( 'is_filmonly' ) ) {
3056
  $name = esc_js( wppa_get_photo_name( $id ) );
3057
- if ( ! $name ) {
3058
- $name = '&nbsp;';
3059
- }
3060
- else {
3061
- $fullname = wppa_get_photo_name( $id, array( 'addowner' => wppa_switch( 'show_full_owner' ),
3062
- 'addmedal' => true,
3063
- 'escjs' => true,
3064
- 'showname' => true,
3065
- 'nobpdomain' => ( wppa_opt( 'art_monkey_link' ) != 'none' ),
3066
- ) );
3067
- }
3068
- if ( ! $fullname ) {
3069
- $fullname = '&nbsp;';
3070
- }
3071
- }
3072
- else {
3073
- $fullname = 'void';
3074
  }
3075
- $name;
3076
 
3077
  return array( 'name' => $name, 'fullname' => $fullname );
3078
  }
3047
 
3048
  function wppa_get_slide_name_a( $id ) {
3049
 
3050
+ $name = '&nbsp;';
3051
+ $fullname = '&nbsp;';
3052
  $alb = wppa_get_photo_item( $id, 'album' );
3053
  $disp = wppa_is_item_displayable( $alb, 'name', 'show_full_name' );
3054
 
3055
  if ( $disp && ( ! wppa( 'is_slideonly' ) || wppa( 'name_on' ) ) && ! wppa( 'is_filmonly' ) ) {
3056
  $name = esc_js( wppa_get_photo_name( $id ) );
3057
+ $fullname = wppa_get_photo_name( $id, array( 'addowner' => wppa_switch( 'show_full_owner' ),
3058
+ 'addmedal' => true,
3059
+ 'escjs' => true,
3060
+ 'showname' => true,
3061
+ 'nobpdomain' => ( wppa_opt( 'art_monkey_link' ) != 'none' ),
3062
+ ) );
 
 
 
 
 
 
 
 
 
 
 
3063
  }
 
3064
 
3065
  return array( 'name' => $name, 'fullname' => $fullname );
3066
  }
wppa-input.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains functions for sanitizing and formatting user input
6
- * Version 8.2.01.002
7
  *
8
  */
9
 
@@ -473,6 +473,6 @@ function wppa_get_cookie( $name, $default = '' ) {
473
  $result = $default;
474
  }
475
 
476
- wppa_log('obs', 'Cookie '.$name.' value '.$result);
477
  return $result;
478
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains functions for sanitizing and formatting user input
6
+ * Version 8.2.02.010
7
  *
8
  */
9
 
473
  $result = $default;
474
  }
475
 
476
+ // wppa_log('obs', 'Cookie '.$name.' value '.$result);
477
  return $result;
478
  }
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.2.02.009
7
  *
8
  */
9
 
@@ -678,9 +678,9 @@ function wppaToggleExif( id, count ) {
678
  <label>' .
679
  __( 'Id', 'wp-photo-album-plus' ) . '
680
  </label><br>
681
- <h4>' .
682
  strval( intval( $id ) ) . '
683
- </h4>
684
  </div>' .
685
 
686
  // Crypt
@@ -688,9 +688,9 @@ function wppaToggleExif( id, count ) {
688
  <label>' .
689
  __( 'Crypt', 'wp-photo-album-plus' ) . '
690
  </label><br>
691
- <h4>' .
692
  htmlspecialchars( $crypt ) . '
693
- </h4>
694
  </div>' .
695
 
696
  // Filename
@@ -698,9 +698,9 @@ function wppaToggleExif( id, count ) {
698
  <label>' .
699
  __( 'Filename', 'wp-photo-album-plus' ) . '
700
  </label><br>
701
- <h4>' .
702
  htmlspecialchars( $filename ) . '
703
- </h4>
704
  </div>' .
705
 
706
  // Upload
@@ -708,9 +708,9 @@ function wppaToggleExif( id, count ) {
708
  <label>' .
709
  __( 'Upload', 'wp-photo-album-plus' ) . '
710
  </label><br>
711
- <h4>' .
712
  htmlspecialchars( wppa_local_date( '', $timestamp ) ) . '
713
- </h4>
714
  </div>' );
715
 
716
  // Owner
@@ -720,9 +720,9 @@ function wppaToggleExif( id, count ) {
720
  <label>' .
721
  __( 'Owner', 'wp-photo-album-plus' ) . '
722
  </label><br>
723
- <h4>' .
724
  htmlspecialchars( $owner ) . '
725
- </h4>
726
  </div>' );
727
  }
728
 
@@ -738,9 +738,9 @@ function wppaToggleExif( id, count ) {
738
  <label>' .
739
  __( 'Album', 'wp-photo-album-plus' ) . '
740
  </label><br>
741
- <h4>' .
742
  htmlspecialchars( wppa_get_album_name( $album ) ) . '(' . strval( intval( $album ) ) . ')
743
- </h4>
744
  </div>' );
745
  }
746
 
@@ -754,9 +754,9 @@ function wppaToggleExif( id, count ) {
754
  <label>' .
755
  __( 'Modified', 'wp-photo-album-plus' ) . '
756
  </label><br>
757
- <h4>' .
758
  $txt . '
759
- </h4>
760
  </div>' );
761
  }
762
 
@@ -767,9 +767,9 @@ function wppaToggleExif( id, count ) {
767
  <label>' .
768
  __( 'EXIF Date', 'wp-photo-album-plus' ) . '
769
  </label><br>
770
- <h4>' .
771
  esc_html( $exifdtm ) . '
772
- </h4>
773
  </div>' );
774
  }
775
 
@@ -782,9 +782,9 @@ function wppaToggleExif( id, count ) {
782
  <label>' .
783
  __( 'Location:' , 'wp-photo-album-plus' ) . '
784
  </label>
785
- <h4>' .
786
  esc_html( $geo['0'].' '.$geo['1'].'. ' ) . '
787
- </h4>
788
  </div>' );
789
  }
790
 
@@ -795,9 +795,9 @@ function wppaToggleExif( id, count ) {
795
  <label>' .
796
  __( 'Photo sort order #:', 'wp-photo-album-plus' ) . '
797
  </label>
798
- <h4>' .
799
  $p_order . '
800
- </h4>
801
  </div>' );
802
  }
803
 
@@ -823,9 +823,9 @@ function wppaToggleExif( id, count ) {
823
  <label>' .
824
  $label . '
825
  </label>
826
- <h4>' .
827
  $value . '
828
- </h4>
829
  </div>' );
830
  }
831
 
@@ -837,9 +837,9 @@ function wppaToggleExif( id, count ) {
837
  <label>' .
838
  __( 'Dislikes', 'wp-photo-album-plus' ) . '
839
  </label>
840
- <h4>' .
841
  strval( intval( $dislikes ) ) . '
842
- </h4>
843
  </div>' );
844
  }
845
 
@@ -851,9 +851,9 @@ function wppaToggleExif( id, count ) {
851
  <label>' .
852
  __( 'Pending votes', 'wp-photo-album-plus' ) . '
853
  </label>
854
- <h4>' .
855
  strval( intval( $pending ) ) . '
856
- </h4>
857
  </div>' );
858
  }
859
 
@@ -864,9 +864,9 @@ function wppaToggleExif( id, count ) {
864
  <label>' .
865
  __( 'Views', 'wp-photo-album-plus' ) . '
866
  </label>
867
- <h4>' .
868
  strval( intval( $views ) ) . '
869
- </h4>
870
  </div>' );
871
  }
872
 
@@ -877,9 +877,9 @@ function wppaToggleExif( id, count ) {
877
  <label>' .
878
  __( 'Clicks', 'wp-photo-album-plus' ) . '
879
  </label>
880
- <h4>' .
881
  strval( intval( $clicks ) ) . '
882
- </h4>
883
  </div>' );
884
  }
885
 
@@ -890,9 +890,9 @@ function wppaToggleExif( id, count ) {
890
  <label>' .
891
  __( 'Downloads', 'wp-photo-album-plus' ) . '
892
  </label>
893
- <h4>' .
894
  strval( intval( $dlcount ) ) . '
895
- </h4>
896
  </div>' );
897
  }
898
 
@@ -911,9 +911,9 @@ function wppaToggleExif( id, count ) {
911
  <label>' .
912
  __( 'Status', 'wp-photo-album-plus' ) . '
913
  </label>
914
- <h4>' .
915
  $s . '
916
- </h4>
917
  </div>' );
918
  }
919
 
@@ -925,9 +925,9 @@ function wppaToggleExif( id, count ) {
925
  <label>' .
926
  __( 'Delete at', 'wp-photo-album-plus' ) . '
927
  </label>
928
- <h4>' .
929
  wppa_get_date_time_select_html( 'delphoto', $id, false ) . '
930
- </h4>
931
  </div>' );
932
  }
933
  }
@@ -950,9 +950,9 @@ function wppaToggleExif( id, count ) {
950
  <label>' .
951
  __( 'Document file', 'wp-photo-album-plus' ) . '
952
  </label><br>
953
- <h4>' .
954
  $fs . '
955
- </h4>
956
  </div>' );
957
  }
958
 
@@ -979,9 +979,9 @@ function wppaToggleExif( id, count ) {
979
  <label>' .
980
  __( 'Source file', 'wp-photo-album-plus' ) . '
981
  </label><br>
982
- <h4>' .
983
  $txt . '
984
- </h4>
985
  </div>' );
986
 
987
  // Display
@@ -1009,9 +1009,9 @@ function wppaToggleExif( id, count ) {
1009
  <label>' .
1010
  $lbl . '
1011
  </label><br>
1012
- <h4>' .
1013
  $txt . '
1014
- </h4>
1015
  </div>' );
1016
 
1017
  // Thumbnail
@@ -1041,9 +1041,9 @@ function wppaToggleExif( id, count ) {
1041
  <label>' .
1042
  $lbl . '
1043
  </label><br>
1044
- <h4>' .
1045
  $txt . '
1046
- </h4>
1047
  </div>' );
1048
  }
1049
 
@@ -1081,9 +1081,9 @@ function wppaToggleExif( id, count ) {
1081
  <label>' .
1082
  $lbl . '
1083
  </label><br>
1084
- <h4>' .
1085
  $txt . '
1086
- </h4>
1087
  </div>' );
1088
  }
1089
 
@@ -1137,9 +1137,9 @@ function wppaToggleExif( id, count ) {
1137
  <label>' .
1138
  $lbl . '
1139
  </label><br>
1140
- <h4>' .
1141
  $txt . '
1142
- </h4>
1143
  </div>' );
1144
  }
1145
 
@@ -1153,9 +1153,9 @@ function wppaToggleExif( id, count ) {
1153
  <label>' .
1154
  __( 'Formats', 'wp-photo-album-plus' ) . '
1155
  </label><br>
1156
- <h4>' .
1157
  $txt . '
1158
- </h4>
1159
  </div>' );
1160
  }
1161
 
@@ -1170,9 +1170,9 @@ function wppaToggleExif( id, count ) {
1170
  <label>' .
1171
  __( 'Formats', 'wp-photo-album-plus' ) . '
1172
  </label><br>
1173
- <h4>' .
1174
  $txt . '
1175
- </h4>
1176
  </div>' );
1177
  }
1178
 
@@ -1336,7 +1336,7 @@ function wppaToggleExif( id, count ) {
1336
  // Stereo
1337
  if ( wppa_switch( 'enable_stereo' ) && ! $is_multi ) {
1338
  wppa_echo( '
1339
- <div>
1340
  <label
1341
  for="stereo-' . $id . '">' .
1342
  __( 'Stereophoto', 'wp-photo-album-plus' ) . '
@@ -1447,7 +1447,7 @@ function wppaToggleExif( id, count ) {
1447
  $can_remove = ( wppa_opt( 'watermark_file' ) == '--- none ---' ) ? '1' : '0';
1448
  if ( wppa_switch( 'watermark_user' ) || current_user_can( 'wppa_settings' ) ) {
1449
  wppa_echo( '
1450
- <div>
1451
  <label
1452
  for="wmfsel_' . $id . '">' .
1453
  __( 'Watermark', 'wp-photo-album-plus' ) . '
@@ -1774,7 +1774,7 @@ function wppaToggleExif( id, count ) {
1774
 
1775
  <table
1776
  class="wppa-table wppa-photo-table"
1777
- style="border:1px solid lightgray;margin:2px 20px 20px 0"
1778
  >
1779
  <tbody>
1780
  <tr>
@@ -2028,7 +2028,7 @@ function wppaToggleExif( id, count ) {
2028
  // Set cropbox aspect ratio
2029
  $ratio = ( $photoy ? ( $photox / $photoy ) : 'NaN' );
2030
  $dflt = wppa_opt( 'image_magick_ratio' );
2031
- wppa_log('obs', 'default = '.wppa_opt( 'image_magick_ratio' ));
2032
  wppa_echo( '
2033
  <select
2034
  onchange="wppaCropper[' . $id . '].setAspectRatio(this.value)"
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
+ * Version 8.2.02.010
7
  *
8
  */
9
 
678
  <label>' .
679
  __( 'Id', 'wp-photo-album-plus' ) . '
680
  </label><br>
681
+ <div class="wppa-ldi">' .
682
  strval( intval( $id ) ) . '
683
+ </div>
684
  </div>' .
685
 
686
  // Crypt
688
  <label>' .
689
  __( 'Crypt', 'wp-photo-album-plus' ) . '
690
  </label><br>
691
+ <div class="wppa-ldi">' .
692
  htmlspecialchars( $crypt ) . '
693
+ </div>
694
  </div>' .
695
 
696
  // Filename
698
  <label>' .
699
  __( 'Filename', 'wp-photo-album-plus' ) . '
700
  </label><br>
701
+ <div class="wppa-ldi">' .
702
  htmlspecialchars( $filename ) . '
703
+ </div>
704
  </div>' .
705
 
706
  // Upload
708
  <label>' .
709
  __( 'Upload', 'wp-photo-album-plus' ) . '
710
  </label><br>
711
+ <div class="wppa-ldi">' .
712
  htmlspecialchars( wppa_local_date( '', $timestamp ) ) . '
713
+ </div>
714
  </div>' );
715
 
716
  // Owner
720
  <label>' .
721
  __( 'Owner', 'wp-photo-album-plus' ) . '
722
  </label><br>
723
+ <div class="wppa-ldi">' .
724
  htmlspecialchars( $owner ) . '
725
+ </div>
726
  </div>' );
727
  }
728
 
738
  <label>' .
739
  __( 'Album', 'wp-photo-album-plus' ) . '
740
  </label><br>
741
+ <div class="wppa-ldi">' .
742
  htmlspecialchars( wppa_get_album_name( $album ) ) . '(' . strval( intval( $album ) ) . ')
743
+ </div>
744
  </div>' );
745
  }
746
 
754
  <label>' .
755
  __( 'Modified', 'wp-photo-album-plus' ) . '
756
  </label><br>
757
+ <div class="wppa-ldi">' .
758
  $txt . '
759
+ </div>
760
  </div>' );
761
  }
762
 
767
  <label>' .
768
  __( 'EXIF Date', 'wp-photo-album-plus' ) . '
769
  </label><br>
770
+ <div class="wppa-ldi">' .
771
  esc_html( $exifdtm ) . '
772
+ </div>
773
  </div>' );
774
  }
775
 
782
  <label>' .
783
  __( 'Location:' , 'wp-photo-album-plus' ) . '
784
  </label>
785
+ <div class="wppa-ldi">' .
786
  esc_html( $geo['0'].' '.$geo['1'].'. ' ) . '
787
+ </div>
788
  </div>' );
789
  }
790
 
795
  <label>' .
796
  __( 'Photo sort order #:', 'wp-photo-album-plus' ) . '
797
  </label>
798
+ <div class="wppa-ldi">' .
799
  $p_order . '
800
+ </div>
801
  </div>' );
802
  }
803
 
823
  <label>' .
824
  $label . '
825
  </label>
826
+ <div class="wppa-ldi">' .
827
  $value . '
828
+ </div>
829
  </div>' );
830
  }
831
 
837
  <label>' .
838
  __( 'Dislikes', 'wp-photo-album-plus' ) . '
839
  </label>
840
+ <div class="wppa-ldi">' .
841
  strval( intval( $dislikes ) ) . '
842
+ </div>
843
  </div>' );
844
  }
845
 
851
  <label>' .
852
  __( 'Pending votes', 'wp-photo-album-plus' ) . '
853
  </label>
854
+ <div class="wppa-ldi">' .
855
  strval( intval( $pending ) ) . '
856
+ </div>
857
  </div>' );
858
  }
859
 
864
  <label>' .
865
  __( 'Views', 'wp-photo-album-plus' ) . '
866
  </label>
867
+ <div class="wppa-ldi">' .
868
  strval( intval( $views ) ) . '
869
+ </div>
870
  </div>' );
871
  }
872
 
877
  <label>' .
878
  __( 'Clicks', 'wp-photo-album-plus' ) . '
879
  </label>
880
+ <div class="wppa-ldi">' .
881
  strval( intval( $clicks ) ) . '
882
+ </div>
883
  </div>' );
884
  }
885
 
890
  <label>' .
891
  __( 'Downloads', 'wp-photo-album-plus' ) . '
892
  </label>
893
+ <div class="wppa-ldi">' .
894
  strval( intval( $dlcount ) ) . '
895
+ </div>
896
  </div>' );
897
  }
898
 
911
  <label>' .
912
  __( 'Status', 'wp-photo-album-plus' ) . '
913
  </label>
914
+ <div class="wppa-ldi">' .
915
  $s . '
916
+ </div>
917
  </div>' );
918
  }
919
 
925
  <label>' .
926
  __( 'Delete at', 'wp-photo-album-plus' ) . '
927
  </label>
928
+ <div class="wppa-ldi">' .
929
  wppa_get_date_time_select_html( 'delphoto', $id, false ) . '
930
+ </div>
931
  </div>' );
932
  }
933
  }
950
  <label>' .
951
  __( 'Document file', 'wp-photo-album-plus' ) . '
952
  </label><br>
953
+ <div class="wppa-ldi">' .
954
  $fs . '
955
+ </div>
956
  </div>' );
957
  }
958
 
979
  <label>' .
980
  __( 'Source file', 'wp-photo-album-plus' ) . '
981
  </label><br>
982
+ <div class="wppa-ldi">' .
983
  $txt . '
984
+ </div>
985
  </div>' );
986
 
987
  // Display
1009
  <label>' .
1010
  $lbl . '
1011
  </label><br>
1012
+ <div class="wppa-ldi">' .
1013
  $txt . '
1014
+ </div>
1015
  </div>' );
1016
 
1017
  // Thumbnail
1041
  <label>' .
1042
  $lbl . '
1043
  </label><br>
1044
+ <div class="wppa-ldi">' .
1045
  $txt . '
1046
+ </div>
1047
  </div>' );
1048
  }
1049
 
1081
  <label>' .
1082
  $lbl . '
1083
  </label><br>
1084
+ <div class="wppa-ldi">' .
1085
  $txt . '
1086
+ </div>
1087
  </div>' );
1088
  }
1089
 
1137
  <label>' .
1138
  $lbl . '
1139
  </label><br>
1140
+ <div class="wppa-ldi">' .
1141
  $txt . '
1142
+ </div>
1143
  </div>' );
1144
  }
1145
 
1153
  <label>' .
1154
  __( 'Formats', 'wp-photo-album-plus' ) . '
1155
  </label><br>
1156
+ <div class="wppa-ldi">' .
1157
  $txt . '
1158
+ </div>
1159
  </div>' );
1160
  }
1161
 
1170
  <label>' .
1171
  __( 'Formats', 'wp-photo-album-plus' ) . '
1172
  </label><br>
1173
+ <div class="wppa-ldi">' .
1174
  $txt . '
1175
+ </div>
1176
  </div>' );
1177
  }
1178
 
1336
  // Stereo
1337
  if ( wppa_switch( 'enable_stereo' ) && ! $is_multi ) {
1338
  wppa_echo( '
1339
+ <div style="max-width:250px;">
1340
  <label
1341
  for="stereo-' . $id . '">' .
1342
  __( 'Stereophoto', 'wp-photo-album-plus' ) . '
1447
  $can_remove = ( wppa_opt( 'watermark_file' ) == '--- none ---' ) ? '1' : '0';
1448
  if ( wppa_switch( 'watermark_user' ) || current_user_can( 'wppa_settings' ) ) {
1449
  wppa_echo( '
1450
+ <div style="max-width:250px;">
1451
  <label
1452
  for="wmfsel_' . $id . '">' .
1453
  __( 'Watermark', 'wp-photo-album-plus' ) . '
1774
 
1775
  <table
1776
  class="wppa-table wppa-photo-table"
1777
+ style="border:1px solid lightgray;margin:2px 20px 20px 0;background-color:#ccc;"
1778
  >
1779
  <tbody>
1780
  <tr>
2028
  // Set cropbox aspect ratio
2029
  $ratio = ( $photoy ? ( $photox / $photoy ) : 'NaN' );
2030
  $dflt = wppa_opt( 'image_magick_ratio' );
2031
+
2032
  wppa_echo( '
2033
  <select
2034
  onchange="wppaCropper[' . $id . '].setAspectRatio(this.value)"
wppa-scripts.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * This file contains all functions for activating javascript
6
  *
7
- * Version 8.2.02.008
8
  */
9
 
10
  // Place all wppa related js declarations in the header, both admin and frontend
@@ -243,7 +243,7 @@ global $wpdb;
243
  wppaUploadToThisAlbum = "' . esc_js( __( 'Upload to this album', 'wp-photo-album-plus' ) ) . '",
244
  wppaCloseText = "' . esc_js( __( 'Close!', 'wp-photo-album-plus' ) ) . '",
245
  wppaCropper = [],';
246
-
247
  /* ImageMagick */
248
  $result .= '
249
  wppaImageMagickDefaultAspect = "' . wppa_opt( 'image_magick_ratio' ) . '",';
@@ -454,7 +454,27 @@ global $wpdb;
454
  wppaTxtProcessing = "'.__('Processing...', 'wp-photo-album-plus' ).'",
455
  wppaTxtDone = "'.__('Done!', 'wp-photo-album-plus' ).'",
456
  wppaTxtErrUnable = "'.__( 'ERROR: unable to upload files.', 'wp-photo-album-plus' ).'",
457
- wppaOutputType = "' . wppa_opt( 'photo_shortcode_fe_type' ) . '";';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
458
 
459
  // Tinymce photo
460
  if ( wppa_switch( 'photo_shortcode_enabled' ) ) {
@@ -487,38 +507,6 @@ global $wpdb;
487
  $result = wppa_compress_js( $result );
488
  wp_add_inline_script('jquery-core', $result);
489
  wp_add_inline_script('wppa-admin', $result);
490
- /*
491
- $result = '
492
- <!-- wppa js inits -->
493
- <script>
494
- ' . $result . '
495
- </script>
496
- <!-- End wppa js inits -->
497
- ';
498
- echo $result;
499
- /* */
500
-
501
- // Texts for block activations
502
- $the_js = '
503
- var
504
- wppaTextSlideshow = "' . __( 'WPPA+ Slideshow', 'wp-photo-album-plus' ) . '",
505
- wppaTextSimpleSlideshow = "' . __( 'WPPA Simple slideshow', 'wp-photo-album-plus' ) . '",
506
- wppaTextEnterWidgetCaption = "' . __( 'Enter widget caption', 'wp-photo-album-plus' ) . '",
507
- wppaTextSelectAlbum = "' . __( 'Select the album for the slideshow', 'wp-photo-album-plus' ) . '",
508
- wppaTextAddFilmstrip = "' . __( 'Add filmstrip', 'wp-photo-album-plus' ) . '",
509
- wppaTextCacheThisBlock = "' . __( 'Cache this block', 'wp-photo-album-plus' ) . '",
510
- wppaTextCacheUsesSmart = "' . __( 'Cache uses WPPA embedded smart cache', 'wp-photo-album-plus' ) . '",
511
- wppaTextCorrShortcode = "' . __( 'Corresponding shortcode', 'wp-photo-album-plus' ) . '",
512
- wppaTextLastAlbumAdded = "' . __( '--- The last added album ---', 'wp-photo-album-plus' ) . '",
513
- wppaTextAlbumSelect = "' . __( '--- A selectionbox with all albums the user may upload to ---', 'wp-photo-album-plus' ) . '",
514
- wppaTextUploadForm = "' . __( 'WPPA Upload form', 'wp-photo-album-plus' ) . '",
515
- wppaTextUploadHelp = "' . __( 'If you want to limit uploads to a specific album, select it here', 'wp-photo-album-plus' ) . '"
516
- wppaTextLoginOnly = "' . __( 'Show to logged in users only?', 'wp-photo-album-plus' ) . '",
517
- wppaTextAdminOnly = "' . __( 'Show to admin only?', 'wp-photo-album-plus' ) . '",
518
- wppaTextUpload = "' . __( 'WPPA+ upload', 'wp-photo-album-plus' ) . '",
519
- wppaTextPotd = "' . __( 'WPPA+ Potd', 'wp-photo-album-plus' ) . '",
520
- wppaTextPhotoOfTheDay = "' . __( 'WPPA Photo of the day','wp-photo-album-plus' ) . '"';
521
- wp_add_inline_script( 'wppa-admin', $the_js );
522
 
523
  }
524
  add_action( 'wp_head', 'wppa_initialize_javascript', 2 );
4
  *
5
  * This file contains all functions for activating javascript
6
  *
7
+ * Version 8.2.02.010
8
  */
9
 
10
  // Place all wppa related js declarations in the header, both admin and frontend
243
  wppaUploadToThisAlbum = "' . esc_js( __( 'Upload to this album', 'wp-photo-album-plus' ) ) . '",
244
  wppaCloseText = "' . esc_js( __( 'Close!', 'wp-photo-album-plus' ) ) . '",
245
  wppaCropper = [],';
246
+
247
  /* ImageMagick */
248
  $result .= '
249
  wppaImageMagickDefaultAspect = "' . wppa_opt( 'image_magick_ratio' ) . '",';
454
  wppaTxtProcessing = "'.__('Processing...', 'wp-photo-album-plus' ).'",
455
  wppaTxtDone = "'.__('Done!', 'wp-photo-album-plus' ).'",
456
  wppaTxtErrUnable = "'.__( 'ERROR: unable to upload files.', 'wp-photo-album-plus' ).'",
457
+ wppaOutputType = "' . wppa_opt( 'photo_shortcode_fe_type' ) . '",';
458
+
459
+ // Block editor
460
+ $result .= '
461
+ wppaTextSlideshow = "' . __( 'WPPA+ Slideshow', 'wp-photo-album-plus' ) . '",
462
+ wppaTextSimpleSlideshow = "' . __( 'WPPA Simple slideshow', 'wp-photo-album-plus' ) . '",
463
+ wppaTextEnterWidgetCaption = "' . __( 'Enter widget caption', 'wp-photo-album-plus' ) . '",
464
+ wppaTextSelectAlbum = "' . __( 'Select the album for the slideshow', 'wp-photo-album-plus' ) . '",
465
+ wppaTextAddFilmstrip = "' . __( 'Add filmstrip', 'wp-photo-album-plus' ) . '",
466
+ wppaTextCacheThisBlock = "' . __( 'Cache this block', 'wp-photo-album-plus' ) . '",
467
+ wppaTextCacheUsesSmart = "' . __( 'Cache uses WPPA embedded smart cache', 'wp-photo-album-plus' ) . '",
468
+ wppaTextCorrShortcode = "' . __( 'Corresponding shortcode', 'wp-photo-album-plus' ) . '",
469
+ wppaTextLastAlbumAdded = "' . __( '--- The last added album ---', 'wp-photo-album-plus' ) . '",
470
+ wppaTextAlbumSelect = "' . __( '--- A selectionbox with all albums the user may upload to ---', 'wp-photo-album-plus' ) . '",
471
+ wppaTextUploadForm = "' . __( 'WPPA Upload form', 'wp-photo-album-plus' ) . '",
472
+ wppaTextUploadHelp = "' . __( 'If you want to limit uploads to a specific album, select it here', 'wp-photo-album-plus' ) . '",
473
+ wppaTextLoginOnly = "' . __( 'Show to logged in users only?', 'wp-photo-album-plus' ) . '",
474
+ wppaTextAdminOnly = "' . __( 'Show to admin only?', 'wp-photo-album-plus' ) . '",
475
+ wppaTextUpload = "' . __( 'WPPA+ upload', 'wp-photo-album-plus' ) . '",
476
+ wppaTextPotd = "' . __( 'WPPA+ Potd', 'wp-photo-album-plus' ) . '",
477
+ wppaTextPhotoOfTheDay = "' . __( 'WPPA Photo of the day','wp-photo-album-plus' ) . '",';
478
 
479
  // Tinymce photo
480
  if ( wppa_switch( 'photo_shortcode_enabled' ) ) {
507
  $result = wppa_compress_js( $result );
508
  wp_add_inline_script('jquery-core', $result);
509
  wp_add_inline_script('wppa-admin', $result);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
510
 
511
  }
512
  add_action( 'wp_head', 'wppa_initialize_javascript', 2 );
wppa-stats-widget.php CHANGED
@@ -166,14 +166,14 @@ class WppaStatsWidget extends WP_Widget {
166
  wppa_widget_checkbox( $this,
167
  'ip',
168
  $instance['ip'],
169
- __( 'Show IP address', 'wp-photo-album-plus' ),
170
  );
171
 
172
  // Ip
173
  wppa_widget_checkbox( $this,
174
  'browser',
175
  $instance['browser'],
176
- __( 'Show browser', 'wp-photo-album-plus' ),
177
  );
178
 
179
  wppa_echo( '</fieldset>
166
  wppa_widget_checkbox( $this,
167
  'ip',
168
  $instance['ip'],
169
+ __( 'Show IP address', 'wp-photo-album-plus' )
170
  );
171
 
172
  // Ip
173
  wppa_widget_checkbox( $this,
174
  'browser',
175
  $instance['browser'],
176
+ __( 'Show browser', 'wp-photo-album-plus' )
177
  );
178
 
179
  wppa_echo( '</fieldset>
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.2.02.009
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.2.02.009'; // WPPA software version
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.2.03.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.2.03.001'; // WPPA software version
28
  global $wppa_revno;
29
  $wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
30