WP Photo Album Plus - Version 8.1.00.007

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

Code changes from version 8.1.00.006 to 8.1.00.007

js/wppa-gutenberg-wppa.js CHANGED
@@ -1,7 +1,7 @@
1
  /* wppa-gutenberg-wppa.js
2
  * Pachkage: wp-photo-album-plus
3
  *
4
- * Version 8.1.00.006
5
  */
6
 
7
  // Global vars
@@ -382,10 +382,10 @@ function wppaGutenbergGalleryEvaluate() {
382
  if ( ! wppaIsEmpty( album ) ) {
383
  jQuery('#wppagallery-album-virt').css('color', '#070');
384
  switch ( album ) {
385
- case '#topten':
386
- case '#lasten':
387
- case '#featen':
388
- case '#comten':
389
  jQuery('#wppagallery-album-realopt-tr').show();
390
 
391
  // We use parent here for optional album(s), because album is already used for virtual album type
@@ -404,7 +404,7 @@ function wppaGutenbergGalleryEvaluate() {
404
  jQuery('#wppagallery-photo-count-tr').show();
405
  count = jQuery('#wppagallery-photo-count').val();
406
  break;
407
- case '#tags':
408
  jQuery('#wppagallery-phototags-tr').show();
409
  jQuery('#wppagallery-tags-cats-tr').show();
410
  andor = jQuery('[name=andor]:checked').val();
@@ -426,13 +426,13 @@ function wppaGutenbergGalleryEvaluate() {
426
  }
427
  tags = wppaArrayToEnum( tagarr, sep );
428
  break;
429
- case '#last':
430
  jQuery('#wppagallery-album-parent-tr').show();
431
  parent = jQuery('#wppagallery-album-parent-parent').val();
432
  jQuery('#wppagallery-album-count-tr').show();
433
  count = jQuery('#wppagallery-album-count').val();
434
  break;
435
- case '#cat':
436
  jQuery('#wppagallery-albumcat-tr').show();
437
  jQuery('#wppagallery-tags-cats-tr').show();
438
  andor = jQuery('[name=andor]:checked').val();
@@ -454,8 +454,8 @@ function wppaGutenbergGalleryEvaluate() {
454
  }
455
  cats = wppaArrayToEnum( catarr, sep );
456
  break;
457
- case '#owner':
458
- case '#upldr':
459
  jQuery('#wppagallery-owner-tr').show();
460
  needOwner = true;
461
  owner = jQuery('#wppagallery-owner').val();
@@ -466,20 +466,20 @@ function wppaGutenbergGalleryEvaluate() {
466
  parent = parent.toString().replace( 'zero', '0' );
467
  }
468
  break;
469
- case '#all':
470
  break;
471
  default:
472
  if ( album != null ) {
473
  alert( wppaUIERR + ': ' + album );
474
  }
475
  }
476
- if ( ( album != '#cat' || cats != '' ) &&
477
- ( album != '#owner' || owner != '' ) &&
478
- ( album != '#upldr' || owner != '' ) &&
479
- ( album != '#topten' || parent != '' ) &&
480
- ( album != '#lasten' || parent != '' ) &&
481
- ( album != '#comten' || parent != '' ) &&
482
- ( album != '#featen' || parent != '' ) ) {
483
  }
484
  }
485
  break;
@@ -629,6 +629,7 @@ function wppaGutenbergGalleryEvaluate() {
629
 
630
  // Display shortcode
631
  dispShortcode = shortcode.replace(/"/g, '"');
 
632
  html = '<input type="text" id="wppagallery-shortcode-preview" style="background-color:#ddd; width:100%; height:26px;" value="'+dispShortcode+'" />';
633
  jQuery('#wppagallery-shortcode-preview-container').html( html );
634
 
@@ -671,7 +672,8 @@ function wppaGutenbergGalleryEvaluate() {
671
 
672
  if ( shortcodeOk ) {
673
  result = shortcode.replace( /#/g, '@' );
674
- result = shortcode.replace( /"/g, '' );
 
675
  }
676
  else {
677
  result = '';
1
  /* wppa-gutenberg-wppa.js
2
  * Pachkage: wp-photo-album-plus
3
  *
4
+ * Version 8.1.00.007
5
  */
6
 
7
  // Global vars
382
  if ( ! wppaIsEmpty( album ) ) {
383
  jQuery('#wppagallery-album-virt').css('color', '#070');
384
  switch ( album ) {
385
+ case '@topten':
386
+ case '@lasten':
387
+ case '@featen':
388
+ case '@comten':
389
  jQuery('#wppagallery-album-realopt-tr').show();
390
 
391
  // We use parent here for optional album(s), because album is already used for virtual album type
404
  jQuery('#wppagallery-photo-count-tr').show();
405
  count = jQuery('#wppagallery-photo-count').val();
406
  break;
407
+ case '@tags':
408
  jQuery('#wppagallery-phototags-tr').show();
409
  jQuery('#wppagallery-tags-cats-tr').show();
410
  andor = jQuery('[name=andor]:checked').val();
426
  }
427
  tags = wppaArrayToEnum( tagarr, sep );
428
  break;
429
+ case '@last':
430
  jQuery('#wppagallery-album-parent-tr').show();
431
  parent = jQuery('#wppagallery-album-parent-parent').val();
432
  jQuery('#wppagallery-album-count-tr').show();
433
  count = jQuery('#wppagallery-album-count').val();
434
  break;
435
+ case '@cat':
436
  jQuery('#wppagallery-albumcat-tr').show();
437
  jQuery('#wppagallery-tags-cats-tr').show();
438
  andor = jQuery('[name=andor]:checked').val();
454
  }
455
  cats = wppaArrayToEnum( catarr, sep );
456
  break;
457
+ case '@owner':
458
+ case '@upldr':
459
  jQuery('#wppagallery-owner-tr').show();
460
  needOwner = true;
461
  owner = jQuery('#wppagallery-owner').val();
466
  parent = parent.toString().replace( 'zero', '0' );
467
  }
468
  break;
469
+ case '@all':
470
  break;
471
  default:
472
  if ( album != null ) {
473
  alert( wppaUIERR + ': ' + album );
474
  }
475
  }
476
+ if ( ( album != '@cat' || cats != '' ) &&
477
+ ( album != '@owner' || owner != '' ) &&
478
+ ( album != '@upldr' || owner != '' ) &&
479
+ ( album != '@topten' || parent != '' ) &&
480
+ ( album != '@lasten' || parent != '' ) &&
481
+ ( album != '@comten' || parent != '' ) &&
482
+ ( album != '@featen' || parent != '' ) ) {
483
  }
484
  }
485
  break;
629
 
630
  // Display shortcode
631
  dispShortcode = shortcode.replace(/"/g, '&quot;');
632
+ dispShortcode = dispShortcode.replace(/@/g, '&#35;');
633
  html = '<input type="text" id="wppagallery-shortcode-preview" style="background-color:#ddd; width:100%; height:26px;" value="'+dispShortcode+'" />';
634
  jQuery('#wppagallery-shortcode-preview-container').html( html );
635
 
672
 
673
  if ( shortcodeOk ) {
674
  result = shortcode.replace( /#/g, '@' );
675
+ result = shortcode.replace( /"/g, '\"' );
676
+ result = shortcode.replace( /'/g, "\'" );
677
  }
678
  else {
679
  result = '';
wppa-admin-styles.css CHANGED
@@ -1,7 +1,7 @@
1
  /* admin-styles.css
2
  *
3
  * wp-photo-album-plus
4
- * version 8.1.00.006
5
  */
6
  #files_list, #files_list2
7
  {
@@ -337,15 +337,10 @@ border:1px solid black;
337
  }
338
  /* Photo admin sequence */
339
  .sortable-placeholder {
340
- position: relative !important;
341
- width: 180px;
342
- height: 180px;
343
- margin: 5px;
344
- border: 1px solid #cccccc;
345
- border-radius:3px;
346
- float: left !important;
347
  }
348
- .ui-state-default {
 
349
  position: relative !important;
350
  width: 180px;
351
  height: 180px;
@@ -355,32 +350,26 @@ border:1px solid black;
355
  }
356
 
357
  .wppa-publish {
358
- border: 1px solid;
359
  background-color: rgb( 255, 255, 224 );
360
  border-color: rgb( 230, 219, 85 );
361
  }
362
  .wppa-featured {
363
- border: 1px solid;
364
  background-color: rgb( 224, 255, 224 );
365
  border-color: rgb( 85, 238, 85 );
366
  }
367
  .wppa-pending, .wppa-scheduled, .wppa-private {
368
- border: 1px solid;
369
  background-color: rgb( 255, 235, 232 );
370
  border-color: rgb( 204, 0, 0 );
371
  }
372
  .wppa-bronze {
373
- border: 1px solid;
374
  background-color: rgb( 221, 221, 187 );
375
  border-color: rgb( 204, 204, 170 );
376
  }
377
  .wppa-silver {
378
- border: 1px solid;
379
  background-color: rgb( 255, 255, 255 );
380
  border-color: rgb( 238, 238, 238 );
381
  }
382
  .wppa-gold {
383
- border: 1px solid;
384
  background-color: rgb( 238, 238, 204 );
385
  border-color: rgb( 221, 221, 187 );
386
  }
1
  /* admin-styles.css
2
  *
3
  * wp-photo-album-plus
4
+ * version 8.1.00.007
5
  */
6
  #files_list, #files_list2
7
  {
337
  }
338
  /* Photo admin sequence */
339
  .sortable-placeholder {
340
+ border-color: #cccccc;
 
 
 
 
 
 
341
  }
342
+ .ui-state-default, .sortable-placeholder {
343
+ border: 1px solid !important;
344
  position: relative !important;
345
  width: 180px;
346
  height: 180px;
350
  }
351
 
352
  .wppa-publish {
 
353
  background-color: rgb( 255, 255, 224 );
354
  border-color: rgb( 230, 219, 85 );
355
  }
356
  .wppa-featured {
 
357
  background-color: rgb( 224, 255, 224 );
358
  border-color: rgb( 85, 238, 85 );
359
  }
360
  .wppa-pending, .wppa-scheduled, .wppa-private {
 
361
  background-color: rgb( 255, 235, 232 );
362
  border-color: rgb( 204, 0, 0 );
363
  }
364
  .wppa-bronze {
 
365
  background-color: rgb( 221, 221, 187 );
366
  border-color: rgb( 204, 204, 170 );
367
  }
368
  .wppa-silver {
 
369
  background-color: rgb( 255, 255, 255 );
370
  border-color: rgb( 238, 238, 238 );
371
  }
372
  .wppa-gold {
 
373
  background-color: rgb( 238, 238, 204 );
374
  border-color: rgb( 221, 221, 187 );
375
  }
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
- * Version 8.1.00.006
6
  *
7
  */
8
 
@@ -1084,7 +1084,7 @@ global $wppa;
1084
  case 'getshortcodedrendered':
1085
  $shortcode = wppa_get( 'shortcode' );
1086
  $shortcode = str_replace( '@', '#', $shortcode );
1087
- // $shortcode = str_replace( '&apos;', '"', $shortcode );
1088
 
1089
  wppa_load_theme();
1090
 
@@ -1097,7 +1097,7 @@ global $wppa;
1097
  echo
1098
  '<div id="wppa-gutenberg-div-' . $wppa['mocc'] . '" >' .
1099
  '<div style="font-size:10px;color:green;margin-bottom:2px;width:100%;text-align:center;" ><i>(' .
1100
- __('Links and buttons will not work in this preview', 'wp-photo-album-plus') .
1101
  ')</i></div>' .
1102
  $result .
1103
  '</div>';
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
+ * Version 8.1.00.007
6
  *
7
  */
8
 
1084
  case 'getshortcodedrendered':
1085
  $shortcode = wppa_get( 'shortcode' );
1086
  $shortcode = str_replace( '@', '#', $shortcode );
1087
+ $shortcode = stripslashes( $shortcode );
1088
 
1089
  wppa_load_theme();
1090
 
1097
  echo
1098
  '<div id="wppa-gutenberg-div-' . $wppa['mocc'] . '" >' .
1099
  '<div style="font-size:10px;color:green;margin-bottom:2px;width:100%;text-align:center;" ><i>(' .
1100
+ esc_html( __('Links and buttons will not work in this preview', 'wp-photo-album-plus') ) .
1101
  ')</i></div>' .
1102
  $result .
1103
  '</div>';
wppa-gutenberg-wppa.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-gutenberg-wppa.php
3
  * Pachkage: wp-photo-album-plus
4
  *
5
- * Version 8.0.02.006
6
  */
7
 
8
  function wppa_gutenberg_wppa_block() {
@@ -201,16 +201,16 @@ global $wpdb;
201
  '<td>'.
202
  '<select id="wppagallery-album-virt" name="album" class="wppagallery-album" onchange="wppaGutenbergGalleryEvaluate()">'.
203
  '<option value="" disabled="disabled" selected="selected" style="color:#700 !important;" >-- '.__('Please select a virtual album', 'wp-photo-album-plus').' --</option>'.
204
- '<option value="#last" >'.__('The most recently added album', 'wp-photo-album-plus').'</option>'.
205
- '<option value="#topten" >'.__('The top rated photos', 'wp-photo-album-plus').'</option>'.
206
- '<option value="#lasten" >'.__('The most recently uploaded photos', 'wp-photo-album-plus').'</option>'.
207
- '<option value="#featen" >'.__('A random selection of featured photos', 'wp-photo-album-plus').'</option>'.
208
- '<option value="#comten" >'.__('The most recently commented photos', 'wp-photo-album-plus').'</option>'.
209
- '<option value="#tags" >'.__('Photos tagged with certain tags', 'wp-photo-album-plus').'</option>'.
210
- '<option value="#cat" >'.__('Albums tagged with a certain category', 'wp-photo-album-plus').'</option>'.
211
- '<option value="#owner" >'.__('Photos in albums owned by a certain user', 'wp-photo-album-plus').'</option>'.
212
- '<option value="#upldr" >'.__('Photos uploaded by a certain user', 'wp-photo-album-plus').'</option>'.
213
- '<option value="#all" >'.__('All photos in the system', 'wp-photo-album-plus').'</option>'.
214
  '</select>'.
215
  '</td>'.
216
  '</tr>'.
@@ -221,10 +221,10 @@ global $wpdb;
221
  '<td>'.
222
  '<select id="wppagallery-album-virt-cover" name="album" class="wppagallery-album" onchange="wppaGutenbergGalleryEvaluate()">'.
223
  '<option value="" disabled="disabled" selected="selected" style="color:#700 !important;" >-- '.__('Please select a virtual album', 'wp-photo-album-plus').' --</option>'.
224
- '<option value="#last" >'.__('The most recently modified album', 'wp-photo-album-plus').'</option>'.
225
- '<option value="#owner" >'.__('Albums owned by a certain user', 'wp-photo-album-plus').'</option>'.
226
- '<option value="#cat" >'.__('Albums tagged with certain categories', 'wp-photo-album-plus').'</option>'.
227
- '<option value="#all" >'.__('All albums in the system', 'wp-photo-album-plus').'</option>'.
228
  '</select>'.
229
  '</td>'.
230
  '</tr>'.
2
  /* wppa-gutenberg-wppa.php
3
  * Pachkage: wp-photo-album-plus
4
  *
5
+ * Version 8.1.00.007
6
  */
7
 
8
  function wppa_gutenberg_wppa_block() {
201
  '<td>'.
202
  '<select id="wppagallery-album-virt" name="album" class="wppagallery-album" onchange="wppaGutenbergGalleryEvaluate()">'.
203
  '<option value="" disabled="disabled" selected="selected" style="color:#700 !important;" >-- '.__('Please select a virtual album', 'wp-photo-album-plus').' --</option>'.
204
+ '<option value="@last" >'.__('The most recently added album', 'wp-photo-album-plus').'</option>'.
205
+ '<option value="@topten" >'.__('The top rated photos', 'wp-photo-album-plus').'</option>'.
206
+ '<option value="@lasten" >'.__('The most recently uploaded photos', 'wp-photo-album-plus').'</option>'.
207
+ '<option value="@featen" >'.__('A random selection of featured photos', 'wp-photo-album-plus').'</option>'.
208
+ '<option value="@comten" >'.__('The most recently commented photos', 'wp-photo-album-plus').'</option>'.
209
+ '<option value="@tags" >'.__('Photos tagged with certain tags', 'wp-photo-album-plus').'</option>'.
210
+ '<option value="@cat" >'.__('Albums tagged with a certain category', 'wp-photo-album-plus').'</option>'.
211
+ '<option value="@owner" >'.__('Photos in albums owned by a certain user', 'wp-photo-album-plus').'</option>'.
212
+ '<option value="@upldr" >'.__('Photos uploaded by a certain user', 'wp-photo-album-plus').'</option>'.
213
+ '<option value="@all" >'.__('All photos in the system', 'wp-photo-album-plus').'</option>'.
214
  '</select>'.
215
  '</td>'.
216
  '</tr>'.
221
  '<td>'.
222
  '<select id="wppagallery-album-virt-cover" name="album" class="wppagallery-album" onchange="wppaGutenbergGalleryEvaluate()">'.
223
  '<option value="" disabled="disabled" selected="selected" style="color:#700 !important;" >-- '.__('Please select a virtual album', 'wp-photo-album-plus').' --</option>'.
224
+ '<option value="@last" >'.__('The most recently modified album', 'wp-photo-album-plus').'</option>'.
225
+ '<option value="@owner" >'.__('Albums owned by a certain user', 'wp-photo-album-plus').'</option>'.
226
+ '<option value="@cat" >'.__('Albums tagged with certain categories', 'wp-photo-album-plus').'</option>'.
227
+ '<option value="@all" >'.__('All albums in the system', 'wp-photo-album-plus').'</option>'.
228
  '</select>'.
229
  '</td>'.
230
  '</tr>'.
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
- * Version 8.1.00.005
7
  *
8
  */
9
 
@@ -315,12 +315,13 @@ global $wppa;
315
  $wppa['geo'] .= '<div id="geodiv-' . wppa( 'mocc' ) . '-' . $id . '" style="display:none;">' . $geo . '</div>';
316
  break;
317
  case 'wppa-plus-embedded':
 
318
  if ( $wppa['geo'] == '' ) { // First
319
  $wppa['geo'] = '
320
  <div id="map-canvas-' . wppa( 'mocc' ).'"
321
  style="height:' . wppa_opt( 'map_height' ) . 'px; width:100%; padding:0; margin:0; font-size: 10px;" >
322
  </div>';
323
- $the_js = '
324
  _wppaLat[' . wppa( 'mocc' ) . '] = [];
325
  _wppaLon[' . wppa( 'mocc' ) . '] = [];';
326
  } // End first
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 8.1.00.007
7
  *
8
  */
9
 
315
  $wppa['geo'] .= '<div id="geodiv-' . wppa( 'mocc' ) . '-' . $id . '" style="display:none;">' . $geo . '</div>';
316
  break;
317
  case 'wppa-plus-embedded':
318
+ $the_js = '';
319
  if ( $wppa['geo'] == '' ) { // First
320
  $wppa['geo'] = '
321
  <div id="map-canvas-' . wppa( 'mocc' ).'"
322
  style="height:' . wppa_opt( 'map_height' ) . 'px; width:100%; padding:0; margin:0; font-size: 10px;" >
323
  </div>';
324
+ $the_js .= '
325
  _wppaLat[' . wppa( 'mocc' ) . '] = [];
326
  _wppaLon[' . wppa( 'mocc' ) . '] = [];';
327
  } // End first
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.1.00.006
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.1.00.006'; // 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.1.00.007
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.1.00.007'; // WPPA software version
28
  global $wppa_revno;
29
  $wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
30