Version Description
Download this release
Release Info
Developer | opajaap |
Plugin | WP Photo Album Plus |
Version | 6.6.23 |
Comparing to | |
See all releases |
Code changes from version 6.6.22 to 6.6.23
- readme.txt +8 -2
- wppa-ajax.php +3 -3
- wppa-common-functions.php +3 -3
- wppa-search-widget.php +30 -24
- wppa.php +3 -3
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, gallery, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick
|
5 |
-
Version: 6.6.
|
6 |
-
Stable tag: 6.6.
|
7 |
Author: J.N. Breetvelt
|
8 |
Author URI: http://www.opajaap.nl/
|
9 |
Requires at least: 3.9
|
@@ -180,6 +180,12 @@ Oh, just Google on 'picture resizer' and you will find a bunch of free programs
|
|
180 |
|
181 |
See for additional information: <a href="http://www.wppa.nl/changelog/" >The documentation website</a>
|
182 |
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
= 6.6.22 =
|
184 |
|
185 |
= Bug Fxes =
|
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, gallery, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick
|
5 |
+
Version: 6.6.23
|
6 |
+
Stable tag: 6.6.23
|
7 |
Author: J.N. Breetvelt
|
8 |
Author URI: http://www.opajaap.nl/
|
9 |
Requires at least: 3.9
|
180 |
|
181 |
See for additional information: <a href="http://www.wppa.nl/changelog/" >The documentation website</a>
|
182 |
|
183 |
+
= 6.6.23 =
|
184 |
+
|
185 |
+
= Bug Fixes =
|
186 |
+
|
187 |
+
* Fixed db version number
|
188 |
+
|
189 |
= 6.6.22 =
|
190 |
|
191 |
= Bug Fxes =
|
wppa-ajax.php
CHANGED
@@ -680,7 +680,7 @@ global $wppa_log_file;
|
|
680 |
$photo = wppa_decrypt_photo( $_REQUEST['wppa-rating-id'] );
|
681 |
$rating = $_REQUEST['wppa-rating'];
|
682 |
$occur = $_REQUEST['wppa-occur'];
|
683 |
-
$index = $_REQUEST['wppa-index'];
|
684 |
$nonce = $_REQUEST['wppa-nonce'];
|
685 |
|
686 |
// Make errortext
|
@@ -1925,7 +1925,7 @@ global $wppa_log_file;
|
|
1925 |
case 'delhour':
|
1926 |
case 'delmin':
|
1927 |
$itemname = __( 'Delete date/time' , 'wp-photo-album-plus');
|
1928 |
-
$scheduledel = $wpdb->get_var( $wpdb->prepare( "SELECT `scheduledel` FROM`".WPPA_PHOTOS."` WHERE `id` = %s", $photo ) );
|
1929 |
if ( ! $scheduledel ) {
|
1930 |
$scheduledel = wppa_get_default_scheduledtm();
|
1931 |
}
|
@@ -1939,7 +1939,7 @@ global $wppa_log_file;
|
|
1939 |
wppa_update_photo( array( 'id' => $photo, 'scheduledel' => $scheduledel ) );
|
1940 |
|
1941 |
// Make sure not deleted yet
|
1942 |
-
$alb = $wpdb->get_var( $wpdb->prepare( "SELECT `album` FROM`".WPPA_PHOTOS."` WHERE `id` = %s", $photo ) );
|
1943 |
if ( $alb < '-9' ) {
|
1944 |
$alb = - ( $alb + '9' );
|
1945 |
wppa_update_photo( array( 'id' => $photo, 'album' => $alb ) );
|
680 |
$photo = wppa_decrypt_photo( $_REQUEST['wppa-rating-id'] );
|
681 |
$rating = $_REQUEST['wppa-rating'];
|
682 |
$occur = $_REQUEST['wppa-occur'];
|
683 |
+
$index = isset( $_REQUEST['wppa-index'] ) ? $_REQUEST['wppa-index'] : '0';
|
684 |
$nonce = $_REQUEST['wppa-nonce'];
|
685 |
|
686 |
// Make errortext
|
1925 |
case 'delhour':
|
1926 |
case 'delmin':
|
1927 |
$itemname = __( 'Delete date/time' , 'wp-photo-album-plus');
|
1928 |
+
$scheduledel = $wpdb->get_var( $wpdb->prepare( "SELECT `scheduledel` FROM `".WPPA_PHOTOS."` WHERE `id` = %s", $photo ) );
|
1929 |
if ( ! $scheduledel ) {
|
1930 |
$scheduledel = wppa_get_default_scheduledtm();
|
1931 |
}
|
1939 |
wppa_update_photo( array( 'id' => $photo, 'scheduledel' => $scheduledel ) );
|
1940 |
|
1941 |
// Make sure not deleted yet
|
1942 |
+
$alb = $wpdb->get_var( $wpdb->prepare( "SELECT `album` FROM `".WPPA_PHOTOS."` WHERE `id` = %s", $photo ) );
|
1943 |
if ( $alb < '-9' ) {
|
1944 |
$alb = - ( $alb + '9' );
|
1945 |
wppa_update_photo( array( 'id' => $photo, 'album' => $alb ) );
|
wppa-common-functions.php
CHANGED
@@ -1828,7 +1828,7 @@ global $wpdb;
|
|
1828 |
if ( $last_check < ( time() - 300 ) ) { // Longer than 5 mins ago
|
1829 |
|
1830 |
// Publish scheduled photos
|
1831 |
-
$to_publish = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM`".WPPA_PHOTOS."` WHERE `status` = 'scheduled' AND `scheduledtm` < %s", wppa_get_default_scheduledtm() ), ARRAY_A );
|
1832 |
if ( $to_publish ) foreach( $to_publish as $photo ) {
|
1833 |
wppa_update_photo( array( 'id' => $photo['id'], 'scheduledtm' => '', 'status' => 'publish', 'timestamp' => time() ) );
|
1834 |
wppa_update_album( array( 'id' => $photo['album'], 'modified' => time() ) ); // For New indicator on album
|
@@ -1836,14 +1836,14 @@ global $wpdb;
|
|
1836 |
}
|
1837 |
|
1838 |
// Publish scheduled albums ( for future use, currently not implemented )
|
1839 |
-
$to_publish = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM`".WPPA_ALBUMS."` WHERE `scheduledtm` <> '' AND `scheduledtm` < %s", wppa_get_default_scheduledtm() ), ARRAY_A );
|
1840 |
if ( $to_publish ) foreach( $to_publish as $album ) {
|
1841 |
wppa_update_album( array( 'id' => $album['id'], 'scheduledtm' => '' ) );
|
1842 |
wppa_invalidate_treecounts( $album['id'] );
|
1843 |
}
|
1844 |
|
1845 |
// Delete photos scheduled for deletion
|
1846 |
-
$to_delete = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM`".WPPA_PHOTOS."` WHERE `scheduledel` <> '' AND `scheduledel` < %s", wppa_get_default_scheduledtm() ), ARRAY_A );
|
1847 |
if ( $to_delete ) foreach( $to_delete as $photo ) {
|
1848 |
wppa_delete_photo( $photo['id'] );
|
1849 |
}
|
1828 |
if ( $last_check < ( time() - 300 ) ) { // Longer than 5 mins ago
|
1829 |
|
1830 |
// Publish scheduled photos
|
1831 |
+
$to_publish = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM `".WPPA_PHOTOS."` WHERE `status` = 'scheduled' AND `scheduledtm` < %s", wppa_get_default_scheduledtm() ), ARRAY_A );
|
1832 |
if ( $to_publish ) foreach( $to_publish as $photo ) {
|
1833 |
wppa_update_photo( array( 'id' => $photo['id'], 'scheduledtm' => '', 'status' => 'publish', 'timestamp' => time() ) );
|
1834 |
wppa_update_album( array( 'id' => $photo['album'], 'modified' => time() ) ); // For New indicator on album
|
1836 |
}
|
1837 |
|
1838 |
// Publish scheduled albums ( for future use, currently not implemented )
|
1839 |
+
$to_publish = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM `".WPPA_ALBUMS."` WHERE `scheduledtm` <> '' AND `scheduledtm` < %s", wppa_get_default_scheduledtm() ), ARRAY_A );
|
1840 |
if ( $to_publish ) foreach( $to_publish as $album ) {
|
1841 |
wppa_update_album( array( 'id' => $album['id'], 'scheduledtm' => '' ) );
|
1842 |
wppa_invalidate_treecounts( $album['id'] );
|
1843 |
}
|
1844 |
|
1845 |
// Delete photos scheduled for deletion
|
1846 |
+
$to_delete = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM `".WPPA_PHOTOS."` WHERE `scheduledel` <> '' AND `scheduledel` < %s", wppa_get_default_scheduledtm() ), ARRAY_A );
|
1847 |
if ( $to_delete ) foreach( $to_delete as $photo ) {
|
1848 |
wppa_delete_photo( $photo['id'] );
|
1849 |
}
|
wppa-search-widget.php
CHANGED
@@ -3,28 +3,30 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the search widget
|
6 |
-
* Version 6.
|
7 |
*
|
8 |
*/
|
9 |
|
10 |
class SearchPhotos extends WP_Widget {
|
11 |
/** constructor */
|
12 |
function __construct() {
|
13 |
-
$widget_ops = array('classname' => 'wppa_search_photos',
|
14 |
-
|
|
|
|
|
15 |
}
|
16 |
|
17 |
/** @see WP_Widget::widget */
|
18 |
-
function widget($args, $instance) {
|
19 |
global $widget_content;
|
20 |
global $wpdb;
|
21 |
|
22 |
-
require_once(dirname(__FILE__) . '/wppa-links.php');
|
23 |
-
require_once(dirname(__FILE__) . '/wppa-styles.php');
|
24 |
-
require_once(dirname(__FILE__) . '/wppa-functions.php');
|
25 |
-
require_once(dirname(__FILE__) . '/wppa-thumbnails.php');
|
26 |
-
require_once(dirname(__FILE__) . '/wppa-boxes-html.php');
|
27 |
-
require_once(dirname(__FILE__) . '/wppa-slideshow.php');
|
28 |
wppa_initialize_runtime();
|
29 |
|
30 |
wppa( 'mocc', wppa( 'mocc' ) + 1 );
|
@@ -41,27 +43,31 @@ class SearchPhotos extends WP_Widget {
|
|
41 |
'landingpage' => '0',
|
42 |
) );
|
43 |
|
44 |
-
$widget_title = apply_filters('widget_title', $instance['title']);
|
45 |
|
46 |
// Display the widget
|
47 |
echo $before_widget;
|
48 |
|
49 |
-
if ( ! empty( $widget_title ) ) {
|
|
|
|
|
50 |
|
51 |
echo wppa_get_search_html( $instance['label'], $instance['sub'], $instance['root'], $instance['album'], $instance['landingpage'] );
|
52 |
|
53 |
echo $after_widget;
|
54 |
|
|
|
55 |
wppa( 'in_widget', false );
|
56 |
}
|
57 |
|
58 |
/** @see WP_Widget::update */
|
59 |
-
function update($new_instance, $old_instance) {
|
60 |
-
|
|
|
61 |
$instance['title'] = strip_tags($new_instance['title']);
|
62 |
$instance['label'] = $new_instance['label'];
|
63 |
-
$instance['root'] = $new_instance['root'];
|
64 |
-
$instance['sub'] = $new_instance['sub'];
|
65 |
$instance['album'] = $new_instance['album'];
|
66 |
$instance['landingpage'] = $new_instance['landingpage'];
|
67 |
|
@@ -72,7 +78,7 @@ class SearchPhotos extends WP_Widget {
|
|
72 |
function form( $instance ) {
|
73 |
global $wpdb;
|
74 |
|
75 |
-
//Defaults
|
76 |
$instance = wp_parse_args( (array) $instance,
|
77 |
array(
|
78 |
'title' => __( 'Search Photos', 'wp-photo-album-plus' ),
|
@@ -114,7 +120,7 @@ class SearchPhotos extends WP_Widget {
|
|
114 |
<br />
|
115 |
<?php _e('If you select an album here, it will overrule the previous checkbox using the album as a \'fixed\' root.', 'wp-photo-album-plus'); ?>
|
116 |
</small>
|
117 |
-
<select id="<?php echo $this->get_field_id('album'); ?>" name="<?php echo $this->get_field_name('album'); ?>" style="max-width:100%" >
|
118 |
<?php echo wppa_album_select_a( array( 'selected' => $album,
|
119 |
'addblank' => true,
|
120 |
'sort' => true,
|
@@ -124,16 +130,16 @@ class SearchPhotos extends WP_Widget {
|
|
124 |
</select>
|
125 |
</p>
|
126 |
<p>
|
127 |
-
<input type="checkbox" <?php if ( $sub ) echo 'checked="checked"' ?> id="<?php echo $this->get_field_id('sub'); ?>" name="<?php echo $this->get_field_name('sub'); ?>" />
|
128 |
<label for="<?php echo $this->get_field_id('sub'); ?>">
|
129 |
-
<?php _e('Enable subsearch', 'wp-photo-album-plus'); ?>
|
130 |
</label>
|
131 |
</p>
|
132 |
<p>
|
133 |
-
<label for="<?php echo $this->get_field_id('landingpage'); ?>" >
|
134 |
<?php _e( 'Landing page', 'wp-photo-album-plus' ); echo ': '.$landingpage ?>
|
135 |
</label>
|
136 |
-
<select id="<?php echo $this->get_field_id('landingpage'); ?>" name="<?php echo $this->get_field_name('landingpage'); ?>" style="max-width:100%" >
|
137 |
<?php
|
138 |
|
139 |
// First option
|
@@ -159,7 +165,7 @@ class SearchPhotos extends WP_Widget {
|
|
159 |
// Just translate
|
160 |
else {
|
161 |
foreach ( array_keys( $pages ) as $index ) {
|
162 |
-
$pages[$index]['post_title'] = __( stripslashes($pages[$index]['post_title']
|
163 |
}
|
164 |
}
|
165 |
|
@@ -195,5 +201,5 @@ class SearchPhotos extends WP_Widget {
|
|
195 |
add_action('widgets_init', 'wppa_register_SearchPhotos' );
|
196 |
|
197 |
function wppa_register_SearchPhotos() {
|
198 |
-
register_widget("SearchPhotos");
|
199 |
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the search widget
|
6 |
+
* Version 6.6.23
|
7 |
*
|
8 |
*/
|
9 |
|
10 |
class SearchPhotos extends WP_Widget {
|
11 |
/** constructor */
|
12 |
function __construct() {
|
13 |
+
$widget_ops = array( 'classname' => 'wppa_search_photos',
|
14 |
+
'description' => __( 'WPPA+ Search Photos', 'wp-photo-album-plus' )
|
15 |
+
);
|
16 |
+
parent::__construct( 'wppa_search_photos', __( 'Search Photos', 'wp-photo-album-plus' ), $widget_ops ); //
|
17 |
}
|
18 |
|
19 |
/** @see WP_Widget::widget */
|
20 |
+
function widget( $args, $instance ) {
|
21 |
global $widget_content;
|
22 |
global $wpdb;
|
23 |
|
24 |
+
require_once( dirname( __FILE__ ) . '/wppa-links.php' );
|
25 |
+
require_once( dirname( __FILE__ ) . '/wppa-styles.php' );
|
26 |
+
require_once( dirname( __FILE__ ) . '/wppa-functions.php' );
|
27 |
+
require_once( dirname( __FILE__ ) . '/wppa-thumbnails.php' );
|
28 |
+
require_once( dirname( __FILE__ ) . '/wppa-boxes-html.php' );
|
29 |
+
require_once( dirname( __FILE__ ) . '/wppa-slideshow.php' );
|
30 |
wppa_initialize_runtime();
|
31 |
|
32 |
wppa( 'mocc', wppa( 'mocc' ) + 1 );
|
43 |
'landingpage' => '0',
|
44 |
) );
|
45 |
|
46 |
+
$widget_title = apply_filters( 'widget_title', $instance['title'] );
|
47 |
|
48 |
// Display the widget
|
49 |
echo $before_widget;
|
50 |
|
51 |
+
if ( ! empty( $widget_title ) ) {
|
52 |
+
echo $before_title . $widget_title . $after_title;
|
53 |
+
}
|
54 |
|
55 |
echo wppa_get_search_html( $instance['label'], $instance['sub'], $instance['root'], $instance['album'], $instance['landingpage'] );
|
56 |
|
57 |
echo $after_widget;
|
58 |
|
59 |
+
// Reset switch
|
60 |
wppa( 'in_widget', false );
|
61 |
}
|
62 |
|
63 |
/** @see WP_Widget::update */
|
64 |
+
function update( $new_instance, $old_instance ) {
|
65 |
+
|
66 |
+
$instance = $old_instance;
|
67 |
$instance['title'] = strip_tags($new_instance['title']);
|
68 |
$instance['label'] = $new_instance['label'];
|
69 |
+
$instance['root'] = isset( $new_instance['root'] ) ? $new_instance['root'] : false;
|
70 |
+
$instance['sub'] = isset( $new_instance['sub'] ) ? $new_instance['sub'] : false;
|
71 |
$instance['album'] = $new_instance['album'];
|
72 |
$instance['landingpage'] = $new_instance['landingpage'];
|
73 |
|
78 |
function form( $instance ) {
|
79 |
global $wpdb;
|
80 |
|
81 |
+
// Defaults
|
82 |
$instance = wp_parse_args( (array) $instance,
|
83 |
array(
|
84 |
'title' => __( 'Search Photos', 'wp-photo-album-plus' ),
|
120 |
<br />
|
121 |
<?php _e('If you select an album here, it will overrule the previous checkbox using the album as a \'fixed\' root.', 'wp-photo-album-plus'); ?>
|
122 |
</small>
|
123 |
+
<select id="<?php echo $this->get_field_id( 'album' ); ?>" name="<?php echo $this->get_field_name( 'album' ); ?>" style="max-width:100%" >
|
124 |
<?php echo wppa_album_select_a( array( 'selected' => $album,
|
125 |
'addblank' => true,
|
126 |
'sort' => true,
|
130 |
</select>
|
131 |
</p>
|
132 |
<p>
|
133 |
+
<input type="checkbox" <?php if ( $sub ) echo 'checked="checked"' ?> id="<?php echo $this->get_field_id( 'sub' ); ?>" name="<?php echo $this->get_field_name( 'sub' ); ?>" />
|
134 |
<label for="<?php echo $this->get_field_id('sub'); ?>">
|
135 |
+
<?php _e( 'Enable subsearch', 'wp-photo-album-plus' ); ?>
|
136 |
</label>
|
137 |
</p>
|
138 |
<p>
|
139 |
+
<label for="<?php echo $this->get_field_id( 'landingpage' ); ?>" >
|
140 |
<?php _e( 'Landing page', 'wp-photo-album-plus' ); echo ': '.$landingpage ?>
|
141 |
</label>
|
142 |
+
<select id="<?php echo $this->get_field_id( 'landingpage' ); ?>" name="<?php echo $this->get_field_name( 'landingpage' ); ?>" style="max-width:100%" >
|
143 |
<?php
|
144 |
|
145 |
// First option
|
165 |
// Just translate
|
166 |
else {
|
167 |
foreach ( array_keys( $pages ) as $index ) {
|
168 |
+
$pages[$index]['post_title'] = __( stripslashes( $pages[$index]['post_title'] ) );
|
169 |
}
|
170 |
}
|
171 |
|
201 |
add_action('widgets_init', 'wppa_register_SearchPhotos' );
|
202 |
|
203 |
function wppa_register_SearchPhotos() {
|
204 |
+
register_widget( "SearchPhotos" );
|
205 |
}
|
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: 6.6.
|
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 = '6-6-
|
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: 6.6.23
|
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 = '6623'; // WPPA db version
|
26 |
+
global $wppa_api_version; $wppa_api_version = '6-6-23-001'; // WPPA software version
|
27 |
|
28 |
/* start timers */
|
29 |
global $wppa_starttime; $wppa_starttime = microtime(true);
|