Version Description
= 8.0.07 =
- This version addresses various bug fixes, feature requests and security fixes.
Download this release
Release Info
Developer | opajaap |
Plugin | WP Photo Album Plus |
Version | 8.0.08.004 |
Comparing to | |
See all releases |
Code changes from version 8.0.08.003 to 8.0.08.004
- wppa-boxes-html.php +14 -5
- wppa-cache.php +11 -4
- wppa-filter.php +13 -3
- wppa-functions.php +2 -1
- wppa-topten-widget.php +2 -2
- wppa-wpdb-insert.php +3 -2
- wppa.php +2 -2
wppa-boxes-html.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various wppa boxes
|
6 |
-
* Version 8.0.08.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -771,8 +771,12 @@ function wppa_get_supersearch_html() {
|
|
771 |
global $wpdb;
|
772 |
global $wppa_session;
|
773 |
global $wppa_supported_camara_brands;
|
|
|
|
|
774 |
|
775 |
// Init
|
|
|
|
|
776 |
$mocc = wppa( 'mocc' );
|
777 |
$page = wppa_get_the_landing_page( 'supersearch_linkpage',
|
778 |
__( 'Photo search results' ,'wp-photo-album-plus' )
|
@@ -4935,6 +4939,11 @@ function wppa_bestof_box( $args ) {
|
|
4935 |
|
4936 |
// The Bestof html
|
4937 |
function wppa_bestof_html( $args, $widget = true ) {
|
|
|
|
|
|
|
|
|
|
|
4938 |
|
4939 |
// Copletify args
|
4940 |
$args = wp_parse_args( ( array ) $args, array( 'page' => '0',
|
@@ -4974,15 +4983,15 @@ function wppa_bestof_html( $args, $widget = true ) {
|
|
4974 |
|
4975 |
$data = wppa_get_the_bestof( $count, $period, $sortby, $display );
|
4976 |
|
4977 |
-
global $albums_used;
|
4978 |
-
global $photos_used;
|
4979 |
-
|
4980 |
if ( $display == 'photo' ) {
|
|
|
4981 |
if ( is_array( $data ) ) {
|
|
|
4982 |
foreach ( array_keys( $data ) as $id ) {
|
|
|
4983 |
$thumb = wppa_cache_thumb( $id );
|
4984 |
-
$photos_used .= '.' . $id;
|
4985 |
if ( $thumb ) {
|
|
|
4986 |
if ( wppa_is_video( $id ) ) {
|
4987 |
$imgsize = array( wppa_get_videox( $id ), wppa_get_videoy( $id ) );
|
4988 |
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various wppa boxes
|
6 |
+
* Version 8.0.08.004
|
7 |
*
|
8 |
*/
|
9 |
|
771 |
global $wpdb;
|
772 |
global $wppa_session;
|
773 |
global $wppa_supported_camara_brands;
|
774 |
+
global $albums_used;
|
775 |
+
global $photos_used;
|
776 |
|
777 |
// Init
|
778 |
+
$albums_used = '*';
|
779 |
+
$photos_used = '*';
|
780 |
$mocc = wppa( 'mocc' );
|
781 |
$page = wppa_get_the_landing_page( 'supersearch_linkpage',
|
782 |
__( 'Photo search results' ,'wp-photo-album-plus' )
|
4939 |
|
4940 |
// The Bestof html
|
4941 |
function wppa_bestof_html( $args, $widget = true ) {
|
4942 |
+
global $photos_used;
|
4943 |
+
global $other_deps;
|
4944 |
+
|
4945 |
+
$photos_used = '*';
|
4946 |
+
$other_deps = 'R';
|
4947 |
|
4948 |
// Copletify args
|
4949 |
$args = wp_parse_args( ( array ) $args, array( 'page' => '0',
|
4983 |
|
4984 |
$data = wppa_get_the_bestof( $count, $period, $sortby, $display );
|
4985 |
|
|
|
|
|
|
|
4986 |
if ( $display == 'photo' ) {
|
4987 |
+
|
4988 |
if ( is_array( $data ) ) {
|
4989 |
+
|
4990 |
foreach ( array_keys( $data ) as $id ) {
|
4991 |
+
|
4992 |
$thumb = wppa_cache_thumb( $id );
|
|
|
4993 |
if ( $thumb ) {
|
4994 |
+
|
4995 |
if ( wppa_is_video( $id ) ) {
|
4996 |
$imgsize = array( wppa_get_videox( $id ), wppa_get_videoy( $id ) );
|
4997 |
}
|
wppa-cache.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/*
|
4 |
/* Contains all wppa smart cache functions
|
5 |
/*
|
6 |
-
/* Version 8.0.08.
|
7 |
*/
|
8 |
|
9 |
// Test for caching
|
@@ -92,13 +92,14 @@ function wppa_save_cache_file( $xargs ) {
|
|
92 |
global $wppa_current_shortcode;
|
93 |
global $albums_used;
|
94 |
global $photos_used;
|
|
|
95 |
|
96 |
// Fill in defaults
|
97 |
$defaults = array( 'file' => '',
|
98 |
'data' => '',
|
99 |
'albums' => $albums_used,
|
100 |
'photos' => $photos_used,
|
101 |
-
'other' =>
|
102 |
'remark' => $wppa_current_shortcode,
|
103 |
);
|
104 |
$args = wp_parse_args( (array) $xargs, $defaults );
|
@@ -116,15 +117,20 @@ global $photos_used;
|
|
116 |
wppa_log( 'err', 'Missing album/photo/other ref for cachefile ' . str_replace( WPPA_CONTENT_PATH, '...', $file ) );
|
117 |
}
|
118 |
|
119 |
-
// Sanitize
|
120 |
if ( $albums != '*' ) {
|
121 |
|
122 |
if ( ! $albums || substr( $albums, 0, 1 ) == '$' ) {
|
123 |
$albums = wppa( 'start_album' );
|
124 |
}
|
125 |
|
126 |
-
// Remove dups
|
127 |
$albums = explode( '.', $albums );
|
|
|
|
|
|
|
|
|
|
|
128 |
$albums = array_unique( $albums, SORT_NUMERIC );
|
129 |
$albums = implode( '.', $albums );
|
130 |
$albums = trim( $albums, '.' );
|
@@ -169,6 +175,7 @@ global $photos_used;
|
|
169 |
// Cleanup
|
170 |
$albums_used = '';
|
171 |
$photos_used = '';
|
|
|
172 |
}
|
173 |
|
174 |
// Clear cache
|
3 |
/*
|
4 |
/* Contains all wppa smart cache functions
|
5 |
/*
|
6 |
+
/* Version 8.0.08.004
|
7 |
*/
|
8 |
|
9 |
// Test for caching
|
92 |
global $wppa_current_shortcode;
|
93 |
global $albums_used;
|
94 |
global $photos_used;
|
95 |
+
global $other_deps;
|
96 |
|
97 |
// Fill in defaults
|
98 |
$defaults = array( 'file' => '',
|
99 |
'data' => '',
|
100 |
'albums' => $albums_used,
|
101 |
'photos' => $photos_used,
|
102 |
+
'other' => $other_deps,
|
103 |
'remark' => $wppa_current_shortcode,
|
104 |
);
|
105 |
$args = wp_parse_args( (array) $xargs, $defaults );
|
117 |
wppa_log( 'err', 'Missing album/photo/other ref for cachefile ' . str_replace( WPPA_CONTENT_PATH, '...', $file ) );
|
118 |
}
|
119 |
|
120 |
+
// Sanitize input
|
121 |
if ( $albums != '*' ) {
|
122 |
|
123 |
if ( ! $albums || substr( $albums, 0, 1 ) == '$' ) {
|
124 |
$albums = wppa( 'start_album' );
|
125 |
}
|
126 |
|
127 |
+
// Remove dups, remove virtual album indicators
|
128 |
$albums = explode( '.', $albums );
|
129 |
+
foreach( array_keys( $albums ) as $key ) {
|
130 |
+
if ( substr( $albums[$key], 0, 1 ) == '#' ) {
|
131 |
+
unset( $albums[$key] );
|
132 |
+
}
|
133 |
+
}
|
134 |
$albums = array_unique( $albums, SORT_NUMERIC );
|
135 |
$albums = implode( '.', $albums );
|
136 |
$albums = trim( $albums, '.' );
|
175 |
// Cleanup
|
176 |
$albums_used = '';
|
177 |
$photos_used = '';
|
178 |
+
$other_deps = '';
|
179 |
}
|
180 |
|
181 |
// Clear cache
|
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.08.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -125,6 +125,9 @@ global $wppa_no_timer;
|
|
125 |
global $wpdb;
|
126 |
global $wppa_current_shortcode;
|
127 |
global $wppa_current_shortcode_atts;
|
|
|
|
|
|
|
128 |
|
129 |
// Init
|
130 |
wppa_reset_occurrance();
|
@@ -175,6 +178,10 @@ global $wppa_current_shortcode_atts;
|
|
175 |
|
176 |
// Caching?
|
177 |
$wppa['cache'] = ! in_array( $atts['cache'], array( '', '0', 'off', 'no' ) );
|
|
|
|
|
|
|
|
|
178 |
|
179 |
// Never use caching on a landing page
|
180 |
if ( $atts['type'] == 'landing' ) {
|
@@ -358,6 +365,8 @@ global $wppa_current_shortcode_atts;
|
|
358 |
case 'bestof':
|
359 |
$wppa['bestof'] = true;
|
360 |
$wppa['bestof_args'] = $xatts;
|
|
|
|
|
361 |
break;
|
362 |
case 'superview':
|
363 |
$wppa['is_superviewbox'] = true;
|
@@ -564,8 +573,6 @@ global $wppa_current_shortcode_atts;
|
|
564 |
|
565 |
// Remember albums and photos used if caching.
|
566 |
// This is used to know what caches must be cleared in cas a photo or album gets changed.
|
567 |
-
global $albums_used;
|
568 |
-
global $photos_used;
|
569 |
if ( $wppa['cache'] ) {
|
570 |
$albums_used = wppa_expand_enum( $wppa['start_album'] );
|
571 |
$photos_used = $atts['photos'] ? wppa_expand_enum( $atts['photos'] ) : $atts['photo'];
|
@@ -573,6 +580,7 @@ global $wppa_current_shortcode_atts;
|
|
573 |
else {
|
574 |
$albums_used = '';
|
575 |
$photos_used = '';
|
|
|
576 |
}
|
577 |
|
578 |
// Ready to render
|
@@ -657,6 +665,7 @@ global $wpdb;
|
|
657 |
static $seed;
|
658 |
global $wppa_current_shortcode;
|
659 |
global $wppa_current_shortcode_atts;
|
|
|
660 |
|
661 |
// Init
|
662 |
wppa_reset_occurrance();
|
@@ -771,6 +780,7 @@ global $wppa_current_shortcode_atts;
|
|
771 |
|
772 |
// Cache?
|
773 |
if ( isset( $xatts['cache'] ) ) {
|
|
|
774 |
$wppa['cache'] = ! in_array( $xatts['cache'], array( '', '0', 'off', 'no' ) );
|
775 |
}
|
776 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* get the albums via shortcode handler
|
6 |
+
* Version 8.0.08.004
|
7 |
*
|
8 |
*/
|
9 |
|
125 |
global $wpdb;
|
126 |
global $wppa_current_shortcode;
|
127 |
global $wppa_current_shortcode_atts;
|
128 |
+
global $albums_used;
|
129 |
+
global $photos_used;
|
130 |
+
global $other_deps;
|
131 |
|
132 |
// Init
|
133 |
wppa_reset_occurrance();
|
178 |
|
179 |
// Caching?
|
180 |
$wppa['cache'] = ! in_array( $atts['cache'], array( '', '0', 'off', 'no' ) );
|
181 |
+
if ( $wppa['cache'] && $atts['type'] == 'generic' ) {
|
182 |
+
$temp = $wpdb->get_col( "SELECT id FROM $wpdb->wppa_albums WHERE a_parent = 0 ORDER BY id" );
|
183 |
+
$albums_used = implode( '.', $temp );
|
184 |
+
}
|
185 |
|
186 |
// Never use caching on a landing page
|
187 |
if ( $atts['type'] == 'landing' ) {
|
365 |
case 'bestof':
|
366 |
$wppa['bestof'] = true;
|
367 |
$wppa['bestof_args'] = $xatts;
|
368 |
+
$photos_used = '*';
|
369 |
+
$other_deps = 'R';
|
370 |
break;
|
371 |
case 'superview':
|
372 |
$wppa['is_superviewbox'] = true;
|
573 |
|
574 |
// Remember albums and photos used if caching.
|
575 |
// This is used to know what caches must be cleared in cas a photo or album gets changed.
|
|
|
|
|
576 |
if ( $wppa['cache'] ) {
|
577 |
$albums_used = wppa_expand_enum( $wppa['start_album'] );
|
578 |
$photos_used = $atts['photos'] ? wppa_expand_enum( $atts['photos'] ) : $atts['photo'];
|
580 |
else {
|
581 |
$albums_used = '';
|
582 |
$photos_used = '';
|
583 |
+
$other_deps = '';
|
584 |
}
|
585 |
|
586 |
// Ready to render
|
665 |
static $seed;
|
666 |
global $wppa_current_shortcode;
|
667 |
global $wppa_current_shortcode_atts;
|
668 |
+
global $photos_used;
|
669 |
|
670 |
// Init
|
671 |
wppa_reset_occurrance();
|
780 |
|
781 |
// Cache?
|
782 |
if ( isset( $xatts['cache'] ) ) {
|
783 |
+
$photos_used = $photo;
|
784 |
$wppa['cache'] = ! in_array( $xatts['cache'], array( '', '0', 'off', 'no' ) );
|
785 |
}
|
786 |
|
wppa-functions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various functions
|
6 |
-
* Version 8.0.08.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -24,6 +24,7 @@ global $wppa_current_shortcode;
|
|
24 |
global $wppa_current_shortcode_atts;
|
25 |
global $albums_used;
|
26 |
global $photos_used;
|
|
|
27 |
|
28 |
// Init timer
|
29 |
wppa_occur_timer( 'init' );
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various functions
|
6 |
+
* Version 8.0.08.004
|
7 |
*
|
8 |
*/
|
9 |
|
24 |
global $wppa_current_shortcode_atts;
|
25 |
global $albums_used;
|
26 |
global $photos_used;
|
27 |
+
global $other_deps;
|
28 |
|
29 |
// Init timer
|
30 |
wppa_occur_timer( 'init' );
|
wppa-topten-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the top rated photos
|
6 |
-
* Version 8.0.08.
|
7 |
*/
|
8 |
|
9 |
class TopTenWidget extends WP_Widget {
|
@@ -543,7 +543,7 @@ class TopTenWidget extends WP_Widget {
|
|
543 |
// Cache?
|
544 |
if ( $cache ) {
|
545 |
|
546 |
-
wppa_save_cache_file( array( 'file' => $cachefile, 'data' => $result ) );
|
547 |
}
|
548 |
|
549 |
wppa( 'in_widget', false );
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the top rated photos
|
6 |
+
* Version 8.0.08.004
|
7 |
*/
|
8 |
|
9 |
class TopTenWidget extends WP_Widget {
|
543 |
// Cache?
|
544 |
if ( $cache ) {
|
545 |
|
546 |
+
wppa_save_cache_file( array( 'file' => $cachefile, 'data' => $result, 'other' => 'R' ) );
|
547 |
}
|
548 |
|
549 |
wppa( 'in_widget', false );
|
wppa-wpdb-insert.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains low-level wpdb routines that add new records
|
6 |
-
* Version 8.0.08.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -427,7 +427,7 @@ global $wpdb;
|
|
427 |
|
428 |
// Update index
|
429 |
wppa_schedule_maintenance_proc( 'wppa_remake_index_photos' );
|
430 |
-
wppa_clear_cache( array( 'album' => $args['
|
431 |
|
432 |
return $args['id'];
|
433 |
}
|
@@ -564,6 +564,7 @@ global $wpdb;
|
|
564 |
return false;
|
565 |
}
|
566 |
|
|
|
567 |
function wppa_create_cache_entry( $args ) {
|
568 |
global $wpdb;
|
569 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains low-level wpdb routines that add new records
|
6 |
+
* Version 8.0.08.004
|
7 |
*
|
8 |
*/
|
9 |
|
427 |
|
428 |
// Update index
|
429 |
wppa_schedule_maintenance_proc( 'wppa_remake_index_photos' );
|
430 |
+
wppa_clear_cache( array( 'album' => $args['album'] ) );
|
431 |
|
432 |
return $args['id'];
|
433 |
}
|
564 |
return false;
|
565 |
}
|
566 |
|
567 |
+
// Cache metadata
|
568 |
function wppa_create_cache_entry( $args ) {
|
569 |
global $wpdb;
|
570 |
|
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.08.
|
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.08.
|
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.08.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.08.004'; // WPPA software version
|
28 |
global $wppa_revno;
|
29 |
$wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
|
30 |
|