WP Photo Album Plus - Version 8.1.09.004

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.1.09.004
Comparing to
See all releases

Code changes from version 8.1.09.003 to 8.1.09.004

wppa-admin-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * gp admin functions
6
- * Version 8.1.09.001
7
  *
8
  */
9
 
@@ -571,20 +571,20 @@ function wppa_admin_page_links( $curpage, $pagesize, $count, $link, $extra = ''
571
 
572
  $result = '';
573
  if ( $npages > '1' ) {
574
- $result .= '<div style="line-height:1.5em" >';
575
  if ( $curpage != '1' ) {
576
- $result .= '<a href="' . esc_url( $prevurl ) . ' ">' . esc_html__( 'Prev page', 'wp-photo-album-plus' ) . '</a>';
577
  }
578
 
579
- $result .= '<select onchange="document.location = jQuery( this ).val()" >';
580
 
581
  $i = '1';
582
  while ( $i <= $npages ) {
583
  if ( $i == $curpage ) {
584
- $result .= '<option selected >' . $i . '</option>';
585
  }
586
  else {
587
- $result .= '<option value="' . esc_url( $pagurl . $i . $extra ) . '"' . ( $i == $npages ? ' title="' . esc_attr( $lastpagecount ) . '"' : '' ) . ' >' . $i . '</option>';
588
  }
589
  $i++;
590
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * gp admin functions
6
+ * Version 8.1.09.004
7
  *
8
  */
9
 
571
 
572
  $result = '';
573
  if ( $npages > '1' ) {
574
+ $result .= '<div style="line-height:1.5em">';
575
  if ( $curpage != '1' ) {
576
+ $result .= '<a href="' . esc_url( $prevurl ) . '">' . esc_html__( 'Prev page', 'wp-photo-album-plus' ) . '</a>';
577
  }
578
 
579
+ $result .= '<select onchange="document.location=jQuery(this).val()">';
580
 
581
  $i = '1';
582
  while ( $i <= $npages ) {
583
  if ( $i == $curpage ) {
584
+ $result .= '<option selected>' . $i . '</option>';
585
  }
586
  else {
587
+ $result .= '<option value="' . esc_url( $pagurl . $i . $extra ) . '"' . ( $i == $npages ? ' title="' . esc_attr( $lastpagecount ) . '"' : '' ) . '>' . $i . '</option>';
588
  }
589
  $i++;
590
  }
wppa-album-admin-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
- * Version 8.1.09.003
7
  *
8
  */
9
 
@@ -622,13 +622,13 @@ global $wppa_revno;
622
  <select
623
  onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'status\', this )"
624
  title="' . esc_attr( $title ) . '" >
625
- <option value="publish"' . ( $status == 'publish' ? ' selected' : '' ) . ' >' .
626
  __( 'Publish', 'wp-photo-album-plus' ) . '
627
  </option>
628
- <option value="private"' . ( $status == 'private' ? ' selected' : '' ) . ' >' .
629
  __( 'Private', 'wp-photo-album-plus' ) . '
630
  </option>
631
- <option value="hidden"' . ( $status == 'hidden' ? ' selected' : '' ) . ' >' .
632
  __( 'Hidden', 'wp-photo-album-plus' ) . '
633
  </option>
634
  </select>&nbsp;';
@@ -732,7 +732,7 @@ global $wppa_revno;
732
  >';
733
  foreach ( array_keys( $options ) as $key ) {
734
  $sel = $values[$key] == $p_order_by ? ' selected' : '';
735
- $result .= '<option value="' . $values[$key] . '"' . $sel . ' >' . $options[$key] . '</option>';
736
  }
737
  $result .= '
738
  </select>&nbsp;';
@@ -903,9 +903,9 @@ global $wppa_revno;
903
  $result .=
904
  __( 'Photos are zoomable:', 'wp-photo-album-plus' ) . '
905
  <select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'zoomable\', this )" title="' . esc_attr( $title ) . '" >
906
- <option value="" '.($zoomable==''?'selected': '').' >' . $def . '</option>
907
- <option value="on" '.($zoomable=='on'?'selected': '').'>' . $yes . '</option>
908
- <option value="off" '.($zoomable=='off'?'selected': '').'>' . $no . '</option>
909
  </select> ';
910
 
911
  // Overrulable display options / next 4 items
@@ -925,9 +925,9 @@ global $wppa_revno;
925
  $result .=
926
  __( 'Display photo names:', 'wp-photo-album-plus' ) . '
927
  <select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt0\', this )" title="' . esc_attr( $title ) . '" >
928
- <option value="0" '.($disp_opt[0]=='0'?'selected': '').' >' . $def . '</option>
929
- <option value="1" '.($disp_opt[0]=='1'?'selected': '').'>' . $yes . '</option>
930
- <option value="-1" '.($disp_opt[0]=='-1'?'selected': '').'>' . $no . '</option>
931
  </select>';
932
 
933
  // Display description
@@ -937,9 +937,9 @@ global $wppa_revno;
937
  $result .=
938
  __( 'Display photo descriptions:', 'wp-photo-album-plus' ) . '
939
  <select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt1\', this )" title="' . esc_attr( $title ) . '" >
940
- <option value="0" '.($disp_opt[1]=='0'?'selected': '').' >' . $def . '</option>
941
- <option value="1" '.($disp_opt[1]=='1'?'selected': '').'>' . $yes . '</option>
942
- <option value="-1" '.($disp_opt[1]=='-1'?'selected': '').'>' . $no . '</option>
943
  </select>';
944
 
945
  // Display rating
@@ -949,9 +949,9 @@ global $wppa_revno;
949
  $result .=
950
  __( 'Display rating:', 'wp-photo-album-plus' ) . '
951
  <select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt2\', this )" title="' . esc_attr( $title ) . '" >
952
- <option value="0" '.($disp_opt[2]=='0'?'selected': '').' >' . $def . '</option>
953
- <option value="1" '.($disp_opt[2]=='1'?'selected': '').'>' . $yes . '</option>
954
- <option value="-1" '.($disp_opt[2]=='-1'?'selected': '').'>' . $no . '</option>
955
  </select>';
956
 
957
  // Display comments
@@ -961,9 +961,9 @@ global $wppa_revno;
961
  $result .=
962
  __( 'Display comments:', 'wp-photo-album-plus' ) . '
963
  <select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt3\', this )" title="' . esc_attr( $title ) . '" >
964
- <option value="0" '.($disp_opt[3]=='0'?'selected': '').' >' . $def . '</option>
965
- <option value="1" '.($disp_opt[3]=='1'?'selected': '').'>' . $yes . '</option>
966
- <option value="-1" '.($disp_opt[3]=='-1'?'selected': '').'>' . $no . '</option>
967
  </select>';
968
 
969
  // Watermark
@@ -1009,11 +1009,10 @@ global $wppa_revno;
1009
 
1010
  // Status
1011
  $result .= '<br>' .
1012
- __( 'Remark', 'wp-photo-album-plus' ) . ':&nbsp;
1013
  <span
1014
  id="albumstatus-' . $id . '"
1015
- style="font-weight:bold;color:#00AA00;"
1016
- >' .
1017
  esc_html( $remark ) . '
1018
  </span>';
1019
 
@@ -1264,8 +1263,7 @@ global $wppa_revno;
1264
  $result .= '
1265
  <option
1266
  value="' . $page['ID'] . '"' .
1267
- ( $linkpage == $page['ID'] ? ' selected' : '' ) .
1268
- ' >' .
1269
  __( htmlspecialchars( $page['post_title'] ) ) .
1270
  ( $page['post_type'] == 'post' ? ' (' . htmlspecialchars( $page['post_date'] ) . ')' : '' ) .
1271
  '</option>';
@@ -1514,11 +1512,11 @@ global $wppa_revno;
1514
  value="' . esc_attr( __('Set all to panorama', 'wp-photo-album-plus' ) ).':"
1515
  />
1516
 
1517
- <select id="pano-opt" >
1518
- <option value="9" disabled selected >' . __( 'Select a mode', 'wp-photo-album-plus' ) . '</option>
1519
- <option value="0" >' . __( '- none -', 'wp-photo-album-plus' ) . '</option>
1520
- <option value="1" >' . __( '360&deg; Spheric', 'wp-photo-album-plus' ) . '</option>
1521
- <option value="2" >' . __( 'Non 360&deg; Flat', 'wp-photo-album-plus' ) . '</option>
1522
  </select>';
1523
  }
1524
 
@@ -1806,7 +1804,7 @@ global $wppa_revno;
1806
  $result .= '
1807
  <option value="" ></option>';
1808
  foreach( $opts as $opt ) {
1809
- $result .= '<option value="' . $opt . '" ' . ( $f == $opt ? 'selected ' : '' ) . '>' . $opt . '</option>';
1810
  }
1811
  $result .=
1812
  '</select>';
@@ -2919,31 +2917,31 @@ global $wpdb;
2919
  }
2920
 
2921
  $output .= '
2922
- <option value="0" ' . ( $cur == '0' ? 'selected' : '' ) . '>' .
2923
  __( '--- default ---', 'wp-photo-album-plus' ) . '
2924
  </option>
2925
- <option value="-9" ' . ( $cur == '-9' ? 'selected' : '' ) . '>' .
2926
  __( '--- random ---', 'wp-photo-album-plus' ) . '
2927
  </option>
2928
- <option value="-1" ' . ( $cur == '-1' ? 'selected' : '' ) . '>' .
2929
  __( '--- random featured ---', 'wp-photo-album-plus' ) . '
2930
  </option>
2931
- <option value="-2" ' . ( $cur == '-2' ? 'selected' : '' ) . '>' .
2932
  __( '--- most recent added ---', 'wp-photo-album-plus' ) . '
2933
  </option>
2934
- <option value="-3" ' . ( $cur == '-3' ? 'selected' : '' ) . '>' .
2935
  __( '--- random from (grand)children ---', 'wp-photo-album-plus' ) . '
2936
  </option>
2937
- <option value="-4" ' . ( $cur == '-4' ? 'selected' : '' ) . '>' .
2938
  __( '--- most recent from (grand)children ---', 'wp-photo-album-plus' ) . '
2939
  </option>
2940
- <option value="-5" ' . ( $cur == '-5' ? 'selected' : '' ) . '>' .
2941
  __( '--- according to albums photo sequence ---', 'wp-photo-album-plus' ) . '
2942
  </option>';
2943
 
2944
  if ( ! empty($photos) ) foreach($photos as $photo) {
2945
  if ($cur == $photo['id']) {
2946
- $selected = 'selected';
2947
  }
2948
  else {
2949
  $selected = '';
@@ -2951,7 +2949,7 @@ global $wpdb;
2951
  $name = __(stripslashes($photo['name']), 'wp-photo-album-plus' );
2952
  if ( strlen($name) > 45 ) $name = substr($name, 0, 45).'...';
2953
  if ( ! $name ) $name = __('Nameless, filename = ', 'wp-photo-album-plus' ).$photo['filename'];
2954
- $output .= '<option value="'.$photo['id'].'" '.$selected.'>'.$name.'</option>';
2955
  }
2956
 
2957
  $output .= '
@@ -3039,11 +3037,11 @@ global $wpdb;
3039
  if ( $parent == '0') {
3040
  $result = '
3041
  <br>' .
3042
- __( '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.' );
3043
  }
3044
  else {
3045
  $result =
3046
- __( 'You can edit sub-album sequence number here when you set the album sequence to "Order #" or "Order # desc" in the "Sub album sort order:" selection box above.' );
3047
  }
3048
  $result .= '<br>';
3049
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
+ * Version 8.1.09.004
7
  *
8
  */
9
 
622
  <select
623
  onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'status\', this )"
624
  title="' . esc_attr( $title ) . '" >
625
+ <option value="publish"' . ( $status == 'publish' ? ' selected' : '' ) . '>' .
626
  __( 'Publish', 'wp-photo-album-plus' ) . '
627
  </option>
628
+ <option value="private"' . ( $status == 'private' ? ' selected' : '' ) . '>' .
629
  __( 'Private', 'wp-photo-album-plus' ) . '
630
  </option>
631
+ <option value="hidden"' . ( $status == 'hidden' ? ' selected' : '' ) . '>' .
632
  __( 'Hidden', 'wp-photo-album-plus' ) . '
633
  </option>
634
  </select>&nbsp;';
732
  >';
733
  foreach ( array_keys( $options ) as $key ) {
734
  $sel = $values[$key] == $p_order_by ? ' selected' : '';
735
+ $result .= '<option value="' . $values[$key] . '"' . $sel . '>' . $options[$key] . '</option>';
736
  }
737
  $result .= '
738
  </select>&nbsp;';
903
  $result .=
904
  __( 'Photos are zoomable:', 'wp-photo-album-plus' ) . '
905
  <select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'zoomable\', this )" title="' . esc_attr( $title ) . '" >
906
+ <option value=""'.($zoomable==''?' selected': '').'>' . $def . '</option>
907
+ <option value="on"'.($zoomable=='on'?' selected': '').'>' . $yes . '</option>
908
+ <option value="off"'.($zoomable=='off'?' selected': '').'>' . $no . '</option>
909
  </select> ';
910
 
911
  // Overrulable display options / next 4 items
925
  $result .=
926
  __( 'Display photo names:', 'wp-photo-album-plus' ) . '
927
  <select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt0\', this )" title="' . esc_attr( $title ) . '" >
928
+ <option value="0"'.($disp_opt[0]=='0'?' selected': '').'>' . $def . '</option>
929
+ <option value="1"'.($disp_opt[0]=='1'?' selected': '').'>' . $yes . '</option>
930
+ <option value="-1"'.($disp_opt[0]=='-1'?' selected': '').'>' . $no . '</option>
931
  </select>';
932
 
933
  // Display description
937
  $result .=
938
  __( 'Display photo descriptions:', 'wp-photo-album-plus' ) . '
939
  <select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt1\', this )" title="' . esc_attr( $title ) . '" >
940
+ <option value="0"'.($disp_opt[1]=='0'?' selected': '').'>' . $def . '</option>
941
+ <option value="1"'.($disp_opt[1]=='1'?' selected': '').'>' . $yes . '</option>
942
+ <option value="-1"'.($disp_opt[1]=='-1'?' selected': '').'>' . $no . '</option>
943
  </select>';
944
 
945
  // Display rating
949
  $result .=
950
  __( 'Display rating:', 'wp-photo-album-plus' ) . '
951
  <select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt2\', this )" title="' . esc_attr( $title ) . '" >
952
+ <option value="0"'.($disp_opt[2]=='0'?' selected': '').'>' . $def . '</option>
953
+ <option value="1"'.($disp_opt[2]=='1'?' selected': '').'>' . $yes . '</option>
954
+ <option value="-1"'.($disp_opt[2]=='-1'?' selected': '').'>' . $no . '</option>
955
  </select>';
956
 
957
  // Display comments
961
  $result .=
962
  __( 'Display comments:', 'wp-photo-album-plus' ) . '
963
  <select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'displayopt3\', this )" title="' . esc_attr( $title ) . '" >
964
+ <option value="0"'.($disp_opt[3]=='0'?' selected': '').'>' . $def . '</option>
965
+ <option value="1"'.($disp_opt[3]=='1'?' selected': '').'>' . $yes . '</option>
966
+ <option value="-1"'.($disp_opt[3]=='-1'?' selected': '').'>' . $no . '</option>
967
  </select>';
968
 
969
  // Watermark
1009
 
1010
  // Status
1011
  $result .= '<br>' .
1012
+ esc_html__( 'Remark', 'wp-photo-album-plus' ) . ':&nbsp;
1013
  <span
1014
  id="albumstatus-' . $id . '"
1015
+ style="font-weight:bold;color:#00AA00">' .
 
1016
  esc_html( $remark ) . '
1017
  </span>';
1018
 
1263
  $result .= '
1264
  <option
1265
  value="' . $page['ID'] . '"' .
1266
+ ( $linkpage == $page['ID'] ? ' selected' : '' ) . '>' .
 
1267
  __( htmlspecialchars( $page['post_title'] ) ) .
1268
  ( $page['post_type'] == 'post' ? ' (' . htmlspecialchars( $page['post_date'] ) . ')' : '' ) .
1269
  '</option>';
1512
  value="' . esc_attr( __('Set all to panorama', 'wp-photo-album-plus' ) ).':"
1513
  />
1514
 
1515
+ <select id="pano-opt">
1516
+ <option value="9" disabled selected>' . __( 'Select a mode', 'wp-photo-album-plus' ) . '</option>
1517
+ <option value="0">' . __( '- none -', 'wp-photo-album-plus' ) . '</option>
1518
+ <option value="1">' . __( '360&deg; Spheric', 'wp-photo-album-plus' ) . '</option>
1519
+ <option value="2">' . __( 'Non 360&deg; Flat', 'wp-photo-album-plus' ) . '</option>
1520
  </select>';
1521
  }
1522
 
1804
  $result .= '
1805
  <option value="" ></option>';
1806
  foreach( $opts as $opt ) {
1807
+ $result .= '<option value="' . $opt . '"' . ( $f == $opt ? ' selected ' : '' ) . '>' . $opt . '</option>';
1808
  }
1809
  $result .=
1810
  '</select>';
2917
  }
2918
 
2919
  $output .= '
2920
+ <option value="0"' . ( $cur == '0' ? ' selected' : '' ) . '>' .
2921
  __( '--- default ---', 'wp-photo-album-plus' ) . '
2922
  </option>
2923
+ <option value="-9"' . ( $cur == '-9' ? ' selected' : '' ) . '>' .
2924
  __( '--- random ---', 'wp-photo-album-plus' ) . '
2925
  </option>
2926
+ <option value="-1"' . ( $cur == '-1' ? ' selected' : '' ) . '>' .
2927
  __( '--- random featured ---', 'wp-photo-album-plus' ) . '
2928
  </option>
2929
+ <option value="-2"' . ( $cur == '-2' ? ' selected' : '' ) . '>' .
2930
  __( '--- most recent added ---', 'wp-photo-album-plus' ) . '
2931
  </option>
2932
+ <option value="-3"' . ( $cur == '-3' ? ' selected' : '' ) . '>' .
2933
  __( '--- random from (grand)children ---', 'wp-photo-album-plus' ) . '
2934
  </option>
2935
+ <option value="-4"' . ( $cur == '-4' ? ' selected' : '' ) . '>' .
2936
  __( '--- most recent from (grand)children ---', 'wp-photo-album-plus' ) . '
2937
  </option>
2938
+ <option value="-5"' . ( $cur == '-5' ? ' selected' : '' ) . '>' .
2939
  __( '--- according to albums photo sequence ---', 'wp-photo-album-plus' ) . '
2940
  </option>';
2941
 
2942
  if ( ! empty($photos) ) foreach($photos as $photo) {
2943
  if ($cur == $photo['id']) {
2944
+ $selected = ' selected';
2945
  }
2946
  else {
2947
  $selected = '';
2949
  $name = __(stripslashes($photo['name']), 'wp-photo-album-plus' );
2950
  if ( strlen($name) > 45 ) $name = substr($name, 0, 45).'...';
2951
  if ( ! $name ) $name = __('Nameless, filename = ', 'wp-photo-album-plus' ).$photo['filename'];
2952
+ $output .= '<option value="'.$photo['id'].'"'.$selected.'>'.$name.'</option>';
2953
  }
2954
 
2955
  $output .= '
3037
  if ( $parent == '0') {
3038
  $result = '
3039
  <br>' .
3040
+ 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.' );
3041
  }
3042
  else {
3043
  $result =
3044
+ esc_html__( 'You can edit sub-album sequence number here when you set the album sequence to "Order #" or "Order # desc" in the "Sub album sort order:" selection box above.' );
3045
  }
3046
  $result .= '<br>';
3047
 
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.1.06.006
7
  *
8
  */
9
 
@@ -374,7 +374,7 @@ global $wpdb;
374
  break;
375
 
376
  case 'html':
377
- $result = wppa_echo( force_balance_tags( $_REQUEST[$key] ), '', '', true );
378
  break;
379
 
380
  case 'tag':
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains functions for sanitizing and formatting user input
6
+ * Version 8.1.09.004
7
  *
8
  */
9
 
374
  break;
375
 
376
  case 'html':
377
+ $result = wppa_echo( force_balance_tags( $_REQUEST[$key] ), '', '', true, true );
378
  break;
379
 
380
  case 'tag':
wppa-items.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains functions to retrieve album and photo items
6
- * Version 8.1.08.003
7
  *
8
  */
9
 
@@ -362,6 +362,21 @@ function wppa_get_photo_desc( $id, $xargs = array() ) {
362
  // CMTooltipGlossary on board?
363
  $desc = wppa_filter_glossary( $desc );
364
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
365
  return wppa_utf8( $desc );
366
  }
367
 
@@ -771,8 +786,8 @@ function wppa_get_album_desc( $id, $xargs = array() ) {
771
  break;
772
  default:
773
  wppa_log('Err', 'Unimplemented option value: ' . wppa_opt( 'wpautop_on_album_desc' ) . ' for wppa_opt( \'wpautop_on_album_desc\' )' );
774
-
775
  }
 
776
 
777
  // Done!
778
  return wppa_utf8( $desc );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains functions to retrieve album and photo items
6
+ * Version 8.1.09.004
7
  *
8
  */
9
 
362
  // CMTooltipGlossary on board?
363
  $desc = wppa_filter_glossary( $desc );
364
 
365
+ // Formatting
366
+ switch( wppa_opt( 'wpautop_on_desc' ) ) {
367
+ case 'nil':
368
+ break;
369
+ case 'nl2br':
370
+ $desc = nl2br( $desc );
371
+ break;
372
+ case 'wpautop':
373
+ $desc = wpautop( $desc );
374
+ break;
375
+ default:
376
+ wppa_log('Err', 'Unimplemented option value: ' . wppa_opt( 'wpautop_on_desc' ) . ' for wppa_opt( \'wpautop_on_desc\' )' );
377
+ }
378
+ $desc = wppa_echo( $desc, '', '', true );
379
+
380
  return wppa_utf8( $desc );
381
  }
382
 
786
  break;
787
  default:
788
  wppa_log('Err', 'Unimplemented option value: ' . wppa_opt( 'wpautop_on_album_desc' ) . ' for wppa_opt( \'wpautop_on_album_desc\' )' );
 
789
  }
