Version Description
= 8.1.02 =
- 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.1.02.004 |
Comparing to | |
See all releases |
Code changes from version 8.1.02.003 to 8.1.02.004
- wppa-edit-sequence.php +2 -3
- wppa-edit-tags.php +84 -150
- wppa.php +2 -2
wppa-edit-sequence.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains the admin menu and startups the admin pages
|
6 |
-
* Version 8.1.02.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -37,8 +37,7 @@ function _wppa_edit_sequence() {
|
|
37 |
value="' . esc_attr( __( 'Go edit sequence', 'wp-photo-album-plus' ) ) . '"
|
38 |
/>
|
39 |
|
40 |
-
</div>
|
41 |
-
';
|
42 |
|
43 |
wppa_echo( $result );
|
44 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains the admin menu and startups the admin pages
|
6 |
+
* Version 8.1.02.004
|
7 |
*
|
8 |
*/
|
9 |
|
37 |
value="' . esc_attr( __( 'Go edit sequence', 'wp-photo-album-plus' ) ) . '"
|
38 |
/>
|
39 |
|
40 |
+
</div>';
|
|
|
41 |
|
42 |
wppa_echo( $result );
|
43 |
|
wppa-edit-tags.php
CHANGED
@@ -2,100 +2,121 @@
|
|
2 |
/* wppa-edit-tags.php
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
-
* Version 8.1.02.
|
6 |
*
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
10 |
|
11 |
-
|
12 |
function _wppa_edit_tags() {
|
13 |
|
14 |
-
//
|
15 |
if ( ! current_user_can( 'wppa_edit_tags' ) ) {
|
16 |
wp_die( 'Insuffucient rights' );
|
17 |
}
|
18 |
|
19 |
// Init
|
20 |
$iconurl = WPPA_URL . '/img/settings32.png';
|
|
|
|
|
21 |
$tags = wppa_get_taglist();
|
22 |
-
$opts = array(__('-select a tag-', 'wp-photo-album-plus'));
|
23 |
$vals = array( '' );
|
24 |
if ( $tags ) foreach( array_keys( $tags ) as $tag ) {
|
25 |
$opts[] = $tag;
|
26 |
$vals[] = $tag;
|
27 |
}
|
28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
$result = '
|
30 |
<div class="wrap">
|
31 |
<img id="icon-album" src="' . esc_url( $iconurl ) . '" />
|
32 |
<h1 style="display:inline" >' . __( 'Edit Photo Tag', 'wp-photo-album-plus' ) . '
|
33 |
<span style="font-size:0.5em;" >' . __( 'A subset of WP Photo Album Plus Settings', 'wp-photo-album-plus' ) . '</span>
|
34 |
-
</h1>
|
35 |
-
|
36 |
-
wp_nonce_field('wppa-nonce', 'wppa-nonce');
|
37 |
-
|
38 |
-
$result .= '
|
39 |
-
<div style="display:none;" >' .
|
40 |
-
wppa_edit_doit_button( 'dummy', 'dummy' ) . '
|
41 |
-
</div>
|
42 |
<input type="hidden" name="wppa-key" id="wppa-key" value="" />
|
43 |
<input type="hidden" name="wppa-sub" id="wppa-sub" value="" />
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
<
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
</div>';
|
96 |
|
97 |
wppa_echo( $result );
|
98 |
|
|
|
|
|
99 |
}
|
100 |
|
101 |
|
@@ -141,90 +162,3 @@ function wppa_tag_select( $options, $values ) {
|
|
141 |
|
142 |
return $result;
|
143 |
}
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
function wppa_edit_doit_button( $label = '', $key = '', $sub = '', $height = '18', $fontsize = '11' ) {
|
149 |
-
|
150 |
-
if ( $label == '' ) $label = __('Do it!', 'wp-photo-album-plus');
|
151 |
-
|
152 |
-
$result = '
|
153 |
-
<input
|
154 |
-
type="submit"
|
155 |
-
class="button-primary"
|
156 |
-
style="float:left;font-size:' . $fontsize . 'px;height:' . $height . 'px;margin: 0 4px; padding: 0px; line-height:12px;"
|
157 |
-
name="wppa_settings_submit"
|
158 |
-
value=" ' . $label . ' "
|
159 |
-
onclick="';
|
160 |
-
if ( $key ) $result .= 'document.getElementById(\'wppa-key\').value=\''.$key.'\';';
|
161 |
-
if ( $sub ) $result .= 'document.getElementById(\'wppa-sub\').value=\''.$sub.'\';';
|
162 |
-
$result .= 'if ( confirm(\''.__('Are you sure?', 'wp-photo-album-plus').'\')) return true; else return false;" />';
|
163 |
-
|
164 |
-
return $result;
|
165 |
-
}
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
function wppa_maintenance_edit_button( $slug ) {
|
173 |
-
|
174 |
-
$label = __( 'Start!', 'wp-photo-album-plus' );
|
175 |
-
$me = wppa_get_user();
|
176 |
-
$user = wppa_get_option( $slug.'_user', $me );
|
177 |
-
|
178 |
-
if ( $user && $user != $me ) {
|
179 |
-
$label = __('Locked!', 'wp-photo-album-plus');
|
180 |
-
$locked = true;
|
181 |
-
}
|
182 |
-
else {
|
183 |
-
$locked = false;
|
184 |
-
}
|
185 |
-
|
186 |
-
$result = '
|
187 |
-
<input
|
188 |
-
id="' . $slug . '_button"
|
189 |
-
type="button"
|
190 |
-
class="button-secundary"
|
191 |
-
style="float:left; border-radius:3px; font-size: 11px; height: 18px; margin: 0 4px; padding: 0 6px;"
|
192 |
-
value="' . esc_attr( $label ) . '"';
|
193 |
-
if ( ! $locked ) {
|
194 |
-
$result .= '
|
195 |
-
onclick="if ( jQuery(\'#' . $slug . '_status\').html() != \'\' || confirm(\'' . __( 'Are you sure?', 'wp-photo-album-plus' ) . '\') ) wppaMaintenanceProc(\'' . $slug . '\', false );"
|
196 |
-
/>';
|
197 |
-
}
|
198 |
-
else {
|
199 |
-
$result .= '
|
200 |
-
onclick="alert(\'Is currently being executed by '.$user.'.\')" />';
|
201 |
-
}
|
202 |
-
$result .= '
|
203 |
-
<input
|
204 |
-
id="' . $slug . '_continue"
|
205 |
-
type="hidden"
|
206 |
-
value="no"
|
207 |
-
/>';
|
208 |
-
|
209 |
-
return $result;
|
210 |
-
}
|
211 |
-
|
212 |
-
function wppa_edit_status_field( $slug ) {
|
213 |
-
$result = '<span id="'.$slug.'_status" >'.wppa_get_option( $slug.'_status', '' ).'</span>';
|
214 |
-
return $result;
|
215 |
-
}
|
216 |
-
|
217 |
-
function wppa_edit_togo_field( $slug ) {
|
218 |
-
$togo = wppa_get_option($slug.'_togo', '' );
|
219 |
-
$is_cron = wppa_get_option($slug.'_user', '' ) == 'cron-job';
|
220 |
-
$result = '<span id="'.$slug.'_togo" >' . $togo . '</span>';
|
221 |
-
if ( $togo || $is_cron ) {
|
222 |
-
$result .= '<script>wppaAjaxUpdateTogo(\'' . $slug . '\');</script>';
|
223 |
-
}
|
224 |
-
return $result;
|
225 |
-
}
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
2 |
/* wppa-edit-tags.php
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
+
* Version 8.1.02.004
|
6 |
*
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
10 |
|
|
|
11 |
function _wppa_edit_tags() {
|
12 |
|
13 |
+
// Legally here?
|
14 |
if ( ! current_user_can( 'wppa_edit_tags' ) ) {
|
15 |
wp_die( 'Insuffucient rights' );
|
16 |
}
|
17 |
|
18 |
// Init
|
19 |
$iconurl = WPPA_URL . '/img/settings32.png';
|
20 |
+
|
21 |
+
// Prepare taglist
|
22 |
$tags = wppa_get_taglist();
|
23 |
+
$opts = array( __( '-select a tag-', 'wp-photo-album-plus' ) );
|
24 |
$vals = array( '' );
|
25 |
if ( $tags ) foreach( array_keys( $tags ) as $tag ) {
|
26 |
$opts[] = $tag;
|
27 |
$vals[] = $tag;
|
28 |
}
|
29 |
|
30 |
+
// Find label and onclick for start button
|
31 |
+
$label = __( 'Start!', 'wp-photo-album-plus' );
|
32 |
+
$me = wppa_get_user();
|
33 |
+
$user = wppa_get_option( 'wppa_edit_tag_user', $me );
|
34 |
+
|
35 |
+
if ( $user && $user != $me ) {
|
36 |
+
$label = __( 'Locked!', 'wp-photo-album-plus' );
|
37 |
+
$locked = true;
|
38 |
+
$onclick = 'alert(\'Is currently being executed by ' . $user . '.\')';
|
39 |
+
}
|
40 |
+
else {
|
41 |
+
$locked = false;
|
42 |
+
$onclick = 'if(jQuery(\'#wppa_edit_tag_status\').html()!= \'\' || confirm(\'' . __( 'Are you sure?', 'wp-photo-album-plus' ) . '\') ) wppaMaintenanceProc(\'wppa_edit_tag\', false );';
|
43 |
+
}
|
44 |
+
|
45 |
$result = '
|
46 |
<div class="wrap">
|
47 |
<img id="icon-album" src="' . esc_url( $iconurl ) . '" />
|
48 |
<h1 style="display:inline" >' . __( 'Edit Photo Tag', 'wp-photo-album-plus' ) . '
|
49 |
<span style="font-size:0.5em;" >' . __( 'A subset of WP Photo Album Plus Settings', 'wp-photo-album-plus' ) . '</span>
|
50 |
+
</h1>
|
51 |
+
<input type="hidden" id="wppa-nonce" name="wppa-nonce" value="' . wp_create_nonce( 'wppa-nonce' ) . '" />
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
<input type="hidden" name="wppa-key" id="wppa-key" value="" />
|
53 |
<input type="hidden" name="wppa-sub" id="wppa-sub" value="" />
|
54 |
+
<table class="widefat wppa-table wppa-setting-table">
|
55 |
+
<thead style="font-weight: bold; " class="wppa_table_8">
|
56 |
+
<tr>
|
57 |
+
<td>' . __('Name', 'wp-photo-album-plus') . '</td>
|
58 |
+
<td>' . __('Description', 'wp-photo-album-plus') . '</td>
|
59 |
+
<td>' . __('Tag to change', 'wp-photo-album-plus') . '</td>
|
60 |
+
<td>' . __('Change into', 'wp-photo-album-plus') . '</td>
|
61 |
+
<td>' . __('Do it!', 'wp-photo-album-plus') . '</td>
|
62 |
+
<td>' . __('Status', 'wp-photo-album-plus') . '</td>
|
63 |
+
<td>' . __('To Go', 'wp-photo-album-plus') . '</td>
|
64 |
+
</tr>
|
65 |
+
</thead>
|
66 |
+
<tbody class="wppa_table_8">
|
67 |
+
<tr
|
68 |
+
class="wppa-setting" style="color:#333;"
|
69 |
+
>
|
70 |
+
<td>' . __( 'Edit tag', 'wp-photo-album-plus' ) . '</td>
|
71 |
+
<td>' . __( 'Globally change a tagname.', 'wp-photo-album-plus' ) . '</td>
|
72 |
+
<td>' .
|
73 |
+
wppa_tag_select( $opts, $vals, '', '', false, '', '600') . '
|
74 |
+
</td>
|
75 |
+
<td>
|
76 |
+
<input
|
77 |
+
id="new_tag_value"
|
78 |
+
type="text"
|
79 |
+
style="float:left;width:75%;height:20px;font-size:11px;margin:0;padding:0 0 0 6px;"
|
80 |
+
value="' . esc_attr( trim( wppa_get_option( 'wppa_new_tag_value' ), ',' ) ) . '"
|
81 |
+
onchange="wppaAjaxUpdateOptionValue(\'new_tag_value\',this);"
|
82 |
+
/>
|
83 |
+
<img
|
84 |
+
id="img_new_tag_value"
|
85 |
+
src="' . esc_url( wppa_get_imgdir() . 'star.ico' ) . '"
|
86 |
+
title="' . esc_attr( __( 'Setting unmodified', 'wp-photo-album-plus' ) ) . '"
|
87 |
+
style="padding:0 4px;float:left;height:16px;width:16px;"
|
88 |
+
/>
|
89 |
+
</td>
|
90 |
+
<td>
|
91 |
+
<input
|
92 |
+
id="wppa_edit_tag_button"
|
93 |
+
type="button"
|
94 |
+
class="button-secundary"
|
95 |
+
style="float:left; border-radius:3px; font-size: 11px; height: 18px; margin: 0 4px; padding: 0 6px;"
|
96 |
+
value="' . esc_attr( $label ) . '"
|
97 |
+
onclick="' . $onclick . '"
|
98 |
+
/>
|
99 |
+
<input
|
100 |
+
id="wppa_edit_tag_continue"
|
101 |
+
type="hidden"
|
102 |
+
value="no"
|
103 |
+
/>
|
104 |
+
</td>
|
105 |
+
<td>
|
106 |
+
<span id="wppa_edit_tag_status" >' . wppa_get_option( 'wppa_edit_tag_status' ) . '</span>
|
107 |
+
</td>
|
108 |
+
<td>
|
109 |
+
<span id="wppa_edit_tag_togo" >' . wppa_get_option( 'wppa_edit_tag_togo' ) . '</span>
|
110 |
+
</td>
|
111 |
+
</tr>
|
112 |
+
</tbody>
|
113 |
+
</table>
|
114 |
</div>';
|
115 |
|
116 |
wppa_echo( $result );
|
117 |
|
118 |
+
$the_js = 'jQuery(document).ready(function(){setTimeout(function(){wppaAjaxUpdateTogo(\'wppa_edit_tag\')}, 1000)})';
|
119 |
+
wppa_add_inline_script( 'wppa-admin', $the_js );
|
120 |
}
|
121 |
|
122 |
|
162 |
|
163 |
return $result;
|
164 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.02.
|
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.02.
|
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.02.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.1.02.004'; // WPPA software version
|
28 |
global $wppa_revno;
|
29 |
$wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
|
30 |
|