WP Photo Album Plus - Version 8.1.09.005

Version Description

= 8.1.08 =

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

Code changes from version 8.1.09.004 to 8.1.09.005

changelog.txt CHANGED
@@ -3,7 +3,8 @@ WP Photo Album Plus Changelog
3
  = 8.1.09 =
4
 
5
  * siae="auto,500" i.e. responsive with maximum did not work as the maximum was not working. Fixed.
6
- * You can now limit frontend album creation to one ore more userroles. See Advanced settings -> Admin -> I -> Item 2
 
7
 
8
  = 8.1.08 =
9
 
3
  = 8.1.09 =
4
 
5
  * siae="auto,500" i.e. responsive with maximum did not work as the maximum was not working. Fixed.
6
+ * You can now limit frontend album creation to one or more userroles. See Advanced settings -> Admin -> I -> Item 2
7
+ * You can now select where to have the thumbnail popups, always, on pc only (i.e. not on mobile) or nowhere. See Basic settings -> Thumbnails -> III -> Item 6: Thumb popup
8
 
9
  = 8.1.08 =
10
 
wppa-defaults.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains default settings
6
- * Version 8.1.09.003
7
  *
8
  */
9
 
@@ -547,7 +547,7 @@ horizrailenabled:false,";
547
  'wppa_valign' => 'center',
548
  'wppa_use_thumb_opacity' => 'yes',
549
  'wppa_thumb_opacity' => '95',
550
- 'wppa_use_thumb_popup' => 'yes',
551
  'wppa_align_thumbtext' => 'no',
552
  'wppa_wpautop_on_thumb_desc' => 'nil',
553
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains default settings
6
+ * Version 8.1.09.005
7
  *
8
  */
9
 
547
  'wppa_valign' => 'center',
548
  'wppa_use_thumb_opacity' => 'yes',
549
  'wppa_thumb_opacity' => '95',
550
+ 'wppa_thumb_popup' => 'all',
551
  'wppa_align_thumbtext' => 'no',
552
  'wppa_wpautop_on_thumb_desc' => 'nil',
553
 
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 8.1.09.003
7
  *
8
  */
9
 
@@ -3357,7 +3357,7 @@ global $wpdb;
3357
  $result = '';
3358
  $perc = '';
