WP Photo Album Plus - Version 7.2.15.006

Version Description

= 7.2.14 =

  • This version addresses various bug fixes and feature requests.

= 7.2.13 =

  • This version addresses various bug fixes and feature requests.

= 7.2.12 =

  • This version addresses various bug fixes and feature requests.

= 7.2.11 =

  • This version addresses various bug fixes and feature requests.

= 7.2.10 =

  • This version addresses various bug fixes and feature requests.

= 7.2.09 =

  • This version addresses various bug fixes and feature requests.

= 7.2.08 =

  • This version addresses various bug fixes.

= 7.2.07 =

  • This version addresses various bug fixes.

= 7.2.06 =

  • This version addresses various bug fixes and feature requests.
  • This version addresses various security issues.

= 7.2.05 =

  • This version addresses various bug fixes and feature requests.
  • This version addresses various security issues.

= 7.2.04 =

  • This version addresses various bug fixes and feature requests.

= 7.2.03 =

  • This version addresses various bug fixes and feature requests.

= 7.2.02 =

  • This version addresses various bug fixes and feature requests.

= 7.2.01 =

  • This version addresses various bug fixes and feature requests.

= 7.2.00 =

  • This version addresses various bug fixes and feature requests.

= 7.1.11 =

  • This version addresses various bug fixes and feature requests.

= 7.1.10 =

  • This version addresses various bug fixes and feature requests.

= 7.1.09 =

  • This version addresses various bug fixes and feature requests.

= 7.1.08 =

  • This version addresses various bug fixes and feature requests.

= 7.1.07 =

  • This version addresses various bug fixes and feature requests.

= 7.1.06 =

  • This version addresses various bug fixes and feature requests.

= 7.1.05 =

  • This version addresses various security issues.
  • This version addresses various bug fixes.

= 7.1.04 =

  • This version addresses various bug fixes.

= 7.1.03 =

  • This version addresses various security issues.
  • This version addresses various bug fixes.

= 7.1.02 =

  • This version addresses various security issues.
  • This version addresses various bug fixes and feature requests.

= 7.1.01 =

  • This version addresses various bug fixes and feature requests.

= 7.1.00 =

  • This version addresses various bug fixes and feature requests.
  • The Photo Album -> Upload Photos and Import Photos admin pages have been substantially improved. Read the changelog for details.

= 7.0.11 =

  • This version addresses various bug fixes and feature requests.

= 7.0.11 =

  • This version addresses various bug fixes

= 7.0.10 =

  • This version addresses various bug fixes

= 7.0.09 =

  • This version addresses various security issues.
  • This version addresses various bug fixes and feature requests.

= 7.0.08 =

  • This version addresses various security issues.
  • This version addresses various bug fixes

= 7.0.07 =

  • This version addresses various security issues.
  • This version addresses various bug fixes

= 7.0.06 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 7.0.05 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 7.0.04 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 7.0.03 =

  • This version addresses various minor bug fixes and feature requests.

= 7.0.02 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 7.0.01 =

  • This version addresses various minor bug fixes and feature requests.

= 7.0.00 =

  • Shortcode generators for Gutenberg added.
  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.
  • To prevent spamming and give the users the opportunity to decide when they want us to email them, the mailing system has been revised. Configure Table IX-M to enable various mailing lists, and use the WPPA+ Notify widget for full user flexibility.

= 6.9.21 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 6.9.20 =

  • This version addresses various bug fixes

= 6.9.19 =

  • This version addresses various minor bug fixes

= 6.9.18 =

  • This version addresses various minor bug fixes

= 6.9.17 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.16 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.15 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.14 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.13 =

  • Security release.

= 6.9.12 =

  • This version addresses various minor bug fixes and performance improvements.

= 6.9.11 =

  • This version addresses various minor bug fixes and performance improvements.

= 6.9.10 =

  • This version addresses various minor bug fixes and performance improvements.

= 6.9.09 =

  • Panorama support phase III.

= 6.9.08 =

  • This version addresses various minor bug fixes and feature requests.
  • Panorama support phase II.

= 6.9.07 =

  • This version addresses various minor bug fixes and feature requests.
  • Panorama support phase I.

= 6.9.06 =

  • This version addresses various minor bug fixes and feature requests.

= 6.9.05 =

  • This version addresses various minor bug fixes and feature requests.

= 6.9.04 =

  • This version addresses various minor bug fixes and feature requests.
  • Local CDN functionality has been added.

= 6.9.03 =

  • This version addresses various minor bug fixes and feature requests.

= 6.9.02 =

  • This version addresses various minor bug fixes and feature requests.

= 6.9.01 =

  • This version addresses various minor bug fixes and feature requests.

= 6.9.00 =

  • This version includes the code for the privacy policy requirements.

= 6.8.09

  • This version addresses various bug fixes and code edits.

= 6.8.08 =

  • This version addresses various minor bug fixes and feature requests.
  • This version offers substantial performance improvements when the box in Table IV-A13: Defer Javascript is ticked. This setting is now recommended and set ticked as the default.
  • For more info on performance improvements and compatibility with optimizers: see the changelog.txt

= 6.8.07 =

  • This version addresses various minor bug fixes and enhancements, and a new widget: Statistics.

= 6.8.06 =

  • This version addresses various minor bug fixes and improved cache handling.

= 6.8.05 =

  • This version addresses various minor bug fixes and feture requests.

= 6.8.04 =

  • This version addresses various display issues and a few fixes of bugs that seldom affected the plugins behaviour.
Download this release

Release Info

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

Code changes from version 7.2.14.008 to 7.2.15.006

changelog.txt CHANGED
@@ -1,5 +1,15 @@
1
  WP Photo Album Plus Changelog
2
 
 
 
 
 
 
 
 
 
 
 
3
  = 7.2.14 =
4
 
5
  * You can now enter a name for your backup of the settings; this means you can now have multiple backups without the need to ftp them to your local pc and rename them.
1
  WP Photo Album Plus Changelog
2
 
3
+ = 7.2.15 =
4
+
5
+ * The initial display width in cases where the shortcode specifies a maximum responsive size like size="auto,550" is now correctly set to 550 as opposed to the value in Table I-A1.1.
6
+ * On all places where the shortcode [wppa ...] accepts the arg album=".." you can ow also enter parent="..".
7
+ The parent attribute overrules a possible album attribute.
8
+ The parent attribute may be an enumeration of parent ids.
9
+ Note that parent="0" means: all non separate albums, and parent="-1" means: all separate albums.
10
+ * The most recent status of the 'opened' lists of subalbums of the album table on the album admin page is now remembered like the open tables of the settings page.
11
+ * New setting: Table IX-E23. In case of conflicts you can set the form method for search to 'get' as opposed to 'post'.
12
+
13
  = 7.2.14 =
14
 
15
  * You can now enter a name for your backup of the settings; this means you can now have multiple backups without the need to ftp them to your local pc and rename them.
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: opajaap
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
  Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
- Version: 7.2.14.008
6
- Stable tag: 7.2.13.004
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
2
  Contributors: opajaap
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
  Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
+ Version: 7.2.15.006
6
+ Stable tag: 7.2.14.008
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
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 7.2.06
7
  *
8
  */
9
 
@@ -2468,10 +2468,11 @@ global $wpdb;
2468
 
