WP Photo Album Plus - Version 7.3.13.010

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

Code changes from version 7.3.13.008 to 7.3.13.010

changelog.txt CHANGED
@@ -12,6 +12,8 @@ the corresponding label value will also be empty when the photo description is f
12
This means that a table line like e.g.
13
<tr><td>w#cc0</td><td>w#cd0</td></tr> will show nothing as long as there is no css that forces the height of it to be > 0.
14
* Added chackbox to Table IX-D5 to autmatically remove linebreaks and redundant space when new the photo description is updated.
15
16
= 7.3.12 =
17
12
This means that a table line like e.g.
13
<tr><td>w#cc0</td><td>w#cd0</td></tr> will show nothing as long as there is no css that forces the height of it to be > 0.
14
* Added chackbox to Table IX-D5 to autmatically remove linebreaks and redundant space when new the photo description is updated.
15
+ * New setting: Table IX-D11.4: Iptc 025 keywords to tags. Convert IPTC025 keywords to tags during upload. Saving IPTC must be on.
16
+ * New maintenance proc Table VIII-B24: Re-init custom and tags.
17
18
= 7.3.12 =
19
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.008
6
Stable tag: 7.3.12.008
7
Author: J.N. Breetvelt
8
Author URI: http://www.opajaap.nl/
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.010
6
Stable tag: 7.3.12.008
7
Author: J.N. Breetvelt
8
Author URI: http://www.opajaap.nl/
wppa-defaults.php CHANGED
@@ -957,6 +957,7 @@ horizrailenabled:false,";
957
'wppa_png_to_jpg' => '',
958
'wppa_fix_mp4_meta' => '',
959
'wppa_fix_userids' => '',
960
961
'wppa_logfile_on_menu' => 'no',
962
@@ -1061,6 +1062,7 @@ horizrailenabled:false,";
1061
'wppa_grant_parent' => '-1',
1062
'wppa_grant_cats' => '',
1063
'wppa_grant_tags' => '',
1064
'wppa_default_parent' => '0',
1065
'wppa_default_parent_always' => 'no',
1066
957
'wppa_png_to_jpg' => '',
958
'wppa_fix_mp4_meta' => '',
959
'wppa_fix_userids' => '',
960
+ 'wppa_fix_custom_tags' => '',
961
962
'wppa_logfile_on_menu' => 'no',
963
1062
'wppa_grant_parent' => '-1',
1063
'wppa_grant_cats' => '',
1064
'wppa_grant_tags' => '',
1065
+ 'wppa_ipc025_to_tags' => 'no',
1066
'wppa_default_parent' => '0',
1067
'wppa_default_parent_always' => 'no',
1068
wppa-functions.php CHANGED
@@ -5128,6 +5128,9 @@ global $wppa_alert;
5128
// custom
5129
wppa_fe_add_custom( $id );
5130
5131
// Done!
5132
return $id;
5133
@@ -5286,6 +5289,10 @@ global $wppa_alert;
5286
// Do pdf postprocessing
5287
wppa_pdf_postprocess( $id );
5288
5289
return $id;
5290
}
5291
5128
// custom
5129
wppa_fe_add_custom( $id );
5130
5131
+ // Custom fields defaults
5132
+ wppa_set_default_custom( $id );
5133
+
5134
// Done!
5135
return $id;
5136
5289
// Do pdf postprocessing
5290
wppa_pdf_postprocess( $id );
5291
5292
+ // Default tags and custom
5293
+ wppa_set_default_tags( $id );
5294
+ wppa_set_default_custom( $id );
5295
+
5296
return $id;
5297
}
5298
wppa-maintenance.php CHANGED
@@ -61,6 +61,7 @@ $wppa_all_maintenance_slugs = array( 'wppa_remake_index_albums',
61
'wppa_png_to_jpg',
62
'wppa_fix_mp4_meta',
63
'wppa_fix_userids',
64
);
65
66
global $wppa_cron_maintenance_slugs;
@@ -79,6 +80,7 @@ $wppa_cron_maintenance_slugs = array( 'wppa_remake_index_albums',
79
'wppa_crypt_albums',
80
'wppa_photos_hyphens_to_spaces',
81
'wppa_fix_userids',
82
83
);
84
@@ -392,6 +394,7 @@ global $wppa_endtime;
392
case 'wppa_photos_hyphens_to_spaces':
393
case 'wppa_png_to_jpg':
394
case 'wppa_fix_mp4_meta':
395
case 'wppa_fix_userids':
396
397
// Process photos
@@ -849,6 +852,11 @@ global $wppa_endtime;
849
wppa_fix_video_framesize( $id, 'maintproc' );
850
break;
851
852
case 'wppa_fix_userids':
853
$ratings = $wpdb->get_results( "SELECT * FROM $wpdb->wppa_rating WHERE photo = $id", ARRAY_A );
854
foreach ( $ratings as $rating ) {
61
'wppa_png_to_jpg',
62
'wppa_fix_mp4_meta',
63
'wppa_fix_userids',
64
+ 'wppa_fix_custom_tags',
65
);
66
67
global $wppa_cron_maintenance_slugs;
80
'wppa_crypt_albums',
81
'wppa_photos_hyphens_to_spaces',
82
'wppa_fix_userids',
83
+ 'wppa_fix_custom_tags',
84
85
);
86
394
case 'wppa_photos_hyphens_to_spaces':
395
case 'wppa_png_to_jpg':
396
case 'wppa_fix_mp4_meta':
397
+ case 'wppa_fix_custom_tags':
398
case 'wppa_fix_userids':
399
400
// Process photos
852
wppa_fix_video_framesize( $id, 'maintproc' );
853
break;
854
855
+ case 'wppa_fix_custom_tags':
856
+ wppa_set_default_tags( $id );
857
+ wppa_set_default_custom( $id, true );
858
+ break;
859
+
860
case 'wppa_fix_userids':
861
$ratings = $wpdb->get_results( "SELECT * FROM $wpdb->wppa_rating WHERE photo = $id", ARRAY_A );
862
foreach ( $ratings as $rating ) {
wppa-settings-autosave.php CHANGED
@@ -3402,27 +3402,65 @@ global $wppa_supported_camara_brands;
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
'--- multiline ---',
3413
);
3414
3415
$vals = array( '',
3416
- '2#120',
3417
'2#005',
3418
- '2#080',
3419
'2#055',
3420
'2#090',
3421
'2#095',
3422
'2#101',
3423
'multi',
3424
);
3425
3426
for ( $i = '0'; $i < '10'; $i++ ) {
3427
$name = sprintf(__('Name, vis, edit %s dflt', 'wp-photo-album-plus'), $i);
3428
$desc = sprintf(__('The caption for field %s, visibility and editability at frontend.', 'wp-photo-album-plus'), $i);
@@ -8643,7 +8681,20 @@ global $wppa_supported_camara_brands;
8643
$html = array($html1, $html2, $html3, $html4);
8644
$clas = '';
8645
$tags = 'system,rating,comment';
8646
- wppa_setting(false, '20', $name, $desc, $html, $help, $clas, $tags);
8647
8648
if ( current_user_can( 'administrator' ) ) {
8649
$name = __('Custom album proc', 'wp-photo-album-plus');
@@ -9706,6 +9757,15 @@ global $wppa_supported_camara_brands;
9706
$tags = 'system,album';
9707
wppa_setting($slug, '11.3', $name, $desc, $html, $help, $clas, $tags);
9708
9709
$name = __('Max user albums', 'wp-photo-album-plus');
9710
$desc = __('The max number of albums a user can create.', 'wp-photo-album-plus');
9711
$help = (__('The maximum number of albums a user can create when he is not admin and owner only is active', 'wp-photo-album-plus'));
3402
wppa_setting($slug, '10', $name, $desc, $html, $help, $clas, $tags);
3403
3404
$opts = array( '',
3405
'Graphic name',
3406
'Creation date',
3407
+ 'Photographer',
3408
'City',
3409
+ 'Province State',
3410
'Country',
3411
+ 'Source',
3412
+ 'Copyright',
3413
+ 'Caption',
3414
'--- multiline ---',
3415
);
3416
3417
$vals = array( '',
3418
'2#005',
3419
'2#055',
3420
+ '2#080',
3421
'2#090',
3422
'2#095',
3423
'2#101',
3424
+ '2#115',
3425
+ '2#116',
3426
+ '2#120',
3427
'multi',
3428
);
3429
3430
+ /* This seems to be it
3431
+ const OBJECT_NAME = '005';
3432
+ const EDIT_STATUS = '007';
3433
+ const PRIORITY = '010';
3434
+ const CATEGORY = '015';
3435
+ const SUPPLEMENTAL_CATEGORY = '020';
3436
+ const FIXTURE_IDENTIFIER = '022';
3437
+ const KEYWORDS = '025';
3438
+ const RELEASE_DATE = '030';
3439
+ const RELEASE_TIME = '035';
3440
+ const SPECIAL_INSTRUCTIONS = '040';
3441
+ const REFERENCE_SERVICE = '045';
3442
+ const REFERENCE_DATE = '047';
3443
+ const REFERENCE_NUMBER = '050';
3444
+ const CREATED_DATE = '055';
3445
+ const CREATED_TIME = '060';
3446
+ const ORIGINATING_PROGRAM = '065';
3447
+ const PROGRAM_VERSION = '070';
3448
+ const OBJECT_CYCLE = '075';
3449
+ const CREATOR = '080';
3450
+ const CITY = '090';
3451
+ const PROVINCE_STATE = '095';
3452
+ const COUNTRY_CODE = '100';
3453
+ const COUNTRY = '101';
3454
+ const ORIGINAL_TRANSMISSION_REFERENCE = '103';
3455
+ const HEADLINE = '105';
3456
+ const CREDIT = '110';
3457
+ const SOURCE = '115';
3458
+ const COPYRIGHT_STRING = '116';
3459
+ const CAPTION = '120';
3460
+ const LOCAL_CAPTION = '121';
3461
+ const CAPTION_WRITER = '122';
3462
+ */
3463
+
3464
for ( $i = '0'; $i < '10'; $i++ ) {
3465
$name = sprintf(__('Name, vis, edit %s dflt', 'wp-photo-album-plus'), $i);
3466
$desc = sprintf(__('The caption for field %s, visibility and editability at frontend.', 'wp-photo-album-plus'), $i);
8681
$html = array($html1, $html2, $html3, $html4);
8682
$clas = '';
8683
$tags = 'system,rating,comment';
8684
+ wppa_setting(false, '23', $name, $desc, $html, $help, $clas, $tags);
8685
+
8686
+ $name = __('Re-init custom and tags', 'wp-photo-album-plus');
8687
+ $desc = __('Re-initialize custom photo fields and default tags', 'wp-photo-album-plus');
8688
+ $help = '';
8689
+ $slug2 = 'wppa_fix_custom_tags';
8690
+ $html1 = '';
8691
+ $html2 = wppa_maintenance_button( $slug2 );
8692
+ $html3 = wppa_status_field( $slug2 );
8693
+ $html4 = wppa_togo_field( $slug2 );
8694
+ $html = array($html1, $html2, $html3, $html4);
8695
+ $clas = '';
8696
+ $tags = 'system';
8697
+ wppa_setting(false, '24', $name, $desc, $html, $help, $clas, $tags);
8698
8699
if ( current_user_can( 'administrator' ) ) {
8700
$name = __('Custom album proc', 'wp-photo-album-plus');
9757
$tags = 'system,album';
9758
wppa_setting($slug, '11.3', $name, $desc, $html, $help, $clas, $tags);
9759
9760
+ $name = __('Iptc 025 keywords to tags', 'wp-photo-album-plus');
9761
+ $desc = __('Convert IPTC025 keywords to tags during upload.', 'wp-photo-album-plus');
9762
+ $help = __('Saving IPTC data must be on for this feature', 'wp-photo-album-plus');
9763
+ $slug = 'wppa_ipc025_to_tags';
9764
+ $html = wppa_checkbox( $slug );
9765
+ $clas = '';
9766
+ $tags = 'system';
9767
+ wppa_setting($slug, '11.4', $name, $desc, $html, $help, $clas, $tags);
9768
+
9769
$name = __('Max user albums', 'wp-photo-album-plus');
9770
$desc = __('The max number of albums a user can create.', 'wp-photo-album-plus');
9771
$help = (__('The maximum number of albums a user can create when he is not admin and owner only is active', 'wp-photo-album-plus'));
wppa-utils.php CHANGED
@@ -2220,6 +2220,16 @@ global $wpdb;
2220
$album = wppa_cache_album( $thumb['album'] );
2221
$tags = wppa_sanitize_tags( str_replace( array( '\'', '"'), ',', wppa_filter_iptc( wppa_filter_exif( $album['default_tags'], $id ), $id ) ) );
2222
2223
if ( $tags ) {
2224
wppa_update_photo( array( 'id' => $id, 'tags' => $tags ) );
2225
wppa_clear_taglist();
@@ -2227,7 +2237,7 @@ global $wpdb;
2227
}
2228
}
2229
2230
- function wppa_set_default_custom( $id ) {
2231
2232
if ( ! wppa_switch( 'custom_fields' ) ) {
2233
return;
@@ -2243,7 +2253,7 @@ function wppa_set_default_custom( $id ) {
2243
$i = 0;
2244
while ( $i < 10 ) {
2245
$data = $custom[$i];
2246
- if ( ! $data || $data == __( 'n.a.', 'wp-photo-album-plus' ) ) {
2247
$data = wppa_opt( 'custom_default_' . $i, '' );
2248
$new_data = wppa_filter_iptc( $data, $id );
2249
$new_data = wppa_filter_exif( $new_data, $id );
2220
$album = wppa_cache_album( $thumb['album'] );
2221
$tags = wppa_sanitize_tags( str_replace( array( '\'', '"'), ',', wppa_filter_iptc( wppa_filter_exif( $album['default_tags'], $id ), $id ) ) );
2222
2223
+ if ( wppa_switch( 'wppa_ipc025_to_tags' ) ) {
2224
+ $keywords = $wpdb->get_col( "SELECT description FROM $wpdb->wppa_iptc WHERE tag = '2#025' AND photo = $id" );
2225
+ if ( $keywords ) {
2226
+ foreach( $keywords as $word ) {
2227
+ $tags .= ',' . $word;
2228
+ }
2229
+ $tags = wppa_sanitize_tags( $tags );
2230
+ }
2231
+ }
2232
+
2233
if ( $tags ) {
2234
wppa_update_photo( array( 'id' => $id, 'tags' => $tags ) );
2235
wppa_clear_taglist();
2237
}
2238
}
2239
2240
+ function wppa_set_default_custom( $id, $force = false ) {
2241
2242
if ( ! wppa_switch( 'custom_fields' ) ) {
2243
return;
2253
$i = 0;
2254
while ( $i < 10 ) {
2255
$data = $custom[$i];
2256
+ if ( ! $data || $data == __( 'n.a.', 'wp-photo-album-plus' ) || $force ) {
2257
$data = wppa_opt( 'custom_default_' . $i, '' );
2258
$new_data = wppa_filter_iptc( $data, $id );
2259
$new_data = wppa_filter_exif( $new_data, $id );
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.008
6
* Author: J.N. Breetvelt a.k.a. OpaJaap
7
* Author URI: http://wppa.opajaap.nl/
8
* Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
@@ -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.009'; // 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.010
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.010'; // WPPA software version
28
29
/* Init page js data */
30
global $wppa_js_page_data; $wppa_js_page_data = '';