WP Photo Album Plus - Version 7.1.08.004

Version Description

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

Code changes from version 7.1.07.004 to 7.1.08.004

changelog.txt CHANGED
@@ -1,5 +1,14 @@
1
WP Photo Album Plus Changelog
2
3
= 7.1.07 =
4
5
* Added Table IX-D19: Sanitize filenames during import/upload. Do not switch this off unless you really need this.
1
WP Photo Album Plus Changelog
2
3
+ = 7.1.08 =
4
+
5
+ * Fixed a bug that caused a fatal error when deleting a local cdn folder.
6
+ * When creating a sibling album, the following items are copied from the originating album: cover_type, cover_linktype, coverphoto if it is a method rather than an individual photo,
7
+ * Maintenance proc Table VIII-B21 added: Covert png to jpg.
8
+ * Max execution time (Table IX-A5) can not be lower than 25.
9
+ * Thumbnail files of multimedia items could not be remade. Fixed.
10
+ * Fixed a js issue in the fe upload procedure causing broken slideshows.
11
+
12
= 7.1.07 =
13
14
* Added Table IX-D19: Sanitize filenames during import/upload. Do not switch this off unless you really need this.
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.1.07
6
- Stable tag: 7.1.06.012
7
Author: J.N. Breetvelt
8
Author URI: http://www.opajaap.nl/
9
Requires at least: 3.9
@@ -137,6 +137,10 @@ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documen
137
138
== Upgrade Notice ==
139
140
= 7.1.07 =
141
142
* This version addresses various bug fixes and feature requests.
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.1.08
6
+ Stable tag: 7.1.07.004
7
Author: J.N. Breetvelt
8
Author URI: http://www.opajaap.nl/
9
Requires at least: 3.9
137
138
== Upgrade Notice ==
139
140
+ = 7.1.08 =
141
+
142
+ * This version addresses various bug fixes and feature requests.
143
+
144
= 7.1.07 =
145
146
* This version addresses various bug fixes and feature requests.
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
/* wppa-ajax.php
3
*
4
* Functions used in ajax requests
5
- * Version 7.1.07
6
*
7
*/
8
@@ -3331,9 +3331,6 @@ global $wppa_log_file_new;
3331
break;
3332
3333
case 'wppa_errorlog_purge':
3334
- if ( wppa_is_file( $wppa_log_file ) ) {
3335
- wppa_unlink( $wppa_log_file );
3336
- }
3337
if ( wppa_is_file( $wppa_log_file_new ) ) {
3338
wppa_unlink( $wppa_log_file_new );
3339
}
2
/* wppa-ajax.php
3
*
4
* Functions used in ajax requests
5
+ * Version 7.1.08
6
*
7
*/
8
3331
break;
3332
3333
case 'wppa_errorlog_purge':
3334
if ( wppa_is_file( $wppa_log_file_new ) ) {
3335
wppa_unlink( $wppa_log_file_new );
3336
}
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.0.12
7
*
8
*/
9
@@ -217,6 +217,19 @@ global $wppa_revno;
217
wppa_set_last_album( $id );
218
wppa_invalidate_treecounts( $id );
219
wppa_index_add( 'album', $id );
220
wppa_update_message( sprintf( __( 'Album #%d added', 'wp-photo-album-plus' ), $id ) );
221
wppa_create_pl_htaccess();
222
$edit_id = $id;
@@ -1129,7 +1142,14 @@ global $wppa_revno;
1129
// Create sibling
1130
if ( $albuminfo['a_parent'] > '0' && wppa_can_create_album() ||
1131
$albuminfo['a_parent'] < '1' && wppa_can_create_top_album() ) {
1132
- $url = wppa_dbg_url( get_admin_url() . 'admin.php?page=wppa_admin_menu&amp;tab=edit&amp;edit_id=new&amp;parent_id=' . $albuminfo['a_parent'] . '&amp;wppa_nonce=' . wp_create_nonce( 'wppa_nonce' ) );
1133
if ( wppa_switch( 'confirm_create' ) ) {
1134
$onc = 'if (confirm(\''.__('Are you sure you want to create a subalbum?', 'wp-photo-album-plus').'\')) document.location=\''.$url.'\';';
1135
}
3
* Package: wp-photo-album-plus
4
*
5
* create, edit and delete albums
6
+ * Version 7.1.08
7
*
8
*/
9
217
wppa_set_last_album( $id );
218
wppa_invalidate_treecounts( $id );
219
wppa_index_add( 'album', $id );
220
+ if ( isset( $_REQUEST['is_sibling_of'] ) && is_numeric( $_REQUEST['is_sibling_of'] ) ) {
221
+ $sib_id = strval( intval( $_REQUEST['is_sibling_of'] ) );
222
+ if ( $sib_id > 0 ) {
223
+
224
+ // Get siblings data to inherit
225
+ $sib_alb = wppa_cache_album( $sib_id );
226
+ wppa_update_album( array( 'id' => $id,
227
+ 'cover_type' => $sib_alb['cover_type'],
228
+ 'cover_linktype' => $sib_alb['cover_linktype'],
229
+ 'main_photo' => ( $sib_alb['main_photo'] < '0' ? $sib_alb['main_photo'] : '0' ),
230
+ ) );
231
+ }
232
+ }
233
wppa_update_message( sprintf( __( 'Album #%d added', 'wp-photo-album-plus' ), $id ) );
234
wppa_create_pl_htaccess();
235
$edit_id = $id;
1142
// Create sibling
1143
if ( $albuminfo['a_parent'] > '0' && wppa_can_create_album() ||
1144
$albuminfo['a_parent'] < '1' && wppa_can_create_top_album() ) {
1145
+ $url = wppa_dbg_url( get_admin_url() .
1146
+ 'admin.php' .
1147
+ '?page=wppa_admin_menu' .
1148
+ '&amp;tab=edit' .
1149
+ '&amp;edit_id=new' .
1150
+ '&amp;parent_id=' . $albuminfo['a_parent'] .
1151
+ '&amp;is_sibling_of=' . $albuminfo['id'] .
1152
+ '&amp;wppa_nonce=' . wp_create_nonce( 'wppa_nonce' ) );
1153
if ( wppa_switch( 'confirm_create' ) ) {
1154
$onc = 'if (confirm(\''.__('Are you sure you want to create a subalbum?', 'wp-photo-album-plus').'\')) document.location=\''.$url.'\';';
1155
}
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
* Package: wp-photo-album-plus
4
*
5
* Various wppa boxes
6
- * Version 7.1.06
7
*
8
*/
9
@@ -3063,7 +3063,7 @@ static $albums_granted;
3063
3064
'</span>' .
3065
3066
- ( $yalb ? '' : wppa_js( '<script type="text/javascript" >jQuery(document).ready(function() {'.$onc.'})</script>' ) );
3067
3068
$result .= wppa_get_dlg_item( $head, $body, $big );
3069
}
3
* Package: wp-photo-album-plus
4
*
5
* Various wppa boxes
6
+ * Version 7.1.08
7
*
8
*/
9
3063
3064
'</span>' .
3065
3066
+ ( $yalb ? '' : wppa_js( '<script type="text/javascript" >jQuery(document).ready(function() {'.$onc.'});</script>' ) );
3067
3068
$result .= wppa_get_dlg_item( $head, $body, $big );
3069
}
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 7.1.07
7
*
8
*/
9
@@ -58,6 +58,7 @@ $wppa_all_maintenance_slugs = array( 'wppa_remake_index_albums',
58
'wppa_move_all_photos',
59
'wppa_cleanup_index',
60
'wppa_photos_hyphens_to_spaces',
61
);
62
63
global $wppa_cron_maintenance_slugs;
@@ -383,6 +384,7 @@ global $wppa_endtime;
383
case 'wppa_owner_to_name_proc':
384
case 'wppa_move_all_photos':
385
case 'wppa_photos_hyphens_to_spaces':
386
387
// Process photos
388
$table = WPPA_PHOTOS;
@@ -832,6 +834,10 @@ global $wppa_endtime;
832
wppa_update_photo( array( 'id' => $id, 'name' => $newname ) );
833
}
834
break;
835
836
case 'wppa_custom_photo_proc':
837
$file = WPPA_UPLOAD_PATH . '/procs/wppa_custom_photo_proc.php';
3
* Package: wp-photo-album-plus
4
*
5
* Contains (not yet, but in the future maybe) all the maintenance routines
6
+ * Version 7.1.08
7
*
8
*/
9
58
'wppa_move_all_photos',
59
'wppa_cleanup_index',
60
'wppa_photos_hyphens_to_spaces',
61
+ 'wppa_png_to_jpg',
62
);
63
64
global $wppa_cron_maintenance_slugs;
384
case 'wppa_owner_to_name_proc':
385
case 'wppa_move_all_photos':
386
case 'wppa_photos_hyphens_to_spaces':
387
+ case 'wppa_png_to_jpg':
388
389
// Process photos
390
$table = WPPA_PHOTOS;
834
wppa_update_photo( array( 'id' => $id, 'name' => $newname ) );
835
}
836
break;
837
+
838
+ case 'wppa_png_to_jpg':
839
+ wppa_convert_png_to_jpg( $id );
840
+ break;
841
842
case 'wppa_custom_photo_proc':
843
$file = WPPA_UPLOAD_PATH . '/procs/wppa_custom_photo_proc.php';
wppa-photo-files.php CHANGED
@@ -2,7 +2,7 @@
2
/* wppa-photo-files.php
3
*
4
* Functions used to create/manipulate photofiles
5
- * Version 7.1.02
6
*
7
*/
8
@@ -427,7 +427,7 @@ function wppa_create_thumbnail( $id, $use_source = true ) {
427
428
// Not source requested
429
else {
430
- $file = wppa_get_photo_path( $id, false );
431
}
432
433
// If pdf, find image file
@@ -697,4 +697,103 @@ function wppa_image_magick( $command ) {
697
}
698
699
return $err;
700
}
2
/* wppa-photo-files.php
3
*
4
* Functions used to create/manipulate photofiles
5
+ * Version 7.1.08
6
*
7
*/
8
427
428
// Not source requested
429
else {
430
+ $file = wppa_fix_poster_ext( wppa_get_photo_path( $id, false ), $id );
431
}
432
433
// If pdf, find image file
697
}
698
699
return $err;
700
+ }
701
+
702
+ // Convert .png's to ,jpg's
703
+ //
704
+ // @1: photo id (integer) or pathname (string)
705
+ function wppa_convert_png_to_jpg( $arg ) {
706
+ global $wpdb;
707
+
708
+ // Photo id given
709
+ if ( is_numeric( $arg ) ) {
710
+
711
+ // Does photo exist?
712
+ $photo = wppa_cache_photo( $arg );
713
+ if ( ! $photo ) {
714
+ wppa_log( 'Err', 'Non existent photo item: ' . $arg . ' in wppa_convert_png_to_jpg()' );
715
+ return false;
716
+ }
717
+ $id = $photo['id'];
718
+ $ext = wppa_get_photo_item( $id, 'ext' );
719
+ $alb = wppa_get_photo_item( $id, 'album' );
720
+
721
+ // Is it a photo with extension .png, or a multimedia or pdf with possible png posterfile?
722
+ if ( strtolower( $ext ) == 'png' || wppa_is_multi( $id ) || wppa_is_pdf( $id ) ) {
723
+
724
+ // Convert files
725
+ wppa_convert_png_to_jpg( wppa_get_source_path( $id ) );
726
+ wppa_convert_png_to_jpg( wppa_get_o1_source_path( $id ) );
727
+ wppa_convert_png_to_jpg( wppa_get_photo_path( $id ) );
728
+ wppa_convert_png_to_jpg( wppa_get_thumb_path( $id ) );
729
+
730
+ // Fix local CDN files
731
+ $cdn_files = wppa_cdn_files( $id );
732
+ foreach( $cdn_files as $file ) {
733
+ wppa_convert_png_to_jpg( $file );
734
+ }
735
+
736
+ // Make new filename
737
+ if ( strpos( $photo['filename'], '.' ) ) {
738
+
739
+ // Do not change filename for PDF, VIDEO and AUDIO
740
+ if ( wppa_is_pdf( $id ) || wppa_is_multi( $id ) ) {
741
+ $new_filename = $photo['filename'];
742
+ }
743
+ else {
744
+ $new_filename = wppa_strip_ext( $photo['filename'] ) . '.jpg';
745
+ }
746
+ }
747
+ else {
748
+ $new_filename = $photo['filename'] . '.jpg';
749
+ }
750
+
751
+ // Make new ext, do not chnage for VIDEO and AUDIO
752
+ if ( $ext == 'xxx' ) {
753
+ $new_ext = $ext;
754
+ }
755
+ else {
756
+ $new_ext = 'jpg';
757
+ }
758
+
759
+ // Update DB
760
+ $wpdb->query( "UPDATE $wpdb->wppa_photos SET ext = '$new_ext', filename = '$new_filename' WHERE id = $id" );
761
+
762
+ // Done!
763
+ wppa_log( 'obs', 'Converted possible .png files from item ' . $id . ' to .jpg' );
764
+ }
765
+
766
+ // Nothing to convert
767
+ else {
768
+ return false;
769
+ }
770
+ }
771
+
772
+ // Is it a filepath with .png extension?
773
+ elseif ( strtolower( wppa_get_ext( $arg ) ) == 'png' ) {
774
+ $file = $arg;
775
+ if ( ! wppa_is_file( $file ) ) {
776
+ return false;
777
+ }
778
+
779
+ // Process the file
780
+ $img = wppa_imagecreatefrompng( $file );
781
+ if ( $img ) {
782
+ $newfile = wppa_strip_ext( $file ) . '.jpg';
783
+ if ( wppa_imagejpeg( $img, $newfile, wppa_opt( 'jpeg_quality' ) ) ) {
784
+ wppa_unlink( $file );
785
+ wppa_log( 'Fso', "Converted $file to $newfile" );
786
+ return true;
787
+ }
788
+ }
789
+ else {
790
+ wppa_log( 'Err', 'Invalid .png file found in wppa_convert_png_to_jpg(): ' . $file );
791
+ return false;
792
+ }
793
+ }
794
+
795
+ // No, its not a .png file
796
+ else {
797
+ return false;
798
+ }
799
}
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
* Package: wp-photo-album-plus
4
*
5
* manage all options
6
- * Version 7.1.06
7
*
8
*/
9
@@ -8260,6 +8260,18 @@ global $wppa_supported_camara_brands;
8260
$tags = 'system';
8261
wppa_setting(false, '20', $name, $desc, $html, $help, $clas, $tags);
8262
8263
8264
if ( current_user_can( 'administrator' ) ) {
8265
$name = __('Custom album proc', 'wp-photo-album-plus');
@@ -8472,7 +8484,7 @@ global $wppa_supported_camara_brands;
8472
8473
$name = __('Max execution time', 'wp-photo-album-plus');
8474
$desc = __('Set max execution time here.', 'wp-photo-album-plus');
8475
- $help = (__('If your php config does not properly set the max execution time, you can set it here. Seconds, 0 means do not change.', 'wp-photo-album-plus'));
8476
$help .= '<br />'.(__('A safe value is 45 in most cases', 'wp-photo-album-plus'));
8477
$help .= '<br />'.(sprintf(__('The PHP setting max_execution_time is set to %s.', 'wp-photo-album-plus'), ini_get('max_execution_time')));
8478
$slug = 'wppa_max_execution_time';
3
* Package: wp-photo-album-plus
4
*
5
* manage all options
6
+ * Version 7.1.08
7
*
8
*/
9
8260
$tags = 'system';
8261
wppa_setting(false, '20', $name, $desc, $html, $help, $clas, $tags);
8262
8263
+ $name = __('PNG to JPG', 'wp-photo-album-plus');
8264
+ $desc = __('Convert all .png files to .jpg files', 'wp-photo-album-plus');
8265
+ $slug2 = 'wppa_png_to_jpg';
8266
+ $html1 = '';
8267
+ $html2 = wppa_maintenance_button( $slug2 );
8268
+ $html3 = wppa_status_field( $slug2 );
8269
+ $html4 = wppa_togo_field( $slug2 );
8270
+ $html = array($html1, $html2, $html3, $html4);
8271
+ $clas = '';
8272
+ $tags = 'system';
8273
+ wppa_setting(false, '21', $name, $desc, $html, $help, $clas, $tags);
8274
+
8275
8276
if ( current_user_can( 'administrator' ) ) {
8277
$name = __('Custom album proc', 'wp-photo-album-plus');
8484
8485
$name = __('Max execution time', 'wp-photo-album-plus');
8486
$desc = __('Set max execution time here.', 'wp-photo-album-plus');
8487
+ $help = (__('If your php config does not properly set the max execution time, you can set it here. Seconds.', 'wp-photo-album-plus'));
8488
$help .= '<br />'.(__('A safe value is 45 in most cases', 'wp-photo-album-plus'));
8489
$help .= '<br />'.(sprintf(__('The PHP setting max_execution_time is set to %s.', 'wp-photo-album-plus'), ini_get('max_execution_time')));
8490
$slug = 'wppa_max_execution_time';
wppa-setup.php CHANGED
@@ -3,7 +3,7 @@
3
* Package: wp-photo-album-plus
4
*
5
* Contains all the setup stuff
6
- * Version 7.1.07
7
*
8
*/
9
@@ -1666,6 +1666,7 @@ cursorborder:'2px solid transparent',";
1666
'wppa_move_all_photos_from' => '',
1667
'wppa_move_all_photos_to' => '',
1668
'wppa_photos_hyphens_to_spaces' => '',
1669
1670
'wppa_logfile_on_menu' => 'no',
1671
3
* Package: wp-photo-album-plus
4
*
5
* Contains all the setup stuff
6
+ * Version 7.1.08
7
*
8
*/
9
1666
'wppa_move_all_photos_from' => '',
1667
'wppa_move_all_photos_to' => '',
1668
'wppa_photos_hyphens_to_spaces' => '',
1669
+ 'wppa_png_to_jpg' => '',
1670
1671
'wppa_logfile_on_menu' => 'no',
1672
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
* Package: wp-photo-album-plus
4
*
5
* Contains low-level utility routines
6
- * Version 7.1.07
7
*
8
*/
9
@@ -1899,14 +1899,16 @@ global $wppa_supported_photo_extensions;
1899
// Not for display ( need not to download fast ) but for external services like Fotomoto
1900
function wppa_get_hires_url( $id ) {
1901
1902
- // video? return the poster url
1903
if ( wppa_is_video( $id ) || wppa_has_audio( $id ) ) {
1904
$url = wppa_get_photo_url( $id );
1905
$temp = explode( '?', $url );
1906
$url = $temp['0'];
1907
return $url;
1908
}
1909
-
1910
// Try CDN
1911
if ( wppa_cdn( 'front' ) && ! wppa_too_old_for_cloud( $id ) && ! wppa_is_panorama( $id ) && ! wppa_is_pdf( $id ) ) {
1912
switch ( wppa_cdn( 'front' ) ) {
@@ -1918,7 +1920,7 @@ function wppa_get_hires_url( $id ) {
1918
}
1919
if ( $url ) return $url;
1920
}
1921
-
1922
// Try the orientation corrected source url
1923
$source_path = wppa_get_o1_source_path( $id );
1924
if ( is_file( $source_path ) ) {
@@ -1939,6 +1941,18 @@ function wppa_get_hires_url( $id ) {
1939
}
1940
}
1941
1942
// The medium res url
1943
$hires_url = wppa_get_photo_url( $id );
1944
$temp = explode( '?', $hires_url );
@@ -4742,7 +4756,7 @@ function wppa_remote_file_exists( $url ) {
4742
if( $httpCode == 200 ) {
4743
return true;
4744
}
4745
- sleep(2);
4746
}
4747
return false;
4748
}
3
* Package: wp-photo-album-plus
4
*
5
* Contains low-level utility routines
6
+ * Version 7.1.08
7
*
8
*/
9
1899
// Not for display ( need not to download fast ) but for external services like Fotomoto
1900
function wppa_get_hires_url( $id ) {
1901
1902
+ /*
1903
+ // video or audio? return the poster url
1904
if ( wppa_is_video( $id ) || wppa_has_audio( $id ) ) {
1905
$url = wppa_get_photo_url( $id );
1906
$temp = explode( '?', $url );
1907
$url = $temp['0'];
1908
return $url;
1909
}
1910
+ */
1911
+ /*
1912
// Try CDN
1913
if ( wppa_cdn( 'front' ) && ! wppa_too_old_for_cloud( $id ) && ! wppa_is_panorama( $id ) && ! wppa_is_pdf( $id ) ) {
1914
switch ( wppa_cdn( 'front' ) ) {
1920
}
1921
if ( $url ) return $url;
1922
}
1923
+ */
1924
// Try the orientation corrected source url
1925
$source_path = wppa_get_o1_source_path( $id );
1926
if ( is_file( $source_path ) ) {
1941
}
1942
}
1943
1944
+ // Try CDN
1945
+ if ( wppa_cdn( 'front' ) && ! wppa_too_old_for_cloud( $id ) && ! wppa_is_panorama( $id ) && ! wppa_is_pdf( $id ) ) {
1946
+ switch ( wppa_cdn( 'front' ) ) {
1947
+ case 'cloudinary':
1948
+ $url = wppa_get_cloudinary_url( $id );
1949
+ break;
1950
+ default:
1951
+ $url = '';
1952
+ }
1953
+ if ( $url ) return $url;
1954
+ }
1955
+
1956
// The medium res url
1957
$hires_url = wppa_get_photo_url( $id );
1958
$temp = explode( '?', $hires_url );
4756
if( $httpCode == 200 ) {
4757
return true;
4758
}
4759
+ // sleep(2);
4760
}
4761
return false;
4762
}
wppa-wpdb-update.php CHANGED
@@ -3,7 +3,7 @@
3
* Package: wp-photo-album-plus
4
*
5
* Contains low-level wpdb routines that update records
6
- * Version 7.1.07
7
*
8
*/
9
@@ -79,6 +79,17 @@ global $wpdb;
79
case 'sname':
80
$doit = true;
81
break;
82
case 'cover_linktype':
83
if ( in_array( $itemvalue, array( 'content', 'albums', 'thumbs', 'slide', 'page', 'none' ) ) ) {
84
$doit = true;
3
* Package: wp-photo-album-plus
4
*
5
* Contains low-level wpdb routines that update records
6
+ * Version 7.1.08
7
*
8
*/
9
79
case 'sname':
80
$doit = true;
81
break;
82
+ case 'cover_type':
83
+ if ( in_array( $itemvalue, array( '',
84
+ 'default',
85
+ 'longdesc',
86
+ 'imagefactory',
87
+ 'default-mcr',
88
+ 'longdesc-mcr',
89
+ 'imagefactory-mcr',
90
+ ) ) ) {
91
+ $doit = true;
92
+ }
93
case 'cover_linktype':
94
if ( in_array( $itemvalue, array( 'content', 'albums', 'thumbs', 'slide', 'page', 'none' ) ) ) {
95
$doit = true;
wppa-wrappers.php CHANGED
@@ -5,7 +5,7 @@
5
* Contains wrappers for standard php functions
6
* For security and bug reasons
7
*
8
- * Version 7.1.07
9
*
10
*/
11
@@ -156,7 +156,7 @@ global $wp_filesystem;
156
function wppa_filesize( $file ) {
157
global $wp_filesystem;
158
159
- if ( ! wppa_is_path_safe( $ile ) ) {
160
wppa_log( 'Err', 'Unsafe path detected in wppa_filesize(): ' . sanitize_text_field( $file ), true );
161
return false; // For diagnostic purposes, no return here yet
162
}
@@ -340,9 +340,9 @@ global $wp_filesystem;
340
}
341
}
342
343
- function wppa_rmdir( $dir, $when_empty ) {
344
global $wp_filesystem;
345
- wppa_log('obs','wppa_rmdir called with '.$dir);
346
if ( ! wppa_is_dir( $dir ) ) return;
347
348
wppa_init_fs();
@@ -353,9 +353,13 @@ wppa_log('obs','wppa_rmdir called with '.$dir);
353
if ( ! empty( $files ) ) {
354
return;
355
}
356
}
357
358
- $wp_filesystem->rmdir( $dir );
359
if ( wppa_is_dir( $dir ) ) {
360
wppa_log( 'Err', 'Could not remove dir ' . sanitize_text_field( str_replace( WPPA_CONTENT_PATH, '...', $dir ) ) );
361
}
5
* Contains wrappers for standard php functions
6
* For security and bug reasons
7
*
8
+ * Version 7.1.08
9
*
10
*/
11
156
function wppa_filesize( $file ) {
157
global $wp_filesystem;
158
159
+ if ( ! wppa_is_path_safe( $file ) ) {
160
wppa_log( 'Err', 'Unsafe path detected in wppa_filesize(): ' . sanitize_text_field( $file ), true );
161
return false; // For diagnostic purposes, no return here yet
162
}
340
}
341
}
342
343
+ function wppa_rmdir( $dir, $when_empty = false ) {
344
global $wp_filesystem;
345
+
346
if ( ! wppa_is_dir( $dir ) ) return;
347
348
wppa_init_fs();
353
if ( ! empty( $files ) ) {
354
return;
355
}
356
+ else {
357
+ $wp_filesystem->rmdir( $dir );
358
+ return;
359
+ }
360
}
361
362
+ $wp_filesystem->rmdir( $dir, true );
363
if ( wppa_is_dir( $dir ) ) {
364
wppa_log( 'Err', 'Could not remove dir ' . sanitize_text_field( str_replace( WPPA_CONTENT_PATH, '...', $dir ) ) );
365
}
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.1.07.004
6
* Author: J.N. Breetvelt a.k.a. OpaJaap
7
* Author URI: http://wppa.opajaap.nl/
8
* Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
@@ -22,8 +22,8 @@ global $wpdb;
22
global $wp_version;
23
24
/* WPPA GLOBALS */
25
- global $wppa_revno; $wppa_revno = '7107'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '7.1.07.004'; // WPPA software version
27
28
/* Init page js data */
29
global $wppa_js_page_data; $wppa_js_page_data = '';
@@ -36,7 +36,7 @@ global $wppa_endtime;
36
$wppa_endtime = time() + '25';
37
}
38
else {
39
- $met = get_option( 'wppa_max_execution_time', '25' );
40
$wppa_endtime = time() + $met;
41
}
42
}
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.1.08.004
6
* Author: J.N. Breetvelt a.k.a. OpaJaap
7
* Author URI: http://wppa.opajaap.nl/
8
* Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
22
global $wp_version;
23
24
/* WPPA GLOBALS */
25
+ global $wppa_revno; $wppa_revno = '7108'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '7.1.08.004'; // WPPA software version
27
28
/* Init page js data */
29
global $wppa_js_page_data; $wppa_js_page_data = '';
36
$wppa_endtime = time() + '25';
37
}
38
else {
39
+ $met = max( get_option( 'wppa_max_execution_time', '25' ), '25' );
40
$wppa_endtime = time() + $met;
41
}
42
}