WP Photo Album Plus - Version 8.0.03.003

Version Description

= 8.0.03 =

  • This version addresses various minor bug fixes and feature requests.
Download this release

Release Info

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

Code changes from version 8.0.03.002 to 8.0.03.003

Files changed (7) hide show
  1. changelog.txt +6 -0
  2. wppa-boxes-html.php +4 -3
  3. wppa-filter.php +3 -3
  4. wppa-init.php +20 -1
  5. wppa-scripts.php +5 -5
  6. wppa-utils.php +10 -1
  7. wppa.php +2 -2
changelog.txt CHANGED
@@ -13,6 +13,12 @@ To allow uploads in this case: tick the box in Advanced settings -> Users -> I I
13
  If you do not use the widget or the upload shortcode but let them upload using the album cover link, make sure empty albums are not skipped, to allow the first upload.
14
  See Basic settings -> Albums -> II Item 7: Skip empty albums.
15
 
 
 
 
 
 
 
16
  = 8.0.02 =
17
 
18
  * Further restructured javascript loading and inits. One can now also cache slideshows and slideshow widgets when defer javascript is on.
13
  If you do not use the widget or the upload shortcode but let them upload using the album cover link, make sure empty albums are not skipped, to allow the first upload.
14
  See Basic settings -> Albums -> II Item 7: Skip empty albums.
15
 
16
+ * Plugin All in One SEO tampers the internal wppa occurrance counters because it renders the page before the actual page building.
17
+ This results in certain links not working like the link from an image in a widget to a landing page, because the landing shortcode is no longer the first occurrance.
18
+ Provided a fix for this by resetting the counters at the end of the the process that builds the page header.
19
+
20
+ * When both defer javascript was active and the shortcode was cached, reponsiveness was no longer fully supported. Fixed.
21
+
22
  = 8.0.02 =
23
 
24
  * Further restructured javascript loading and inits. One can now also cache slideshows and slideshow widgets when defer javascript is on.
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 8.0.02.010
7
  *
8
  */
9
 
@@ -2950,11 +2950,12 @@ static $albums_granted;
2950
  }
2951
  else {
2952
  $returnurl = wppa_get_permalink();
 
2953
  if ( $where == 'cover' ) {
2954
- $returnurl .= 'wppa-album=' . $alb . '&wppa-cover=0&wppa-occur=' . $occur;
2955
  }
2956
  elseif ( $where == 'thumb' ) {
2957
- $returnurl .= 'wppa-album=' . $alb . '&wppa-cover=0&wppa-occur=' . $occur;
2958
  }
2959
  if ( wppa( 'page' ) ) $returnurl .= '&wppa-page=' . wppa( 'page' );
2960
  $returnurl = trim( $returnurl, '?' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 8.0.03.003
7
  *
8
  */
9
 
2950
  }
2951
  else {
2952
  $returnurl = wppa_get_permalink();
2953
+ $albs = is_array( $alb ) ? implode( '.', $alb ) : $alb;
2954
  if ( $where == 'cover' ) {
2955
+ $returnurl .= 'wppa-album=' . $albs . '&wppa-cover=0&wppa-occur=' . $occur;
2956
  }
2957
  elseif ( $where == 'thumb' ) {
2958
+ $returnurl .= 'wppa-album=' . $albs . '&wppa-cover=0&wppa-occur=' . $occur;
2959
  }
2960
  if ( wppa( 'page' ) ) $returnurl .= '&wppa-page=' . wppa( 'page' );
2961
  $returnurl = trim( $returnurl, '?' );
wppa-filter.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
- * Version 8.0.03.002
7
  *
8
  */
9
 
@@ -159,11 +159,11 @@ global $wppa_current_shortcode_atts;
159
 
160
  // Login requested?
161
  if ( $atts['login'] == 'yes' && ! is_user_logged_in() ) {
162
- // wppa_bump_mocc();
163
  return '';
164
  }
165
  if ( $atts['login'] == 'admin' && ! wppa_user_is( 'administrator' ) ) {
166
- // wppa_bump_mocc();
167
  return '';
168
  }
169
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
+ * Version 8.0.03.003
7
  *
8
  */
9
 
159
 
160
  // Login requested?
161
  if ( $atts['login'] == 'yes' && ! is_user_logged_in() ) {
162
+ wppa_bump_mocc();
163
  return '';
164
  }
165
  if ( $atts['login'] == 'admin' && ! wppa_user_is( 'administrator' ) ) {
166
+ wppa_bump_mocc();
167
  return '';
168
  }
169
 
wppa-init.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * This file loads required php files and contains all functions used in init actions.
6
  *
7
- * Version 8.0.02.006
8
  */
9
 
10
  /* LOAD SIDEBAR WIDGETS */
@@ -498,3 +498,22 @@ global $thegallery;
498
  }
499
  add_action( 'plugins_loaded', 'wppa_filter_translate' );
500
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  *
5
  * This file loads required php files and contains all functions used in init actions.
6
  *
7
+ * Version 8.0.03.003
8
  */
9
 
10
  /* LOAD SIDEBAR WIDGETS */
498
  }
499
  add_action( 'plugins_loaded', 'wppa_filter_translate' );
500
 