790
+ $desc = wppa_echo( $desc, '', '', true );
791
 
792
  // Done!
793
  return wppa_utf8( $desc );
wppa-photo-admin-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
- * Version 8.1.09.001
7
  *
8
  */
9
 
@@ -1218,7 +1218,7 @@ function wppaToggleExif( id, count ) {
1218
  <option value="">'.__('Select', 'wp-photo-album-plus' ).'</option>' );
1219
  $t = array( 120, 150, 180, 210, 240, 270, 300, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450 );
1220
  foreach( $t as $v ) {
1221
- wppa_echo( '<option value="'.$v.'" '.($v==$angle?'selected ':' ').'>'.$v.'&deg;</option>' );
1222
  }
1223
  wppa_echo( '
1224
  <option value="0">'.__('Undo', 'wp-photo-album-plus' ).'</option>
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
+ * Version 8.1.09.004
7
  *
8
  */
9
 
1218
  <option value="">'.__('Select', 'wp-photo-album-plus' ).'</option>' );
1219
  $t = array( 120, 150, 180, 210, 240, 270, 300, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450 );
1220
  foreach( $t as $v ) {
1221
+ wppa_echo( '<option value="'.$v.'" '.($v==$angle?'selected':'').'>'.$v.'&deg;</option>' );
1222
  }
1223
  wppa_echo( '
1224
  <option value="0">'.__('Undo', 'wp-photo-album-plus' ).'</option>
wppa-setting-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 8.1.09.003
7
  *
8
  */
9
 
@@ -135,10 +135,10 @@ function wppa_textarea($xslug, $buttonlabel = '', $repair_php = false ) {
135
 
136
  $html = '<textarea id="'.esc_attr($slug).'"'.$title.' style="float:left;width:300px" onchange="wppaAjaxUpdateOptionValue(\''.$slug.'\', this)" >';
137
  if ( $repair_php ) {
138
- $html .= str_replace( ['&lt;?php', '&lt;?PHP', '<?php'], '', esc_textarea( stripslashes( wppa_opt( $slug ) ) ) );
139
  }
140
  else {
141
- $html .= esc_textarea( stripslashes( wppa_opt( $slug )));
142
  }
143
  $html .= '</textarea>';
144
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 8.1.09.004
7
  *
8
  */
9
 
135
 
136
  $html = '<textarea id="'.esc_attr($slug).'"'.$title.' style="float:left;width:300px" onchange="wppaAjaxUpdateOptionValue(\''.$slug.'\', this)" >';
137
  if ( $repair_php ) {
138
+ $html .= str_replace( ['&lt;?php', '&lt;?PHP', '<?php'], '', wppa_opt( $slug ) ) ;//esc_textarea( stripslashes( wppa_opt( $slug ) ) ) );
139
  }
140
  else {
141
+ $html .= wppa_opt( $slug ); // esc_textarea( stripslashes( wppa_opt( $slug )));
142
  }
143
  $html .= '</textarea>';
144
 
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
- * Version 8.1.09.003
7
  *
8
  */
9
 
@@ -3851,7 +3851,7 @@ $border = false; // debug
3851
  if ( is_ssl() ) {
3852
  $result = str_replace( 'http://', 'https://', $result );
3853
  }
3854
-
3855
  return $result;
3856
  }
3857
 
@@ -4994,17 +4994,20 @@ global $wppa_defaults;
4994
  }
4995
 
4996
  // Compress html
4997
- function wppa_compress_html( $txt ) {
 
 
 
 
 
 
 
 
4998
 
4999
- $result = $txt;
5000
- $result = str_replace( array( "\t", "\r\n", "\n", " ", " " ), " ", $result );
5001
- $result = str_replace( array( " ", " " ), " ", $result );
5002
- $result = str_replace( array( " ", " " ), " ", $result );
5003
- $result = str_replace( " ", " ", $result );
5004
- $result = str_replace( '> <', '><', $result );
5005
- $result = str_replace( '<ul></ul>', '', $result );
5006
- $result = str_replace( '<!--', "\n<!--", $result );
5007
 
 
5008
  return $result;
5009
  }
5010
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 8.1.09.004
7
  *
8
  */
9
 
3851
  if ( is_ssl() ) {
3852
  $result = str_replace( 'http://', 'https://', $result );
3853
  }
3854
+
3855
  return $result;
3856
  }
3857
 
4994
  }
