WP Photo Album Plus - Version 7.3.13.005

Version Description

= 7.3.13 =

  • This version addresses various bug fixes and feature requests.
Download this release

Release Info

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

Code changes from version 7.3.13.004 to 7.3.13.005

changelog.txt CHANGED
@@ -4,6 +4,9 @@ WP Photo Album Plus Changelog
4
5
* Various security fixes.
6
* The nesting level on the album admin page will now only show up when you use the max level limitation in Table VII-B1.0, i.e. the value <> 99.
7
8
= 7.3.12 =
9
4
5
* Various security fixes.
6
* The nesting level on the album admin page will now only show up when you use the max level limitation in Table VII-B1.0, i.e. the value <> 99.
7
+ * You can now add some iptc tags as default for the photo custom datafields.
8
+ They will be filled in with the corresponding data at upload/import if available.
9
+ For backward compatibility, Table VII-B4,2: Apply New Photodesc, will also fill in the data for existing items if available.
10
11
= 7.3.12 =
12
readme.txt CHANGED
@@ -2,7 +2,7 @@
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.3.13.004
6
Stable tag: 7.3.12.008
7
Author: J.N. Breetvelt
8
Author URI: http://www.opajaap.nl/
@@ -137,7 +137,7 @@ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documen
137
138
== Upgrade Notice ==
139
140
- = 7.3.12 =
141
142
* This version addresses various bug fixes and feature requests.
143
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.3.13.005
6
Stable tag: 7.3.12.008
7
Author: J.N. Breetvelt
8
Author URI: http://www.opajaap.nl/
137
138
== Upgrade Notice ==
139
140
+ = 7.3.13 =
141
142
* This version addresses various bug fixes and feature requests.
143
wppa-admin-functions.php CHANGED
@@ -3,7 +3,7 @@
3
* Package: wp-photo-album-plus
4
*
5
* gp admin functions
6
- * Version 7.3.10
7
*
8
*/
9
@@ -886,11 +886,14 @@ global $warning_given_small;
886
if ( wppa_make_the_photo_files( $file, $id, $ext, ! wppa_does_thumb_need_watermark( $id ) ) ) {
887
888
// Repair photoname if not supplied and not standard
889
- /* if ( ! $name ) */ wppa_set_default_name( $id );
890
891
// Tags
892
wppa_set_default_tags( $id );
893
894
// Index
895
wppa_index_add( 'photo', $id );
896
3
* Package: wp-photo-album-plus
4
*
5
* gp admin functions
6
+ * Version 7.3.13
7
*
8
*/
9
886
if ( wppa_make_the_photo_files( $file, $id, $ext, ! wppa_does_thumb_need_watermark( $id ) ) ) {
887
888
// Repair photoname if not supplied and not standard
889
+ wppa_set_default_name( $id );
890
891
// Tags
892
wppa_set_default_tags( $id );
893
894
+ // Custom fields defaults
895
+ wppa_set_default_custom( $id );
896
+
897
// Index
898
wppa_index_add( 'photo', $id );
899
wppa-defaults.php CHANGED
@@ -3,7 +3,7 @@
3
* Package: wp-photo-album-plus
4
*
5
* Contains default settings
6
- * Version 7.3.12
7
*
8
*/
9
@@ -402,33 +402,43 @@ horizrailenabled:false,";
402
'wppa_custom_caption_0' => '',
403
'wppa_custom_visible_0' => 'no',
404
'wppa_custom_edit_0' => 'no',
405
'wppa_custom_caption_1' => '',
406
'wppa_custom_visible_1' => 'no',
407
'wppa_custom_edit_1' => 'no',
408
'wppa_custom_caption_2' => '',
409
'wppa_custom_visible_2' => 'no',
410
'wppa_custom_edit_2' => 'no',
411
'wppa_custom_caption_3' => '',
412
'wppa_custom_visible_3' => 'no',
413
'wppa_custom_edit_3' => 'no',
414
'wppa_custom_caption_4' => '',
415
'wppa_custom_visible_4' => 'no',
416
'wppa_custom_edit_4' => 'no',
417
'wppa_custom_caption_5' => '',
418
'wppa_custom_visible_5' => 'no',
419
'wppa_custom_edit_5' => 'no',
420
'wppa_custom_caption_6' => '',
421
'wppa_custom_visible_6' => 'no',
422
'wppa_custom_edit_6' => 'no',
423
'wppa_custom_caption_7' => '',
424
'wppa_custom_visible_7' => 'no',
425
'wppa_custom_edit_7' => 'no',
426
'wppa_custom_caption_8' => '',
427
'wppa_custom_visible_8' => 'no',
428
'wppa_custom_edit_8' => 'no',
429
'wppa_custom_caption_9' => '',
430
'wppa_custom_visible_9' => 'no',
431
'wppa_custom_edit_9' => 'no',
432
433
434
'wppa_close_text' => 'Close', // frontend upload/edit etc
3
* Package: wp-photo-album-plus
4
*
5
* Contains default settings
6
+ * Version 7.3.13
7
*
8
*/
9
402
'wppa_custom_caption_0' => '',
403
'wppa_custom_visible_0' => 'no',
404
'wppa_custom_edit_0' => 'no',
405
+ 'wppa_custom_default_0' => '',
406
'wppa_custom_caption_1' => '',
407
'wppa_custom_visible_1' => 'no',
408
'wppa_custom_edit_1' => 'no',
409
+ 'wppa_custom_default_1' => '',
410
'wppa_custom_caption_2' => '',
411
'wppa_custom_visible_2' => 'no',
412
'wppa_custom_edit_2' => 'no',
413
+ 'wppa_custom_default_2' => '',
414
'wppa_custom_caption_3' => '',
415
'wppa_custom_visible_3' => 'no',
416
'wppa_custom_edit_3' => 'no',
417
+ 'wppa_custom_default_3' => '',
418
'wppa_custom_caption_4' => '',
419
'wppa_custom_visible_4' => 'no',
420
'wppa_custom_edit_4' => 'no',
421
+ 'wppa_custom_default_4' => '',
422
'wppa_custom_caption_5' => '',
423
'wppa_custom_visible_5' => 'no',
424
'wppa_custom_edit_5' => 'no',
425
+ 'wppa_custom_default_5' => '',
426
'wppa_custom_caption_6' => '',
427
'wppa_custom_visible_6' => 'no',
428
'wppa_custom_edit_6' => 'no',
429
+ 'wppa_custom_default_6' => '',
430
'wppa_custom_caption_7' => '',
431
'wppa_custom_visible_7' => 'no',
432
'wppa_custom_edit_7' => 'no',
433
+ 'wppa_custom_default_7' => '',
434
'wppa_custom_caption_8' => '',
435
'wppa_custom_visible_8' => 'no',
436
'wppa_custom_edit_8' => 'no',
437
+ 'wppa_custom_default_8' => '',
438
'wppa_custom_caption_9' => '',
439
'wppa_custom_visible_9' => 'no',
440
'wppa_custom_edit_9' => 'no',
441
+ 'wppa_custom_default_9' => '',
442
443
444
'wppa_close_text' => 'Close', // frontend upload/edit etc
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.3.11
7
*
8
*/
9
@@ -465,6 +465,7 @@ global $wppa_endtime;
465
if ( $description != $photo['description'] ) { // Modified photo description
466
$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->wppa_photos SET description = %s WHERE id = %s", $description, $id ) );
467
}
468
break;
469
470
case 'wppa_append_to_photodesc':
3
* Package: wp-photo-album-plus
4
*
5
* Contains (not yet, but in the future maybe) all the maintenance routines
6
+ * Version 7.3.13
7
*
8
*/
9
465
if ( $description != $photo['description'] ) { // Modified photo description
466
$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->wppa_photos SET description = %s WHERE id = %s", $description, $id ) );
467
}
468
+ wppa_set_default_custom( $id ); // Update customfields defaults
469
break;
470
471
case 'wppa_append_to_photodesc':
wppa-photo-admin-autosave.php CHANGED
@@ -1127,7 +1127,7 @@ function wppaToggleExif( id, count ) {
1127
sprintf( __( 'pix, (0=default:%s)', 'wp-photo-album-plus' ), wppa_opt( 'video_height' ) ) .
1128
'. ';
1129
if ( $duration ) {
1130
- $duration = int( $duration * 100 ) / 100;
1131
if ( $duration < 120.0 ) {
1132
echo sprintf( __( 'Duration: %s seconds', 'wp-photo-album-plus' ) ,$duration ) .
1133
'. ';
1127
sprintf( __( 'pix, (0=default:%s)', 'wp-photo-album-plus' ), wppa_opt( 'video_height' ) ) .
1128
'. ';
1129
if ( $duration ) {
1130
+ $duration = intval( $duration * 100 ) / 100;
1131
if ( $duration < 120.0 ) {
1132
echo sprintf( __( 'Duration: %s seconds', 'wp-photo-album-plus' ) ,$duration ) .
1133
'. ';
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
* Package: wp-photo-album-plus
4
*
5
* manage all options
6
- * Version 7.3.12
7
*
8
*/
9
@@ -3401,8 +3401,28 @@ global $wppa_supported_camara_brands;
3401
$tags = 'meta';
3402
wppa_setting($slug, '10', $name, $desc, $html, $help, $clas, $tags);
3403
3404
for ( $i = '0'; $i < '10'; $i++ ) {
3405
- $name = sprintf(__('Name, vis, edit %s', 'wp-photo-album-plus'), $i);
3406
$desc = sprintf(__('The caption for field %s, visibility and editability at frontend.', 'wp-photo-album-plus'), $i);
3407
$help = (sprintf(__('If you check the first box, the value of this field is displayable in photo descriptions at the frontend with keyword w#c%s', 'wp-photo-album-plus'), $i));
3408
$help .= '<br />'.(__('If you check the second box, the value of this field is editable at the frontend new style dialog.', 'wp-photo-album-plus'));
@@ -3412,9 +3432,11 @@ global $wppa_supported_camara_brands;
3412
$html2 = wppa_checkbox($slug2);
3413
$slug3 = 'wppa_custom_edit_'.$i;
3414
$html3 = wppa_checkbox($slug3);
3415
$clas = 'custfields';
3416
$tags = 'meta';
3417
- wppa_setting(array($slug1,$slug2,$slug3), '10.'.$i.'a,b,c', $name, $desc, $html1.$html2.$html3, $help, $clas, $tags);
3418
}
3419
}
3420
@@ -11862,7 +11884,7 @@ global $wppa_totcols;
11862
}
11863
else foreach ( array_keys($slugs) as $slugidx ) {
11864
if ( $slugs[$slugidx] != '' && isset($nums[$slugidx]) ) $helptext .= ' '.$nums[$slugidx].'. '.wppa_dflt($slugs[$slugidx]);
11865
- if ( $slugs[$slugidx] != '' && $wppa_opt[$slugs[$slugidx]] != $wppa_defaults[$slugs[$slugidx]] ) {
11866
$is_dflt = false;
11867
}
11868
}
3
* Package: wp-photo-album-plus
4
*
5
* manage all options
6
+ * Version 7.3.13
7
*
8
*/
9
3401
$tags = 'meta';
3402
wppa_setting($slug, '10', $name, $desc, $html, $help, $clas, $tags);
3403
3404
+ $opts = array( '',
3405
+ 'Caption',
3406
+ 'Graphic name',
3407
+ 'Photographer',
3408
+ 'Creation date',
3409
+ 'City',
3410
+ 'State',
3411
+ 'Country',
3412
+ );
3413
+
3414
+ $vals = array( '',
3415
+ '2#120',
3416
+ '2#005',
3417
+ '2#080',
3418
+ '2#055',
3419
+ '2#090',
3420
+ '2#095',
3421
+ '2#101',
3422
+ );
3423
+
3424
for ( $i = '0'; $i < '10'; $i++ ) {
3425
+ $name = sprintf(__('Name, vis, edit %s dflt', 'wp-photo-album-plus'), $i);
3426
$desc = sprintf(__('The caption for field %s, visibility and editability at frontend.', 'wp-photo-album-plus'), $i);
3427
$help = (sprintf(__('If you check the first box, the value of this field is displayable in photo descriptions at the frontend with keyword w#c%s', 'wp-photo-album-plus'), $i));
3428
$help .= '<br />'.(__('If you check the second box, the value of this field is editable at the frontend new style dialog.', 'wp-photo-album-plus'));
3432
$html2 = wppa_checkbox($slug2);
3433
$slug3 = 'wppa_custom_edit_'.$i;
3434
$html3 = wppa_checkbox($slug3);
3435
+ $slug4 = 'wppa_custom_default_'.$i;
3436
+ $html4 = wppa_select($slug4, $opts, $vals);
3437
$clas = 'custfields';
3438
$tags = 'meta';
3439
+ wppa_setting(array($slug1,$slug2,$slug3,$slug4), '10.'.$i.'a,b,c', $name, $desc, $html1.$html2.$html3.$html4, $help, $clas, $tags);
3440
}
3441
}
3442
11884
}
11885
else foreach ( array_keys($slugs) as $slugidx ) {
11886
if ( $slugs[$slugidx] != '' && isset($nums[$slugidx]) ) $helptext .= ' '.$nums[$slugidx].'. '.wppa_dflt($slugs[$slugidx]);
11887
+ if ( $slugs[$slugidx] != '' && isset($wppa_opt[$slugs[$slugidx]]) && $wppa_opt[$slugs[$slugidx]] != $wppa_defaults[$slugs[$slugidx]] ) {
11888
$is_dflt = false;
11889
}
11890
}
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
* Package: wp-photo-album-plus
4
*
5
* Contains low-level utility routines
6
- * Version 7.3.12
7
*
8
*/
9
@@ -2227,6 +2227,37 @@ global $wpdb;
2227
}
2228
}
2229
2230
function wppa_test_for_medal( $id ) {
2231
global $wpdb;
2232
3
* Package: wp-photo-album-plus
4
*
5
* Contains low-level utility routines
6
+ * Version 7.3.13
7
*
8
*/
9
2227
}
2228
}
2229
2230
+ function wppa_set_default_custom( $id ) {
2231
+
2232
+ if ( ! wppa_switch( 'custom_fields' ) ) {
2233
+ return;
2234
+ }
2235
+ $custom = wppa_get_photo_item( $id, 'custom' );
2236
+ if ( $custom ) {
2237
+ $custom = wppa_unserialize( $custom );
2238
+ }
2239
+ else {
2240
+ $custom = array( '', '', '', '', '', '', '', '', '', '' );
2241
+ }
2242
+ $any = false;
2243
+ $i = 0;
2244
+ while ( $i < 10 ) {
2245
+ $data = $custom[$i];
2246
+ if ( ! $data ) {
2247
+ $data = wppa_opt( 'custom_default_' . $i, '' );
2248
+ $new_data = wppa_filter_iptc( $data, $id );
2249
+ if ( $new_data != $data ) {
2250
+ $custom[$i] = $new_data;
2251
+ $any = true;
2252
+ }
2253
+ }
2254
+ $i++;
2255
+ }
2256
+ if ( $any ) {
2257
+ wppa_update_photo( array( 'id' => $id, 'custom' => serialize( $custom ) ) );
2258
+ }
2259
+ }
2260
+
2261
function wppa_test_for_medal( $id ) {
2262
global $wpdb;
2263
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.3.13.004
6
* Author: J.N. Breetvelt a.k.a. OpaJaap
7
* Author URI: http://wppa.opajaap.nl/
8
* Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
@@ -24,7 +24,7 @@ global $wp_version;
24
25
/* WPPA GLOBALS */
26
global $wppa_revno; $wppa_revno = '7313'; // WPPA db version
27
- global $wppa_api_version; $wppa_api_version = '7.3.13.004'; // WPPA software version
28
29
/* Init page js data */
30
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.3.13.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/
24
25
/* WPPA GLOBALS */
26
global $wppa_revno; $wppa_revno = '7313'; // WPPA db version
27
+ global $wppa_api_version; $wppa_api_version = '7.3.13.005'; // WPPA software version
28
29
/* Init page js data */
30
global $wppa_js_page_data; $wppa_js_page_data = '';