Version Description
= 8.1.08 =
- 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.08.004 |
Comparing to | |
See all releases |
Code changes from version 8.1.08.003 to 8.1.08.004
- changelog.txt +1 -0
- readme.txt +1 -1
- wppa-ajax.php +4 -4
- wppa-album-navigator-widget.php +16 -17
- wppa-boxes-html.php +21 -1
- wppa-functions.php +6 -1
- wppa-gutenberg-photo.php +2 -1
- wppa-setting-functions.php +29 -29
- wppa-settings-autosave.php +82 -87
- wppa-tinymce-common.php +2 -1
- wppa-wrappers.php +12 -1
- wppa.php +2 -2
changelog.txt
CHANGED
@@ -8,6 +8,7 @@ WP Photo Album Plus Changelog
|
|
8 |
* Added real calendare types to the shortcode generators.
|
9 |
* The albums in the selection lists in the shortcode generators are now including parents and alphabetically sorted
|
10 |
* New feature: Indicator of any users very first upload. See Advanced settings -> New -> I -> Items 4a, 7a and 9a
|
|
|
11 |
|
12 |
= 8.1.07 =
|
13 |
|
8 |
* Added real calendare types to the shortcode generators.
|
9 |
* The albums in the selection lists in the shortcode generators are now including parents and alphabetically sorted
|
10 |
* New feature: Indicator of any users very first upload. See Advanced settings -> New -> I -> Items 4a, 7a and 9a
|
11 |
+
* Admin and moderators will see a selectionbox in the fe upload box to overrule the default status during upload.
|
12 |
|
13 |
= 8.1.07 =
|
14 |
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, f
|
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 5.9
|
7 |
Requires PHP: 5.5
|
8 |
-
Stable tag: 8.1.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 5.9
|
7 |
Requires PHP: 5.5
|
8 |
+
Stable tag: 8.1.08.004
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
wppa-ajax.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-ajax.php
|
3 |
*
|
4 |
* Functions used in ajax requests
|
5 |
-
* Version 8.1.08.
|
6 |
*
|
7 |
*/
|
8 |
|
@@ -1047,19 +1047,19 @@ global $wppa;
|
|
1047 |
|
1048 |
case 'tinymcephotodialogfront':
|
1049 |
$result = wppa_make_tinymce_photo_dialog( 'front' );
|
1050 |
-
|
1051 |
wppa_exit();
|
1052 |
break;
|
1053 |
|
1054 |
case 'gutenbergphotodialog':
|
1055 |
$result = wppa_make_gutenberg_photo_dialog();
|
1056 |
-
|
1057 |
wppa_exit();
|
1058 |
break;
|
1059 |
|
1060 |
case 'gutenbergwppadialog':
|
1061 |
$result = wppa_make_gutenberg_wppa_dialog();
|
1062 |
-
|
1063 |
wppa_exit();
|
1064 |
break;
|
1065 |
|
2 |
/* wppa-ajax.php
|
3 |
*
|
4 |
* Functions used in ajax requests
|
5 |
+
* Version 8.1.08.004
|
6 |
*
|
7 |
*/
|
8 |
|
1047 |
|
1048 |
case 'tinymcephotodialogfront':
|
1049 |
$result = wppa_make_tinymce_photo_dialog( 'front' );
|
1050 |
+
wppa_echo( $result );
|
1051 |
wppa_exit();
|
1052 |
break;
|
1053 |
|
1054 |
case 'gutenbergphotodialog':
|
1055 |
$result = wppa_make_gutenberg_photo_dialog();
|
1056 |
+
wppa_echo( $result );
|
1057 |
wppa_exit();
|
1058 |
break;
|
1059 |
|
1060 |
case 'gutenbergwppadialog':
|
1061 |
$result = wppa_make_gutenberg_wppa_dialog();
|
1062 |
+
wppa_echo( $result );
|
1063 |
wppa_exit();
|
1064 |
break;
|
1065 |
|
wppa-album-navigator-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display album names linking to content
|
6 |
-
* Version 8.1.
|
7 |
*/
|
8 |
|
9 |
class AlbumNavigatorWidget extends WP_Widget {
|
@@ -37,9 +37,9 @@ class AlbumNavigatorWidget extends WP_Widget {
|
|
37 |
|
38 |
// Cache?
|
39 |
if ( $cache && wppa_is_file( $cachefile ) ) {
|
40 |
-
|
41 |
update_option( 'wppa_cache_hits', get_option( 'wppa_cache_hits', 0 ) +1 );
|
42 |
-
|
43 |
wppa( 'in_widget', false );
|
44 |
return;
|
45 |
}
|
@@ -78,8 +78,8 @@ class AlbumNavigatorWidget extends WP_Widget {
|
|
78 |
}
|
79 |
$result .= $widget_content . $after_widget;
|
80 |
|
81 |
-
|
82 |
-
|
83 |
|
84 |
// Cache?
|
85 |
if ( $cache ) {
|
@@ -89,7 +89,6 @@ class AlbumNavigatorWidget extends WP_Widget {
|
|
89 |
}
|
90 |
|
91 |
wppa( 'in_widget', false );
|
92 |
-
|
93 |
}
|
94 |
|
95 |
/** @see WP_Widget::update */
|
@@ -114,12 +113,12 @@ class AlbumNavigatorWidget extends WP_Widget {
|
|
114 |
$instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
|
115 |
|
116 |
// Title
|
117 |
-
|
118 |
-
wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) );
|
119 |
|
120 |
// This widget can not be used when there are too many albums
|
121 |
if ( wppa_has_many_albums() ) {
|
122 |
-
|
123 |
}
|
124 |
|
125 |
// Parent
|
@@ -149,21 +148,21 @@ class AlbumNavigatorWidget extends WP_Widget {
|
|
149 |
$disabled[] = false;
|
150 |
}
|
151 |
|
152 |
-
|
153 |
-
wppa_widget_selection( $this, 'parent', $instance['parent'], __( 'Album selection or Parent album', 'wp-photo-album-plus' ), $options, $values, $disabled );
|
154 |
|
155 |
// Skip empty
|
156 |
-
|
157 |
-
wppa_widget_checkbox( $this, 'skip', $instance['skip'], __( 'Skip "empty" albums', 'wp-photo-album-plus' ) );
|
158 |
}
|
159 |
|
160 |
// Loggedin only
|
161 |
-
|
162 |
-
wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) );
|
163 |
|
164 |
// Cache
|
165 |
-
|
166 |
-
wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) );
|
167 |
}
|
168 |
|
169 |
function get_widget_id() {
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display album names linking to content
|
6 |
+
* Version 8.1.08.004
|
7 |
*/
|
8 |
|
9 |
class AlbumNavigatorWidget extends WP_Widget {
|
37 |
|
38 |
// Cache?
|
39 |
if ( $cache && wppa_is_file( $cachefile ) ) {
|
40 |
+
wppa_echo( wppa_get_contents( $cachefile ) );
|
41 |
update_option( 'wppa_cache_hits', get_option( 'wppa_cache_hits', 0 ) +1 );
|
42 |
+
wppa_echo( wppa_widget_timer( 'show', $widget_title, true ) );
|
43 |
wppa( 'in_widget', false );
|
44 |
return;
|
45 |
}
|
78 |
}
|
79 |
$result .= $widget_content . $after_widget;
|
80 |
|
81 |
+
wppa_echo( wppa_compress_html( $result ) );
|
82 |
+
wppa_echo( wppa_widget_timer( 'show', $widget_title ) );
|
83 |
|
84 |
// Cache?
|
85 |
if ( $cache ) {
|
89 |
}
|
90 |
|
91 |
wppa( 'in_widget', false );
|
|
|
92 |
}
|
93 |
|
94 |
/** @see WP_Widget::update */
|
113 |
$instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
|
114 |
|
115 |
// Title
|
116 |
+
wppa_echo(
|
117 |
+
wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) ) );
|
118 |
|
119 |
// This widget can not be used when there are too many albums
|
120 |
if ( wppa_has_many_albums() ) {
|
121 |
+
wppa_echo( __( 'There are too many albums in the system for this widget', 'wp-photo-album-plus' ) );
|
122 |
}
|
123 |
|
124 |
// Parent
|
148 |
$disabled[] = false;
|
149 |
}
|
150 |
|
151 |
+
wppa_echo(
|
152 |
+
wppa_widget_selection( $this, 'parent', $instance['parent'], __( 'Album selection or Parent album', 'wp-photo-album-plus' ), $options, $values, $disabled ) );
|
153 |
|
154 |
// Skip empty
|
155 |
+
wppa_echo(
|
156 |
+
wppa_widget_checkbox( $this, 'skip', $instance['skip'], __( 'Skip "empty" albums', 'wp-photo-album-plus' ) ) );
|
157 |
}
|
158 |
|
159 |
// Loggedin only
|
160 |
+
wppa_echo(
|
161 |
+
wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) ) );
|
162 |
|
163 |
// Cache
|
164 |
+
wppa_echo(
|
165 |
+
wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) ) );
|
166 |
}
|
167 |
|
168 |
function get_widget_id() {
|
wppa-boxes-html.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various wppa boxes
|
6 |
-
* Version 8.1.08.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -3438,6 +3438,26 @@ static $albums_granted;
|
|
3438 |
}
|
3439 |
}
|
3440 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3441 |
/* The Blogit section */
|
3442 |
|
3443 |
if ( ( $where == 'widget' || $where == 'uploadbox' ) && current_user_can( 'edit_posts' ) && wppa_opt( 'blog_it' ) != '-none-' ) {
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various wppa boxes
|
6 |
+
* Version 8.1.08.004
|
7 |
*
|
8 |
*/
|
9 |
|
3438 |
}
|
3439 |
}
|
3440 |
|
3441 |
+
if ( current_user_can( 'wppa_moderate' ) ) {
|
3442 |
+
$default = wppa_opt( 'status_new' );
|
3443 |
+
if ( wppa_switch( 'fe_upload_private' ) ) {
|
3444 |
+
$default = 'private';
|
3445 |
+
}
|
3446 |
+
$head = __( 'Status', 'wp-photo-album-plus' ) . ':';
|
3447 |
+
$body = '
|
3448 |
+
<select
|
3449 |
+
id="wppa-user-status-' . $mocc . '"
|
3450 |
+
name="wppa-user-status"
|
3451 |
+
>
|
3452 |
+
<option value="publish"' . ( 'publish' == $default ? ' selected' : '' ) . '>' . __( 'Publish', 'wp-photo-album-plus' ) . '</option>
|
3453 |
+
<option value="pending"' . ( 'pending' == $default ? ' selected' : '' ) . '>' . __( 'Pending', 'wp-photo-album-plus' ) . '</option>
|
3454 |
+
<option value="featured"' . ( 'featured' == $default ? ' selected' : '' ) . '>' . __( 'Featured', 'wp-photo-album-plus' ) . '</option>
|
3455 |
+
<option value="private"' . ( 'private' == $default ? ' selected' : '' ) . '>' . __( 'Private', 'wp-photo-album-plus' ) . '</option>
|
3456 |
+
</select>';
|
3457 |
+
|
3458 |
+
$result .= wppa_get_dlg_item( $head, $body, $big );
|
3459 |
+
}
|
3460 |
+
|
3461 |
/* The Blogit section */
|
3462 |
|
3463 |
if ( ( $where == 'widget' || $where == 'uploadbox' ) && current_user_can( 'edit_posts' ) && wppa_opt( 'blog_it' ) != '-none-' ) {
|
wppa-functions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various functions
|
6 |
-
* Version 8.1.08.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -5315,6 +5315,11 @@ global $wppa_alert;
|
|
5315 |
$status = 'private';
|
5316 |
}
|
5317 |
|
|
|
|
|
|
|
|
|
|
|
5318 |
// see if audio / video and process
|
5319 |
if (
|
5320 |
// Video?
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various functions
|
6 |
+
* Version 8.1.08.004
|
7 |
*
|
8 |
*/
|
9 |
|
5315 |
$status = 'private';
|
5316 |
}
|
5317 |
|
5318 |
+
// Status may be overruled by uploading moderator
|
5319 |
+
if ( current_user_can( 'wppa_moderate' ) ) {
|
5320 |
+
$status = wppa_get( 'user-status', $status, 'text' );
|
5321 |
+
}
|
5322 |
+
|
5323 |
// see if audio / video and process
|
5324 |
if (
|
5325 |
// Video?
|
wppa-gutenberg-photo.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-gutenberg-photo.php
|
3 |
* Pachkage: wp-photo-album-plus
|
4 |
*
|
5 |
-
* Version 8.1.08.
|
6 |
*/
|
7 |
|
8 |
function wppa_gutenberg_photo_block() {
|
@@ -144,6 +144,7 @@ global $wpdb;
|
|
144 |
'addpleaseselect' => true,
|
145 |
'checkupload' => true,
|
146 |
'checkowner' => true,
|
|
|
147 |
) );
|
148 |
}
|
149 |
|
2 |
/* wppa-gutenberg-photo.php
|
3 |
* Pachkage: wp-photo-album-plus
|
4 |
*
|
5 |
+
* Version 8.1.08.004
|
6 |
*/
|
7 |
|
8 |
function wppa_gutenberg_photo_block() {
|
144 |
'addpleaseselect' => true,
|
145 |
'checkupload' => true,
|
146 |
'checkowner' => true,
|
147 |
+
'path' => true,
|
148 |
) );
|
149 |
}
|
150 |
|
wppa-setting-functions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
-
* Version 8.1.08.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -671,7 +671,7 @@ function wppa_search_magick( $root = '' ) {
|
|
671 |
// New style settings page master tab
|
672 |
function wppa_master_tab( $slug, $target, $caption, $active = false ) {
|
673 |
|
674 |
-
|
675 |
<li
|
676 |
id="wppa-master-tab-' . $slug . '"
|
677 |
class="' . ( $active ? 'active ' : '' ) . 'mtabli ' . $slug . '"
|
@@ -679,7 +679,7 @@ function wppa_master_tab( $slug, $target, $caption, $active = false ) {
|
|
679 |
style="background-color:' . ( $active ? '#ffffff;' : '#eeeeee;' ) . '"
|
680 |
>
|
681 |
' . $caption . '
|
682 |
-
</li>';
|
683 |
}
|
684 |
|
685 |
// New style settings page selection tab html
|
@@ -688,7 +688,7 @@ global $wppa_cur_tab;
|
|
688 |
|
689 |
$active = $wppa_cur_tab == $slug;
|
690 |
|
691 |
-
|
692 |
<li
|
693 |
id="wppa-setting-tab-' . $slug . '"
|
694 |
class="' . ( $active ? 'active ' : '' ) . 'tabli ' . $slug . '"
|
@@ -696,7 +696,7 @@ global $wppa_cur_tab;
|
|
696 |
style="' . ( $show ? '' : 'display:none;' ) . 'background-color:' . ( $active ? '#ffffff;' : '#eeeeee;' ) . '"
|
697 |
>
|
698 |
' . $caption . '
|
699 |
-
</li>';
|
700 |
}
|
701 |
|
702 |
// New style setting
|
@@ -797,37 +797,34 @@ global $wppa_setting_error;
|
|
797 |
}
|
798 |
|
799 |
// Start the item
|
800 |
-
|
801 |
'<tr
|
802 |
id="wppa-setting-item-' . $item_id . '"
|
803 |
class="wppa-setting-new ' . $item_id . '"
|
804 |
style="color:#333;background-color:' . $bgcolor . ';' .
|
805 |
( $show ? '' : 'display:none;' ) .
|
806 |
'"
|
807 |
-
>'
|
808 |
|
809 |
// The item number
|
810 |
-
|
811 |
-
<td>' . $xnum . '</td>';
|
812 |
|
813 |
// The Item name
|
814 |
-
|
815 |
-
<td>' . $name . '</td>';
|
816 |
|
817 |
// The item description
|
818 |
-
|
819 |
-
<td><small>' . $desc . '</small></td>';
|
820 |
|
821 |
// The html
|
822 |
if ( $htmls ) foreach ( $htmls as $html ) {
|
823 |
-
|
824 |
}
|
825 |
else {
|
826 |
-
|
827 |
}
|
828 |
|
829 |
// The helpbutton
|
830 |
-
|
831 |
<td>
|
832 |
<input
|
833 |
type="button"
|
@@ -843,15 +840,14 @@ global $wppa_setting_error;
|
|
843 |
}"
|
844 |
value=" ? "
|
845 |
/>
|
846 |
-
</td>'
|
847 |
|
848 |
// Close item
|
849 |
-
|
850 |
-
</tr>';
|
851 |
|
852 |
// The Helptext
|
853 |
if ( $help ) {
|
854 |
-
|
855 |
<tr
|
856 |
id="help-' . $item_id . '"
|
857 |
class="wppa-setting-new"
|
@@ -873,6 +869,8 @@ global $wppa_setting_error;
|
|
873 |
<td></td>
|
874 |
</tr>';
|
875 |
}
|
|
|
|
|
876 |
}
|
877 |
|
878 |
// The tab description
|
@@ -900,7 +898,7 @@ global $wppa_cur_subtab_id;
|
|
900 |
});';
|
901 |
wppa_add_inline_script( 'wppa-admin', $the_js );
|
902 |
|
903 |
-
|
904 |
<div
|
905 |
class="wppa-tabdesc wppa-tabdesc-' . $wppa_cur_subtab . ' ' . $wppa_cur_subtab_id . '"
|
906 |
style="text-align:center;border-bottom:1px solid darkgrey;cursor:pointer;"
|
@@ -915,9 +913,9 @@ global $wppa_cur_subtab_id;
|
|
915 |
id="' . $wppa_cur_subtab . '-cm"
|
916 |
style="color:red;display:none;"
|
917 |
>' .
|
918 |
-
__('Click to toggle open / close', 'wp-photo-album-plus' ) . '
|
919 |
</span>
|
920 |
-
</div>';
|
921 |
}
|
922 |
|
923 |
// The new style setting box header
|
@@ -952,7 +950,7 @@ global $wppa_cur_subtab;
|
|
952 |
});';
|
953 |
wppa_add_inline_script( 'wppa-admin', $the_js );
|
954 |
|
955 |
-
|
956 |
<div
|
957 |
id="' . $wppa_cur_subtab . '"
|
958 |
class="wppa-setting-content ' . $wppa_cur_subtab . '"
|
@@ -962,27 +960,29 @@ global $wppa_cur_subtab;
|
|
962 |
|
963 |
<colgroup>';
|
964 |
foreach( $cols as $size ) {
|
965 |
-
|
966 |
}
|
967 |
-
|
968 |
</colgroup>
|
969 |
|
970 |
<thead style="font-weight: bold;" >
|
971 |
<tr>';
|
972 |
foreach( array_keys( $cols ) as $caption ) {
|
973 |
-
|
974 |
}
|
975 |
-
|
976 |
</tr>
|
977 |
</thead>
|
978 |
|
979 |
<tbody class="wppa_table_' . $tab . '" >';
|
980 |
|
|
|
|
|
981 |
}
|
982 |
|
983 |
// The new style setting box footer
|
984 |
function wppa_setting_box_footer_new() {
|
985 |
-
|
986 |
}
|
987 |
|
988 |
function wppa_need_page( $slug ) {
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
+
* Version 8.1.08.004
|
7 |
*
|
8 |
*/
|
9 |
|
671 |
// New style settings page master tab
|
672 |
function wppa_master_tab( $slug, $target, $caption, $active = false ) {
|
673 |
|
674 |
+
wppa_echo( '
|
675 |
<li
|
676 |
id="wppa-master-tab-' . $slug . '"
|
677 |
class="' . ( $active ? 'active ' : '' ) . 'mtabli ' . $slug . '"
|
679 |
style="background-color:' . ( $active ? '#ffffff;' : '#eeeeee;' ) . '"
|
680 |
>
|
681 |
' . $caption . '
|
682 |
+
</li>' );
|
683 |
}
|
684 |
|
685 |
// New style settings page selection tab html
|
688 |
|
689 |
$active = $wppa_cur_tab == $slug;
|
690 |
|
691 |
+
wppa_echo( '
|
692 |
<li
|
693 |
id="wppa-setting-tab-' . $slug . '"
|
694 |
class="' . ( $active ? 'active ' : '' ) . 'tabli ' . $slug . '"
|
696 |
style="' . ( $show ? '' : 'display:none;' ) . 'background-color:' . ( $active ? '#ffffff;' : '#eeeeee;' ) . '"
|
697 |
>
|
698 |
' . $caption . '
|
699 |
+
</li>' );
|
700 |
}
|
701 |
|
702 |
// New style setting
|
797 |
}
|
798 |
|
799 |
// Start the item
|
800 |
+
$result =
|
801 |
'<tr
|
802 |
id="wppa-setting-item-' . $item_id . '"
|
803 |
class="wppa-setting-new ' . $item_id . '"
|
804 |
style="color:#333;background-color:' . $bgcolor . ';' .
|
805 |
( $show ? '' : 'display:none;' ) .
|
806 |
'"
|
807 |
+
>' .
|
808 |
|
809 |
// The item number
|
810 |
+
'<td>' . $xnum . '</td>' .
|
|
|
811 |
|
812 |
// The Item name
|
813 |
+
'<td>' . $name . '</td>' .
|
|
|
814 |
|
815 |
// The item description
|
816 |
+
'<td><small>' . $desc . '</small></td>';
|
|
|
817 |
|
818 |
// The html
|
819 |
if ( $htmls ) foreach ( $htmls as $html ) {
|
820 |
+
$result .= '<td>' . $html . '</td>';
|
821 |
}
|
822 |
else {
|
823 |
+
$result .= '<td></td>';
|
824 |
}
|
825 |
|
826 |
// The helpbutton
|
827 |
+
$result .= '
|
828 |
<td>
|
829 |
<input
|
830 |
type="button"
|
840 |
}"
|
841 |
value=" ? "
|
842 |
/>
|
843 |
+
</td>' .
|
844 |
|
845 |
// Close item
|
846 |
+
'</tr>';
|
|
|
847 |
|
848 |
// The Helptext
|
849 |
if ( $help ) {
|
850 |
+
$result .= '
|
851 |
<tr
|
852 |
id="help-' . $item_id . '"
|
853 |
class="wppa-setting-new"
|
869 |
<td></td>
|
870 |
</tr>';
|
871 |
}
|
872 |
+
|
873 |
+
wppa_echo( $result );
|
874 |
}
|
875 |
|
876 |
// The tab description
|
898 |
});';
|
899 |
wppa_add_inline_script( 'wppa-admin', $the_js );
|
900 |
|
901 |
+
wppa_echo( '
|
902 |
<div
|
903 |
class="wppa-tabdesc wppa-tabdesc-' . $wppa_cur_subtab . ' ' . $wppa_cur_subtab_id . '"
|
904 |
style="text-align:center;border-bottom:1px solid darkgrey;cursor:pointer;"
|
913 |
id="' . $wppa_cur_subtab . '-cm"
|
914 |
style="color:red;display:none;"
|
915 |
>' .
|
916 |
+
__( 'Click to toggle open / close', 'wp-photo-album-plus' ) . '
|
917 |
</span>
|
918 |
+
</div>' );
|
919 |
}
|
920 |
|
921 |
// The new style setting box header
|
950 |
});';
|
951 |
wppa_add_inline_script( 'wppa-admin', $the_js );
|
952 |
|
953 |
+
$result = '
|
954 |
<div
|
955 |
id="' . $wppa_cur_subtab . '"
|
956 |
class="wppa-setting-content ' . $wppa_cur_subtab . '"
|
960 |
|
961 |
<colgroup>';
|
962 |
foreach( $cols as $size ) {
|
963 |
+
$result .= '<col style="width: ' . $size . '" >';
|
964 |
}
|
965 |
+
$result .= '
|
966 |
</colgroup>
|
967 |
|
968 |
<thead style="font-weight: bold;" >
|
969 |
<tr>';
|
970 |
foreach( array_keys( $cols ) as $caption ) {
|
971 |
+
$result .= '<td>' . $caption . '</td>';
|
972 |
}
|
973 |
+
$result .= '
|
974 |
</tr>
|
975 |
</thead>
|
976 |
|
977 |
<tbody class="wppa_table_' . $tab . '" >';
|
978 |
|
979 |
+
wppa_echo( $result );
|
980 |
+
|
981 |
}
|
982 |
|
983 |
// The new style setting box footer
|
984 |
function wppa_setting_box_footer_new() {
|
985 |
+
wppa_echo( '</tbody></table></div>' );
|
986 |
}
|
987 |
|
988 |
function wppa_need_page( $slug ) {
|
wppa-settings-autosave.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
-
* Version 8.1.08.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -299,37 +299,37 @@ global $wppa_subtab_names;
|
|
299 |
// Fix invalid source path
|
300 |
wppa_fix_source_path();
|
301 |
|
302 |
-
|
303 |
-
|
304 |
wppa_admin_spinner();
|
305 |
$iconurl = WPPA_URL.'/img/settings32.png';
|
306 |
|
307 |
// General header
|
308 |
-
|
309 |
-
<img id="icon-album" src="'
|
310 |
-
<h1 style="display:inline" >' . __('WP Photo Album Plus Settings', 'wp-photo-album-plus' ) . '
|
311 |
-
<span style="color:blue;"> ' . __('Auto Save', 'wp-photo-album-plus' ). '</span>
|
312 |
-
</h1>';
|
313 |
if ( current_user_can( 'administrator' ) ) {
|
314 |
-
|
315 |
__( 'Database revision:', 'wp-photo-album-plus' ) . ' ' . wppa_get_option( 'wppa_revision', '100') . '. ' .
|
316 |
__( 'WP Charset:', 'wp-photo-album-plus' ) . ' ' . get_bloginfo( 'charset' ) . '. ' .
|
317 |
__( 'Current PHP version:', 'wp-photo-album-plus' ) . ' ' . phpversion() . '. ' .
|
318 |
__( 'WPPA+ API Version:', 'wp-photo-album-plus' ) . ' ' . $wppa_api_version . '. ' .
|
319 |
-
__( 'Filesystem method:', 'wp-photo-album-plus' ) . ' ' . get_filesystem_method();
|
320 |
}
|
321 |
-
|
322 |
-
<br>';
|
323 |
|
324 |
if ( is_multisite() ) {
|
325 |
if ( WPPA_MULTISITE_GLOBAL ) {
|
326 |
-
|
327 |
}
|
328 |
else {
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
|
|
333 |
}
|
334 |
}
|
335 |
|
@@ -507,12 +507,12 @@ global $wppa_subtab_names;
|
|
507 |
}
|
508 |
}
|
509 |
else {
|
510 |
-
$opts_page[] = __('--- No page to link to (yet) ---', 'wp-photo-album-plus' );
|
511 |
$vals_page[] = '0';
|
512 |
}
|
513 |
|
514 |
$opts_page_auto = $opts_page;
|
515 |
-
$opts_page_auto[0] = __('--- Will be auto created ---', 'wp-photo-album-plus' );
|
516 |
}
|
517 |
|
518 |
// Find matching master tab
|
@@ -549,14 +549,14 @@ global $wppa_subtab_names;
|
|
549 |
}
|
550 |
|
551 |
// The master header selectors
|
552 |
-
|
553 |
wppa_master_tab( 'basic', 'general', __( 'Basic settings', 'wp-photo-album-plus' ), $basic );
|
554 |
wppa_master_tab( 'advanced', 'generaladv', __( 'Advanced settings', 'wp-photo-album-plus' ), $advan );
|
555 |
-
|
556 |
|
557 |
// The tabs
|
558 |
{
|
559 |
-
|
560 |
wppa_setting_tab( 'general', $wppa_tab_names['general'], $basic );
|
561 |
wppa_setting_tab( 'generaladv', $wppa_tab_names['generaladv'], $advan );
|
562 |
wppa_setting_tab( 'layout', $wppa_tab_names['layout'], $basic );
|
@@ -586,11 +586,11 @@ global $wppa_subtab_names;
|
|
586 |
wppa_setting_tab( 'constants', $wppa_tab_names['constants'], $advan );
|
587 |
wppa_setting_tab( 'misc', $wppa_tab_names['misc'], $basic );
|
588 |
wppa_setting_tab( 'miscadv', $wppa_tab_names['miscadv'], $advan );
|
589 |
-
|
590 |
}
|
591 |
|
592 |
// For layout we need a clear
|
593 |
-
|
594 |
|
595 |
// The js
|
596 |
{
|
@@ -694,8 +694,7 @@ global $wppa_subtab_names;
|
|
694 |
}
|
695 |
|
696 |
// Open the content area
|
697 |
-
|
698 |
-
<div id="wppa-setting-content" style="display:none;clear:both;" >';
|
699 |
|
700 |
// Dispatch on tab
|
701 |
switch($tab) {
|
@@ -1357,7 +1356,7 @@ global $wppa_subtab_names;
|
|
1357 |
$slug = array($slug1, $slug2, $slug3, $slug4);
|
1358 |
$html1 = wppa_input($slug1, '90%', '200px', '');
|
1359 |
$html2 = wppa_input($slug2, '40px', '', __('pixels', 'wp-photo-album-plus' ));
|
1360 |
-
$html3 = wppa_input($slug3, '
|
1361 |
$html4 = wppa_select($slug4, $opts, $vals);
|
1362 |
$html = array($html1, $html2, $html3, $html4);
|
1363 |
wppa_setting_new($slug, '1', $name, $desc, $html, $help);
|
@@ -1372,7 +1371,7 @@ global $wppa_subtab_names;
|
|
1372 |
$slug = array($slug1, $slug2, $slug3, $slug4);
|
1373 |
$html1 = wppa_input($slug1, '90%', '200px', '');
|
1374 |
$html2 = wppa_input($slug2, '40px', '', __('pixels', 'wp-photo-album-plus' ));
|
1375 |
-
$html3 = wppa_input($slug3, '
|
1376 |
$html4 = wppa_select($slug4, $opts, $vals);
|
1377 |
$html = array($html1, $html2, $html3, $html4);
|
1378 |
wppa_setting_new($slug, '2', $name, $desc, $html, $help);
|
@@ -1387,7 +1386,7 @@ global $wppa_subtab_names;
|
|
1387 |
$slug = array($slug1, $slug2, $slug3, $slug4);
|
1388 |
$html1 = wppa_input($slug1, '90%', '200px', '');
|
1389 |
$html2 = wppa_input($slug2, '40px', '', __('pixels', 'wp-photo-album-plus' ));
|
1390 |
-
$html3 = wppa_input($slug3, '
|
1391 |
$html4 = wppa_select($slug4, $opts, $vals);
|
1392 |
$html = array($html1, $html2, $html3, $html4);
|
1393 |
wppa_setting_new($slug, '3', $name, $desc, $html, $help);
|
@@ -1402,7 +1401,7 @@ global $wppa_subtab_names;
|
|
1402 |
$slug = array($slug1, $slug2, $slug3, $slug4);
|
1403 |
$html1 = wppa_input($slug1, '90%', '200px', '');
|
1404 |
$html2 = wppa_input($slug2, '40px', '', __('pixels', 'wp-photo-album-plus' ));
|
1405 |
-
$html3 = wppa_input($slug3, '
|
1406 |
$html4 = wppa_select($slug4, $opts, $vals);
|
1407 |
$html = array($html1, $html2, $html3, $html4);
|
1408 |
wppa_setting_new($slug, '4', $name, $desc, $html, $help);
|
@@ -1417,7 +1416,7 @@ global $wppa_subtab_names;
|
|
1417 |
$slug = array($slug1, $slug2, $slug3, $slug4);
|
1418 |
$html1 = wppa_input($slug1, '90%', '200px', '');
|
1419 |
$html2 = wppa_input($slug2, '40px', '', __('pixels', 'wp-photo-album-plus' ));
|
1420 |
-
$html3 = wppa_input($slug3, '
|
1421 |
$html4 = wppa_select($slug4, $opts, $vals);
|
1422 |
$html = array($html1, $html2, $html3, $html4);
|
1423 |
wppa_setting_new($slug, '5', $name, $desc, $html, $help);
|
@@ -1432,7 +1431,7 @@ global $wppa_subtab_names;
|
|
1432 |
$slug = array($slug1, $slug2, $slug3, $slug4);
|
1433 |
$html1 = wppa_input($slug1, '90%', '200px', '');
|
1434 |
$html2 = wppa_input($slug2, '40px', '', __('pixels', 'wp-photo-album-plus' ));
|
1435 |
-
$html3 = wppa_input($slug3, '
|
1436 |
$html4 = wppa_select($slug4, $opts, $vals);
|
1437 |
$html = array($html1, $html2, $html3, $html4);
|
1438 |
wppa_setting_new($slug, '6', $name, $desc, $html, $help);
|
@@ -1447,7 +1446,7 @@ global $wppa_subtab_names;
|
|
1447 |
$slug = array($slug1, $slug2, $slug3, $slug4);
|
1448 |
$html1 = wppa_input($slug1, '90%', '200px', '');
|
1449 |
$html2 = wppa_input($slug2, '40px', '', __('pixels', 'wp-photo-album-plus' ));
|
1450 |
-
$html3 = wppa_input($slug3, '
|
1451 |
$html4 = wppa_select($slug4, $opts, $vals);
|
1452 |
$html = array($html1, $html2, $html3, $html4);
|
1453 |
wppa_setting_new($slug, '7', $name, $desc, $html, $help);
|
@@ -1462,7 +1461,7 @@ global $wppa_subtab_names;
|
|
1462 |
$slug = array($slug1, $slug2, $slug3, $slug4);
|
1463 |
$html1 = wppa_input($slug1, '90%', '200px', '');
|
1464 |
$html2 = wppa_input($slug2, '40px', '', __('pixels', 'wp-photo-album-plus' ));
|
1465 |
-
$html3 = wppa_input($slug3, '
|
1466 |
$html4 = wppa_select($slug4, $opts, $vals);
|
1467 |
$html = array($html1, $html2, $html3, $html4);
|
1468 |
wppa_setting_new($slug, '8', $name, $desc, $html, $help);
|
@@ -1477,7 +1476,7 @@ global $wppa_subtab_names;
|
|
1477 |
$slug = array($slug1, $slug2, $slug3, $slug4);
|
1478 |
$html1 = wppa_input($slug1, '90%', '200px', '');
|
1479 |
$html2 = wppa_input($slug2, '40px', '', __('pixels', 'wp-photo-album-plus' ));
|
1480 |
-
$html3 = wppa_input($slug3, '
|
1481 |
$html4 = wppa_select($slug4, $opts, $vals);
|
1482 |
$html = array($html1, $html2, $html3, $html4);
|
1483 |
wppa_setting_new($slug, '9', $name, $desc, $html, $help);
|
@@ -2294,7 +2293,7 @@ global $wppa_subtab_names;
|
|
2294 |
|
2295 |
// The potd photo pool
|
2296 |
if ( wppa_switch( 'potd_preview' ) ) {
|
2297 |
-
|
2298 |
<table class="widefat wppa-table wppa-setting-table" >
|
2299 |
<thead>
|
2300 |
<tr>
|
@@ -2305,7 +2304,7 @@ global $wppa_subtab_names;
|
|
2305 |
</thead>
|
2306 |
<tbody>
|
2307 |
<tr>
|
2308 |
-
<td>';
|
2309 |
|
2310 |
// Get the photos
|
2311 |
$alb = wppa_opt( 'potd_album' );
|
@@ -2320,10 +2319,10 @@ global $wppa_subtab_names;
|
|
2320 |
|
2321 |
// See if we do this
|
2322 |
if ( empty( $photos ) ) {
|
2323 |
-
|
2324 |
}
|
2325 |
elseif ( $cnt > '5000' ) {
|
2326 |
-
|
2327 |
}
|
2328 |
else {
|
2329 |
|
@@ -2332,50 +2331,49 @@ global $wppa_subtab_names;
|
|
2332 |
$id = $photo['id'];
|
2333 |
|
2334 |
// Open container div
|
2335 |
-
|
2336 |
<div
|
2337 |
class="photoselect"
|
2338 |
style="width:180px;height:200px;overflow:hidden;"
|
2339 |
-
>';
|
2340 |
|
2341 |
// Open image container div
|
2342 |
-
|
2343 |
<div
|
2344 |
style="width:180px;height:135px;overflow:hidden;text-align:center;"
|
2345 |
-
>';
|
2346 |
|
2347 |
// The image if a video
|
2348 |
if ( wppa_is_video( $id ) ) {
|
2349 |
-
|
2350 |
-
|
2351 |
-
|
2352 |
}
|
2353 |
|
2354 |
// The image if a photo
|
2355 |
else {
|
2356 |
-
|
2357 |
<img
|
2358 |
src="' . esc_url( wppa_get_thumb_url( $id ) ) . '"
|
2359 |
style="max-width:180px;max-height:135px;margin:auto;"
|
2360 |
alt="' . esc_attr( wppa_get_photo_name( $id ) ) . '"
|
2361 |
-
/>';
|
2362 |
|
2363 |
// Audio ?
|
2364 |
if ( wppa_has_audio( $id ) ) {
|
2365 |
-
|
2366 |
-
|
2367 |
-
|
2368 |
-
|
2369 |
-
|
2370 |
}
|
2371 |
}
|
2372 |
|
2373 |
// Close image container div
|
2374 |
-
|
2375 |
-
</div>';
|
2376 |
|
2377 |
// The order# and select radio box
|
2378 |
-
|
2379 |
<div
|
2380 |
style="clear:both;width:100%;margin:3px 0;position:relative;top:5px;"
|
2381 |
>
|
@@ -2383,10 +2381,10 @@ global $wppa_subtab_names;
|
|
2383 |
style="font-size:9px; line-height:10px;float:left;"
|
2384 |
>
|
2385 |
(#' . strval( intval( $photo['p_order'] ) ) . ')
|
2386 |
-
</div>';
|
2387 |
|
2388 |
if ( wppa_get_option( 'wppa_potd_method' ) == '1' ) { // Only if fixed photo
|
2389 |
-
|
2390 |
<input
|
2391 |
style="float:right;"
|
2392 |
type="radio"
|
@@ -2395,14 +2393,13 @@ global $wppa_subtab_names;
|
|
2395 |
value="' . esc_attr( $id ) . '"' .
|
2396 |
( $id == $curid ? 'checked="checked"' : '' ) . '
|
2397 |
onchange="wppaSetFixed(' . strval( intval( $id ) ) . ');"
|
2398 |
-
/>';
|
2399 |
}
|
2400 |
|
2401 |
-
|
2402 |
-
</div>';
|
2403 |
|
2404 |
-
// The name/desc
|
2405 |
-
|
2406 |
<div
|
2407 |
style="clear:both;overflow:hidden;height:150px;position:relative;top:10px;"
|
2408 |
>
|
@@ -2416,22 +2413,20 @@ global $wppa_subtab_names;
|
|
2416 |
>' .
|
2417 |
wppa_get_photo_desc( $id ) . '
|
2418 |
</div>
|
2419 |
-
</div>';
|
2420 |
|
2421 |
// Close container
|
2422 |
-
|
2423 |
-
</div>';
|
2424 |
}
|
2425 |
-
|
2426 |
-
<div class="clear"></div>';
|
2427 |
}
|
2428 |
|
2429 |
// Close the table
|
2430 |
-
|
2431 |
</td>
|
2432 |
</tr>
|
2433 |
</tbody>
|
2434 |
-
</table>';
|
2435 |
}
|
2436 |
}
|
2437 |
wppa_setting_box_footer_new();
|
@@ -6134,14 +6129,14 @@ global $wppa_subtab_names;
|
|
6134 |
$i = 0;
|
6135 |
foreach( $mails as $mail ) {
|
6136 |
$i++;
|
6137 |
-
|
6138 |
<tr class="wppa-setting wppa-IX-X" >
|
6139 |
<td>' . $i . '</td>
|
6140 |
<td>' . $mail['to'] . '</td>
|
6141 |
<td>' . $mail['subj'] . '</td>
|
6142 |
<td style="max-width:40%" >' . strip_tags( $mail['message'] ) . '</td>
|
6143 |
<td>' . $mail['retry'] . '</td>
|
6144 |
-
</tr>';
|
6145 |
}
|
6146 |
|
6147 |
wppa_setting_box_footer_new();
|
@@ -6160,14 +6155,14 @@ global $wppa_subtab_names;
|
|
6160 |
$i = 0;
|
6161 |
foreach( $mails as $mail ) {
|
6162 |
$i++;
|
6163 |
-
|
6164 |
<tr class="wppa-setting wppa-IX-Y" >
|
6165 |
<td>' . $i . '</td>
|
6166 |
<td>' . $mail['to'] . '</td>
|
6167 |
<td>' . $mail['subj'] . '</td>
|
6168 |
<td style="max-width:40%" >' . strip_tags( $mail['message'] ) . '</td>
|
6169 |
<td>' . $mail['retry'] . '</td>
|
6170 |
-
</tr>';
|
6171 |
}
|
6172 |
|
6173 |
wppa_setting_box_footer_new();
|
@@ -7301,9 +7296,9 @@ global $wppa_subtab_names;
|
|
7301 |
$role = $roles[$key];
|
7302 |
$rolename = translate_user_role( $role['name'] );
|
7303 |
|
7304 |
-
|
7305 |
<tr class="wppa-setting-new" >
|
7306 |
-
<td>' . $rolename . '</td>';
|
7307 |
$caps = $role['capabilities'];
|
7308 |
|
7309 |
for ($i = 0; $i < count($wppacaps) - 1; $i++) {
|
@@ -7312,13 +7307,13 @@ global $wppa_subtab_names;
|
|
7312 |
}
|
7313 |
else $yn = false;
|
7314 |
$enabled = ( $key != 'administrator' );
|
7315 |
-
|
7316 |
-
<td>' . wppa_checkbox_e('caps-'.$wppacaps[$i].'-'.$key, $yn, '', '', $enabled) . '</td>';
|
7317 |
};
|
7318 |
|
7319 |
-
|
7320 |
|
7321 |
-
|
7322 |
}
|
7323 |
|
7324 |
wppa_setting_box_footer_new();
|
@@ -10421,25 +10416,25 @@ global $wppa_subtab_names;
|
|
10421 |
}
|
10422 |
|
10423 |
// Close the content area
|
10424 |
-
|
10425 |
|
10426 |
// The popup window
|
10427 |
-
|
10428 |
<div
|
10429 |
id="wppa-modal-container"
|
10430 |
style="width:100%;padding:0;"
|
10431 |
>
|
10432 |
-
</div>';
|
10433 |
|
10434 |
// close wrapper
|
10435 |
-
|
10436 |
|
10437 |
// Report resource used
|
10438 |
-
|
10439 |
-
<div style="clear:both;" >' .
|
10440 |
sprintf(__('<br>Memory used on this page: %6.2f Mb.', 'wp-photo-album-plus' ), memory_get_peak_usage(true)/(1024*1024)) .
|
10441 |
sprintf(__('<br>There are %d settings and %d runtime parameters.', 'wp-photo-album-plus' ), count($wppa_opt), count($wppa)) . '
|
10442 |
-
</div>';
|
10443 |
|
10444 |
wppa_initialize_runtime( true );
|
10445 |
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
+
* Version 8.1.08.004
|
7 |
*
|
8 |
*/
|
9 |
|
299 |
// Fix invalid source path
|
300 |
wppa_fix_source_path();
|
301 |
|
302 |
+
wppa_echo( '<div class="wrap">' );
|
303 |
+
|
304 |
wppa_admin_spinner();
|
305 |
$iconurl = WPPA_URL.'/img/settings32.png';
|
306 |
|
307 |
// General header
|
308 |
+
wppa_echo( '
|
309 |
+
<img id="icon-album" src="' . $iconurl . '" />
|
310 |
+
<h1 style="display:inline" >' . __( 'WP Photo Album Plus Settings', 'wp-photo-album-plus' ) . '
|
311 |
+
<span style="color:blue;"> ' . __( 'Auto Save', 'wp-photo-album-plus' ) . '</span>
|
312 |
+
</h1>' );
|
313 |
if ( current_user_can( 'administrator' ) ) {
|
314 |
+
wppa_echo( ' ' .
|
315 |
__( 'Database revision:', 'wp-photo-album-plus' ) . ' ' . wppa_get_option( 'wppa_revision', '100') . '. ' .
|
316 |
__( 'WP Charset:', 'wp-photo-album-plus' ) . ' ' . get_bloginfo( 'charset' ) . '. ' .
|
317 |
__( 'Current PHP version:', 'wp-photo-album-plus' ) . ' ' . phpversion() . '. ' .
|
318 |
__( 'WPPA+ API Version:', 'wp-photo-album-plus' ) . ' ' . $wppa_api_version . '. ' .
|
319 |
+
__( 'Filesystem method:', 'wp-photo-album-plus' ) . ' ' . get_filesystem_method() );
|
320 |
}
|
321 |
+
wppa_echo( '<br>' );
|
|
|
322 |
|
323 |
if ( is_multisite() ) {
|
324 |
if ( WPPA_MULTISITE_GLOBAL ) {
|
325 |
+
wppa_echo( __( 'Multisite in singlesite mode.', 'wp-photo-album-plus' ) );
|
326 |
}
|
327 |
else {
|
328 |
+
wppa_echo(
|
329 |
+
__( 'Multisite enabled.', 'wp-photo-album-plus' ) .
|
330 |
+
' ' .
|
331 |
+
__( 'Blogid =', 'wp-photo-album-plus' ) .
|
332 |
+
' ' . $blog_id );
|
333 |
}
|
334 |
}
|
335 |
|
507 |
}
|
508 |
}
|
509 |
else {
|
510 |
+
$opts_page[] = __( '--- No page to link to (yet) ---', 'wp-photo-album-plus' );
|
511 |
$vals_page[] = '0';
|
512 |
}
|
513 |
|
514 |
$opts_page_auto = $opts_page;
|
515 |
+
$opts_page_auto[0] = __( '--- Will be auto created ---', 'wp-photo-album-plus' );
|
516 |
}
|
517 |
|
518 |
// Find matching master tab
|
549 |
}
|
550 |
|
551 |
// The master header selectors
|
552 |
+
wppa_echo( '<ul class="widefat wppa-master-tabs" >' );
|
553 |
wppa_master_tab( 'basic', 'general', __( 'Basic settings', 'wp-photo-album-plus' ), $basic );
|
554 |
wppa_master_tab( 'advanced', 'generaladv', __( 'Advanced settings', 'wp-photo-album-plus' ), $advan );
|
555 |
+
wppa_echo( '</ul>' );
|
556 |
|
557 |
// The tabs
|
558 |
{
|
559 |
+
wppa_echo( '<ul class="widefat wppa-setting-tabs" >' );
|
560 |
wppa_setting_tab( 'general', $wppa_tab_names['general'], $basic );
|
561 |
wppa_setting_tab( 'generaladv', $wppa_tab_names['generaladv'], $advan );
|
562 |
wppa_setting_tab( 'layout', $wppa_tab_names['layout'], $basic );
|
586 |
wppa_setting_tab( 'constants', $wppa_tab_names['constants'], $advan );
|
587 |
wppa_setting_tab( 'misc', $wppa_tab_names['misc'], $basic );
|
588 |
wppa_setting_tab( 'miscadv', $wppa_tab_names['miscadv'], $advan );
|
589 |
+
wppa_echo( '</ul>' );
|
590 |
}
|
591 |
|
592 |
// For layout we need a clear
|
593 |
+
wppa_echo( '<div class="clear"></div>' );
|
594 |
|
595 |
// The js
|
596 |
{
|
694 |
}
|
695 |
|
696 |
// Open the content area
|
697 |
+
wppa_echo( '<div id="wppa-setting-content" style="display:none;clear:both;" >' );
|
|
|
698 |
|
699 |
// Dispatch on tab
|
700 |
switch($tab) {
|
1356 |
$slug = array($slug1, $slug2, $slug3, $slug4);
|
1357 |
$html1 = wppa_input($slug1, '90%', '200px', '');
|
1358 |
$html2 = wppa_input($slug2, '40px', '', __('pixels', 'wp-photo-album-plus' ));
|
1359 |
+
$html3 = wppa_input($slug3, '120px', '', '');
|
1360 |
$html4 = wppa_select($slug4, $opts, $vals);
|
1361 |
$html = array($html1, $html2, $html3, $html4);
|
1362 |
wppa_setting_new($slug, '1', $name, $desc, $html, $help);
|
1371 |
$slug = array($slug1, $slug2, $slug3, $slug4);
|
1372 |
$html1 = wppa_input($slug1, '90%', '200px', '');
|
1373 |
$html2 = wppa_input($slug2, '40px', '', __('pixels', 'wp-photo-album-plus' ));
|
1374 |
+
$html3 = wppa_input($slug3, '120px', '', '');
|
1375 |
$html4 = wppa_select($slug4, $opts, $vals);
|
1376 |
$html = array($html1, $html2, $html3, $html4);
|
1377 |
wppa_setting_new($slug, '2', $name, $desc, $html, $help);
|
1386 |
$slug = array($slug1, $slug2, $slug3, $slug4);
|
1387 |
$html1 = wppa_input($slug1, '90%', '200px', '');
|
1388 |
$html2 = wppa_input($slug2, '40px', '', __('pixels', 'wp-photo-album-plus' ));
|
1389 |
+
$html3 = wppa_input($slug3, '120px', '', '');
|
1390 |
$html4 = wppa_select($slug4, $opts, $vals);
|
1391 |
$html = array($html1, $html2, $html3, $html4);
|
1392 |
wppa_setting_new($slug, '3', $name, $desc, $html, $help);
|
1401 |
$slug = array($slug1, $slug2, $slug3, $slug4);
|
1402 |
$html1 = wppa_input($slug1, '90%', '200px', '');
|
1403 |
$html2 = wppa_input($slug2, '40px', '', __('pixels', 'wp-photo-album-plus' ));
|
1404 |
+
$html3 = wppa_input($slug3, '120px', '', '');
|
1405 |
$html4 = wppa_select($slug4, $opts, $vals);
|
1406 |
$html = array($html1, $html2, $html3, $html4);
|
1407 |
wppa_setting_new($slug, '4', $name, $desc, $html, $help);
|
1416 |
$slug = array($slug1, $slug2, $slug3, $slug4);
|
1417 |
$html1 = wppa_input($slug1, '90%', '200px', '');
|
1418 |
$html2 = wppa_input($slug2, '40px', '', __('pixels', 'wp-photo-album-plus' ));
|
1419 |
+
$html3 = wppa_input($slug3, '120px', '', '');
|
1420 |
$html4 = wppa_select($slug4, $opts, $vals);
|
1421 |
$html = array($html1, $html2, $html3, $html4);
|
1422 |
wppa_setting_new($slug, '5', $name, $desc, $html, $help);
|
1431 |
$slug = array($slug1, $slug2, $slug3, $slug4);
|
1432 |
$html1 = wppa_input($slug1, '90%', '200px', '');
|
1433 |
$html2 = wppa_input($slug2, '40px', '', __('pixels', 'wp-photo-album-plus' ));
|
1434 |
+
$html3 = wppa_input($slug3, '120px', '', '');
|
1435 |
$html4 = wppa_select($slug4, $opts, $vals);
|
1436 |
$html = array($html1, $html2, $html3, $html4);
|
1437 |
wppa_setting_new($slug, '6', $name, $desc, $html, $help);
|
1446 |
$slug = array($slug1, $slug2, $slug3, $slug4);
|
1447 |
$html1 = wppa_input($slug1, '90%', '200px', '');
|
1448 |
$html2 = wppa_input($slug2, '40px', '', __('pixels', 'wp-photo-album-plus' ));
|
1449 |
+
$html3 = wppa_input($slug3, '120px', '', '');
|
1450 |
$html4 = wppa_select($slug4, $opts, $vals);
|
1451 |
$html = array($html1, $html2, $html3, $html4);
|
1452 |
wppa_setting_new($slug, '7', $name, $desc, $html, $help);
|
1461 |
$slug = array($slug1, $slug2, $slug3, $slug4);
|
1462 |
$html1 = wppa_input($slug1, '90%', '200px', '');
|
1463 |
$html2 = wppa_input($slug2, '40px', '', __('pixels', 'wp-photo-album-plus' ));
|
1464 |
+
$html3 = wppa_input($slug3, '120px', '', '');
|
1465 |
$html4 = wppa_select($slug4, $opts, $vals);
|
1466 |
$html = array($html1, $html2, $html3, $html4);
|
1467 |
wppa_setting_new($slug, '8', $name, $desc, $html, $help);
|
1476 |
$slug = array($slug1, $slug2, $slug3, $slug4);
|
1477 |
$html1 = wppa_input($slug1, '90%', '200px', '');
|
1478 |
$html2 = wppa_input($slug2, '40px', '', __('pixels', 'wp-photo-album-plus' ));
|
1479 |
+
$html3 = wppa_input($slug3, '120px', '', '');
|
1480 |
$html4 = wppa_select($slug4, $opts, $vals);
|
1481 |
$html = array($html1, $html2, $html3, $html4);
|
1482 |
wppa_setting_new($slug, '9', $name, $desc, $html, $help);
|
2293 |
|
2294 |
// The potd photo pool
|
2295 |
if ( wppa_switch( 'potd_preview' ) ) {
|
2296 |
+
wppa_echo( '
|
2297 |
<table class="widefat wppa-table wppa-setting-table" >
|
2298 |
<thead>
|
2299 |
<tr>
|
2304 |
</thead>
|
2305 |
<tbody>
|
2306 |
<tr>
|
2307 |
+
<td>' );
|
2308 |
|
2309 |
// Get the photos
|
2310 |
$alb = wppa_opt( 'potd_album' );
|
2319 |
|
2320 |
// See if we do this
|
2321 |
if ( empty( $photos ) ) {
|
2322 |
+
wppa_echo( __( 'No photos in the selection', 'wp-photo-album-plus' ) );
|
2323 |
}
|
2324 |
elseif ( $cnt > '5000' ) {
|
2325 |
+
wppa_echo( sprintf( __( 'There are too many photos in the selection to show a preview ( %d )', 'wp-photo-album-plus' ), $cnt ) );
|
2326 |
}
|
2327 |
else {
|
2328 |
|
2331 |
$id = $photo['id'];
|
2332 |
|
2333 |
// Open container div
|
2334 |
+
wppa_echo( '
|
2335 |
<div
|
2336 |
class="photoselect"
|
2337 |
style="width:180px;height:200px;overflow:hidden;"
|
2338 |
+
>' );
|
2339 |
|
2340 |
// Open image container div
|
2341 |
+
wppa_echo( '
|
2342 |
<div
|
2343 |
style="width:180px;height:135px;overflow:hidden;text-align:center;"
|
2344 |
+
>' );
|
2345 |
|
2346 |
// The image if a video
|
2347 |
if ( wppa_is_video( $id ) ) {
|
2348 |
+
wppa_echo( wppa_get_video_html( array( 'id' => $id,
|
2349 |
+
'style' => 'width:180px;'
|
2350 |
+
)));
|
2351 |
}
|
2352 |
|
2353 |
// The image if a photo
|
2354 |
else {
|
2355 |
+
wppa_echo( '
|
2356 |
<img
|
2357 |
src="' . esc_url( wppa_get_thumb_url( $id ) ) . '"
|
2358 |
style="max-width:180px;max-height:135px;margin:auto;"
|
2359 |
alt="' . esc_attr( wppa_get_photo_name( $id ) ) . '"
|
2360 |
+
/>' );
|
2361 |
|
2362 |
// Audio ?
|
2363 |
if ( wppa_has_audio( $id ) ) {
|
2364 |
+
wppa_echo( wppa_get_audio_html( array( 'id' => $id,
|
2365 |
+
'style' => 'width:180px;' .
|
2366 |
+
'position:relative;' .
|
2367 |
+
'bottom:' . ( wppa_get_audio_control_height() + 4 ) .'px;'
|
2368 |
+
)));
|
2369 |
}
|
2370 |
}
|
2371 |
|
2372 |
// Close image container div
|
2373 |
+
wppa_echo( '</div>' );
|
|
|
2374 |
|
2375 |
// The order# and select radio box
|
2376 |
+
wppa_echo( '
|
2377 |
<div
|
2378 |
style="clear:both;width:100%;margin:3px 0;position:relative;top:5px;"
|
2379 |
>
|
2381 |
style="font-size:9px; line-height:10px;float:left;"
|
2382 |
>
|
2383 |
(#' . strval( intval( $photo['p_order'] ) ) . ')
|
2384 |
+
</div>' );
|
2385 |
|
2386 |
if ( wppa_get_option( 'wppa_potd_method' ) == '1' ) { // Only if fixed photo
|
2387 |
+
wppa_echo( '
|
2388 |
<input
|
2389 |
style="float:right;"
|
2390 |
type="radio"
|
2393 |
value="' . esc_attr( $id ) . '"' .
|
2394 |
( $id == $curid ? 'checked="checked"' : '' ) . '
|
2395 |
onchange="wppaSetFixed(' . strval( intval( $id ) ) . ');"
|
2396 |
+
/>' );
|
2397 |
}
|
2398 |
|
2399 |
+
wppa_echo( '</div>' );
|
|
|
2400 |
|
2401 |
+
// The name/desc box
|
2402 |
+
wppa_echo( '
|
2403 |
<div
|
2404 |
style="clear:both;overflow:hidden;height:150px;position:relative;top:10px;"
|
2405 |
>
|
2413 |
>' .
|
2414 |
wppa_get_photo_desc( $id ) . '
|
2415 |
</div>
|
2416 |
+
</div>' );
|
2417 |
|
2418 |
// Close container
|
2419 |
+
wppa_echo( '</div>' );
|
|
|
2420 |
}
|
2421 |
+
wppa_echo( '<div class="clear"></div>' );
|
|
|
2422 |
}
|
2423 |
|
2424 |
// Close the table
|
2425 |
+
wppa_echo( '
|
2426 |
</td>
|
2427 |
</tr>
|
2428 |
</tbody>
|
2429 |
+
</table>' );
|
2430 |
}
|
2431 |
}
|
2432 |
wppa_setting_box_footer_new();
|
6129 |
$i = 0;
|
6130 |
foreach( $mails as $mail ) {
|
6131 |
$i++;
|
6132 |
+
wppa_echo( '
|
6133 |
<tr class="wppa-setting wppa-IX-X" >
|
6134 |
<td>' . $i . '</td>
|
6135 |
<td>' . $mail['to'] . '</td>
|
6136 |
<td>' . $mail['subj'] . '</td>
|
6137 |
<td style="max-width:40%" >' . strip_tags( $mail['message'] ) . '</td>
|
6138 |
<td>' . $mail['retry'] . '</td>
|
6139 |
+
</tr>' );
|
6140 |
}
|
6141 |
|
6142 |
wppa_setting_box_footer_new();
|
6155 |
$i = 0;
|
6156 |
foreach( $mails as $mail ) {
|
6157 |
$i++;
|
6158 |
+
wppa_echo( '
|
6159 |
<tr class="wppa-setting wppa-IX-Y" >
|
6160 |
<td>' . $i . '</td>
|
6161 |
<td>' . $mail['to'] . '</td>
|
6162 |
<td>' . $mail['subj'] . '</td>
|
6163 |
<td style="max-width:40%" >' . strip_tags( $mail['message'] ) . '</td>
|
6164 |
<td>' . $mail['retry'] . '</td>
|
6165 |
+
</tr>' );
|
6166 |
}
|
6167 |
|
6168 |
wppa_setting_box_footer_new();
|
7296 |
$role = $roles[$key];
|
7297 |
$rolename = translate_user_role( $role['name'] );
|
7298 |
|
7299 |
+
wppa_echo( '
|
7300 |
<tr class="wppa-setting-new" >
|
7301 |
+
<td>' . $rolename . '</td>' );
|
7302 |
$caps = $role['capabilities'];
|
7303 |
|
7304 |
for ($i = 0; $i < count($wppacaps) - 1; $i++) {
|
7307 |
}
|
7308 |
else $yn = false;
|
7309 |
$enabled = ( $key != 'administrator' );
|
7310 |
+
wppa_echo( '
|
7311 |
+
<td>' . wppa_checkbox_e('caps-'.$wppacaps[$i].'-'.$key, $yn, '', '', $enabled) . '</td>' );
|
7312 |
};
|
7313 |
|
7314 |
+
wppa_echo( '<td>' . wppa_select($wppacaps[count($wppacaps) - 1].'-'.$key, $opts, $vals) . '</td>' );
|
7315 |
|
7316 |
+
wppa_echo( '</tr>' );
|
7317 |
}
|
7318 |
|
7319 |
wppa_setting_box_footer_new();
|
10416 |
}
|
10417 |
|
10418 |
// Close the content area
|
10419 |
+
wppa_echo( '</div>' );
|
10420 |
|
10421 |
// The popup window
|
10422 |
+
wppa_echo( '
|
10423 |
<div
|
10424 |
id="wppa-modal-container"
|
10425 |
style="width:100%;padding:0;"
|
10426 |
>
|
10427 |
+
</div>' );
|
10428 |
|
10429 |
// close wrapper
|
10430 |
+
wppa_echo( '</div>' );
|
10431 |
|
10432 |
// Report resource used
|
10433 |
+
wppa_echo( '
|
10434 |
+
<div style="clear:both;margin-top:12px;" >' .
|
10435 |
sprintf(__('<br>Memory used on this page: %6.2f Mb.', 'wp-photo-album-plus' ), memory_get_peak_usage(true)/(1024*1024)) .
|
10436 |
sprintf(__('<br>There are %d settings and %d runtime parameters.', 'wp-photo-album-plus' ), count($wppa_opt), count($wppa)) . '
|
10437 |
+
</div>' );
|
10438 |
|
10439 |
wppa_initialize_runtime( true );
|
10440 |
}
|
wppa-tinymce-common.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-tinymce-common.php
|
3 |
* Pachkage: wp-photo-album-plus
|
4 |
*
|
5 |
-
* Version 8.1.08.
|
6 |
*
|
7 |
*/
|
8 |
|
@@ -123,6 +123,7 @@ global $wpdb;
|
|
123 |
'addpleaseselect' => true,
|
124 |
'checkupload' => true,
|
125 |
'checkowner' => true,
|
|
|
126 |
|
127 |
) ) ) .
|
128 |
|
2 |
/* wppa-tinymce-common.php
|
3 |
* Pachkage: wp-photo-album-plus
|
4 |
*
|
5 |
+
* Version 8.1.08.004
|
6 |
*
|
7 |
*/
|
8 |
|
123 |
'addpleaseselect' => true,
|
124 |
'checkupload' => true,
|
125 |
'checkowner' => true,
|
126 |
+
'path' => true,
|
127 |
|
128 |
) ) ) .
|
129 |
|
wppa-wrappers.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Contains wrappers for standard php functions
|
6 |
* For security and bug reasons
|
7 |
*
|
8 |
-
* Version 8.1.08.
|
9 |
*
|
10 |
*/
|
11 |
|
@@ -737,6 +737,10 @@ static $allowed_tags;
|
|
737 |
'class' => true,
|
738 |
'name' => true,
|
739 |
),
|
|
|
|
|
|
|
|
|
740 |
'audio' => array(
|
741 |
'id' => true,
|
742 |
'data-from' => true,
|
@@ -752,6 +756,7 @@ static $allowed_tags;
|
|
752 |
'class' => true,
|
753 |
'style' => true,
|
754 |
'touch-action' => true,
|
|
|
755 |
),
|
756 |
'em' => array(),
|
757 |
'form' => array(
|
@@ -830,6 +835,7 @@ static $allowed_tags;
|
|
830 |
'style' => true,
|
831 |
'id' => true,
|
832 |
'class' => true,
|
|
|
833 |
),
|
834 |
'strong' => array(),
|
835 |
'table' => array(
|
@@ -886,12 +892,17 @@ static $allowed_tags;
|
|
886 |
),
|
887 |
'ul' => array(
|
888 |
'style' => true,
|
|
|
889 |
),
|
890 |
'ol' => array(
|
891 |
'style' => true,
|
|
|
892 |
),
|
893 |
'li' => array(
|
894 |
'style' => true,
|
|
|
|
|
|
|
895 |
),
|
896 |
);
|
897 |
}
|
5 |
* Contains wrappers for standard php functions
|
6 |
* For security and bug reasons
|
7 |
*
|
8 |
+
* Version 8.1.08.004
|
9 |
*
|
10 |
*/
|
11 |
|
737 |
'class' => true,
|
738 |
'name' => true,
|
739 |
),
|
740 |
+
'aside' => array(
|
741 |
+
'id' => true,
|
742 |
+
'class' => true,
|
743 |
+
),
|
744 |
'audio' => array(
|
745 |
'id' => true,
|
746 |
'data-from' => true,
|
756 |
'class' => true,
|
757 |
'style' => true,
|
758 |
'touch-action' => true,
|
759 |
+
'onclick' => true,
|
760 |
),
|
761 |
'em' => array(),
|
762 |
'form' => array(
|
835 |
'style' => true,
|
836 |
'id' => true,
|
837 |
'class' => true,
|
838 |
+
'onclick' => true,
|
839 |
),
|
840 |
'strong' => array(),
|
841 |
'table' => array(
|
892 |
),
|
893 |
'ul' => array(
|
894 |
'style' => true,
|
895 |
+
'class' => true,
|
896 |
),
|
897 |
'ol' => array(
|
898 |
'style' => true,
|
899 |
+
'class' => true,
|
900 |
),
|
901 |
'li' => array(
|
902 |
'style' => true,
|
903 |
+
'class' => true,
|
904 |
+
'id' => true,
|
905 |
+
'onclick' => true,
|
906 |
),
|
907 |
);
|
908 |
}
|
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.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.1.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.1.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.1.08.004'; // WPPA software version
|
28 |
global $wppa_revno;
|
29 |
$wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
|
30 |
|