Version Description
= 7.0.10 =
- This version addresses various bug fixes
= 7.0.09 =
- This version addresses various security issues.
- This version addresses various bug fixes and feature requests.
= 7.0.08 =
- This version addresses various security issues.
- This version addresses various bug fixes
= 7.0.07 =
- This version addresses various security issues.
- This version addresses various bug fixes
= 7.0.06 =
- This version addresses various bug fixes
- This version addresses various security issues.
= 7.0.05 =
- This version addresses various minor bug fixes and feature requests.
- This version addresses various security issues.
= 7.0.04 =
- This version addresses various bug fixes
- This version addresses various security issues.
= 7.0.03 =
- This version addresses various minor bug fixes and feature requests.
= 7.0.02 =
- This version addresses various bug fixes
- This version addresses various security issues.
= 7.0.01 =
- This version addresses various minor bug fixes and feature requests.
= 7.0.00 =
- Shortcode generators for Gutenberg added.
- This version addresses various minor bug fixes and feature requests.
- This version addresses various security issues.
- To prevent spamming and give the users the opportunity to decide when they want us to email them, the mailing system has been revised. Configure Table IX-M to enable various mailing lists, and use the WPPA+ Notify widget for full user flexibility.
= 6.9.21 =
- This version addresses various bug fixes
- This version addresses various security issues.
= 6.9.20 =
- This version addresses various bug fixes
= 6.9.19 =
- This version addresses various minor bug fixes
= 6.9.18 =
- This version addresses various minor bug fixes
= 6.9.17 =
- This version addresses various minor bug fixes and feature requests.
- This version addresses various security issues.
= 6.9.16 =
- This version addresses various minor bug fixes and feature requests.
- This version addresses various security issues.
= 6.9.15 =
- This version addresses various minor bug fixes and feature requests.
- This version addresses various security issues.
= 6.9.14 =
- This version addresses various minor bug fixes and feature requests.
- This version addresses various security issues.
= 6.9.13 =
- Security release.
= 6.9.12 =
- This version addresses various minor bug fixes and performance improvements.
= 6.9.11 =
- This version addresses various minor bug fixes and performance improvements.
= 6.9.10 =
- This version addresses various minor bug fixes and performance improvements.
= 6.9.09 =
- Panorama support phase III.
= 6.9.08 =
- This version addresses various minor bug fixes and feature requests.
- Panorama support phase II.
= 6.9.07 =
- This version addresses various minor bug fixes and feature requests.
- Panorama support phase I.
= 6.9.06 =
- This version addresses various minor bug fixes and feature requests.
= 6.9.05 =
- This version addresses various minor bug fixes and feature requests.
= 6.9.04 =
- This version addresses various minor bug fixes and feature requests.
- Local CDN functionality has been added.
= 6.9.03 =
- This version addresses various minor bug fixes and feature requests.
= 6.9.02 =
- This version addresses various minor bug fixes and feature requests.
= 6.9.01 =
- This version addresses various minor bug fixes and feature requests.
= 6.9.00 =
- This version includes the code for the privacy policy requirements.
= 6.8.09
- This version addresses various bug fixes and code edits.
= 6.8.08 =
- This version addresses various minor bug fixes and feature requests.
- This version offers substantial performance improvements when the box in Table IV-A13: Defer Javascript is ticked. This setting is now recommended and set ticked as the default.
- For more info on performance improvements and compatibility with optimizers: see the changelog.txt
= 6.8.07 =
- This version addresses various minor bug fixes and enhancements, and a new widget: Statistics.
= 6.8.06 =
- This version addresses various minor bug fixes and improved cache handling.
= 6.8.05 =
- This version addresses various minor bug fixes and feture requests.
= 6.8.04 =
- This version addresses various display issues and a few fixes of bugs that seldom affected the plugins behaviour.
Download this release
Release Info
Developer | opajaap |
Plugin | WP Photo Album Plus |
Version | 7.0.10.003 |
Comparing to | |
See all releases |
Code changes from version 7.0.09.009 to 7.0.10.003
- changelog.txt +5 -0
- readme.txt +6 -2
- wppa-ajax.php +3 -1
- wppa-cron.php +13 -11
- wppa-functions.php +2 -1
- wppa-index.php +2 -2
- wppa-links.php +4 -1
- wppa-mailing.php +38 -10
- wppa-setup.php +7 -1
- wppa-users.php +45 -1
- wppa-wpdb-update.php +3 -3
- wppa.php +3 -3
changelog.txt
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
WP Photo Album Plus Changelog
|
2 |
|
|
|
|
|
|
|
|
|
|
|
3 |
= 7.0.09 =
|
4 |
|
5 |
* Added a checkbox to the album widget to include (great)(grand)children.
|
1 |
WP Photo Album Plus Changelog
|
2 |
|
3 |
+
= 7.0.10 =
|
4 |
+
|
5 |
+
* Album and photo name slugs were not always updated on name change. Fixed.
|
6 |
+
* Hughe performance improvement for mailing commentnotify.
|
7 |
+
|
8 |
= 7.0.09 =
|
9 |
|
10 |
* Added a checkbox to the album widget to include (great)(grand)children.
|
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¤cy_code=USD&lc=US
|
4 |
Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
|
5 |
-
Version: 7.0.
|
6 |
-
Stable tag: 7.0.
|
7 |
Author: J.N. Breetvelt
|
8 |
Author URI: http://www.opajaap.nl/
|
9 |
Requires at least: 3.9
|
@@ -137,6 +137,10 @@ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documen
|
|
137 |
|
138 |
== Upgrade Notice ==
|
139 |
|
|
|
|
|
|
|
|
|
140 |
= 7.0.09 =
|
141 |
|
142 |
* This version addresses various security issues.
|
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¤cy_code=USD&lc=US
|
4 |
Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
|
5 |
+
Version: 7.0.10
|
6 |
+
Stable tag: 7.0.09.009
|
7 |
Author: J.N. Breetvelt
|
8 |
Author URI: http://www.opajaap.nl/
|
9 |
Requires at least: 3.9
|
137 |
|
138 |
== Upgrade Notice ==
|
139 |
|
140 |
+
= 7.0.10 =
|
141 |
+
|
142 |
+
* This version addresses various bug fixes
|
143 |
+
|
144 |
= 7.0.09 =
|
145 |
|
146 |
* This version addresses various security issues.
|
wppa-ajax.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-ajax.php
|
3 |
*
|
4 |
* Functions used in ajax requests
|
5 |
-
* Version 7.0.
|
6 |
*
|
7 |
*/
|
8 |
|
@@ -1474,6 +1474,7 @@ global $wppa_log_file;
|
|
1474 |
echo '||5||' . sprintf( __( 'Album name may not be empty.<br />Reset to %s' , 'wp-photo-album-plus'), $value );
|
1475 |
}
|
1476 |
$itemname = __( 'Name' , 'wp-photo-album-plus');
|
|
|
1477 |
break;
|
1478 |
case 'description':
|
1479 |
$itemname = __( 'Description' , 'wp-photo-album-plus');
|
@@ -2176,6 +2177,7 @@ global $wppa_log_file;
|
|
2176 |
case 'name':
|
2177 |
$value = strip_tags( $value );
|
2178 |
$itemname = __( 'Name', 'wp-photo-album-plus');
|
|
|
2179 |
break;
|
2180 |
case 'description':
|
2181 |
$itemname = __( 'Description', 'wp-photo-album-plus');
|
2 |
/* wppa-ajax.php
|
3 |
*
|
4 |
* Functions used in ajax requests
|
5 |
+
* Version 7.0.10
|
6 |
*
|
7 |
*/
|
8 |
|
1474 |
echo '||5||' . sprintf( __( 'Album name may not be empty.<br />Reset to %s' , 'wp-photo-album-plus'), $value );
|
1475 |
}
|
1476 |
$itemname = __( 'Name' , 'wp-photo-album-plus');
|
1477 |
+
wppa_update_album( array( 'id' => $album, 'name' => $value ) );
|
1478 |
break;
|
1479 |
case 'description':
|
1480 |
$itemname = __( 'Description' , 'wp-photo-album-plus');
|
2177 |
case 'name':
|
2178 |
$value = strip_tags( $value );
|
2179 |
$itemname = __( 'Name', 'wp-photo-album-plus');
|
2180 |
+
wppa_update_photo( array( 'id' => $photo, 'name' => $value ) );
|
2181 |
break;
|
2182 |
case 'description':
|
2183 |
$itemname = __( 'Description', 'wp-photo-album-plus');
|
wppa-cron.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all cron functions
|
6 |
-
* Version 7.0.
|
7 |
*
|
8 |
*
|
9 |
*/
|
@@ -330,18 +330,23 @@ global $wpdb;
|
|
330 |
foreach( $albs as $alb ) {
|
331 |
wppa_update_album( array( 'id' => $alb['id'], 'sname' => wppa_sanitize_album_photo_name( $alb['name'] ) ) );
|
332 |
wppa_log( 'dbg', 'Set sname from ' . $alb['name'] . ' to ' . wppa_sanitize_album_photo_name( $alb['name'] ) . ' for album ' . $alb['id'] );
|
|
|
|
|
|
|
|
|
333 |
}
|
334 |
}
|
335 |
wppa_log( 'Cron', 'Phase 10, time left = '.($endtime-time()) );
|
336 |
|
337 |
// Add url-sanitized names to new photos
|
338 |
-
$photos =
|
339 |
-
|
340 |
-
$photos
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
wppa_log( '
|
|
|
345 |
}
|
346 |
}
|
347 |
}
|
@@ -352,9 +357,6 @@ global $wpdb;
|
|
352 |
wppa_log( 'Cron', 'Phase 12, time left = '.($endtime-time()) );
|
353 |
|
354 |
// Done?
|
355 |
-
if ( ! empty( $photos ) ) {
|
356 |
-
wppa_schedule_cleanup( 'now' );
|
357 |
-
}
|
358 |
wppa_log( 'Cron', 'Phase 13, time left = '.($endtime-time()) );
|
359 |
|
360 |
wppa_log( 'Cron', '{b}wppa_cleanup{/b} completed.' );
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all cron functions
|
6 |
+
* Version 7.0.10
|
7 |
*
|
8 |
*
|
9 |
*/
|
330 |
foreach( $albs as $alb ) {
|
331 |
wppa_update_album( array( 'id' => $alb['id'], 'sname' => wppa_sanitize_album_photo_name( $alb['name'] ) ) );
|
332 |
wppa_log( 'dbg', 'Set sname from ' . $alb['name'] . ' to ' . wppa_sanitize_album_photo_name( $alb['name'] ) . ' for album ' . $alb['id'] );
|
333 |
+
if ( time() > $endtime ) {
|
334 |
+
wppa_log( 'Cron', 'Reschedule cleanup' );
|
335 |
+
wppa_schedule_cleanup( true );
|
336 |
+
}
|
337 |
}
|
338 |
}
|
339 |
wppa_log( 'Cron', 'Phase 10, time left = '.($endtime-time()) );
|
340 |
|
341 |
// Add url-sanitized names to new photos
|
342 |
+
$photos = $wpdb->get_results( "SELECT id, name FROM {$wpdb->wppa_photos} WHERE sname = '' AND name <> '' LIMIT 10000", ARRAY_A );
|
343 |
+
if ( ! empty( $photos ) ) {
|
344 |
+
foreach( $photos as $photo ) {
|
345 |
+
wppa_update_photo( array( 'id' => $photo['id'], 'sname' => wppa_sanitize_album_photo_name( $photo['name'] ) ) );
|
346 |
+
wppa_log( 'dbg', 'Set sname from ' . $photo['name'] . ' to ' . wppa_sanitize_album_photo_name( $photo['name'] ) . ' for photo ' . $photo['id'] );
|
347 |
+
if ( time() > $endtime ) {
|
348 |
+
wppa_log( 'Cron', 'Reschedule cleanup' );
|
349 |
+
wppa_schedule_cleanup( true );
|
350 |
}
|
351 |
}
|
352 |
}
|
357 |
wppa_log( 'Cron', 'Phase 12, time left = '.($endtime-time()) );
|
358 |
|
359 |
// Done?
|
|
|
|
|
|
|
360 |
wppa_log( 'Cron', 'Phase 13, time left = '.($endtime-time()) );
|
361 |
|
362 |
wppa_log( 'Cron', '{b}wppa_cleanup{/b} completed.' );
|
wppa-functions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various functions
|
6 |
-
* Version 7.0.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -4277,6 +4277,7 @@ global $allalbums;
|
|
4277 |
else {
|
4278 |
|
4279 |
// Find the best match
|
|
|
4280 |
foreach ( $albs as $alb ) {
|
4281 |
$aname = __( $alb['name'] ); // Possibly qTranslate translated
|
4282 |
$aname = str_replace( '\'', '%', $aname ); // A trick for single quotes
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various functions
|
6 |
+
* Version 7.0.10
|
7 |
*
|
8 |
*/
|
9 |
|
4277 |
else {
|
4278 |
|
4279 |
// Find the best match
|
4280 |
+
$aid = 0;
|
4281 |
foreach ( $albs as $alb ) {
|
4282 |
$aname = __( $alb['name'] ); // Possibly qTranslate translated
|
4283 |
$aname = str_replace( '\'', '%', $aname ); // A trick for single quotes
|
wppa-index.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all indexing functions
|
6 |
-
* Version 7.0.
|
7 |
*
|
8 |
*
|
9 |
*/
|
@@ -443,7 +443,7 @@ global $wpdb;
|
|
443 |
if ( $iam_big ) {
|
444 |
// This is not strictly correct, the may be 24..28 when searching for 26, this will be missed. However this will not lead to problems during search.
|
445 |
$indexes = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_index
|
446 |
-
WHERE photos LIKE %s", '%' . $wpdb->
|
447 |
}
|
448 |
else {
|
449 |
$indexes = $wpdb->get_results( "SELECT * FROM ".WPPA_INDEX." WHERE photos <> ''", ARRAY_A );
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all indexing functions
|
6 |
+
* Version 7.0.10
|
7 |
*
|
8 |
*
|
9 |
*/
|
443 |
if ( $iam_big ) {
|
444 |
// This is not strictly correct, the may be 24..28 when searching for 26, this will be missed. However this will not lead to problems during search.
|
445 |
$indexes = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_index
|
446 |
+
WHERE photos LIKE %s", '%' . $wpdb->esc_like( $id ) . '%' ), ARRAY_A );
|
447 |
}
|
448 |
else {
|
449 |
$indexes = $wpdb->get_results( "SELECT * FROM ".WPPA_INDEX." WHERE photos <> ''", ARRAY_A );
|
wppa-links.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Frontend links
|
6 |
-
* Version 7.0.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -1088,6 +1088,9 @@ function wppa_page_links( $npages = '1', $curpage = '1', $slide = false ) {
|
|
1088 |
if ( is_feed() ) {
|
1089 |
return;
|
1090 |
}
|
|
|
|
|
|
|
1091 |
|
1092 |
// Compose the Previous and Next Page urls
|
1093 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Frontend links
|
6 |
+
* Version 7.0.10
|
7 |
*
|
8 |
*/
|
9 |
|
1088 |
if ( is_feed() ) {
|
1089 |
return;
|
1090 |
}
|
1091 |
+
if ( ! $curpage ) {
|
1092 |
+
$curpage = '1';
|
1093 |
+
}
|
1094 |
|
1095 |
// Compose the Previous and Next Page urls
|
1096 |
|
wppa-mailing.php
CHANGED
@@ -239,7 +239,16 @@ global $wpdb;
|
|
239 |
// Get the photo owner
|
240 |
$owner = wppa_get_photo_item( $pho, 'owner' );
|
241 |
$owuser=get_user_by('login',$owner);
|
242 |
-
wppa_log('Eml', 'Owner login = '.$owner.', user id = '.$owuser->ID);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
|
244 |
// Get the photos album
|
245 |
if ( ! $alb ) {
|
@@ -252,21 +261,40 @@ global $wpdb;
|
|
252 |
return;
|
253 |
}
|
254 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
// Subject
|
256 |
$subj = sprintf( __( 'Comment on photo %s' , 'wp-photo-album-plus' ), wppa_get_photo_name( $comment['photo'] ) );
|
257 |
|
258 |
// The callback url if any
|
259 |
$link = get_option( 'wppa_mailinglist_callback_url', '' );
|
260 |
|
261 |
-
// The author
|
262 |
-
$author = get_user_by( 'login', $comment['user'] );
|
263 |
-
if ( $author ) {
|
264 |
-
$aut = $author->display_name;
|
265 |
-
}
|
266 |
-
else {
|
267 |
-
$aut = $comment['user'];
|
268 |
-
}
|
269 |
-
|
270 |
// The content
|
271 |
$cont = $aut . ' ' . __( 'wrote on photo' , 'wp-photo-album-plus') . ' ' . wppa_get_photo_name( $comment['photo'] ) . ':' .
|
272 |
'<blockquote style="color:#000077; background-color: #dddddd; border:1px solid black; padding: 6px; border-radius 4px;" >
|
239 |
// Get the photo owner
|
240 |
$owner = wppa_get_photo_item( $pho, 'owner' );
|
241 |
$owuser=get_user_by('login',$owner);
|
242 |
+
wppa_log('Eml', 'P Owner login = '.$owner.', user id = '.$owuser->ID);
|
243 |
+
|
244 |
+
// The author
|
245 |
+
$author = get_user_by( 'email', $comment['email'] );
|
246 |
+
if ( $author ) {
|
247 |
+
$aut = $author->display_name;
|
248 |
+
}
|
249 |
+
else {
|
250 |
+
$aut = $comment['user'];
|
251 |
+
}
|
252 |
|
253 |
// Get the photos album
|
254 |
if ( ! $alb ) {
|
261 |
return;
|
262 |
}
|
263 |
|
264 |
+
// If limited receivers activated, reduce subscriptionlist
|
265 |
+
if ( wppa_switch( 'commentnotify_limit' ) ) {
|
266 |
+
|
267 |
+
// Admins
|
268 |
+
// $admins = $wpdb->get_col( "SELECT user_id FROM $wpdb->usermeta WHERE meta_value LIKE '%" . $wpdb->esc_like( 'administrator' ) . "%'" );
|
269 |
+
// $admins = get_users( array( 'fields' => 'role', 'role' => 'administrator' ) );
|
270 |
+
$admins = wppa_get_admin_ids_a();
|
271 |
+
wppa_log( 'eml', 'admins ' . implode( ',', $admins ) );
|
272 |
+
|
273 |
+
// Photo owner
|
274 |
+
$powner = array( $owuser->ID );
|
275 |
+
wppa_log( 'eml', 'photo owner ' . $owuser->ID . ', ' . $owuser->user_login );
|
276 |
+
|
277 |
+
// Comment owner
|
278 |
+
$cowner = $author ? array( $author->ID ) : array();
|
279 |
+
wppa_log( 'eml', 'comment owner ' . $author->ID . ', ' . $author->user_login );
|
280 |
+
|
281 |
+
// Superusers
|
282 |
+
$susers = wppa_get_superuser_ids_a();
|
283 |
+
wppa_log( 'eml', 'superusers ' . implode( ',', $susers ) );
|
284 |
+
|
285 |
+
// All potential receipients
|
286 |
+
$all_potential = array_unique( array_merge( $admins, $powner, $cowner, $susers ), SORT_NUMERIC );
|
287 |
+
|
288 |
+
$userarray = array_intersect( $userarray, $all_potential );
|
289 |
+
wppa_log( 'eml', 'Potential receipients: ' . implode( ',', $all_potential ) . ', all subscribed potential: ' . implode( ',', $userarray ) );
|
290 |
+
}
|
291 |
+
|
292 |
// Subject
|
293 |
$subj = sprintf( __( 'Comment on photo %s' , 'wp-photo-album-plus' ), wppa_get_photo_name( $comment['photo'] ) );
|
294 |
|
295 |
// The callback url if any
|
296 |
$link = get_option( 'wppa_mailinglist_callback_url', '' );
|
297 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
298 |
// The content
|
299 |
$cont = $aut . ' ' . __( 'wrote on photo' , 'wp-photo-album-plus') . ' ' . wppa_get_photo_name( $comment['photo'] ) . ':' .
|
300 |
'<blockquote style="color:#000077; background-color: #dddddd; border:1px solid black; padding: 6px; border-radius 4px;" >
|
wppa-setup.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the setup stuff
|
6 |
-
* Version 7.0.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -595,6 +595,12 @@ global $wppa_error;
|
|
595 |
|
596 |
}
|
597 |
|
|
|
|
|
|
|
|
|
|
|
|
|
598 |
}
|
599 |
|
600 |
// Set Defaults
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the setup stuff
|
6 |
+
* Version 7.0.10
|
7 |
*
|
8 |
*/
|
9 |
|
595 |
|
596 |
}
|
597 |
|
598 |
+
if ( $old_rev <= '7010' ) {
|
599 |
+
$wpdb->query( "UPDATE $wpdb->wppa_albums SET sname = ''" );
|
600 |
+
$wpdb->query( "UPDATE $wpdb->wppa_photos SET sname = ''" );
|
601 |
+
wppa_schedule_cleanup( true );
|
602 |
+
}
|
603 |
+
|
604 |
}
|
605 |
|
606 |
// Set Defaults
|
wppa-users.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains user and capabilities related routines
|
6 |
-
* Version 7.0.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -408,4 +408,48 @@ function wppa_display_name( $owner ) {
|
|
408 |
}
|
409 |
|
410 |
return $user->display_name;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
411 |
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains user and capabilities related routines
|
6 |
+
* Version 7.0.10
|
7 |
*
|
8 |
*/
|
9 |
|
408 |
}
|
409 |
|
410 |
return $user->display_name;
|
411 |
+
}
|
412 |
+
|
413 |
+
// Get array of admin user ids
|
414 |
+
function wppa_get_admin_ids_a() {
|
415 |
+
global $wpdb;
|
416 |
+
|
417 |
+
$admins = $wpdb->get_col( $wpdb->prepare( "SELECT user_id
|
418 |
+
FROM $wpdb->usermeta
|
419 |
+
WHERE meta_key = 'wp_capabilities'
|
420 |
+
AND meta_value LIKE %s", '%' . $wpdb->esc_like( 'administrator' ) . '%' ) );
|
421 |
+
if ( is_array( $admins ) ) {
|
422 |
+
|
423 |
+
// Remove possble roles like 'xyzadministrator'
|
424 |
+
foreach( array_keys( $admins ) as $key ) {
|
425 |
+
if ( ! user_can( $admins[$key], 'administrator' ) ) {
|
426 |
+
unset( $admins[$key] );
|
427 |
+
}
|
428 |
+
}
|
429 |
+
}
|
430 |
+
else {
|
431 |
+
$admins = array();
|
432 |
+
}
|
433 |
+
|
434 |
+
return $admins;
|
435 |
+
}
|
436 |
+
|
437 |
+
// Get array of superuser ids
|
438 |
+
function wppa_get_superuser_ids_a() {
|
439 |
+
|
440 |
+
$susers = get_option( 'wppa_super_users', array() );
|
441 |
+
|
442 |
+
if ( is_array( $susers ) ) {
|
443 |
+
|
444 |
+
// Convert login names to user ids
|
445 |
+
foreach ( array_keys( $susers ) as $k ) {
|
446 |
+
$u = get_user_by( 'login', $susers[$k] );
|
447 |
+
$susers[$k] = $u->ID;
|
448 |
+
}
|
449 |
+
}
|
450 |
+
else {
|
451 |
+
$susers = array();
|
452 |
+
}
|
453 |
+
|
454 |
+
return $susers;
|
455 |
}
|
wppa-wpdb-update.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains low-level wpdb routines that update records
|
6 |
-
* Version 7.0.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -27,7 +27,7 @@ global $wpdb;
|
|
27 |
|
28 |
// If name update, also update sname
|
29 |
if ( isset( $args['name'] ) ) {
|
30 |
-
$args['sname'] = wppa_sanitize_album_photo_name( $args['name'] );
|
31 |
}
|
32 |
|
33 |
$need_re_index = false;
|
@@ -142,7 +142,7 @@ global $wpdb;
|
|
142 |
|
143 |
// If name update, also update sname
|
144 |
if ( isset( $args['name'] ) ) {
|
145 |
-
$args['sname'] = wppa_sanitize_album_photo_name( $args['name'] );
|
146 |
}
|
147 |
|
148 |
$need_re_index = false;
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains low-level wpdb routines that update records
|
6 |
+
* Version 7.0.10
|
7 |
*
|
8 |
*/
|
9 |
|
27 |
|
28 |
// If name update, also update sname
|
29 |
if ( isset( $args['name'] ) ) {
|
30 |
+
$args['sname'] = wppa_sanitize_album_photo_name( wppa_strip_tags( $args['name'] ) );
|
31 |
}
|
32 |
|
33 |
$need_re_index = false;
|
142 |
|
143 |
// If name update, also update sname
|
144 |
if ( isset( $args['name'] ) ) {
|
145 |
+
$args['sname'] = wppa_sanitize_album_photo_name( wppa_strip_tags( $args['name'] ) );
|
146 |
}
|
147 |
|
148 |
$need_re_index = false;
|
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: 7.0.
|
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/
|
@@ -22,8 +22,8 @@ global $wpdb;
|
|
22 |
global $wp_version;
|
23 |
|
24 |
/* WPPA GLOBALS */
|
25 |
-
global $wppa_revno; $wppa_revno = '
|
26 |
-
global $wppa_api_version; $wppa_api_version = '7.0.
|
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: 7.0.10.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/
|
22 |
global $wp_version;
|
23 |
|
24 |
/* WPPA GLOBALS */
|
25 |
+
global $wppa_revno; $wppa_revno = '7010'; // WPPA db version
|
26 |
+
global $wppa_api_version; $wppa_api_version = '7.0.10.003'; // WPPA software version
|
27 |
|
28 |
/* start timers */
|
29 |
global $wppa_starttime; $wppa_starttime = microtime( true );
|