4995
 
4996
  // Compress html
4997
+ function wppa_compress_html( $txt, $keeplinebreaks = false ) {
4998
+
4999
+ // Remove linebreaks only when there is no textarea in the txt
5000
+ if ( strpos( $txt, '<textarea' ) === false && ! $keeplinebreaks ) {
5001
+ $result = str_replace( ["\r\n", "\n"], [" ", " "], $txt );
5002
+ }
5003
+ else {
5004
+ $result = $txt;
5005
+ }
5006
 
5007
+ $from = array( "\t", " ", " ", " ", " ", "> <", "<ul></ul>", "<!--", '" >', '; ', '&amp;', 'style=" ', '"/>', ' style=""', 'px;;' );
5008
+ $to = array( " ", " ", " ", " ", " ", "><", "", "\n<!--", '">', ';', '&', 'style="', '" />', '', 'px;' );
 
 
 
 
 
 
5009
 
5010
+ $result = str_replace( $from, $to, $result );
5011
  return $result;
5012
  }
5013
 
wppa-wrappers.php CHANGED
@@ -5,7 +5,7 @@
5
  * Contains wrappers for standard php functions
6
  * For security and bug reasons
7
  *
8
- * Version 8.1.09.003
9
  *
10
  */
11
 
@@ -720,7 +720,7 @@ function wppa_filetime( $path, $log = true ) {
720
  return filemtime( $path );
721
  }
