WP Photo Album Plus - Version 8.0.10.004

Version Description

= 8.0.10 =

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

Code changes from version 8.0.10.003 to 8.0.10.004

changelog.txt CHANGED
@@ -20,6 +20,7 @@ Note 1: All names are case sensitive.
20
  Note 2: This specification to limit the display does not exist in the widget implementation but you can put the shortcode in a text widget.
21
  If you want to show your own zipfile only: Tick Advanced settings -> System -> I -> Item 30: Admins choice me only. This works on the widget also.
22
  * When the 'Admins choice' selection includes tagging the photo, it will now be tagged by the users displayname rather than user-<userid>.
 
23
  * Corrected (lowered) wheel zoom sensitivity on panoramic and zoomable images for browsers other than chrome.
24
 
25
  = 8.0.09 =
20
  Note 2: This specification to limit the display does not exist in the widget implementation but you can put the shortcode in a text widget.
21
  If you want to show your own zipfile only: Tick Advanced settings -> System -> I -> Item 30: Admins choice me only. This works on the widget also.
22
  * When the 'Admins choice' selection includes tagging the photo, it will now be tagged by the users displayname rather than user-<userid>.
23
+ * Added maintenance procedure Advanced settings -> Maintenance -> III: One time conversions -> Item 3 to convert old style Choice generated tags to new style tags.
24
  * Corrected (lowered) wheel zoom sensitivity on panoramic and zoomable images for browsers other than chrome.
25
 
26
  = 8.0.09 =
index.php CHANGED
@@ -1,3 +1,2 @@
1
- <?php
2
- // Silence is golden.
3
- ?>
1
+ <?php
2
+ // Silence is golden.
 
wppa-defaults.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains default settings
6
- * Version 8.0.09.002
7
  *
8
  */
9
 
@@ -929,6 +929,7 @@ horizrailenabled:false,";
929
  'wppa_fix_mp4_meta' => '',
930
  'wppa_fix_userids' => '',
931
  'wppa_fix_custom_tags' => '',
 
932
 
933
  'wppa_logfile_on_menu' => 'no',
934
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains default settings
6
+ * Version 8.0.10.004
7
  *
8
  */
9
 
929
  'wppa_fix_mp4_meta' => '',
930
  'wppa_fix_userids' => '',
931
  'wppa_fix_custom_tags' => '',
932
+ 'wppa_covert_usertags' => '',
933
 
934
  'wppa_logfile_on_menu' => 'no',
935
 
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.0.08.001
7
  *
8
  */
9
 
@@ -62,6 +62,7 @@ $wppa_all_maintenance_slugs = array( 'wppa_remake_index_albums',
62
  'wppa_fix_mp4_meta',
63
  'wppa_fix_userids',
64
  'wppa_fix_custom_tags',
 
65
  );
66
 
67
  global $wppa_cron_maintenance_slugs;
@@ -80,8 +81,11 @@ $wppa_cron_maintenance_slugs = array( 'wppa_remake_index_albums',
80
  'wppa_crypt_albums',
81
  'wppa_photos_hyphens_to_spaces',
82
  'wppa_fix_userids',
 
 
83
  'wppa_fix_custom_tags',
84
-
 
85
  );
86
 
87
  // Main maintenace module
@@ -398,6 +402,7 @@ global $wppa_endtime;
398
  case 'wppa_fix_mp4_meta':
399
  case 'wppa_fix_custom_tags':
400
  case 'wppa_fix_userids':
 
401
 
402
  // Process photos
403
  $table = WPPA_PHOTOS;
@@ -908,6 +913,27 @@ global $wppa_endtime;
908
  }
909
  break;
910
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
911
  case 'wppa_custom_photo_proc':
912
  $file = WPPA_UPLOAD_PATH . '/procs/wppa_custom_photo_proc.php';
913
  include $file;
@@ -1197,17 +1223,11 @@ global $wppa_endtime;
1197
  wppa_bump_thumb_rev();
1198
  break;
1199
  case 'wppa_edit_tag':
1200
- wppa_clear_taglist();
1201
- if ( wppa_switch( 'search_tags' ) ) {
1202
- wppa_schedule_maintenance_proc( 'wppa_remake_index_photos' );
1203
- }
1204
- $reload = 'reload';
1205
- break;
1206
  case 'wppa_sanitize_tags':
1207
- wppa_clear_taglist();
1208
- break;
1209
  case 'wppa_sanitize_cats':
1210
  wppa_clear_catlist();
 
1211
  break;
1212
  case 'wppa_sync_cloud':
1213
  unset( $wppa_session['cloudinary_ids'] );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
+ * Version 8.0.10.004
7
  *
8
  */
9
 
62
  'wppa_fix_mp4_meta',
63
  'wppa_fix_userids',
64
  'wppa_fix_custom_tags',
