WP Photo Album Plus - Version 6.8.06

Version Description

  • This version addresses various minor bug fixes and improved cache handling.
Download this release

Release Info

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

Code changes from version 6.8.05 to 6.8.06

changelog.txt CHANGED
@@ -1,5 +1,19 @@
1
  WP Photo Album Plus Changelog
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 6.8.05 =
4
 
5
  = Bug Fixes =
1
  WP Photo Album Plus Changelog
2
 
3
+ = 6.8.06 =
4
+
5
+ = Bug Fixes =
6
+
7
+ * Clicking the help button [?] on the settings page now always opens the right helptext.
8
+
9
+ = New Features =
10
+
11
+ = Other Changes =
12
+
13
+ * A photo is now regarded as NOT being modified when the date/time modified is within 2 seconds after the timestamp of creation.
14
+ This is to avoid erroneous 'modified' labels due to photo metatdata updates during the upload/import process.
15
+ * Only cached pages that contain wppa data are cleared by wppa clear cache. Cache clearing is now performed at the background.
16
+
17
  = 6.8.05 =
18
 
19
  = Bug Fixes =
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: 6.8.05
6
- Stable tag: 6.8.04
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
@@ -128,6 +128,10 @@ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documen
128
 
129
  == Upgrade Notice ==
130
 
 
 
 
 
131
  = 6.8.05 =
132
 
133
  * This version addresses various minor bug fixes and feture 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: 6.8.06
6
+ Stable tag: 6.8.05
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
128
 
129
  == Upgrade Notice ==
130
 
131
+ = 6.8.06 =
132
+
133
+ * This version addresses various minor bug fixes and improved cache handling.
134
+
135
  = 6.8.05 =
136
 
137
  * This version addresses various minor bug fixes and feture requests.
wppa-admins-choice-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the admins-choice widget
6
- * Version 6.7.01
7
  *
8
  */
9
 
@@ -49,7 +49,7 @@ class AdminsChoice extends WP_Widget {
49
  }
50
  else {
51
  echo
52
- '<div class="wppa-admins-choice-widget" >' .
53
  wppa_get_admins_choice_html( false ) .
54
  '</div>';
55
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the admins-choice widget
6
+ * Version 6.8.06
7
  *
8
  */
9
 
49
  }
50
  else {
51
  echo
52
+ '<div class="wppa-admins-choice-widget" data-wppa="yes" >' .
53
  wppa_get_admins_choice_html( false ) .
54
  '</div>';
55
  }
wppa-album-navigator-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display album names linking to content
6
- * Version 6.8.04
7
  */
8
 
9
  class AlbumNavigatorWidget extends WP_Widget {
@@ -65,7 +65,7 @@ class AlbumNavigatorWidget extends WP_Widget {
65
  else {
66
  $widget_content .= $this->do_album_navigator( $parent, $page, $skip, '' );
67
  }
68
- $widget_content .= '<div style="clear:both"></div>';
69
  }
70
 
71
  // End widget content
3
  * Package: wp-photo-album-plus
4
  *
5
  * display album names linking to content
6
+ * Version 6.8.06
7
  */
8
 
9
  class AlbumNavigatorWidget extends WP_Widget {
65
  else {
66
  $widget_content .= $this->do_album_navigator( $parent, $page, $skip, '' );
67
  }
68
+ $widget_content .= '<div style="clear:both" data-wppa="yes" ></div>';
69
  }
70
 
71
  // End widget content
wppa-album-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display thumbnail albums
6
- * Version 6.8.04
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -137,8 +137,9 @@ class AlbumWidget extends WP_Widget {
137
  'text-align:center;' .
138
  'float:left;' .
139
  'overflow:hidden;' .
140
- '"
141
- >';
 
142
 
143
  if ( $link ) {
144
  if ( $link['is_url'] ) { // Is a href
3
  * Package: wp-photo-album-plus
4
  *
5
  * display thumbnail albums
6
+ * Version 6.8.06
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
137
  'text-align:center;' .
138
  'float:left;' .
139
  'overflow:hidden;' .
140
+ '"' .
141
+ ' data-wppa="yes"' .
142
+ ' >';
143
 
144
  if ( $link ) {
145
  if ( $link['is_url'] ) { // Is a href
wppa-bestof-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the best rated photos
6
- * Version 6.8.04
7
  *
8
  */
9
 
@@ -70,7 +70,7 @@ class BestOfWidget extends WP_Widget {
70
  'totvalue' => $total,
71
  ) );
72
 
73
- $widget_content .= '<div style="clear:both"></div>';
74
  $widget_content .= "\n".'<!-- WPPA+ BestOf Widget end -->';
75
 
76
  echo "\n" . $before_widget;
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the best rated photos
6
+ * Version 6.8.06
7
  *
8
  */
9
 
70
  'totvalue' => $total,
71
  ) );
72
 
73
+ $widget_content .= '<div style="clear:both" data-wppa="yes" ></div>';
74
  $widget_content .= "\n".'<!-- WPPA+ BestOf Widget end -->';
75
 
76
  echo "\n" . $before_widget;
wppa-comment-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the recent commets on photos
6
- * Version 6.8.04
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -42,7 +42,12 @@ class wppaCommentWidget extends WP_Widget {
42
  if ( $photo_ids ) foreach( $photo_ids as $id ) {
43
 
44
  // Make the HTML for current comment
45
- $widget_content .= "\n".'<div class="wppa-widget" style="width:' . $maxw . 'px; height:' . $maxh . 'px; margin:4px; display:inline; text-align:center; float:left;">';
 
 
 
 
 
46
 
47
  $image = wppa_cache_thumb( $id );
48
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the recent commets on photos
6
+ * Version 6.8.06
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
42
  if ( $photo_ids ) foreach( $photo_ids as $id ) {
43
 
44
  // Make the HTML for current comment
45
+ $widget_content .= '
46
+ <div' .
47
+ ' class="wppa-widget"' .
48
+ ' style="width:' . $maxw . 'px; height:' . $maxh . 'px; margin:4px; display:inline; text-align:center; float:left;"' .
49
+ ' data-wppa="yes"' .
50
+ ' >';
51
 
52
  $image = wppa_cache_thumb( $id );
53
 
wppa-common-functions.php CHANGED
@@ -913,41 +913,53 @@ static $tables;
913
  function wppa_clear_cache( $force = false ) {
914
  global $cache_path;
915
 
 
 
 
 
 
 
 
 
916
  // If wp-super-cache is on board, clear cache
917
  if ( function_exists( 'prune_super_cache' ) ) {
918
  prune_super_cache( $cache_path . 'supercache/', true );
919
  prune_super_cache( $cache_path, true );
 
920
  }
921
 
922
  // W3 Total cache
923
  if ( function_exists( 'w3tc_pgcache_flush' ) ) {
924
  w3tc_pgcache_flush();
 
925
  }
926
 
927
  // SG_CachePress
928
- /*
929
  if ( class_exists( 'SG_CachePress_Supercacher' ) ) {
930
  $c = new SG_CachePress_Supercacher();
931
- @ $c->purge_cache();
 
 
 
932
  }
933
- */
934
 
935
  // Quick cache
936
  if ( isset($GLOBALS['quick_cache']) ) {
937
  $GLOBALS['quick_cache']->clear_cache();
 
938
  }
939
 
940
  // Comet cache
941
  if ( class_exists( 'comet_cache' ) ) {
942
  comet_cache::clear();
943
- wppa_log('dbg', 'comet_cache cleared');
944
  }
945
 
946
- // At a setup or update operation
947
- // Manually remove the content of wp-content/cache/
948
  if ( $force ) {
949
- if ( is_dir( WPPA_CONTENT_PATH.'/cache/' ) ) {
950
- wppa_tree_empty( WPPA_CONTENT_PATH.'/cache' );
 
951
  }
952
  }
953
  }
913
  function wppa_clear_cache( $force = false ) {
914
  global $cache_path;
915
 
916
+ // Schedule a cron job. This is the normal operation
917
+ if ( ! $force ) {
918
+ wppa_schedule_clear_cache();
919
+ return;
920
+ }
921
+
922
+ // At activation, ($force = true) the entire cache must be cleared once.
923
+
924
  // If wp-super-cache is on board, clear cache
925
  if ( function_exists( 'prune_super_cache' ) ) {
926
  prune_super_cache( $cache_path . 'supercache/', true );
927
  prune_super_cache( $cache_path, true );
928
+ wppa_log('obs', 'Super cache cleared');
929
  }
930
 
931
  // W3 Total cache
932
  if ( function_exists( 'w3tc_pgcache_flush' ) ) {
933
  w3tc_pgcache_flush();
934
+ wppa_log('obs', 'w3tc pgcache cleared');
935
  }
936
 
937
  // SG_CachePress
 
938
  if ( class_exists( 'SG_CachePress_Supercacher' ) ) {
939
  $c = new SG_CachePress_Supercacher();
940
+ if ( $c->purge_cache ) {
941
+ $c->purge_cache();
942
+ wppa_log('obs', 'SG CachePress Supercacher cache cleared');
943
+ }
944
  }
 
945
 
946
  // Quick cache
947
  if ( isset($GLOBALS['quick_cache']) ) {
948
  $GLOBALS['quick_cache']->clear_cache();
949
+ wppa_log('obs', 'Quick cache cleared');
950
  }
951
 
952
  // Comet cache
953
  if ( class_exists( 'comet_cache' ) ) {
954
  comet_cache::clear();
955
+ wppa_log('obs', 'Comet cache cleared');
956
  }
957
 
958
+ // Last resort: Manually remove the content of wp-content/cache/
 
959
  if ( $force ) {
960
+ if ( is_dir( WPPA_CONTENT_PATH . '/cache/' ) ) {
961
+ wppa_tree_empty( WPPA_CONTENT_PATH . '/cache' );
962
+ wppa_log('obs', 'Generic cache cleared');
963
  }
964
  }
965
  }
wppa-cron.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all cron functions
6
- * Version 6.8.05
7
  *
8
  *
9
  */
@@ -276,6 +276,79 @@ global $wpdb;
276
  }
277
  }
278
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
  // Activate treecount update proc
280
  add_action( 'wppa_update_treecounts', 'wppa_do_update_treecounts' );
281
 
@@ -288,7 +361,9 @@ function wppa_schedule_treecount_update() {
288
 
289
  // Schedule cron job
290
  if ( ! wp_next_scheduled( 'wppa_update_treecounts' ) ) {
291
- wp_schedule_single_event( time() + 10, 'wppa_update_treecounts' );
 
 
292
  }
293
  }
294
 
@@ -300,7 +375,7 @@ global $wpdb;
300
  return;
301
  }
302
 
303
- ob_start();
304
 
305
  $start = time();
306
 
@@ -317,6 +392,10 @@ global $wpdb;
317
  exit();
318
  }
319
  }
 
 
 
 
320
  }