722
 
723
- function wppa_echo( $html, $a_tags = false, $a_prot = false, $return = false ) {
724
  static $allowed_tags;
725
 
726
  if ( ! is_array( $allowed_tags ) ) {
@@ -931,7 +931,7 @@ static $allowed_tags;
931
  $t = $a_tags ? $a_tags : $allowed_tags;
932
  $p = $a_prot ? $a_prot : wp_allowed_protocols();
933
 
934
- $html = wppa_compress_html( $html );
935
 
936
  $temp = wppa_split_html_js( $html );
937
  $html = $temp['html'];
5
  * Contains wrappers for standard php functions
6
  * For security and bug reasons
7
  *
8
+ * Version 8.1.09.004
9
  *
10
  */
11
 
720
  return filemtime( $path );
721
  }
722
 
723
+ function wppa_echo( $html, $a_tags = false, $a_prot = false, $return = false, $keeplinebreaks = false ) {
724
  static $allowed_tags;
725
 
726
  if ( ! is_array( $allowed_tags ) ) {
931
  $t = $a_tags ? $a_tags : $allowed_tags;
932
  $p = $a_prot ? $a_prot : wp_allowed_protocols();
933
 
934
+ $html = wppa_compress_html( $html, $keeplinebreaks );
935
 
936
  $temp = wppa_split_html_js( $html );
937
  $html = $temp['html'];
wppa.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
- * Version: 8.1.09.003
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
@@ -24,7 +24,7 @@ global $wp_version;
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_api_version;
27
- $wppa_api_version = '8.1.09.003'; // 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.1.09.004
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_api_version;
27
+ $wppa_api_version = '8.1.09.004'; // WPPA software version
28
  global $wppa_revno;
29
  $wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
30