501
+ // Fix All in one SEO tampers occur counter
502
+ function wppa_fix_aioseo() {
503
+ global $wppa;
504
+
505
+ if ( $wppa['mocc'] ) {
506
+ // wppa_log( 'obs', 'AIOSEO tampered mocc to ' . $wppa['mocc'] );
507
+ $wppa['mocc'] = '0';
508
+ }
509
+ if ( $wppa['occur'] ) {
510
+ // wppa_log( 'obs', 'AIOSEO tampered occur to ' . $wppa['occur'] );
511
+ $wppa['occur'] = '0';
512
+ }
513
+ if ( $wppa['widget_occur'] ) {
514
+ // wppa_log( 'obs', 'AIOSEO tampered widget_occur to ' . $wppa['widget_occur'] );
515
+ $wppa['widget_occur'] = '0';
516
+ }
517
+ }
518
+ add_action( 'wp_head', 'wppa_fix_aioseo', '99' );
519
+ add_action( 'admin_head', 'wppa_fix_aioseo', '99' );
wppa-scripts.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * This file contains all functions for activating javascript
6
  *
7
- * Version 8.0.03.002
8
  */
9
 
10
  // Place all wppa related js declarations in the header, both admin and frontend
@@ -496,7 +496,7 @@ global $wpdb;
496
  wppaTxtDone = "'.__('Done!', 'wp-photo-album-plus').'",
497
  wppaTxtErrUnable = "'.__( 'ERROR: unable to upload files.', 'wp-photo-album-plus' ).'",
498
  wppaOutputType = "' . wppa_opt( 'photo_shortcode_fe_type' ) . '";';
499
-
500
  // Tinymce photo
501
  if ( wppa_switch( 'photo_shortcode_enabled' ) ) {
502
  $id = $wpdb->get_var( "SELECT id FROM $wpdb->wppa_photos
@@ -507,11 +507,11 @@ global $wpdb;
507
 
508
  // Fake we are in a widget, to prevent wppa_get_picture_html() from bumping viewcount
509
  wppa( 'in_widget', true );
510
-
511
  $result .= '
512
  wppaShortcodeTemplate = "' . esc_js( wppa_get_picture_html( array( 'id' => $id, 'type' => 'sphoto' ) ) ) . '";
513
  wppaShortcodeTemplateId = "' . $id . '.' . wppa_get_photo_item( $id, 'ext' ) . '";';
514
-
515
  // Reset faked widget
516
  wppa( 'in_widget', false );
517
  }
@@ -663,7 +663,7 @@ function wppa_js( $txt ) {
663
  global $wppa_js_page_data;
664
  global $wppa_script_open;
665
 
666
- if ( ! wppa_is_defer() ) {
667
  wppa_out( '
668
  <script>' . $txt . '</script>' );
669
  return;
4
  *
5
  * This file contains all functions for activating javascript
6
  *
7
+ * Version 8.0.03.003
8
  */
9
 
10
  // Place all wppa related js declarations in the header, both admin and frontend
496
  wppaTxtDone = "'.__('Done!', 'wp-photo-album-plus').'",
497
  wppaTxtErrUnable = "'.__( 'ERROR: unable to upload files.', 'wp-photo-album-plus' ).'",
498
  wppaOutputType = "' . wppa_opt( 'photo_shortcode_fe_type' ) . '";';
499
+
500
  // Tinymce photo
501
  if ( wppa_switch( 'photo_shortcode_enabled' ) ) {
502
  $id = $wpdb->get_var( "SELECT id FROM $wpdb->wppa_photos
507
 
508
  // Fake we are in a widget, to prevent wppa_get_picture_html() from bumping viewcount
509
  wppa( 'in_widget', true );
510
+
511
  $result .= '
512
  wppaShortcodeTemplate = "' . esc_js( wppa_get_picture_html( array( 'id' => $id, 'type' => 'sphoto' ) ) ) . '";
513
  wppaShortcodeTemplateId = "' . $id . '.' . wppa_get_photo_item( $id, 'ext' ) . '";';
514
+
515
  // Reset faked widget
516
  wppa( 'in_widget', false );
517
  }
663
  global $wppa_js_page_data;
664
  global $wppa_script_open;
665
 
666
+ if ( ! wppa_is_defer() || wppa_is_caching() ) {
667
  wppa_out( '
668
  <script>' . $txt . '</script>' );
669
  return;
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
- * Version 8.0.02.006
7
  *
8
  */
9
 
@@ -5143,3 +5143,12 @@ function wppa_lazy() {
5143
  return ( $setting == 'pc' );
5144
  }
5145
  }
 
 
 
 
 
 
 
 
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 8.0.03.003
7
  *
8
  */
9
 
5143
  return ( $setting == 'pc' );
5144
  }
5145
  }
5146
+
5147
+ // Are we building a cache file?
5148
+ function wppa_is_caching() {
5149
+
5150
+ $temp = wppa_test_for_caching();
5151
+ $caching = $temp['caching'];
5152
+
5153
+ return $caching;
5154
+ }
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.03.002
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.03.002'; // 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.03.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
 
25
  /* WPPA GLOBALS */
26
  global $wppa_api_version;
27
+ $wppa_api_version = '8.0.03.003'; // WPPA software version
28
  global $wppa_revno;
29
  $wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
30