2469
  foreach ( array_keys( $seq ) as $s ) { // Obey the global sequence
2470
  $album = $albums[$s];
 
2471
  if ( $album['a_parent'] == $parent ) {
2472
  if ( wppa_have_access( $album ) ) {
2473
 
2474
- $counts = wppa_get_treecounts_a($album['id'], true);
2475
  $pendcount = $counts['pendselfphotos'];
2476
  $schedulecount = $counts['scheduledselfphotos'];
2477
  $haschildren = wppa_have_accessible_children( $album );
@@ -2479,51 +2480,111 @@ global $wpdb;
2479
  $class = '';
2480
  if ( $parent != '0' && $parent != '-1' ) {
2481
  $class .= 'wppa-alb-onoff ';
2482
- $class .= 'wppa-alb-on-'.$parent.' ';
2483
  $par = $parent;
2484
  while ( $par != '0' && $par != '-1' ) {
2485
- $class .= 'wppa-alb-off-'.$par.' ';
2486
- $par = wppa_get_parentalbumid($par);
2487
  }
2488
  }
2489
  if ( $alt ) $class .= ' alternate';
2490
  $style = '';
2491
  if ( $pendcount ) $style .= 'background-color:#ffdddd; ';
2492
  if ( $parent != '0' && $parent != '-1' ) $style .= 'display:none; ';
2493
- $onclickon = 'jQuery(\'.wppa-alb-on-'.$album['id'].'\').css(\'display\',\'\'); jQuery(\'#alb-arrow-on-'.$album['id'].'\').css(\'display\',\'none\'); jQuery(\'#alb-arrow-off-'.$album['id'].'\').css(\'display\',\'\');';
2494
- $onclickoff = 'jQuery(\'.wppa-alb-off-'.$album['id'].'\').css(\'display\',\'none\'); jQuery(\'#alb-arrow-on-'.$album['id'].'\').css(\'display\',\'\'); jQuery(\'#alb-arrow-off-'.$album['id'].'\').css(\'display\',\'none\'); checkArrows();';
 
 
 
 
 
 
 
 
 
 
2495
  $indent = $nestinglevel;
2496
  if ( $indent > '5' ) $indent = 5;
2497
- ?>
2498
 
2499
- <tr class="<?php echo $class ?>" style="<?php echo $style ?>" >
2500
- <?php
 
 
 
 
 
 
 
2501
  $i = 0;
2502
  while ( $i < $indent ) {
2503
  echo '<td style="padding:2px;" ></td>';
2504
  $i++;
2505
  }
2506
- ?>
2507
- <td style="padding:2px; text-align:center;" ><?php if ( $haschildren ) { ?>
2508
- <img id="alb-arrow-off-<?php echo $album['id'] ?>" class="alb-arrow-off" style="height:16px; display:none;" src="<?php echo wppa_get_imgdir().'backarrow.gif' ?>" onclick="<?php echo $onclickoff ?>" title="<?php _e('Collapse subalbums', 'wp-photo-album-plus') ?>" />
2509
- <img id="alb-arrow-on-<?php echo $album['id'] ?>" class="alb-arrow-on" style="height:16px;" src="<?php echo wppa_get_imgdir().'arrow.gif' ?>" onclick="<?php echo $onclickon ?>" title="<?php _e('Expand subalbums', 'wp-photo-album-plus') ?>" />
2510
- <?php } ?></td>
2511
- <td style="padding:2px;" ><?php echo($album['id']); ?></td>
2512
- <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2513
  $i = $indent;
2514
  while ( $i < 5 ) {
2515
  echo '<td style="padding:2px;" ></td>';
2516
  $i++;
2517
  }
2518
- ?>
2519
- <td><?php echo(esc_attr(__(stripslashes($album['name'])))) ?></td>
 
 
 
2520
  <td><small><?php echo(esc_attr(__(stripslashes($album['description'])))) ?></small></td>
2521
  <?php if (current_user_can('administrator')) { ?>
2522
  <td><?php echo($album['owner']); ?></td>
2523
  <?php } ?>
2524
  <td><?php echo($album['a_order']) ?></td>
2525
  <td><?php echo sanitize_text_field(wppa_get_album_name($album['a_parent'], array( 'extended' => true ))) ?></td>
2526
- <?php $url = wppa_dbg_url(get_admin_url().'admin.php?page=wppa_admin_menu&amp;tab=edit&amp;edit_id='.$album['id']); ?>
2527
  <?php $na = $counts['selfalbums']; ?>
2528
  <?php $np = $counts['selfphotos']; ?>
2529
  <?php $nm = $counts['pendselfphotos']; ?>
@@ -2531,7 +2592,7 @@ global $wpdb;
2531
  <td><?php echo $na.'/'.$np.'/'.$nm.'/'.$ns; ?></td>
2532
 
2533
  <?php if ( $album['owner'] != '--- public ---' || wppa_user_is('administrator') ) { ?>
2534
- <?php $url = wppa_ea_url($album['id']) ?>
2535
  <td><a href="<?php echo($url) ?>" class="wppaedit"><?php _e('Edit', 'wp-photo-album-plus'); ?></a></td>
2536
  <td><a href="<?php echo($url.'&amp;quick') ?>" class="wppaedit"><?php _e('Quick', 'wp-photo-album-plus'); ?></a></td>
2537
  <td><a href="<?php echo($url.'&amp;bulk#manage-photos') ?>" class="wppaedit"><?php _e('Bulk', 'wp-photo-album-plus'); ?></a></td>
@@ -2546,16 +2607,16 @@ global $wpdb;
2546
  echo '<td></td>';
2547
  }
2548
  if ( current_user_can( 'wppa_upload' ) ) {
2549
- echo '<td ><a href="' . get_admin_url().'/admin.php?page=wppa_upload_photos&wppa-set-album='.$album['id'] . '" class="wppaedit" >' . __('Upload', 'wp-photo-album-plus') . '</a></td>';
2550
  }
2551
  if ( current_user_can( 'wppa_import' ) ) {
2552
- echo '<td ><a href="' . get_admin_url().'/admin.php?page=wppa_import_photos&wppa-set-album='.$album['id'] . '" class="wppaedit" >' . __('Import', 'wp-photo-album-plus') . '</a></td>';
2553
  }
2554
  ?>
2555
- <?php $url = wppa_ea_url($album['id'], 'del') ?>
2556
  <td><a href="<?php echo($url) ?>" class="wppadelete"><?php _e('Delete', 'wp-photo-album-plus'); ?></a></td>
2557
  <?php if ( wppa_can_create_album() ) {
2558
- $url = wppa_dbg_url(get_admin_url().'admin.php?page=wppa_admin_menu&amp;tab=edit&amp;edit_id=new&amp;parent_id='.$album['id'].'&amp;wppa_nonce='.wp_create_nonce('wppa_nonce'));
2559
  if ( wppa_switch( 'confirm_create' ) ) {
2560
  $onc = 'if (confirm(\''.__('Are you sure you want to create a subalbum?', 'wp-photo-album-plus').'\')) document.location=\''.$url.'\';';
2561
  echo '<td><a onclick="'.$onc.'" class="wppacreate">'.__('Create', 'wp-photo-album-plus').'</a></td>';
@@ -2574,7 +2635,7 @@ global $wpdb;
2574
 
2575
  </tr>
2576
  <?php if ($alt == '') { $alt = ' class="alternate" '; } else { $alt = '';}
2577
- if ( $haschildren ) wppa_do_albumlist($album['id'], $nestinglevel+'1', $albums, $seq);
2578
  }
2579
  }
2580
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
+ * Version 7.2.15
7
  *
8
  */
9
 
2468
 
2469
  foreach ( array_keys( $seq ) as $s ) { // Obey the global sequence
2470
  $album = $albums[$s];
2471
+ $id = $album['id'];
2472
  if ( $album['a_parent'] == $parent ) {
2473
  if ( wppa_have_access( $album ) ) {
2474
 
2475
+ $counts = wppa_get_treecounts_a( $id, true );
2476
  $pendcount = $counts['pendselfphotos'];
2477
  $schedulecount = $counts['scheduledselfphotos'];
2478
  $haschildren = wppa_have_accessible_children( $album );
2480
  $class = '';
2481
  if ( $parent != '0' && $parent != '-1' ) {
2482
  $class .= 'wppa-alb-onoff ';
2483
+ $class .= 'wppa-alb-on-' . $parent . ' ';
2484
  $par = $parent;
2485
  while ( $par != '0' && $par != '-1' ) {
2486
+ $class .= 'wppa-alb-off-' . $par . ' ';
2487
+ $par = wppa_get_parentalbumid( $par );
2488
  }
2489
  }
2490
  if ( $alt ) $class .= ' alternate';
2491
  $style = '';
2492
  if ( $pendcount ) $style .= 'background-color:#ffdddd; ';
2493
  if ( $parent != '0' && $parent != '-1' ) $style .= 'display:none; ';
2494
+
2495
+ $onclickon =
2496
+ 'jQuery(\'.wppa-alb-on-'.$id.'\').css(\'display\',\'\');' .
2497
+ 'jQuery(\'#alb-arrow-on-'.$id.'\').css(\'display\',\'none\');' .
2498
+ 'jQuery(\'#alb-arrow-off-'.$id.'\').css(\'display\',\'\');' .
2499
+ 'wppa_setCookie(\'alb-arrow-'.$id.'\',\'on\',365)';
2500
+ $onclickoff =
2501
+ 'jQuery(\'.wppa-alb-off-'.$id.'\').css(\'display\',\'none\');' .
2502
+ 'jQuery(\'#alb-arrow-on-'.$id.'\').css(\'display\',\'\');' .
2503
+ 'jQuery(\'#alb-arrow-off-'.$id.'\').css(\'display\',\'none\');' .
2504
+ 'checkArrows();' .
2505
+ 'wppa_setCookie(\'alb-arrow-'.$id.'\',\'off\',365)';
2506
  $indent = $nestinglevel;
2507
  if ( $indent > '5' ) $indent = 5;
 
2508
 
2509
+ // Open the album line
2510
+ echo '
2511
+ <tr
2512
+ id="alb-' . $id . '"
2513
+ class="' . $class . '"
2514
+ style="' . $style . '"
2515
+ >';
2516
+
2517
+ // Fillers before the arrow
2518
  $i = 0;
2519
  while ( $i < $indent ) {
2520
  echo '<td style="padding:2px;" ></td>';
2521
  $i++;
2522
  }
2523
+
2524
+ // The arrow image td element
2525
+ echo '
2526
+ <td style="padding:2px; text-align:center;" >';
2527
+
2528
+ // Only if the album has children the arrow will show up
2529
+ if ( $haschildren ) {
2530
+ echo '
2531
+ <img
2532
+ id="alb-arrow-off-' . $id . '"
2533
+ class="alb-arrow-off"
2534
+ style="height:16px; display:none;"
2535
+ src="' . wppa_get_imgdir() . 'backarrow.gif' . '"
2536
+ onclick="' . $onclickoff . '"
2537
+ title="' . esc_attr( __( 'Collapse subalbums', 'wp-photo-album-plus' ) ) . '"
2538
+ />
2539
+ <img
2540
+ id="alb-arrow-on-' . $id . '"
2541
+ class="alb-arrow-on"
2542
+ style="height:16px;"
2543
+ src="' . wppa_get_imgdir() . 'arrow.gif' . '"
2544
+ onclick="' . $onclickon . '"
2545
+ title="' . esc_attr( __( 'Expand subalbums', 'wp-photo-album-plus' ) ) . '"
2546
+ />';
2547
+
2548
+ // Open subalbums by clicking the open button if it was before (cookie), and if it is visible (!)
2549
+ if ( isset( $_COOKIE['alb-arrow-' . $id] ) && $_COOKIE['alb-arrow-' . $id] == 'on' ) {
2550
+ echo '
2551
+ <script>
2552
+ jQuery(document).ready(function(){
2553
+ if (jQuery("#alb-'.$id.'").css("display")!=="none") {
2554
+ jQuery("#alb-arrow-on-'.$id.'").trigger("click");
2555
+ }
2556
+ else {
2557
+ wppa_setCookie("alb-arrow-'.$id.'","off",365);
2558
+ }
2559
+ });
2560
+ </script>';
2561
+ }
2562
+ }
2563
+
2564
+ // Close the arrow image td element
2565
+ echo '</td>';
2566
+
2567
+ // The album id td element
2568
+ echo '<td style="padding:2px;" >' . $id . '</td>';
2569
+
2570
+ // Fillers after the arrow
2571
  $i = $indent;
2572
  while ( $i < 5 ) {
2573
  echo '<td style="padding:2px;" ></td>';
2574
  $i++;
2575
  }
2576
+
2577
+ // The album name
2578
+ echo '<td>' . esc_attr( __( stripslashes( $album['name'] ) ) ) . '</td>';
2579
+
2580
+ /* HBI */ ?>
2581
  <td><small><?php echo(esc_attr(__(stripslashes($album['description'])))) ?></small></td>
2582
  <?php if (current_user_can('administrator')) { ?>
2583
  <td><?php echo($album['owner']); ?></td>
2584
  <?php } ?>
2585
  <td><?php echo($album['a_order']) ?></td>
2586
  <td><?php echo sanitize_text_field(wppa_get_album_name($album['a_parent'], array( 'extended' => true ))) ?></td>
2587
+ <?php $url = wppa_dbg_url(get_admin_url().'admin.php?page=wppa_admin_menu&amp;tab=edit&amp;edit_id='.$id); ?>
2588
  <?php $na = $counts['selfalbums']; ?>
2589
  <?php $np = $counts['selfphotos']; ?>
2590
  <?php $nm = $counts['pendselfphotos']; ?>
2592
  <td><?php echo $na.'/'.$np.'/'.$nm.'/'.$ns; ?></td>
2593
 
2594
  <?php if ( $album['owner'] != '--- public ---' || wppa_user_is('administrator') ) { ?>
2595
+ <?php $url = wppa_ea_url($id) ?>
2596
  <td><a href="<?php echo($url) ?>" class="wppaedit"><?php _e('Edit', 'wp-photo-album-plus'); ?></a></td>
2597
  <td><a href="<?php echo($url.'&amp;quick') ?>" class="wppaedit"><?php _e('Quick', 'wp-photo-album-plus'); ?></a></td>
2598
  <td><a href="<?php echo($url.'&amp;bulk#manage-photos') ?>" class="wppaedit"><?php _e('Bulk', 'wp-photo-album-plus'); ?></a></td>
2607
  echo '<td></td>';
2608
  }
2609
  if ( current_user_can( 'wppa_upload' ) ) {
2610
+ echo '<td ><a href="' . get_admin_url().'/admin.php?page=wppa_upload_photos&wppa-set-album='.$id . '" class="wppaedit" >' . __('Upload', 'wp-photo-album-plus') . '</a></td>';
2611
  }
2612
  if ( current_user_can( 'wppa_import' ) ) {
2613
+ echo '<td ><a href="' . get_admin_url().'/admin.php?page=wppa_import_photos&wppa-set-album='.$id . '" class="wppaedit" >' . __('Import', 'wp-photo-album-plus') . '</a></td>';
2614
  }
2615
  ?>
2616
+ <?php $url = wppa_ea_url($id, 'del') ?>
2617
  <td><a href="<?php echo($url) ?>" class="wppadelete"><?php _e('Delete', 'wp-photo-album-plus'); ?></a></td>
2618
  <?php if ( wppa_can_create_album() ) {
2619
+ $url = wppa_dbg_url(get_admin_url().'admin.php?page=wppa_admin_menu&amp;tab=edit&amp;edit_id=new&amp;parent_id='.$id.'&amp;wppa_nonce='.wp_create_nonce('wppa_nonce'));
2620
  if ( wppa_switch( 'confirm_create' ) ) {
2621
  $onc = 'if (confirm(\''.__('Are you sure you want to create a subalbum?', 'wp-photo-album-plus').'\')) document.location=\''.$url.'\';';
2622
  echo '<td><a onclick="'.$onc.'" class="wppacreate">'.__('Create', 'wp-photo-album-plus').'</a></td>';
2635
 
2636
  </tr>
2637
  <?php if ($alt == '') { $alt = ' class="alternate" '; } else { $alt = '';}
2638
+ if ( $haschildren ) wppa_do_albumlist($id, $nestinglevel+'1', $albums, $seq);
2639
  }
2640
  }
2641
  }
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 7.2.14
7
  *
8
  */
9
 
@@ -200,7 +200,7 @@ global $wppa_session;
200
  '<form' .
201
  ' id="wppa_searchform_' . $mocc . '"' .
202
  ' action="' . $pagelink.'"' .
203
- ' method="post"' .
204
  ' class="widget_search search-form"' .
205
  ' role="search"' .
206
  ' >';
@@ -2479,6 +2479,7 @@ static $albums_granted;
2479
  // 3. An album enumerations
2480
  //
2481
  // Now we are going to test if the visitor has access
 
2482
 
2483
  // Case 1. A single album. I should have access to this album ( $alb > 0 ).
2484
  if ( wppa_is_int( $alb ) && $alb > '0' ) {
@@ -5371,8 +5372,8 @@ global $wpdb;
5371
  class="wppa-real-calendar"
5372
  style="font-size:' . $f . 'px;"
5373
  >
5374
- <table
5375
- class="wppa-real-calendar-table"
5376
  style="width:100%;border-bottom:1px solid gray;margin:0;" >
5377
  <thead class="wppa-real-calendar-head" >
5378
  <tr class="wppa-real-calendar-navi" >';
@@ -5642,13 +5643,17 @@ global $wpdb;
5642
  );
5643
  $id = $thumbs['0']['id'];
5644
 
5645
- // The cell content
5646
- $cell_content = '
5647
  <a
5648
  data-id="' . wppa_encrypt_photo( $id ) . '"
 
5649
  onclick="wppaDoAjaxRender(' . ( $mocc + 1 ) . ', \'' . $ajaxurl . '\' );"
5650
  >';
5651
 
 
 
 
5652
  // the display image
5653
  $imgattr = $fill ? 'width:100%;height:100%;cursor:pointer;' : 'max-width:100%;max-height:100%;cursor:pointer;';
5654
  $id = $thumbs['0']['id'];
@@ -5683,7 +5688,7 @@ global $wpdb;
5683
  // End slideshow case
5684
  break;
5685
 
5686
- //case 'lightbox':
5687
  default:
5688
 
5689
  // Start lightbox case; this is the default
@@ -5726,11 +5731,20 @@ global $wpdb;
5726
  // the display image
5727
  $imgattr = $fill ? 'width:100%;height:100%;' : 'max-width:100%;max-height:100%;';
5728
  if ( $id == $thumbs['0']['id'] ) {
 
 
 
 
 
 
 
 
5729
  if ( wppa_is_video( $thumb['id'] ) ) {
5730
  $cell_content .=
5731
  '<video preload="metadata"
5732
  class="thumb wppa-img" id="i-' . $thumb['id'] . '-' . $mocc . ' wppa-realcalimg wppa-realcalimg-' . $mocc . '"
5733
  data-day="' . $current_day . '"
 
5734
  title="' . esc_attr( $imgtitle ) . '"
5735
  style="' . wppa_wcs( 'wppa-img' ) . $imgattr . '"
5736
  >' .
@@ -5764,13 +5778,16 @@ global $wpdb;
5764
  '<div
5765
  class="wppa-real-calendar-day-content-' . $current_day . '-' . $mocc . '"
5766
  style="position:relative;color:white;width:100%;bottom:' . round( $thisb ) . 'px;"
 
5767
  >' .
5768
- $current_day .
5769
- '</div>';
 
 
5770
 
5771
  }
5772
  else {
5773
- $cell_content = $current_day;
5774
  }
5775
  $result .= '
5776
  <td colspan="2"
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 7.2.15
7
  *
8
  */
9
 
200
  '<form' .
201
  ' id="wppa_searchform_' . $mocc . '"' .
202
  ' action="' . $pagelink.'"' .
203
+ ' method="' . wppa_opt( 'search_form_method' ) . '"' .
204
  ' class="widget_search search-form"' .
205
  ' role="search"' .
206
  ' >';
2479
  // 3. An album enumerations
2480
  //
2481
  // Now we are going to test if the visitor has access
2482
+ $albarr = array(); // Init
2483
 
2484
  // Case 1. A single album. I should have access to this album ( $alb > 0 ).
2485
  if ( wppa_is_int( $alb ) && $alb > '0' ) {
5372
  class="wppa-real-calendar"
5373
  style="font-size:' . $f . 'px;"
5374
  >
5375
+ <table
5376
+ class="wppa-real-calendar-table"
5377
  style="width:100%;border-bottom:1px solid gray;margin:0;" >
5378
  <thead class="wppa-real-calendar-head" >
5379
  <tr class="wppa-real-calendar-navi" >';
5643
  );
5644
  $id = $thumbs['0']['id'];
5645
 
5646
+ // The link
5647
+ $the_a_tag = '
5648
  <a
5649
  data-id="' . wppa_encrypt_photo( $id ) . '"
5650
+ style="color:white;"
5651
  onclick="wppaDoAjaxRender(' . ( $mocc + 1 ) . ', \'' . $ajaxurl . '\' );"
5652
  >';
5653
 
5654
+ // The cell content
5655
+ $cell_content = $the_a_tag;
5656
+
5657
  // the display image
5658
  $imgattr = $fill ? 'width:100%;height:100%;cursor:pointer;' : 'max-width:100%;max-height:100%;cursor:pointer;';
5659
  $id = $thumbs['0']['id'];
5688
  // End slideshow case
5689
  break;
5690
 
5691
+ // case 'lightbox':
5692
  default:
5693
 
5694
  // Start lightbox case; this is the default
5731
  // the display image
5732
  $imgattr = $fill ? 'width:100%;height:100%;' : 'max-width:100%;max-height:100%;';
5733
  if ( $id == $thumbs['0']['id'] ) {
5734
+
5735
+ $the_a_tag = '
5736
+ <a
5737
+ style="cursor:url(\'' . wppa_get_imgdir( wppa_opt( 'magnifier' ) ) . '\'),auto;color:white;text-decoration:none;"
5738
+ onclick="jQuery(\'#i-' . $thumb['id'] . '-' . $mocc . '\').trigger(\'click\');"
5739
+ >';
5740
+
5741
+
5742
  if ( wppa_is_video( $thumb['id'] ) ) {
5743
  $cell_content .=
5744
  '<video preload="metadata"
5745
  class="thumb wppa-img" id="i-' . $thumb['id'] . '-' . $mocc . ' wppa-realcalimg wppa-realcalimg-' . $mocc . '"
5746
  data-day="' . $current_day . '"
5747
+ id="i-' . $thumb['id'] . '-' . $mocc . '"
5748
  title="' . esc_attr( $imgtitle ) . '"
5749
  style="' . wppa_wcs( 'wppa-img' ) . $imgattr . '"
5750
  >' .
5778
  '<div
5779
  class="wppa-real-calendar-day-content-' . $current_day . '-' . $mocc . '"
5780
  style="position:relative;color:white;width:100%;bottom:' . round( $thisb ) . 'px;"
5781
+ title="' . esc_attr( $imgtitle ) . '"
5782
  >' .
5783
+ $the_a_tag .
5784
+ $current_day . '
5785
+ </a>
5786
+ </div>';
5787
 
5788
  }
5789
  else {
5790
+ $cell_content = '<span style="cursor:default;" >' . $current_day . '</span>';
5791
  }
5792
  $result .= '
5793
  <td colspan="2"
wppa-filter.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
- * Version 7.2.11
7
  *
8
  */
9
 
@@ -152,6 +152,11 @@ global $wppa_revno;
152
  return '';
153
  }
154
 
 
 
 
 
 
155
  // Find type
156
  switch ( $atts['type'] ) {
157
  case 'version':
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
+ * Version 7.2.15
7
  *
8
  */
9
 
152
  return '';
153
  }
154
 
155
+ // If parent given, overwrite album by children
156
+ if ( $atts['parent'] !== '' ) {
157
+ $atts['album'] = wppa_alb_to_enum_children( $atts['parent'] );
158
+ }
159
+
160
  // Find type
161
  switch ( $atts['type'] ) {
162
  case 'version':
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 7.2.12
7
  *
8
  */
9
 
@@ -3289,7 +3289,12 @@ function wppa_get_container_width( $netto = false ) {
3289
  else {
3290
  $result = wppa_opt( 'colwidth' );
3291
  if ( $result == 'auto' ) {
3292
- $result = wppa_opt( 'initial_colwidth' ); //'640';
 
 
 
 
 
3293
  wppa( 'auto_colwidth', true );
3294
  }
3295
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 7.2.15
7
  *
8
  */
9
 
3289
  else {
3290
  $result = wppa_opt( 'colwidth' );
3291
  if ( $result == 'auto' ) {
3292
+ if ( wppa( 'max_width' ) ) {
3293
+ $result = wppa( 'max_width' );
3294
+ }
3295
+ else {
3296
+ $result = wppa_opt( 'initial_colwidth' ); //'640';
3297
+ }
3298
  wppa( 'auto_colwidth', true );
3299
  }
3300
  }
wppa-photo-admin-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
- * Version 7.2.14
7
  *
8
  */
9
 
@@ -20,12 +20,12 @@ function _wppa_edit_photo() {
20
  $photo = strval( intval( $_GET['photo'] ) );
21
  $thumb = wppa_cache_thumb( $photo );
22
  if ( $thumb['owner'] == wppa_get_user() ) {
23
- echo
24
- '<div class="wrap">' .
25
- '<h2>' . __( 'Edit photo' , 'wp-photo-album-plus') . '</h2>';
26
  wppa_album_photos( '', $photo );
27
- echo
28
- '</div>';
29
  }
30
  else {
31
  wp_die( 'You do not have the rights to do this' );
@@ -34,49 +34,43 @@ function _wppa_edit_photo() {
34
 
35
  // Edit all photos owned by current user
36
  else {
37
- echo
38
- '<div class="wrap">' .
39
- '<h2>' . __( 'Edit photos' , 'wp-photo-album-plus') . '</h2>';
40
  wppa_album_photos( '', '', wppa_get_user() );
41
- echo
42
- '</div>';
43
  }
44
  }
45
 
46
  // Moderate photos
47
  function _wppa_moderate_photos() {
48
 
49
- // Check input
50
- wppa_vfy_arg( 'photo' );
51
-
52
- if ( isset( $_GET['photo'] ) ) {
53
- $photo = $_GET['photo'];
54
- }
55
- else $photo = '';
56
-
57
  $just_edit = isset( $_GET['just-edit'] );
58
 
59
  if ( $photo && $just_edit && wppa_user_is( 'administrator' ) ) {
60
- echo
61
- '<div class="wrap">' .
62
- '<h2>' . __( 'Edit photo', 'wp-photo-album-plus' ) . '</h2>';
63
  echo htmlentities( $_GET['just-edit'] );
64
  wppa_album_photos( '', $photo, '', false );
65
- echo
66
- '</div>';
67
  }
68
  else {
69
- echo
70
- '<div class="wrap">' .
71
- '<h2>' . __( 'Moderate photos' , 'wp-photo-album-plus') . '</h2>';
72
  if ( wppa_switch( 'moderate_bulk' ) ) {
73
  wppa_album_photos_bulk( 'moderate' );
74
  }
75
  else {
76
  wppa_album_photos( '', $photo, '', true );
77
  }
78
- echo
79
- '</div>';
80
  }
81
  }
82
 
@@ -164,7 +158,7 @@ global $wpdb;
164
  ORDER BY timestamp DESC
165
  LIMIT %d, %d", $owner, $skip, $pagesize ), ARRAY_A );
166
  $count = is_array( $photos ) ? count( $photos ) : 0;
167
- $link = wppa_dbg_url( get_admin_url() . 'admin.php' . '?page=wppa_edit_photo' . '&wppa_nonce=' . wp_create_nonce('wppa_nonce') );
168
  }
169
 
170
  // Moderate photos
@@ -172,7 +166,7 @@ global $wpdb;
172
 
173
  // Can i moderate?
174
  if ( ! current_user_can( 'wppa_moderate' ) ) {
175
- wp_die( __( 'You do not have the rights to do this' , 'wp-photo-album-plus') );
176
  }
177
 
178
  // Moderate a single photo
@@ -195,15 +189,13 @@ global $wpdb;
195
 
196
  if ( is_array( $cmt ) && count( $cmt ) ) {
197
 
198
- // $cmt = array_unique( $cmt );
199
-
200
  foreach( $cmt as $id ) {
201
  $photos[] = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
202
  WHERE id = %d", $id ), ARRAY_A );
203
  }
204
  $count = count( $photos );
205
  }
206
- $link = wppa_dbg_url( get_admin_url() . 'admin.php' . '?page=wppa_moderate_photos' . '&wppa_nonce=' . wp_create_nonce('wppa_nonce') );
207
  }
208
 
209
  // Are there photos to moderate?
@@ -215,38 +207,38 @@ global $wpdb;
215
  $count = count( $photos );
216
  }
217
 
218
- // No photos to moderate
219
  if ( empty( $photos ) ) {
220
 
221
  // Single photo moderate requested
222
  if ( $photo ) {
223
- echo
224
- '<p>' .
225
- __( 'This photo is no longer awaiting moderation.' , 'wp-photo-album-plus') .
226
- '</p>';
227
  }
228
 
229
  // Multiple photos to moderate requested
230
  else {
231
- echo
232
- '<p>' .
233
- __( 'There are no photos awaiting moderation at this time.' , 'wp-photo-album-plus') .
234
- '</p>';
235
  }
236
 
237
  // If i am admin, i can edit all photos here, sorted by timestamp desc
238
  if ( wppa_user_is( 'administrator' ) ) {
239
- echo
240
- '<h3>' .
241
- __( 'Manage all photos by timestamp' , 'wp-photo-album-plus') .
242
- '</h3>';
243
 
244
  $photos = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
245
  ORDER BY timestamp DESC
246
  LIMIT %d, %d", $skip, $pagesize ), ARRAY_A );
247
 
248
  $count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->wppa_photos" );
249
- $link = wppa_dbg_url( get_admin_url() . 'admin.php' . '?page=wppa_moderate_photos' . '&wppa_nonce=' . wp_create_nonce('wppa_nonce') );
250
  }
251
 
252
  // Nothing to do
@@ -275,12 +267,12 @@ global $wpdb;
275
  // A specific photo requested
276
  if ( $photo ) {
277
  $photo = strval( intval( $photo ) );
278
- echo
279
- '<div id="photoitem-' . $photo . '" class="photoitem" style="width:100%; background-color: rgb( 255, 255, 224 ); border-color: rgb( 230, 219, 85 );">' .
280
- '<span style="color:red">' .
281
- sprintf( __( 'Photo %s has been removed.' , 'wp-photo-album-plus'), $photo ) .
282
- '</span>' .
283
- '</div>';
284
  }
285
 
286
  // A collection of photos requested
@@ -288,18 +280,18 @@ global $wpdb;
288
 
289
  // Search
290
  if ( isset( $_REQUEST['wppa-searchstring'] ) ) {
291
- echo
292
- '<h3>' .
293
- __( 'No photos matching your search criteria.' , 'wp-photo-album-plus') .
294
- '</h3>';
295
  }
296
 
297
  // Album
298
  else {
299
- echo
300
- '<h3>' .
301
- __( 'No photos yet in this album.' , 'wp-photo-album-plus') .
302
- '</h3>';
303
  }
304
  }
305
 
@@ -583,35 +575,38 @@ function wppaToggleExif( id, count ) {
583
  $modalbum = $album;
584
  }
585
 
586
- echo // Anchor for scroll to
587
- "\n" . '<a id="photo_' . $id . '" ></a>';
588
-
589
- echo // The photo data
590
- '<div' .
591
- ' id="photoitem-' . $id . '"' .
592
- ' class="wppa-table-wrap"' .
593
- ' style="width:100%;position:relative;"' .
594
- ' >';
595
-
596
- echo // Photo specific nonce field
597
- '<input' .
598
- ' type="hidden"' .
599
- ' id="photo-nonce-' . $id . '"' .
600
- ' value="' . wp_create_nonce( 'wppa_nonce_' . $id ) . '"' .
601
- ' />';
602
 
603
- echo // Section 1
604
- "\n" . '<!-- Section 1 -->' .
605
- '<table' .
606
- ' class="wppa-table wppa-photo-table"' .
607
- ' style="width:100%;"' .
608
- ' >' .
609
- '<tbody>';
610
 
611
- // -- Preview thumbnail ---
612
- echo
613
- '<tr>' .
614
- '<td>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
615
  // If ImageMagick is enabled...
616
  // Fake 'for social media' to use the local file here, not cloudinary.
617
  // Files from cloudinary do not reload, even with ?ver=...
@@ -629,61 +624,62 @@ function wppaToggleExif( id, count ) {
629
  if ( $is_video ) {
630
  reset( $is_video );
631
  $big = str_replace( 'xxx', current( $is_video ), $big );
632
- echo
633
- '<a' .
634
- ' href="' . esc_attr( $big ) . '"' .
635
- ' target="_blank"' .
636
- ' title="' . esc_attr( __( 'Preview fullsize video' , 'wp-photo-album-plus') ) . '"' .
637
- ' >' .
638
  wppa_get_video_html( array( 'id' => $id,
639
  'tagid' => 'video-' . $id,
640
  'width' => '160',
641
  'height' => '160' * wppa_get_videoy( $id ) / wppa_get_videox( $id ),
642
  'controls' => false,
643
  'use_thumb' => true
644
- ) ) .
645
- '</a>';
646
  }
647
  else {
648
  if ( $has_audio ) {
649
  $src = wppa_get_thumb_url( $id );
650
  $big = wppa_get_photo_url( $id );
651
  }
652
- echo
653
- '<a' .
654
- ' id="thumba-' . $id . '"' .
655
- ' href="' . esc_attr( $big ) . '"' .
656
- ' target="_blank"' .
657
- ' title="' . esc_attr( __( 'Preview fullsize photo', 'wp-photo-album-plus' ) ) . '"' .
658
- ' >' .
659
- '<img' .
660
- ' id="thumburl-' . $id . '"' .
661
- ' ' . ( wppa_switch( 'lazy' ) && $count > '1' ? 'data-' : '' ) . 'src="' . $src . '"' .
662
- ' alt="' . esc_attr( $name ) . '"' .
663
- ' style="max-width: 160px; vertical-align:middle;"' .
664
  ( wppa_switch( 'lazy' ) && $count > '1' ? ' class="wppa-lazy"' : '' ) .
665
- ' />' .
666
- '</a>';
 
667
  if ( $has_audio ) {
668
  $audio = wppa_get_audio_html( array( 'id' => $id,
669
  'tagid' => 'audio-' . $id,
670
  'width' => '160',
671
  'controls' => true
672
  ) );
673
- echo
674
- '<br />' .
675
- ( $audio ? $audio : '<span style="color:red;">' .
676
- __( 'Audio disabled' , 'wp-photo-album-plus') .
677
- '</span>' );
 
678
  }
679
  }
680
- echo
681
- '</td>';
682
 
683
- echo
684
- '<td>' .
685
-
686
- // --- More or less static data ---
687
 
688
  // ID
689
  'ID = ' . strval( intval( $id ) ) . '. ' .
@@ -695,21 +691,22 @@ function wppaToggleExif( id, count ) {
695
  __( 'Filename:', 'wp-photo-album-plus' ) . ' ' . htmlspecialchars( $filename ) . '. ' .
696
 
697
  // Upload
698
- __( 'Upload:', 'wp-photo-album-plus' ) . ' ' . htmlentities( wppa_local_date( '', $timestamp ) ) . ' ' . __( 'local time' , 'wp-photo-album-plus') . '. ';
 
699
 
700
  // Owner
701
  if ( $owner_editable ) {
702
  echo
703
- __( 'Owned by:', 'wp-photo-album-plus' ) .
704
- '<input' .
705
- ' type="text"' .
706
- ' onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'owner\', this.value)"' .
707
- ' value="' . esc_attr( $owner ) . '"' .
708
- ' /> ';
709
  }
710
  else {
711
  echo
712
- __( 'By:', 'wp-photo-album-plus' ) . ' ' . htmlentities( $owner ) . ' ';
713
  }
714
 
715
  // Album
@@ -719,26 +716,27 @@ function wppaToggleExif( id, count ) {
719
  $deleted = true;
720
  }
721
  echo
722
- sprintf( __( 'Album: %d (%s).' , 'wp-photo-album-plus'), strval( intval( $album ) ), htmlentities( wppa_get_album_name( $album ) ) );
723
 
724
  // Modified
725
  if ( $deleted ) {
726
- echo
727
- '<span style="color:red;" >' .
728
- __( 'Trashed', 'wp-photo-album-plus' ) .
729
- '</span>';
730
  }
731
  else {
732
  if ( $modified > $timestamp ) {
733
  echo
734
- ' ' . __( 'Modified:', 'wp-photo-album-plus' ) . ' ' .
735
- '<span id="modified-' . $id . '" >' .
736
- wppa_local_date( '', $modified ) .
737
- ' </span>' . __( 'local time', 'wp-photo-album-plus' );
 
738
  }
739
  else {
740
  echo
741
- ' ' . __( 'Not modified', 'wp-photo-album-plus' );
742
  }
743
  }
744
  echo
@@ -747,13 +745,13 @@ function wppaToggleExif( id, count ) {
747
  // Exif
748
  __( 'EXIF Date:', 'wp-photo-album-plus' );
749
  if ( wppa_user_is( 'administrator' ) ) { // Admin may edit exif date
750
- echo
751
- '<input' .
752
- ' type="text"' .
753
- ' style="width:125px;"' .
754
- ' onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'exifdtm\', this.value)"' .
755
- ' value="' . esc_attr( $exifdtm ) . '"' .
756
- ' />';
757
  }
758
  else {
759
  echo htmlentities( $exifdtm ) . '.';
@@ -764,7 +762,7 @@ function wppaToggleExif( id, count ) {
764
  // Location
765
  if ( $photo['location'] || wppa_switch( 'geo_edit' ) ) {
766
  echo
767
- __( 'Location:' , 'wp-photo-album-plus') . ' ';
768
  $loc = $location ? $location : '///';
769
  $geo = explode( '/', $loc );
770
 
@@ -773,21 +771,21 @@ function wppaToggleExif( id, count ) {
773
 
774
  if ( wppa_switch( 'geo_edit' ) ) {
775
  echo
776
- __( 'Lat:', 'wp-photo-album-plus' ) .
777
- '<input' .
778
- ' type="text"' .
779
- ' style="width:100px;"' .
780
- ' id="lat-' . $id . '"' .
781
- ' onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'lat\', this.value);"' .
782
- ' value="' . esc_attr( $geo['2'] ) . '"' .
783
- ' />' .
784
- __( 'Lon:', 'wp-photo-album-plus' ) .
785
- '<input type="text"' .
786
- ' style="width:100px;"' .
787
- ' id="lon-' . $id . '"' .
788
- ' onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'lon\', this.value);"' .
789
- ' value="' . esc_attr( $geo['3'] ) . '"' .
790
- ' />';
791
  }
792
  }
793
 
@@ -795,22 +793,22 @@ function wppaToggleExif( id, count ) {
795
  echo
796
  __( 'Photo sort order #:', 'wp-photo-album-plus' );
797
  if ( $sortby_orderno && ( ! wppa_switch( 'porder_restricted' ) || wppa_user_is( 'administrator' ) ) ) {
798
- echo
799
- '<input' .
800
- ' type="text"' .
801
- ' id="porder-' . $id . '"' .
802
- ' value="' . esc_attr( $p_order ) . '"' .
803
- ' style="width:30px;"' .
804
- ' onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'p_order\', this.value)"' .
805
- ' />' .
806
  ' ';
807
  }
808
  else {
809
  echo
810
- htmlentities( $p_order ) . '. ';
811
  }
812
 
813
- // Rating
814
  $entries = wppa_get_rating_count_by_id( $id );
815
  if ( $entries ) {
816
 
@@ -2512,10 +2510,10 @@ function wppa_album_photos_bulk( $album ) {
2512
  $message = sprintf( __( '%d photos deleted.' , 'wp-photo-album-plus'), $count );
2513
  break;
2514
  case 'wppa-bulk-move-to':
2515
- $message = sprintf( __( '%1$s photos moved to album %2$s.' , 'wp-photo-album-plus'), $count, $newalb.': ' . strip_tags( wppa_get_album_name( $newalb ) ) );
2516
  break;
2517
  case 'wppa-bulk-copy-to':
2518
- $message = sprintf( __( '%1$s photos copied to album %2$s.' , 'wp-photo-album-plus'), $count, $newalb.': ' . strip_tags( wppa_get_album_name( $newalb ) ) );
2519
  break;
2520
  case 'wppa-bulk-status':
2521
  $message = sprintf( __( 'Changed status to %1$s on %2$s photos.' , 'wp-photo-album-plus'), $status, $count );
@@ -2527,7 +2525,7 @@ function wppa_album_photos_bulk( $album ) {
2527
  $message = sprintf( __( '%d photos processed.' , 'wp-photo-album-plus'), $count );
2528
  break;
2529
  }
2530
- wppa_ok_message( htmlentities( $message ) );
2531
  }
2532
  }
2533
 
@@ -2888,7 +2886,7 @@ function wppaSetConfirmMove( id ) {
2888
  <!-- Preview -->
2889
  <td style="min-width:240px; text-align:center;" >
2890
  <?php if ( wppa_is_video( $photo['id'] ) ) { ?>
2891
- <a href="<?php echo esc_url( str_replace( 'xxx', 'mp4', wppa_get_photo_url( $photo['id'] ) ) ) ?>" target="_blank" title="Click to see fullsize" >
2892
  <?php // Animating size changes of a video tag is not a good idea. It will rapidly screw up browser cache and cpu ?>
2893
  <?php echo wppa_get_video_html( array(
2894
  'id' => $id,
@@ -2921,7 +2919,7 @@ function wppaSetConfirmMove( id ) {
2921
  '<a' .
2922
  ' href="' . esc_url( wppa_get_photo_url( $photo['id'] ) ) . '"' .
2923
  ' target="_blank"' .
2924
- ' title="Click to see fullsize"' .
2925
  ' >' .
2926
  '<img' .
2927
  ' class="wppa-bulk-thumb ' . ( wppa_switch( 'lazy' ) ? 'wppa-lazy' : '' ) . '"' .
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
+ * Version 7.2.15
7
  *
8
  */
9
 
20
  $photo = strval( intval( $_GET['photo'] ) );
21
  $thumb = wppa_cache_thumb( $photo );
22
  if ( $thumb['owner'] == wppa_get_user() ) {
23
+ echo '
24
+ <div class="wrap" >
25
+ <h2>' . __( 'Edit photo', 'wp-photo-album-plus' ) . '</h2>';
26
  wppa_album_photos( '', $photo );
27
+ echo '
28
+ </div>';
29
  }
30
  else {
31
  wp_die( 'You do not have the rights to do this' );
34
 
35
  // Edit all photos owned by current user
36
  else {
37
+ echo '
38
+ <div class="wrap" >
39
+ <h2>' . __( 'Edit photos', 'wp-photo-album-plus' ) . '</h2>';
40
  wppa_album_photos( '', '', wppa_get_user() );
41
+ echo '
42
+ </div>';
43
  }
44
  }
45
 
46
  // Moderate photos
47
  function _wppa_moderate_photos() {
48
 
49
+ // Check input and get photo id if any
50
+ $photo = wppa_vfy_arg( 'photo' );
 
 
 
 
 
 
51
  $just_edit = isset( $_GET['just-edit'] );
52
 
53
  if ( $photo && $just_edit && wppa_user_is( 'administrator' ) ) {
54
+ echo '
55
+ <div class="wrap" >
56
+ <h2>' . __( 'Edit photo', 'wp-photo-album-plus' ) . '</h2>';
57
  echo htmlentities( $_GET['just-edit'] );
58
  wppa_album_photos( '', $photo, '', false );
59
+ echo '
60
+ </div>';
61
  }
62
  else {
63
+ echo '
64
+ <div class="wrap" >
65
+ <h2>' . __( 'Moderate photos' , 'wp-photo-album-plus') . '</h2>';
66
  if ( wppa_switch( 'moderate_bulk' ) ) {
67
  wppa_album_photos_bulk( 'moderate' );
68
  }
69
  else {
70
  wppa_album_photos( '', $photo, '', true );
71
  }
72
+ echo '
73
+ </div>';
74
  }
75
  }
76
 
158
  ORDER BY timestamp DESC
159
  LIMIT %d, %d", $owner, $skip, $pagesize ), ARRAY_A );
160
  $count = is_array( $photos ) ? count( $photos ) : 0;
161
+ $link = wppa_dbg_url( get_admin_url() . 'admin.php?page=wppa_edit_photo&wppa_nonce=' . wp_create_nonce('wppa_nonce') );
162
  }
163
 
164
  // Moderate photos
166
 
167
  // Can i moderate?
168
  if ( ! current_user_can( 'wppa_moderate' ) ) {
169
+ wp_die( __( 'You do not have the rights to do this', 'wp-photo-album-plus' ) );
170
  }
171
 
172
  // Moderate a single photo
189
 
190
  if ( is_array( $cmt ) && count( $cmt ) ) {
191
 
 
 
192
  foreach( $cmt as $id ) {
193
  $photos[] = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
194
  WHERE id = %d", $id ), ARRAY_A );
195
  }
196
  $count = count( $photos );
197
  }
198
+ $link = wppa_dbg_url( get_admin_url() . 'admin.php?page=wppa_moderate_photos&wppa_nonce=' . wp_create_nonce( 'wppa_nonce' ) );
199
  }
200
 
201
  // Are there photos to moderate?
207
  $count = count( $photos );
208
  }
209
 
210
+ // No photos to moderate?
211
  if ( empty( $photos ) ) {
212
 
213
  // Single photo moderate requested
214
  if ( $photo ) {
215
+ echo '
216
+ <p>' .
217
+ __( 'This photo is no longer awaiting moderation.' , 'wp-photo-album-plus' ) . '
218
+ </p>';
219
  }
220
 
221
  // Multiple photos to moderate requested
222
  else {
223
+ echo '
224
+ <p>' .
225
+ __( 'There are no photos awaiting moderation at this time.', 'wp-photo-album-plus' ) . '
226
+ </p>';
227
  }
228
 
229
  // If i am admin, i can edit all photos here, sorted by timestamp desc
230
  if ( wppa_user_is( 'administrator' ) ) {
231
+ echo '
232
+ <h3>' .
233
+ __( 'Manage all photos by timestamp', 'wp-photo-album-plus' ) . '
234
+ </h3>';
235
 
236
  $photos = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
237
  ORDER BY timestamp DESC
238
  LIMIT %d, %d", $skip, $pagesize ), ARRAY_A );
239
 
240
  $count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->wppa_photos" );
241
+ $link = wppa_dbg_url( get_admin_url() . 'admin.php?page=wppa_moderate_photos&wppa_nonce=' . wp_create_nonce( 'wppa_nonce' ) );
242
  }
243
 
244
  // Nothing to do
267
  // A specific photo requested
268
  if ( $photo ) {
269
  $photo = strval( intval( $photo ) );
270
+ echo '
271
+ <div id="photoitem-' . $photo . '" class="photoitem" style="width:100%; background-color: rgb( 255, 255, 224 ); border-color: rgb( 230, 219, 85 );" >
272
+ <span style="color:red;" >' .
273
+ sprintf( __( 'Photo %s has been removed.', 'wp-photo-album-plus' ), $photo ) . '
274
+ </span>
275
+ </div>';
276
  }
277
 
278
  // A collection of photos requested
280
 
281
  // Search
282
  if ( isset( $_REQUEST['wppa-searchstring'] ) ) {
283
+ echo '
284
+ <h3>' .
285
+ __( 'No photos matching your search criteria.', 'wp-photo-album-plus' ) . '
286
+ </h3>';
287
  }
288
 
289
  // Album
290
  else {
291
+ echo '
292
+ <h3>' .
293
+ __( 'No photos yet in this album.', 'wp-photo-album-plus' ) . '
294
+ </h3>';
295
  }
296
  }
297
 
575
  $modalbum = $album;
576
  }
577
 
578
+ // Anchor for scroll to
579
+ echo '<a id="photo_' . $id . '" ></a>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
580
 
581
+ // The photo data
582
+ echo '
583
+ <div
584
+ id="photoitem-' . $id . '"
585
+ class="wppa-table-wrap"
586
+ style="width:100%;position:relative;"
587
+ >';
588
 
589
+ // Photo specific nonce field
590
+ echo '
591
+ <input
592
+ type="hidden"
593
+ id="photo-nonce-' . $id . '"
594
+ value="' . wp_create_nonce( 'wppa_nonce_' . $id ) . '"
595
+ />';
596
+
597
+ // Section 1
598
+ echo '
599
+ <!-- Section 1 -->
600
+ <table
601
+ class="wppa-table wppa-photo-table"
602
+ style="width:100%;"
603
+ >
604
+ <tbody>
605
+ <tr>';
606
+
607
+ // -- Preview thumbnail ---
608
+ echo '
609
+ <td>';
610
  // If ImageMagick is enabled...
611
  // Fake 'for social media' to use the local file here, not cloudinary.
612
  // Files from cloudinary do not reload, even with ?ver=...
624
  if ( $is_video ) {
625
  reset( $is_video );
626
  $big = str_replace( 'xxx', current( $is_video ), $big );
627
+ echo '
628
+ <a
629
+ href="' . esc_attr( $big ) . '"
630
+ target="_blank"
631
+ title="' . esc_attr( __( 'Preview fullsize video' , 'wp-photo-album-plus') ) . '"
632
+ >' .
633
  wppa_get_video_html( array( 'id' => $id,
634
  'tagid' => 'video-' . $id,
635
  'width' => '160',
636
  'height' => '160' * wppa_get_videoy( $id ) / wppa_get_videox( $id ),
637
  'controls' => false,
638
  'use_thumb' => true
639
+ ) ) . '
640
+ </a>';
641
  }
642
  else {
643
  if ( $has_audio ) {
644
  $src = wppa_get_thumb_url( $id );
645
  $big = wppa_get_photo_url( $id );
646
  }
647
+ echo '
648
+ <a
649
+ id="thumba-' . $id . '"
650
+ href="' . esc_attr( $big ) . '"
651
+ target="_blank"
652
+ title="' . esc_attr( __( 'Preview fullsize photo', 'wp-photo-album-plus' ) ) . '"
653
+ >
654
+ <img
655
+ id="thumburl-' . $id . '"' .
656
+ ( wppa_switch( 'lazy' ) && $count > '1' ? 'data-' : '' ) . 'src="' . $src . '"
657
+ alt="' . esc_attr( $name ) . '"
658
+ style="max-width: 160px; vertical-align:middle;"' .
659
  ( wppa_switch( 'lazy' ) && $count > '1' ? ' class="wppa-lazy"' : '' ) .
660
+ ' />
661
+ </a>';
662
+
663
  if ( $has_audio ) {
664
  $audio = wppa_get_audio_html( array( 'id' => $id,
665
  'tagid' => 'audio-' . $id,
666
  'width' => '160',
667
  'controls' => true
668
  ) );
669
+ echo '
670
+ <br />' .
671
+ ( $audio ? $audio :
672
+ '<span style="color:red;">' .
673
+ __( 'Audio disabled', 'wp-photo-album-plus' ) .
674
+ '</span>' );
675
  }
676
  }
677
+ echo '
678
+ </td>';
679
 
680
+ // --- More or less static data ---
681
+ echo '
682
+ <td>' .
 
683
 
684
  // ID
685
  'ID = ' . strval( intval( $id ) ) . '. ' .
691
  __( 'Filename:', 'wp-photo-album-plus' ) . ' ' . htmlspecialchars( $filename ) . '. ' .
692
 
693
  // Upload
694
+ __( 'Upload:', 'wp-photo-album-plus' ) . ' ' . htmlentities( wppa_local_date( '', $timestamp ) ) . ' ' .
695
+ __( 'local time', 'wp-photo-album-plus' ) . '. ';
696
 
697
  // Owner
698
  if ( $owner_editable ) {
699
  echo
700
+ __( 'Owned by:', 'wp-photo-album-plus' ) . '
701
+ <input
702
+ type="text"
703
+ onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'owner\', this.value )"
704
+ value="' . esc_attr( $owner ) . '"
705
+ /> ';
706
  }
707
  else {
708
  echo
709
+ __( 'By:', 'wp-photo-album-plus' ) . ' ' . htmlentities( $owner ) . '. ';
710
  }
711
 
712
  // Album
716
  $deleted = true;
717
  }
718
  echo
719
+ sprintf( __( 'Album: %d (%s).', 'wp-photo-album-plus' ), strval( intval( $album ) ), htmlentities( wppa_get_album_name( $album ) ) ) . ' ';
720
 
721
  // Modified
722
  if ( $deleted ) {
723
+ echo '
724
+ <span style="color:red;" >' .
725
+ __( 'Trashed', 'wp-photo-album-plus' ) . '
726
+ </span>';
727
  }
728
  else {
729
  if ( $modified > $timestamp ) {
730
  echo
731
+ __( 'Modified:', 'wp-photo-album-plus' ) . '
732
+ <span id="modified-' . $id . '" >' .
733
+ wppa_local_date( '', $modified ) . '
734
+ </span>' .
735
+ __( 'local time', 'wp-photo-album-plus' );
736
  }
737
  else {
738
  echo
739
+ __( 'Not modified', 'wp-photo-album-plus' );
740
  }
741
  }
742
  echo
745
  // Exif
746
  __( 'EXIF Date:', 'wp-photo-album-plus' );
747
  if ( wppa_user_is( 'administrator' ) ) { // Admin may edit exif date
748
+ echo '
749
+ <input
750
+ type="text"
751
+ style="width:125px;"
752
+ onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'exifdtm\', this.value)"
753
+ value="' . esc_attr( $exifdtm ) . '"
754
+ />';
755
  }
756
  else {
757
  echo htmlentities( $exifdtm ) . '.';
762
  // Location
763
  if ( $photo['location'] || wppa_switch( 'geo_edit' ) ) {
764
  echo
765
+ __( 'Location:' , 'wp-photo-album-plus' ) . ' ';
766
  $loc = $location ? $location : '///';
767
  $geo = explode( '/', $loc );
768
 
771
 
772
  if ( wppa_switch( 'geo_edit' ) ) {
773
  echo
774
+ __( 'Lat:', 'wp-photo-album-plus' ) . '
775
+ <input
776
+ type="text"
777
+ style="width:100px;"
778
+ id="lat-' . $id . '"
779
+ onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'lat\', this.value);"
780
+ value="' . esc_attr( $geo['2'] ) . '"
781
+ />' .
782
+ __( 'Lon:', 'wp-photo-album-plus' ) . '
783
+ <input type="text"
784
+ style="width:100px;"
785
+ id="lon-' . $id . '"
786
+ onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'lon\', this.value);"
787
+ value="' . esc_attr( $geo['3'] ) . '"
788
+ />';
789
  }
790
  }
791
 
793
  echo
794
  __( 'Photo sort order #:', 'wp-photo-album-plus' );
795
  if ( $sortby_orderno && ( ! wppa_switch( 'porder_restricted' ) || wppa_user_is( 'administrator' ) ) ) {
796
+ echo '
797
+ <input
798
+ type="text"
799
+ id="porder-' . $id . '"
800
+ value="' . esc_attr( $p_order ) . '"
801
+ style="width:30px;"
802
+ onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'p_order\', this.value)"
803
+ />' .
804
  ' ';
805
  }
806
  else {
807
  echo
808
+ ' ' . htmlentities( $p_order ) . '. ';
809
  }
810
 
811
+ /*HBI*/ // Rating
812
  $entries = wppa_get_rating_count_by_id( $id );
813
  if ( $entries ) {
814
 
2510
  $message = sprintf( __( '%d photos deleted.' , 'wp-photo-album-plus'), $count );
2511
  break;
2512
  case 'wppa-bulk-move-to':
2513
+ $message = sprintf( __( '%1$s photos moved to album %2$s.' , 'wp-photo-album-plus'), $count, $newalb.': ' . wppa_get_album_name( $newalb ) );
2514
  break;
2515
  case 'wppa-bulk-copy-to':
2516
+ $message = sprintf( __( '%1$s photos copied to album %2$s.' , 'wp-photo-album-plus'), $count, $newalb.': ' . wppa_get_album_name( $newalb ) );
2517
  break;
2518
  case 'wppa-bulk-status':
2519
  $message = sprintf( __( 'Changed status to %1$s on %2$s photos.' , 'wp-photo-album-plus'), $status, $count );
2525
  $message = sprintf( __( '%d photos processed.' , 'wp-photo-album-plus'), $count );
2526
  break;
2527
  }
2528
+ wppa_ok_message( $message );
2529
  }
2530
  }
2531
 
2886
  <!-- Preview -->
2887
  <td style="min-width:240px; text-align:center;" >
2888
  <?php if ( wppa_is_video( $photo['id'] ) ) { ?>
2889
+ <a href="<?php echo esc_url( str_replace( 'xxx', 'mp4', wppa_get_photo_url( $photo['id'] ) ) ) ?>" target="_blank" title="<?php esc_attr( __('Click to see fullsize', 'wp-photo-album-plus') ) ?>" >
2890
  <?php // Animating size changes of a video tag is not a good idea. It will rapidly screw up browser cache and cpu ?>
2891
  <?php echo wppa_get_video_html( array(
2892
  'id' => $id,
2919
  '<a' .
2920
  ' href="' . esc_url( wppa_get_photo_url( $photo['id'] ) ) . '"' .
2921
  ' target="_blank"' .
2922
+ ' title="' . esc_attr( __( 'Click to see fullsize', 'wp-photo-album-plus' ) ) . '"' .
2923
  ' >' .
2924
  '<img' .
2925
  ' class="wppa-bulk-thumb ' . ( wppa_switch( 'lazy' ) ? 'wppa-lazy' : '' ) . '"' .
wppa-settings-autosave.php CHANGED
@@ -9885,6 +9885,15 @@ global $wppa_supported_camara_brands;
9885
  $tags = 'system,search';
9886
  wppa_setting($slug, '22', $name, $desc, $html, $help, $clas, $tags);
9887
 
 
 
 
 
 
 
 
 
 
9888
  }
9889
  wppa_setting_subheader( 'F', '1', __( 'Watermark related settings' , 'wp-photo-album-plus') );
9890
  {
9885
  $tags = 'system,search';
9886
  wppa_setting($slug, '22', $name, $desc, $html, $help, $clas, $tags);
9887
 
9888
+ $name = __('Search form method', 'wp-photo-album-plus');
9889
+ $desc = __('Either "get" or "post"', 'wp-photo-album-plus');
9890
+ $help = __('May be set to "get" to avoid conflicts with other plugins or certain php versions', 'wp-photo-album-plus');
9891
+ $slug = 'wppa_search_form_method';
9892
+ $html = wppa_select($slug, array('post', 'get'), array('post', 'get'));
9893
+ $clas = '';
9894
+ $tags = 'system,search';
9895
+ wppa_setting($slug, '23', $name, $desc, $html, $help, $clas, $tags);
9896
+
9897
  }
9898
  wppa_setting_subheader( 'F', '1', __( 'Watermark related settings' , 'wp-photo-album-plus') );
9899
  {
wppa-setup.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
- * Version 7.2.14
7
  *
8
  */
9
 
@@ -1759,7 +1759,7 @@ cursorborder:'2px solid transparent',";
1759
  'wppa_login_url' => site_url( 'wp-login.php', 'login' ), // A
1760
  'wppa_cache_root' => 'cache',
1761
  'wppa_direct_comment' => 'no',
1762
- 'wppa_extended_resize_count' => '0',
1763
  'wppa_extended_resize_delay' => '200',
1764
  'wppa_load_nicescroller' => 'no',
1765
 
@@ -1846,6 +1846,7 @@ cursorborder:'2px solid transparent',";
1846
  'wppa_search_selbox_2' => '',
1847
  'wppa_extended_duplicate_remove' => 'no',
1848
  'wppa_search_placeholder' => __( 'Search photos &hellip;', 'wp-photo-album-plus' ),
 
1849
 
1850
  // F Watermark
1851
  'wppa_watermark_on' => 'no',
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 7.2.15
7
  *
8
  */
9
 
1759
  'wppa_login_url' => site_url( 'wp-login.php', 'login' ), // A
1760
  'wppa_cache_root' => 'cache',
1761
  'wppa_direct_comment' => 'no',
1762
+ 'wppa_extended_resize_count' => '1',
1763
  'wppa_extended_resize_delay' => '200',
1764
  'wppa_load_nicescroller' => 'no',
1765
 
1846
  'wppa_search_selbox_2' => '',
1847
  'wppa_extended_duplicate_remove' => 'no',
1848
  'wppa_search_placeholder' => __( 'Search photos &hellip;', 'wp-photo-album-plus' ),
1849
+ 'wppa_search_form_method' => 'post',
1850
 
1851
  // F Watermark
1852
  'wppa_watermark_on' => 'no',
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
- * Version 7.2.14
7
  *
8
  */
9
 
@@ -1020,22 +1020,31 @@ function wppa_txt_to_nl($text) {
1020
  return str_replace('\n', "\n", $text);
1021
  }
1022
 
1023
- // Check query arg on tags
1024
- function wppa_vfy_arg($arg, $txt = false) {
1025
- if ( isset($_REQUEST[$arg]) ) {
1026
  if ( $txt ) { // Text is allowed, but without tags
1027
- $reason = ( defined('WP_DEBUG') && WP_DEBUG ) ? ': '.$arg.' contains tags.' : '';
1028
- if ( $_REQUEST[$arg] != strip_tags($_REQUEST[$arg]) ) wp_die('Security check failue'.$reason);
 
 
 
1029
  }
1030
  else {
1031
- $reason = ( defined('WP_DEBUG') && WP_DEBUG ) ? ': '.$arg.' is not numeric.' : '';
1032
  $value = $_REQUEST[$arg];
1033
  if ( $arg == 'photo-id' ) {
1034
  $value = wppa_decrypt_photo( trim( $value. '/' ), false, true );
1035
  }
1036
- if ( ! is_numeric($value) ) wp_die('Security check failue'.$reason);
 
 
 
1037
  }
1038
  }
 
 
 
1039
  }
1040
 
1041
  // Strip tags with content
@@ -2345,19 +2354,23 @@ static $childcounts;
2345
 
2346
  // Get an enumeration of all the (grand)children of some album spec.
2347
  // Album spec may be a number or an enumeration
2348
- function wppa_alb_to_enum_children( $xalb ) {
 
 
2349
 
2350
- if ( strpos( $xalb, '.' ) !== false ) {
2351
- $albums = explode( '.', $xalb );
2352
  }
2353
  else {
2354
- $albums = array( $xalb );
2355
  }
2356
  $result = '';
2357
  foreach( $albums as $alb ) {
2358
  $result .= _wppa_alb_to_enum_children( $alb );
2359
  $result = trim( $result, '.' ).'.';
2360
  }
 
 
2361
  $result = trim( $result, '.' );
2362
 
2363
  return $result;
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 7.2.15
7
  *
8
  */
9
 
1020
  return str_replace('\n', "\n", $text);
1021
  }
1022
 
1023
+ // Check query arg on tags, return value if valid
1024
+ function wppa_vfy_arg( $arg, $txt = false ) {
1025
+ if ( isset( $_REQUEST[$arg] ) ) {
1026
  if ( $txt ) { // Text is allowed, but without tags
1027
+ $reason = ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ? ': ' . $arg . ' contains tags.' : '';
1028
+ if ( $_REQUEST[$arg] != strip_tags( $_REQUEST[$arg] ) ) {
1029
+ wp_die( 'Security check failue ' . $reason );
1030
+ }
1031
+ return $_REQUEST[$arg];
1032
  }
1033
  else {
1034
+ $reason = ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ? ': ' . $arg . ' is not numeric.' : '';
1035
  $value = $_REQUEST[$arg];
1036
  if ( $arg == 'photo-id' ) {
1037
  $value = wppa_decrypt_photo( trim( $value. '/' ), false, true );
1038
  }
1039
+ if ( ! is_numeric( $value ) ) {
1040
+ wp_die( 'Security check failue ' . $reason );
1041
+ }
1042
+ return $value;
1043
  }
1044
  }
1045
+ else {
1046
+ return '';
1047
+ }
1048
  }
1049
 
1050
  // Strip tags with content
2354
 
2355
  // Get an enumeration of all the (grand)children of some album spec.
2356
  // Album spec may be a number or an enumeration
2357
+ function wppa_alb_to_enum_children( $xparents ) {
2358
+
2359
+ $parents = wppa_expand_enum( $xparents );
2360
 
2361
+ if ( strpos( $parents, '.' ) !== false ) {
2362
+ $albums = explode( '.', $parents );
2363
  }
2364
  else {
2365
+ $albums = array( $parents );
2366
  }
2367
  $result = '';
2368
  foreach( $albums as $alb ) {
2369
  $result .= _wppa_alb_to_enum_children( $alb );
2370
  $result = trim( $result, '.' ).'.';
2371
  }
2372
+ $result = str_replace( '-1', '', $result );
2373
+ $result = str_replace( '..', '.', $result );
2374
  $result = trim( $result, '.' );
2375
 
2376
  return $result;
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: 7.2.14.008
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/
@@ -22,8 +22,8 @@ global $wpdb;
22
  global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
- global $wppa_revno; $wppa_revno = '7214'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '7.2.14.008'; // WPPA software version
27
 
28
  /* Init page js data */
29
  global $wppa_js_page_data; $wppa_js_page_data = '';
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: 7.2.15.006
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/
22
  global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
+ global $wppa_revno; $wppa_revno = '7215'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '7.2.15.006'; // WPPA software version
27
 
28
  /* Init page js data */
29
  global $wppa_js_page_data; $wppa_js_page_data = '';