65
+ 'wppa_covert_usertags',
66
  );
67
 
68
  global $wppa_cron_maintenance_slugs;
81
  'wppa_crypt_albums',
82
  'wppa_photos_hyphens_to_spaces',
83
  'wppa_fix_userids',
84
+ 'wppa_sanitize_tags',
85
+ 'wppa_sanitize_cats',
86
  'wppa_fix_custom_tags',
87
+ 'wppa_covert_usertags',
88
+ 'wppa_all_ext_to_lower',
89
  );
90
 
91
  // Main maintenace module
402
  case 'wppa_fix_mp4_meta':
403
  case 'wppa_fix_custom_tags':
404
  case 'wppa_fix_userids':
405
+ case 'wppa_covert_usertags':
406
 
407
  // Process photos
408
  $table = WPPA_PHOTOS;
913
  }
914
  break;
915
 
916
+ case 'wppa_covert_usertags':
917
+ $tags = wppa_get_photo_item( $id, 'tags' );
918
+ if ( stripos( $tags, ',user-' ) !== false ) {
919
+ $tag_arr = explode( ',', $tags );
920
+ foreach( array_keys( $tag_arr ) as $tag_key ) {
921
+ $tag = $tag_arr[$tag_key];
922
+ if ( stripos( $tag, 'user-' ) !== false ) {
923
+ $uid = substr( $tag, 5 );
924
+ if ( wppa_is_int( $uid ) ) {
925
+ $user = wppa_get_user_by( 'id', $uid ) -> display_name;
926
+ if ( $user ) {
927
+ $tag_arr[$tag_key] = $user;
928
+ $tags = wppa_sanitize_tags( implode( ',', $tag_arr ) );
929
+ wppa_update_photo( ['id' => $id, 'tags' => $tags] );
930
+ }
931
+ }
932
+ }
933
+ }
934
+ }
935
+ break;
936
+
937
  case 'wppa_custom_photo_proc':
938
  $file = WPPA_UPLOAD_PATH . '/procs/wppa_custom_photo_proc.php';
939
  include $file;
1223
  wppa_bump_thumb_rev();
1224
  break;
1225
  case 'wppa_edit_tag':
1226
+ case 'wppa_covert_usertags':
 
 
 
 
 
1227
  case 'wppa_sanitize_tags':
 
 
1228
  case 'wppa_sanitize_cats':
1229
  wppa_clear_catlist();
1230
+ wppa_schedule_maintenance_proc( 'wppa_remake_index_photos' );
1231
  break;
1232
  case 'wppa_sync_cloud':
1233
  unset( $wppa_session['cloudinary_ids'] );
wppa-setting-see-also.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 8.0.08.005
7
  *
8
  */
9
 
@@ -132,6 +132,7 @@ global $wppa_subtab_names;
132
  'maintenance' => array(
133
  '1' => __('Regular maintenance procedures', 'wp-photo-album-plus'),
134
  '2' => __('Clearing and other irreversable maintenance procedures', 'wp-photo-album-plus'),
 
135
  ),
136
  'exif' => array(
137
  '1' => __('EXIF tags and their labels as found in the uploaded photos', 'wp-photo-album-plus'),
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 8.0.10.004
7
  *
8
  */
9
 
132
  'maintenance' => array(
133
  '1' => __('Regular maintenance procedures', 'wp-photo-album-plus'),
134
  '2' => __('Clearing and other irreversable maintenance procedures', 'wp-photo-album-plus'),
135
+ '3' => __('One time conversions', 'wp-photo-album-plus'),
136
  ),
137
  'exif' => array(
138
  '1' => __('EXIF tags and their labels as found in the uploaded photos', 'wp-photo-album-plus'),
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 8.0.10.001
7
  *
8
  */
9
 
@@ -3010,7 +3010,7 @@ global $wppa_subtab_names;
3010
  $help .= '<br />'.__('Additionally there may be a one pixel outline of a different color.', 'wp-photo-album-plus');
3011
  $help .= '<br />'.__('The number you enter here is exclusive the one pixel outline.', 'wp-photo-album-plus');
3012
  $help .= '<br />'.__('If you leave this entry empty, there will be no outline either.', 'wp-photo-album-plus');
3013
- $help .= '<br />'.wppa_see_also('slide', '1', '35');
3014
  $slug = 'wppa_fullimage_border_width';
3015
  $html = wppa_input($slug, '40px', '', __('pixels', 'wp-photo-album-plus'));
3016
  $clas = '';
@@ -8634,18 +8634,6 @@ global $wppa_subtab_names;
8634
  $html = array($html1, $html2, $html3, $html4);
8635
  wppa_setting_new(false, '11', $name, $desc, $html, $help);
8636
 
8637
- $name = __('All to lower', 'wp-photo-album-plus');
8638
- $desc = __('Convert all file-extensions to lowercase.', 'wp-photo-album-plus');
8639
- $help = __('Affects display files, thumbnail files, and saved extensions in database table. Leaves sourcefiles untouched', 'wp-photo-album-plus');
8640
- $help .= '<br />'.__('If both upper and lowercase files exist, the file with the uppercase extension will be removed.', 'wp-photo-album-plus');
8641
- $slug2 = 'wppa_all_ext_to_lower';
8642
- $html1 = '';
8643
- $html2 = wppa_maintenance_button( $slug2 );
8644
- $html3 = wppa_status_field( $slug2 );
8645
- $html4 = wppa_togo_field( $slug2 );
8646
- $html = array($html1, $html2, $html3, $html4);
8647
- wppa_setting_new(false, '12', $name, $desc, $html, $help);
8648
-
8649
  $name = __('Watermark all', 'wp-photo-album-plus');
8650
  $desc = __('Apply watermark according to current settings to all photos.', 'wp-photo-album-plus');
8651
  $help = __('See Tab Watermark for the current watermark settings', 'wp-photo-album-plus');
@@ -8760,28 +8748,6 @@ global $wppa_subtab_names;
8760
  $html = array($html1, $html2, $html3, $html4);
8761
  wppa_setting_new(false, '21', $name, $desc, $html, $help);
8762
 
8763
- $name = __('Fix tags', 'wp-photo-album-plus');
8764
- $desc = __('Make sure photo tags format is uptodate', 'wp-photo-album-plus');
8765
- $help = __('Fixes tags to be conform current database rules.', 'wp-photo-album-plus');
8766
- $slug2 = 'wppa_sanitize_tags';
8767
- $html1 = '';
8768
- $html2 = wppa_maintenance_button( $slug2 );
8769
- $html3 = wppa_status_field( $slug2 );
8770
- $html4 = wppa_togo_field( $slug2 );
8771
- $html = array($html1, $html2, $html3, $html4);
8772
- wppa_setting_new(false, '22', $name, $desc, $html, $help);
8773
-
8774
- $name = __('Fix cats', 'wp-photo-album-plus');
8775
- $desc = __('Make sure album cats format is uptodate', 'wp-photo-album-plus');
8776
- $help = __('Fixes cats to be conform current database rules.', 'wp-photo-album-plus');
8777
- $slug2 = 'wppa_sanitize_cats';
8778
- $html1 = '';
8779
- $html2 = wppa_maintenance_button( $slug2 );
8780
- $html3 = wppa_status_field( $slug2 );
8781
- $html4 = wppa_togo_field( $slug2 );
8782
- $html = array($html1, $html2, $html3, $html4);
8783
- wppa_setting_new(false, '23', $name, $desc, $html, $help);
8784
-
8785
  $name = __('Set owner to name', 'wp-photo-album-plus');
8786
  $desc = __('If photoname equals user display name, set him owner.', 'wp-photo-album-plus');
8787
  $help = '';
@@ -8967,6 +8933,70 @@ global $wppa_subtab_names;
8967
  $html = array($html1, $html2, $html3, $html4);
8968
  wppa_setting_new(false, '37', $name, $desc, $html, $help);
8969
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8970
  wppa_setting_box_footer_new();
8971
  }
8972
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 8.0.10.004
7
  *
8
  */
9
 
3010
  $help .= '<br />'.__('Additionally there may be a one pixel outline of a different color.', 'wp-photo-album-plus');
3011
  $help .= '<br />'.__('The number you enter here is exclusive the one pixel outline.', 'wp-photo-album-plus');
3012
  $help .= '<br />'.__('If you leave this entry empty, there will be no outline either.', 'wp-photo-album-plus');
3013
+ $help .= '<br />'.wppa_see_also( 'slide', '1', '35' );
3014
  $slug = 'wppa_fullimage_border_width';
3015
  $html = wppa_input($slug, '40px', '', __('pixels', 'wp-photo-album-plus'));
3016
  $clas = '';
8634
  $html = array($html1, $html2, $html3, $html4);
8635
  wppa_setting_new(false, '11', $name, $desc, $html, $help);
8636
 
 
 
 
 
 
 
 
 
 
 
 
 
8637
  $name = __('Watermark all', 'wp-photo-album-plus');
8638
  $desc = __('Apply watermark according to current settings to all photos.', 'wp-photo-album-plus');
8639
  $help = __('See Tab Watermark for the current watermark settings', 'wp-photo-album-plus');
8748
  $html = array($html1, $html2, $html3, $html4);
8749
  wppa_setting_new(false, '21', $name, $desc, $html, $help);
8750
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8751
  $name = __('Set owner to name', 'wp-photo-album-plus');
8752
  $desc = __('If photoname equals user display name, set him owner.', 'wp-photo-album-plus');
8753
  $help = '';
8933
  $html = array($html1, $html2, $html3, $html4);
8934
  wppa_setting_new(false, '37', $name, $desc, $html, $help);
8935
 
8936
+ wppa_setting_box_footer_new();
8937
+ }
8938
+ // One time conversions
8939
+ {
8940
+ $desc = $wppa_subtab_names[$tab]['3'];
8941
+ wppa_setting_tab_description($desc);
8942
+
8943
+ $coldef = array( '#' => '24px;',
8944
+ __('Name', 'wp-photo-album-plus') => 'auto;',
8945
+ __('Description', 'wp-photo-album-plus') => 'auto;',
8946
+ __('Specification', 'wp-photo-album-plus') => 'auto;',
8947
+ __('Do it!', 'wp-photo-album-plus') => 'auto;',
8948
+ __('Status', 'wp-photo-album-plus') => 'auto;',
8949
+ __('To Go', 'wp-photo-album-plus') => 'auto;',
8950
+ __('Help', 'wp-photo-album-plus') => '24px;',
8951
+ );
8952
+
8953
+ wppa_setting_box_header_new($tab, $coldef);
8954
+
8955
+ $name = __('Fix tags', 'wp-photo-album-plus');
8956
+ $desc = __('Make sure photo tags format is uptodate', 'wp-photo-album-plus');
8957
+ $help = __('Fixes tags to be conform current database rules.', 'wp-photo-album-plus');
8958
+ $slug2 = 'wppa_sanitize_tags';
8959
+ $html1 = wppa_cronjob_button( $slug2 );
8960
+ $html2 = wppa_maintenance_button( $slug2 );
8961
+ $html3 = wppa_status_field( $slug2 );
8962
+ $html4 = wppa_togo_field( $slug2 );
8963
+ $html = array($html1, $html2, $html3, $html4);
8964
+ wppa_setting_new(false, '1', $name, $desc, $html, $help);
8965
+
8966
+ $name = __('Fix cats', 'wp-photo-album-plus');
8967
+ $desc = __('Make sure album cats format is uptodate', 'wp-photo-album-plus');
8968
+ $help = __('Fixes cats to be conform current database rules.', 'wp-photo-album-plus');
8969
+ $slug2 = 'wppa_sanitize_cats';
8970
+ $html1 = wppa_cronjob_button( $slug2 );
8971
+ $html2 = wppa_maintenance_button( $slug2 );
8972
+ $html3 = wppa_status_field( $slug2 );
8973
+ $html4 = wppa_togo_field( $slug2 );
8974
+ $html = array($html1, $html2, $html3, $html4);
8975
+ wppa_setting_new(false, '2', $name, $desc, $html, $help);
8976
+
8977
+ $name = htmlspecialchars(__('Convert user-<id> tags', 'wp-photo-album-plus'));
8978
+ $desc = __('Convert old style usertags to new style.', 'wp-photo-album-plus');
8979
+ $help = htmlspecialchars(__('Coverts user-<id> tags - created by the Choice feature - to user displaynames.', 'wp-photo-album-plus'));
8980
+ $slug2 = 'wppa_covert_usertags';
8981
+ $html1 = wppa_cronjob_button( $slug2 );
8982
+ $html2 = wppa_maintenance_button( $slug2 );
8983
+ $html3 = wppa_status_field( $slug2 );
8984
+ $html4 = wppa_togo_field( $slug2 );
8985
+ $html = array($html1, $html2, $html3, $html4);
8986
+ wppa_setting_new(false, '3', $name, $desc, $html, $help);
8987
+
8988
+ $name = __('All to lower', 'wp-photo-album-plus');
8989
+ $desc = __('Convert all file-extensions to lowercase.', 'wp-photo-album-plus');
8990
+ $help = __('Affects display files, thumbnail files, and saved extensions in database table. Leaves sourcefiles untouched', 'wp-photo-album-plus');
8991
+ $help .= '<br />'.__('If both upper and lowercase files exist, the file with the uppercase extension will be removed.', 'wp-photo-album-plus');
8992
+ $slug2 = 'wppa_all_ext_to_lower';
8993
+ $html1 = wppa_cronjob_button( $slug2 );
8994
+ $html2 = wppa_maintenance_button( $slug2 );
8995
+ $html3 = wppa_status_field( $slug2 );
8996
+ $html4 = wppa_togo_field( $slug2 );
8997
+ $html = array($html1, $html2, $html3, $html4);
8998
+ wppa_setting_new(false, '4', $name, $desc, $html, $help);
8999
+
9000
  wppa_setting_box_footer_new();
9001
  }
9002
  }
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.0.10.003
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.0.10.003'; // 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.0.10.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
 
25
  /* WPPA GLOBALS */
26
  global $wppa_api_version;
27
+ $wppa_api_version = '8.0.10.004'; // WPPA software version
28
  global $wppa_revno;
29
  $wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
30