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.3.01.003 |
Comparing to | |
See all releases |
Code changes from version 8.3.01.002 to 8.3.01.003
- wppa-admin-functions.php +30 -12
- wppa-admin-styles.css +3 -3
- wppa-adminbar.php +15 -15
- wppa-album-admin-autosave.php +4 -2
- wppa-listtable.php +31 -25
- wppa-photo-admin-autosave.php +883 -730
- wppa-wrappers.php +2 -2
- wppa.php +2 -2
wppa-admin-functions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* gp admin functions
|
6 |
-
* Version 8.3.01.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -1081,7 +1081,7 @@ function wppa_admin_pagination( $pagesize, $current, $total_items, $url, $which
|
|
1081 |
if ( $total_items < '21' ) {
|
1082 |
return '';
|
1083 |
}
|
1084 |
-
|
1085 |
// Init
|
1086 |
$output = '';
|
1087 |
$link = $url . '&paged=';
|
@@ -1128,7 +1128,7 @@ function wppa_admin_pagination( $pagesize, $current, $total_items, $url, $which
|
|
1128 |
} else {
|
1129 |
$page_links[] = sprintf(
|
1130 |
"<a class='first-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
|
1131 |
-
esc_url(
|
1132 |
__( 'First page' ),
|
1133 |
'«'
|
1134 |
);
|
@@ -1145,21 +1145,37 @@ function wppa_admin_pagination( $pagesize, $current, $total_items, $url, $which
|
|
1145 |
);
|
1146 |
}
|
1147 |
|
|
|
1148 |
if ( 'bottom' === $which ) {
|
1149 |
$html_current_page = $current;
|
1150 |
-
$total_pages_before = '
|
1151 |
-
|
|
|
|
|
|
|
|
|
1152 |
$html_current_page = sprintf(
|
1153 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1154 |
'<label for="current-page-selector" class="screen-reader-text">' . __( 'Current Page' ) . '</label>',
|
1155 |
$current,
|
1156 |
-
strlen( $total_pages )
|
|
|
1157 |
);
|
1158 |
}
|
|
|
1159 |
$html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) );
|
1160 |
$page_links[] = $total_pages_before . sprintf(
|
1161 |
/* translators: 1: Current page, 2: Total pages. */
|
1162 |
-
_x( '%1$s of %2$s', '
|
1163 |
$html_current_page,
|
1164 |
$html_total_pages
|
1165 |
) . $total_pages_after;
|
@@ -1187,7 +1203,7 @@ function wppa_admin_pagination( $pagesize, $current, $total_items, $url, $which
|
|
1187 |
}
|
1188 |
|
1189 |
$pagination_links_class = 'pagination-links';
|
1190 |
-
$output .= "\n<span class='$pagination_links_class'>" . implode( "\n", $page_links )
|
1191 |
|
1192 |
if ( $total_pages ) {
|
1193 |
$page_class = $total_pages < 2 ? ' one-page' : '';
|
@@ -1200,7 +1216,9 @@ function wppa_admin_pagination( $pagesize, $current, $total_items, $url, $which
|
|
1200 |
if ( $which == 'top' ) {
|
1201 |
$output .= ' ' .
|
1202 |
__( 'Pagesize', 'wp-photo-album-plus' ) . '
|
1203 |
-
<select
|
|
|
|
|
1204 |
<option value="20"' . ( $pagesize == '20' ? ' selected' : '' ) . '>20</option>
|
1205 |
<option value="50"' . ( $pagesize == '50' ? ' selected' : '' ) . '>50</option>
|
1206 |
<option value="100"' . ( $pagesize == '100' ? ' selected' : '' ) . '>100</option>
|
@@ -1211,14 +1229,14 @@ function wppa_admin_pagination( $pagesize, $current, $total_items, $url, $which
|
|
1211 |
}
|
1212 |
|
1213 |
// Close overall wrapper
|
1214 |
-
$output .= '</div></div>';
|
1215 |
|
1216 |
// Done
|
1217 |
if ( $return ) {
|
1218 |
return $output;
|
1219 |
}
|
1220 |
else {
|
1221 |
-
|
1222 |
}
|
1223 |
}
|
1224 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* gp admin functions
|
6 |
+
* Version 8.3.01.003
|
7 |
*
|
8 |
*/
|
9 |
|
1081 |
if ( $total_items < '21' ) {
|
1082 |
return '';
|
1083 |
}
|
1084 |
+
|
1085 |
// Init
|
1086 |
$output = '';
|
1087 |
$link = $url . '&paged=';
|
1128 |
} else {
|
1129 |
$page_links[] = sprintf(
|
1130 |
"<a class='first-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
|
1131 |
+
esc_url( add_query_arg( 'paged', 1, $current_url ) ),
|
1132 |
__( 'First page' ),
|
1133 |
'«'
|
1134 |
);
|
1145 |
);
|
1146 |
}
|
1147 |
|
1148 |
+
// Bottom
|
1149 |
if ( 'bottom' === $which ) {
|
1150 |
$html_current_page = $current;
|
1151 |
+
$total_pages_before = '
|
1152 |
+
<span class="screen-reader-text">' . __( 'Current Page' ) . '</span><span id="table-paging" class="paging-input"><span class="tablenav-paging-text">';
|
1153 |
+
}
|
1154 |
+
|
1155 |
+
// Top
|
1156 |
+
else {
|
1157 |
$html_current_page = sprintf(
|
1158 |
+
'%s<input
|
1159 |
+
class="current-page pietje"
|
1160 |
+
id="current-page-selector"
|
1161 |
+
type="text"
|
1162 |
+
name="paged"
|
1163 |
+
value="%s"
|
1164 |
+
size="%d"
|
1165 |
+
aria-describedby="table-paging"
|
1166 |
+
onchange="document.location.href=\'%s&paged=\'+Math.min(Math.max(parseInt(this.value)||1,1),'.$total_pages.')"
|
1167 |
+
/><span class="tablenav-paging-text">',
|
1168 |
'<label for="current-page-selector" class="screen-reader-text">' . __( 'Current Page' ) . '</label>',
|
1169 |
$current,
|
1170 |
+
strlen( $total_pages ),
|
1171 |
+
esc_url( remove_query_arg( 'paged' ) )
|
1172 |
);
|
1173 |
}
|
1174 |
+
|
1175 |
$html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) );
|
1176 |
$page_links[] = $total_pages_before . sprintf(
|
1177 |
/* translators: 1: Current page, 2: Total pages. */
|
1178 |
+
_x( '%1$s of %2$s', 'wp-photo-album-plus' ),
|
1179 |
$html_current_page,
|
1180 |
$html_total_pages
|
1181 |
) . $total_pages_after;
|
1203 |
}
|
1204 |
|
1205 |
$pagination_links_class = 'pagination-links';
|
1206 |
+
$output .= "\n<span class='$pagination_links_class'>" . implode( "\n", $page_links );
|
1207 |
|
1208 |
if ( $total_pages ) {
|
1209 |
$page_class = $total_pages < 2 ? ' one-page' : '';
|
1216 |
if ( $which == 'top' ) {
|
1217 |
$output .= ' ' .
|
1218 |
__( 'Pagesize', 'wp-photo-album-plus' ) . '
|
1219 |
+
<select
|
1220 |
+
style="margin-top:-2px;"
|
1221 |
+
onchange="jQuery( \'#wppa-admin-spinner\' ).show();document.location.href=\''.$link.'1&wppa-pagesize=\'+this.value;">
|
1222 |
<option value="20"' . ( $pagesize == '20' ? ' selected' : '' ) . '>20</option>
|
1223 |
<option value="50"' . ( $pagesize == '50' ? ' selected' : '' ) . '>50</option>
|
1224 |
<option value="100"' . ( $pagesize == '100' ? ' selected' : '' ) . '>100</option>
|
1229 |
}
|
1230 |
|
1231 |
// Close overall wrapper
|
1232 |
+
$output .= '</span></div></div>';
|
1233 |
|
1234 |
// Done
|
1235 |
if ( $return ) {
|
1236 |
return $output;
|
1237 |
}
|
1238 |
else {
|
1239 |
+
echo( $output );
|
1240 |
}
|
1241 |
}
|
1242 |
|
wppa-admin-styles.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/* admin-styles.css
|
2 |
*
|
3 |
* wp-photo-album-plus
|
4 |
-
* version 8.3.01.
|
5 |
*/
|
6 |
#files_list, #files_list2
|
7 |
{
|
@@ -81,7 +81,7 @@ ul.wppa_nav
|
|
81 |
}
|
82 |
|
83 |
.wppa-table-wrap {
|
84 |
-
|
85 |
position:relative;
|
86 |
}
|
87 |
.wppa-table {
|
@@ -634,7 +634,7 @@ details.hidden {
|
|
634 |
border: 1px solid #8c8f94;
|
635 |
color: #2c3338;
|
636 |
padding: 8px;
|
637 |
-
max-width:
|
638 |
}
|
639 |
.left {
|
640 |
float:left;
|
1 |
/* admin-styles.css
|
2 |
*
|
3 |
* wp-photo-album-plus
|
4 |
+
* version 8.3.01.003
|
5 |
*/
|
6 |
#files_list, #files_list2
|
7 |
{
|
81 |
}
|
82 |
|
83 |
.wppa-table-wrap {
|
84 |
+
border:1px solid #ccc;
|
85 |
position:relative;
|
86 |
}
|
87 |
.wppa-table {
|
634 |
border: 1px solid #8c8f94;
|
635 |
color: #2c3338;
|
636 |
padding: 8px;
|
637 |
+
max-width: 100%;
|
638 |
}
|
639 |
.left {
|
640 |
float:left;
|
wppa-adminbar.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* enhances the admin bar with wppa+ menu
|
6 |
-
* Version 8.3.01.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -62,13 +62,6 @@ function wppa_admin_bar_menu() {
|
|
62 |
'href' => admin_url( 'admin.php?page=wppa_import_photos' )
|
63 |
);
|
64 |
}
|
65 |
-
if ( current_user_can( 'wppa_moderate' ) ) {
|
66 |
-
$menu_items['moderate'] = array(
|
67 |
-
'parent' => $wppaplus,
|
68 |
-
'title' => __( 'Moderate', 'wp-photo-album-plus' ) . $tot_pending,
|
69 |
-
'href' => admin_url( 'admin.php?page=wppa_moderate_photos' )
|
70 |
-
);
|
71 |
-
}
|
72 |
if ( current_user_can( 'wppa_export' ) ) {
|
73 |
$menu_items['export'] = array(
|
74 |
'parent' => $wppaplus,
|
@@ -76,13 +69,6 @@ function wppa_admin_bar_menu() {
|
|
76 |
'href' => admin_url( 'admin.php?page=wppa_export_photos' )
|
77 |
);
|
78 |
}
|
79 |
-
if ( current_user_can( 'wppa_settings' ) ) {
|
80 |
-
$menu_items['settings'] = array(
|
81 |
-
'parent' => $wppaplus,
|
82 |
-
'title' => __( 'Settings', 'wp-photo-album-plus' ),
|
83 |
-
'href' => admin_url( 'admin.php?page=wppa_options' )
|
84 |
-
);
|
85 |
-
}
|
86 |
if ( current_user_can( 'wppa_comments' ) && wppa_switch( 'show_comments' ) ) {
|
87 |
$menu_items['comments'] = array(
|
88 |
'parent' => $wppaplus,
|
@@ -90,6 +76,20 @@ function wppa_admin_bar_menu() {
|
|
90 |
'href' => admin_url( 'admin.php?page=wppa_manage_comments' )
|
91 |
);
|
92 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
if ( current_user_can( 'wppa_admin' ) && wppa_switch( 'opt_menu_search' ) ) {
|
94 |
$menu_items['search'] = array(
|
95 |
'parent' => $wppaplus,
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* enhances the admin bar with wppa+ menu
|
6 |
+
* Version 8.3.01.003
|
7 |
*
|
8 |
*/
|
9 |
|
62 |
'href' => admin_url( 'admin.php?page=wppa_import_photos' )
|
63 |
);
|
64 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
if ( current_user_can( 'wppa_export' ) ) {
|
66 |
$menu_items['export'] = array(
|
67 |
'parent' => $wppaplus,
|
69 |
'href' => admin_url( 'admin.php?page=wppa_export_photos' )
|
70 |
);
|
71 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
if ( current_user_can( 'wppa_comments' ) && wppa_switch( 'show_comments' ) ) {
|
73 |
$menu_items['comments'] = array(
|
74 |
'parent' => $wppaplus,
|
76 |
'href' => admin_url( 'admin.php?page=wppa_manage_comments' )
|
77 |
);
|
78 |
}
|
79 |
+
if ( current_user_can( 'wppa_moderate' ) ) {
|
80 |
+
$menu_items['moderate'] = array(
|
81 |
+
'parent' => $wppaplus,
|
82 |
+
'title' => __( 'Moderate', 'wp-photo-album-plus' ) . $tot_pending,
|
83 |
+
'href' => admin_url( 'admin.php?page=wppa_moderate_photos' )
|
84 |
+
);
|
85 |
+
}
|
86 |
+
if ( current_user_can( 'wppa_settings' ) ) {
|
87 |
+
$menu_items['settings'] = array(
|
88 |
+
'parent' => $wppaplus,
|
89 |
+
'title' => __( 'Settings', 'wp-photo-album-plus' ),
|
90 |
+
'href' => admin_url( 'admin.php?page=wppa_options' )
|
91 |
+
);
|
92 |
+
}
|
93 |
if ( current_user_can( 'wppa_admin' ) && wppa_switch( 'opt_menu_search' ) ) {
|
94 |
$menu_items['search'] = array(
|
95 |
'parent' => $wppaplus,
|
wppa-album-admin-autosave.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* create, edit and delete albums
|
6 |
-
* Version 8.3.01.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -2094,7 +2094,7 @@ jQuery(document).ready(function(){wppaGetCoverPreview( '.$id.', "cover-preview-"
|
|
2094 |
/* Manage photos section */
|
2095 |
{
|
2096 |
wppa_echo( '
|
2097 |
-
<div class="wppa-table-wrap" style="margin-top:20px;clear:both;position:relative;">' );
|
2098 |
|
2099 |
// wppa_echo( '<a name="manage-photos" id="manage-photos" ></a><h2 style="padding-left:12px">' );
|
2100 |
|
@@ -2830,6 +2830,8 @@ global $wpdb;
|
|
2830 |
|
2831 |
wppa_echo( '</div>' ); // Close action contatiner
|
2832 |
|
|
|
|
|
2833 |
$result = '
|
2834 |
<table class="widefat wppa-table wppa-setting-table" style="margin:12px 0">
|
2835 |
<thead>';
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* create, edit and delete albums
|
6 |
+
* Version 8.3.01.003
|
7 |
*
|
8 |
*/
|
9 |
|
2094 |
/* Manage photos section */
|
2095 |
{
|
2096 |
wppa_echo( '
|
2097 |
+
<div class="wppa-table-wrap" style="margin-top:20px;clear:both;position:relative;border:none;">' );
|
2098 |
|
2099 |
// wppa_echo( '<a name="manage-photos" id="manage-photos" ></a><h2 style="padding-left:12px">' );
|
2100 |
|
2830 |
|
2831 |
wppa_echo( '</div>' ); // Close action contatiner
|
2832 |
|
2833 |
+
wppa_echo( '<hr style="width:100%;clear:both;" />' );
|
2834 |
+
|
2835 |
$result = '
|
2836 |
<table class="widefat wppa-table wppa-setting-table" style="margin:12px 0">
|
2837 |
<thead>';
|
wppa-listtable.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* Copy of wp version
|
6 |
* Modified by OpaJaap
|
7 |
-
* Version 8.3.01.
|
8 |
*
|
9 |
*/
|
10 |
|
@@ -69,8 +69,8 @@ class WPPA_List_Table {
|
|
69 |
|
70 |
if ( empty( $this->modes ) ) {
|
71 |
$this->modes = array(
|
72 |
-
'list' =>
|
73 |
-
'excerpt' =>
|
74 |
);
|
75 |
}
|
76 |
}
|
@@ -206,7 +206,7 @@ class WPPA_List_Table {
|
|
206 |
__METHOD__,
|
207 |
sprintf(
|
208 |
/* translators: %s: The $link_data argument. */
|
209 |
-
|
210 |
'<code>$link_data</code>'
|
211 |
),
|
212 |
'6.1.0'
|
@@ -223,7 +223,7 @@ class WPPA_List_Table {
|
|
223 |
__METHOD__,
|
224 |
sprintf(
|
225 |
/* translators: %1$s: The argument name. %2$s: The view name. */
|
226 |
-
|
227 |
'<code>url</code>',
|
228 |
'<code>' . esc_html( $view ) . '</code>'
|
229 |
),
|
@@ -238,7 +238,7 @@ class WPPA_List_Table {
|
|
238 |
__METHOD__,
|
239 |
sprintf(
|
240 |
/* translators: %1$s: The argument name. %2$s: The view name. */
|
241 |
-
|
242 |
'<code>label</code>',
|
243 |
'<code>' . esc_html( $view ) . '</code>'
|
244 |
),
|
@@ -325,9 +325,9 @@ class WPPA_List_Table {
|
|
325 |
return;
|
326 |
}
|
327 |
|
328 |
-
echo '<label for="bulk-action-selector-' . esc_attr( $which ) . '" class="screen-reader-text">' .
|
329 |
echo '<select name="action' . $two . '" id="bulk-action-selector-' . esc_attr( $which ) . "\">\n";
|
330 |
-
echo '<option value="-1">' .
|
331 |
|
332 |
foreach ( $this->_actions as $key => $value ) {
|
333 |
if ( is_array( $value ) ) {
|
@@ -348,7 +348,7 @@ class WPPA_List_Table {
|
|
348 |
|
349 |
echo "</select>\n";
|
350 |
|
351 |
-
submit_button(
|
352 |
echo "\n";
|
353 |
}
|
354 |
|
@@ -393,7 +393,7 @@ class WPPA_List_Table {
|
|
393 |
|
394 |
$output .= '</div>';
|
395 |
|
396 |
-
$output .= '<button type="button" class="toggle-row"><span class="screen-reader-text">' .
|
397 |
|
398 |
return $output;
|
399 |
}
|
@@ -481,7 +481,7 @@ class WPPA_List_Table {
|
|
481 |
selected( $m, $year . $month, false ),
|
482 |
esc_attr( $arc_row->year . $month ),
|
483 |
/* translators: 1: Month name, 2: 4-digit year. */
|
484 |
-
sprintf(
|
485 |
);
|
486 |
}
|
487 |
?>
|
@@ -545,7 +545,7 @@ class WPPA_List_Table {
|
|
545 |
// No comments at all.
|
546 |
printf(
|
547 |
'<span aria-hidden="true">—</span><span class="screen-reader-text">%s</span>',
|
548 |
-
|
549 |
);
|
550 |
} elseif ( $approved_comments && 'trash' === get_post_status( $post_id ) ) {
|
551 |
// Don't link the comment bubble for a trashed post.
|
@@ -575,7 +575,7 @@ class WPPA_List_Table {
|
|
575 |
printf(
|
576 |
'<span class="post-com-count post-com-count-no-comments"><span class="comment-count comment-count-no-comments" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></span>',
|
577 |
$approved_comments_number,
|
578 |
-
$pending_comments ?
|
579 |
);
|
580 |
}
|
581 |
|
@@ -598,7 +598,7 @@ class WPPA_List_Table {
|
|
598 |
printf(
|
599 |
'<span class="post-com-count post-com-count-pending post-com-count-no-pending"><span class="comment-count comment-count-no-pending" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></span>',
|
600 |
$pending_comments_number,
|
601 |
-
$approved_comments ?
|
602 |
);
|
603 |
}
|
604 |
}
|
@@ -661,6 +661,12 @@ class WPPA_List_Table {
|
|
661 |
}
|
662 |
|
663 |
$total_items = $this->_pagination_args['total_items'];
|
|
|
|
|
|
|
|
|
|
|
|
|
664 |
$total_pages = $this->_pagination_args['total_pages'];
|
665 |
$infinite_scroll = false;
|
666 |
if ( isset( $this->_pagination_args['infinite_scroll'] ) ) {
|
@@ -709,7 +715,7 @@ class WPPA_List_Table {
|
|
709 |
$page_links[] = sprintf(
|
710 |
"<a class='first-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
|
711 |
esc_url( remove_query_arg( 'paged', $current_url ) ),
|
712 |
-
|
713 |
'«'
|
714 |
);
|
715 |
}
|
@@ -720,18 +726,18 @@ class WPPA_List_Table {
|
|
720 |
$page_links[] = sprintf(
|
721 |
"<a class='prev-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
|
722 |
esc_url( add_query_arg( 'paged', max( 1, $current - 1 ), $current_url ) ),
|
723 |
-
|
724 |
'‹'
|
725 |
);
|
726 |
}
|
727 |
|
728 |
if ( 'bottom' === $which ) {
|
729 |
$html_current_page = $current;
|
730 |
-
$total_pages_before = '<span class="screen-reader-text">' .
|
731 |
} else {
|
732 |
$html_current_page = sprintf(
|
733 |
"%s<input class='current-page' id='current-page-selector' type='text' name='paged' value='%s' size='%d' aria-describedby='table-paging' /><span class='tablenav-paging-text'>",
|
734 |
-
'<label for="current-page-selector" class="screen-reader-text">' .
|
735 |
$current,
|
736 |
strlen( $total_pages )
|
737 |
);
|
@@ -750,7 +756,7 @@ class WPPA_List_Table {
|
|
750 |
$page_links[] = sprintf(
|
751 |
"<a class='next-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
|
752 |
esc_url( add_query_arg( 'paged', min( $total_pages, $current + 1 ), $current_url ) ),
|
753 |
-
|
754 |
'›'
|
755 |
);
|
756 |
}
|
@@ -761,7 +767,7 @@ class WPPA_List_Table {
|
|
761 |
$page_links[] = sprintf(
|
762 |
"<a class='last-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
|
763 |
esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
|
764 |
-
|
765 |
'»'
|
766 |
);
|
767 |
}
|
@@ -777,7 +783,7 @@ class WPPA_List_Table {
|
|
777 |
} else {
|
778 |
$page_class = ' no-pages';
|
779 |
}
|
780 |
-
|
781 |
/**/
|
782 |
// Added by OpaJaap: page size selector
|
783 |
$ps = $this->_pagination_args['per_page']; // current pagesize
|
@@ -785,7 +791,7 @@ class WPPA_List_Table {
|
|
785 |
$current_url = remove_query_arg( 'paged', $current_url );
|
786 |
$output .= '
|
787 |
<span>' . __( 'Page size', 'wp-photo-album-plus' ) . '
|
788 |
-
<select
|
789 |
style="margin-bottom:3px"
|
790 |
onchange="jQuery( \'#wppa-admin-spinner\' ).show();document.location.href=\''.$current_url.'&paged=1&wppa-pagesize=\'+this.value;"
|
791 |
>
|
@@ -798,7 +804,7 @@ class WPPA_List_Table {
|
|
798 |
</select>
|
799 |
</span>';
|
800 |
/**/
|
801 |
-
|
802 |
$this->_pagination = "<div class='tablenav-pages{$page_class}'>$output</div>";
|
803 |
|
804 |
echo $this->_pagination;
|
@@ -992,7 +998,7 @@ class WPPA_List_Table {
|
|
992 |
|
993 |
if ( ! empty( $columns['cb'] ) ) {
|
994 |
static $cb_counter = 1;
|
995 |
-
$columns['cb'] = '<label class="screen-reader-text" for="cb-select-all-' . $cb_counter . '">' .
|
996 |
. '<input id="cb-select-all-' . $cb_counter . '" type="checkbox" />';
|
997 |
$cb_counter++;
|
998 |
}
|
@@ -1258,7 +1264,7 @@ class WPPA_List_Table {
|
|
1258 |
* if the current column is not the primary column.
|
1259 |
*/
|
1260 |
protected function handle_row_actions( $item, $column_name, $primary ) {
|
1261 |
-
return $column_name === $primary ? '<button type="button" class="toggle-row"><span class="screen-reader-text">' .
|
1262 |
}
|
1263 |
|
1264 |
/**
|
4 |
*
|
5 |
* Copy of wp version
|
6 |
* Modified by OpaJaap
|
7 |
+
* Version 8.3.01.003
|
8 |
*
|
9 |
*/
|
10 |
|
69 |
|
70 |
if ( empty( $this->modes ) ) {
|
71 |
$this->modes = array(
|
72 |
+
'list' => ( 'Compact view' ),
|
73 |
+
'excerpt' => ( 'Extended view' ),
|
74 |
);
|
75 |
}
|
76 |
}
|
206 |
__METHOD__,
|
207 |
sprintf(
|
208 |
/* translators: %s: The $link_data argument. */
|
209 |
+
( 'The %s argument must be an array.' ),
|
210 |
'<code>$link_data</code>'
|
211 |
),
|
212 |
'6.1.0'
|
223 |
__METHOD__,
|
224 |
sprintf(
|
225 |
/* translators: %1$s: The argument name. %2$s: The view name. */
|
226 |
+
( 'The %1$s argument must be a non-empty string for %2$s.' ),
|
227 |
'<code>url</code>',
|
228 |
'<code>' . esc_html( $view ) . '</code>'
|
229 |
),
|
238 |
__METHOD__,
|
239 |
sprintf(
|
240 |
/* translators: %1$s: The argument name. %2$s: The view name. */
|
241 |
+
( 'The %1$s argument must be a non-empty string for %2$s.' ),
|
242 |
'<code>label</code>',
|
243 |
'<code>' . esc_html( $view ) . '</code>'
|
244 |
),
|
325 |
return;
|
326 |
}
|
327 |
|
328 |
+
echo '<label for="bulk-action-selector-' . esc_attr( $which ) . '" class="screen-reader-text">' . ( 'Select bulk action' ) . '</label>';
|
329 |
echo '<select name="action' . $two . '" id="bulk-action-selector-' . esc_attr( $which ) . "\">\n";
|
330 |
+
echo '<option value="-1">' . ( 'Bulk actions' ) . "</option>\n";
|
331 |
|
332 |
foreach ( $this->_actions as $key => $value ) {
|
333 |
if ( is_array( $value ) ) {
|
348 |
|
349 |
echo "</select>\n";
|
350 |
|
351 |
+
submit_button( ( 'Apply' ), 'action', '', false, array( 'id' => "doaction$two" ) );
|
352 |
echo "\n";
|
353 |
}
|
354 |
|
393 |
|
394 |
$output .= '</div>';
|
395 |
|
396 |
+
$output .= '<button type="button" class="toggle-row"><span class="screen-reader-text">' . ( 'Show more details' ) . '</span></button>';
|
397 |
|
398 |
return $output;
|
399 |
}
|
481 |
selected( $m, $year . $month, false ),
|
482 |
esc_attr( $arc_row->year . $month ),
|
483 |
/* translators: 1: Month name, 2: 4-digit year. */
|
484 |
+
sprintf( ( '%1$s %2$d' ), $wp_locale->get_month( $month ), $year )
|
485 |
);
|
486 |
}
|
487 |
?>
|
545 |
// No comments at all.
|
546 |
printf(
|
547 |
'<span aria-hidden="true">—</span><span class="screen-reader-text">%s</span>',
|
548 |
+
( 'No comments' )
|
549 |
);
|
550 |
} elseif ( $approved_comments && 'trash' === get_post_status( $post_id ) ) {
|
551 |
// Don't link the comment bubble for a trashed post.
|
575 |
printf(
|
576 |
'<span class="post-com-count post-com-count-no-comments"><span class="comment-count comment-count-no-comments" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></span>',
|
577 |
$approved_comments_number,
|
578 |
+
$pending_comments ? ( 'No approved comments' ) : ( 'No comments' )
|
579 |
);
|
580 |
}
|
581 |
|
598 |
printf(
|
599 |
'<span class="post-com-count post-com-count-pending post-com-count-no-pending"><span class="comment-count comment-count-no-pending" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></span>',
|
600 |
$pending_comments_number,
|
601 |
+
$approved_comments ? ( 'No pending comments' ) : ( 'No comments' )
|
602 |
);
|
603 |
}
|
604 |
}
|
661 |
}
|
662 |
|
663 |
$total_items = $this->_pagination_args['total_items'];
|
664 |
+
|
665 |
+
// By opaJaap, if less than one full page of the smallest kind, ignore baging
|
666 |
+
if ( $total_items < '21' ) {
|
667 |
+
return;
|
668 |
+
} // End mod
|
669 |
+
|
670 |
$total_pages = $this->_pagination_args['total_pages'];
|
671 |
$infinite_scroll = false;
|
672 |
if ( isset( $this->_pagination_args['infinite_scroll'] ) ) {
|
715 |
$page_links[] = sprintf(
|
716 |
"<a class='first-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
|
717 |
esc_url( remove_query_arg( 'paged', $current_url ) ),
|
718 |
+
( 'First page' ),
|
719 |
'«'
|
720 |
);
|
721 |
}
|
726 |
$page_links[] = sprintf(
|
727 |
"<a class='prev-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
|
728 |
esc_url( add_query_arg( 'paged', max( 1, $current - 1 ), $current_url ) ),
|
729 |
+
( 'Previous page' ),
|
730 |
'‹'
|
731 |
);
|
732 |
}
|
733 |
|
734 |
if ( 'bottom' === $which ) {
|
735 |
$html_current_page = $current;
|
736 |
+
$total_pages_before = '<span class="screen-reader-text">' . ( 'Current Page' ) . '</span><span id="table-paging" class="paging-input"><span class="tablenav-paging-text">';
|
737 |
} else {
|
738 |
$html_current_page = sprintf(
|
739 |
"%s<input class='current-page' id='current-page-selector' type='text' name='paged' value='%s' size='%d' aria-describedby='table-paging' /><span class='tablenav-paging-text'>",
|
740 |
+
'<label for="current-page-selector" class="screen-reader-text">' . ( 'Current Page' ) . '</label>',
|
741 |
$current,
|
742 |
strlen( $total_pages )
|
743 |
);
|
756 |
$page_links[] = sprintf(
|
757 |
"<a class='next-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
|
758 |
esc_url( add_query_arg( 'paged', min( $total_pages, $current + 1 ), $current_url ) ),
|
759 |
+
( 'Next page' ),
|
760 |
'›'
|
761 |
);
|
762 |
}
|
767 |
$page_links[] = sprintf(
|
768 |
"<a class='last-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
|
769 |
esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
|
770 |
+
( 'Last page' ),
|
771 |
'»'
|
772 |
);
|
773 |
}
|
783 |
} else {
|
784 |
$page_class = ' no-pages';
|
785 |
}
|
786 |
+
|
787 |
/**/
|
788 |
// Added by OpaJaap: page size selector
|
789 |
$ps = $this->_pagination_args['per_page']; // current pagesize
|
791 |
$current_url = remove_query_arg( 'paged', $current_url );
|
792 |
$output .= '
|
793 |
<span>' . __( 'Page size', 'wp-photo-album-plus' ) . '
|
794 |
+
<select
|
795 |
style="margin-bottom:3px"
|
796 |
onchange="jQuery( \'#wppa-admin-spinner\' ).show();document.location.href=\''.$current_url.'&paged=1&wppa-pagesize=\'+this.value;"
|
797 |
>
|
804 |
</select>
|
805 |
</span>';
|
806 |
/**/
|
807 |
+
|
808 |
$this->_pagination = "<div class='tablenav-pages{$page_class}'>$output</div>";
|
809 |
|
810 |
echo $this->_pagination;
|
998 |
|
999 |
if ( ! empty( $columns['cb'] ) ) {
|
1000 |
static $cb_counter = 1;
|
1001 |
+
$columns['cb'] = '<label class="screen-reader-text" for="cb-select-all-' . $cb_counter . '">' . ( 'Select All' ) . '</label>'
|
1002 |
. '<input id="cb-select-all-' . $cb_counter . '" type="checkbox" />';
|
1003 |
$cb_counter++;
|
1004 |
}
|
1264 |
* if the current column is not the primary column.
|
1265 |
*/
|
1266 |
protected function handle_row_actions( $item, $column_name, $primary ) {
|
1267 |
+
return $column_name === $primary ? '<button type="button" class="toggle-row"><span class="screen-reader-text">' . ( 'Show more details' ) . '</span></button>' : '';
|
1268 |
}
|
1269 |
|
1270 |
/**
|
wppa-photo-admin-autosave.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* edit and delete photos
|
6 |
-
* Version 8.3.01.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -58,7 +58,7 @@ function _wppa_moderate_photos() {
|
|
58 |
wppa_echo( '
|
59 |
<div class="wrap">
|
60 |
<h1 class="wp-heading-inline">' .
|
61 |
-
esc_html__( 'Edit
|
62 |
</h1>' .
|
63 |
wppa_get( 'just-edit' ) );
|
64 |
wppa_album_photos( '', $photo, '', false );
|
@@ -90,6 +90,8 @@ global $wpdb;
|
|
90 |
|
91 |
$quick = wppa_get( 'quick' );
|
92 |
$slug = 'photo_admin';
|
|
|
|
|
93 |
if ( ! $a ) {
|
94 |
$slug .= '_' . $album;
|
95 |
}
|
@@ -97,12 +99,13 @@ global $wpdb;
|
|
97 |
|
98 |
$parms = wppa_get_paging_parms( $slug );
|
99 |
|
100 |
-
$pagesize = $parms['pagesize'];
|
101 |
-
$page = $parms['page'];
|
102 |
|
103 |
if ( ! is_numeric( $page ) ) $page = 1;
|
104 |
$skip = ( $page - '1' ) * $pagesize;
|
105 |
$album_is_obvious = false;
|
|
|
106 |
|
107 |
// Edit the photos in a specific album
|
108 |
if ( $album ) {
|
@@ -181,29 +184,8 @@ global $wpdb;
|
|
181 |
$link = '';
|
182 |
}
|
183 |
|
184 |
-
// Are there photos with pending comments?
|
185 |
-
else {
|
186 |
-
|
187 |
-
// Find pending comments
|
188 |
-
$cmt = $wpdb->get_results( "SELECT photo FROM $wpdb->wppa_comments
|
189 |
-
WHERE status = 'pending'
|
190 |
-
OR status = 'spam'", ARRAY_A );
|
191 |
-
|
192 |
-
$photos = array();
|
193 |
-
|
194 |
-
if ( is_array( $cmt ) && count( $cmt ) ) {
|
195 |
-
|
196 |
-
foreach( $cmt as $id ) {
|
197 |
-
$photos[] = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
|
198 |
-
WHERE id = %d", $id ), ARRAY_A );
|
199 |
-
}
|
200 |
-
$count = count( $photos );
|
201 |
-
}
|
202 |
-
$link = get_admin_url() . 'admin.php?page=wppa_moderate_photos&wppa-nonce=' . wp_create_nonce( 'wppa-nonce' );
|
203 |
-
}
|
204 |
-
|
205 |
// Are there photos to moderate?
|
206 |
-
|
207 |
|
208 |
$photos = $wpdb->get_results( "SELECT * FROM $wpdb->wppa_photos
|
209 |
WHERE status = 'pending'
|
@@ -211,36 +193,27 @@ global $wpdb;
|
|
211 |
$count = count( $photos );
|
212 |
}
|
213 |
|
214 |
-
//
|
215 |
-
if ( empty( $photos ) ) {
|
216 |
-
|
217 |
-
// Single photo moderate requested
|
218 |
-
if ( $photo ) {
|
219 |
-
wppa_echo( '<p>' . esc_html__( 'This photo is no longer awaiting moderation.' , 'wp-photo-album-plus' ) . '</p>' );
|
220 |
-
}
|
221 |
-
|
222 |
-
// Multiple photos to moderate requested
|
223 |
-
else {
|
224 |
-
wppa_echo( '<p>' . esc_html__( 'There are no photos awaiting moderation at this time.', 'wp-photo-album-plus' ) . '</p>' );
|
225 |
-
}
|
226 |
|
227 |
-
|
228 |
-
|
229 |
-
|
|
|
230 |
|
231 |
-
|
232 |
-
|
233 |
-
LIMIT %d, %d", $skip, $pagesize ), ARRAY_A );
|
234 |
|
235 |
-
|
236 |
-
$
|
|
|
237 |
}
|
|
|
238 |
|
239 |
-
|
240 |
-
|
241 |
-
return;
|
242 |
}
|
243 |
}
|
|
|
244 |
}
|
245 |
|
246 |
// If not one of the cases above apply, log error and quit
|
@@ -249,12 +222,53 @@ global $wpdb;
|
|
249 |
return;
|
250 |
}
|
251 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
252 |
// Quick edit skips a few time consuming settings like copy and move to other album
|
253 |
$quick = wppa_get( 'quick' );
|
254 |
if ( $link && $quick ) $link .= '&quick=1';
|
255 |
|
256 |
// In case it is a seaerch and edit, show the search statistics
|
257 |
-
|
|
|
|
|
258 |
|
259 |
// If no photos selected produce appropriate message and quit
|
260 |
if ( empty( $photos ) ) {
|
@@ -653,7 +667,8 @@ function wppaTryScheduledel( id ) {
|
|
653 |
'width' => '160',
|
654 |
'height' => '160' * $videoy / $videox,
|
655 |
'controls' => false,
|
656 |
-
'use_thumb' => true
|
|
|
657 |
) ) . '
|
658 |
</a>' );
|
659 |
|
@@ -697,7 +712,7 @@ function wppaTryScheduledel( id ) {
|
|
697 |
id="thumburl-' . $id . '"' .
|
698 |
( wppa_lazy() && $count > '1' ? ' data-' : ' ' ) . 'src="' . esc_url( $src ) . '"
|
699 |
alt="' . esc_attr( $name ) . '"
|
700 |
-
style="max-width:160px;vertical-align:middle"
|
701 |
/>
|
702 |
</a>' );
|
703 |
|
@@ -734,36 +749,136 @@ function wppaTryScheduledel( id ) {
|
|
734 |
|
735 |
wppa_echo( '</div>' );
|
736 |
}
|
737 |
-
wppa_echo( '<h1 style="display:inline;vertical-align:bottom;">' . wppa_get_photo_name( $id ) . '</h1>' );
|
738 |
|
739 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
740 |
{
|
741 |
-
$
|
742 |
-
$
|
743 |
|
744 |
// Clicks
|
745 |
if ( wppa_switch( 'track_clickcounts' ) ) {
|
746 |
-
$
|
747 |
-
$
|
748 |
}
|
749 |
|
750 |
// Views
|
751 |
if ( wppa_switch( 'track_viewcounts' ) ) {
|
752 |
-
$
|
753 |
-
$
|
754 |
}
|
755 |
|
756 |
// Downloads. Only photos are downloadable
|
757 |
if ( ! wppa_is_multi( $id ) ) {
|
758 |
-
$
|
759 |
-
$
|
760 |
}
|
761 |
-
}
|
762 |
-
|
763 |
-
// Get the rating stats
|
764 |
-
{
|
765 |
-
$th_2 = array();
|
766 |
-
$td_2 = array();
|
767 |
|
768 |
// Rating
|
769 |
$entries = wppa_get_rating_count_by_id( $id );
|
@@ -774,7 +889,9 @@ function wppaTryScheduledel( id ) {
|
|
774 |
}
|
775 |
else {
|
776 |
$label = __( 'Rating (#, avg)', 'wp-photo-album-plus' );
|
777 |
-
$
|
|
|
|
|
778 |
}
|
779 |
}
|
780 |
else {
|
@@ -782,48 +899,60 @@ function wppaTryScheduledel( id ) {
|
|
782 |
$value = __( 'None', 'wp-photo-album-plus' );
|
783 |
}
|
784 |
|
785 |
-
$
|
786 |
-
$
|
787 |
|
788 |
// Dislikes
|
789 |
$dislikes = wppa_dislike_get( $id );
|
790 |
if ( $dislikes ) {
|
791 |
-
$
|
792 |
-
$
|
793 |
}
|
794 |
|
795 |
// Pending votes
|
796 |
$pending = wppa_pendrat_get( $id );
|
797 |
if ( $pending ) {
|
798 |
-
$
|
799 |
-
$
|
800 |
}
|
801 |
}
|
802 |
|
803 |
// Display the stats
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
}
|
817 |
-
|
818 |
-
$table .= '<thead><tr><th style="min-width: 100px; text-align: left;">' . implode('</th><th style="min-width: 100px; text-align: left;">', $header[1]) . '</th></tr></thead>';
|
819 |
-
$table .= '<tbody><tr><td>' . implode('</td><td>', $rows[1]) . '</td></tr></tbody>';
|
820 |
-
$table .= '<thead><tr><th style="text-align: left;">' . implode('</th><th style="text-align: left;">', $header[2]) . '</th></tr></thead>';
|
821 |
-
$table .= '<tbody><tr><td>' . implode('</td><td>', $rows[2]) . '</td></tr></tbody>';
|
822 |
|
823 |
-
|
824 |
|
825 |
-
|
826 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
827 |
|
828 |
wppa_echo( '
|
829 |
</div>' );
|
@@ -836,11 +965,11 @@ function wppaTryScheduledel( id ) {
|
|
836 |
|
837 |
// Open the details area
|
838 |
wppa_echo( '
|
839 |
-
<details class="wppa-toplevel-details" ' . ( $timestamp > time() - 3600 ? 'open' : '' ) . '>
|
840 |
<summary class="toplevel wppa-summary-sublevel"> ' .
|
841 |
$details . '
|
842 |
</summary>' );
|
843 |
-
|
844 |
// Update status field
|
845 |
{
|
846 |
wppa_echo( '
|
@@ -854,7 +983,7 @@ function wppaTryScheduledel( id ) {
|
|
854 |
</span>
|
855 |
</h3>' );
|
856 |
}
|
857 |
-
|
858 |
// The tabs
|
859 |
$ptitle = __( 'Photo', 'wp-photo-album-plus' );
|
860 |
if ( wppa_is_video( $id ) ) $ptitle = __( 'Video', 'wp-photo-album-plus' );
|
@@ -874,15 +1003,28 @@ function wppaTryScheduledel( id ) {
|
|
874 |
}
|
875 |
if ( ! $quick && ! empty( $exifs ) ) {
|
876 |
$result .= '
|
877 |
-
<li
|
|
|
|
|
|
|
|
|
878 |
}
|
879 |
if ( ! $quick && ! empty( $iptcs ) ) {
|
880 |
$result .= '
|
881 |
-
<li
|
|
|
|
|
|
|
|
|
882 |
}
|
883 |
if ( ! $quick && ! empty( $comments ) ) {
|
884 |
$result .= '
|
885 |
-
<li
|
|
|
|
|
|
|
|
|
|
|
886 |
}
|
887 |
$result .= '
|
888 |
</ul>
|
@@ -1055,6 +1197,7 @@ function wppaTryScheduledel( id ) {
|
|
1055 |
}
|
1056 |
|
1057 |
// Status
|
|
|
1058 |
if ( ! $may_edit_status ) {
|
1059 |
if ( $status == 'pending' ) $s = __( 'Pending', 'wp-photo-album-plus' );
|
1060 |
elseif ( $status == 'publish' ) $s = __( 'Publish', 'wp-photo-album-plus' );
|
@@ -1074,6 +1217,7 @@ function wppaTryScheduledel( id ) {
|
|
1074 |
</div>
|
1075 |
</div>' );
|
1076 |
}
|
|
|
1077 |
|
1078 |
// Schedule for delete
|
1079 |
if ( ! wppa_user_is_admin() && $owner != wppa_get_user() ) {
|
@@ -1130,22 +1274,6 @@ function wppaTryScheduledel( id ) {
|
|
1130 |
|
1131 |
// Owner
|
1132 |
if ( $owner_editable ) {
|
1133 |
-
/*
|
1134 |
-
wppa_echo( '
|
1135 |
-
<div class="left">
|
1136 |
-
<label
|
1137 |
-
for="owner-' . $id . '">' .
|
1138 |
-
__( 'Owned by', 'wp-photo-album-plus' ) . '
|
1139 |
-
</label><br>
|
1140 |
-
<input
|
1141 |
-
style="max-width:150px"
|
1142 |
-
id="owner-' . $id . '"
|
1143 |
-
type="text"
|
1144 |
-
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'owner\', this.value )"
|
1145 |
-
value="' . esc_attr( $owner ) . '"
|
1146 |
-
/>
|
1147 |
-
</div>' );
|
1148 |
-
*/
|
1149 |
if ( wppa_get_user_count() > wppa_opt( 'max_users' ) ) {
|
1150 |
wppa_echo( '
|
1151 |
<div class="left">
|
@@ -1250,7 +1378,7 @@ function wppaTryScheduledel( id ) {
|
|
1250 |
}
|
1251 |
|
1252 |
// Status
|
1253 |
-
if ( $may_edit_status ) {
|
1254 |
$sel = ' selected';
|
1255 |
if ( wppa_switch( 'ext_status_restricted' ) && ! wppa_user_is_admin() ) {
|
1256 |
$dis = ' disabled';
|
@@ -1677,25 +1805,6 @@ function wppaTryScheduledel( id ) {
|
|
1677 |
wppa_echo( '
|
1678 |
<div class="wppa-flex-column">' );
|
1679 |
|
1680 |
-
// Name
|
1681 |
-
wppa_echo( '
|
1682 |
-
<fieldset class="wppa-fieldset">
|
1683 |
-
<legend class="wppa-legend">' .
|
1684 |
-
__( 'Name', 'wp-photo-album-plus' ) . '
|
1685 |
-
</legend>
|
1686 |
-
<input
|
1687 |
-
type="text"
|
1688 |
-
style="width:100%"
|
1689 |
-
id="pname-' . $id . '"
|
1690 |
-
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'name\', this.value)"
|
1691 |
-
value="' . esc_attr( stripslashes( $name ) ) . '"
|
1692 |
-
/>
|
1693 |
-
<br>
|
1694 |
-
<span style="float:right">' .
|
1695 |
-
__( 'Name slug', 'wp-photo-album-plus' ) . ': ' . $sname . '
|
1696 |
-
</span>
|
1697 |
-
</fieldset>' );
|
1698 |
-
|
1699 |
// Description editable
|
1700 |
if ( ! wppa_switch( 'desc_is_restricted' ) || wppa_user_is_admin() ) {
|
1701 |
wppa_echo( '
|
@@ -1996,357 +2105,372 @@ function wppaTryScheduledel( id ) {
|
|
1996 |
<div
|
1997 |
id="photofiles-' . $id . '"
|
1998 |
class="wppa-table-wrap wppa-tabcontent-'.$id.'"
|
1999 |
-
style="position:relative;padding
|
2000 |
>' );
|
2001 |
|
2002 |
-
{
|
2003 |
wppa_echo( '
|
2004 |
-
<
|
2005 |
-
|
2006 |
-
|
2007 |
-
|
2008 |
-
|
2009 |
-
|
2010 |
-
</
|
2011 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012 |
|
2013 |
-
|
2014 |
-
|
2015 |
-
|
2016 |
-
|
2017 |
-
|
2018 |
-
|
2019 |
-
|
2020 |
-
|
2021 |
-
|
2022 |
-
|
2023 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024 |
}
|
2025 |
|
2026 |
-
|
2027 |
-
|
2028 |
-
|
2029 |
-
|
2030 |
-
|
2031 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2032 |
|
2033 |
-
// If video sizes are correct and retieved from the file,
|
2034 |
-
// and possible rotation has been into account, field needs not to be editable
|
2035 |
-
if ( $photo['videox'] == $videox && $photo['videoy'] == $videoy ) {
|
2036 |
-
wppa_echo( sprintf( __( 'Width: %d pixels, height: %d pixels', 'wp-photo-album-plus' ), $videox, $videoy ) );
|
2037 |
-
}
|
2038 |
-
else {
|
2039 |
-
wppa_echo( '
|
2040 |
-
<input
|
2041 |
-
type="text"
|
2042 |
-
style="width:50px;margin:0 4px;padding-left:8px!important"
|
2043 |
-
onchange="wppaAjaxUpdatePhoto( ' . strval( intval( $id ) ) . ', \'videox\', this.value)"
|
2044 |
-
value="' . esc_attr( $videox ) . '"
|
2045 |
-
/>px W' .
|
2046 |
-
sprintf( __( '(0=default:%s)', 'wp-photo-album-plus' ), wppa_opt( 'video_width' ) ) . '
|
2047 |
-
<input
|
2048 |
-
type="text"
|
2049 |
-
style="width:50px;margin:0 4px;padding-left:8px!important"
|
2050 |
-
onchange="wppaAjaxUpdatePhoto( ' . strval( intval( $id ) ) . ', \'videoy\', this.value)"
|
2051 |
-
value="' . esc_attr( $videoy ) . '"
|
2052 |
-
/>px H' .
|
2053 |
-
sprintf( __( '(0=default:%s)', 'wp-photo-album-plus' ), wppa_opt( 'video_height' ) ) );
|
2054 |
-
}
|
2055 |
wppa_echo( '
|
2056 |
-
|
2057 |
-
|
2058 |
-
|
2059 |
-
|
2060 |
-
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
$sizes = '';
|
2071 |
-
$paths = '';
|
2072 |
-
$urls = '';
|
2073 |
-
foreach ( $has_audio as $fmt ) {
|
2074 |
-
$formats .= $fmt . '<br>';
|
2075 |
-
$sizes .= wppa_get_filesize( str_replace( 'xxx', $fmt, wppa_get_photo_path( $id, false ) ) ) . '<br>';
|
2076 |
-
$paths .= str_replace( WPPA_UPLOAD_PATH, '.../wppa', str_replace( 'xxx', $fmt, wppa_get_photo_path( $id, false ) ) ) . '<br>';
|
2077 |
-
$url = str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, str_replace( 'xxx', $fmt, wppa_get_photo_path( $id, false ) ) );
|
2078 |
-
$urls .= '<a href="'. $url .'" target="_blank">' . $url . '<br>';
|
2079 |
}
|
2080 |
|
2081 |
-
|
2082 |
-
|
2083 |
-
<td>' .
|
2084 |
-
$formats . '
|
2085 |
-
</td>
|
2086 |
-
<td>' .
|
2087 |
-
$sizes . '
|
2088 |
-
</td>
|
2089 |
-
<td>' .
|
2090 |
-
$paths . '
|
2091 |
-
</td>
|
2092 |
-
<td>' .
|
2093 |
-
$urls . '
|
2094 |
-
</td>
|
2095 |
-
</tr>' );
|
2096 |
-
}
|
2097 |
-
|
2098 |
-
// Pdf
|
2099 |
-
if ( $is_pdf ) {
|
2100 |
|
2101 |
-
|
2102 |
-
|
2103 |
-
|
2104 |
-
|
2105 |
-
|
2106 |
-
|
2107 |
-
|
2108 |
-
|
2109 |
-
|
2110 |
-
|
2111 |
-
|
2112 |
-
|
2113 |
-
|
2114 |
-
|
2115 |
-
|
2116 |
-
|
2117 |
-
|
2118 |
-
|
2119 |
-
|
2120 |
-
|
2121 |
-
|
2122 |
-
|
2123 |
-
|
2124 |
|
2125 |
-
|
2126 |
-
|
2127 |
|
2128 |
-
|
2129 |
-
|
2130 |
-
|
2131 |
-
|
2132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2133 |
|
2134 |
-
|
2135 |
-
|
2136 |
-
|
2137 |
-
|
2138 |
-
|
2139 |
-
|
2140 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2141 |
}
|
2142 |
-
|
2143 |
-
|
2144 |
-
|
2145 |
-
|
2146 |
-
|
2147 |
-
|
2148 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2149 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2150 |
|
2151 |
-
foreach( $files as $file ) {
|
2152 |
wppa_echo( '
|
2153 |
<tr>
|
2154 |
<td>' .
|
2155 |
-
|
2156 |
</td>
|
2157 |
<td>' .
|
2158 |
-
$
|
2159 |
</td>
|
2160 |
<td>' .
|
2161 |
-
$
|
2162 |
</td>
|
2163 |
<td>
|
2164 |
-
<a href="'.$
|
2165 |
-
$
|
2166 |
</a>
|
2167 |
</td>
|
2168 |
</tr>' );
|
2169 |
}
|
2170 |
}
|
2171 |
-
}
|
2172 |
|
2173 |
-
|
2174 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2175 |
|
2176 |
-
|
2177 |
-
|
2178 |
-
$dsp = wppa_fix_poster_ext( wppa_get_photo_path( $id ), $id );
|
2179 |
-
$files = [];
|
2180 |
-
if ( wppa_is_file( $sp ) || wppa_is_file( $dsp ) ) {
|
2181 |
-
|
2182 |
-
if ( wppa_is_file( $sp ) ) {
|
2183 |
-
$ima = getimagesize( $sp );
|
2184 |
-
$txt = $ima['0'] . ' x ' . $ima['1'] . ' (' . sprintf('%4.2fMp', ( $ima['0'] * $ima['1'] ) / ( 1024 * 1024 ) ) . ') ' . wppa_get_filesize( $sp ) . '.';
|
2185 |
-
$files[] = ['name' => __( 'Poster source', 'wp-photo-album-plus' ),
|
2186 |
-
'path' => str_replace( WPPA_UPLOAD_PATH, '.../wppa', $sp ),
|
2187 |
-
'size' => $txt,
|
2188 |
-
'url' => str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, $sp )];
|
2189 |
-
}
|
2190 |
-
if ( wppa_is_file( $dsp ) ) {
|
2191 |
-
$ima = getimagesize( $dsp );
|
2192 |
-
$txt = $ima['0'] . ' x ' . $ima['1'] . ' (' . sprintf('%4.2fMp', ( $ima['0'] * $ima['1'] ) / ( 1024 * 1024 ) ) . ') ' . wppa_get_filesize( $dsp ) . '.';
|
2193 |
-
$files[] = ['name' => __( 'Poster display', 'wp-photo-album-plus' ),
|
2194 |
-
'path' => str_replace( WPPA_UPLOAD_PATH, '.../wppa', $dsp ),
|
2195 |
-
'size' => $txt,
|
2196 |
-
'url' => str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, $dsp )];
|
2197 |
-
}
|
2198 |
|
2199 |
-
foreach( $files as $file ) {
|
2200 |
wppa_echo( '
|
2201 |
<tr>
|
2202 |
<td>' .
|
2203 |
-
|
2204 |
</td>
|
2205 |
<td>' .
|
2206 |
-
$
|
2207 |
</td>
|
2208 |
<td>' .
|
2209 |
-
$
|
2210 |
</td>
|
2211 |
<td>
|
2212 |
-
<a href="'.$
|
2213 |
-
$
|
2214 |
</a>
|
2215 |
</td>
|
2216 |
</tr>' );
|
2217 |
}
|
2218 |
}
|
2219 |
-
}
|
2220 |
-
|
2221 |
-
// Non video, non pdf Display
|
2222 |
-
if ( ! $b_is_video && ! $is_pdf ) {
|
2223 |
-
$dp = wppa_get_photo_path( $id );
|
2224 |
-
$path = str_replace( WPPA_UPLOAD_PATH, '.../wppa', $dp );
|
2225 |
-
$url = str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, $dp );
|
2226 |
-
|
2227 |
-
if ( is_file( $dp ) ) {
|
2228 |
-
|
2229 |
-
$txt = '
|
2230 |
-
<span id="photox-' . $id . '">' . wppa_get_photox( $id ) . '</span> x
|
2231 |
-
<span id="photoy-' . $id . '">' . wppa_get_photoy( $id ) . '</span>:
|
2232 |
-
(<span id="photofilesize-' . $id . '">' . wppa_get_filesize( $dp ) . '</span>)';
|
2233 |
-
|
2234 |
-
wppa_echo( '
|
2235 |
-
<tr>
|
2236 |
-
<td>' .
|
2237 |
-
__( 'Display file', 'wp-photo-album-plus' ) . '
|
2238 |
-
</td>
|
2239 |
-
<td>' .
|
2240 |
-
$txt . '
|
2241 |
-
</td>
|
2242 |
-
<td>' .
|
2243 |
-
$path . '
|
2244 |
-
</td>
|
2245 |
-
<td>
|
2246 |
-
<a href="'.$url.'" target="_blank">' .
|
2247 |
-
$url . '
|
2248 |
-
</a>
|
2249 |
-
</td>
|
2250 |
-
</tr>' );
|
2251 |
-
}
|
2252 |
-
}
|
2253 |
-
|
2254 |
-
// Thumbnail
|
2255 |
-
if ( true ) {
|
2256 |
-
$tp = wppa_get_thumb_path( $id );
|
2257 |
-
if ( is_file( $tp ) ) {
|
2258 |
-
$txt = '
|
2259 |
-
<span id="thumbx-' . $id . '">' . wppa_get_thumbx( $id ) . '</span> x
|
2260 |
-
<span id="thumby-' . $id . '">' . wppa_get_thumby( $id ) . '</span>:
|
2261 |
-
(<span id="thumbfilesize-' . $id . '">' . wppa_get_filesize( $tp ) . '</span>)
|
2262 |
-
|
2263 |
-
<input
|
2264 |
-
type="checkbox"' .
|
2265 |
-
( $thumblock ? ' checked' : '' ) . '
|
2266 |
-
onchange="wppaAjaxUpdatePhoto( ' . strval( intval( $id ) ) . ', \'thumblock\', jQuery(this).prop(\'checked\') ? 1 : 0 )" /> ' .
|
2267 |
-
__( 'Locked', 'wp-photo-album-plus' );
|
2268 |
-
|
2269 |
-
$path = str_replace( WPPA_UPLOAD_PATH, '.../wppa', $tp );
|
2270 |
-
$url = str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, $tp );
|
2271 |
-
|
2272 |
-
wppa_echo( '
|
2273 |
-
<tr>
|
2274 |
-
<td>' .
|
2275 |
-
__( 'Thumbnail', 'wp-photo-album-plus' ) . '
|
2276 |
-
</td>
|
2277 |
-
<td>' .
|
2278 |
-
$txt . '
|
2279 |
-
</td>
|
2280 |
-
<td>' .
|
2281 |
-
$path . '
|
2282 |
-
</td>
|
2283 |
-
<td>
|
2284 |
-
<a href="'.$url.'" target="_blank">' .
|
2285 |
-
$url . '
|
2286 |
-
</a>
|
2287 |
-
</td>
|
2288 |
-
</tr>' );
|
2289 |
-
}
|
2290 |
-
}
|
2291 |
|
2292 |
-
|
2293 |
-
|
2294 |
|
2295 |
-
|
2296 |
-
|
2297 |
|
2298 |
-
|
2299 |
-
|
2300 |
-
|
2301 |
|
2302 |
-
|
2303 |
-
|
2304 |
-
|
2305 |
-
|
2306 |
-
|
2307 |
-
|
2308 |
-
|
2309 |
|
2310 |
-
|
2311 |
|
2312 |
-
|
2313 |
|
2314 |
-
|
2315 |
|
2316 |
-
|
2317 |
|
2318 |
-
|
2319 |
-
|
|
|
2320 |
}
|
2321 |
-
|
2322 |
-
$txt .= '</span>';
|
2323 |
|
2324 |
-
|
2325 |
-
|
2326 |
-
|
2327 |
-
|
2328 |
-
|
2329 |
-
|
2330 |
-
|
2331 |
-
|
2332 |
-
|
2333 |
-
|
2334 |
-
|
2335 |
-
|
2336 |
-
|
2337 |
-
|
2338 |
-
|
|
|
2339 |
}
|
|
|
|
|
|
|
|
|
2340 |
}
|
2341 |
|
2342 |
-
|
2343 |
-
</tbody>
|
2344 |
-
</table>' );
|
2345 |
-
}
|
2346 |
|
2347 |
-
// Remake displayfiles
|
2348 |
if ( ! $is_video ) {
|
2349 |
wppa_echo( '
|
|
|
|
|
|
|
|
|
|
|
2350 |
|
2351 |
<input
|
2352 |
type="button"
|
@@ -2355,13 +2479,6 @@ function wppaTryScheduledel( id ) {
|
|
2355 |
onclick="wppaAjaxUpdatePhoto( ' . $id . ', \'remake\', 0 )"
|
2356 |
value="' . esc_attr( __( 'Remake files', 'wp-photo-album-plus' ) ) . '"
|
2357 |
/>
|
2358 |
-
' );
|
2359 |
-
}
|
2360 |
-
|
2361 |
-
// Remake thumbnail
|
2362 |
-
if ( ! $is_video ) {
|
2363 |
-
wppa_echo( '
|
2364 |
-
|
2365 |
<input
|
2366 |
type="button"
|
2367 |
class="wppa-admin-button button"
|
@@ -2369,7 +2486,8 @@ function wppaTryScheduledel( id ) {
|
|
2369 |
onclick="wppaAjaxUpdatePhoto( ' . $id . ', \'remakethumb\', 0 )"
|
2370 |
value="' . esc_attr( __( 'Remake thumbnail file', 'wp-photo-album-plus' ) ) . '"
|
2371 |
/>
|
2372 |
-
|
|
|
2373 |
}
|
2374 |
|
2375 |
|
@@ -2384,340 +2502,349 @@ function wppaTryScheduledel( id ) {
|
|
2384 |
<div
|
2385 |
id="photomagic-' . $id . '"
|
2386 |
class="wppa-table-wrap wppa-tabcontent-'.$id.'"
|
2387 |
-
style="position:relative;padding
|
2388 |
>' );
|
2389 |
|
2390 |
-
{
|
2391 |
-
|
2392 |
-
// Explanation
|
2393 |
wppa_echo( '
|
2394 |
-
<
|
2395 |
-
|
2396 |
-
|
2397 |
-
|
2398 |
|
2399 |
-
// --- Actions ---
|
2400 |
-
wppa_echo( '
|
2401 |
-
<div class="wppa-flex">' );
|
2402 |
|
2403 |
{
|
2404 |
-
// Rotate left
|
2405 |
-
wppa_echo( '
|
2406 |
-
<input
|
2407 |
-
type="button"
|
2408 |
-
class="wppa-admin-button button"
|
2409 |
-
onclick="wppaTryMagick( ' . $id . ', \'magickrotleft\' )"
|
2410 |
-
value="' . esc_attr( __( 'Rotate left', 'wp-photo-album-plus' ) ) . '"
|
2411 |
-
/>' );
|
2412 |
|
2413 |
-
//
|
2414 |
wppa_echo( '
|
2415 |
-
<
|
2416 |
-
|
2417 |
-
|
2418 |
-
|
2419 |
-
value="' . esc_attr( __( 'Rotate 180°', 'wp-photo-album-plus' ) ) . '"
|
2420 |
-
/>' );
|
2421 |
|
2422 |
-
//
|
2423 |
wppa_echo( '
|
2424 |
-
<
|
2425 |
-
type="button"
|
2426 |
-
class="wppa-admin-button button"
|
2427 |
-
onclick="wppaTryMagick( ' . $id . ', \'magickrotright\' )"
|
2428 |
-
value="' . esc_attr( __( 'Rotate right', 'wp-photo-album-plus' ) ) . '"
|
2429 |
-
/>' );
|
2430 |
|
2431 |
-
|
2432 |
-
|
2433 |
-
|
2434 |
-
|
2435 |
-
|
2436 |
-
|
2437 |
-
|
2438 |
-
|
2439 |
-
|
2440 |
|
2441 |
-
|
2442 |
-
|
2443 |
-
|
2444 |
-
|
2445 |
-
|
2446 |
-
|
2447 |
-
|
2448 |
-
|
2449 |
-
/>' );
|
2450 |
|
2451 |
-
|
2452 |
-
|
2453 |
-
|
2454 |
-
|
2455 |
-
|
2456 |
-
|
2457 |
-
|
2458 |
-
|
2459 |
-
/>' );
|
2460 |
|
2461 |
-
|
2462 |
-
|
2463 |
-
|
2464 |
-
|
2465 |
-
|
2466 |
-
|
2467 |
-
|
2468 |
-
|
2469 |
-
|
2470 |
|
2471 |
-
|
2472 |
-
|
2473 |
-
|
2474 |
-
|
2475 |
-
|
2476 |
-
|
2477 |
-
|
2478 |
-
|
2479 |
-
|
2480 |
|
2481 |
-
|
2482 |
-
|
2483 |
-
|
2484 |
-
|
2485 |
-
|
2486 |
-
|
2487 |
-
|
2488 |
-
|
2489 |
-
|
2490 |
|
2491 |
-
|
2492 |
-
|
2493 |
-
|
2494 |
-
|
2495 |
-
|
2496 |
-
|
2497 |
-
|
2498 |
-
|
2499 |
-
|
2500 |
|
2501 |
-
|
2502 |
-
|
2503 |
-
|
2504 |
-
|
2505 |
-
|
2506 |
-
|
2507 |
-
|
2508 |
-
|
2509 |
-
|
2510 |
|
2511 |
-
|
2512 |
-
|
2513 |
-
|
2514 |
-
|
2515 |
-
|
2516 |
-
|
2517 |
-
|
2518 |
-
|
2519 |
-
|
2520 |
|
2521 |
-
|
2522 |
-
|
2523 |
-
|
2524 |
-
|
2525 |
-
|
2526 |
-
|
2527 |
-
|
2528 |
-
|
2529 |
-
|
2530 |
|
2531 |
-
|
2532 |
-
|
2533 |
-
|
2534 |
-
|
2535 |
-
|
2536 |
-
|
2537 |
-
|
2538 |
-
|
2539 |
-
|
2540 |
|
2541 |
-
|
2542 |
-
|
2543 |
-
|
2544 |
-
|
2545 |
-
|
2546 |
-
|
2547 |
-
|
2548 |
-
|
2549 |
-
|
2550 |
|
2551 |
-
|
2552 |
-
|
2553 |
-
|
2554 |
-
|
2555 |
-
|
2556 |
-
|
2557 |
-
|
2558 |
-
|
2559 |
-
|
2560 |
|
2561 |
-
|
2562 |
-
|
2563 |
-
|
2564 |
-
|
2565 |
-
|
2566 |
-
|
2567 |
-
|
2568 |
-
|
2569 |
-
|
2570 |
|
2571 |
-
|
2572 |
-
|
2573 |
-
|
2574 |
-
|
2575 |
-
|
2576 |
-
|
2577 |
-
|
2578 |
-
|
2579 |
-
|
2580 |
|
2581 |
-
|
2582 |
-
|
2583 |
-
|
2584 |
-
|
2585 |
-
|
2586 |
-
|
2587 |
-
|
2588 |
-
|
2589 |
-
|
2590 |
|
2591 |
-
|
2592 |
-
|
2593 |
-
|
2594 |
-
|
2595 |
-
|
2596 |
-
|
2597 |
-
|
2598 |
-
|
2599 |
-
|
2600 |
|
2601 |
-
|
2602 |
-
|
2603 |
-
|
2604 |
-
|
2605 |
-
|
2606 |
-
|
2607 |
-
|
2608 |
-
|
2609 |
-
|
2610 |
|
2611 |
-
|
2612 |
-
|
2613 |
-
|
2614 |
-
|
2615 |
-
|
2616 |
-
|
2617 |
-
|
2618 |
-
|
2619 |
-
|
2620 |
|
2621 |
-
|
2622 |
-
|
2623 |
-
|
2624 |
-
|
2625 |
-
|
2626 |
-
|
2627 |
-
|
2628 |
-
|
2629 |
-
|
2630 |
|
2631 |
-
|
2632 |
-
|
2633 |
-
|
2634 |
-
|
2635 |
-
|
2636 |
-
|
2637 |
-
|
2638 |
-
|
2639 |
-
|
2640 |
|
2641 |
-
|
2642 |
-
|
2643 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2644 |
|
2645 |
-
|
2646 |
-
|
2647 |
-
|
2648 |
-
|
2649 |
-
|
2650 |
-
|
2651 |
-
|
2652 |
-
|
2653 |
-
|
2654 |
-
<option value="1.33333"' . ( $dflt == '1.33333' ? ' selected' : '' ) . '>3:4 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2655 |
-
<option value="1.5"' . ( $dflt == '1.5' ? ' selected' : '' ) . '>2:3 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2656 |
-
<option value="1.6"' . ( $dflt == '1.6' ? ' selected' : '' ) . '>5:8 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2657 |
-
<option value="1.77777"' . ( $dflt == '1.77777' ? ' selected' : '' ) . '>9:16 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2658 |
-
<option value="2"' . ( $dflt == '2' ? ' selected' : '' ) . '>1:2 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2659 |
-
<option value="0.8"' . ( $dflt == '0.8' ? ' selected' : '' ) . '>4:5 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2660 |
-
<option value="0.75"' . ( $dflt == '0.75' ? ' selected' : '' ) . '>3:4 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2661 |
-
<option value="0.66667"' . ( $dflt == '0.66667' ? ' selected' : '' ) . '>2:3 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2662 |
-
<option value="0.625"' . ( $dflt == '0.625' ? ' selected' : '' ) . '>5:8 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2663 |
-
<option value="0.5625"' . ( $dflt == '0.5625' ? ' selected' : '' ) . '>9:16 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2664 |
-
<option value="0.5"' . ( $dflt == '0.5' ? ' selected' : '' ) . '>1:2 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2665 |
-
</select>' . $br );
|
2666 |
-
|
2667 |
-
if ( $dflt == 'ratio' ) {
|
2668 |
-
$value = $ratio;
|
2669 |
-
}
|
2670 |
-
elseif ( $dflt == 'free' ) {
|
2671 |
-
$value = '';
|
2672 |
-
}
|
2673 |
-
else {
|
2674 |
-
$value = $dflt;
|
2675 |
-
}
|
2676 |
|
2677 |
-
|
2678 |
-
|
2679 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2680 |
|
2681 |
-
|
2682 |
-
|
|
|
2683 |
|
2684 |
-
|
2685 |
-
|
2686 |
-
|
2687 |
-
|
2688 |
-
|
2689 |
-
|
2690 |
-
|
2691 |
-
|
2692 |
-
|
2693 |
-
|
2694 |
-
|
2695 |
-
|
2696 |
-
|
2697 |
-
|
2698 |
-
|
2699 |
-
|
2700 |
-
|
2701 |
-
|
2702 |
-
|
2703 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2704 |
|
2705 |
-
|
2706 |
-
|
2707 |
-
|
2708 |
-
wppa_echo( '
|
2709 |
-
<div
|
2710 |
-
class="wppa-cropper-container-wrapper">
|
2711 |
-
<img
|
2712 |
-
id="fs-img-' . $id . '"
|
2713 |
-
src="' . esc_url( wppa_get_photo_url( $id ) ) . '"
|
2714 |
-
style="float:left;max-width:100%"
|
2715 |
-
/>
|
2716 |
-
</div>' );
|
2717 |
|
2718 |
-
|
2719 |
-
|
2720 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2721 |
|
2722 |
// End Tab 3
|
2723 |
wppa_echo( '</div>' );
|
@@ -2841,6 +2968,7 @@ function wppaTryScheduledel( id ) {
|
|
2841 |
|
2842 |
|
2843 |
// Comments
|
|
|
2844 |
if ( ! $quick && ! empty( $comments ) ) {
|
2845 |
|
2846 |
wppa_echo( '
|
@@ -2901,6 +3029,9 @@ function wppaTryScheduledel( id ) {
|
|
2901 |
}
|
2902 |
wppa_echo( '<td style="padding:0 4px">' . $comment['comment'] . '</td>
|
2903 |
</tr>' );
|
|
|
|
|
|
|
2904 |
}
|
2905 |
|
2906 |
wppa_echo( '
|
@@ -2910,7 +3041,29 @@ function wppaTryScheduledel( id ) {
|
|
2910 |
</div>' );
|
2911 |
}
|
2912 |
|
2913 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2914 |
|
2915 |
wppa_echo( '
|
2916 |
<div class="clear"></div>
|
@@ -3083,7 +3236,7 @@ function wppa_album_photos_bulk( $album ) {
|
|
3083 |
}
|
3084 |
|
3085 |
$slug = 'photo_bulk';
|
3086 |
-
$a = wppa_is_int( $album ) ? $album : '0';
|
3087 |
if ( ! $a ) {
|
3088 |
$slug .= '_' . $album;
|
3089 |
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* edit and delete photos
|
6 |
+
* Version 8.3.01.003
|
7 |
*
|
8 |
*/
|
9 |
|
58 |
wppa_echo( '
|
59 |
<div class="wrap">
|
60 |
<h1 class="wp-heading-inline">' .
|
61 |
+
esc_html__( 'Edit', 'wp-photo-album-plus' ) . '
|
62 |
</h1>' .
|
63 |
wppa_get( 'just-edit' ) );
|
64 |
wppa_album_photos( '', $photo, '', false );
|
90 |
|
91 |
$quick = wppa_get( 'quick' );
|
92 |
$slug = 'photo_admin';
|
93 |
+
$is_empty = false;
|
94 |
+
|
95 |
if ( ! $a ) {
|
96 |
$slug .= '_' . $album;
|
97 |
}
|
99 |
|
100 |
$parms = wppa_get_paging_parms( $slug );
|
101 |
|
102 |
+
$pagesize = $parms['pagesize'];
|
103 |
+
$page = $parms['page'];
|
104 |
|
105 |
if ( ! is_numeric( $page ) ) $page = 1;
|
106 |
$skip = ( $page - '1' ) * $pagesize;
|
107 |
$album_is_obvious = false;
|
108 |
+
$photos = array();
|
109 |
|
110 |
// Edit the photos in a specific album
|
111 |
if ( $album ) {
|
184 |
$link = '';
|
185 |
}
|
186 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
// Are there photos to moderate?
|
188 |
+
elseif ( empty( $photos ) ) {
|
189 |
|
190 |
$photos = $wpdb->get_results( "SELECT * FROM $wpdb->wppa_photos
|
191 |
WHERE status = 'pending'
|
193 |
$count = count( $photos );
|
194 |
}
|
195 |
|
196 |
+
// Are there photos with pending comments?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
|
198 |
+
// Find pending comments
|
199 |
+
$cmt = $wpdb->get_results( "SELECT photo FROM $wpdb->wppa_comments
|
200 |
+
WHERE status = 'pending'
|
201 |
+
OR status = 'spam'", ARRAY_A );
|
202 |
|
203 |
+
$cphotos = array();
|
204 |
+
if ( is_array( $cmt ) && count( $cmt ) ) {
|
|
|
205 |
|
206 |
+
foreach( $cmt as $id ) {
|
207 |
+
$cphotos[] = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
|
208 |
+
WHERE id = %d", $id ), ARRAY_A );
|
209 |
}
|
210 |
+
$count = count( $cphotos );
|
211 |
|
212 |
+
if ( $count ) {
|
213 |
+
$photos = array_merge( $photos, $cphotos );
|
|
|
214 |
}
|
215 |
}
|
216 |
+
$link = get_admin_url() . 'admin.php?page=wppa_moderate_photos&wppa-nonce=' . wp_create_nonce( 'wppa-nonce' );
|
217 |
}
|
218 |
|
219 |
// If not one of the cases above apply, log error and quit
|
222 |
return;
|
223 |
}
|
224 |
|
225 |
+
// No photos to moderate?
|
226 |
+
if ( empty( $photos ) ) {
|
227 |
+
|
228 |
+
$is_empty = true;
|
229 |
+
|
230 |
+
// Single photo moderate requested
|
231 |
+
if ( $photo ) {
|
232 |
+
wppa_echo( '<p>' . esc_html__( 'This photo is no longer awaiting moderation' , 'wp-photo-album-plus' ) . '</p>' );
|
233 |
+
}
|
234 |
+
|
235 |
+
// Multiple photos to moderate requested
|
236 |
+
elseif ( $moderate ) {
|
237 |
+
wppa_echo( '<p>' . esc_html__( 'There are no photos awaiting moderation at this time', 'wp-photo-album-plus' ) . '</p>' );
|
238 |
+
}
|
239 |
+
|
240 |
+
else {
|
241 |
+
wppa_echo( '<p>' . esc_html__( 'There are no items matching your search creteria', 'wp-photo-album-plus' ) . '</p>' );
|
242 |
+
}
|
243 |
+
|
244 |
+
// If i am admin, i can edit all photos here, sorted by timestamp desc
|
245 |
+
if ( wppa_user_is_admin() ) {
|
246 |
+
|
247 |
+
wppa_echo( '<p>' . esc_html( 'Instead, here is a list of all items ordered by timestamp, most recently first', 'wp-photo-album-plus' ) . '</p>' );
|
248 |
+
wppa_echo( '<h1>' . esc_html__( 'Manage all photos by timestamp', 'wp-photo-album-plus' ) . '</h1>' );
|
249 |
+
|
250 |
+
$photos = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
|
251 |
+
ORDER BY timestamp DESC
|
252 |
+
LIMIT %d, %d", $skip, $pagesize ), ARRAY_A );
|
253 |
+
|
254 |
+
$count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->wppa_photos" );
|
255 |
+
$link = get_admin_url() . 'admin.php?page=wppa_moderate_photos&wppa-nonce=' . wp_create_nonce( 'wppa-nonce' );
|
256 |
+
}
|
257 |
+
|
258 |
+
// Nothing to do
|
259 |
+
else {
|
260 |
+
return;
|
261 |
+
}
|
262 |
+
}
|
263 |
+
|
264 |
// Quick edit skips a few time consuming settings like copy and move to other album
|
265 |
$quick = wppa_get( 'quick' );
|
266 |
if ( $link && $quick ) $link .= '&quick=1';
|
267 |
|
268 |
// In case it is a seaerch and edit, show the search statistics
|
269 |
+
if ( ! $is_empty ) {
|
270 |
+
wppa_show_search_statistics();
|
271 |
+
}
|
272 |
|
273 |
// If no photos selected produce appropriate message and quit
|
274 |
if ( empty( $photos ) ) {
|
667 |
'width' => '160',
|
668 |
'height' => '160' * $videoy / $videox,
|
669 |
'controls' => false,
|
670 |
+
'use_thumb' => true,
|
671 |
+
'margin_bottom' => '6px;',
|
672 |
) ) . '
|
673 |
</a>' );
|
674 |
|
712 |
id="thumburl-' . $id . '"' .
|
713 |
( wppa_lazy() && $count > '1' ? ' data-' : ' ' ) . 'src="' . esc_url( $src ) . '"
|
714 |
alt="' . esc_attr( $name ) . '"
|
715 |
+
style="max-width:160px;vertical-align:middle;margin-bottom:6px;"
|
716 |
/>
|
717 |
</a>' );
|
718 |
|
749 |
|
750 |
wppa_echo( '</div>' );
|
751 |
}
|
|
|
752 |
|
753 |
+
// Name
|
754 |
+
wppa_echo( '
|
755 |
+
<fieldset class="wppa-fieldset" style="float:left;margin-right:12px;min-height:72px;margin-bottom:6px;">
|
756 |
+
<legend class="wppa-legend">' .
|
757 |
+
__( 'Name', 'wp-photo-album-plus' ) . '
|
758 |
+
</legend>
|
759 |
+
<div style="display:inline-block;padding-left:12px;">
|
760 |
+
<label>' .
|
761 |
+
__( 'Name slug', 'wp-photo-album-plus' ) . ': ' . $sname . '
|
762 |
+
</label><br>
|
763 |
+
<input
|
764 |
+
type="text"
|
765 |
+
style="width:100%;height:32px;"
|
766 |
+
id="pname-' . $id . '"
|
767 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'name\', this.value)"
|
768 |
+
value="' . esc_attr( stripslashes( $name ) ) . '"
|
769 |
+
/>
|
770 |
+
</div>
|
771 |
+
</fieldset>' );
|
772 |
+
|
773 |
+
// Status
|
774 |
+
if ( $may_edit_status ) {
|
775 |
+
$sel = ' selected';
|
776 |
+
if ( wppa_switch( 'ext_status_restricted' ) && ! wppa_user_is_admin() ) {
|
777 |
+
$dis = ' disabled';
|
778 |
+
}
|
779 |
+
else {
|
780 |
+
$dis = '';
|
781 |
+
}
|
782 |
+
wppa_echo( '
|
783 |
+
<fieldset class="wppa-fieldset" style="float:left;margin-right:12px;min-height:72px;margin-bottom:6px;">
|
784 |
+
<legend class="wppa-legend">' .
|
785 |
+
__( 'Status', 'wp-photo-album-plus' ) . '
|
786 |
+
</legend>
|
787 |
+
<div style="display:inline-block;padding-left:12px;">
|
788 |
+
<label>
|
789 |
+
|
790 |
+
</label><br>
|
791 |
+
|
792 |
+
<select
|
793 |
+
style="vertical-align:inherit;height:32px;"
|
794 |
+
id="status-' . $id . '"
|
795 |
+
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'status\', this.value); wppaPhotoStatusChange( ' . $id . ' )">
|
796 |
+
<option value="pending"' . ( $status == 'pending' ? $sel : '' ) . ' >' .
|
797 |
+
__( 'Pending', 'wp-photo-album-plus' ) . '
|
798 |
+
</option>
|
799 |
+
<option value="publish"' . ( $status =='publish' ? $sel : '' ) . ' >' .
|
800 |
+
__( 'Publish', 'wp-photo-album-plus' ) . '
|
801 |
+
</option>
|
802 |
+
<option value="featured"' . ( $status == 'featured' ? $sel : '' ) . $dis . ' >' .
|
803 |
+
__( 'Featured', 'wp-photo-album-plus' ) . '
|
804 |
+
</option>
|
805 |
+
<option value="gold"' . ( $status == 'gold' ? $sel : '' ) . $dis . ' >' .
|
806 |
+
__( 'Gold', 'wp-photo-album-plus' ) . '
|
807 |
+
</option>
|
808 |
+
<option value="silver"' . ( $status == 'silver' ? $sel : '' ) . $dis . ' >' .
|
809 |
+
__( 'Silver', 'wp-photo-album-plus' ) . '
|
810 |
+
</option>
|
811 |
+
<option value="bronze"' . ( $status == 'bronze' ? $sel : '' ) . $dis . ' >' .
|
812 |
+
__( 'Bronze', 'wp-photo-album-plus' ) . '
|
813 |
+
</option>
|
814 |
+
<option value="scheduled"' . ( $status == 'scheduled' ? $sel : '' ) . $dis . ' >' .
|
815 |
+
__( 'Scheduled', 'wp-photo-album-plus' ) . '
|
816 |
+
</option>
|
817 |
+
<option value="private"' . ( $status == 'private' ? $sel : '' ) . $dis . ' >' .
|
818 |
+
__( 'Private', 'wp-photo-album-plus' ) . '
|
819 |
+
</option>
|
820 |
+
</select>
|
821 |
+
' .
|
822 |
+
wppa_get_date_time_select_html( 'photo', $id, true ) . '
|
823 |
+
</div>
|
824 |
+
|
825 |
+
|
826 |
+
</fieldset>' );
|
827 |
+
}
|
828 |
+
else {
|
829 |
+
|
830 |
+
if ( $status == 'pending' ) $s = __( 'Pending', 'wp-photo-album-plus' );
|
831 |
+
elseif ( $status == 'publish' ) $s = __( 'Publish', 'wp-photo-album-plus' );
|
832 |
+
elseif ( $status == 'featured' ) $s = __( 'Featured', 'wp-photo-album-plus' );
|
833 |
+
elseif ( $status == 'gold' ) $s = __( 'Gold', 'wp-photo-album-plus' );
|
834 |
+
elseif ( $status == 'silver' ) $s = __( 'Silver', 'wp-photo-album-plus' );
|
835 |
+
elseif ( $status == 'bronze' ) $s = __( 'Bronze', 'wp-photo-album-plus' );
|
836 |
+
elseif ( $status == 'scheduled' ) $s = __( 'Scheduled', 'wp-photo-album-plus' );
|
837 |
+
elseif ( $status == 'private' ) $s = __( 'Private', 'wp-photo-album-plus' );
|
838 |
+
wppa_echo( '
|
839 |
+
<fieldset class="wppa-fieldset" style="float:left;margin-right:12px;min-height:72px;margin-bottom:6px;">
|
840 |
+
<legend class="wppa-legend">' .
|
841 |
+
__( 'Status', 'wp-photo-album-plus' ) . '
|
842 |
+
</legend>
|
843 |
+
<div style="display:inline-block;padding-left:12px;">
|
844 |
+
<label>
|
845 |
+
|
846 |
+
</label><br>' .
|
847 |
+
$s . '
|
848 |
+
</div>
|
849 |
+
</div>' );
|
850 |
+
}
|
851 |
+
|
852 |
+
// Get the statistics
|
853 |
+
|
854 |
+
wppa_echo( '
|
855 |
+
<fieldset class="wppa-fieldset" style="float:left;margin-right:12px;min-height:72px;margin-bottom:6px;">
|
856 |
+
<legend class="wppa-legend">' .
|
857 |
+
__( 'Statistics', 'wp-photo-album-plus' ) . '
|
858 |
+
</legend>' );
|
859 |
+
|
860 |
+
|
861 |
{
|
862 |
+
$th = array();
|
863 |
+
$td = array();
|
864 |
|
865 |
// Clicks
|
866 |
if ( wppa_switch( 'track_clickcounts' ) ) {
|
867 |
+
$th[] = __( 'Clicks', 'wp-photo-album-plus' );
|
868 |
+
$td[] = strval( intval( $clicks ) );
|
869 |
}
|
870 |
|
871 |
// Views
|
872 |
if ( wppa_switch( 'track_viewcounts' ) ) {
|
873 |
+
$th[] = __( 'Views', 'wp-photo-album-plus' );
|
874 |
+
$td[] = strval( intval( $views ) );
|
875 |
}
|
876 |
|
877 |
// Downloads. Only photos are downloadable
|
878 |
if ( ! wppa_is_multi( $id ) ) {
|
879 |
+
$th[] = __( 'Downloads', 'wp-photo-album-plus' );
|
880 |
+
$td[] = strval( intval( $dlcount ) );
|
881 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
882 |
|
883 |
// Rating
|
884 |
$entries = wppa_get_rating_count_by_id( $id );
|
889 |
}
|
890 |
else {
|
891 |
$label = __( 'Rating (#, avg)', 'wp-photo-album-plus' );
|
892 |
+
$count = wppa_get_rating_count_by_id( $id );
|
893 |
+
$avg = wppa_get_rating_by_id( $id, 'nolabel' );
|
894 |
+
$value = $count . ', ' . $avg;
|
895 |
}
|
896 |
}
|
897 |
else {
|
899 |
$value = __( 'None', 'wp-photo-album-plus' );
|
900 |
}
|
901 |
|
902 |
+
$th[] = $label;
|
903 |
+
$td[] = $value;
|
904 |
|
905 |
// Dislikes
|
906 |
$dislikes = wppa_dislike_get( $id );
|
907 |
if ( $dislikes ) {
|
908 |
+
$th[] = __( 'Dislikes', 'wp-photo-album-plus' );
|
909 |
+
$td[] = strval( intval( $dislikes ) );
|
910 |
}
|
911 |
|
912 |
// Pending votes
|
913 |
$pending = wppa_pendrat_get( $id );
|
914 |
if ( $pending ) {
|
915 |
+
$th[] = __( 'Pending votes', 'wp-photo-album-plus' );
|
916 |
+
$td[] = strval( intval( $pending ) );
|
917 |
}
|
918 |
}
|
919 |
|
920 |
// Display the stats
|
921 |
+
$c = count( $th );
|
922 |
+
for ( $i = 0; $i < $c; $i++ ) {
|
923 |
+
wppa_echo( '
|
924 |
+
<div style="display:inline-block;padding-left:12px;">
|
925 |
+
<label>' .
|
926 |
+
$th[$i] . '
|
927 |
+
</label><br>
|
928 |
+
<div class="wppa-ldi">' .
|
929 |
+
$td[$i] . '
|
930 |
+
</div>
|
931 |
+
</div>' );
|
932 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
933 |
|
934 |
+
wppa_echo( '</fieldset>' );
|
935 |
|
936 |
+
// Update status field
|
937 |
+
{
|
938 |
+
wppa_echo( '
|
939 |
+
<fieldset class="wppa-fieldset" style="float:left;margin-right:12px;min-height:72px;margin-bottom:6px;">
|
940 |
+
<legend class="wppa-legend">' .
|
941 |
+
__( 'Remark', 'wp-photo-album-plus' ) . '
|
942 |
+
</legend>
|
943 |
+
<div style="display:inline-block;padding-left:12px;">
|
944 |
+
<label>
|
945 |
+
|
946 |
+
</label><br>
|
947 |
+
<span
|
948 |
+
id="remark-' . $id . '"
|
949 |
+
style="font-weight:bold;color:#00AA00;font-size:1.5em;">' .
|
950 |
+
( $is_video ? sprintf( __( 'Video %s is not modified yet', 'wp-photo-album-plus' ), $id ) :
|
951 |
+
sprintf( __( 'Photo %s is not modified yet', 'wp-photo-album-plus' ), $id ) ) . '
|
952 |
+
</span>
|
953 |
+
</div>
|
954 |
+
</fieldset>' );
|
955 |
+
}
|
956 |
|
957 |
wppa_echo( '
|
958 |
</div>' );
|
965 |
|
966 |
// Open the details area
|
967 |
wppa_echo( '
|
968 |
+
<details id="wppa-toplevel-details-'.$id.'" class="wppa-toplevel-details" ' . ( $timestamp > time() - 3600 ? 'open' : '' ) . '>
|
969 |
<summary class="toplevel wppa-summary-sublevel"> ' .
|
970 |
$details . '
|
971 |
</summary>' );
|
972 |
+
/*
|
973 |
// Update status field
|
974 |
{
|
975 |
wppa_echo( '
|
983 |
</span>
|
984 |
</h3>' );
|
985 |
}
|
986 |
+
*/
|
987 |
// The tabs
|
988 |
$ptitle = __( 'Photo', 'wp-photo-album-plus' );
|
989 |
if ( wppa_is_video( $id ) ) $ptitle = __( 'Video', 'wp-photo-album-plus' );
|
1003 |
}
|
1004 |
if ( ! $quick && ! empty( $exifs ) ) {
|
1005 |
$result .= '
|
1006 |
+
<li
|
1007 |
+
class="wppa-photoadmin-tab-'.$id.'"
|
1008 |
+
onclick="wppaChangePhotoAdminTab(this,\'#photoexif-'.$id.'\','.$id.');">' .
|
1009 |
+
__( 'EXIF', 'wp-photo-album-plus' ) . '
|
1010 |
+
</li>';
|
1011 |
}
|
1012 |
if ( ! $quick && ! empty( $iptcs ) ) {
|
1013 |
$result .= '
|
1014 |
+
<li
|
1015 |
+
class="wppa-photoadmin-tab-'.$id.'"
|
1016 |
+
onclick="wppaChangePhotoAdminTab(this,\'#photoiptc-'.$id.'\','.$id.');">' .
|
1017 |
+
__( 'IPTC', 'wp-photo-album-plus' ) . '
|
1018 |
+
</li>';
|
1019 |
}
|
1020 |
if ( ! $quick && ! empty( $comments ) ) {
|
1021 |
$result .= '
|
1022 |
+
<li
|
1023 |
+
id="wppa-photoadmin-tab-'.$id.'"
|
1024 |
+
class="wppa-photoadmin-tab-'.$id.'"
|
1025 |
+
onclick="wppaChangePhotoAdminTab(this,\'#photocomment-'.$id.'\','.$id.');">' .
|
1026 |
+
__( 'Comments', 'wp-photo-album-plus' ) . '
|
1027 |
+
</li>';
|
1028 |
}
|
1029 |
$result .= '
|
1030 |
</ul>
|
1197 |
}
|
1198 |
|
1199 |
// Status
|
1200 |
+
/*
|
1201 |
if ( ! $may_edit_status ) {
|
1202 |
if ( $status == 'pending' ) $s = __( 'Pending', 'wp-photo-album-plus' );
|
1203 |
elseif ( $status == 'publish' ) $s = __( 'Publish', 'wp-photo-album-plus' );
|
1217 |
</div>
|
1218 |
</div>' );
|
1219 |
}
|
1220 |
+
*/
|
1221 |
|
1222 |
// Schedule for delete
|
1223 |
if ( ! wppa_user_is_admin() && $owner != wppa_get_user() ) {
|
1274 |
|
1275 |
// Owner
|
1276 |
if ( $owner_editable ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1277 |
if ( wppa_get_user_count() > wppa_opt( 'max_users' ) ) {
|
1278 |
wppa_echo( '
|
1279 |
<div class="left">
|
1378 |
}
|
1379 |
|
1380 |
// Status
|
1381 |
+
if ( ! $moderate && $may_edit_status ) {
|
1382 |
$sel = ' selected';
|
1383 |
if ( wppa_switch( 'ext_status_restricted' ) && ! wppa_user_is_admin() ) {
|
1384 |
$dis = ' disabled';
|
1805 |
wppa_echo( '
|
1806 |
<div class="wppa-flex-column">' );
|
1807 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1808 |
// Description editable
|
1809 |
if ( ! wppa_switch( 'desc_is_restricted' ) || wppa_user_is_admin() ) {
|
1810 |
wppa_echo( '
|
2105 |
<div
|
2106 |
id="photofiles-' . $id . '"
|
2107 |
class="wppa-table-wrap wppa-tabcontent-'.$id.'"
|
2108 |
+
style="position:relative;padding:10px;display:none"
|
2109 |
>' );
|
2110 |
|
|
|
2111 |
wppa_echo( '
|
2112 |
+
<div class="wppa-flex">' );
|
2113 |
+
|
2114 |
+
wppa_echo( '
|
2115 |
+
<fieldset class="wppa-fieldset">
|
2116 |
+
<legend class="wppa-legend">' .
|
2117 |
+
__( 'Available files', 'wp-photo-album-plus' ) . '
|
2118 |
+
</legend>' );
|
2119 |
+
{
|
2120 |
+
wppa_echo( '
|
2121 |
+
<table class="wppa-table">
|
2122 |
+
<thead>
|
2123 |
+
<td>' . __( 'Type', 'wp-photo-album-plus' ) . '</td>
|
2124 |
+
<td>' . __( 'Size', 'wp-photo-album-plus' ) . '</td>
|
2125 |
+
<td>' . __( 'Path', 'wp-photo-album-plus' ) . '</td>
|
2126 |
+
<td>' . __( 'Url', 'wp-photo-album-plus' ) . '</td>
|
2127 |
+
</thead>
|
2128 |
+
<tbody>' );
|
2129 |
+
|
2130 |
+
// Video
|
2131 |
+
if ( $b_is_video ) {
|
2132 |
+
|
2133 |
+
$formats = '';
|
2134 |
+
$paths = '';
|
2135 |
+
$urls = '';
|
2136 |
+
foreach ( $is_video as $fmt ) {
|
2137 |
+
$formats .= $fmt . ' (' . wppa_get_filesize( str_replace( 'xxx', $fmt, wppa_get_photo_path( $id, false ) ) ) . ')<br>';
|
2138 |
+
$paths .= str_replace( WPPA_UPLOAD_PATH, '.../wppa', str_replace( 'xxx', $fmt, wppa_get_photo_path( $id, false ) ) ) . '<br>';
|
2139 |
+
$url = str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, str_replace( 'xxx', $fmt, wppa_get_photo_path( $id, false ) ) );
|
2140 |
+
$urls .= '<a href="'. $url .'" target="_blank">' . $url . '<br>';
|
2141 |
+
}
|
2142 |
|
2143 |
+
wppa_echo( '
|
2144 |
+
<tr>
|
2145 |
+
<td>' .
|
2146 |
+
$formats . '
|
2147 |
+
</td>
|
2148 |
+
<td>' );
|
2149 |
+
|
2150 |
+
// If video sizes are correct and retieved from the file,
|
2151 |
+
// and possible rotation has been into account, field needs not to be editable
|
2152 |
+
if ( $photo['videox'] == $videox && $photo['videoy'] == $videoy ) {
|
2153 |
+
wppa_echo( sprintf( __( 'Width: %d pixels, height: %d pixels', 'wp-photo-album-plus' ), $videox, $videoy ) );
|
2154 |
+
}
|
2155 |
+
else {
|
2156 |
+
wppa_echo( '
|
2157 |
+
<input
|
2158 |
+
type="text"
|
2159 |
+
style="width:50px;margin:0 4px;padding-left:8px!important"
|
2160 |
+
onchange="wppaAjaxUpdatePhoto( ' . strval( intval( $id ) ) . ', \'videox\', this.value)"
|
2161 |
+
value="' . esc_attr( $videox ) . '"
|
2162 |
+
/>px W' .
|
2163 |
+
sprintf( __( '(0=default:%s)', 'wp-photo-album-plus' ), wppa_opt( 'video_width' ) ) . '
|
2164 |
+
<input
|
2165 |
+
type="text"
|
2166 |
+
style="width:50px;margin:0 4px;padding-left:8px!important"
|
2167 |
+
onchange="wppaAjaxUpdatePhoto( ' . strval( intval( $id ) ) . ', \'videoy\', this.value)"
|
2168 |
+
value="' . esc_attr( $videoy ) . '"
|
2169 |
+
/>px H' .
|
2170 |
+
sprintf( __( '(0=default:%s)', 'wp-photo-album-plus' ), wppa_opt( 'video_height' ) ) );
|
2171 |
+
}
|
2172 |
+
wppa_echo( '
|
2173 |
+
</td>
|
2174 |
+
<td>' .
|
2175 |
+
$paths . '
|
2176 |
+
</td>
|
2177 |
+
<td>' .
|
2178 |
+
$urls . '
|
2179 |
+
</td>
|
2180 |
+
</tr>' );
|
2181 |
}
|
2182 |
|
2183 |
+
// Audio
|
2184 |
+
if ( $b_has_audio ) {
|
2185 |
+
|
2186 |
+
$formats = '';
|
2187 |
+
$sizes = '';
|
2188 |
+
$paths = '';
|
2189 |
+
$urls = '';
|
2190 |
+
foreach ( $has_audio as $fmt ) {
|
2191 |
+
$formats .= $fmt . '<br>';
|
2192 |
+
$sizes .= wppa_get_filesize( str_replace( 'xxx', $fmt, wppa_get_photo_path( $id, false ) ) ) . '<br>';
|
2193 |
+
$paths .= str_replace( WPPA_UPLOAD_PATH, '.../wppa', str_replace( 'xxx', $fmt, wppa_get_photo_path( $id, false ) ) ) . '<br>';
|
2194 |
+
$url = str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, str_replace( 'xxx', $fmt, wppa_get_photo_path( $id, false ) ) );
|
2195 |
+
$urls .= '<a href="'. $url .'" target="_blank">' . $url . '<br>';
|
2196 |
+
}
|
2197 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2198 |
wppa_echo( '
|
2199 |
+
<tr>
|
2200 |
+
<td>' .
|
2201 |
+
$formats . '
|
2202 |
+
</td>
|
2203 |
+
<td>' .
|
2204 |
+
$sizes . '
|
2205 |
+
</td>
|
2206 |
+
<td>' .
|
2207 |
+
$paths . '
|
2208 |
+
</td>
|
2209 |
+
<td>' .
|
2210 |
+
$urls . '
|
2211 |
+
</td>
|
2212 |
+
</tr>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2213 |
}
|
2214 |
|
2215 |
+
// Pdf
|
2216 |
+
if ( $is_pdf ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2217 |
|
2218 |
+
// Source
|
2219 |
+
$sp = wppa_get_source_path( $id );
|
2220 |
+
$fs = wppa_get_filesize( $sp );
|
2221 |
+
$path = str_replace( WPPA_UPLOAD_PATH, '.../wppa', $sp );
|
2222 |
+
$url = str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, $sp );
|
2223 |
+
wppa_echo( '
|
2224 |
+
<tr>
|
2225 |
+
<td>' .
|
2226 |
+
__( 'Document file', 'wp-photo-album-plus' ) . '
|
2227 |
+
</td>
|
2228 |
+
<td>' .
|
2229 |
+
$fs . '
|
2230 |
+
</td>
|
2231 |
+
<td>' .
|
2232 |
+
$path . '
|
2233 |
+
</td>
|
2234 |
+
<td>
|
2235 |
+
<a href="'.$url.'" target="_blank">' .
|
2236 |
+
$url . '
|
2237 |
+
</a>
|
2238 |
+
</td>
|
2239 |
+
</tr>' );
|
2240 |
+
}
|
2241 |
|
2242 |
+
// Non pdf source_file
|
2243 |
+
else {
|
2244 |
|
2245 |
+
// Source
|
2246 |
+
$sp = wppa_get_source_path( $id );
|
2247 |
+
$o1sp = wppa_get_o1_source_path( $id );
|
2248 |
+
$files = [];
|
2249 |
+
if ( wppa_is_file( $sp ) || wppa_is_file( $o1sp ) ) {
|
2250 |
+
|
2251 |
+
if ( is_file( $sp ) ) {
|
2252 |
+
$ima = getimagesize( $sp );
|
2253 |
+
$txt = $ima['0'] . ' x ' . $ima['1'] . ' (' . sprintf('%4.2fMp', ( $ima['0'] * $ima['1'] ) / ( 1024 * 1024 ) ) . ') ' . wppa_get_filesize( $sp ) . '.';
|
2254 |
+
$files[] = ['name' => __( 'Source', 'wp-photo-album-plus' ),
|
2255 |
+
'path' => str_replace( WPPA_UPLOAD_PATH, '.../wppa', $sp ),
|
2256 |
+
'size' => $txt,
|
2257 |
+
'url' => str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, $sp )];
|
2258 |
+
}
|
2259 |
+
if ( is_file( $o1sp ) ) {
|
2260 |
+
$ima = getimagesize( $o1sp );
|
2261 |
+
$txt = $ima['0'] . ' x ' . $ima['1'] . ' (' . sprintf('%4.2fMp', ( $ima['0'] * $ima['1'] ) / ( 1024 * 1024 ) ) . ') ' . wppa_get_filesize( $o1sp ) . '.';
|
2262 |
+
$files[] = ['name' => __( 'Oriented source', 'wp-photo-album-plus' ),
|
2263 |
+
'path' => str_replace( WPPA_UPLOAD_PATH, '.../wppa', $o1sp ),
|
2264 |
+
'size' => $txt,
|
2265 |
+
'url' => str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, $o1sp )];
|
2266 |
+
}
|
2267 |
|
2268 |
+
foreach( $files as $file ) {
|
2269 |
+
wppa_echo( '
|
2270 |
+
<tr>
|
2271 |
+
<td>' .
|
2272 |
+
$file['name'] . '
|
2273 |
+
</td>
|
2274 |
+
<td>' .
|
2275 |
+
$file['size'] . '
|
2276 |
+
</td>
|
2277 |
+
<td>' .
|
2278 |
+
$file['path'] . '
|
2279 |
+
</td>
|
2280 |
+
<td>
|
2281 |
+
<a href="'.$file['url'].'" target="_blank">' .
|
2282 |
+
$file['url'] . '
|
2283 |
+
</a>
|
2284 |
+
</td>
|
2285 |
+
</tr>' );
|
2286 |
+
}
|
2287 |
}
|
2288 |
+
}
|
2289 |
+
|
2290 |
+
// Poster
|
2291 |
+
if ( $is_pdf || $b_is_video ) {
|
2292 |
+
|
2293 |
+
// Poster
|
2294 |
+
$sp = wppa_fix_poster_ext( wppa_get_source_path( $id ), $id );
|
2295 |
+
$dsp = wppa_fix_poster_ext( wppa_get_photo_path( $id ), $id );
|
2296 |
+
$files = [];
|
2297 |
+
if ( wppa_is_file( $sp ) || wppa_is_file( $dsp ) ) {
|
2298 |
+
|
2299 |
+
if ( wppa_is_file( $sp ) ) {
|
2300 |
+
$ima = getimagesize( $sp );
|
2301 |
+
$txt = $ima['0'] . ' x ' . $ima['1'] . ' (' . sprintf('%4.2fMp', ( $ima['0'] * $ima['1'] ) / ( 1024 * 1024 ) ) . ') ' . wppa_get_filesize( $sp ) . '.';
|
2302 |
+
$files[] = ['name' => __( 'Poster source', 'wp-photo-album-plus' ),
|
2303 |
+
'path' => str_replace( WPPA_UPLOAD_PATH, '.../wppa', $sp ),
|
2304 |
+
'size' => $txt,
|
2305 |
+
'url' => str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, $sp )];
|
2306 |
+
}
|
2307 |
+
if ( wppa_is_file( $dsp ) ) {
|
2308 |
+
$ima = getimagesize( $dsp );
|
2309 |
+
$txt = $ima['0'] . ' x ' . $ima['1'] . ' (' . sprintf('%4.2fMp', ( $ima['0'] * $ima['1'] ) / ( 1024 * 1024 ) ) . ') ' . wppa_get_filesize( $dsp ) . '.';
|
2310 |
+
$files[] = ['name' => __( 'Poster display', 'wp-photo-album-plus' ),
|
2311 |
+
'path' => str_replace( WPPA_UPLOAD_PATH, '.../wppa', $dsp ),
|
2312 |
+
'size' => $txt,
|
2313 |
+
'url' => str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, $dsp )];
|
2314 |
+
}
|
2315 |
+
|
2316 |
+
foreach( $files as $file ) {
|
2317 |
+
wppa_echo( '
|
2318 |
+
<tr>
|
2319 |
+
<td>' .
|
2320 |
+
$file['name'] . '
|
2321 |
+
</td>
|
2322 |
+
<td>' .
|
2323 |
+
$file['size'] . '
|
2324 |
+
</td>
|
2325 |
+
<td>' .
|
2326 |
+
$file['path'] . '
|
2327 |
+
</td>
|
2328 |
+
<td>
|
2329 |
+
<a href="'.$file['url'].'" target="_blank">' .
|
2330 |
+
$file['url'] . '
|
2331 |
+
</a>
|
2332 |
+
</td>
|
2333 |
+
</tr>' );
|
2334 |
+
}
|
2335 |
}
|
2336 |
+
}
|
2337 |
+
|
2338 |
+
// Non video, non pdf Display
|
2339 |
+
if ( ! $b_is_video && ! $is_pdf ) {
|
2340 |
+
$dp = wppa_get_photo_path( $id );
|
2341 |
+
$path = str_replace( WPPA_UPLOAD_PATH, '.../wppa', $dp );
|
2342 |
+
$url = str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, $dp );
|
2343 |
+
|
2344 |
+
if ( is_file( $dp ) ) {
|
2345 |
+
|
2346 |
+
$txt = '
|
2347 |
+
<span id="photox-' . $id . '">' . wppa_get_photox( $id ) . '</span> x
|
2348 |
+
<span id="photoy-' . $id . '">' . wppa_get_photoy( $id ) . '</span>:
|
2349 |
+
(<span id="photofilesize-' . $id . '">' . wppa_get_filesize( $dp ) . '</span>)';
|
2350 |
|
|
|
2351 |
wppa_echo( '
|
2352 |
<tr>
|
2353 |
<td>' .
|
2354 |
+
__( 'Display file', 'wp-photo-album-plus' ) . '
|
2355 |
</td>
|
2356 |
<td>' .
|
2357 |
+
$txt . '
|
2358 |
</td>
|
2359 |
<td>' .
|
2360 |
+
$path . '
|
2361 |
</td>
|
2362 |
<td>
|
2363 |
+
<a href="'.$url.'" target="_blank">' .
|
2364 |
+
$url . '
|
2365 |
</a>
|
2366 |
</td>
|
2367 |
</tr>' );
|
2368 |
}
|
2369 |
}
|
|
|
2370 |
|
2371 |
+
// Thumbnail
|
2372 |
+
if ( true ) {
|
2373 |
+
$tp = wppa_get_thumb_path( $id );
|
2374 |
+
if ( is_file( $tp ) ) {
|
2375 |
+
$txt = '
|
2376 |
+
<span id="thumbx-' . $id . '">' . wppa_get_thumbx( $id ) . '</span> x
|
2377 |
+
<span id="thumby-' . $id . '">' . wppa_get_thumby( $id ) . '</span>:
|
2378 |
+
(<span id="thumbfilesize-' . $id . '">' . wppa_get_filesize( $tp ) . '</span>)
|
2379 |
+
|
2380 |
+
<input
|
2381 |
+
type="checkbox"' .
|
2382 |
+
( $thumblock ? ' checked' : '' ) . '
|
2383 |
+
onchange="wppaAjaxUpdatePhoto( ' . strval( intval( $id ) ) . ', \'thumblock\', jQuery(this).prop(\'checked\') ? 1 : 0 )" /> ' .
|
2384 |
+
__( 'Locked', 'wp-photo-album-plus' );
|
2385 |
|
2386 |
+
$path = str_replace( WPPA_UPLOAD_PATH, '.../wppa', $tp );
|
2387 |
+
$url = str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, $tp );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2388 |
|
|
|
2389 |
wppa_echo( '
|
2390 |
<tr>
|
2391 |
<td>' .
|
2392 |
+
__( 'Thumbnail', 'wp-photo-album-plus' ) . '
|
2393 |
</td>
|
2394 |
<td>' .
|
2395 |
+
$txt . '
|
2396 |
</td>
|
2397 |
<td>' .
|
2398 |
+
$path . '
|
2399 |
</td>
|
2400 |
<td>
|
2401 |
+
<a href="'.$url.'" target="_blank">' .
|
2402 |
+
$url . '
|
2403 |
</a>
|
2404 |
</td>
|
2405 |
</tr>' );
|
2406 |
}
|
2407 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2408 |
|
2409 |
+
// Local CDN
|
2410 |
+
if ( wppa_cdn( 'admin' ) == 'local' ) {
|
2411 |
|
2412 |
+
$files = wppa_cdn_files( $id );
|
2413 |
+
if ( !empty( $files ) ) {
|
2414 |
|
2415 |
+
$txt = '<span id="cdnfiles-' . $id . '">';
|
2416 |
+
$paths = '';
|
2417 |
+
$urls = '';
|
2418 |
|
2419 |
+
foreach( $files as $file ) {
|
2420 |
+
if ( basename( $file ) != 'index.php' ) {
|
2421 |
+
$t = explode( '.', basename( $file ) );
|
2422 |
+
$t = explode( '-', $t[0] );
|
2423 |
+
$x = $t[0];
|
2424 |
+
$y = $t[1];
|
2425 |
+
$size = filesize( $file );
|
2426 |
|
2427 |
+
$txt .=
|
2428 |
|
2429 |
+
str_replace( '-', ' x ', wppa_strip_ext( basename( $file ) ) ) . ': ' .
|
2430 |
|
2431 |
+
sprintf( '(%4.2fkB)', $size / 1024 ) . '<br>';
|
2432 |
|
2433 |
+
$paths .= str_replace( WPPA_UPLOAD_PATH, '.../wppa', $file ) . '<br>';
|
2434 |
|
2435 |
+
$url = str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, $file );
|
2436 |
+
$urls .= '<a href="'.$url.'" target="_blank">' . $url . '</a><br>';
|
2437 |
+
}
|
2438 |
}
|
2439 |
+
$txt .= '</span>';
|
|
|
2440 |
|
2441 |
+
wppa_echo( '
|
2442 |
+
<tr>
|
2443 |
+
<td style="line-height:20px">' .
|
2444 |
+
__( 'Local CDN', 'wp-photo-album-plus' ) . '
|
2445 |
+
</td>
|
2446 |
+
<td style="line-height:20px">' .
|
2447 |
+
$txt . '
|
2448 |
+
</td>
|
2449 |
+
<td style="line-height:20px">' .
|
2450 |
+
$paths . '
|
2451 |
+
</td>
|
2452 |
+
<td style="line-height:20px">' .
|
2453 |
+
$urls . '
|
2454 |
+
</td>
|
2455 |
+
</tr>' );
|
2456 |
+
}
|
2457 |
}
|
2458 |
+
|
2459 |
+
wppa_echo( '
|
2460 |
+
</tbody>
|
2461 |
+
</table>' );
|
2462 |
}
|
2463 |
|
2464 |
+
wppa_echo( '</fieldset></div>' );
|
|
|
|
|
|
|
2465 |
|
2466 |
+
// Remake displayfiles / yhumbnail
|
2467 |
if ( ! $is_video ) {
|
2468 |
wppa_echo( '
|
2469 |
+
<div class="wppa-flex">
|
2470 |
+
<fieldset class="wppa-fieldset">
|
2471 |
+
<legend class="wppa-legend">' .
|
2472 |
+
__( 'Actions', 'wp-photo-album-plus' ) . '
|
2473 |
+
</legend>
|
2474 |
|
2475 |
<input
|
2476 |
type="button"
|
2479 |
onclick="wppaAjaxUpdatePhoto( ' . $id . ', \'remake\', 0 )"
|
2480 |
value="' . esc_attr( __( 'Remake files', 'wp-photo-album-plus' ) ) . '"
|
2481 |
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2482 |
<input
|
2483 |
type="button"
|
2484 |
class="wppa-admin-button button"
|
2486 |
onclick="wppaAjaxUpdatePhoto( ' . $id . ', \'remakethumb\', 0 )"
|
2487 |
value="' . esc_attr( __( 'Remake thumbnail file', 'wp-photo-album-plus' ) ) . '"
|
2488 |
/>
|
2489 |
+
|
2490 |
+
</fieldset></div>' );
|
2491 |
}
|
2492 |
|
2493 |
|
2502 |
<div
|
2503 |
id="photomagic-' . $id . '"
|
2504 |
class="wppa-table-wrap wppa-tabcontent-'.$id.'"
|
2505 |
+
style="position:relative;padding:10px;display:none"
|
2506 |
>' );
|
2507 |
|
|
|
|
|
|
|
2508 |
wppa_echo( '
|
2509 |
+
<fieldset class="wppa-fieldset">
|
2510 |
+
<legend class="wppa-legend">' .
|
2511 |
+
__( 'Masgically edit image', 'wp-photo-album-plus' ) . '
|
2512 |
+
</legend>' );
|
2513 |
|
|
|
|
|
|
|
2514 |
|
2515 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2516 |
|
2517 |
+
// Explanation
|
2518 |
wppa_echo( '
|
2519 |
+
<h2 class="description" style="margin:1em">' .
|
2520 |
+
__( 'The operations are executed upon the display file.', 'wp-photo-album-plus' ) . ' ' .
|
2521 |
+
__( 'A new thumbnail image will be created from the display file.', 'wp-photo-album-plus' ) . '
|
2522 |
+
</h2>' );
|
|
|
|
|
2523 |
|
2524 |
+
// --- Actions ---
|
2525 |
wppa_echo( '
|
2526 |
+
<div class="wppa-flex">' );
|
|
|
|
|
|
|
|
|
|
|
2527 |
|
2528 |
+
{
|
2529 |
+
// Rotate left
|
2530 |
+
wppa_echo( '
|
2531 |
+
<input
|
2532 |
+
type="button"
|
2533 |
+
class="wppa-admin-button button"
|
2534 |
+
onclick="wppaTryMagick( ' . $id . ', \'magickrotleft\' )"
|
2535 |
+
value="' . esc_attr( __( 'Rotate left', 'wp-photo-album-plus' ) ) . '"
|
2536 |
+
/>' );
|
2537 |
|
2538 |
+
// Rotat 180
|
2539 |
+
wppa_echo( '
|
2540 |
+
<input
|
2541 |
+
type="button"
|
2542 |
+
class="wppa-admin-button button"
|
2543 |
+
onclick="wppaTryMagick( ' . $id . ', \'magickrot180\' )"
|
2544 |
+
value="' . esc_attr( __( 'Rotate 180°', 'wp-photo-album-plus' ) ) . '"
|
2545 |
+
/>' );
|
|
|
2546 |
|
2547 |
+
// Rotate right
|
2548 |
+
wppa_echo( '
|
2549 |
+
<input
|
2550 |
+
type="button"
|
2551 |
+
class="wppa-admin-button button"
|
2552 |
+
onclick="wppaTryMagick( ' . $id . ', \'magickrotright\' )"
|
2553 |
+
value="' . esc_attr( __( 'Rotate right', 'wp-photo-album-plus' ) ) . '"
|
2554 |
+
/>' );
|
|
|
2555 |
|
2556 |
+
// Flip
|
2557 |
+
wppa_echo( '
|
2558 |
+
<input
|
2559 |
+
type="button"
|
2560 |
+
class="wppa-admin-button button"
|
2561 |
+
onclick="wppaTryMagick( ' . $id . ', \'magickflip\' )"
|
2562 |
+
value="' . esc_attr( __( 'Flip', 'wp-photo-album-plus' ) ) . ' —"
|
2563 |
+
title="-flip"
|
2564 |
+
/>' );
|
2565 |
|
2566 |
+
// Flop
|
2567 |
+
wppa_echo( '
|
2568 |
+
<input
|
2569 |
+
type="button"
|
2570 |
+
class="wppa-admin-button button"
|
2571 |
+
onclick="wppaTryMagick( ' . $id . ', \'magickflop\' )"
|
2572 |
+
value="' . esc_attr( __( 'Flop', 'wp-photo-album-plus' ) ) . ' |"
|
2573 |
+
title="-flop"
|
2574 |
+
/>' );
|
2575 |
|
2576 |
+
// Enhance
|
2577 |
+
wppa_echo( '
|
2578 |
+
<input
|
2579 |
+
type="button"
|
2580 |
+
class="wppa-admin-button button"
|
2581 |
+
onclick="wppaTryMagick( ' . $id . ', \'enhance\' )"
|
2582 |
+
value="' . esc_attr( __( 'Enhance', 'wp-photo-album-plus' ) ) . '"
|
2583 |
+
title="-enhance"
|
2584 |
+
/>' );
|
2585 |
|
2586 |
+
// Sharpen
|
2587 |
+
wppa_echo( '
|
2588 |
+
<input
|
2589 |
+
type="button"
|
2590 |
+
class="wppa-admin-button button"
|
2591 |
+
onclick="wppaTryMagick( ' . $id . ', \'sharpen\' )"
|
2592 |
+
value="' . esc_attr( __( 'Sharpen', 'wp-photo-album-plus' ) ) . '"
|
2593 |
+
title="-sharpen 0x1"
|
2594 |
+
/>' );
|
2595 |
|
2596 |
+
// Blur
|
2597 |
+
wppa_echo( '
|
2598 |
+
<input
|
2599 |
+
type="button"
|
2600 |
+
class="wppa-admin-button button"
|
2601 |
+
onclick="wppaTryMagick( ' . $id . ', \'blur\' )"
|
2602 |
+
value="' . esc_attr( __( 'Blur', 'wp-photo-album-plus' ) ) . '"
|
2603 |
+
title="-blur 0x1"
|
2604 |
+
/>' );
|
2605 |
|
2606 |
+
// Auto gamma
|
2607 |
+
wppa_echo( '
|
2608 |
+
<input
|
2609 |
+
type="button"
|
2610 |
+
class="wppa-admin-button button"
|
2611 |
+
onclick="wppaTryMagick( ' . $id . ', \'auto-gamma\' )"
|
2612 |
+
value="' . esc_attr( __( 'Auto Gamma', 'wp-photo-album-plus' ) ) . '"
|
2613 |
+
title="-auto-gamma"
|
2614 |
+
/>' );
|
2615 |
|
2616 |
+
// Auto level
|
2617 |
+
wppa_echo( '
|
2618 |
+
<input
|
2619 |
+
type="button"
|
2620 |
+
class="wppa-admin-button button"
|
2621 |
+
onclick="wppaTryMagick( ' . $id . ', \'auto-level\' )"
|
2622 |
+
value="' . esc_attr( __( 'Auto Level', 'wp-photo-album-plus' ) ) . '"
|
2623 |
+
title="-auto-level"
|
2624 |
+
/>' );
|
2625 |
|
2626 |
+
// Contrast+
|
2627 |
+
wppa_echo( '
|
2628 |
+
<input
|
2629 |
+
type="button"
|
2630 |
+
class="wppa-admin-button button"
|
2631 |
+
onclick="wppaTryMagick( ' . $id . ', \'contrast-p\' )"
|
2632 |
+
value="' . esc_attr( __( 'Contrast+', 'wp-photo-album-plus' ) ) . '"
|
2633 |
+
title="-brightness-contrast 0x5"
|
2634 |
+
/>' );
|
2635 |
|
2636 |
+
// Contrast-
|
2637 |
+
wppa_echo( '
|
2638 |
+
<input
|
2639 |
+
type="button"
|
2640 |
+
class="wppa-admin-button button"
|
2641 |
+
onclick="wppaTryMagick( ' . $id . ', \'contrast-m\' )"
|
2642 |
+
value="' . esc_attr( __( 'Contrast-', 'wp-photo-album-plus' ) ) . '"
|
2643 |
+
title="-brightness-contrast 0x-5"
|
2644 |
+
/>' );
|
2645 |
|
2646 |
+
// Brightness+
|
2647 |
+
wppa_echo( '
|
2648 |
+
<input
|
2649 |
+
type="button"
|
2650 |
+
class="wppa-admin-button button"
|
2651 |
+
onclick="wppaTryMagick( ' . $id . ', \'brightness-p\' )"
|
2652 |
+
value="' . esc_attr( __( 'Brightness+', 'wp-photo-album-plus' ) ) . '"
|
2653 |
+
title="-brightness-contrast 5"
|
2654 |
+
/>' );
|
2655 |
|
2656 |
+
// Brightness-
|
2657 |
+
wppa_echo( '
|
2658 |
+
<input
|
2659 |
+
type="button"
|
2660 |
+
class="wppa-admin-button button"
|
2661 |
+
onclick="wppaTryMagick( ' . $id . ', \'brightness-m\' )"
|
2662 |
+
value="' . esc_attr( __( 'Brightness-', 'wp-photo-album-plus' ) ) . '"
|
2663 |
+
title="-brightness-contrast -5"
|
2664 |
+
/>' );
|
2665 |
|
2666 |
+
// Despeckle
|
2667 |
+
wppa_echo( '
|
2668 |
+
<input
|
2669 |
+
type="button"
|
2670 |
+
class="wppa-admin-button button"
|
2671 |
+
onclick="wppaTryMagick( ' . $id . ', \'despeckle\' )"
|
2672 |
+
value="' . esc_attr( __( 'Despeckle', 'wp-photo-album-plus' ) ) . '"
|
2673 |
+
title="-despeckle"
|
2674 |
+
/>' );
|
2675 |
|
2676 |
+
// Lenear gray
|
2677 |
+
wppa_echo( '
|
2678 |
+
<input
|
2679 |
+
type="button"
|
2680 |
+
class="wppa-admin-button button"
|
2681 |
+
onclick="wppaTryMagick( ' . $id . ', \'lineargray\' )"
|
2682 |
+
value="' . esc_attr( __( 'Linear gray', 'wp-photo-album-plus' ) ) . '"
|
2683 |
+
title="-colorspace gray"
|
2684 |
+
/>' );
|
2685 |
|
2686 |
+
// Non-linear gray
|
2687 |
+
wppa_echo( '
|
2688 |
+
<input
|
2689 |
+
type="button"
|
2690 |
+
class="wppa-admin-button button"
|
2691 |
+
onclick="wppaTryMagick( ' . $id . ', \'nonlineargray\' )"
|
2692 |
+
value="' . esc_attr( __( 'Non-linear gray', 'wp-photo-album-plus' ) ) . '"
|
2693 |
+
title="-grayscale Rec709Luma"
|
2694 |
+
/>' );
|
2695 |
|
2696 |
+
// Charcoal
|
2697 |
+
wppa_echo( '
|
2698 |
+
<input
|
2699 |
+
type="button"
|
2700 |
+
class="wppa-admin-button button"
|
2701 |
+
onclick="wppaTryMagick( ' . $id . ', \'charcoal\' )"
|
2702 |
+
value="' . esc_attr( __( 'Charcoal', 'wp-photo-album-plus' ) ) . '"
|
2703 |
+
title="-charcoal"
|
2704 |
+
/>' );
|
2705 |
|
2706 |
+
// Paint
|
2707 |
+
wppa_echo( '
|
2708 |
+
<input
|
2709 |
+
type="button"
|
2710 |
+
class="wppa-admin-button button"
|
2711 |
+
onclick="wppaTryMagick( ' . $id . ', \'paint\' )"
|
2712 |
+
value="' . esc_attr( __( 'Paint', 'wp-photo-album-plus' ) ) . '"
|
2713 |
+
title="-paint"
|
2714 |
+
/>' );
|
2715 |
|
2716 |
+
// Sepia
|
2717 |
+
wppa_echo( '
|
2718 |
+
<input
|
2719 |
+
type="button"
|
2720 |
+
class="wppa-admin-button button"
|
2721 |
+
onclick="wppaTryMagick( ' . $id . ', \'sepia\' )"
|
2722 |
+
value="' . esc_attr( __( 'Sepia', 'wp-photo-album-plus' ) ) . '"
|
2723 |
+
title="-sepia-tone 80%"
|
2724 |
+
/>' );
|
2725 |
|
2726 |
+
// Show/hide wppa-horizon
|
2727 |
+
wppa_echo( '
|
2728 |
+
<input
|
2729 |
+
type="button"
|
2730 |
+
class="wppa-admin-button button"
|
2731 |
+
onclick="wppaToggleHorizon()"
|
2732 |
+
value="' . esc_attr( 'Show/hide horizon', 'wp-photo-album-plus' ) . '"
|
2733 |
+
title="' . esc_attr( 'Toggle horizon reference line on/off', 'wp-photo-album-plus' ) . '"
|
2734 |
+
/>' );
|
2735 |
|
2736 |
+
// Anticlock 0.5 deg
|
2737 |
+
wppa_echo( '
|
2738 |
+
<input
|
2739 |
+
type="button"
|
2740 |
+
class="wppa-admin-button button"
|
2741 |
+
onclick="wppaTryMagick( ' . $id . ', \'skyleft\' )"
|
2742 |
+
value="' . esc_attr( '0.5°', 'wp-photo-album-plus' ) . '"
|
2743 |
+
title="' . esc_attr( 'Rotate image by 0.5° anticlockwise', 'wp-photo-album-plus' ) . '"
|
2744 |
+
/>' );
|
2745 |
|
2746 |
+
// Clockwise 0.5 deg
|
2747 |
+
wppa_echo( '
|
2748 |
+
<input
|
2749 |
+
type="button"
|
2750 |
+
class="wppa-admin-button button"
|
2751 |
+
onclick="wppaTryMagick( ' . $id . ', \'skyright\' )"
|
2752 |
+
value="' . esc_attr( '-0.5°', 'wp-photo-album-plus' ) . '"
|
2753 |
+
title="' . esc_attr( 'Rotate image by 0.5° clockwise', 'wp-photo-album-plus' ) . '"
|
2754 |
+
/>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2755 |
|
2756 |
+
// Crop
|
2757 |
+
wppa_echo( '
|
2758 |
+
<input
|
2759 |
+
type="button"
|
2760 |
+
class="wppa-admin-button button"
|
2761 |
+
id="button-' . $id . '"
|
2762 |
+
value="Crop"
|
2763 |
+
title=""
|
2764 |
+
/>' );
|
2765 |
|
2766 |
+
// Set cropbox aspect ratio
|
2767 |
+
$ratio = ( $photoy ? ( $photox / $photoy ) : 'NaN' );
|
2768 |
+
$dflt = wppa_opt( 'image_magick_ratio' );
|
2769 |
|
2770 |
+
wppa_echo( '
|
2771 |
+
<select
|
2772 |
+
onchange="wppaCropper[' . $id . '].setAspectRatio(this.value)"
|
2773 |
+
title="' . __( 'Aspect ratio of cropped image', 'wp-photo-album-plus' ) . '"
|
2774 |
+
>
|
2775 |
+
<option value="NaN"' . ( $dflt == 'NaN' ? ' selected' : '' ) . '>' . __( 'free', 'wp-photo-album-plus' ) . '</option>
|
2776 |
+
<option value="' . $ratio . '"' . ( $dflt == 'ratio' ? ' selected' : '' ) . '>' . __( 'original', 'wp-photo-album-plus' ) . '</option>
|
2777 |
+
<option value="1"' . ( $dflt == '1' ? ' selected' : '' ) . '>' . __( 'square', 'wp-photo-album-plus' ) . '</option>
|
2778 |
+
<option value="1.25"' . ( $dflt == '1.25' ? ' selected' : '' ) . '>4:5 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2779 |
+
<option value="1.33333"' . ( $dflt == '1.33333' ? ' selected' : '' ) . '>3:4 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2780 |
+
<option value="1.5"' . ( $dflt == '1.5' ? ' selected' : '' ) . '>2:3 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2781 |
+
<option value="1.6"' . ( $dflt == '1.6' ? ' selected' : '' ) . '>5:8 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2782 |
+
<option value="1.77777"' . ( $dflt == '1.77777' ? ' selected' : '' ) . '>9:16 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2783 |
+
<option value="2"' . ( $dflt == '2' ? ' selected' : '' ) . '>1:2 ' . __( 'landscape', 'wp-photo-album-plus' ) . '</option>
|
2784 |
+
<option value="0.8"' . ( $dflt == '0.8' ? ' selected' : '' ) . '>4:5 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2785 |
+
<option value="0.75"' . ( $dflt == '0.75' ? ' selected' : '' ) . '>3:4 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2786 |
+
<option value="0.66667"' . ( $dflt == '0.66667' ? ' selected' : '' ) . '>2:3 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2787 |
+
<option value="0.625"' . ( $dflt == '0.625' ? ' selected' : '' ) . '>5:8 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2788 |
+
<option value="0.5625"' . ( $dflt == '0.5625' ? ' selected' : '' ) . '>9:16 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2789 |
+
<option value="0.5"' . ( $dflt == '0.5' ? ' selected' : '' ) . '>1:2 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>
|
2790 |
+
</select>' . $br );
|
2791 |
+
|
2792 |
+
if ( $dflt == 'ratio' ) {
|
2793 |
+
$value = $ratio;
|
2794 |
+
}
|
2795 |
+
elseif ( $dflt == 'free' ) {
|
2796 |
+
$value = '';
|
2797 |
+
}
|
2798 |
+
else {
|
2799 |
+
$value = $dflt;
|
2800 |
+
}
|
2801 |
|
2802 |
+
// $the_js = 'jQuery(document).ready(function(){wppaCropper[' . $id . '].setAspectRatio(' . $value . ');});';
|
2803 |
+
// wppa_add_inline_script( 'wppa-admin', $the_js );
|
2804 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2805 |
|
2806 |
+
// End flex div
|
2807 |
+
wppa_echo( '</div>' );
|
2808 |
+
|
2809 |
+
// Command stack
|
2810 |
+
wppa_echo( '
|
2811 |
+
<h2 class="description" style="margin:1em">' .
|
2812 |
+
__( '<b>ImageMagick</b> command stack', 'wp-photo-album-plus' ) . ':
|
2813 |
+
<span
|
2814 |
+
id="magickstack-' . strval( intval( $id ) ). '"
|
2815 |
+
style="color:blue"
|
2816 |
+
>' .
|
2817 |
+
sanitize_text_field( $magickstack ) . '
|
2818 |
+
</span>
|
2819 |
+
<input
|
2820 |
+
type="button"
|
2821 |
+
class="wppa-admin-button button"
|
2822 |
+
id="imstackbutton-' . strval( intval( $id ) ) . '"
|
2823 |
+
onclick="wppaTryMagick( ' . strval( intval( $id ) ) . ', \'magickundo\' )"
|
2824 |
+
value="' . esc_attr( __( 'Undo', 'wp-photo-album-plus' ) ) . '"
|
2825 |
+
title="' . esc_attr( __( 'Undo last Magick command', 'wp-photo-album-plus' ) ) . '"
|
2826 |
+
style="margin-left:4px;' . ( $magickstack ? 'display:inline;' : 'display:none;' ) . '"
|
2827 |
+
/>
|
2828 |
+
</h2>' );
|
2829 |
+
|
2830 |
+
// Cropper container
|
2831 |
+
// Fake 'for social media' to use the local file here, not cloudinary. Files from cloudinary do not reload, even with ?ver=...
|
2832 |
+
wppa( 'for_sm', true );
|
2833 |
+
wppa_echo( '
|
2834 |
+
<div
|
2835 |
+
class="wppa-cropper-container-wrapper">
|
2836 |
+
<img
|
2837 |
+
id="fs-img-' . $id . '"
|
2838 |
+
src="' . esc_url( wppa_get_photo_url( $id ) ) . '"
|
2839 |
+
style="float:left;max-width:100%"
|
2840 |
+
/>
|
2841 |
+
</div>' );
|
2842 |
+
|
2843 |
+
// Reset switch
|
2844 |
+
wppa( 'for_sm', false );
|
2845 |
+
}
|
2846 |
+
|
2847 |
+
wppa_echo( '</fieldset>' );
|
2848 |
|
2849 |
// End Tab 3
|
2850 |
wppa_echo( '</div>' );
|
2968 |
|
2969 |
|
2970 |
// Comments
|
2971 |
+
$has_pending_comments = false;
|
2972 |
if ( ! $quick && ! empty( $comments ) ) {
|
2973 |
|
2974 |
wppa_echo( '
|
3029 |
}
|
3030 |
wppa_echo( '<td style="padding:0 4px">' . $comment['comment'] . '</td>
|
3031 |
</tr>' );
|
3032 |
+
if ( $comment['status'] != 'approved' ) {
|
3033 |
+
$has_pending_comments = true;
|
3034 |
+
}
|
3035 |
}
|
3036 |
|
3037 |
wppa_echo( '
|
3041 |
</div>' );
|
3042 |
}
|
3043 |
|
3044 |
+
$the_js = '';
|
3045 |
+
|
3046 |
+
// Fix the background color
|
3047 |
+
$the_js .= '
|
3048 |
+
wppaPhotoStatusChange('.$id.');';
|
3049 |
+
|
3050 |
+
// If item is moderatable, open details
|
3051 |
+
// if ( $status == 'pending' && $may_edit_status ) {
|
3052 |
+
// $the_js .= '
|
3053 |
+
// jQuery(document).ready(function(){
|
3054 |
+
// jQuery("#wppa-toplevel-details-'.$id.'").attr("open","open");
|
3055 |
+
// });';
|
3056 |
+
// }
|
3057 |
+
|
3058 |
+
// When there are moderatable comments, open details and comments tab
|
3059 |
+
if ( $has_pending_comments && ( current_user_can( 'wppa_comments' ) || current_user_can( 'wppa_moderate' ) || ( ( wppa_get_user() == $photo['owner'] && wppa_switch( 'owner_moderate_comment' ) ) ) ) ) {
|
3060 |
+
$the_js .= '
|
3061 |
+
jQuery(document).ready(function(){
|
3062 |
+
jQuery("#wppa-toplevel-details-'.$id.'").attr("open","open");
|
3063 |
+
jQuery("#wppa-photoadmin-tab-'.$id.'").trigger("click");
|
3064 |
+
});';
|
3065 |
+
}
|
3066 |
+
wppa_add_inline_script( 'wppa-admin', $the_js );
|
3067 |
|
3068 |
wppa_echo( '
|
3069 |
<div class="clear"></div>
|
3236 |
}
|
3237 |
|
3238 |
$slug = 'photo_bulk';
|
3239 |
+
$a = wppa_is_int( $album ) ? $album : '0';
|
3240 |
if ( ! $a ) {
|
3241 |
$slug .= '_' . $album;
|
3242 |
}
|
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.3.01.
|
9 |
*
|
10 |
*/
|
11 |
|
@@ -765,7 +765,7 @@ static $allowed_tags;
|
|
765 |
'h4' => $sa,
|
766 |
'h5' => $sa,
|
767 |
'h6' => $sa,
|
768 |
-
'hr' =>
|
769 |
'i' => $sa,
|
770 |
'img' => array_merge( $sa, array(
|
771 |
'alt' => true,
|
5 |
* Contains wrappers for standard php functions
|
6 |
* For security and bug reasons
|
7 |
*
|
8 |
+
* Version 8.3.01.003
|
9 |
*
|
10 |
*/
|
11 |
|
765 |
'h4' => $sa,
|
766 |
'h5' => $sa,
|
767 |
'h6' => $sa,
|
768 |
+
'hr' => $sa,
|
769 |
'i' => $sa,
|
770 |
'img' => array_merge( $sa, array(
|
771 |
'alt' => true,
|
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.3.01.
|
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/
|
@@ -23,7 +23,7 @@ global $wpdb;
|
|
23 |
global $wp_version;
|
24 |
|
25 |
/* WPPA Version */
|
26 |
-
global $wppa_version; $wppa_version = '8.3.01.
|
27 |
global $wppa_revno; $wppa_revno = str_replace( '.', '', $wppa_version ); // WPPA db version
|
28 |
|
29 |
/* Init page js data */
|
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.3.01.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/
|
23 |
global $wp_version;
|
24 |
|
25 |
/* WPPA Version */
|
26 |
+
global $wppa_version; $wppa_version = '8.3.01.003'; // WPPA software version
|
27 |
global $wppa_revno; $wppa_revno = str_replace( '.', '', $wppa_version ); // WPPA db version
|
28 |
|
29 |
/* Init page js data */
|