3359
  if ( $type == 'thumb' || $type == 'film' ) {
3360
- if ( wppa_switch( 'use_thumb_opacity' ) || wppa_switch( 'use_thumb_popup' ) ) {
3361
 
3362
  if ( wppa_switch( 'use_thumb_opacity' ) ) {
3363
  $perc = wppa_opt( 'thumb_opacity' );
@@ -3370,7 +3370,7 @@ global $wpdb;
3370
  $result .= 'wppaGotoFilmNoMove( '.wppa( 'mocc' ).', '.$idx.' );';
3371
  }
3372
 
3373
- if ( ! $no_popup && wppa_switch( 'use_thumb_popup' ) ) {
3374
  if ( true ) { //wppa_opt( 'thumb_linktype' ) != 'lightbox' ) {
3375
 
3376
  $name = wppa_switch( 'popup_text_name' ) || wppa_switch( 'popup_text_owner' ) ?
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 8.1.09.005
7
  *
8
  */
9
 
3357
  $result = '';
3358
  $perc = '';
3359
  if ( $type == 'thumb' || $type == 'film' ) {
3360
+ if ( wppa_switch( 'use_thumb_opacity' ) || wppa_thumb_popup() ) {
3361
 
3362
  if ( wppa_switch( 'use_thumb_opacity' ) ) {
3363
  $perc = wppa_opt( 'thumb_opacity' );
3370
  $result .= 'wppaGotoFilmNoMove( '.wppa( 'mocc' ).', '.$idx.' );';
3371
  }
3372
 
3373
+ if ( ! $no_popup && wppa_use_thumb_popup() ) {
3374
  if ( true ) { //wppa_opt( 'thumb_linktype' ) != 'lightbox' ) {
3375
 
3376
  $name = wppa_switch( 'popup_text_name' ) || wppa_switch( 'popup_text_owner' ) ?
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 8.1.09.003
7
  *
8
  */
9
 
@@ -2670,7 +2670,7 @@ global $wppa_subtab_names;
2670
  $html = wppa_checkbox($slug);
2671
  wppa_setting_new($slug, '8', $name, $desc, $html, $help, wppa_switch('enable_audio'));
2672
 
2673
- if ( wppa_switch( 'use_thumb_popup' ) ) {
2674
 
2675
  $name = __('Popup name', 'wp-photo-album-plus' );
2676
  $desc = __('Display Thumbnail name on popup.', 'wp-photo-album-plus' );
@@ -2823,8 +2823,12 @@ global $wppa_subtab_names;
2823
  $name = __('Thumb popup', 'wp-photo-album-plus' );
2824
  $desc = __('Use popup effect on thumbnail images.', 'wp-photo-album-plus' );
2825
  $help = __('Thumbnails pop-up to a larger image when hovered.', 'wp-photo-album-plus' );
2826
- $slug = 'wppa_use_thumb_popup';
2827
- $html = wppa_checkbox($slug, 'wppaRefreshAfter();');
 
 
 
 
2828
  wppa_setting_new($slug, '6', $name, $desc, $html, $help);
2829
 
2830
  $name = __('Align subtext', 'wp-photo-album-plus' );
@@ -2859,7 +2863,7 @@ global $wppa_subtab_names;
2859
  'easeOutBounce', 'easeInOutBounce' );
2860
  $vals = $opts;
2861
  $html = wppa_select($slug, $opts, $vals);
2862
- wppa_setting_new($slug, '9', $name, $desc, $html, $help, wppa_switch( 'use_thumb_popup' ) );
2863
 
2864
  wppa_setting_box_footer_new();
2865
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 8.1.09.005
7
  *
8
  */
9
 
2670
  $html = wppa_checkbox($slug);
2671
  wppa_setting_new($slug, '8', $name, $desc, $html, $help, wppa_switch('enable_audio'));
2672
 
2673
+ if ( wppa_opt( 'thumb_popup' ) !== 'none' ) {
2674
 
2675
  $name = __('Popup name', 'wp-photo-album-plus' );
2676
  $desc = __('Display Thumbnail name on popup.', 'wp-photo-album-plus' );
2823
  $name = __('Thumb popup', 'wp-photo-album-plus' );
2824
  $desc = __('Use popup effect on thumbnail images.', 'wp-photo-album-plus' );
2825
  $help = __('Thumbnails pop-up to a larger image when hovered.', 'wp-photo-album-plus' );
2826
+ $slug = 'wppa_thumb_popup';
2827
+ $opts = array( __('Both pc and mobile', 'wp-photo-album-plus'),
2828
+ __('On pc only', 'wp-photo-album-plus'),
2829
+ __('Never', 'wp-photo-album-plus') );
2830
+ $vals = array( 'all', 'pc', 'none' );
2831
+ $html = wppa_select($slug, $opts, $vals, 'wppaRefreshAfter();');
2832
  wppa_setting_new($slug, '6', $name, $desc, $html, $help);
2833
 
2834
  $name = __('Align subtext', 'wp-photo-album-plus' );
2863
  'easeOutBounce', 'easeInOutBounce' );
2864
  $vals = $opts;
2865
  $html = wppa_select($slug, $opts, $vals);
2866
+ wppa_setting_new($slug, '9', $name, $desc, $html, $help, wppa_opt( 'thumb_popup' ) != 'none' );
2867
 
2868
  wppa_setting_box_footer_new();
2869
  }
wppa-setup.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
- * Version 8.1.08.003
7
  *
8
  */
9
 
@@ -324,6 +324,12 @@ global $wppa_error;
324
  $wpdb->query( "UPDATE $wpdb->wppa_albums SET status = 'publish' WHERE status = ''" );
325
  }
326
 
 
 
 
 
 
 
327
  }
328
 
329
  // Sanitize nicescroll opts
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 8.1.09.005
7
  *
8
  */
9
 
324
  $wpdb->query( "UPDATE $wpdb->wppa_albums SET status = 'publish' WHERE status = ''" );
325
  }
326
 
327
+ if ( $old_rev <= '8110000' ) {
328
+ if ( get_option( 'wppa_use_thumb_popup', 'yes' ) == 'no' ) {
329
+ update_option( 'wppa_thumb_popup', 'none' );
330
+ }
331
+ }
332
+
333
  }
334
 
335
  // Sanitize nicescroll opts
wppa-thumbnails.php CHANGED
@@ -5,7 +5,7 @@
5
  * Various funcions to display a thumbnail image
6
  * Contains all possible frontend thumbnail types
7
  *
8
- * Version 8.1.09.003
9
  *
10
  */
11
 
@@ -97,7 +97,7 @@ global $wpdb;
97
  $cursor = $imgattr_a['cursor'];
98
 
99
  // Find the required image sizes
100
- if ( wppa_switch( 'use_thumb_popup' ) && wppa_is_file( $imgsrc ) ) {
101
 
102
  // Landscape?
103
  if ( $imgwidth > $imgheight ) {
@@ -405,7 +405,7 @@ global $wpdb;
405
  }
406
  }
407
  else { // no link
408
- if ( wppa_switch( 'use_thumb_popup' ) ) {
409
  $result .= '<div id="x-'.$xid.'-'.$mocc.'">';
410
  if ( $is_video ) {
411
  $result .= wppa_get_video_html( array(
@@ -1165,7 +1165,7 @@ global $wpdb;
1165
  $cursor = $imgattr_a['cursor'];
1166
 
1167
  // Popup ?
1168
- if ( wppa_switch( 'use_thumb_popup' ) ) {
1169
 
1170
  // Landscape?
1171
  if ( $imgwidth > $imgheight ) {
@@ -1449,7 +1449,7 @@ global $wpdb;
1449
  }
1450
  }
1451
  else { // no link
1452
- if ( wppa_switch( 'use_thumb_popup' ) ) {
1453
  $result .= '<div id="x-'.$id.'-'.$mocc.'" style="height:100%" >';
1454
  if ( $is_video ) {
1455
  $result .= wppa_get_video_html( array(
5
  * Various funcions to display a thumbnail image
6
  * Contains all possible frontend thumbnail types
7
  *
8
+ * Version 8.1.09.005
9
  *
10
  */
11
 
97
  $cursor = $imgattr_a['cursor'];
98
 
99
  // Find the required image sizes
100
+ if ( wppa_use_thumb_popup() && wppa_is_file( $imgsrc ) ) {
101
 
102
  // Landscape?
103
  if ( $imgwidth > $imgheight ) {
405
  }
406
  }
407
  else { // no link
408
+ if ( wppa_use_thumb_popup() ) {
409
  $result .= '<div id="x-'.$xid.'-'.$mocc.'">';
410
  if ( $is_video ) {
411
  $result .= wppa_get_video_html( array(
1165
  $cursor = $imgattr_a['cursor'];
1166
 
1167
  // Popup ?
1168
+ if ( wppa_use_thumb_popup() ) {
1169
 
1170
  // Landscape?
1171
  if ( $imgwidth > $imgheight ) {
1449
  }
1450
  }
1451
  else { // no link
1452
+ if ( wppa_use_thumb_popup() ) {
1453
  $result .= '<div id="x-'.$id.'-'.$mocc.'" style="height:100%" >';
1454
  if ( $is_video ) {
1455
  $result .= wppa_get_video_html( array(
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.09.004
7
  *
8
  */
9
 
@@ -5117,4 +5117,19 @@ function wppa_utf8( $string ) {
5117
  $string = utf8_encode( $string );
5118
  }
5119
  return $string;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5120
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 8.1.09.005
7
  *
8
  */
9
 
5117
  $string = utf8_encode( $string );
5118
  }
5119
  return $string;
5120
+ }
5121
+
5122
+ // Use thumbnail popup?
5123
+ function wppa_use_thumb_popup() {
5124
+
5125
+ switch ( wppa_opt( 'thumb_popup' ) ) {
5126
+ case 'all':
5127
+ return true;
5128
+ break;
5129
+ case 'pc':
5130
+ return ! wppa_is_mobile();
5131
+ break;
5132
+ default: // none
5133
+ return false;
5134
+ }
5135
  }
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.09.004
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
@@ -24,7 +24,7 @@ global $wp_version;
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_api_version;
27
- $wppa_api_version = '8.1.09.004'; // 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.09.005
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_api_version;
27
+ $wppa_api_version = '8.1.09.005'; // WPPA software version
28
  global $wppa_revno;
29
  $wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
30