321
 
322
  function wppa_re_animate_cron() {
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all cron functions
6
+ * Version 6.8.06
7
  *
8
  *
9
  */
276
  }
277
  }
278
 
279
+ // Selectively clear caches
280
+ add_action( 'wppa_clear_cache', 'wppa_do_clear_cache' );
281
+
282
+ function wppa_schedule_clear_cache( $time = 10 ) {
283
+
284
+ // Are we temp disbled?
285
+ if ( wppa_switch( 'maint_ignore_cron' ) ) {
286
+ return;
287
+ }
288
+
289
+ // If a cron job is scheduled in the far future and we need it earlier, cancel the existing
290
+ $next_scheduled = wp_next_scheduled( 'wppa_clear_cache' );
291
+ if ( $time == 10 && is_numeric( $next_scheduled ) && $next_scheduled > ( time() + $time ) ) {
292
+
293
+ wp_unschedule_event( $next_scheduled, 'wppa_clear_cache' );
294
+ $did_unschedule = true;
295
+ }
296
+ else {
297
+ $did_unschedule = false;
298
+ }
299
+
300
+ // Schedule new event
301
+ if ( ! wp_next_scheduled( 'wppa_clear_cache' ) ) {
302
+
303
+ wp_schedule_single_event( time() + $time, 'wppa_clear_cache' );
304
+
305
+ wppa_log( 'Cron', '{b}wppa_clear_cache{/b} ' . ( $did_unschedule ? 're-' : '' ) . 'scheduled for run in ' . $time . ' sec.' );
306
+ }
307
+ }
308
+
309
+ // call the actusl cache deleting proc, and indicate only delete cache files with text 'data-wppa="yes"'
310
+ function wppa_do_clear_cache() {
311
+
312
+ $relroot = trim( wppa_opt( 'cache_root' ), '/' );
313
+ if ( ! $relroot ) {
314
+ $relroot = 'cache';
315
+ }
316
+ $root = WPPA_CONTENT_PATH . '/' . $relroot;
317
+ if ( is_dir( $root ) ) {
318
+
319
+ wppa_log( 'Cron', '{b}wppa_clear_cache{/b} started.' );
320
+ _wppa_do_clear_cache( $root );
321
+ wppa_log( 'Cron', '{b}wppa_clear_cache{/b} completed.' );
322
+ }
323
+ }
324
+ function _wppa_do_clear_cache( $dir ) {
325
+
326
+ $needle = 'data-wppa="yes"';
327
+ $fsos = glob( $dir . '/*' );
328
+ if ( is_array( $fsos ) ) foreach ( $fsos as $fso ) {
329
+ $name = basename( $fso );
330
+ if ( $name == '.' || $name == '..' ) {}
331
+ elseif ( is_dir( $fso ) ) {
332
+ _wppa_do_clear_cache( $fso );
333
+ }
334
+ else {
335
+ $file = fopen( $fso, 'rb' );
336
+ if ( $file ) {
337
+ $size = filesize( $fso );
338
+ $haystack = fread( $file, $size );
339
+ if ( strpos( $haystack, $needle ) !== false ) {
340
+ fclose( $file );
341
+ unlink( $fso );
342
+ wppa_log( 'fso', 'Cron removed cachefile: {b}' . str_replace( WPPA_CONTENT_PATH, '', $fso ) . '{/b}' );
343
+ }
344
+ else {
345
+ fclose( $file );
346
+ }
347
+ }
348
+ }
349
+ }
350
+ }
351
+
352
  // Activate treecount update proc
