WP Photo Album Plus - Version 8.2.06.006

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

Code changes from version 8.2.06.005 to 8.2.06.006

Files changed (5) hide show
  1. readme.txt +1 -1
  2. wppa-functions.php +17 -9
  3. wppa-maintenance.php +6 -4
  4. wppa-slideshow.php +4 -1
  5. wppa.php +4 -4
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.05.008
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
5
  Requires at least: 3.9
6
  Tested up to: 6.0
7
  Requires PHP: 5.5
8
+ Stable tag: 8.2.06.006
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 8.2.06.005
7
  *
8
  */
9
 
@@ -1154,18 +1154,16 @@ global $albums_used;
1154
  }
1155
 
1156
  // Check maximum
1157
- if ( is_array( $albums ) && count( $albums ) > wppa_opt( 'max_search_albums' ) && wppa_opt( 'max_search_albums' ) != '0' ) {
 
1158
  $alert_text = sprintf( __( 'There are %s albums found. Only the first %s will be shown. Please refine your search criteria.', 'wp-photo-album-plus' ),
1159
  count( $albums ),
1160
- wppa_opt( 'max_search_albums' )
1161
- );
1162
  wppa_alert( $alert_text );
1163
- foreach ( array_keys( $albums ) as $idx ) {
1164
- if ( $idx >= wppa_opt( 'max_search_albums' ) ) unset ( $albums[$idx] );
1165
- }
1166
  }
1167
 
1168
- if ( is_array( $albums ) ) wppa( 'any', true );
1169
  }
1170
  else { // Its not search
1171
  $id = wppa( 'start_album' );
@@ -2258,6 +2256,16 @@ global $wppa_session;
2258
  }
2259
  }
2260
 
 
 
 
 
 
 
 
 
 
 
2261
  // Save ids for page caching
2262
  $photos_used .= '.' . implode( '.', $result_ids_a );
2263
 
@@ -3437,7 +3445,7 @@ function wppa_onpage( $type, $counter, $curpage ) {
3437
  function wppa_get_pagesize( $type = '' ) {
3438
 
3439
  // Pagination is off during search
3440
- if ( is_search() ) {
3441
  return '0';
3442
  }
3443
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 8.2.06.006
7
  *
8
  */
9
 
1154
  }
1155
 
1156
  // Check maximum
1157
+ $max = intval ( wppa_opt( 'max_search_albums' ) );
1158
+ if ( $max && is_array( $albums ) && count( $albums ) > $max ) {
1159
  $alert_text = sprintf( __( 'There are %s albums found. Only the first %s will be shown. Please refine your search criteria.', 'wp-photo-album-plus' ),
1160
  count( $albums ),
1161
+ wppa_opt( 'max_search_albums' ) );
 
1162
  wppa_alert( $alert_text );
1163
+ $albums = array_slice( $albums, 0, $max );
 
 
1164
  }
1165
 
1166
+ if ( is_array( $albums ) && count( $albums ) ) wppa( 'any', true );
1167
  }
1168
  else { // Its not search
1169
  $id = wppa( 'start_album' );
2256
  }
2257
  }
2258
 
2259
+ // Check maximum
2260
+ $max = intval( wppa_opt( 'max_search_photos' ) );
2261
+ if ( $max && wppa( 'src' ) && count( $result_ids_a ) > $max ) {
2262
+ $alert_text = sprintf( __( 'There are %s photos found. Only the first %s will be shown. Please refine your search criteria.', 'wp-photo-album-plus' ),
2263
+ count( $result_ids_a ),
2264
+ $max );
2265
+ wppa_alert( $alert_text );
2266
+ $result_ids_a = array_slice( $result_ids_a, 0, $max );
2267
+ }
2268
+
2269
  // Save ids for page caching
2270
  $photos_used .= '.' . implode( '.', $result_ids_a );
2271
 
3445
  function wppa_get_pagesize( $type = '' ) {
3446
 
3447
  // Pagination is off during search
3448
+ if ( wppa( 'src' ) ) {
3449
  return '0';
3450
  }
3451
 
wppa-maintenance.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
- * Version 8.2.06.005
7
  *
8
  */
9
 
@@ -1490,9 +1490,11 @@ global $wppa_log_file;
1490
  $result .= '
1491
  </td>
1492
  <td style="border-bottom:1px solid gray">';
1493
- if ( is_array( $data['uris'] ) ) {
1494
- foreach ( $data['uris'] as $uri ) {
1495
- $result .= $uri.'<br>';
 
 
1496
  }
1497
  }
1498
  $result .= '
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
+ * Version 8.2.06.006
7
  *
8
  */
9
 
1490
  $result .= '
1491
  </td>
1492
  <td style="border-bottom:1px solid gray">';
1493
+ if ( $data['uris'] ) {
1494
+ if ( is_array( $data['uris'] ) ) {
1495
+ foreach ( $data['uris'] as $uri ) {
1496
+ $result .= $uri.'<br>';
1497
+ }
1498
  }
1499
  }
1500
  $result .= '
wppa-slideshow.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * Contains all the slideshow high level functions
6
  *
7
- * Version 8.2.05.007
8
  *
9
  */
10
 
@@ -123,6 +123,9 @@ global $previous_page_last_id;
123
  // Any items?
124
  if ( ! $thumbs ) return $thumbs;
125
 
 
 
 
126
  $mocc = wppa( 'mocc' );
127
 
128
  // If not numeric startphoto, convert it
4
  *
5
  * Contains all the slideshow high level functions
6
  *
7
+ * Version 8.2.06.006
8
  *
9
  */
10
 
123
  // Any items?
124
  if ( ! $thumbs ) return $thumbs;
125
 
126
+ // Not on search
127
+ if ( wppa( 'src' ) ) return $thumbs;
128
+
129
  $mocc = wppa( 'mocc' );
130
 
131
  // If not numeric startphoto, convert it
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.06.005
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/
@@ -23,7 +23,7 @@ global $wpdb;
23
  global $wp_version;
24
 
25
  /* WPPA Version */
26
- global $wppa_version; $wppa_version = '8.2.06.005'; // WPPA software version
27
  global $wppa_revno; $wppa_revno = str_replace( '.', '', $wppa_version ); // WPPA db version
28
 
29
  /* Init page js data */
@@ -35,14 +35,14 @@ function wppa_init_timer() {
35
  global $wppa_endtime;
36
 
37
  $met = intval( ini_get( 'max_execution_time' ) );
38
-
39
  if ( wppa_is_cron() ) {
40
  $the_met = max ( min( $met, 120 ), 30 );
41
  }
42
  else {
43
  $the_met = max ( min( $met, 180 ), 30 );
44
  }
45
-
46
  $wppa_endtime = time() + $the_met;
47
  }
48
 
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.06.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/
23
  global $wp_version;
24
 
25
  /* WPPA Version */
26
+ global $wppa_version; $wppa_version = '8.2.06.006'; // WPPA software version
27
  global $wppa_revno; $wppa_revno = str_replace( '.', '', $wppa_version ); // WPPA db version
28
 
29
  /* Init page js data */
35
  global $wppa_endtime;
36
 
37
  $met = intval( ini_get( 'max_execution_time' ) );
38
+
39
  if ( wppa_is_cron() ) {
40
  $the_met = max ( min( $met, 120 ), 30 );
41
  }
42
  else {
43
  $the_met = max ( min( $met, 180 ), 30 );
44
  }
45
+
46
  $wppa_endtime = time() + $the_met;
47
  }
48