WP Photo Album Plus - Version 8.2.04.002

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

Code changes from version 8.2.04.001 to 8.2.04.002

changelog.txt CHANGED
@@ -1,10 +1,15 @@
1
  WP Photo Album Plus Changelog
2
 
3
- = 8.3.01 =
 
 
 
 
 
4
 
5
  * The display of the album and photo admin page has been restructured. Phase II
6
  * You can now enter exif dates ending in 00 min and 00 sec.
7
- * New album setting: Max children. This setting only limits the creation of child albums at the frontend and looks at first generation children only.
8
 
9
  = 8.2.02 =
10
 
1
  WP Photo Album Plus Changelog
2
 
3
+ = 8.2.04 =
4
+
5
+ * The width and height of portrait oriented mp4 videos is now properly recorded.
6
+ * The dirs wp-content/cache and wp-content/widget-cache are now skipped when scanning for importable files.
7
+
8
+ = 8.2.03 =
9
 
10
  * The display of the album and photo admin page has been restructured. Phase II
11
  * You can now enter exif dates ending in 00 min and 00 sec.
12
+ * New album setting: Max subalbums. This setting only limits the creation of sub albums at the frontend and looks at direct subalbums only.
13
 
14
  = 8.2.02 =
15
 
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.02.010
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.03.006
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.03.004
5
  */
6
  #files_list, #files_list2
7
  {
@@ -589,9 +589,7 @@ details.hidden {
589
  align-items: stretch;
590
  row-gap: 20px;
591
  grid-row-gap: 20px;
592
- row-gap: 20px;
593
  padding: 10px;
594
-
595
  }
596
 
597
  .wppa-flex {
@@ -600,6 +598,7 @@ details.hidden {
600
  align-items: flex-start;
601
  align-content: space-between;
602
  padding: 10px;
 
603
  }
604
 
605
  .wppa-flex div {
1
  /* admin-styles.css
2
  *
3
  * wp-photo-album-plus
4
+ * version 8.2.04.002
5
  */
6
  #files_list, #files_list2
7
  {
589
  align-items: stretch;
590
  row-gap: 20px;
591
  grid-row-gap: 20px;
 
592
  padding: 10px;
 
593
  }
594
 
595
  .wppa-flex {
598
  align-items: flex-start;
599
  align-content: space-between;
600
  padding: 10px;
601
+ row-gap: 8px;
602
  }
603
 
604
  .wppa-flex div {
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
- * Version 8.2.03.006
6
  *
7
  */
8
 
@@ -1082,7 +1082,7 @@ global $wppa;
1082
  <div
1083
  id="wppa-gutenberg-div-' . $wppa['mocc'] . '"
1084
  style="position:relative;width:100%" >
1085
- <div style="font-size:12px;color:green;margin-bottom:2px;width:100%;text-align:center">
1086
  <i>(' . esc_html( __('Links and buttons will not work in this preview', 'wp-photo-album-plus' ) ) . ')</i>
1087
  </div>' .
1088
  $result . '
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
+ * Version 8.2.04.002
6
  *
7
  */
8
 
1082
  <div
1083
  id="wppa-gutenberg-div-' . $wppa['mocc'] . '"
1084
  style="position:relative;width:100%" >
1085
+ <div class="wppa-preview-caption" style="font-size:12px;color:green;margin-bottom:2px;width:100%;text-align:center">
1086
  <i>(' . esc_html( __('Links and buttons will not work in this preview', 'wp-photo-album-plus' ) ) . ')</i>
1087
  </div>' .
1088
  $result . '
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.03.006
7
  *
8
  */
9
 
@@ -615,7 +615,7 @@ jQuery(document).ready(function(){wppaGetCoverPreview( '.$id.', "cover-preview-"
615
  wppa_echo( '
616
  <details class="wppa-toplevel-details" ' . ( $timestamp > time() - 3600 ? 'open' : '' ) . '>
617
  <summary class="toplevel wppa-summary-toplevel"> ' .
618
- __( 'the gallery settings', 'wp-photo-album-plus' ) . '
619
  </summary>' );
620
 
621
  // Expalanation
@@ -1912,7 +1912,7 @@ jQuery(document).ready(function(){wppaGetCoverPreview( '.$id.', "cover-preview-"
1912
 
1913
  // wppaGetCoverPreview( albumId, divId )
1914
  // Preview album cover
1915
- wppa_echo( '<div id="cover-preview-'.$id.'" style="margin-top:12px;clear:both;max-width:100%"></div>' );
1916
 
1917
  wppa_echo('</fieldset>');
1918
 
@@ -2603,6 +2603,7 @@ global $wpdb;
2603
 
2604
  $downimg = '<img src="'.wppa_get_imgdir().'down.png" alt="down" style="height:12px;position:relative;top:2px" />';
2605
  $upimg = '<img src="'.wppa_get_imgdir().'up.png" alt="up" style="height:12px;position:relative;top:2px" />';
 
2606
  $show_nl = wppa_opt( 'user_create_max_level' ) != '99';
2607
  $url = get_admin_url().'admin.php?page=wppa_admin_menu&amp;order_by=';
2608
 
@@ -2621,7 +2622,7 @@ global $wpdb;
2621
  >
2622
  <a href="' . wppa_dbg_url( $url . 'id' ) . '">' .
2623
  ( $show_nl ? __( 'ID(nl)', 'wp-photo-album-plus' ) : __( 'ID', 'wp-photo-album-plus' ) ) .
2624
- ( $order == 'id' && $reverse ? $upimg : $downimg ) . '
2625
  </a>
2626
  </td>
2627
  <td
@@ -2629,13 +2630,13 @@ global $wpdb;
2629
  >
2630
  <a href="' . wppa_dbg_url( $url . 'name' ) . '">' .
2631
  __( 'Name', 'wp-photo-album-plus' ) .
2632
- ( $order == 'name' && $reverse ? $upimg : $downimg ) . '
2633
  </a>
2634
  </td>
2635
  <td>
2636
  <a href="' . wppa_dbg_url( $url . 'description' ) . '">' .
2637
  __( 'Description', 'wp-photo-album-plus' ) .
2638
- ( $order == 'description' && $reverse ? $upimg : $downimg ) . '
2639
  </a>
2640
  </td>';
2641
  if ( current_user_can( 'administrator' ) ) {
@@ -2643,7 +2644,7 @@ global $wpdb;
2643
  <td style="min-width: 100px;">
2644
  <a href="' . wppa_dbg_url( $url . 'owner' ) . '">' .
2645
  __( 'Owner', 'wp-photo-album-plus' ) .
2646
- ( $order == 'owner' && $reverse ? $upimg : $downimg ) . '
2647
  </a>
2648
  </td>';
2649
  }
@@ -2653,7 +2654,7 @@ global $wpdb;
2653
  >
2654
  <a href="' . wppa_dbg_url( $url . 'a_order' ) . '">' .
2655
  __( 'Order', 'wp-photo-album-plus' ) .
2656
- ( $order == 'a_order' && $reverse ? $upimg : $downimg ) . '
2657
  </a>
2658
  </td>
2659
  <td
@@ -2661,7 +2662,7 @@ global $wpdb;
2661
  >
2662
  <a href="' . wppa_dbg_url( $url . 'a_parent' ) . '">' .
2663
  __( 'Parent', 'wp-photo-album-plus' ) .
2664
- ( $order == 'a_parent' && $reverse ? $upimg : $downimg ) . '
2665
  </a>
2666
  </td>
2667
  <td
@@ -2928,6 +2929,7 @@ global $wpdb;
2928
 
2929
  $downimg = '<img src="'.wppa_get_imgdir().'down.png" alt="down" style="height:12px;position:relative;top:2px" />';
2930
  $upimg = '<img src="'.wppa_get_imgdir().'up.png" alt="up" style="height:12px;position:relative;top:2px" />';
 
2931
  $url = get_admin_url() . 'admin.php?page=wppa_admin_menu&amp;order_by=';
2932
 
2933
  $result = wppa_album_table_pagination( $page, $count ) . '
@@ -2946,7 +2948,7 @@ global $wpdb;
2946
  >
2947
  <a href="' . wppa_dbg_url( $url . 'id' ) . '">' .
2948
  ( $show_nl ? __( 'ID(nl)', 'wp-photo-album-plus' ) : __( 'ID', 'wp-photo-album-plus' ) ) .
2949
- ( $order == 'id' && $reverse ? $upimg : $downimg ) . '
2950
  </a>
2951
  </td>
2952
  <td
@@ -2954,13 +2956,13 @@ global $wpdb;
2954
  >
2955
  <a href="' . wppa_dbg_url( $url . 'name' ) . '">' .
2956
  __( 'Name', 'wp-photo-album-plus' ) .
2957
- ( $order == 'name' && $reverse ? $upimg : $downimg ) . '
2958
  </a>
2959
  </td>
2960
  <td>
2961
  <a href="' . wppa_dbg_url( $url . 'description' ) . '">' .
2962
  __( 'Description', 'wp-photo-album-plus' ) .
2963
- ( $order == 'description' && $reverse ? $upimg : $downimg ) . '
2964
  </a>
2965
  </td>';
2966
  if ( current_user_can( 'administrator' ) ) {
@@ -2968,7 +2970,7 @@ global $wpdb;
2968
  <td style="min-width: 100px;">
2969
  <a href="' . wppa_dbg_url( $url . 'owner' ) . '">' .
2970
  __( 'Owner', 'wp-photo-album-plus' ) .
2971
- ( $order == 'owner' && $reverse ? $upimg : $downimg ) . '
2972
  </a>
2973
  </td>';
2974
  }
@@ -2978,7 +2980,7 @@ global $wpdb;
2978
  >
2979
  <a href="' . wppa_dbg_url( $url . 'a_order' ) . '">' .
2980
  __( 'Sequence', 'wp-photo-album-plus' ) .
2981
- ( $order == 'a_order' && $reverse ? $upimg : $downimg ) . '
2982
  </a>
2983
  </td>
2984
  <td
@@ -2986,7 +2988,7 @@ global $wpdb;
2986
  >
2987
  <a href="' . wppa_dbg_url( $url . 'a_parent' ) . '">' .
2988
  __( 'Parent', 'wp-photo-album-plus' ) .
2989
- ( $order == 'a_parent' && $reverse ? $upimg : $downimg ) . '
2990
  </a>
2991
  </td>
2992
  <td
@@ -3648,59 +3650,61 @@ global $wpdb;
3648
  }
3649
  }
3650
 
3651
- // Subalbum order
3652
- {
3653
- $sel = ' selected';
3654
- $opts = array(
3655
- __( '--- default ---', 'wp-photo-album-plus' ),
3656
- __( 'Random', 'wp-photo-album-plus' ),
3657
- __( 'Sequence #', 'wp-photo-album-plus' ),
3658
- __( 'Sequence # descending', 'wp-photo-album-plus' ),
3659
- __( 'Name', 'wp-photo-album-plus' ),
3660
- __( 'Name descending', 'wp-photo-album-plus' ),
3661
- __( 'Timestamp', 'wp-photo-album-plus' ),
3662
- __( 'Timestamp descending', 'wp-photo-album-plus' ),
3663
- );
3664
- $vals = array( '0', '3', '1', '-1', '2', '-2', '5', '-5' );
3665
-
3666
- $df = wppa_opt( 'list_albums_by' );
3667
- if ( $df == '0' ) $dflt = __( 'not specified', 'wp-photo-album-plus' );
3668
- else foreach( array_keys( $vals ) as $key ) {
3669
- if ( $df == $vals[$key] ) {
3670
- $dflt = $opts[$key];
3671
- }
3672
- }
3673
- }
3674
- $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 );
3675
- $suba_order_by = wppa_get_album_item( $parent, 'suba_order_by' );
3676
- $result = '
3677
- <div style="margin-left:6px">
3678
- <label
3679
- for="subalbumorder">' .
3680
- __( 'Subalbum sequence method', 'wp-photo-album-plus' ) . '
3681
- </label><br>
3682
- <select
3683
- id="subalbumorder"
3684
- style="max-width:200px;"
3685
- onchange="
3686
- wppaAjaxUpdateAlbum( ' . $parent . ', \'suba_order_by\', this );
3687
- var ord=Math.abs(jQuery(this).val());
3688
- var dft=Math.abs(' . wppa_opt('wppa_list_albums_by') . ');
3689
- if (ord == 1 || (ord == 0 && dft == 1)) {
3690
- jQuery(\'#wppa-album-sequence\').show();
3691
- }
3692
- else {
3693
- jQuery(\'#wppa-album-sequence\').hide();
3694
- }"
3695
- title="' . esc_attr( $title ) . '"
3696
- >';
3697
- for ( $i = 0; $i < 7; $i++ ) {
3698
- $result .= '<option value="' . esc_attr( $vals[$i] ) . '" ' . ( $suba_order_by == $vals[$i] ? $sel : '' ) . ' >' . $opts[$i] . '</option>';
3699
- }
3700
- $result .= '
3701
- </select>
3702
- </div>';
3703
- wppa_echo( $result );
 
 
3704
 
3705
  // Check album order
3706
  if ( $albumorder_col != 'a_order' ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
+ * Version 8.2.04.002
7
  *
8
  */
9
 
615
  wppa_echo( '
616
  <details class="wppa-toplevel-details" ' . ( $timestamp > time() - 3600 ? 'open' : '' ) . '>
617
  <summary class="toplevel wppa-summary-toplevel"> ' .
618
+ __( 'the album settings', 'wp-photo-album-plus' ) . '
619
  </summary>' );
620
 
621
  // Expalanation
1912
 
1913
  // wppaGetCoverPreview( albumId, divId )
1914
  // Preview album cover
1915
+ wppa_echo( '<div id="cover-preview-'.$id.'" style="clear:both;max-width:100%"></div>' );
1916
 
1917
  wppa_echo('</fieldset>');
1918
 
2603
 
2604
  $downimg = '<img src="'.wppa_get_imgdir().'down.png" alt="down" style="height:12px;position:relative;top:2px" />';
2605
  $upimg = '<img src="'.wppa_get_imgdir().'up.png" alt="up" style="height:12px;position:relative;top:2px" />';
2606
+ $useimg = $reverse ? $upimg : $downimg;
2607
  $show_nl = wppa_opt( 'user_create_max_level' ) != '99';
2608
  $url = get_admin_url().'admin.php?page=wppa_admin_menu&amp;order_by=';
2609
 
2622
  >
2623
  <a href="' . wppa_dbg_url( $url . 'id' ) . '">' .
2624
  ( $show_nl ? __( 'ID(nl)', 'wp-photo-album-plus' ) : __( 'ID', 'wp-photo-album-plus' ) ) .
2625
+ ( $order == 'id' ? $useimg : '' ) . '
2626
  </a>
2627
  </td>
2628
  <td
2630
  >
2631
  <a href="' . wppa_dbg_url( $url . 'name' ) . '">' .
2632
  __( 'Name', 'wp-photo-album-plus' ) .
2633
+ ( $order == 'name' ? $useimg : '' ) . '
2634
  </a>
2635
  </td>
2636
  <td>
2637
  <a href="' . wppa_dbg_url( $url . 'description' ) . '">' .
2638
  __( 'Description', 'wp-photo-album-plus' ) .
2639
+ ( $order == 'description' ? $useimg : '' ) . '
2640
  </a>
2641
  </td>';
2642
  if ( current_user_can( 'administrator' ) ) {
2644
  <td style="min-width: 100px;">
2645
  <a href="' . wppa_dbg_url( $url . 'owner' ) . '">' .
2646
  __( 'Owner', 'wp-photo-album-plus' ) .
2647
+ ( $order == 'owner' ? $useimg : '' ) . '
2648
  </a>
2649
  </td>';
2650
  }
2654
  >
2655
  <a href="' . wppa_dbg_url( $url . 'a_order' ) . '">' .
2656
  __( 'Order', 'wp-photo-album-plus' ) .
2657
+ ( $order == 'a_order' ? $useimg : '' ) . '
2658
  </a>
2659
  </td>
2660
  <td
2662
  >
2663
  <a href="' . wppa_dbg_url( $url . 'a_parent' ) . '">' .
2664
  __( 'Parent', 'wp-photo-album-plus' ) .
2665
+ ( $order == 'a_parent' ? $useimg : '' ) . '
2666
  </a>
2667
  </td>
2668
  <td
2929
 
2930
  $downimg = '<img src="'.wppa_get_imgdir().'down.png" alt="down" style="height:12px;position:relative;top:2px" />';
2931
  $upimg = '<img src="'.wppa_get_imgdir().'up.png" alt="up" style="height:12px;position:relative;top:2px" />';
2932
+ $useimg = $reverse ? $upimg : $downimg;
2933
  $url = get_admin_url() . 'admin.php?page=wppa_admin_menu&amp;order_by=';
2934
 
2935
  $result = wppa_album_table_pagination( $page, $count ) . '
2948
  >
2949
  <a href="' . wppa_dbg_url( $url . 'id' ) . '">' .
2950
  ( $show_nl ? __( 'ID(nl)', 'wp-photo-album-plus' ) : __( 'ID', 'wp-photo-album-plus' ) ) .
2951
+ ( $order == 'id' ? $useimg : '' ) . '
2952
  </a>
2953
  </td>
2954
  <td
2956
  >
2957
  <a href="' . wppa_dbg_url( $url . 'name' ) . '">' .
2958
  __( 'Name', 'wp-photo-album-plus' ) .
2959
+ ( $order == 'name' ? $useimg : '' ) . '
2960
  </a>
2961
  </td>
2962
  <td>
2963
  <a href="' . wppa_dbg_url( $url . 'description' ) . '">' .
2964
  __( 'Description', 'wp-photo-album-plus' ) .
2965
+ ( $order == 'description' ? $useimg : '' ) . '
2966
  </a>
2967
  </td>';
2968
  if ( current_user_can( 'administrator' ) ) {
2970
  <td style="min-width: 100px;">
2971
  <a href="' . wppa_dbg_url( $url . 'owner' ) . '">' .
2972
  __( 'Owner', 'wp-photo-album-plus' ) .
2973
+ ( $order == 'owner' ? $useimg : '' ) . '
2974
  </a>
2975
  </td>';
2976
  }
2980
  >
2981
  <a href="' . wppa_dbg_url( $url . 'a_order' ) . '">' .
2982
  __( 'Sequence', 'wp-photo-album-plus' ) .
2983
+ ( $order == 'a_order' ? $useimg : '' ) . '
2984
  </a>
2985
  </td>
2986
  <td
2988
  >
2989
  <a href="' . wppa_dbg_url( $url . 'a_parent' ) . '">' .
2990
  __( 'Parent', 'wp-photo-album-plus' ) .
2991
+ ( $order == 'a_parent' ? $useimg : '' ) . '
2992
  </a>
2993
  </td>
2994
  <td
3650
  }
3651
  }
3652
 
3653
+ // Subalbum order
3654
+ if ( $parent ) {
3655
+
3656
+ $sel = ' selected';
3657
+ $opts = array(
3658
+ __( '--- default ---', 'wp-photo-album-plus' ),
3659
+ __( 'Random', 'wp-photo-album-plus' ),
3660
+ __( 'Sequence #', 'wp-photo-album-plus' ),
3661
+ __( 'Sequence # descending', 'wp-photo-album-plus' ),
3662
+ __( 'Name', 'wp-photo-album-plus' ),
3663
+ __( 'Name descending', 'wp-photo-album-plus' ),
3664
+ __( 'Timestamp', 'wp-photo-album-plus' ),
3665
+ __( 'Timestamp descending', 'wp-photo-album-plus' ),
3666
+ );
3667
+ $vals = array( '0', '3', '1', '-1', '2', '-2', '5', '-5' );
3668
+
3669
+ $df = wppa_opt( 'list_albums_by' );
3670
+ if ( $df == '0' ) $dflt = __( 'not specified', 'wp-photo-album-plus' );
3671
+ else foreach( array_keys( $vals ) as $key ) {
3672
+ if ( $df == $vals[$key] ) {
3673
+ $dflt = $opts[$key];
3674
+ }
3675
+ }
3676
+
3677
+ $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 );
3678
+ $suba_order_by = wppa_get_album_item( $parent, 'suba_order_by' );
3679
+ $result = '
3680
+ <div style="margin-left:6px">
3681
+ <label
3682
+ for="subalbumorder">' .
3683
+ __( 'Subalbum sequence method', 'wp-photo-album-plus' ) . '
3684
+ </label><br>
3685
+ <select
3686
+ id="subalbumorder"
3687
+ style="max-width:200px;"
3688
+ onchange="
3689
+ wppaAjaxUpdateAlbum( ' . $parent . ', \'suba_order_by\', this );
3690
+ var ord=Math.abs(jQuery(this).val());
3691
+ var dft=Math.abs(' . wppa_opt('wppa_list_albums_by') . ');
3692
+ if (ord == 1 || (ord == 0 && dft == 1)) {
3693
+ jQuery(\'#wppa-album-sequence\').show();
3694
+ }
3695
+ else {
3696
+ jQuery(\'#wppa-album-sequence\').hide();
3697
+ }"
3698
+ title="' . esc_attr( $title ) . '"
3699
+ >';
3700
+ for ( $i = 0; $i < 7; $i++ ) {
3701
+ $result .= '<option value="' . esc_attr( $vals[$i] ) . '" ' . ( $suba_order_by == $vals[$i] ? $sel : '' ) . ' >' . $opts[$i] . '</option>';
3702
+ }
3703
+ $result .= '
3704
+ </select>
3705
+ </div>';
3706
+ wppa_echo( $result );
3707
+ }
3708
 
3709
  // Check album order
3710
  if ( $albumorder_col != 'a_order' ) {
wppa-album-covers.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for album covers
6
- * Version 8.2.03.006
7
  *
8
  */
9
 
@@ -1756,31 +1756,38 @@ function wppa_album_cover_view_link(
1756
  $ntp = $treecount['treephotos'] > $photocount ? $treecount['treephotos'] : '';
1757
  $ntpx = $treecount['treephotos'] > $photocount ? $treecount['treephotos'] : $photocount;
1758
 
1759
- $text = __( 'View' , 'wp-photo-album-plus' ) . ' ';
1760
 
1761
  if ( wppa_opt( 'show_treecount' ) == 'total' ) {
1762
  if ( $ntax ) {
1763
- $text .= sprintf( _n( '%d album', '%d albums', $ntax, 'wp-photo-album-plus' ), $ntax ) . ' ';
1764
  }
1765
  if ( $ntpx ) {
1766
- $text .= sprintf( _n( '%d photo', '%d photos', $ntpx, 'wp-photo-album-plus' ), $ntpx ) . ' ';
1767
  }
1768
  }
1769
  else {
1770
- if ( $na ) {
1771
- $text .= sprintf( _n( '%d album', '%d albums', $na, 'wp-photo-album-plus' ), $na ) . ' ';
 
 
 
 
 
 
 
 
 
 
 
1772
  }
1773
- if ( $nta ) {
1774
- $text .= '(' . $nta . ') ';
1775
- }
1776
- if ( ( $na || $nta ) && ( $np || $ntp ) ) {
1777
- $text .= __( 'and' ,'wp-photo-album-plus' ) . ' ';
1778
- }
1779
- if ( $np || $ntp ) {
1780
- $text .= sprintf( _n( '%d photo', '%d photos', $np, 'wp-photo-album-plus' ), $np ) . ' ';
1781
- }
1782
- if ( $ntp ) {
1783
- $text .= '(' . $ntp . ')';
1784
  }
1785
  }
1786
 
@@ -1853,9 +1860,11 @@ function wppa_the_album_title( $alb, $href_title, $onclick_title, $title, $targe
1853
  $fsize = '12';
1854
  if ( wppa_is_album_new( $alb ) ) {
1855
  $type = 'new';
 
1856
  }
1857
  elseif ( wppa_is_album_modified( $alb ) ) {
1858
  $type = 'mod';
 
1859
  }
1860
  else {
1861
  $type = '';
@@ -1865,34 +1874,30 @@ function wppa_the_album_title( $alb, $href_title, $onclick_title, $title, $targe
1865
 
1866
  if ( $type ) {
1867
  if ( $do_image ) {
1868
- wppa_out( '<img' .
1869
- ' src="' . wppa_opt($type.'_label_url') . '"' .
1870
- ' title="' . __( 'New!', 'wp-photo-album-plus' ) . '"' .
1871
- ' class="wppa-albumnew"' .
1872
- ' style="border:none;margin:0;padding:0;box-shadow:none;"' .
1873
- ' alt="' . __( 'New', 'wp-photo-album-plus' ) . '"' .
1874
- ' />'
1875
- );
1876
-
1877
  }
1878
  else {
1879
- wppa_out( ' <span' .
1880
- ' style="' .
1881
- 'display:inline;' .
1882
- 'box-sizing:border-box;' .
1883
- 'font-size:' . $fsize . 'px;' .
1884
- 'line-height:' . $fsize . 'px;' .
1885
- 'font-family:\'Arial Black\', Gadget, sans-serif;' .
1886
- 'border-radius:4px;' .
1887
- 'border-width:2px;' .
1888
- 'border-style:solid;' .
1889
- // 'padding:1px;' .
1890
- wppa_get_text_medal_color_style( $type, '2' ) .
1891
- '"' .
1892
- ' >' .
1893
- '&nbsp;' . __( wppa_opt( $type . '_label_text' ) ) . '&nbsp;' .
1894
- '</span>'
1895
- );
1896
  }
1897
  }
1898
 
@@ -1917,7 +1922,7 @@ function wppa_the_album_title( $alb, $href_title, $onclick_title, $title, $targe
1917
  $album_id = '
1918
  <span
1919
  class="wppa-cover-album-id"
1920
- style="cursor:pointer"
1921
  title="' . esc_attr( __( 'Album id', 'wp-photo-album-plus' ) ) . '"
1922
  >
1923
  (' . $alb . ')
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for album covers
6
+ * Version 8.2.04.002
7
  *
8
  */
9
 
1756
  $ntp = $treecount['treephotos'] > $photocount ? $treecount['treephotos'] : '';
1757
  $ntpx = $treecount['treephotos'] > $photocount ? $treecount['treephotos'] : $photocount;
1758
 
1759
+ $text = '';
1760
 
1761
  if ( wppa_opt( 'show_treecount' ) == 'total' ) {
1762
  if ( $ntax ) {
1763
+ $text .= sprintf( _n( 'View %d album', 'View %d albums', $ntax, 'wp-photo-album-plus' ), $ntax ) . ' ';
1764
  }
1765
  if ( $ntpx ) {
1766
+ $text .= sprintf( _n( 'View %d photo', 'View %d photos', $ntpx, 'wp-photo-album-plus' ), $ntpx ) . ' ';
1767
  }
1768
  }
1769
  else {
1770
+ if ( $na || $nta ) {
1771
+ if ( $na ) {
1772
+ $text .= sprintf( _n( 'View %d album', 'View %d albums', $na, 'wp-photo-album-plus' ), $na ) . ' ';
1773
+ }
1774
+ if ( $nta ) {
1775
+ $text .= '(' . $nta . ') ';
1776
+ }
1777
+ if ( $np || $ntp ) {
1778
+ $text .= sprintf( _n( 'and %d photo', 'and %d photos', $np, 'wp-photo-album-plus' ), $np ) . ' ';
1779
+ }
1780
+ if ( $ntp ) {
1781
+ $text .= '(' . $ntp . ')';
1782
+ }
1783
  }
1784
+ else {
1785
+ if ( $np || $ntp ) {
1786
+ $text .= sprintf( _n( 'View %d photo', 'View %d photos', $np, 'wp-photo-album-plus' ), $np ) . ' ';
1787
+ }
1788
+ if ( $ntp ) {
1789
+ $text .= '(' . $ntp . ')';
1790
+ }
 
 
 
 
1791
  }
1792
  }
1793
 
1860
  $fsize = '12';
1861
  if ( wppa_is_album_new( $alb ) ) {
1862
  $type = 'new';
1863
+ $attr = __( 'New', 'wp-photo-album-plus' );
1864
  }
1865
  elseif ( wppa_is_album_modified( $alb ) ) {
1866
  $type = 'mod';
1867
+ $attr = __( 'Modified', 'wp-photo-album-plus' );
1868
  }
1869
  else {
1870
  $type = '';
1874
 
1875
  if ( $type ) {
1876
  if ( $do_image ) {
1877
+ wppa_out( '
1878
+ <img
1879
+ src="' . wppa_opt($type.'_label_url') . '"
1880
+ title="' . esc_attr( $attr ) . '"
1881
+ alt="' . esc_attr( $attr ) . '"
1882
+ class="wppa-albumnew wppa-'.$type.'-image"
1883
+ style="border:none;margin:0;padding:0;box-shadow:none;"
1884
+ />&nbsp;' );
 
1885
  }
1886
  else {
1887
+ wppa_out( '
1888
+ <div
1889
+ class="wppa-'.$type.'-text"
1890
+ style="
1891
+ display:inline;
1892
+ box-sizing:border-box;
1893
+ font-size:' . $fsize . 'px;
1894
+ line-height:' . $fsize . 'px;
1895
+ font-family:\'Arial Black\', Gadget, sans-serif;
1896
+ border-radius:4px;
1897
+ border-width:2px;
1898
+ border-style:solid;' .
1899
+ wppa_get_text_medal_color_style( $type, '2' ) . '"
1900
+ >&nbsp;' . __( wppa_opt( $type.'_label_text' ) ) . '&nbsp;</div>&nbsp;' );
 
 
 
1901
  }
1902
  }
1903
 
1922
  $album_id = '
1923
  <span
1924
  class="wppa-cover-album-id"
1925
+ style="cursor:help"
1926
  title="' . esc_attr( __( 'Album id', 'wp-photo-album-plus' ) ) . '"
1927
  >
1928
  (' . $alb . ')
wppa-dashboard-widgets.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * Contains dashboard widgets code
6
  *
7
- * Version 8.1.09.003
8
  *
9
  */
10
 
@@ -303,7 +303,7 @@ global $wpdb;
303
  wppa_echo( '
304
  <div style="position:relative">' .
305
  wppa_get_video_html( array( 'id' => $id,
306
- 'width' => '50',
307
  'controls' => false,
308
  'preload' => 'metadata',
309
  'use_thumb' => true,
@@ -314,7 +314,7 @@ global $wpdb;
314
  }
315
  else {
316
  wppa_echo( '
317
- <img src="' . esc_url( wppa_get_thumb_url( $id ) ) . '" style="max-width:50px;max-height:50px;" /> ' );
318
  }
319
 
320
  wppa_echo( '
@@ -366,7 +366,7 @@ global $wpdb;
366
  <tr>
367
  <td>
368
  <a href="' . esc_url( $href ) . '" target="_blank" >
369
- <img src="' . esc_url( wppa_get_thumb_url( $photo['id'] ) ) . '" style="max-width:50px;max-height:50px;" />
370
  </a>
371
  </td>
372
  <td>
@@ -429,7 +429,7 @@ function wppa_show_potd_log() {
429
  <tr style="border-bottom:1px solid #444">
430
  <td>
431
  <a href="' . esc_url( $href ) . '" target="_blank" >
432
- <img src="' . esc_url( wppa_get_thumb_url( $photo['id'] ) ) . '" style="max-width:50px;max-height:50px;" />
433
  </a>
434
  </td>
435
  <td>' .
4
  *
5
  * Contains dashboard widgets code
6
  *
7
+ * Version 8.2.04.002
8
  *
9
  */
10
 
303
  wppa_echo( '
304
  <div style="position:relative">' .
305
  wppa_get_video_html( array( 'id' => $id,
306
+ 'width' => '100',
307
  'controls' => false,
308
  'preload' => 'metadata',
309
  'use_thumb' => true,
314
  }
315
  else {
316
  wppa_echo( '
317
+ <img src="' . esc_url( wppa_get_thumb_url( $id ) ) . '" style="max-width:100px;" /> ' );
318
  }
319
 
320
  wppa_echo( '
366
  <tr>
367
  <td>
368
  <a href="' . esc_url( $href ) . '" target="_blank" >
369
+ <img src="' . esc_url( wppa_get_thumb_url( $photo['id'] ) ) . '" style="max-width:100px;" />
370
  </a>
371
  </td>
372
  <td>
429
  <tr style="border-bottom:1px solid #444">
430
  <td>
431
  <a href="' . esc_url( $href ) . '" target="_blank" >
432
+ <img src="' . esc_url( wppa_get_thumb_url( $photo['id'] ) ) . '" style="max-width:100px;" />
433
  </a>
434
  </td>
435
  <td>' .
wppa-import.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the import pages and functions
6
- * Version 8.2.02.005
7
  *
8
  */
9
 
@@ -3208,6 +3208,8 @@ static $void_dirs;
3208
  'plugins',
3209
  'languages',
3210
  'wppa',
 
 
3211
  ( wppa_switch( 'allow_import_source') ? '' : 'wppa-source' ),
3212
  );
3213
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the import pages and functions
6
+ * Version 8.2.04.002
7
  *
8
  */
9
 
3208
  'plugins',
3209
  'languages',
3210
  'wppa',
3211
+ 'cache',
3212
+ 'widget-cache',
3213
  ( wppa_switch( 'allow_import_source') ? '' : 'wppa-source' ),
3214
  );
3215
  }
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.04.001
7
  *
8
  */
9
 
@@ -488,8 +488,8 @@ function wppaTryScheduledel( id ) {
488
  $filename = $photo['filename'];
489
  $photox = wppa_get_photox( $id );
490
  $photoy = wppa_get_photoy( $id );
491
- $videox = wppa_get_videox( $id );
492
- $videoy = wppa_get_videoy( $id );
493
  $location = $photo['location'];
494
  $status = $photo['status'];
495
  $tags = trim( stripslashes( $photo['tags'] ), ',' );
@@ -619,7 +619,7 @@ function wppaTryScheduledel( id ) {
619
  wppa_get_video_html( array( 'id' => $id,
620
  'tagid' => 'video-' . $id,
621
  'width' => '160',
622
- 'height' => '160' * wppa_get_videoy( $id ) / wppa_get_videox( $id ),
623
  'controls' => false,
624
  'use_thumb' => true
625
  ) ) . '
@@ -1832,21 +1832,31 @@ function wppaTryScheduledel( id ) {
1832
  <td>' .
1833
  $formats . '
1834
  </td>
1835
- <td>
1836
- <input
1837
- type="text"
1838
- style="width:50px;margin:0 4px;padding-left:8px!important"
1839
- onchange="wppaAjaxUpdatePhoto( ' . strval( intval( $id ) ) . ', \'videox\', this.value)"
1840
- value="' . esc_attr( $videox ) . '"
1841
- />px W' .
1842
- sprintf( __( '(0=default:%s)', 'wp-photo-album-plus' ), wppa_opt( 'video_width' ) ) . '
1843
- <input
1844
- type="text"
1845
- style="width:50px;margin:0 4px;padding-left:8px!important"
1846
- onchange="wppaAjaxUpdatePhoto( ' . strval( intval( $id ) ) . ', \'videoy\', this.value)"
1847
- value="' . esc_attr( $videoy ) . '"
1848
- />px H' .
1849
- sprintf( __( '(0=default:%s)', 'wp-photo-album-plus' ), wppa_opt( 'video_height' ) ) . '
 
 
 
 
 
 
 
 
 
 
1850
  </td>
1851
  <td>' .
1852
  $paths . '
@@ -3663,7 +3673,7 @@ function wppaTryMove( id, video ) {
3663
  <!-- Size -->
3664
  <?php
3665
  if ( wppa_is_video( $photo['id'] ) ) {
3666
- wppa_echo( '<br>'.strval(intval(wppa_get_videox( $photo['id'] ))).' x '.strval(intval(wppa_get_videoy( $photo['id'] ))).' px.' );
3667
  }
3668
  else {
3669
  $sp = wppa_get_source_path( $photo['id'] );
@@ -3880,8 +3890,8 @@ global $wpdb;
3880
  <ul id="sortable">
3881
  <?php foreach ( $photos as $photo ) {
3882
  if ( wppa_is_video( $photo['id'] ) ) {
3883
- $imgs['0'] = wppa_get_videox( $photo['id'] );
3884
- $imgs['1'] = wppa_get_videoy( $photo['id'] );
3885
  }
3886
  else {
3887
  $imgs['0'] = wppa_get_thumbx( $photo['id'] );
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
+ * Version 8.2.04.002
7
  *
8
  */
9
 
488
  $filename = $photo['filename'];
489
  $photox = wppa_get_photox( $id );
490
  $photoy = wppa_get_photoy( $id );
491
+ $videox = wppa_get_videox( $id, 'admin' );
492
+ $videoy = wppa_get_videoy( $id, 'admin' );
493
  $location = $photo['location'];
494
  $status = $photo['status'];
495
  $tags = trim( stripslashes( $photo['tags'] ), ',' );
619
  wppa_get_video_html( array( 'id' => $id,
620
  'tagid' => 'video-' . $id,
621
  'width' => '160',
622
+ 'height' => '160' * $videoy / $videox,
623
  'controls' => false,
624
  'use_thumb' => true
625
  ) ) . '
1832
  <td>' .
1833
  $formats . '
1834
  </td>
1835
+ <td>' );
1836
+
1837
+ // If video sizes are correct and retieved from the file,
1838
+ // and possible rotation has been into account, field needs not to be editable
1839
+ if ( $photo['videox'] == $videox && $photo['videoy'] == $videoy ) {
1840
+ wppa_echo( sprintf( __( 'Width: %d pixels, height: %d pixels', 'wp-photo-album-plus' ), $videox, $videoy ) );
1841
+ }
1842
+ else {
1843
+ wppa_echo( '
1844
+ <input
1845
+ type="text"
1846
+ style="width:50px;margin:0 4px;padding-left:8px!important"
1847
+ onchange="wppaAjaxUpdatePhoto( ' . strval( intval( $id ) ) . ', \'videox\', this.value)"
1848
+ value="' . esc_attr( $videox ) . '"
1849
+ />px W' .
1850
+ sprintf( __( '(0=default:%s)', 'wp-photo-album-plus' ), wppa_opt( 'video_width' ) ) . '
1851
+ <input
1852
+ type="text"
1853
+ style="width:50px;margin:0 4px;padding-left:8px!important"
1854
+ onchange="wppaAjaxUpdatePhoto( ' . strval( intval( $id ) ) . ', \'videoy\', this.value)"
1855
+ value="' . esc_attr( $videoy ) . '"
1856
+ />px H' .
1857
+ sprintf( __( '(0=default:%s)', 'wp-photo-album-plus' ), wppa_opt( 'video_height' ) ) );
1858
+ }
1859
+ wppa_echo( '
1860
  </td>
1861
  <td>' .
1862
  $paths . '
3673
  <!-- Size -->
3674
  <?php
3675
  if ( wppa_is_video( $photo['id'] ) ) {
3676
+ wppa_echo( '<br>'.wppa_get_videox( $photo['id'], 'admin' ).' x '.wppa_get_videoy( $photo['id'], 'admin' ).' px.' );
3677
  }
3678
  else {
3679
  $sp = wppa_get_source_path( $photo['id'] );
3890
  <ul id="sortable">
3891
  <?php foreach ( $photos as $photo ) {
3892
  if ( wppa_is_video( $photo['id'] ) ) {
3893
+ $imgs['0'] = wppa_get_videox( $photo['id'], 'admin' );
3894
+ $imgs['1'] = wppa_get_videoy( $photo['id'], 'admin' );
3895
  }
3896
  else {
3897
  $imgs['0'] = wppa_get_thumbx( $photo['id'] );
wppa-thumbnails.php CHANGED
@@ -5,7 +5,7 @@
5
  * Various funcions to display a thumbnail image
6
  * Contains all possible frontend thumbnail types
7
  *
8
- * Version 8.1.09.005
9
  *
10
  */
11
 
@@ -2132,41 +2132,42 @@ function wppa_get_medal_html_a( $args ) {
2132
  // Yes there is one to display
2133
  if ( $type ) {
2134
  if ( $do_image ) {
2135
- $result .= '<img' .
2136
- ' src="' . wppa_opt($type.'_label_url') . '"' .
2137
- ' title="' . esc_attr( $attr ) . '"' .
2138
- ' alt="' . esc_attr( $attr ) . '"' .
2139
- ' class="wppa-thumbnew"' .
2140
- ' style="' . $lstyle .
2141
- 'top:' . $ntop . 'px;' .
2142
- 'position:absolute;' .
2143
- 'border:none;' .
2144
- 'margin:0;' .
2145
- 'padding:0;' .
2146
- 'box-shadow:none;' .
2147
- 'height:' . $nsize . 'px;' .
2148
- '"'.
2149
- ' />';
2150
  }
2151
  else {
2152
- $result .= '<div' .
2153
- ' style="' . $lstyle .
2154
- 'position:absolute;' .
2155
- 'top:' . $ntop . 'px;' .
2156
- 'box-sizing:border-box;' .
2157
- 'float:' . ( $left ? 'left;' : 'right;' ) .
2158
- 'font-size:' . $fsize . 'px;' .
2159
- 'line-height:' . $fsize . 'px;' .
2160
- 'font-family:\'Arial Black\', Gadget, sans-serif;' .
2161
- 'border-radius:2px;' .
2162
- 'border-width:1px;' .
2163
- 'border-style:solid;' .
2164
- 'padding:1px;' .
2165
- wppa_get_text_medal_color_style( $type ) .
2166
- '"' .
2167
- ' >' .
2168
- '&nbsp;' . __( wppa_opt( $type.'_label_text' ) ) . '&nbsp;' .
2169
- '</div>';
 
2170
  }
2171
  }
2172
 
5
  * Various funcions to display a thumbnail image
6
  * Contains all possible frontend thumbnail types
7
  *
8
+ * Version 8.2.04.002
9
  *
10
  */
11
 
2132
  // Yes there is one to display
2133
  if ( $type ) {
2134
  if ( $do_image ) {
2135
+ $result .= '
2136
+ <img
2137
+ src="' . wppa_opt($type.'_label_url') . '"
2138
+ title="' . esc_attr( $attr ) . '"
2139
+ alt="' . esc_attr( $attr ) . '"
2140
+ class="wppa-thumbnew wppa-'.$type.'-image"
2141
+ style="' . $lstyle . '
2142
+ top:' . $ntop . 'px;
2143
+ position:absolute;
2144
+ border:none;
2145
+ margin:0;
2146
+ padding:0;
2147
+ box-shadow:none;
2148
+ height:' . $nsize . 'px;"
2149
+ />';
2150
  }
2151
  else {
2152
+ $result .= '
2153
+ <div
2154
+ class="wppa-'.$type.'-text"
2155
+ style="' . $lstyle . '
2156
+ position:absolute;
2157
+ top:' . $ntop . 'px;
2158
+ box-sizing:border-box;
2159
+ float:' . ( $left ? 'left;' : 'right;' ) . '
2160
+ font-size:' . $fsize . 'px;
2161
+ line-height:' . $fsize . 'px;
2162
+ font-family:\'Arial Black\', Gadget, sans-serif;
2163
+ border-radius:2px;
2164
+ border-width:1px;
2165
+ border-style:solid;
2166
+ padding:1px;' .
2167
+ wppa_get_text_medal_color_style( $type ) . '"
2168
+ >
2169
+ &nbsp;' . __( wppa_opt( $type.'_label_text' ) ) . '&nbsp;
2170
+ </div>';
2171
  }
2172
  }
2173
 
wppa-upldr-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display a list of users linking to their photos
6
- * Version 8.2.02.002
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -138,10 +138,10 @@ class UpldrWidget extends WP_Widget {
138
  $widget_content = "\n".'<!-- WPPA+ Upldr Widget start -->';
139
  $widget_content .= '<div class="wppa-upldr" data-wppa="yes">';
140
  if ( $showownercount ) {
141
- $widget_content .= sprintf( _n( 'Number of contributors: %d', 'Number of contributors: %d', $total_ownercount, 'wp-photo-album-plus' ), $total_ownercount ) . '<br>';
142
  }
143
  if ( $showphotocount ) {
144
- $widget_content .= sprintf( _n( 'Number of photos: %d', 'Number of photos: %d', $total_photocount, 'wp-photo-album-plus' ), $total_photocount ) . '<br><br>';
145
  }
146
  $widget_content .= '<table><tbody>';
147
  $albs = $instance['parent'] ? wppa_expand_enum( wppa_alb_to_enum_children( wppa_expand_enum( $instance['parent'] ) ) ) : '';
3
  * Package: wp-photo-album-plus
4
  *
5
  * display a list of users linking to their photos
6
+ * Version 8.2.04.002
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
138
  $widget_content = "\n".'<!-- WPPA+ Upldr Widget start -->';
139
  $widget_content .= '<div class="wppa-upldr" data-wppa="yes">';
140
  if ( $showownercount ) {
141
+ $widget_content .= sprintf( __( 'Number of contributors: %d', 'wp-photo-album-plus' ), $total_ownercount ) . '<br>';
142
  }
143
  if ( $showphotocount ) {
144
+ $widget_content .= sprintf( __( 'Number of photos: %d', 'wp-photo-album-plus' ), $total_photocount ) . '<br><br>';
145
  }
146
  $widget_content .= '<table><tbody>';
147
  $albs = $instance['parent'] ? wppa_expand_enum( wppa_alb_to_enum_children( wppa_expand_enum( $instance['parent'] ) ) ) : '';
wppa-upload-common.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains common upload functions
6
- * Version 8.2.04.001
7
  *
8
  */
9
 
@@ -464,6 +464,7 @@ function wppa_fix_video_metadata( $id, $where ) {
464
  }
465
  //
466
  $mp4info = wppa_read_video_metadata( $file );
 
467
 
468
  // Make sure its a video
469
  if ( $mp4info['fileformat'] != 'mp4' ) {
@@ -474,7 +475,7 @@ function wppa_fix_video_metadata( $id, $where ) {
474
  // Find sizes
475
  $videox = isset( $mp4info['width'] ) ? $mp4info['width'] : '0';
476
  $videoy = isset( $mp4info['height'] ) ? $mp4info['height'] : '0';
477
-
478
  // Rotated?
479
  if ( isset( $mp4info['rotate'] ) ) {
480
  $rot = $mp4info['rotate'];
@@ -520,11 +521,12 @@ function wppa_fix_video_metadata( $id, $where ) {
520
 
521
  // Find duration of audio
522
  function wppa_fix_audio_metadata( $id, $where ) {
523
-
524
  $file = wppa_strip_ext( wppa_get_photo_path( $id ) ) . '.mp3';
525
  if ( wppa_is_file( $file ) ) {
526
  if ( function_exists( 'wp_read_audio_metadata' ) ) {
527
  $mp3info = wp_read_audio_metadata( $file );
 
528
  if ( $mp3info ) {
529
  $duration = $mp3info['length'];
530
  if ( $duration ) {
@@ -536,102 +538,104 @@ function wppa_fix_audio_metadata( $id, $where ) {
536
  }
537
 
538
  // This function is equal to wp_read_video_metadata() except it also returns ['rotate']
 
 
539
  function wppa_read_video_metadata( $file ) {
540
  if ( ! file_exists( $file ) ) {
541
  return false;
542
  }
543
-
544
  $metadata = array();
545
-
546
  if ( ! defined( 'GETID3_TEMP_DIR' ) ) {
547
  define( 'GETID3_TEMP_DIR', get_temp_dir() );
548
  }
549
-
550
  if ( ! class_exists( 'getID3', false ) ) {
551
  require ABSPATH . WPINC . '/ID3/getid3.php';
552
  }
553
-
554
  $id3 = new getID3();
555
  // Required to get the `created_timestamp` value.
556
  $id3->options_audiovideo_quicktime_ReturnAtomData = true; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
557
-
558
  $data = $id3->analyze( $file );
559
-
560
  if ( isset( $data['video']['lossless'] ) ) {
561
  $metadata['lossless'] = $data['video']['lossless'];
562
  }
563
-
564
  if ( ! empty( $data['video']['bitrate'] ) ) {
565
  $metadata['bitrate'] = (int) $data['video']['bitrate'];
566
  }
567
-
568
  if ( ! empty( $data['video']['bitrate_mode'] ) ) {
569
  $metadata['bitrate_mode'] = $data['video']['bitrate_mode'];
570
  }
571
-
572
  if ( ! empty( $data['filesize'] ) ) {
573
  $metadata['filesize'] = (int) $data['filesize'];
574
  }
575
-
576
  if ( ! empty( $data['mime_type'] ) ) {
577
  $metadata['mime_type'] = $data['mime_type'];
578
  }
579
-
580
  if ( ! empty( $data['playtime_seconds'] ) ) {
581
  $metadata['length'] = (int) round( $data['playtime_seconds'] );
582
  }
583
-
584
  if ( ! empty( $data['playtime_string'] ) ) {
585
  $metadata['length_formatted'] = $data['playtime_string'];
586
  }
587
-
588
  if ( ! empty( $data['video']['resolution_x'] ) ) {
589
  $metadata['width'] = (int) $data['video']['resolution_x'];
590
  }
591
-
592
  if ( ! empty( $data['video']['resolution_y'] ) ) {
593
  $metadata['height'] = (int) $data['video']['resolution_y'];
594
  }
595
-
596
  if ( ! empty( $data['fileformat'] ) ) {
597
  $metadata['fileformat'] = $data['fileformat'];
598
  }
599
-
600
  if ( ! empty( $data['video']['dataformat'] ) ) {
601
  $metadata['dataformat'] = $data['video']['dataformat'];
602
  }
603
-
604
  if ( ! empty( $data['video']['encoder'] ) ) {
605
  $metadata['encoder'] = $data['video']['encoder'];
606
  }
607
-
608
  if ( ! empty( $data['video']['codec'] ) ) {
609
  $metadata['codec'] = $data['video']['codec'];
610
  }
611
-
612
  if ( ! empty( $data['audio'] ) ) {
613
  unset( $data['audio']['streams'] );
614
  $metadata['audio'] = $data['audio'];
615
  }
616
-
617
  // Start addition
618
  if ( ! empty( $data['video']['rotate'] ) ) {
619
  $metadata['rotate'] = $data['video']['rotate'];
620
  }
621
  // End addition
622
-
623
  if ( empty( $metadata['created_timestamp'] ) ) {
624
  $created_timestamp = wp_get_media_creation_timestamp( $data );
625
-
626
  if ( false !== $created_timestamp ) {
627
  $metadata['created_timestamp'] = $created_timestamp;
628
  }
629
  }
630
-
631
  wp_add_id3_tag_data( $metadata, $data );
632
-
633
  $file_format = isset( $metadata['fileformat'] ) ? $metadata['fileformat'] : null;
634
-
635
  /**
636
  * Filters the array of metadata retrieved from a video.
637
  *
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains common upload functions
6
+ * Version 8.2.04.002
7
  *
8
  */
9
 
464
  }
465
  //
466
  $mp4info = wppa_read_video_metadata( $file );
467
+ // wppa_dump(var_export($mp4info,true));
468
 
469
  // Make sure its a video
470
  if ( $mp4info['fileformat'] != 'mp4' ) {
475
  // Find sizes
476
  $videox = isset( $mp4info['width'] ) ? $mp4info['width'] : '0';
477
  $videoy = isset( $mp4info['height'] ) ? $mp4info['height'] : '0';
478
+
479
  // Rotated?
480
  if ( isset( $mp4info['rotate'] ) ) {
481
  $rot = $mp4info['rotate'];
521
 
522
  // Find duration of audio
523
  function wppa_fix_audio_metadata( $id, $where ) {
524
+
525
  $file = wppa_strip_ext( wppa_get_photo_path( $id ) ) . '.mp3';
526
  if ( wppa_is_file( $file ) ) {
527
  if ( function_exists( 'wp_read_audio_metadata' ) ) {
528
  $mp3info = wp_read_audio_metadata( $file );
529
+ // wppa_dump(var_export($mp3info,true));
530
  if ( $mp3info ) {
531
  $duration = $mp3info['length'];
532
  if ( $duration ) {
538
  }
539
 
540
  // This function is equal to wp_read_video_metadata() except it also returns ['rotate']
541
+ // It is here temporarely until wp has released my proposed fix to include ['rotate'] in thr returned array.
542
+ // Sere also https://core.trac.wordpress.org/ticket/56217
543
  function wppa_read_video_metadata( $file ) {
544
  if ( ! file_exists( $file ) ) {
545
  return false;
546
  }
547
+
548
  $metadata = array();
549
+
550
  if ( ! defined( 'GETID3_TEMP_DIR' ) ) {
551
  define( 'GETID3_TEMP_DIR', get_temp_dir() );
552
  }
553
+
554
  if ( ! class_exists( 'getID3', false ) ) {
555
  require ABSPATH . WPINC . '/ID3/getid3.php';
556
  }
557
+
558
  $id3 = new getID3();
559
  // Required to get the `created_timestamp` value.
560
  $id3->options_audiovideo_quicktime_ReturnAtomData = true; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
561
+
562
  $data = $id3->analyze( $file );
563
+
564
  if ( isset( $data['video']['lossless'] ) ) {
565
  $metadata['lossless'] = $data['video']['lossless'];
566
  }
567
+
568
  if ( ! empty( $data['video']['bitrate'] ) ) {
569
  $metadata['bitrate'] = (int) $data['video']['bitrate'];
570
  }
571
+
572
  if ( ! empty( $data['video']['bitrate_mode'] ) ) {
573
  $metadata['bitrate_mode'] = $data['video']['bitrate_mode'];
574
  }
575
+
576
  if ( ! empty( $data['filesize'] ) ) {
577
  $metadata['filesize'] = (int) $data['filesize'];
578
  }
579
+
580
  if ( ! empty( $data['mime_type'] ) ) {
581
  $metadata['mime_type'] = $data['mime_type'];
582
  }
583
+
584
  if ( ! empty( $data['playtime_seconds'] ) ) {
585
  $metadata['length'] = (int) round( $data['playtime_seconds'] );
586
  }
587
+
588
  if ( ! empty( $data['playtime_string'] ) ) {
589
  $metadata['length_formatted'] = $data['playtime_string'];
590
  }
591
+
592
  if ( ! empty( $data['video']['resolution_x'] ) ) {
593
  $metadata['width'] = (int) $data['video']['resolution_x'];
594
  }
595
+
596
  if ( ! empty( $data['video']['resolution_y'] ) ) {
597
  $metadata['height'] = (int) $data['video']['resolution_y'];
598
  }
599
+
600
  if ( ! empty( $data['fileformat'] ) ) {
601
  $metadata['fileformat'] = $data['fileformat'];
602
  }
603
+
604
  if ( ! empty( $data['video']['dataformat'] ) ) {
605
  $metadata['dataformat'] = $data['video']['dataformat'];
606
  }
607
+
608
  if ( ! empty( $data['video']['encoder'] ) ) {
609
  $metadata['encoder'] = $data['video']['encoder'];
610
  }
611
+
612
  if ( ! empty( $data['video']['codec'] ) ) {
613
  $metadata['codec'] = $data['video']['codec'];
614
  }
615
+
616
  if ( ! empty( $data['audio'] ) ) {
617
  unset( $data['audio']['streams'] );
618
  $metadata['audio'] = $data['audio'];
619
  }
620
+
621
  // Start addition
622
  if ( ! empty( $data['video']['rotate'] ) ) {
623
  $metadata['rotate'] = $data['video']['rotate'];
624
  }
625
  // End addition
626
+
627
  if ( empty( $metadata['created_timestamp'] ) ) {
628
  $created_timestamp = wp_get_media_creation_timestamp( $data );
629
+
630
  if ( false !== $created_timestamp ) {
631
  $metadata['created_timestamp'] = $created_timestamp;
632
  }
633
  }
634
+
635
  wp_add_id3_tag_data( $metadata, $data );
636
+
637
  $file_format = isset( $metadata['fileformat'] ) ? $metadata['fileformat'] : null;
638
+
639
  /**
640
  * Filters the array of metadata retrieved from a video.
641
  *
wppa-video.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all video routines
6
- * Version 8.1.00.008
7
  *
8
  */
9
 
@@ -224,9 +224,26 @@ global $wppa_supported_video_extensions;
224
  return true;
225
  }
226
 
227
- function wppa_get_videox( $id ) {
228
 
229
- if ( ! wppa_is_video( $id ) ) return '0';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
230
 
231
  $thumb = wppa_cache_thumb( $id );
232
  if ( $thumb['videox'] ) {
@@ -238,9 +255,26 @@ function wppa_get_videox( $id ) {
238
  return strval( intval( $result ) );
239
  }
240
 
241
- function wppa_get_videoy( $id ) {
242
 
243
- if ( ! wppa_is_video( $id ) ) return '0';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
244
 
245
  $thumb = wppa_cache_thumb( $id );
246
  if ( $thumb['videoy'] ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all video routines
6
+ * Version 8.2.04.002
7
  *
8
  */
9
 
224
  return true;
225
  }
226
 
227
+ function wppa_get_videox( $id, $where = 'prod' ) {
228
 
229
+ $thumb = wppa_cache_thumb( $id );
230
+
231
+ if ( $where == 'prod' && $thumb['videox'] ) {
232
+ return $thumb['videox'];
233
+ }
234
+
235
+ $exts = wppa_is_video( $id );
236
+
237
+ if ( ! $exts ) return '0';
238
+
239
+ if ( ! $thumb['videox'] ) {
240
+ if ( in_array( 'mp4', $exts ) ) {
241
+ wppa_fix_video_metadata( $id, 'get_videox' );
242
+ }
243
+ }
244
+ else {
245
+ return strval( intval( $thumb['videox'] ) );
246
+ }
247
 
248
  $thumb = wppa_cache_thumb( $id );
249
  if ( $thumb['videox'] ) {
255
  return strval( intval( $result ) );
256
  }
257
 
258
+ function wppa_get_videoy( $id, $where = 'prod' ) {
259
 
260
+ $thumb = wppa_cache_thumb( $id );
261
+
262
+ if ( $where == 'prod' && $thumb['videoy'] ) {
263
+ return $thumb['videoy'];
264
+ }
265
+
266
+ $exts = wppa_is_video( $id );
267
+
268
+ if ( ! $exts ) return '0';
269
+
270
+ if ( ! $thumb['videoy'] ) {
271
+ if ( in_array( 'mp4', $exts ) ) {
272
+ wppa_fix_video_metadata( $id, 'get_videoy' );
273
+ }
274
+ }
275
+ else {
276
+ return strval( intval( $thumb['videoy'] ) );
277
+ }
278
 
279
  $thumb = wppa_cache_thumb( $id );
280
  if ( $thumb['videoy'] ) {
wppa-wpdb-insert.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that add new records
6
- * Version 8.2.03.005
7
  *
8
  */
9
 
@@ -547,7 +547,7 @@ global $wpdb;
547
  $args['upload_limit_tree'],
548
  $args['scheduledel'],
549
  $args['status'],
550
- $args['max_children'],
551
  );
552
  $iret = $wpdb->query( $query );
553
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that add new records
6
+ * Version 8.2.04.002
7
  *
8
  */
9
 
547
  $args['upload_limit_tree'],
548
  $args['scheduledel'],
549
  $args['status'],
550
+ $args['max_children']
551
  );
552
  $iret = $wpdb->query( $query );
553
 
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.04.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,7 +24,7 @@ global $wp_version;
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_api_version;
27
- $wppa_api_version = '8.2.04.001'; // 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.04.002
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_api_version;
27
+ $wppa_api_version = '8.2.04.002'; // WPPA software version
28
  global $wppa_revno;
29
  $wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
30