353
  add_action( 'wppa_update_treecounts', 'wppa_do_update_treecounts' );
354
 
361
 
362
  // Schedule cron job
363
  if ( ! wp_next_scheduled( 'wppa_update_treecounts' ) ) {
364
+ $time = 10;
365
+ wp_schedule_single_event( time() + $time, 'wppa_update_treecounts' );
366
+ wppa_log( 'Cron', '{b}wppa_update_treecounts{/b} scheduled for run in ' . $time . ' sec.' );
367
  }
368
  }
369
 
375
  return;
376
  }
377
 
378
+ wppa_log( 'Cron', '{b}wppa_update_treecounts{/b} started.' );
379
 
380
  $start = time();
381
 
392
  exit();
393
  }
394
  }
395
+
396
+ wppa_log( 'Cron', '{b}wppa_update_treecounts{/b} completed.' );
397
+
398
+ wppa_schedule_clear_cache( 600 );
399
  }
400
 
401
  function wppa_re_animate_cron() {
wppa-featen-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the featured photos
6
- * Version 6.7.01
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -106,6 +106,7 @@ class FeaTenWidget extends WP_Widget {
106
  '<div' .
107
  ' class="wppa-widget"' .
108
  ' style="width:' . $maxw . 'px;height:' . $maxh . 'px;margin:4px;display:inline;text-align:center;float:left;"' .
 
109
  ' >';
110
 
111
  if ( $image ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the featured photos
6
+ * Version 6.8.06
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
106
  '<div' .
107
  ' class="wppa-widget"' .
108
  ' style="width:' . $maxw . 'px;height:' . $maxh . 'px;margin:4px;display:inline;text-align:center;float:left;"' .
109
+ ' data-wppa="yes"' .
110
  ' >';
111
 
112
  if ( $image ) {
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 6.8.04
7
  *
8
  */
9
 
@@ -2657,7 +2657,7 @@ global $wppa_done;
2657
  wppa( 'comment_photo', $id );
2658
  wppa( 'comment_text', $comment );
2659
 
2660
- // Clear ( super )cache
2661
  wppa_clear_cache();
2662
  }
2663
  else {
@@ -3191,6 +3191,7 @@ global $blog_id;
3191
  wppa_out( '<div' .
3192
  ' id="wppa-modal-container-'.wppa( 'mocc' ).'"' .
3193
  ' style="position:relative;z-index:100000;"' .
 
3194
  ' >' .
3195
  '</div>'
3196
  );
@@ -4097,7 +4098,14 @@ function wppa_is_photo_modified( $id ) {
4097
 
4098
  $thumb = wppa_cache_thumb( $id );
4099
 
 
4100
  $modtime = $thumb['modified'];
 
 
 
 
 
 
4101
  $timnow = time();
4102
  $isnew = ( ( $timnow - $modtime ) < wppa_opt( 'max_photo_modtime' ) );
4103
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 6.8.06
7
  *
8
  */
9
 
2657
  wppa( 'comment_photo', $id );
2658
  wppa( 'comment_text', $comment );
2659
 
2660
+ // Clear cache
2661
  wppa_clear_cache();
2662
  }
2663
  else {
3191
  wppa_out( '<div' .
3192
  ' id="wppa-modal-container-'.wppa( 'mocc' ).'"' .
3193
  ' style="position:relative;z-index:100000;"' .
3194
+ ' data-wppa="yes"' .
3195
  ' >' .
3196
  '</div>'
3197
  );
4098
 
4099
  $thumb = wppa_cache_thumb( $id );
4100
 
4101
+ $cretime = $thumb['timestamp'];
4102
  $modtime = $thumb['modified'];
4103
+
4104
+ // A photo is regarded NOT to be modified if the datetime modified is within 2 seconds after creation
4105
+ if ( $modtime <= ( $cretime + 2 ) ) {
4106
+ return false;
4107
+ }
4108
+
4109
  $timnow = time();
4110
  $isnew = ( ( $timnow - $modtime ) < wppa_opt( 'max_photo_modtime' ) );
4111
 
wppa-gp-widget.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * A text widget that interpretes wppa shortcodes
6
  *
7
- * Version 6.8.04
8
  */
9
 
10
  class WppaGpWidget extends WP_Widget {
@@ -46,7 +46,14 @@ class WppaGpWidget extends WP_Widget {
46
  $text = do_shortcode( $text );
47
  $text = apply_filters( 'widget_text', $text ); // If shortcode at wppa filter priority, insert result. See wppa-filter.php
48
 
49
- echo '<div class="wppa-gp-widget" style="margin-top:2px; margin-left:2px;" >' . $text . '</div>';
 
 
 
 
 
 
 
50
  echo '<div style="clear:both"></div>';
51
 
52
  // Close widget
4
  *
5
  * A text widget that interpretes wppa shortcodes
6
  *
7
+ * Version 6.8.06
8
  */
9
 
10
  class WppaGpWidget extends WP_Widget {
46
  $text = do_shortcode( $text );
47
  $text = apply_filters( 'widget_text', $text ); // If shortcode at wppa filter priority, insert result. See wppa-filter.php
48
 
49
+ echo '
50
+ <div' .
51
+ ' class="wppa-gp-widget"' .
52
+ ' style="margin-top:2px; margin-left:2px;"' .
53
+ ' data-wppa="yes"' .
54
+ ' >' .
55
+ $text .
56
+ '</div>';
57
  echo '<div style="clear:both"></div>';
58
 
59
  // Close widget
wppa-lasten-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the last uploaded photos
6
- * Version 6.8.05
7
  */
8
 
9
  class LasTenWidget extends WP_Widget {
@@ -116,7 +116,11 @@ class LasTenWidget extends WP_Widget {
116
 
117
  // Make the HTML for current picture
118
  if ( $display == 'thumbs' ) {
119
- $widget_content .= "\n".'<div class="wppa-widget" style="width:'.$maxw.'px; height:'.$maxh.'px; margin:4px; display:inline; text-align:center; float:left;">';
 
 
 
 
120
  }
121
  else {
122
  $widget_content .= "\n".'<div class="wppa-widget" >';
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the last uploaded photos
6
+ * Version 6.8.06
7
  */
8
 
9
  class LasTenWidget extends WP_Widget {
116
 
117
  // Make the HTML for current picture
118
  if ( $display == 'thumbs' ) {
119
+ $widget_content .= '
120
+ <div class="wppa-widget"' .
121
+ ' style="width:'.$maxw.'px; height:'.$maxh.'px; margin:4px; display:inline; text-align:center; float:left;"' .
122
+ ' data-wppa="yes"' .
123
+ ' >';
124
  }
125
  else {
126
  $widget_content .= "\n".'<div class="wppa-widget" >';
wppa-multitag-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the multitag widget
6
- * Version 6.8.04
7
  *
8
  */
9
 
@@ -44,8 +44,11 @@ class MultitagPhotos extends WP_Widget {
44
 
45
  $tags = is_array( $instance['tags'] ) ? implode( ',', $instance['tags'] ) : '';
46
 
47
- echo '<div class="wppa-multitag-widget" >' . wppa_get_multitag_html( $instance['cols'], $tags ) . '</div>';
48
- echo '<div style="clear:both"></div>';
 
 
 
49
  echo $after_widget;
50
 
51
  wppa( 'in_widget', false );
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the multitag widget
6
+ * Version 6.8.06
7
  *
8
  */
9
 
44
 
45
  $tags = is_array( $instance['tags'] ) ? implode( ',', $instance['tags'] ) : '';
46
 
47
+ echo '
48
+ <div class="wppa-multitag-widget" data-wppa="yes" >' .
49
+ wppa_get_multitag_html( $instance['cols'], $tags ) .
50
+ '</div>';
51
+ echo '<div style="clear:both" ></div>';
52
  echo $after_widget;
53
 
54
  wppa( 'in_widget', false );
wppa-non-admin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
- * Version 6.8.05
7
  *
8
  */
9
 
@@ -87,7 +87,7 @@ global $wpdb;
87
  }
88
  else {
89
  $imgurl = '';
90
- echo '<!-- WPPA+ No Photo id -->';
91
  }
92
 
93
  if ( $id ) {
@@ -207,6 +207,55 @@ echo '
207
  }
208
  }
209
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
  // Facebook Admin and App
211
  if ( ( wppa_switch( 'share_on' ) || wppa_switch( 'share_on_widget' ) ) &&
212
  ( wppa_switch( 'facebook_comments' ) || wppa_switch( 'facebook_like' ) || wppa_switch( 'share_facebook' ) ) ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
+ * Version 6.8.06
7
  *
8
  */
9
 
87
  }
88
  else {
89
  $imgurl = '';
90
+ // echo '<!-- WPPA+ No Photo id -->';
91
  }
92
 
93
  if ( $id ) {
207
  }
208
  }
209
 
210
+ // No photo id and no album known yet. Also: not all featured.
211
+ // Examine the page (if any) on an album id in the shortcode
212
+ elseif ( wppa_switch( 'og_tags_on' ) ) {
213
+ $page = get_the_ID();
214
+ if ( $page ) {
215
+ $page_content = $wpdb->get_var( "SELECT `post_content` FROM `" . $wpdb->prefix . 'posts' . "` WHERE `ID` = " . $page );
216
+ if ( strpos( $page_content, '[wppa' ) !== false ) {
217
+ $a_pos = strpos( $page_content, 'album="' );
218
+ $album = substr( $page_content, $a_pos + 7, 20 );
219
+ $album = substr( $album, 0, strpos( $album, '"' ) );
220
+ if ( is_numeric( $album ) ) {
221
+
222
+ $title = wppa_get_album_name( $album );
223
+ $desc = strip_tags( wppa_get_album_desc( $album ) );
224
+ $url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
225
+ $url = wppa_convert_to_pretty( $url, false, true );
226
+ $site = get_bloginfo('name');
227
+ $id = wppa_get_coverphoto_id( $album );
228
+ $mime = wppa_get_mime_type( $id );
229
+
230
+ echo '
231
+ <!-- WPPA+ meta tags -->
232
+ <meta name="title" content="' . $title . '" />
233
+ <meta name="description" content="' . $desc . '" />
234
+ <!-- WPPA+ Og Share data -->
235
+ <meta property="og:site_name" content="' . esc_attr( sanitize_text_field( $site ) ) . '" />
236
+ <meta property="og:type" content="article" />
237
+ <meta property="og:url" content="' . $url . '" />
238
+ <meta property="og:title" content="' . esc_attr( sanitize_text_field( $title ) ) . '" />';
239
+ if ( $desc ) {
240
+ echo '
241
+ <meta property="og:description" content="' . esc_attr( sanitize_text_field( $desc ) ) . '" />';
242
+ }
243
+ if ( $id ) {
244
+ echo '
245
+ <meta property="og:image" content="' . wppa_get_photo_url( $id ) . '" />
246
+ <meta property="og:image:type" content="' . $mime . '" />
247
+ <meta property="og:image:width" content="' . wppa_get_photox( $id ) . '" />
248
+ <meta property="og:image:height" content="' . wppa_get_photoy( $id ) . '" />';
249
+ }
250
+ echo '
251
+ <!-- WPPA+ End Og Share data -->
252
+ ';
253
+
254
+ }
255
+ }
256
+ }
257
+ }
258
+
259
  // Facebook Admin and App
260
  if ( ( wppa_switch( 'share_on' ) || wppa_switch( 'share_on_widget' ) ) &&
261
  ( wppa_switch( 'facebook_comments' ) || wppa_switch( 'facebook_like' ) || wppa_switch( 'share_facebook' ) ) ) {
wppa-photo-files.php CHANGED
@@ -447,7 +447,7 @@ function wppa_create_thumbnail( $id, $use_source = true ) {
447
  $src_asp = $src_size_h / $src_size_w;
448
 
449
  // Required aspect
450
- if ( $type == 'none' ) {
451
  $dst_asp = $src_asp;
452
  }
453
  else {
447
  $src_asp = $src_size_h / $src_size_w;
448
 
449
  // Required aspect
450
+ if ( $type == 'none' || ! $asp_attr[0] || ! $asp_attr[1] ) {
451
  $dst_asp = $src_asp;
452
  }
453
  else {
wppa-potd-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the widget
6
- * Version 6.8.04
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -44,7 +44,12 @@ class PhotoOfTheDay extends WP_Widget {
44
  }
45
  else $align = '';
46
 
47
- $widget_content .= "\n".'<div class="wppa-widget-photo" style="' . $align . ' padding-top:2px;position:relative;" >';
 
 
 
 
 
48
 
49
  if ( $image ) {
50
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the widget
6
+ * Version 6.8.06
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
44
  }
45
  else $align = '';
46
 
47
+ $widget_content .= '
48
+ <div' .
49
+ ' class="wppa-widget-photo"' .
50
+ ' style="' . $align . ' padding-top:2px;position:relative;"' .
51
+ ' data-wppa="yes"' .
52
+ ' >';
53
 
54
  if ( $image ) {
55
 
wppa-qr-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display qr code
6
- * Version 6.8.04
7
  */
8
 
9
 
@@ -37,7 +37,7 @@ class wppaQRWidget extends WP_Widget {
37
 
38
  // Make the html
39
  $widget_content =
40
- '<div style="text-align:center;" >' .
41
  '<img id="wppa-qr-img" src="' . $qrsrc . '" title="' . esc_attr( $_SERVER['SCRIPT_URI'] ) . '" alt="' . __('QR code', 'wp-photo-album-plus') . '" />' .
42
  '</div>' .
43
  '<div style="clear:both" ></div>';
3
  * Package: wp-photo-album-plus
4
  *
5
  * display qr code
6
+ * Version 6.8.06
7
  */
8
 
9
 
37
 
38
  // Make the html
39
  $widget_content =
40
+ '<div style="text-align:center;" data-wppa="yes" >' .
41
  '<img id="wppa-qr-img" src="' . $qrsrc . '" title="' . esc_attr( $_SERVER['SCRIPT_URI'] ) . '" alt="' . __('QR code', 'wp-photo-album-plus') . '" />' .
42
  '</div>' .
43
  '<div style="clear:both" ></div>';
wppa-search-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the search widget
6
- * Version 6.8.05
7
  *
8
  */
9
 
@@ -49,6 +49,7 @@ class SearchPhotos extends WP_Widget {
49
  echo $before_title . $widget_title . $after_title;
50
  }
51
 
 
52
  echo wppa_get_search_html( $instance['label'],
53
  wppa_checked( $instance['sub'] ),
54
  wppa_checked( $instance['root'] ),
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the search widget
6
+ * Version 6.8.06
7
  *
8
  */
9
 
49
  echo $before_title . $widget_title . $after_title;
50
  }
51
 
52
+ echo '<span data-wppa="yes" ></span>';
53
  echo wppa_get_search_html( $instance['label'],
54
  wppa_checked( $instance['sub'] ),
55
  wppa_checked( $instance['root'] ),
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 6.8.05
7
  *
8
  */
9
 
@@ -322,6 +322,10 @@ global $wppa_supported_camara_brands;
322
  wppa_error_message(__('There is a serious misconfiguration in your servers PHP config. Function wppa_imagecreatefromjpeg() does not exist. You will encounter problems when uploading photos and not be able to generate thumbnail images. Ask your hosting provider to add GD support with a minimal version 1.8.', 'wp-photo-album-plus'));
323
  }
324
 
 
 
 
 
325
  // Check for pending actions
326
  // if ( wppa_switch( 'indexed_search' ) ) {
327
  // if ( get_option( 'wppa_remake_index_albums_status' ) && get_option( 'wppa_remake_index_albums_user', wppa_get_user() ) == wppa_get_user() ) wppa_warning_message( __( 'Rebuilding the Album index needs completion. See Table VIII' , 'wp-photo-album-plus') );
@@ -8248,6 +8252,15 @@ global $wppa_supported_camara_brands;
8248
  $tags = 'system';
8249
  wppa_setting($slug, '9.4', $name, $desc, $html, $help, $clas, $tags);
8250
 
 
 
 
 
 
 
 
 
 
8251
  $name = __('Retry failed mails', 'wp-photo-album-plus');
8252
  $desc = __('Select number of retries for failed mails', 'wp-photo-album-plus');
8253
  $help = esc_js(__('Retries occur at the background every hour', 'wp-photo-album-plus'));
@@ -8276,6 +8289,14 @@ global $wppa_supported_camara_brands;
8276
  $tags = 'system';
8277
  wppa_setting($slug, '12', $name, $desc, $html, $help, $clas, $tags);
8278
 
 
 
 
 
 
 
 
 
8279
  }
8280
  wppa_setting_subheader( 'B', '1', __( 'WPPA+ Admin related miscellaneous settings' , 'wp-photo-album-plus') );
8281
  {
@@ -10727,7 +10748,7 @@ global $no_default;
10727
  global $wppa_opt;
10728
  global $wppa_totcols;
10729
 
10730
- $num = str_replace( array( ',', '.'), '', $xnum );
10731
 
10732
  if ( is_array($slug) ) $slugs = $slug;
10733
  else {
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 6.8.06
7
  *
8
  */
9
 
322
  wppa_error_message(__('There is a serious misconfiguration in your servers PHP config. Function wppa_imagecreatefromjpeg() does not exist. You will encounter problems when uploading photos and not be able to generate thumbnail images. Ask your hosting provider to add GD support with a minimal version 1.8.', 'wp-photo-album-plus'));
323
  }
324
 
325
+ if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON == true ) {
326
+ wppa_error_message(__("Please remove 'define( 'DISABLE_WP_CRON', true );' from wp-config.php", 'wp-photo-album-plus' ) );
327
+ }
328
+
329
  // Check for pending actions
330
  // if ( wppa_switch( 'indexed_search' ) ) {
331
  // if ( get_option( 'wppa_remake_index_albums_status' ) && get_option( 'wppa_remake_index_albums_user', wppa_get_user() ) == wppa_get_user() ) wppa_warning_message( __( 'Rebuilding the Album index needs completion. See Table VIII' , 'wp-photo-album-plus') );
8252
  $tags = 'system';
8253
  wppa_setting($slug, '9.4', $name, $desc, $html, $help, $clas, $tags);
8254
 
8255
+ $name = __('Log Debug messages', 'wp-photo-album-plus');
8256
+ $desc = __('Keep track of debug messages.', 'wp-photo-album-plus');
8257
+ $help = '';
8258
+ $slug = 'wppa_log_debug';
8259
+ $html = wppa_checkbox($slug);
8260
+ $clas = '';
8261
+ $tags = 'system';
8262
+ wppa_setting($slug, '9.5', $name, $desc, $html, $help, $clas, $tags);
8263
+
8264
  $name = __('Retry failed mails', 'wp-photo-album-plus');
8265
  $desc = __('Select number of retries for failed mails', 'wp-photo-album-plus');
8266
  $help = esc_js(__('Retries occur at the background every hour', 'wp-photo-album-plus'));
8289
  $tags = 'system';
8290
  wppa_setting($slug, '12', $name, $desc, $html, $help, $clas, $tags);
8291
 
8292
+ $name = __('Cache root', 'wp-photo-album-plus');
8293
+ $desc = __('The root folder of your caching plugin', 'wp-photo-album-plus') . ': <span style="float:right;" >' . WPPA_CONTENT_PATH . '/</span>';
8294
+ $help = __('If you have a caching plugin, make sure this setting points to the root folder where the cache files are stored', 'wp-photo-album-plus');
8295
+ $slug = 'wppa_cache_root';
8296
+ $html = wppa_input($slug, '300px');
8297
+ $clas = '';
8298
+ $tags = 'system';
8299
+ wppa_setting($slug, '13', $name, $desc, $html, $help, $clas, $tags);
8300
  }
8301
  wppa_setting_subheader( 'B', '1', __( 'WPPA+ Admin related miscellaneous settings' , 'wp-photo-album-plus') );
8302
  {
10748
  global $wppa_opt;
10749
  global $wppa_totcols;
10750
 
10751
+ $num = str_replace( array( ',', '.'), '_', $xnum );
10752
 
10753
  if ( is_array($slug) ) $slugs = $slug;
10754
  else {
wppa-setup.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
- * Version 6.8.05
7
  *
8
  */
9
 
@@ -1631,11 +1631,13 @@ Hide Camera info
1631
  'wppa_log_ajax' => 'no', // A9.2
1632
  'wppa_log_comments' => 'no', // A9.3
1633
  'wppa_log_fso' => 'no', // A9.4
 
1634
  'wppa_moderate_bulk' => 'no', // B20
1635
  'wppa_retry_mails' => '0', // A10
1636
  'wppa_minimum_tags' => '', // A11
1637
 
1638
  'wppa_login_url' => site_url( 'wp-login.php', 'login' ), // A
 
1639
 
1640
 
1641
  // IX D New
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 6.8.06
7
  *
8
  */
9
 
1631
  'wppa_log_ajax' => 'no', // A9.2
1632
  'wppa_log_comments' => 'no', // A9.3
1633
  'wppa_log_fso' => 'no', // A9.4
1634
+ 'wppa_log_debug' => 'no', // A9.5
1635
  'wppa_moderate_bulk' => 'no', // B20
1636
  'wppa_retry_mails' => '0', // A10
1637
  'wppa_minimum_tags' => '', // A11
1638
 
1639
  'wppa_login_url' => site_url( 'wp-login.php', 'login' ), // A
1640
+ 'wppa_cache_root' => 'cache',
1641
 
1642
 
1643
  // IX D New
wppa-slideshow-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display a slideshow in the sidebar
6
- * Version 6.7.09
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -17,7 +17,7 @@ class SlideshowWidget extends WP_Widget {
17
  function __construct() {
18
  $widget_ops = array( 'classname' => 'slideshow_widget', 'description' => __( 'Display a slideshow', 'wp-photo-album-plus' ) );
19
  parent::__construct( 'slideshow_widget', __( 'WPPA+ Sidebar Slideshow', 'wp-photo-album-plus' ), $widget_ops);
20
-
21
  // Fix non constant defaults
22
  $this -> defaults['title'] = __( 'Sidebar Slideshow', 'wp-photo-album-plus' );
23
  $this -> defaults['width'] = get_option( 'wppa_widget_width' );
@@ -118,7 +118,9 @@ class SlideshowWidget extends WP_Widget {
118
 
119
  // Open the slideshow container
120
  echo
121
- '<div style="padding-top:2px; padding-bottom:4px;" >';
 
 
122
 
123
  // The very slideshow
124
  echo wppa_albums( $album, 'slideonly', $instance['width'], 'center' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * display a slideshow in the sidebar
6
+ * Version 6.8.06
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
17
  function __construct() {
18
  $widget_ops = array( 'classname' => 'slideshow_widget', 'description' => __( 'Display a slideshow', 'wp-photo-album-plus' ) );
19
  parent::__construct( 'slideshow_widget', __( 'WPPA+ Sidebar Slideshow', 'wp-photo-album-plus' ), $widget_ops);
20
+
21
  // Fix non constant defaults
22
  $this -> defaults['title'] = __( 'Sidebar Slideshow', 'wp-photo-album-plus' );
23
  $this -> defaults['width'] = get_option( 'wppa_widget_width' );
118
 
119
  // Open the slideshow container
120
  echo
121
+ '<div' .
122
+ ' style="padding-top:2px; padding-bottom:4px;" ' .
123
+ ' data-wppa="yes" >';
124
 
125
  // The very slideshow
126
  echo wppa_albums( $album, 'slideonly', $instance['width'], 'center' );
wppa-statistics.php CHANGED
@@ -257,7 +257,7 @@ global $wppa_session;
257
  $count++;
258
 
259
  $wpdb->query("UPDATE `".$table."` SET `views` = ".$count." WHERE `id` = ".$id);
260
- wppa_dbg_msg('Bumped viewcount for '.$type.' '.$id.' to '.$count, 'red');
261
 
262
  // If 'wppa_owner_to_name'
263
  if ( $type == 'photo' ) {
@@ -270,8 +270,6 @@ global $wppa_session;
270
  wppa_mark_treecounts( $alb );
271
  }
272
  }
273
-
274
- // wppa_save_session();
275
  }
276
 
277
  function wppa_get_upldr_cache() {
257
  $count++;
258
 
259
  $wpdb->query("UPDATE `".$table."` SET `views` = ".$count." WHERE `id` = ".$id);
260
+ wppa_log( 'dbg', 'Bumped viewcount for '.$type.' '.$id.' to '.$count );
261
 
262
  // If 'wppa_owner_to_name'
263
  if ( $type == 'photo' ) {
270
  wppa_mark_treecounts( $alb );
271
  }
272
  }
 
 
273
  }
274
 
275
  function wppa_get_upldr_cache() {
wppa-stereo-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the top rated photos
6
- * Version 6.8.04
7
  */
8
 
9
  class wppaStereoWidget extends WP_Widget {
@@ -34,7 +34,7 @@ class wppaStereoWidget extends WP_Widget {
34
 
35
  $widget_content .= wppa_get_stereo_html();
36
 
37
- $widget_content .= '<div style="clear:both"></div>';
38
  $widget_content .= "\n".'<!-- WPPA+ stereo Widget end -->';
39
 
40
  echo "\n" . $before_widget;
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the top rated photos
6
+ * Version 6.8.06
7
  */
8
 
9
  class wppaStereoWidget extends WP_Widget {
34
 
35
  $widget_content .= wppa_get_stereo_html();
36
 
37
+ $widget_content .= '<div style="clear:both;" data-wppa="yes" ></div>';
38
  $widget_content .= "\n".'<!-- WPPA+ stereo Widget end -->';
39
 
40
  echo "\n" . $before_widget;
wppa-super-view-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * ask the album / display you want
6
- * Version 6.8.04
7
  */
8
 
9
 
@@ -36,7 +36,7 @@ class WppaSuperView extends WP_Widget {
36
  wppa( 'in_widget', 'superview' );
37
  wppa_bump_mocc();
38
 
39
- $widget_content = wppa_get_superview_html( $album_root, $sort );
40
 
41
  wppa( 'in_widget', false );
42
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * ask the album / display you want
6
+ * Version 6.8.06
7
  */
8
 
9
 
36
  wppa( 'in_widget', 'superview' );
37
  wppa_bump_mocc();
38
 
39
+ $widget_content = '<span data-wppa="yes" ></span>' . wppa_get_superview_html( $album_root, $sort );
40
 
41
  wppa( 'in_widget', false );
42
 
wppa-tagcloud-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the tagcloud widget
6
- * Version 6.8.04
7
  *
8
  */
9
 
@@ -36,7 +36,13 @@ class TagcloudPhotos extends WP_Widget {
36
 
37
  if ( !empty( $widget_title ) ) { echo $before_title . $widget_title . $after_title; }
38
 
39
- echo '<div class="wppa-tagcloud-widget" >'.wppa_get_tagcloud_html(implode(',', $instance['tags']), wppa_opt( 'tagcloud_min'), wppa_opt( 'tagcloud_max') ).'</div>';
 
 
 
 
 
 
40
 
41
  echo '<div style="clear:both"></div>';
42
  echo $after_widget;
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the tagcloud widget
6
+ * Version 6.8.06
7
  *
8
  */
9
 
36
 
37
  if ( !empty( $widget_title ) ) { echo $before_title . $widget_title . $after_title; }
38
 
39
+ echo '
40
+ <div' .
41
+ ' class="wppa-tagcloud-widget"' .
42
+ ' data-wppa="yes"' .
43
+ ' >' .
44
+ wppa_get_tagcloud_html( implode( ',', $instance['tags'] ), wppa_opt( 'tagcloud_min' ), wppa_opt( 'tagcloud_max' ) ) .
45
+ '</div>';
46
 
47
  echo '<div style="clear:both"></div>';
48
  echo $after_widget;
wppa-thumbnail-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display thumbnail photos
6
- * Version 6.8.04
7
  */
8
 
9
  class ThumbnailWidget extends WP_Widget {
@@ -37,7 +37,6 @@ class ThumbnailWidget extends WP_Widget {
37
  'limit' => wppa_opt( 'thumbnail_widget_count' )
38
  ) );
39
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
40
- // $widget_title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
41
 
42
  $widget_link = $instance['link'];
43
  $page = in_array( wppa_opt( 'thumbnail_widget_linktype' ), wppa( 'links_no_page' ) ) ? '' : wppa_get_the_landing_page('thumbnail_widget_linkpage', __('Thumbnail photos', 'wp-photo-album-plus'));
@@ -84,10 +83,19 @@ class ThumbnailWidget extends WP_Widget {
84
 
85
  // Make the HTML for current picture
86
  if ( $display == 'thumbs' ) {
87
- $widget_content .= "\n".'<div class="wppa-widget" style="width:'.$maxw.'px; height:'.$maxh.'px; margin:4px; display:inline; text-align:center; float:left;">';
 
 
 
 
 
88
  }
89
  else {
90
- $widget_content .= "\n".'<div class="wppa-widget" >';
 
 
 
 
91
  }
92
  if ($image) {
93
  $link = wppa_get_imglnk_a('tnwidget', $image['id']);
3
  * Package: wp-photo-album-plus
4
  *
5
  * display thumbnail photos
6
+ * Version 6.8.06
7
  */
8
 
9
  class ThumbnailWidget extends WP_Widget {
37
  'limit' => wppa_opt( 'thumbnail_widget_count' )
38
  ) );
39
  $widget_title = apply_filters( 'widget_title', $instance['title'] );
 
40
 
41
  $widget_link = $instance['link'];
42
  $page = in_array( wppa_opt( 'thumbnail_widget_linktype' ), wppa( 'links_no_page' ) ) ? '' : wppa_get_the_landing_page('thumbnail_widget_linkpage', __('Thumbnail photos', 'wp-photo-album-plus'));
83
 
84
  // Make the HTML for current picture
85
  if ( $display == 'thumbs' ) {
86
+ $widget_content .= '
87
+ <div' .
88
+ ' class="wppa-widget"' .
89
+ ' style="width:'.$maxw.'px; height:'.$maxh.'px; margin:4px; display:inline; text-align:center; float:left;"' .
90
+ ' data-wppa="yes"' .
91
+ ' >';
92
  }
93
  else {
94
+ $widget_content .= '
95
+ <div' .
96
+ ' class="wppa-widget"' .
97
+ ' data-wppa="yes"' .
98
+ ' >';
99
  }
100
  if ($image) {
101
  $link = wppa_get_imglnk_a('tnwidget', $image['id']);
wppa-tinymce-shortcodes.php CHANGED
@@ -3,7 +3,7 @@
3
  * Pachkage: wp-photo-album-plus
4
  *
5
  *
6
- * Version 6.8.00
7
  *
8
  */
9
 
@@ -114,7 +114,7 @@ global $wpdb;
114
  $admins = array();
115
 
116
  if ( wppa_user_is( 'administrator' ) ) {
117
- $users = get_users( array( 'role' => 'administrator' ) );
118
  }
119
 
120
  // Make the html
@@ -232,7 +232,7 @@ global $wpdb;
232
  '<td>'.
233
  '<select id="wppagallery-admins" name="admins" style="color:#070;" multiple="multiple" onchange="wppaGalleryEvaluate()">'.
234
  '<option value="" selected="selected" style="color:#070;" >-- '.__('All', 'wp-photo-album-plus').' --</option>';
235
- foreach( $users as $user ) {
236
  $result .=
237
  '<option value="'.$user->data->user_login.'" class="wppagallery-admin" style="color:#070;" >'.$user->data->user_login.'</option>';
238
  }
3
  * Pachkage: wp-photo-album-plus
4
  *
5
  *
6
+ * Version 6.8.06
7
  *
8
  */
9
 
114
  $admins = array();
115
 
116
  if ( wppa_user_is( 'administrator' ) ) {
117
+ $admins = get_users( array( 'role' => 'administrator' ) );
118
  }
119
 
120
  // Make the html
232
  '<td>'.
233
  '<select id="wppagallery-admins" name="admins" style="color:#070;" multiple="multiple" onchange="wppaGalleryEvaluate()">'.
234
  '<option value="" selected="selected" style="color:#070;" >-- '.__('All', 'wp-photo-album-plus').' --</option>';
235
+ foreach( $admins as $user ) {
236
  $result .=
237
  '<option value="'.$user->data->user_login.'" class="wppagallery-admin" style="color:#070;" >'.$user->data->user_login.'</option>';
238
  }
wppa-topten-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the top rated photos
6
- * Version 6.8.04
7
  */
8
 
9
  class TopTenWidget extends WP_Widget {
@@ -151,10 +151,26 @@ class TopTenWidget extends WP_Widget {
151
  $thumb = $image;
152
  // Make the HTML for current picture
153
  if ( $display == 'thumbs' ) {
154
- $widget_content .= "\n".'<div class="wppa-widget" style="width:'.$maxw.'px; height:'.$maxh.'px; margin:4px; display:inline; text-align:center; float:left;">';
 
 
 
 
 
 
 
 
 
 
 
 
155
  }
156
  else {
157
- $widget_content .= "\n".'<div class="wppa-widget" >';
 
 
 
 
158
  }
159
  if ( $image ) {
160
  $no_album = !$album;
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the top rated photos
6
+ * Version 6.8.06
7
  */
8
 
9
  class TopTenWidget extends WP_Widget {
151
  $thumb = $image;
152
  // Make the HTML for current picture
153
  if ( $display == 'thumbs' ) {
154
+ $widget_content .= '
155
+ <div' .
156
+ ' class="wppa-widget"' .
157
+ ' style="' .
158
+ 'width:' . $maxw . 'px;' .
159
+ 'height:' . $maxh . 'px;' .
160
+ 'margin:4px;' .
161
+ 'display:inline;' .
162
+ 'text-align:center;' .
163
+ 'float:left;' .
164
+ '"' .
165
+ ' data-wppa="yes"' .
166
+ ' >';
167
  }
168
  else {
169
+ $widget_content .= '
170
+ <div' .
171
+ ' class="wppa-widget"' .
172
+ ' data-wppa="yes"' .
173
+ ' >';
174
  }
175
  if ( $image ) {
176
  $no_album = !$album;
wppa-upldr-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display a list of users linking to their photos
6
- * Version 6.8.04
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -119,7 +119,7 @@ class UpldrWidget extends WP_Widget {
119
 
120
  // Create widget content
121
  $widget_content = "\n".'<!-- WPPA+ Upldr Widget start -->';
122
- $widget_content .= '<div class="wppa-upldr" >';
123
  if ( $showownercount ) {
124
  $widget_content .= sprintf( _n( 'Number of contributors: %d', 'Number of contributors: %d', $total_ownercount, 'wp-photo-album-plus' ), $total_ownercount ) . '<br />';
125
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * display a list of users linking to their photos
6
+ * Version 6.8.06
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
119
 
120
  // Create widget content
121
  $widget_content = "\n".'<!-- WPPA+ Upldr Widget start -->';
122
+ $widget_content .= '<div class="wppa-upldr" data-wppa="yes" >';
123
  if ( $showownercount ) {
124
  $widget_content .= sprintf( _n( 'Number of contributors: %d', 'Number of contributors: %d', $total_ownercount, 'wp-photo-album-plus' ), $total_ownercount ) . '<br />';
125
  }
wppa-upload-widget.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * A wppa widget to upload photos
6
  *
7
- * Version 6.8.04
8
  */
9
 
10
  class WppaUploadWidget extends WP_Widget {
@@ -57,6 +57,7 @@ class WppaUploadWidget extends WP_Widget {
57
  ' id="wppa-container-' . $mocc . '"' .
58
  ' class="wppa-upload-widget"' .
59
  ' style="margin-top:2px;margin-left:2px;"' .
 
60
  ' >' .
61
  $js .
62
  $create .
4
  *
5
  * A wppa widget to upload photos
6
  *
7
+ * Version 6.8.06
8
  */
9
 
10
  class WppaUploadWidget extends WP_Widget {
57
  ' id="wppa-container-' . $mocc . '"' .
58
  ' class="wppa-upload-widget"' .
59
  ' style="margin-top:2px;margin-left:2px;"' .
60
+ ' data-wppa="yes"' .
61
  ' >' .
62
  $js .
63
  $create .
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
- * Version 6.8.02
7
  *
8
  */
9
 
@@ -1638,20 +1638,23 @@ global $wppa_log_file;
1638
  case 'c':
1639
  switch ( $u ) {
1640
  case 'r':
1641
- $type = '{span style="color:blue;" }Cron{/span}';
1642
  if ( ! wppa_switch( 'log_cron' ) ) {
1643
  return;
1644
  }
 
1645
  break;
1646
  case 'o':
1647
- $type = '{span style="color:cyan;" }Com{/span}';
1648
  if ( ! wppa_switch( 'log_comments' ) ) {
1649
  return;
1650
  }
 
1651
  break;
1652
  }
1653
  break;
1654
  case 'd':
 
 
 
1655
  $type = '{span style="color:gray;" }Dbg{/span}';
1656
  break;
1657
  case 'e':
@@ -1660,10 +1663,10 @@ global $wppa_log_file;
1660
  case 'f':
1661
  switch ( $u ) {
1662
  case 's':
1663
- $type = '{span style="color:blue;" }Fso{/span}';
1664
  if ( ! wppa_switch( 'log_fso' ) ) {
1665
  return;
1666
  }
 
1667
  break;
1668
  case 'i':
1669
  $type = 'Fix';
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 6.8.06
7
  *
8
  */
9
 
1638
  case 'c':
1639
  switch ( $u ) {
1640
  case 'r':
 
1641
  if ( ! wppa_switch( 'log_cron' ) ) {
1642
  return;
1643
  }
1644
+ $type = '{span style="color:blue;" }Cron{/span}';
1645
  break;
1646
  case 'o':
 
1647
  if ( ! wppa_switch( 'log_comments' ) ) {
1648
  return;
1649
  }
1650
+ $type = '{span style="color:cyan;" }Com{/span}';
1651
  break;
1652
  }
1653
  break;
1654
  case 'd':
1655
+ if ( ! wppa_switch( 'log_debug' ) ) {
1656
+ return;
1657
+ }
1658
  $type = '{span style="color:gray;" }Dbg{/span}';
1659
  break;
1660
  case 'e':
1663
  case 'f':
1664
  switch ( $u ) {
1665
  case 's':
 
1666
  if ( ! wppa_switch( 'log_fso' ) ) {
1667
  return;
1668
  }
1669
+ $type = '{span style="color:blue;" }Fso{/span}';
1670
  break;
1671
  case 'i':
1672
  $type = 'Fix';
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: 6.8.05
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 $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
  global $wppa_revno; $wppa_revno = '6805'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '6-8-05-004'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );
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: 6.8.06.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/
23
 
24
  /* WPPA GLOBALS */
25
  global $wppa_revno; $wppa_revno = '6805'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '6-8-06-008'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );